Home › G-codes › Okuma OSP › G21
G21 Metric input confirmation
Okuma OSP G-code · Mill
Okuma lists G21 as metric input confirmation. It tells the control the program is in millimeters.
Verify on your machine. This entry could not be fully checked against the maker manual. Check your machine manual before you run it.
Format
G21
How it works
Modal, unit group. Optional feature.
Example program
O1000 (OKUMA MILL SAMPLE)
N1 G21 (METRIC PROGRAM)
N2 G15 H1 (WORK COORDINATE SYSTEM 1)
N3 G00 G90 X25. Y25. (POSITION IN MM)
N1 G21 (METRIC PROGRAM)
N2 G15 H1 (WORK COORDINATE SYSTEM 1)
N3 G00 G90 X25. Y25. (POSITION IN MM)
Example is in inch. Check offsets and clearances first.
Watch out for
- Do not mix G20 and G21 in one program.
- Check the unit parameter before running a program from another shop.
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 |
| 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 Okuma OSP 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 Okuma OSP G-codes