M05 Spindle Stop

M05 stops spindle rotation. It is called before tool changes, before retracting out of a part by hand, and as part of a safe program ending.

Format

M05

How it works

  • The spindle decelerates to a stop; motion commands can continue once stopped.
  • Always stop the spindle before a tool change (M06 usually forces this anyway).
  • It pairs with M03 or M04 that started rotation.

Example

M05 (stop spindle)
M30 (end program)

FAQ

Does M05 also stop coolant? No, M05 only stops spindle rotation. Coolant is controlled separately with M08 (flood on) and M09 (coolant off), so a program typically calls M09 alongside or before M05 rather than relying on M05 to shut off coolant automatically.

Should M05 be called before or after a tool change? Before, generally as part of the same sequence that also retracts the tool. Most tool change cycles include an implicit or explicit spindle stop, since changing tools with the spindle running would be unsafe.

Related: M03 Spindle On and the M-Code Reference.

Scroll to Top

The calculators and tools on Formula Factory are provided for general guidance and informational purposes only. Results are estimates based on standard formulas and the values you enter — they do not constitute professional engineering, electrical, or architectural advice. Always verify calculations with a qualified professional before making decisions for any safety-critical, code-compliance, or commercial application. Formula Factory makes no representations or warranties as to the accuracy or completeness of any result, and accepts no liability for errors, omissions, or any outcomes arising from reliance on this information.