Back to the Gcode Dictionary
M4: Spindle On, Counterclockwise (CNC specific)
Supported in RepRapFirmware version 1.20 and later when the printer mode is set to CNC (see M453).
- Snnn Spindle RPM
- Pnnn Spindle slot (CNC mode only). Directly address a spindle slot.
- M4 S4000
The spindle is turned on with a speed of 4000 RPM.
M4 in RepRapFirmware 3.3 and later
M4 can be called without any parameters and will start the spindle of the current tool turning counterclockwise at the spindle RPM of that tool.
Using the S parameter will additionally set the spindle RPM of the current tool.
It is an error if there is no tool active or the active tool does not have a spindle assigned and there is no P parameter provided to define which spindle this should be applied to.