Fanuc M-Code List

M-code are cnc program instructions which help cnc machinist/programmer to control cnc machine hardware like chuck, tailstock, quill, coolant. Here are listed M-code which are mostly used on cnc lathe/mill with Fanuc cnc control.

Fanuc M-Code List (Lathe)

M codeDescription
M00Program stop
M01Optional program stop
M02End of program
M03Spindle start forward CW
M04Spindle start reverse CCW
M05Spindle stop
M08Coolant on
M09Coolant off
M29Rigid tap mode
M30End of program reset
M40Spindle gear at middle
M41Low Gear Select
M42High Gear Select
M68Hydraulic chuck close
M69Hydraulic chuck open
M78Tailstock advancing
M79Tailstock reversing
M94Mirrorimage cancel
M95Mirrorimage of X axis
M98Subprogram call
M99End of subprogram

Fanuc M-Code List (Mill)

M codeDescription
M00Program stop
M01Optional program stop
M02End of program
M03Spindle start forward CW
M04Spindle start reverse CCW
M05Spindle stop
M06Tool change
M07Coolant ON – Mist coolant/Coolant thru spindle
M08Coolant ON – Flood coolant
M09Coolant OFF
M19Spindle orientation
M28Return to origin
M29Rigid tap
M30End of program (Reset)
M41Low gear select
M42High gear select
M94Cancel mirrorimage
M95Mirrorimage of X axis
M96Mirrorimage of Y axis
M98Subprogram call
M99End of subprogram