# LinuxCNC M9

Instructions · `M9` · verification: source checked

M9 is a LinuxCNC M-code that turns coolant off. It stops both the mist coolant output turned on by M7 and the flood coolant output turned on by M8. It can be programmed regardless of the current coolant state.

## Specification

| Property | Value |
|---|---|
| Language | gcode |
| Code | M9 |
| Group | Coolant Control |
| Dialect | LinuxCNC |

## Study notes

- M7 turns mist coolant on and controls the iocontrol.0.coolant-mist pin; M8 turns flood coolant on and controls the iocontrol.0.coolant-flood pin.
- The coolant control pins must be connected in HAL before M7 or M8 will control an output.
- M7, M8 and M9 can be used regardless of the current coolant state.
- Coolant is turned off like M9 as one of the effects of M2/M30 program end.
- Coolant continues to flow during a tool change (M6) unless it has been turned off by an M9.

## Sources

1. [M-Codes](https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m7-m8-m9) (accessed 2026-10-26)

---

Source page: https://machineschema.com/instruction/mcode-m09  
JSON: https://machineschema.com/instruction/mcode-m09.json  
License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Cite Machine Schema and the original sources.
