Home › G-codes › Haas NGC › G18
G18 XZ plane selection
Haas NGC G-code · Mill, Lathe
On mills: XZ plane selection
Selects the XZ plane for arcs and cutter compensation. Arcs use I and K.
Format
G18
How it works
Modal, plane group 02.
Example program
G18 (XZ PLANE)
G02 X1. Z-.5 I.5 K0. F10. (ARC IN XZ)
G17 (BACK TO XY PLANE)
G02 X1. Z-.5 I.5 K0. F10. (ARC IN XZ)
G17 (BACK TO XY PLANE)
Example is in inch. Check offsets and clearances first.
Watch out for
- Arc direction is seen from the positive Y side, which can look reversed from the operator side.
- Return to G17 before canned cycles meant for Z drilling.
On lathes: XZ plane selection
Selects the XZ plane, the normal turning plane. G18 must be active for G70 to G73 stock removal cycles.
Format
G18
How it works
Modal, group 02. Normal default on a lathe.
Example program
T0101 (OD TURNING TOOL)
G00 G18 G20 G40 G80 G99 (SAFE STARTUP)
G54 X2.1 Z.1 (APPROACH)
G00 G18 G20 G40 G80 G99 (SAFE STARTUP)
G54 X2.1 Z.1 (APPROACH)
Example is in inch. Check offsets and clearances first.
Watch out for
- Put G18 in the safe startup line of every program.
- G70, G71, G72 and G73 need G18 active.
Related codes
G18 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | ZX plane select |
| Okuma OSP | Plane select ZX |
| Mitsubishi M70 M80 | ZX plane select |
| Brother Speedio | ZX plane select |
| Siemens 840D 828D | ZX working plane |
| Fagor 8055 8065 | ZX plane select |
| LinuxCNC Tormach | XZ plane select |
| Mach3 Mach4 | XZ plane |
| Centroid CNC12 Acorn | ZX plane select |
| Hurco WinMax (NC) | ZX plane select |
| Fadal | ZX plane select |
| Swiss (Citizen Star) | XZ plane select |
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 G18 in the app All Haas NGC G-codes