M Code List
|
Code |
Function |
Note |
|
M00 |
Program stop |
<CNC> |
|
M01 |
Optional program stop |
<CNC> |
|
M02 |
End of program |
<CNC> |
|
M03 |
Spindle start clockwise |
|
|
M04 |
Spindle start counterclockwise |
|
|
M05 |
Spindle stop |
|
|
M06 |
Tool change |
It is generally used in milling models |
|
M07 |
Coolant ON – Mist coolant/Coolant thru spindle |
It is generally used in milling models |
|
M08 |
Coolant ON – Flood coolant |
|
|
M09 |
Coolant OFF |
|
|
M10 |
Milling: Lock the table |
Lathe: Chuck clamp |
|
M11 |
Milling: Unlock the table |
Lathe: Chuck unclamp |
|
M13 |
Spindle2 start clockwise |
|
|
M14 |
Spindle2 start counterclockwise |
|
|
M15 |
Spindle 2 stop |
|
|
M19 |
Spindle orientation |
It is generally used in milling models |
|
M20 |
Spindle orientation cancel |
It is generally used in milling models |
|
M21 |
Tool clamp |
It is generally used in milling models |
|
M22 |
Tool unclamp |
It is generally used in milling models |
|
M25 |
C/Spd axis spindle control |
|
|
M26 |
C/Spd axis C-axis control |
|
|
M30 |
End of program (Return to start) |
<CNC> |
|
M98 |
Subprogram call |
<CNC> |
|
M99 |
Return from subprogram |
<CNC> |
Note: M codes are divided into two groups: those directly interpreted by the CNC system and those left to the user. The M00, M01, M02, M30, M98, and M99 codes are interpreted by the CNC system and are not recommended to be modified. All other M codes are assigned by the machine manufacturer. A list of commonly used M codes is provided above. However, these M codes may be assigned to different functions by the machine manufacturer. You can obtain the appropriate list of M codes for your machine from your machine manufacturer.
