Home › G-codes › Swiss (Citizen Star) › G21
G21 Metric input
Swiss (Citizen Star) G-code · Lathe
Sets millimeter units.
Format
G21
Addresses
| Address | What it does |
|---|---|
None | No addresses |
How it works
Modal, unit group.
Example program
G21 G18 G99 (METRIC, SAFE START)
G00 X14. Z-.5 T0100 (TOOL 1)
G01 Z20. F.05 (TURN)
G00 X14. Z-.5 T0100 (TOOL 1)
G01 Z20. F.05 (TURN)
Example is in inch. Check offsets and clearances first.
Watch out for
- Do not switch units in the middle of a program. Offsets do not convert.
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 |
| Mazak (EIA) | Metric input |
| 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 |
Every G-code for Swiss (Citizen Star) 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 Swiss G-codes