G-code reference

G17: XY plane selection

G17 is xY plane selection. Selects the XY plane for arcs and cutter compensation. It is modal, so it stays active on the following lines until another code from the same group replaces it.

What G17 does

G17 tells the control that arcs (G02, G03) and cutter radius compensation work in the XY plane. It is the default on almost every vertical mill. A wrong plane makes an arc command cut in a plane you did not expect.

TypeG-code
MachineMill
GroupPlane
ModalYes: stays active until replaced by another code from the same group

G17 example

G17 G02 X20. Y0. R10.

Arc in the XY plane.

WordWhat it means here
G17XY plane selection
G02Circular interpolation, clockwise
X20.X axis target (on a lathe, the diameter)
Y0.Y axis target
R10.arc radius, or the R plane (retract height) in a drilling cycle, or a cycle setting

Codes people confuse with G17

CodeWhat it does instead
G18 XZ plane selection. Selects the XZ (or ZX) plane; the normal plane on a lathe.
G19 YZ plane selection. Selects the YZ plane for arcs and compensation.

Other codes in the plane group

Only one code from a modal group is active at a time. Programming any of these replaces G17.

  • G18 XZ plane selection
  • G19 YZ plane selection

Meanings follow the common Fanuc-style standard that Haas, Okuma (EIA mode), Mitsubishi, LinuxCNC and most other controls share for this code. Options and parameters change details from machine to machine, so check the manual for your control.

Quick check: G17

  1. What does G17 do? (Mill)

  2. Which code: Selects the XY plane for arcs and cutter compensation.(Mill)

  3. What does G18 do? (Mill and lathe)

Show the answers
  1. Selects the XY plane for arcs and cutter compensation.
  2. G17
  3. Selects the XZ (or ZX) plane; the normal plane on a lathe.

Drill this code with the rest of the core set

More practice hubs

Frequently asked questions

What does G17 mean in CNC programming?
XY plane selection. Selects the XY plane for arcs and cutter compensation.
Is G17 modal?
Yes. G17 belongs to the plane group and stays active until another code from that group is programmed.
What is the difference between G17 and G18?
G17 (xY plane selection): selects the XY plane for arcs and cutter compensation. G18 (xZ plane selection): selects the XZ (or ZX) plane; the normal plane on a lathe.
What is the difference between G17 and G19?
G17 (xY plane selection): selects the XY plane for arcs and cutter compensation. G19 (yZ plane selection): selects the YZ plane for arcs and compensation.

G-Code Sprint is an educational practice tool only. It is not a CNC simulator, machine controller, safety manual, or replacement for instruction. Always follow your instructor, employer, machine manual, and shop procedures.

Free preview · no card Try G-Code Sprint