KEMBAR78
CNC Mach3 M-Code Reference Guide | PDF | Computer Programming | Areas Of Computer Science
0% found this document useful (0 votes)
400 views2 pages

CNC Mach3 M-Code Reference Guide

The document provides a summary of standard M-codes and custom M-codes used in MachMotion CNC controls. Standard M-codes control functions like program stop, spindle control, tool changes, and program end. Custom M-codes like M200-M215 are used to control relay outputs on a breakout board to enable outputs 5-12 which must be set to the corresponding relay pin. M930 finds the z-surface and M999 homes all axes independently.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
400 views2 pages

CNC Mach3 M-Code Reference Guide

The document provides a summary of standard M-codes and custom M-codes used in MachMotion CNC controls. Standard M-codes control functions like program stop, spindle control, tool changes, and program end. Custom M-codes like M200-M215 are used to control relay outputs on a breakout board to enable outputs 5-12 which must be set to the corresponding relay pin. M930 finds the z-surface and M999 homes all axes independently.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

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.

You might also like