I'm having a problem understanding how to control a spindle with step/dir rather than PWM. >From what I've read on http://linuxcnc.org/docs/html/examples/spindle.html essentially the spindle speed is a positive number and the M3 and M4 commands are connected to whatever pin(s) controls the direction of the spindle, if it can even change direction. OTOH, from what I can see about the different axis like XY & Z is that the velocity request is signed. And the stepgen takes the absolute value of that to set the step rate and the sign to set the direction. What I can't figure out is how to translate that so that a stepgen running the spindle can control the direction. Where the PWM direction is controlled by # PWM dir pin config setp hm2_7i92.0.gpio.005.is_output true net spindle-ccw => hm2_7i92.0.gpio.005.out and the initial direction of a stepgen is handled with a positive or negative stepscale This thread https://forum.linuxcnc.org/24-hal-components/30638-how-to-change-motor-spin-directions in a way addresses the problem but not with stepgen. In my HAL file I have: net spindle-ccw <= motion.spindle-reverse How would I use spindle-ccw to control the value of a stepgen direction? Or would I somehow change the requested velocity to be +/- so the stepgen properly controls the direction output. Is there an easy way? Thanks John Dammeyer
_______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users