M-code reference

M05 M-Code: Spindle Stop

Spindle Stop — Stops the spindle. It is usually programmed before tool changes, M00 and program end.

By cnccode · Updated
PropertyValue
CodeM05
FunctionSpindle Stop
Used onMills and lathes

What does M05 do?

Stops the spindle. It is usually programmed before tool changes, M00 and program end.

M05 example

Example
M05
M09
G91 G28 Z0

Tips

  • M06 normally stops the spindle by itself, but explicit M05 is clearer.

M-codes vary between machine builders. Codes from M00 to M09, M30 and M98/M99 are nearly universal; most others are defined by the machine builder. Always check the M-code list in your machine manual.

Most-used M-codes

CodeFunction
M00Program Stop
M01Optional Stop
M03Spindle On Clockwise
M04Spindle On Counter-Clockwise
M06Tool Change
M08Flood Coolant On
M09Coolant Off
M30Program End and Rewind
M98Subprogram Call
M99Subprogram Return / Loop

Frequently asked questions

What does M05 mean on a CNC machine?
M05 is Spindle Stop. Stops the spindle. It is usually programmed before tool changes, M00 and program end.