Home › G-codes › Haas NGC › G20
G20 Inch programming check / Select inches
Haas NGC G-code · Mill, Lathe
On mills: Inch programming check
Tells the control the program is in inches. On Haas the units are set by Setting 9, and G20 checks that the setting matches.
Format
G20
How it works
Modal, units group 06.
Example program
O01000 (INCH PROGRAM)
G20 (CONFIRM INCH MODE)
G17 G40 G80 G90 (SAFE START)
G20 (CONFIRM INCH MODE)
G17 G40 G80 G90 (SAFE START)
Example is in inch. Check offsets and clearances first.
Watch out for
- If Setting 9 is set to metric, a G20 line stops the program with an alarm instead of switching units.
- Change Setting 9 before loading offsets, since offsets are stored in the current units.
On lathes: Select inches
Confirms the program is in inch. Use Setting 9 to choose inch or metric. G20 alarms if Setting 9 is not set to inch.
Format
G20
How it works
Modal, group 06.
Example program
G00 G18 G20 G40 G80 G99 (SAFE STARTUP, INCH)
T0101 (OD TOOL)
G00 G54 X2.1 Z.1 (APPROACH, VALUES IN INCHES)
T0101 (OD TOOL)
G00 G54 X2.1 Z.1 (APPROACH, VALUES IN INCHES)
Example is in inch. Check offsets and clearances first.
Watch out for
- G20 does not switch the units on a Haas. It checks them. Set Setting 9 first.
Related codes
G20 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Inch input |
| 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 Haas NGC 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 Haas NGC G-codes