On 03/03/2015 11:39 AM, Tomaz T. wrote: >>> What could be the reason that stepper is losing steps at very low speeds? >> It could be that the drives are of a type that switches to a standby current >> when idle. (Though if that always caused problems they clearly wouldn't do >> it) >> >> A recent similar problem on the forum went away when he increased step >> length. > I found in driver's manuals that pulse width should be longer than 2.5μs, so > what would be recommended value to set it for steplen? > > Then, you should use at least 2500 for the pulse-width.
The default settings for LinuxCNC 2.7 in the configs file univstep_motion.hal are like this : setp ppmc.0.stepgen.00-03.pulse-width-ns 3500 setp ppmc.0.stepgen.00-03.pulse-space-min-ns 3500 # setup time is set to 1 uS setp ppmc.0.stepgen.00-03.setup-time-ns 1000 The setup-time is the separation between direction changes and step pulses. Depending on the stepper drive, it may need more. If the stepper is losing steps when moving entirely in one direction, then there could be two problems. One is the step length is right on the edge of the drive's opto-isolated inputs ability to recognize the pulse, in which case lengthening the step pulse width will definitely help. The other possibility is that you have a particularly bad combination of SCALE and PID settings. The default settings in the file are not good at all for all values of SCALE. I use a combination of audio and Halscope, looking at ppmc.0.encoder.00.delta (velocity in raw encoder count units) and pid.0.error. Trigger Halscope on ppmc.0.encoder.00.delta and look for a lot of jumpy pulses. Proper PID tuning will get rid of the jumps there. What can happen if the servo response is very jumpy is it can actually be causing the command to the step generator to be rapidly reversing direction, and the drive may either reject the command or the motor simply can't follow it. The part above where I talk about encoder is how the step generator and LinuxCNC remain in sync about position. The encoder counter function of the Universal Stepper controller counts the step pulses and reports that position back to LinuxCNC. LinuxCNC uses the PID component to compute a new velocity to send to the step generator. Where I mention "audio" I connect one of those 2" computer internal speakers with a 100 Ohm series resistor to the step output of the board (other speaker wire to gnd) and LISTEN to the step pulses at different jog speeds. When it sounds like a smooth tone rising and falling, then the tuning is good. If this is all going over your head, just send me the SCALE value and MAX_VELOCITY in the univstep.ini file for each axis, and I can run it here to find optimum values. Jon ------------------------------------------------------------------------------ Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
