{"id":"mcode-m03","model_id":"M3","name":"LinuxCNC M3","summary":"M3 starts the selected spindle rotating clockwise at the speed set by the S word. The optional $ argument selects which spindle the command acts on; if $ is omitted the command acts on spindle 0, and $-1 acts on all active spindles. It is valid to program M3 when the spindle is already turning.","study_notes":["Within one program, speeds can be set per spindle before a single M3, e.g. S100 $0, S200 $1, S300 $2, then M3 $-1 to start spindles 0, 1 and 2 simultaneously at different speeds.","M4 starts the selected spindle counterclockwise and M5 stops the selected spindle; M3/M4/M5 are described as spindle control commands, with M19 orient spindle belonging to modal group 7 like M3, M4 and M5.","M19 orient spindle is cleared by any of M3, M4, M5."],"safety_notes":["If M3 is programmed while the S speed is zero, or while the speed override switch is enabled and set to zero, the spindle does not start turning; if the spindle speed is later set above zero, or the override switch is turned up, the spindle will start turning.","M2 and M30 program end stop the spindle (like M5).","Spindle status (M3/M4/M5 on/off and direction) is part of the modal state saved by M70 and restored by M72 or by M73 autorestore."],"sources":[{"url":"https://linuxcnc.org/docs/html/gcode/m-code.html#mcode:m3-m4-m5","title":"M-Codes","accessed":"2026-10-26"}],"verification":{"status":"source_checked","checked_at":"2026-10-26","values":7,"method":"llm_source_check"},"updated_at":"2026-10-26","type":"instruction","spec":{"language":"gcode","code":"M3","group":"Spindle Control","syntax":"M3 [$n]","parameters":[{"name":"$n","description":"Spindle to operate on. If $ is omitted the command defaults to spindle 0; $-1 operates on all active spindles."},{"name":"S","description":"Spindle speed word; the selected spindle starts clockwise at this speed."}],"dialect":"LinuxCNC","related":[],"standards":[]},"url":"https://machineschema.com/instruction/mcode-m03","license":"https://creativecommons.org/licenses/by/4.0/"}