Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: MRM RCModels on March 03, 2013, 07:14:17 PM
-
All,
I'm writing a lathe turret tool change macro and am having a hell of a time finding a way to rotate the A Axis via a macro function. The A Axis Stepper is controlled by a G540. I would like the stepper to rotate freely if possible (like it was jogging).
Thanks
-
Assuming A is defined as a rotary axis:
Code "G0 An.nnn"
while IsMoving()
Sleep(10)
Where n.nnn is the angle to go to should do it.
Regards,
Ray L.
-
Thanks Ray. How do you stop the rotation? I need the axis to rotate while searching for the next tool change then stop.
-
If you want it to just continue rotating until you stop it, use JogOn() and JogOff(). Download this:
http://www.machsupport.com/docs/Mach3_V3.x_Macro_Prog_Ref.pdf
and it should answer all your questions (I wrote this about 4 years ago...).
Regards,
Ray L.