Where would be the correct place to add spindle control codes?
M3 spindle on CW
M4 spindle on CCW
M5 spindle off
Sn is the RPM to run the spindle at. If it is 0 the spindle will not run.
For example M3 S2000 would need to be inserted before any moves and M5 after all moves are done.