Back to the Gcode Dictionary
M5: Spindle Off (CNC specific), laser off (Laser specific)
Supported in RepRapFirmware version 1.20 and later when the printer mode is set to CNC (see M453) or Laser (see M452).
The spindle motor or laser is turned off.
M5 in RepRapFirmware 3.3 and later
M5 will stop the spindle of the current tool (if any) or all defined spindles if the current tool has no spindle assigned or there is no active tool.