Home › G-codes › Mach3 Mach4 › G18
G18 XZ plane
Mach3 Mach4 G-code · Mill
Selects the XZ plane for arcs and canned cycles. Arcs use I and K.
Format
G18
Addresses
| Address | What it does |
|---|---|
G18 | No address words |
How it works
Modal, plane group.
Example program
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
G0 X0 Y0 Z0.1 (START)
G18 (XZ PLANE)
G2 X0.5 Z-0.15 I0.25 K0 F15.0 (ARC IN XZ)
…
G0 X0 Y0 Z0.1 (START)
G18 (XZ PLANE)
G2 X0.5 Z-0.15 I0.25 K0 F15.0 (ARC IN XZ)
…
The full 6-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- A canned cycle in G18 drills along Y. Switch back to G17 before drilling.
- Mach3 cutter comp does not work in G18.
Related codes
G18 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | ZX plane select |
| 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 |
| 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 Mach3 Mach4 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 Mach3 Mach4 G-codes