Mazak (EIA) M-code list
181 M-codes. Pick a code for the format, the addresses, an example program and what to watch out for.
Machine builders set many M codes, and they change by model and options. Check the M code list for your machine.
| Code | Meaning | Machine |
|---|---|---|
| M00 | Program stop | Mill and lathe |
| M01 | Optional stop | Mill and lathe |
| M02 | Program end | Mill and lathe |
| M03 | Spindle normal rotation | Mill and lathe |
| M04 | Spindle reverse rotation | Mill and lathe |
| M05 | Spindle stop | Mill and lathe |
| M06 | Chuck unclamp (releasing workpiece) | Mill and lathe |
| M07 | Chuck clamp (holding workpiece) | Mill and lathe |
| M08 | Flood coolant ON | Mill and lathe |
| M09 | Coolant OFF | Mill and lathe |
| M12 | Milling spindle mode cancel (Turning mode selection) | Mill and lathe |
| M13 | Milling tool normal rotation | Mill and lathe |
| M14 | Milling tool reverse rotation | Mill and lathe |
| M15 | Milling tool stop | Mill and lathe |
| M16 | Spindle orientation 0° (for AJC) | Mill and lathe |
| M17 | Spindle orientation 120° (for AJC) | Mill and lathe |
| M18 | Spindle orientation 240° (for AJC) | Mill and lathe |
| M19 | Spindle orientation position (for the robot to insert a workpiece) | Mill and lathe |
| M20 | Robot service call | Mill and lathe |
| M21 | Robot service call | Mill and lathe |
| M22 | Robot service call | Mill and lathe |
| M23 | Robot service call | Mill and lathe |
| M24 | Robot service call | Mill and lathe |
| M25 | Robot service call | Mill and lathe |
| M26 | Robot service call | Mill and lathe |
| M27 | Robot service call | Mill and lathe |
| M28 | Robot service call | Mill and lathe |
| M29 | Robot service call | Mill and lathe |
| M30 | Reset & tape rewind | Mill and lathe |
| M31 | Tail spindle & tailstock body advance (for 300 or 400-III or IIIT) | Mill and lathe |
| M32 | Tail spindle & tailstock body retract (for 300 or 400-III or IIIT) | Mill and lathe |
| M33 | Low chuck pressure | Mill and lathe |
| M34 | High chuck pressure | Mill and lathe |
| M45 | Air coolant blow ON (coolant stop: M09) | Mill and lathe |
| M48 | Parts catcher advance | Mill and lathe |
| M49 | Parts catcher retract | Mill and lathe |
| M51 | Error detect OFF | Mill and lathe |
| M52 | Error detect ON | Mill and lathe |
| M53 | Chamfering OFF | Mill and lathe |
| M54 | Chamfering ON | Mill and lathe |
| M55 | Piece count | Mill and lathe |
| M56 | Front door open | Mill and lathe |
| M57 | Front door close | Mill and lathe |
| M58 | Chuck air blast | Mill and lathe |
| M60 | C-axis unclamp | Mill and lathe |
| M66 | C-axis clamp | Mill and lathe |
| M67 | C-axis brake (for machining by G01) | Mill and lathe |
| M68 | Cycle bar feeder call 1 | Mill and lathe |
| M69 | Cycle bar feeder call 2 | Mill and lathe |
| M72 | Inside chuck clamp | Mill and lathe |
| M73 | Outside chuck clamp | Mill and lathe |
| M74 | Steady rest – milling head connection mode release | Mill and lathe |
| M75 | Steady rest – milling head connection mode start | Mill and lathe |
| M81 | Workpiece measurement start | Mill and lathe |
| M82 | Workpiece measurement end | Mill and lathe |
| M83 | Tool measurement start | Mill and lathe |
| M84 | Tool measurement end | Mill and lathe |
| M86 | Steady rest 1 unclamp | Mill and lathe |
| M87 | Steady rest 1 clamp | Mill and lathe |
| M88 | Steady rest 2 unclamp | Mill and lathe |
| M89 | Steady rest 2 clamp | Mill and lathe |
| M96 | User macro interruption, valid | Mill and lathe |
| M97 | User macro interruption, invalid | Mill and lathe |
| M98 | EIA → EIA Subprogram call | Mill and lathe |
| M99 | EIA → EIA Return to main EIA program | Mill and lathe |
| M100 | Workpiece measurement DIA start | Mill and lathe |
| M101 | Workpiece measurement DIA end | Mill and lathe |
| M102 | Workpiece measurement STP start | Mill and lathe |
| M103 | Workpiece measurement STP end | Mill and lathe |
| M104 | Workpiece measurement GRV start | Mill and lathe |
| M105 | Workpiece measurement GRV end | Mill and lathe |
| M106 | Workpiece measurement WID start | Mill and lathe |
| M107 | Workpiece measurement WID end | Mill and lathe |
| M108 | Workpiece measurement DIS start (chuck barrier release) | Mill and lathe |
| M109 | Workpiece measurement DIS end | Mill and lathe |
| M110 | Tool tip measurement TOL start | Mill and lathe |
| M111 | Tool tip measurement TOL end | Mill and lathe |
| M112 | External tool compensation EXT start | Mill and lathe |
| M113 | External tool compensation EXT end | Mill and lathe |
| M114 | Z-axis offset measurement ZOF start | Mill and lathe |
| M115 | Z-axis offset measurement ZOF end | Mill and lathe |
| M116 | C-axis offset measurement COF start | Mill and lathe |
| M117 | C-axis offset measurement COF end | Mill and lathe |
| M120 | Measurement data print out | Mill and lathe |
| M150 | Workpiece unload demand to robot | Mill and lathe |
| M151 | Milling spindle through air blow ON (Only for turning tools) | Mill and lathe |
| M152 | Milling spindle through air blow OFF (Only for turning tools) | Mill and lathe |
| M153 | Milling spindle through coolant ON | Mill and lathe |
| M154 | Milling spindle through coolant OFF | Mill and lathe |
| M155 | Chuck coolant ON (composed movement) | Mill and lathe |
| M156 | Chuck coolant OFF (composed movement) | Mill and lathe |
| M157 | Spindle through coolant blow ON (OFF: M159) | Mill and lathe |
| M158 | Spindle through air blow ON (OFF: M159) | Mill and lathe |
| M159 | M157, M158 OFF | Mill and lathe |
| M160 | Shower coolant ON or chuck stopper extend | Mill and lathe |
| M161 | Shower coolant OFF or chuck stopper retract | Mill and lathe |
| M162 | Workpiece rechucking (for a piece delivered by robot) | Mill and lathe |
| M163 | Tail spindle thrust low pressure (for 300 or 400-III or IIIT) | Mill and lathe |
| M164 | Tail spindle thrust high pressure (for 300 or 400-III or IIIT) | Mill and lathe |
| M169 | 35K, 70K high pressure coolant ON (OFF: M9, M154) | Mill and lathe |
| M172 | Index 0°(KOUYOU) | Mill and lathe |
| M173 | Index 90°(KOUYOU) | Mill and lathe |
| M174 | Index 180°(KOUYOU) | Mill and lathe |
| M175 | Index 270°(KOUYOU) | Mill and lathe |
| M176 | Index 270°(KOUYOU) | Mill and lathe |
| M177 | Index 270°(KOUYOU) | Mill and lathe |
| M178 | Index 270°(KOUYOU) | Mill and lathe |
| M179 | Index 270°(KOUYOU) | Mill and lathe |
| M198 | EIA → MAZATROL program call | Mill and lathe |
| M199 | EIA → MAZATROL program end | Mill and lathe |
| M200 | Milling point machining start | Mill and lathe |
| M201 | Milling line machining start | Mill and lathe |
| M202 | Turning mode | Mill and lathe |
| M203 | Milling tool normal rotation | Mill and lathe |
| M204 | Milling tool reverse rotation | Mill and lathe |
| M205 | Milling tool stop | Mill and lathe |
| M207 | M208, M209 mode cancel | Mill and lathe |
| M208 | ATC prohibition mode during finishing, coolant ON | Mill and lathe |
| M209 | ATC prohibition mode during finishing, coolant OFF | Mill and lathe |
| M210 | C-axis clamp (for milling) | Mill and lathe |
| M211 | C-axis brake (for milling) | Mill and lathe |
| M212 | C-axis unclamp (for milling) | Mill and lathe |
| M213 | C-axis brake only (brake by M211) | Mill and lathe |
| M214 | C-axis unclamp only (unclamp by M212) | Mill and lathe |
| M215 | M213, M214 and M216 mode cancel | Mill and lathe |
| M216 | C-axis unclamp neglect mode (cancel: M215) | Mill and lathe |
| M219 | Milling tool orient | Mill and lathe |
| M230 | Grinding mode ON | Mill and lathe |
| M231 | Grinding speed setting | Mill and lathe |
| M236 | C-axis servo gain normal | Mill and lathe |
| M237 | C-axis servo gain low | Mill and lathe |
| M238 | C-axis servo gain middle | Mill and lathe |
| M239 | C-axis servo gain high | Mill and lathe |
| M248 | Spindle speed check (for interlocking the start of cutting) | Mill and lathe |
| M249 | Milling head selection preparation | Mill and lathe |
| M250 | Milling head or B-axis unclamp | Mill and lathe |
| M251 | B-axis clamp | Mill and lathe |
| M252 | Milling spindle unclamp | Mill and lathe |
| M253 | Milling spindle clamp | Mill and lathe |
| M254 | Milling head or B-axis clamp | Mill and lathe |
| M258 | Milling head air blow | Mill and lathe |
| M260 | Polygon mode ON | Mill and lathe |
| M261 | Polygon mode OFF | Mill and lathe |
| M274 | Steady rest coolant ON | Mill and lathe |
| M275 | Steady rest coolant OFF | Mill and lathe |
| M331 | Spindle coil change fixed to high speed | Mill and lathe |
| M332 | Spindle coil change, valid | Mill and lathe |
| M348 | Yt-axis selection | Mill and lathe |
| M349 | Y-axis selection | Mill and lathe |
| M351 | M352 cancel | Mill and lathe |
| M352 | Spindle speed arrival signal check, valid | Mill and lathe |
| M370 | Axis load detection, invalid | Mill and lathe |
| M371 | Axis load detection, valid | Mill and lathe |
| M372 | Axis load detection, temporarily invalid | Mill and lathe |
| M373 | Axis load detection, re-start | Mill and lathe |
| M374 | NC feed holding on overload detection | Mill and lathe |
| M375 | NC feed holding & spindle stop on overload detection | Mill and lathe |
| M376 | Overload detection level % setting | Mill and lathe |
| M377 | Overload detection time setting (unit: 0.1 sec) | Mill and lathe |
| M378 | Overload detection peak % or detection frequency setting | Mill and lathe |
| M379 | Overload detection table No. registration | Mill and lathe |
| M390 | M391 cancel | Mill and lathe |
| M391 | Spindle mis-chucking cancel (M3 or M4 completed with chuck open) | Mill and lathe |
| M394 | TOOL EYE extension possible during chuck close (when robot valid) | Mill and lathe |
| M395 | M394 cancel | Mill and lathe |
| M601 | Magazine tool rotation | Mill and lathe |
| M731 | Tail thrust 1 selection | Mill and lathe |
| M732 | Tail thrust 2 selection | Mill and lathe |
| M733 | Tail thrust 3 selection | Mill and lathe |
| M734 | Tail thrust 4 selection | Mill and lathe |
| M735 | Tail thrust 5 selection | Mill and lathe |
| M736 | Tail thrust 6 selection | Mill and lathe |
| M737 | Tail thrust 7 selection | Mill and lathe |
| M738 | Tail thrust 8 selection | Mill and lathe |
| M739 | Tail thrust 9 selection | Mill and lathe |
| M740 | Tail thrust 10 selection | Mill and lathe |
| M741 | Positioning tailstock to "Position 1" | Mill and lathe |
| M742 | Positioning tailstock to "Position 2" | Mill and lathe |
| M743 | Positioning tailstock to "Retract" | Mill and lathe |
| M928 | Y-axis zero point return | Mill and lathe |
| M930 | Yt-axis moving to ATC position | Mill and lathe |
Take the list to the machine. The app searches every code by number or shop word and decodes a whole program line by line.
Open the M-code list Mazak G-codes