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.

By cnccode · Updated
PropertyValue
CodeG16
FunctionPolar Coordinate Command
Modal group17
TypeModal — stays active until replaced by another code of the same group
Used onMilling machines
SyntaxG16 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

Format
G16  then  X(radius) Y(angle)
AddressMeaning
XRadius
YAngle in degrees, counter-clockwise from +X

G16 example program

Example
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.

Frequently asked questions

Is G16 modal?
Yes. G16 belongs to modal group 17 and stays active until another code of that group is programmed.
What does G16 mean in CNC?
G16 means 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.
What is the difference between G16 and G15?
G16 is Polar Coordinate Command, while G15 is Polar Coordinate Command Cancel. See the G15 page for its syntax and examples.
Can I use G16 on a lathe?
Usually not with the same meaning: G16 is documented here for milling machines. Check your control manual for the equivalent.