G18 ZX plane select
Fanuc G-code · Mill, Lathe
On mills: ZX plane select
Selects the ZX plane for arcs and cutter compensation. Used for side profiles with a ball end mill or for arcs cut in XZ.
Format
G18
How it works
Modal, group 02.
Example program
G18 (ZX PLANE)
G01 X0. Z0. F20. (START OF ARC)
G02 X.5 Z-.5 I0. K-.5 (QUARTER ARC IN XZ)
G17 (BACK TO XY PLANE)
G01 X0. Z0. F20. (START OF ARC)
G02 X.5 Z-.5 I0. K-.5 (QUARTER ARC IN XZ)
G17 (BACK TO XY PLANE)
Example is in inch. Check offsets and clearances first.
Watch out for
- Arc direction is viewed from plus Y looking toward minus Y. G02 can look like G03 from the front of the machine.
- In G18 the arc center uses I and K.
- Return to G17 before canned cycles meant for Z drilling.
On lathes: ZX plane select
Selects the ZX plane, the normal turning plane. Arcs and tool nose radius compensation work in this plane.
Format
G18
How it works
Modal, group 16. Power on default on a lathe.
Example program
G18 G40 G99 (ZX PLANE, COMP OFF, FEED PER REV)
T0101 (OD TURNING TOOL)
G96 S500 M03 (CSS)
G00 X2.1 Z.1 M08 (APPROACH)
T0101 (OD TURNING TOOL)
G96 S500 M03 (CSS)
G00 X2.1 Z.1 M08 (APPROACH)
Example is in inch. Check offsets and clearances first.
Watch out for
- Put G18 in the safety line at the top of each tool.
- Turn off compensation before switching planes.
Related codes
G18 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Haas NGC | XZ plane selection |
| 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 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 G18 in the app All Fanuc G-codes