M-Codes: These are typically instructions that are not always universal across different manufacturers that use a Fanuc controller (Or machines like Mazak that can read manual (ISO) units and XYZ (Prototraks) The M designation means “Miscellaneous” and typically control things like Coolant, Spindle Start/Stop, Tailstocks and Chuck Clamping among many other things. These are codes that you really NEED to check with your manufacturers list as they can and do vary in many cases. Some Like M08 (Coolant start) are pretty much always the same but others are not.

- Code List: Lathe
- M00 Program stop
- M01 Optional program stop
- M02 End of program
- M03 Spindle start forward CW
- M04 Spindle start reverse CCW
- M05 Spindle stop
- M08 Coolant on
- M09 Coolant off
- M29 Rigid tap mode
- M30 End of program rewind to start
- M40 Spindle gear at middle
- M41 Low Gear Select
- M42 High Gear Select
- M68 Hydraulic chuck close
- M69 Hydraulic chuck open
- M78 Tailstock advancing
- M79 Tailstock reversing
- M94 Mirror image cancel
- M95 Mirror image of X axis
- M98 Subprogram call
- M99 End of subprogram
Remember, these can and do vary from manufacturer to manufacturer so always check what you use.