M Codes List

Here is a list of common M codes. Take note that although most M codes are universal, these specific M codes are what you will find on a Haas machine, and your specific machine may vary some:

M00 PROGRAM STOP

M01 OPTIONAL PROGRAM STOP

M02 PROGRAM END

M03 SPINDLE ON FORWARD (S)

M04 SPINDLE ON REVERSE (S)

M05 SPINDLE STOP

M08 COOLANT ON

M09 COOLANT OFF

M10 CHUCK CLAMP

M11 CHUCK UNCLAMP

M12 AUTO AIR JET ON (P)

M13 AUTO AIR JET OFF

M14 MAIN SPINDLE CLAMP

M15 MAIN SPINDLE UNCLAMP

M17 ROTATE TURRET FORWARD (T)

M18 ROTATE TURRET REVERSE (T)

M19 ORIENT SPINDLE (P,R)

M21 TAILSTOCK ADVANCE

M22 TAILSTOCK RETRACT

M23 ANGLE OUT OF THREAD ON

M24 ANGLE OUT OF THREAD OFF

M30 PROGRAM END AND RESET

M31 CHIP AUGER FORWARD

M32 CHIP AUGER REVERSE

M33 CHIP AUGER STOP

M36 PARTS CATCHER ON

M37 PARTS CATCHER OFF

M41 SPINDLE LOW GEAR OVERRIDE

M42 SPINDLE HIGH GEAR OVERRIDE

M43 TURRET UNLOCK (FOR SERVICE USE ONLY)

M44 TURRET LOCK (FOR SERVICE USE ONLY)

M51-M58 OPTIONAL USER M CODE SET

M59 OUTPUT RELAY SET (N)

M61-M68 OPTIONAL USER M CODE CLEAR

M69 OUTPUT RELAY CLEAR (N)

M76 PROGRAM DISPLAYS INACTIVE

M77 PROGRAM DISPLAYS ACTIVE

M78 ALARM IF SKIP SIGNAL FOUND

M79 ALARM IF SKIP SIGNAL NOT FOUND

M85 AUTOMATIC DOOR OPEN

M86 AUTOMATIC DOOR CLOSE

M88 HIGH PRESSURE COOLANT ON

M89 HIGH PRESSURE COOLANT OFF

M93 AXIS POSITION CAPTURE START (P,Q)

M94 AXIS POSITION CAPTURE STOP

M95 SLEEP MODE (hh:mm)

M96 JUMP IF NO SIGNAL (P,Q)

M97 LOCAL SUB-ROUTINE CALL (P,L)

M98 SUB-PROGRAM CALL (P,L)

M99 SUB-PROGRAM/ROUTINE RETURN OR LOOP (P)

M109 INTERACTIVE USER INPUT (P)

M110 TAILSTOCK CHUCK CLAMP

M111 TAILSTOCK CHUCK UNCLAMP

M119 SUB-SPINDLE ORIENT (P,R)

M121-M128 OPTIONAL USER M CODE INTERFACE WITH M-FIN SIGNAL

M133 LIVE TOOL DRIVE FORWARD (P)

M134 LIVE TOOL DRIVE REVERSE (P)

M135 LIVE TOOL DRIVE STOP

M143 SUB-SPINDLE FORWARD (P)

M144 SUB-SPINDLE REVERSE (P)

M145 SUB-SPINDLE STOP

M154 C AXIS ENGAGE
M155 C AXIS DISENGAGE

M164 ROTATE APL GRIPPERS TO “n” POSITION (Pn)

M165 OPEN APL GRIPPER 1 (RAW MATERIAL)

M166 CLOSE APL GRIPPER 1 (RAW MATERIAL)

M167 OPEN APL GRIPPER 2 (FINISHED MATERIAL)

M168 CLOSE APL GRIPPER 2 (FINISHED MATERIAL)