Mazak G-codes: reference table
Mazak EIA/ISO G-codes for Mazatrol machining centers and Integrex machines: everyday commands, full list with modal groups, and T/M series differences.
This reference lists the G-codes used in EIA/ISO programs on Mazatrol controls (Fusion 640M, Matrix, Matrix 2, SmoothG). Conversational Mazatrol programs do not use them. The available set depends on the control generation and the installed options. A G-code the control does not know, or one whose option is missing, stops the program with alarm 808.
The fixed cycles are described in detail on the page Fixed cycles.
Codes in group 00 act only in the block in which they are written. All other groups are modal. G-codes from different groups can share a block, and the control processes them in ascending group order. If two codes from the same group appear in one block, the last one is valid.
The “Default” column marks two cases. “Power-on” means the code is active after switching on or after a reset that initializes the modal states. “Parameter” means the initial state is selected by a parameter. A change between inch and metric input only takes effect after switching the control off and on again.
Essential G-codes
| Code | Group | Description |
|---|---|---|
| G00 | 01 | Positioning (rapid traverse) |
| G01 | 01 | Linear interpolation |
| G02 | 01 | Circular interpolation clockwise |
| G03 | 01 | Circular interpolation counterclockwise |
| G04 | 00 | Dwell |
| G17 | 02 | XY plane selection |
| G28 | 00 | Reference point return |
| G40 | 07 | Tool radius compensation off |
| G41 | 07 | Tool radius compensation left |
| G42 | 07 | Tool radius compensation right |
| G43 | 08 | Tool length offset (+) |
| G49 | 08 | Tool length offset off |
| G54 | 12 | Workpiece coordinate system 1 |
| G80 | 09 | Fixed cycle off |
| G81 | 09 | Spot drilling cycle |
| G83 | 09 | Deep-hole drilling cycle |
| G84 | 09 | Tapping cycle |
| G90 | 03 | Absolute data input |
| G91 | 03 | Incremental data input |
| G94 | 05 | Feed per minute |
| G95 | 05 | Feed per revolution |
Full reference
| Code | Group | Description | Default |
|---|---|---|---|
| G00 | 01 | Positioning (rapid traverse) | Parameter |
| G01 | 01 | Linear interpolation | Parameter |
| G01.1 | 01 | Thread cutting with C-axis interpolation | |
| G02 | 01 | Circular interpolation clockwise | |
| G03 | 01 | Circular interpolation counterclockwise | |
| G02.1 | 01 | Spiral interpolation clockwise | |
| G03.1 | 01 | Spiral interpolation counterclockwise | |
| G02.2 | 01 | Involute interpolation clockwise | |
| G03.2 | 01 | Involute interpolation counterclockwise | |
| G04 | 00 | Dwell | |
| G05 | 00 | High-speed machining mode | |
| G06.1 | 01 | Fine spline interpolation | |
| G06.2 | 01 | NURBS interpolation | |
| G07 | 00 | Virtual-axis interpolation | |
| G07.1 | 00 | Cylindrical interpolation | |
| G09 | 00 | Exact stop check | |
| G10 | 00 | Programmed data setting on | |
| G10.1 | 00 | Command address off | |
| G10.9 | Selection between diameter and radius data input | ||
| G11 | 00 | Programmed data setting off | |
| G12.1 | 26 | Polar coordinate interpolation on | |
| G13.1 | 26 | Polar coordinate interpolation off | Power-on |
| G15 | 18 | Polar coordinate input off | |
| G16 | 18 | Polar coordinate input on | |
| G17 | 02 | XY plane selection | Parameter |
| G18 | 02 | ZX plane selection | Parameter |
| G19 | 02 | YZ plane selection | Parameter |
| G20 | 06 | Inch data input | Parameter |
| G21 | 06 | Metric data input | Parameter |
| G22 | 04 | Pre-move stroke check on | |
| G23 | 04 | Pre-move stroke check off | Power-on |
| G27 | 00 | Reference point check | |
| G28 | 00 | Reference point return | |
| G29 | 00 | Return from reference point | |
| G30 | 00 | Return to 2nd, 3rd or 4th reference point | |
| G30.1 | 00 | Return to floating reference point | |
| G31 | 00 | Skip function | |
| G31.1 | 00 | Multi-step skip 1 | |
| G31.2 | 00 | Multi-step skip 2 | |
| G31.3 | 00 | Multi-step skip 3 | |
| G33 | 01 | Thread cutting (straight, taper) | |
| G34 | 01 | Thread cutting with variable lead | |
| G34.1 | 00 | Hole pattern: holes on a circle | |
| G35 | 00 | Hole pattern: holes on a line | |
| G36 | 00 | Hole pattern: holes on an arc | |
| G37 | 00 | Automatic tool length measurement | |
| G37.1 | 00 | Hole pattern: holes on a grid | |
| G38 | 00 | Vector selection for tool radius compensation | |
| G39 | 00 | Corner arc for tool radius compensation | |
| G40 | 07 | Tool radius / nose radius compensation off | Power-on |
| G41 | 07 | Tool radius / nose radius compensation left | |
| G42 | 07 | Tool radius / nose radius compensation right | |
| G41.2 | 07 | 3D or 5-axis tool radius compensation left | |
| G42.2 | 07 | 3D or 5-axis tool radius compensation right | |
| G41.4, G41.5 | 07 | 5-axis tool radius compensation left (variants) | |
| G42.4, G42.5 | 07 | 5-axis tool radius compensation right (variants) | |
| G40.1 | 15 | Shaping off | |
| G41.1 | 15 | Shaping left | |
| G42.1 | 15 | Shaping right | |
| G43 | 08 | Tool length offset (+) | |
| G44 | 08 | Tool length offset (−) | |
| G43.4 | 08 | Tool tip point control type 1 on | |
| G43.5 | 08 | Tool tip point control type 2 on | |
| G45 | 00 | Tool position offset, extension | |
| G46 | 00 | Tool position offset, reduction | |
| G47 | 00 | Tool position offset, double extension | |
| G48 | 00 | Tool position offset, double reduction | |
| G49 | 08 | Tool length offset off | Power-on |
| G50 | 11 | Scaling off | Power-on |
| G51 | 11 | Scaling on | |
| G50.1 | 19 | Mirror image off | Power-on |
| G51.1 | 19 | Mirror image on | |
| G50.2 | 23 | Polygonal machining off | Power-on |
| G51.2 | 23 | Polygonal machining on | |
| G52 | 00 | Local coordinate system setting | |
| G53 | 00 | Machine coordinate system selection | |
| G53.1 | 00 | Tool axis direction control | |
| G54 | 12 | Workpiece coordinate system 1 | Power-on |
| G55 | 12 | Workpiece coordinate system 2 | |
| G56 | 12 | Workpiece coordinate system 3 | |
| G57 | 12 | Workpiece coordinate system 4 | |
| G58 | 12 | Workpiece coordinate system 5 | |
| G59 | 12 | Workpiece coordinate system 6 | |
| G54.1 | 12 | Additional workpiece coordinate systems | |
| G54.2 | 23 | Fixture offset (dynamic offsetting) | |
| G54.4 | 27 | Workpiece setup error correction | |
| G60 | 00 | One-way positioning | |
| G61 | 13 | Exact stop mode | |
| G61.1 | 13 | High-accuracy mode (geometry compensation) | |
| G61.2 | 13 | Modal spline interpolation | |
| G62 | 13 | Automatic corner override | |
| G63 | 13 | Tapping mode | |
| G64 | 13 | Cutting mode | Power-on |
| G65 | 00 | User macro, single call | |
| G66 | 14 | User macro, modal call A | |
| G66.1 | 14 | User macro, modal call B | |
| G67 | 14 | User macro, modal call off | Power-on |
| G68 | 16 | Programmed coordinate rotation on, or 3D coordinate conversion on | |
| G69 | 16 | Coordinate rotation, 3D conversion or inclined-plane machining off | Power-on |
| G68.2 | 16 | Inclined-plane machining on | |
| G68.3 | 16 | Inclined-plane machining on, defined by tool axis direction | |
| G68.4 | 16 | Incremental coordinate system for inclined-plane machining | |
| G71.1 | 09 | Fixed cycle: chamfering cutter, clockwise | |
| G72.1 | 09 | Fixed cycle: chamfering cutter, counterclockwise | |
| G73 | 09 | Fixed cycle: high-speed deep-hole drilling | |
| G74 | 09 | Fixed cycle: reverse tapping | |
| G75 | 09 | Fixed cycle: boring 1 | |
| G76 | 09 | Fixed cycle: boring 2 | |
| G77 | 09 | Fixed cycle: back spot facing | |
| G78 | 09 | Fixed cycle: boring 3 | |
| G79 | 09 | Fixed cycle: boring 4 | |
| G80 | 09 | Fixed cycle off | Power-on |
| G81 | 09 | Fixed cycle: spot drilling | |
| G81.1 | 00 | Chopping | |
| G82 | 09 | Fixed cycle: drilling with dwell | |
| G82.2 | 09 | Fixed cycle: automatic pecking | |
| G83 | 09 | Fixed cycle: deep-hole drilling | |
| G84 | 09 | Fixed cycle: tapping | |
| G84.2 | 09 | Fixed cycle: synchronous tapping | |
| G84.3 | 09 | Fixed cycle: synchronous reverse tapping | |
| G85 | 09 | Fixed cycle: reaming | |
| G86 | 09 | Fixed cycle: boring 5 | |
| G87 | 09 | Fixed cycle: back boring | |
| G88 | 09 | Fixed cycle: boring 6 | |
| G89 | 09 | Fixed cycle: boring 7 | |
| G90 | 03 | Absolute data input | Parameter |
| G91 | 03 | Incremental data input | Parameter |
| G92 | 00 | Coordinate system setting / spindle speed limit | |
| G92.5 | 00 | Workpiece coordinate system rotation | |
| G93 | 05 | Inverse time feed | |
| G94 | 05 | Feed per minute (asynchronous) | Parameter |
| G95 | 05 | Feed per revolution (synchronous) | Parameter |
| G96 | 17 | Constant surface speed control on | Parameter |
| G97 | 17 | Constant surface speed control off | Parameter |
| G98 | 10 | Fixed cycle: return to initial point level | Power-on |
| G99 | 10 | Fixed cycle: return to R-point level | |
| G109 | 00 | Single program multi-system control | |
| G110 | 20 | Cross machining control on | |
| G111 | 20 | Cross machining control off | |
| G112 | 00 | M, S, T, B output to the opposite system | |
| G113 | 23 | Hob milling mode off | |
| G114.3 | 23 | Hob milling mode on | |
| G130 | Tornado tapping (macro call) | ||
| G136 | Measurement macro (workpiece and coordinate measurement) | ||
| G137 | Compensation macro |
On machines with a turning function, such as Integrex multitasking machines, the milling-style program (series M) also accepts the turning cycles G270 to G276, G283 to G289, G290, G292 and G294. They are listed in the next section.
G-code series T and M on multitasking machines
Integrex multitasking machines can be run with two G-code series. Series M uses the milling assignment from the table above. Series T follows the assignment known from lathes, so several codes move to other numbers. Which series is active is set on the machine. The table lists the functions whose code differs between the two series.
| Function | Series M | Series T |
|---|---|---|
| Thread cutting (straight, taper) | G33 | G32 |
| Hole pattern on a circle | G34.1 | G234.1 |
| Hole pattern on a line | G35 | G235 |
| Hole pattern on an arc | G36 | G236 |
| Hole pattern on a grid | G37.1 | G237.1 |
| Coordinate system setting / spindle speed limit | G92 | G50 |
| 3D coordinate conversion on | G68 | G68.5 |
| 3D coordinate conversion off | G69 | G69.5 |
| Finishing cycle | G270 | G70 |
| Longitudinal roughing cycle | G271 | G71 |
| Transverse roughing cycle | G272 | G72 |
| Contour-parallel roughing cycle | G273 | G73 |
| Longitudinal cut-off cycle | G274 | G74 |
| Transverse cut-off cycle | G275 | G75 |
| Compound threading cycle | G276 | G76 |
| Face drilling cycle | G283 | G83 |
| Face tapping cycle | G284 | G84 |
| Face synchronous tapping cycle | G284.2 | G84.2 |
| Face boring cycle | G285 | G85 |
| Outside drilling cycle | G287 | G87 |
| Outside tapping cycle | G288 | G88 |
| Outside synchronous tapping cycle | G288.2 | G88.2 |
| Outside boring cycle | G289 | G89 |
| Longitudinal turning cycle (fixed cycle A) | G290 | G90 |
| Threading cycle | G292 | G92 |
| Transverse turning cycle (fixed cycle B) | G294 | G94 |
| Feed per minute | G94 | G98 |
| Feed per revolution | G95 | G99 |
| Polar coordinate input on | G16 | G122 |
| Polar coordinate input off | G15 | G123 |
Series T has no codes for the milling fixed cycles G71.1 to G89, for tool length offset G43 to G49, for scaling and mirror image (G50, G51, G50.1, G51.1), for programmed coordinate rotation, for G90/G91 and for the return levels G98/G99 in milling cycles. It adds G122.1 and G123.1 for switching the X-axis radius command on and off, plus G52.5 and G53.5 for cancelling and selecting the Mazatrol coordinate system.