Mazak Lathe G-Code & M-Code Reference (Plus Mazak Naming)
Published May 21, 2026
If you're looking up a G-code or M-code on a Mazak lathe, or trying to make sense of model names like "QT-200MSY Nexus," this is the page. The codes are below, with what each one actually does on a Mazak lathe — not a generic Fanuc table. The naming section is here too, because half the people searching for one end up needing the other.
I spent 19 years at Mazak Corporation in Florence, Kentucky as an Applications Engineer, and the 25 years since running APM on my own. Everything below is lathe-specific. Mills run a different M-code subset, and I don't program mills.
Mazak lathe naming conventions
Mazak names a lathe by the machine family, then the bed/spindle size, then suffixes that tell you what's bolted on, then a control generation tag.
Quick Turn (QT) — the workhorse line. Two-axis turning with optional milling, Y-axis, and sub-spindle.
- QT — base Quick Turn, no generation tag means first-gen
- QT-Smart — Quick Turn paired with the SmoothG / SmoothAi control
- QT-Nexus — the Nexus generation, runs Matrix or Smooth depending on year
- QT-Compact — smaller-footprint Quick Turn for the same envelope
- QT-Ultra — bigger envelope, heavier cuts
Slant Turn (SQT / ST) — the slant-bed lathes. More rigid casting, designed for bigger or harder work.
- SQT — base Slant Quick Turn
- SQT-MS — slant turn with milling and sub-spindle (most common multi-tasking SQT)
- SQT-MSY — adds a Y-axis on top of MS
Integrex (i and e series) — true multi-tasking. Turning plus a real B-axis milling head, often with a sub-spindle.
- i-100, i-200, i-300, i-400, i-630, i-800 — bed and spindle size increasing with the number
- e-series — engineered class, larger and more capable than the i-series
- Multiplex — older multi-tasking line that pre-dates the Integrex name
What the suffixes mean
This is where most people get tripped up. Read the suffix left to right:
- M — milling, meaning a driven-tool turret with a C-axis on the main spindle. The turret can mill, drill, and tap, but only on lines that radiate from spindle center (no Y offset).
- Y — Y-axis. Adds off-center milling. A QT-200MY can mill a flat or drill a hole that doesn't pass through the spindle centerline.
- S — sub-spindle. A second spindle opposite the main, so you can transfer a part and finish the back side without a second setup.
- MS — M plus S. Milling on the main, sub-spindle for transfer. No Y-axis.
- MSY — M plus S plus Y. The full package on a two-turret machine.
- W — second turning spindle (different from sub-spindle in older Integrex naming)
- G — gantry loader for automation
- T — pure turning, no milling (older nomenclature)
"Nexus" in the name is a generation marker. It tells you the machine and control were updated together. "Smart" tells you it ships with the Smooth-family control. The Roman numerals (II, III) tell you it's a second- or third-generation casting.
A QT-200MSY Nexus is a Quick Turn, 200mm chuck class, with milling, sub-spindle, Y-axis, on the Nexus generation. Once you read the suffixes left-to-right, the name tells you exactly what's on the machine.
G-code reference for Mazak lathes
Mazak lathes accept standard EIA/ISO G-code when you drop out of Mazatrol conversational. The codes below are the ones I actually use on Mazak lathes — same names as on a Fanuc, slightly different behavior in a few places.
| Code | What it does on a Mazak lathe |
|---|---|
| G00 | Rapid traverse. Default rapid behavior on Mazak is non-linear (each axis at its own max), not straight-line. Watch the toolpath if a fixture is close. |
| G01 | Linear feed move. Feed comes from F. |
| G02 | Circular interpolation, clockwise. I, K addressed from the start point on lathes. |
| G03 | Circular interpolation, counter-clockwise. |
| G20 | Inch mode. |
| G21 | Metric mode. Most Mazak lathes ship metric; double-check the parameter, not the dial. |
| G28 | Return to machine reference (home). Use an intermediate point so the tool clears the chuck. |
| G32 | Single-pass thread cutting. Used inside G76 cycles or for hand-tuned threads. |
| G50 | Maximum spindle speed clamp when running G96 constant surface speed. Set this every program — without it, a small diameter under G96 will hit max RPM and tear out. |
| G70 | Finish cycle. Runs the finish profile defined in a G71/G72/G73 block. |
| G71 | Roughing cycle along the Z-axis (OD or ID turning). The workhorse roughing canned cycle. |
| G72 | Roughing cycle along the X-axis (facing rough). |
| G73 | Pattern repeat — for forgings or castings where you're following an existing rough profile. |
| G74 | Peck drilling on face (or peck face grooving on some controls). |
| G75 | Peck OD grooving. |
| G76 | Multi-pass threading cycle. The single most-used canned cycle on a Mazak lathe in EIA mode. Controls infeed angle, pass count, and final pass depth. |
| G90 | Absolute positioning. |
| G91 | Incremental positioning. |
| G92 | Work coordinate setting. Older syntax; G54-G59 work offsets are more common now. |
| G94 | Feed per minute (mm/min or ipm). |
| G95 | Feed per revolution (mm/rev or ipr). This is the default mode for lathe work — feed is per spindle revolution, which keeps surface finish consistent as RPM changes under G96. |
| G96 | Constant surface speed (SFM or m/min). Spindle RPM varies with X position to hold a constant cutting speed. Pair with G50. |
| G97 | Constant RPM. Use this for drilling, tapping, threading, and any time the tool sits at the same diameter. |
The two pairs people get wrong most: G94/G95 (you almost always want G95 on a lathe), and G96/G97 (G96 for turning, G97 for drilling and threading).
M-code reference for Mazak lathes
M-codes are the machine-side actions — spindle, coolant, chuck, tailstock, program flow. Mazak lathes use most of the standard set, plus machine-specific M-codes for the sub-spindle, bar feeder, gantry, and parts catcher.
| Code | What it does |
|---|---|
| M00 | Program stop. Spindle, coolant, feed all off. Press cycle start to resume. |
| M01 | Optional stop. Acts like M00 only if the OPT STOP button on the control is on. |
| M02 | End of program. Older; M30 has replaced it on most Mazaks. |
| M03 | Spindle on, clockwise (looking from the tailstock toward the chuck). |
| M04 | Spindle on, counter-clockwise. |
| M05 | Spindle stop. |
| M08 | Coolant on. |
| M09 | Coolant off. |
| M10 | Chuck clamp. |
| M11 | Chuck unclamp. |
| M12 | Tailstock advance. |
| M13 | Tailstock retract. |
| M19 | Spindle orient — locks the spindle at a specific angle for tool change or for a C-axis mill operation entry. |
| M23 | Thread chamfer on (G76 will chamfer the end of the thread). |
| M24 | Thread chamfer off. |
| M30 | End of program and rewind. The standard program end on Mazak lathes. |
| M40–M44 | Gear range select on older two-range and three-range spindle gearboxes. New machines run direct-drive and don't use these. |
| M48 | Feed override enable. |
| M49 | Feed override disable — useful for thread cycles where you don't want the operator to dial the feed off the pitch. |
| M52 / M53 | Tailstock control variants on some models (quill advance/retract separate from body). |
| M85 | Sub-spindle chuck clamp on some machines — varies. Check the operator manual for your exact model before you assume. |
| M98 | Subprogram call. |
| M99 | Subprogram return (or end of subprogram). |
Mazak adds machine-specific M-codes for sub-spindle transfer (synchronized rotation, push, grip), bar feeder commands, gantry robot signals, parts catcher in/out, and door open/close on automated cells. Those M-code numbers are not standard across machines — an M85 on a QT-200MSY may not be the same action on an Integrex i-200. Always reference the operator manual for the specific machine and control version before you run unfamiliar M-codes.
Where Mazatrol fits
Every Mazak lathe accepts EIA G/M-code, but the reason most shops buy a Mazak is Mazatrol conversational programming — unit-by-unit programming where the control generates the toolpath from a part description. You can mix the two: a Mazatrol program can call an EIA subprogram for a feature that's easier to write in code (an odd thread, a complex groove, a probe routine).
Practical tips for working in either mode are in Mazatrol tips from 45 years on the floor.
When codes go wrong — alarms
Most of the time a G or M code goes wrong, the machine throws an alarm before it crashes. Reading the alarm correctly is half the battle. The Mazak alarm code reference covers what each alarm actually means, what triggers it, and the fix — across T-Plus, T-32, Matrix, and SmoothG controls. If a program is throwing an alarm you don't recognize, start there.
When you need help on a Mazak lathe
If you have a Mazak that's throwing alarms nobody can clear, leaving cycle time on the floor, or running on a control the dealer's young techs don't want to touch (T-Plus, T-32, Fusion 640), send me the part, the machine, and the control version. 19 years inside Mazak, 25 years on my own. I'll tell you what's possible.
Thank you, Tom Herzog