CNC Plane Selection: G17, G18, G19 Explained for Milling & Turning
CNC plane selection defines which 2D plane (XY, XZ, or YZ) the control uses for circular motion, cutter compensation, and canned cycles.
Without correct plane selection, arcs (G02/G03) and cycles (G81–G89) won’t work as intended.
📌 1. Plane Selection Basics
| Code | Plane | Axes Used | Typical Operation |
|---|---|---|---|
| G17 | XY | X + Y | Face milling, pocketing |
| G18 | XZ | X + Z | Turning, drilling on front face |
| G19 | YZ | Y + Z | Side drilling or contouring |
📌 2. G17 — XY Plane (Default in Milling)
G17
G02 X30. Y30. I15. J0.
- The circular move is defined in X and Y.
- Common for most milling operations.
- Plane where cutter compensation (G41/G42) works by default.
🟩 Always start milling programs with G17 in your safe start block.
📌 3. G18 — XZ Plane (Used in Turning & Face Drilling)
G18
G02 X30. Z-10. I15. K0.
- The circular motion occurs in X and Z.
- Used for lathe face contouring or milling on front faces.
Typical in CNC lathes or mill-turn centers.
📌 4. G19 — YZ Plane (Side Drilling / Contouring)
G19
G03 Y20. Z-10. J10. K0.
- The arc is defined in Y and Z.
- Used for side holes, 5-axis features, or complex milling.
📌 5. Fanuc Example — Multi-Plane Machining
%
O4000 (PLANE SELECTION EXAMPLE)
G90 G17 G40 G49 G80 G21
T01 M06
S2000 M03 M08
(--- XY PLANE ---)
G17
G02 X40. Y40. I20. J0.
(--- XZ PLANE ---)
G18
G03 X20. Z-15. I0. K5.
(--- YZ PLANE ---)
G19
G02 Y30. Z-10. J15. K0.
M09 M05
G90 G17 G80
M30
%
📌 6. Haas Example — Plane Switching in Drilling
G17
G81 Z-20. R2. F150
X0 Y50
G80
G19
G81 Y-20. R2. F150
X0 Z-10
G80
- First cycle drills vertically (XY plane).
- Second cycle drills along the YZ side plane.
📌 7. Siemens Sinumerik Equivalent
PLANE SPATIAL SPA(0,0,0) TRAORI
CYCLE832()
- Siemens uses PLANE command for dynamic plane orientation.
- Still supports G17/G18/G19 for simple operations.
📌 8. Heidenhain Equivalent
PLANE RESET
PLANE SPATIAL
CYCL DEF 7.0 DATUM SHIFT
Heidenhain machines automatically switch planes using the PLANE function for 3D machining.
📌 9. When Plane Selection Matters
- Circular interpolation (G02/G03)
- Drilling & tapping cycles (G81–G89)
- Cutter compensation (G41/G42)
- 3D contouring
- Sub-spindle / side spindle operations
If you don’t select the correct plane, arcs may cut in the wrong direction or cause alarm.
📌 10. Best Practices
- Always define G17 at program start (safe start).
- Use G18/G19 only for specific features.
- Cancel custom plane with G17 before program end.
- Document every plane change in comments.
Example:
(Drilling front face)
G18
G81 X0 Z-20. R2. F150
G80
(Return to standard)
G17
📌 11. Common Mistakes
| Mistake | Result |
|---|---|
| Forgetting to set G17 | Arcs cut in wrong plane |
| Using G18 in milling | Circular error or crash |
| Not resetting to G17 | Next program fails arc motion |
| Mixing G19 with G41/G42 | Invalid cutter comp error |
📌 12. Future Trends (2025–2030)
- AI-based automatic plane recognition in CAM post-processors.
- 5-axis plane optimization — software adjusts G17/G18/G19 dynamically.
- Smart plane visualization — CNC displays live plane orientation in 3D preview.
✅ Conclusion
Plane selection — G17 (XY), G18 (XZ), G19 (YZ) — defines how your CNC interprets motion and cycles.
By mastering these planes, you gain full control of arcs, drills, and 3D paths — ensuring precision machining every time.
Leave a comment