What is G16?

The G16 command instructs the CNC machine to interpret the coordinates that are entered in the commands that follow it on a Polar Coordinate System. The X represents the distance (Radius) and the Y represents the angle in degrees relative to 3 O’clock orientation.

Syntax:

G16 (Polar On);
G15 (Polar Off);


Cartesian Vs Polar coordinates

G15 / G16 Cartesian vs Polar coordinate system


  • Cartesian is the normal X, Y based coordinate system we use.
  • Polar coordinate system: The point is represented by its distance from the origin (R) and the angle from the X-axis (α).

To convert from Cartesian to Polar:
r=√ (x2 + y2)
α=Tan-1(y / x)
To convert from Polar to Cartesian:
x=r ⋇ Cos(α)
y=r ⋇ Sin(α)

How to use G15/G16

  • Writing Just G16; will put the machine in “Polar Mode” with the center (Pole), placed at X=0, Y=0. If you want the center of the Polar Coordinate system to be elsewhere type G16 X5.0 Y6.0; This will place the “pole” in the X=5, Y=6 coordinate.
  • After activation, the X becomes your radius and the Y becomes your angle.
  • All the following movement commands will be interpreted with Polar Coordinates.
  • A G15 block will cancel the G16 mode and return the machine to G15 (Cartesian) mode.

Typical use case “Bolt Circle”

The “classic” use of G15 is to program “Bolt Circle” operations which is a common engineering feature.

Bolt circle drawing - G16-G15 Example Gcode program
G16 X6.0 Y6.0 (Set the Center);
G00 X5.0 Y30.0 (Go to the first Bore position);
M98 P2000 (Single Bolt Bore Subprogram);
G00 Y90 (Next Bole);
M98 P2000 (Single Bolt Hole Subprogram);
G00 Y150 (Next Hole);
And So On...

Learn about more G-Codes

Scroll to Top