Machsupport Forum
G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: DVanditmars on February 28, 2011, 07:09:08 PM
-
Looked around and searched the forum...
The spindle motor controller in my machine requires that the motor is stopped before changing direction.
Ideally before changing the spindle direction;
1) Spindle speed is set to 0
2) Wait for the shaft index pulse to read 0 RPM
3) Change the spindle direction
4) Spindle speed back to what it was...
Is there a way to do this with G-Code, or is this something that needs to be done in Mach3?
If in Mach3 any help with that?
Thanks
Derek Vanditmars
-
I'm not sure if I understand correctly your question.
Normally, M3 will spin motor CW
M4 will spin motor CCW
M5 will Stop motor
So you could use M3 S10000 , M5 to stop spindle and M4 S10000 to reverse it at 10000 RPM CCW.
Jeff
-
In the example, between the M5 (stop) and the M4 S10000, (reverse at 10000 RPM).
There would not be enough time for the spindle motor to come to a complete stop, before starting up again.
-
I think you could use a delay in the spindle tab configuration
But again, never used it myself.
Jeff
-
Thanks, Jeff.
I think that will work.
-
yOu can also modify the M3/M4 macros to allow the spindle to WAIT for it to stop before continueing.
(;-) TP