G-code reference
G17 G-Code: XY Plane Selection
XY Plane Selection — Selects the XY plane for circular interpolation, cutter compensation and canned cycles. This is the default plane on milling machines.
| Property | Value |
|---|---|
| Code | G17 |
| Function | XY Plane Selection |
| Modal group | 02 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Milling machines |
| Syntax | G17 |
What does G17 do?
Selects the XY plane for circular interpolation, cutter compensation and canned cycles. This is the default plane on milling machines.
G17 is modal: once programmed it remains in effect for the following blocks until another code from modal group 02 replaces it or the control is reset.
Syntax and parameters
G17G17 example program
G17 G21 G40 G49 G80 G90 (safe start block)▶ Open this example in the G-code viewer
Tips and common mistakes
- Include G17 in every safe start line in case a previous program left G18/G19 active.
Controller compatibility
G17 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.