M5 is a G-code M instruction in LinuxCNC that stops the selected spindle. An optional $ parameter selects which spindle is stopped; without it the command applies to spindle 0. M5 can be issued whether the spindle is turning or already stopped.
| Language | gcode |
|---|---|
| Code | M5 |
| Group | Spindle Control |
| Syntax | M5 [$n] |
| Dialect | LinuxCNC |
| Name | Description |
|---|---|
| $n | Spindle to stop. Omit to operate on spindle 0; use $-1 to operate on all active spindles. |