Summary of M-Codes
All MachMotion CNC controls use the Mach3 software. Use the M-code list below as a reference.
M-code Functions
M0 Program stop
M1 Optional program stop
M3/M4 Rotate spindle clockwise/counterclockwise
M5 Stop spindle rotation
M6 Tool change (by two macros)
M7 Mist on
M8 Flood on
M9 Mist & flood off
M30 Program end and rewind
M47 Repeat program from first line
M48 Enable speed and feed override
M98 Call subroutine
M99 Return from subroutine/repeat
Custom Functions
M-code*
M200 Output 5 on
M201 Output 5 off
M202 Output 6 on
M203 Output 6 off
M204 Output 7 on
M205 Output 7 off
M206 Output 8 on
M207 Output 8 off
M208 Output 9 on
M209 Output 9 off
M210 Output 10 on
M211 Output 10 off
M212 Output 11 on
M213 Output 11 off
M214 Output 12 on
M215 Output 12 off
*These custom M-codes are used to control the relay outputs on the breakout board. Outputs 5-12
must be enabled with the port set to 2 and the pin set to the corresponding relay on the breakout
board (R4 = pin 4).
M200.m1s M201.m1s:SET OUTPUT IO
M930.m1s :Prope z surface
m999.m1s :Independent REF All Home.