Printed from Kezuriba (kezuriba.net/en/nc/g17/)
G17
Machining center, LatheModal, group 02 (lathe 16)XY plane selection
Format and notes
G17
- The plane that serves as the reference for circular interpolation, cutter compensation, and the drilling axis of canned cycles
- Common power-on default for vertical machining centers (default for Siemens ISO M)
Diagram: The three planes and the viewing direction for arcs
Full guide with examples: Machining center programming basics (practise G54, G43 and G41 in a simulator)
Try it in the simulator (machining center)
G02 is clockwise, G03 counter-clockwise (seen from above). Try the R form and the I/J centre form (needed for a full circle).
X—
Y—
Z—
T—
S0
F0
—0:00
Simulator with exercises: Machining center page
On lathes: XY plane selection (used on lathes with milling capability)
On lathes (FANUC-type G-code system A) the code does the same job. Group 16.
- Not used in ordinary turning. Used on machines with rotating (live) tools
Differences between controls and machines
The same code can be written or assigned differently depending on the CNC control and the machine builder. Always check your machine’s manual.
| Source | Machine | Item | Detail |
|---|---|---|---|
| Haas | Lathe | Group | 02 |
| Mitsubishi Electric | Lathe | Group | 02 |
Frequently asked questions about G17
- What is G17 (XY plane selection) used for and how is it formatted in a CNC program?
- G17 commands "XY plane selection" on Machining center, Lathe. The standard program format is "G17". The plane that serves as the reference for circular interpolation, cutter compensation, and the drilling axis of canned cycles
- Is G17 a modal code or a one-shot (non-modal) code?
- G17 is a modal code (Group 02). Once commanded, it remains active across subsequent blocks until another code from the same modal group overrides it or the control is reset. Always state or cancel modal states explicitly in your safety block and at the end of a tool operation so residual modes do not cause unexpected motion when restarting mid-program.
- Does G17 work differently on machining centers (mills) versus CNC lathes?
- On both machining centers and CNC lathes (G-code System A), G17 performs the same function ("XY plane selection"). However, valid axis addresses (such as X/Y/Z versus diameter/incremental U/W) and parameter numbers can still differ between mill and lathe controls.
- Are there differences in G17 across FANUC, Mitsubishi, Okuma, Haas, and Siemens controls?
- Yes. Control builders such as FANUC, Mitsubishi Electric (M80/M800), Okuma (OSP), Haas, Mazak, Siemens (SINUMERIK ISO dialect), and Heidenhain can differ in argument letters, decimal-point rules, and optional parameters for G17. Review the control comparison table above and verify the exact syntax in your machine’s programming manual before proving out the program.
Sources
The meaning of this code agrees in two or more sources from different publishers. Explanations are written in our own words.
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Machining center) e-Learning material (PDF) mitsubishielectric.com
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Milling, 04.2007 Edition (6FC5398-7BP10-0BA0) cache.industry.siemens.com
- Haas Automation, Inc. — Mill Operator's Manual – 17 Mill G-Codes (online version) haascnc.com
- National Institute of Standards and Technology (NIST), USA — The NIST RS274NGC Interpreter – Version 3 (NISTIR 6556, 2000) nvlpubs.nist.gov
- Saitama University, Faculty of Engineering, Department of Mechanical Engineering, practical training — Machining center program 2019 (training NC program O19-0101, with comments) jisshu.mech.saitama-u.ac.jp
- Siemens AG — SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition cache.industry.siemens.com
- Haas Automation, Inc. — Lathe Operator's Manual – 16 Lathe G-Codes (online version) haascnc.com
- Mitsubishi Electric — The Basics of CNC Machining Programming (for Lathe) e-Learning material (PDF, BNP-C8027-688) mitsubishielectric.com