G21 Check for metric setting
Fadal G-code · Mill
Checks that the control is set for metric. It does not change the units. G71 does the same.
Format
G21
How it works
Check only.
Example program
N1 G21 (CONFIRM METRIC SETUP)
N2 G0 G40 G49 G80 G90 G17
N3 T1 M6 (12MM END MILL)
N2 G0 G40 G49 G80 G90 G17
N3 T1 M6 (12MM END MILL)
Example is in inch. Check offsets and clearances first.
Watch out for
- On a Fadal this code checks the units. It does not switch them. Units are set in the control setup parameters.
- If the program and the setup do not match, the control stops. Change the setup, not the program.
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) |
| Swiss (Citizen Star) | Metric input |
Every G-code for Fadal 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 Fadal G-codes