G-code reference
G16 G-Code: Polar Coordinate Command
Polar Coordinate Command — In G17, X becomes the radius and Y becomes the angle (degrees) around the work origin. This makes bolt-hole circles very easy to program.
| Property | Value |
|---|---|
| Code | G16 |
| Function | Polar Coordinate Command |
| Modal group | 17 |
| Type | Modal — stays active until replaced by another code of the same group |
| Used on | Milling machines |
| Syntax | G16 then X(radius) Y(angle) |
What does G16 do?
In G17, X becomes the radius and Y becomes the angle (degrees) around the work origin. This makes bolt-hole circles very easy to program.
G16 is modal: once programmed it remains in effect for the following blocks until another code from modal group 17 replaces it or the control is reset.
Syntax and parameters
G16 then X(radius) Y(angle)| Address | Meaning |
|---|---|
X | Radius |
Y | Angle in degrees, counter-clockwise from +X |
G16 example program
G90 G17 G16
G81 X40.0 Y0 Z-12.0 R2.0 F200.
Y60.
Y120.
Y180.
Y240.
Y300.
G80 G15▶ Open this example in the G-code viewer
Tips and common mistakes
- The polar centre is the current work origin in G90; use G52 to move it.
- Use our Bolt Circle calculator to get Cartesian coordinates if your control lacks G16.
Controller compatibility
G16 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.