Home › G-codes › Mazak (EIA) › G21
G21 Metric input
Mazak (EIA) G-code · Mill and lathe
Sets the program units to millimeters. All positions and feed rates are read in millimeters.
Format
G21
Addresses
| Address | What it does |
|---|---|
G21 | No addresses |
How it works
Modal, group 06.
Example program
O1001 (METRIC PROGRAM)
G21 (METRIC)
G17 G40 G49 G80 G90 (SAFETY LINE)
G21 (METRIC)
G17 G40 G49 G80 G90 (SAFETY LINE)
Example is in inch. Check offsets and clearances first.
Watch out for
- An inch program run in G21 moves 25.4 times less. Check the unit before cycle start.
- Give it at the program start, before any move.
Related codes
G21 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Metric input |
| Haas NGC | Metric programming check |
| Okuma OSP | Metric input confirmation |
| Mitsubishi M70 M80 | Metric input |
| Brother Speedio | Metric input |
| LinuxCNC Tormach | Millimeter units |
| Mach3 Mach4 | Metric units |
| Centroid CNC12 Acorn | Metric units |
| Hurco WinMax (NC) | Metric input (ISNC) |
| Fadal | Check for metric setting |
| Swiss (Citizen Star) | Metric input |
Every G-code for Mazak (EIA) in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open G21 in the app All Mazak G-codes