Re: Lost steps for the first time!
Posted: Wed Jan 16, 2013 5:26 am
BenJackson wrote:BenJackson wrote: All my settings are identical from parallel port to FPGA, except the FPGA is actually able to make the 1us pololu pulses. I assume I will need to stretch those a bit, which shouldn't have any effect on my max speeds. I could also put a scope on the pololu if I want to do some contortion to check the signal quality.
I made another spool with the timings bumped from 1us/200ns to 2us/400ns and no lost steps. Makes sense that you'd have to consider the waveform at the pololu and be less aggressive. The min step time on the pololu is around 30us anyway so the signalling time hardly matters.
I made another spool and lost steps again, so I put a scope on it and dug into the code. The signal quality is actually fine for the original 1us signals. I saw occasional back-to-back steps at the fastest possible signal speed, though (much faster than the fastest motor speed). The part of the manual I was glossing over:
(float r/w) maxvel
Maximum speed, in position units per second. If set to 0, the
driver will always use the maximum possible velocity based on
the current step timings and position-scale. The max velocity
will change if the step timings or position-scale changes.
Defaults to 0.
In other words, the driver will try to make pulses as fast as the signalling is allowed. I assumed it was safe to leave this at 0 because the position command (and thus indirectly the velocity) is already being driven by the trajectory planner, which already limits the axis velocity. However if the hostmot2 stepgen slightly disagrees with the trajectory planner it is willing to catch up "as fast as possible". With maxvel set and the scope on infinite persistence I didn't see any more doubled steps. I hope I have this nailed down!