G20 Inch input
Fanuc G-code · Mill, Lathe
On mills: Inch input
Sets the program units to inches. All positions, feeds and offsets in the program are read as inch values.
Format
G20
How it works
Modal, group 06. Stays through power off.
Example program
O1000 (PART 123)
G20 (INCH)
G17 G40 G49 G80 G90 (SAFE START)
G20 (INCH)
G17 G40 G49 G80 G90 (SAFE START)
Example is in inch. Check offsets and clearances first.
Watch out for
- Give G20 at the start of the program in its own block, before setting any coordinate system.
- Switching G20 and G21 inside a program is a common crash cause. Offsets on screen are not converted for you.
On lathes: Inch input
Sets the program units to inches. Put it at the start of the program before any coordinates.
Format
G20
How it works
Modal, group 06. Stays on after power off.
Example program
%
O1000 (INCH PART)
G20 (INCH)
G18 G40 G99 (SAFETY LINE)
O1000 (INCH PART)
G20 (INCH)
G18 G40 G99 (SAFETY LINE)
Example is in inch. Check offsets and clearances first.
Watch out for
- Command it on its own line at the very start of the program.
- Switching units mid program does not convert offsets. Do not do it.
Related codes
G20 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | Inch programming check |
| Mazak (EIA) | Inch input |
| Okuma OSP | Inch input confirmation |
| 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 Fanuc 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 Fanuc G-codes