Mach3 M Codes

Mach3 m code list for cnc machinists.

These Mach3 m codes work for both mill and turn.
Mach3 CNC

Mach3 M Codes

M-codeMeaning
M0Program stop
M1Optional program stop
M3Program end
M3/4Rotate spindle clockwise/counterclckwise
M5Stop spindle rotation
M6Tool change (by two macros)
M7Mist coolant on
M8Flood coolant on
M9All coolant off
M30Program end and Rewind
M47Repeat program from first line
M48Enable speed and feed override
M49Disable speed and feed override
M98Call subroutine
M99Return from subroutine/repeat