Mazak M-codes20 codes
Mazak M-code List
A Mazak runs M-codes in EIA/ISO programs, where the common numbers follow Fanuc; the table gives Mazak's own meaning where its machining-centre list differs from the reference. A Mazatrol program needs no M06, because each tool sequence names its tool, but it still carries M-codes: in the M-code unit, the tool sequence M-code items and the manual program unit.
Mazak M-code: 20 codes
Codes in colour link to a full page with a worked example and controller differences; the rest link to their row on the M-code list, except codes whose Mazak meaning differs from that list, which have no link.
| Code | Function |
|---|---|
| M00 | Program StopUnconditional program stop. Machine stops and waits for operator to press cycle start. Spindle, coolant, and feed are stopped. |
| M01 | Optional StopConditional program stop. Machine stops only if Optional Stop switch is ON. Allows operator to skip stops during production runs. |
| M02 | Program EndEnds the program. Stops spindle, coolant, and feed. Cursor stays at M02 line. Does not rewind program. |
| M03 | Spindle On CWStarts the spindle rotating clockwise (when viewed from above on a vertical mill, or from the tailstock on a lathe). Standard direction for right-hand tooling. |
| M04 | Spindle On CCWStarts the spindle rotating counter-clockwise. Used for left-hand tooling, left-hand tapping, and specific operations. |
| M05 | Spindle StopStops the spindle rotation. Should be called before tool changes and at program end. |
| M06 | Tool ChangeExecutes automatic tool change. Swaps the current tool for the tool specified by the preceding T command. Machine goes through its tool change sequence. |
| M07 | Mist Coolant OnActivates mist coolant (air/oil mixture). Provides lubrication with minimal coolant volume. Good for aluminum and where flood coolant is undesirable. |
| M08 | Flood Coolant OnActivates flood coolant. Standard coolant delivery for most machining operations. Provides cooling, lubrication, and chip evacuation. |
| M09 | Coolant OffTurns off all coolant (both mist and flood). Should be called before tool changes and at program end. |
| M10 | Tool ClampClamps the tool on the spindle, not the workholding. |
| M11 | Tool UnclampUnclamps the tool on the spindle, not the workholding. |
| M19 | Spindle OrientationOrients the spindle to a specific angular position and locks it. Required for tool changes with orientation, some boring cycles, and live tooling operations. |
| M30 | Program End and RewindEnds the program and rewinds to the beginning. Stops spindle, coolant, and feed. Standard program ending code. |
| M33 | Tool Length Measurement Unit AdvanceNot lubrication off. The Mazak machining-centre list has no M32. |
| M42 | Indexing Table Reverse RotationNot a gear range. Mazak selects spindle speed range with M36 to M40. |
| M48 | Enable Feedrate OverrideEnables feedrate override. Allows operator to adjust feed rate percentage during cutting. |
| M49 | Disable Feedrate OverrideDisables feedrate override. Machine runs at exactly programmed feed rate, ignoring override knob. |
| M98 | Subprogram CallCalls a subprogram. Execution transfers to the subprogram and returns to the next line after M98 completes. |
| M99 | Subprogram ReturnReturns from a subprogram to the calling program. Execution continues at the line after the M98 call. |
Where Mazak differs
- Mazatrol conversational programs need no M06. Each tool sequence in a unit names the tool it needs. On a machining centre an EIA/ISO program uses
T__ M06as on Fanuc. - Coolant M-codes are not limited to EIA/ISO programs. A Mazatrol program carries them in an M-code unit or in the M-code items of a tool sequence. Mazak's EIA/ISO list gives M7 mist, M8 coolant, M9 all coolant and air off and M51 through-spindle coolant.
- M-code numbers above the common set are model-specific. The Integrex lists differ from the mill lists, so a number from one machine's list does not carry to another without that machine's manual.
- The reference marks M32 and M33 lubrication for Mazak, but Mazak's own EIA/ISO list for machining centres has no M32 and gives M33 as tool length measurement unit advance, so the table leaves M32 out and gives M33 the Mazak meaning.
- The reference also marks M29 rigid tapping, M41 and M42 gear range and M60 pallet change for Mazak. The Mazak machining-centre list has no M29, M41 or M60, so the table leaves them out. It selects spindle speed range with M36 to M40, reverses the indexing table with M42, clamps and unclamps the pallet with M68 and M69, and clamps and unclamps the tool on the spindle with M10 and M11. M50 is air blast and M51 through-spindle coolant, not pallet clamp.
- M13 and M14 spindle-plus-coolant, M21 to M23 mirror image and M36, M37 part counters are not on the Mazak list in the reference.
Frequently asked questions
Where do the M-codes go in a Mazatrol program?
In the M-code unit, which outputs the M-codes entered in it, and in the M-code items of each tool sequence. A manual program unit takes G and M codes in EIA/ISO form. Tool changes need no M06, because each tool sequence names its tool.
Are Mazak EIA/ISO M-codes the same as Fanuc?
For the common set on a machining centre, yes: Mazak's EIA/ISO list gives M0, M1, M2 and M30, M3 to M5, M6, M7 to M9, M98 and M99 the usual meanings. Above that the numbers are model-specific. On an Integrex e-series M3 to M5 drive the milling spindle and the turning spindle takes M203 to M205, so the machine's own list is the reference for anything unusual. See M-code list.
Does M06 do the same thing on a Mazak as on a Fanuc?
On a machining centre, yes: Mazak's EIA/ISO list gives M6 as the tool change, written T__ M06. In a Mazatrol conversational program there is no M06 block, because each tool sequence names its tool. See M06: tool change.
Other controller lists
Last updated 24 Oct 2026