List of M-codes

Classic Control - Lathe Operator's Manual

The Online Interactive Operator's Manual is currently available in English only.

A PDF version of the Operator's Manual is available for download in multiple languages. Click the link below to view the Operator's Manual in your language. Click "Continue" to view the online version in English.

Get a translated PDF Download Continue

This chapter gives detailed descriptions of the M-codes that you use to program your machine.

caution: The sample programs in this manual have been tested for accuracy, but they are for illustrative purposes only. The programs do not define tools, offsets, or materials. They do not describe workholding or other fixturing. If you choose to run a sample program on your machine, do so in Graphics mode. Always follow safe machining practices when you run an unfamiliar program.
note: The sample programs in this manual represent a very conservative programming style. The samples are intended to demonstrate safe and reliable programs, and they are not necessarily the fastest or most efficient way to operate a machine. The sample programs use G-codes that you might choose not to use in more efficient programs.

M-codes are miscellaneous machine commands that do not command axis motion. The format for an M-code is the letter M followed by two to three digits; for example  M03.

Only one M-code is allowed per line of code. All M-codes take effect at the end of the block.

M-codes for Lathe
M00 Stop Program
M01 Optional Program Stop
M02 Program End
M03 / M04 / M05 Spindle CW / CCW / Stop
M08 Coolant On / M09 Coolant Off
M10/M11 Chuck Clamp/Unclamp
M12/M13 Auto Jet Air Blast On/Off (Optional)
M14/M15 Main Spindle Brake On/Off (Optional C-Axis)
M17/M18 Turret Rotation Fwd/Rev
M19 Orient Spindle (Optional P and R Values)
M21/M22 Tailstock Advance/Retract (Optional)
M23/M24 Chamfer Out of Thread On/Off
M30 End of Program and Reset
M31/M33 Chip Auger Forward/Stop (Optional)
M36/M37 Parts Catcher On/Off (Optional)
M38/M39 Spindle Speed Variation On/Off
M41/M42 Low/High Gear (Optional)
M43/M44 Turret Unlock/Lock (Service Use Only)
M51-M58 User M Turn On (Optional)
M59 Set Output Relay
M61-M68 User M Turn Off (Optional)
M69 Clear Output Relay
M76/M77 Display Disable/Enable
M78/M79 Alarm if Skip Signal Found/Not Found
M85/M86 Automatic Door Open/Close (Optional)
M88/M89 High Pressure Coolant On/Off (Optional)
M95 Sleep Mode
M96 Jump If No Signal
M97 Local Subprogram Call
M98 Subprogram Call
M99 Subprogram Return or Loop
M104/M105 Probe Arm Extend/Retract (Optional)
M109 Interactive User Input
M110/M111 Secondary Spindle Chuck Clamp/Unclamp (Optional)
M112/M113 Secondary Spindle Air Blast On/Off (Optional)
M114/M115 Secondary Spindle Brake On/Off (Optional)
M119 Secondary Spindle Orient (Optional)
M121-M128 Optional User M-codes (Optional)
M133/M134/M135 Live Tool Fwd/Rev/Stop (Optional)
M143/M144/M145 Secondary Spindle Fwd/Rev/Stop (Optional)
M154/M155 C-Axis Engage/Disengage (Optional)

Be aware: Many service and repair procedures should be done only by authorized personnel. The service technicians at your Haas Factory Outlet (HFO) have the training, experience, and are certified to do these tasks safely and correctly. You should not do machine repair or service procedures unless you are qualified and knowledgeable about the processes.

Danger: Some service procedures can be dangerous or life-threatening. DO NOT attempt a procedure that you do not completely understand. Contact your Haas Factory Outlet (HFO) and schedule a service technician visit if you have any doubts about doing a procedure.