
CNC M-Codes
today
2024-05-04
local_offer
CNC Machining Knowledge
visibility
698
M-codes, Auxiliary functions
- When actually processing the workpiece, it is necessary to tighten the chuck, rotate the spindle and supply coolant.
- For ON/OFF switch action control of mechanical functions, use the two-digit command after the address M,
- One M code can usually be specified in a single block.

Standard M-codes List
Command | Function | Description |
M01 | Program stop | All functions and feed are paused, click start will run |
M00 | Optional stop | The same as M01, but is controlled by the controlling panel |
M03 | Spindle Forward | Spindle rotate counter-clockwise |
M04 | Spindle Reversal | Spindle rotate clockwise |
M05 | Spindle stop | Spindle stop rotating |
M08 | Coolant on | Open the coolant |
M09 | Coolant off | Close the coolant |
M30 | End of program | Spindle stop, coolant off, all functions and feed are paused, cursor return to the initial position |
M40 | Spindle drive gear: Neutral | Change spindle drive to neutral condition, please do stop the spindle before changing the drive gear |
M41 | Spindle drive gear: Low Speed | Change spindle drive to low speed, please do stop the spindle before changing the drive gear |
M42 | Spindle drive gear: High Speed | Change spindle drive to high speed, please do stop the spindle before changing the drive gear |
M98 | Subprogram call | Run from main program to subprogram |
M99 | Subprogram end | End of the subprogram, return to main program |
文章區塊