Home › G-codes › Okuma OSP › G20
G20 Inch input confirmation / Home position return
Okuma OSP G-code · Mill, Lathe
On mills: Inch input confirmation
Okuma lists G20 as inch input confirmation. The unit system is normally set by parameter, and G20 tells the control the program is in inches.
Verify on your machine. This entry could not be fully checked against the maker manual. Check your machine manual before you run it.
Format
How it works
Modal, unit group. Optional feature.
Example program
N1 G20 (INCH PROGRAM)
N2 G15 H1 (WORK COORDINATE SYSTEM 1)
N3 G00 G90 X1. Y1. (POSITION IN INCHES)
Example is in inch. Check offsets and clearances first.
Watch out for
- Behavior differs from Fanuc. On some controls a mismatch with the unit parameter gives an alarm instead of switching.
- Prove units with a slow single block start.
On lathes: Home position return
On Okuma lathes G20 sends the turret to the home position. It is not inch mode like Fanuc G20.
Verify on your machine. This entry could not be fully checked against the maker manual. Check your machine manual before you run it.
Format
Addresses
| Address | What it does |
|---|---|
HP= | Home position number, check the manual |
How it works
One shot.
Example program
N1 G50 S3000 (MAX SPINDLE 3000 RPM)
N2 G00 X3.2 Z.1 T010101 (LAST CUT)
N3 G97 S500 (CANCEL CSS)
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Units on an Okuma lathe are set by parameter, not by G20 or G21.
- G21 is ATC home position return on turning centers with an ATC.
Related codes
G20 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Inch input |
| Haas NGC | Inch programming check |
| Mazak (EIA) | Inch input |
| Mitsubishi M70 M80 | Inch input |
| Brother Speedio | Inch input |
| Fagor 8055 8065 | Lower work zone limits (8055) |
| LinuxCNC Tormach | Inch units |
| Mach3 Mach4 | Inch units |
| Centroid CNC12 Acorn | Inch units |
| Hurco WinMax (NC) | Inch input (ISNC) |
| Fadal | Check for inch setting |
| Swiss (Citizen Star) | Inch 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 G20 in the app All Okuma OSP G-codes