Prints dimension bolt circles as a diameter and an angle: six holes on a 100 mm pitch circle diameter, first hole at 0 degrees, 60 degrees apart. Normal G-code wants X and Y. The gap between the two is a page of trigonometry, and every calculated coordinate is a chance to make a typing mistake. Polar coordinate mode closes that gap. With G16 active, you give the control a radius and an angle and it does the conversion itself. G15 turns it off again. On a Fanuc-style mill it is the cleanest way to program radial patterns by hand.

Polar coordinates in one paragraph

A point in a plane can be described by its distance from a centre and its angle from a reference direction instead of by X and Y. That is the polar coordinate system. The conversion is simple: X equals radius times the cosine of the angle, Y equals radius times the sine. The control does that sum for you when G16 is active. By convention the angle is measured in degrees, counterclockwise from the positive X axis, so 0 degrees points right, 90 degrees points away from the operator on a typical vertical mill, 180 degrees points left.

How G16 reads X and Y

With G17 active, which is the normal XY plane on a vertical mill, G16 changes the meaning of the two words:

  • X is the radius from the polar centre.
  • Y is the angle in degrees.

Z is unchanged. If you work in G18 or G19, the first and second axes of that plane take the radius and angle roles instead; the G17, G18, G19 plane selection explained post covers which axes those are.

Where the polar centre is

This is the part that trips people up. On Fanuc-style controls:

  • With the radius in absolute (G90), the polar centre is the zero of the active work coordinate system.
  • With the radius in incremental (G91), the polar centre is the current tool position.

The angle can be absolute or incremental independently. In practice, most hand programmers use absolute radius and set the work zero at the bolt circle centre, or shift zero there with G52 local coordinate system, so the centre is exactly where they expect. A wrong centre does not cause an alarm. It just puts every hole in the wrong place.

A worked bolt circle

Six holes on a 100 mm pitch circle diameter, so a 50 mm radius, first hole at 0 degrees, 60 degrees apart, drilled 12 mm deep. Work zero G54 is at the circle centre.

G17 G90 G54
G00 X0 Y0 Z25.
G16
G98 G81 X50. Y0 Z-12. R2. F120
Y60.
Y120.
Y180.
Y240.
Y300.
G80
G15
G00 Z25.

After G16, the drilling line gives radius 50 and angle 0. Every following line gives only a new angle, because the radius is modal and stays at 50. The cycle is cancelled with G80, and polar mode with G15, before any normal move. Without G16, the same pattern would need X and Y for each hole: 50 and 0, 25 and 43.301, minus 25 and 43.301, and so on, each one a chance for a rounding or sign error.

Polar vs calculated XY vs controller pattern cycles

MethodWhat you write per holeError riskPortabilityBest for
G16 polar coordinatesAngle only, after the firstLow, if the centre is rightFanuc-style mills and some othersHand programming radial patterns
Calculated X and YTwo computed coordinatesHigher: sign and rounding errorsEvery controlAny machine, and CAM output
Controller bolt circle cyclesOne line for the whole patternLowSpecific to that controlShops on a single control family
CAM generatedNothing by handLowEvery controlComplex parts and production work

Polar mode sits between doing the sums yourself and relying on a machine-specific pattern cycle. Haas mills, for example, offer their own bolt hole pattern cycles, and many hobby controls support neither. Check your controller documentation before relying on G16.

Incremental angles

The angle can also be given incrementally. With G91 for the angle only, each Y word adds to the previous angle, so equally spaced holes become a repeated line:

G16
G90 G98 G81 X50. Y0 Z-12. R2. F120
G91 Y60.
Y60.
Y60.
Y60.
Y60.
G90
G80
G15

This is compact, but it mixes G90 and G91 in a way that confuses readers and invites crashes if the G90 is forgotten afterwards. Many shops prefer absolute angles for clarity even though they are longer. The wider reasons are in G90 vs G91 crash prevention.

Other uses beyond bolt circles

Polar mode is not just for drilling, although bolt circles in deeper holes simply swap G81 for a G73 or G83 peck cycle with the same angles. Radial slots, spokes, angled lines from a centre and features arranged around a hub are all simpler in radius and angle. A linear move with G01 in polar mode goes in a straight line to the new radius and angle, not along an arc, so cutting an arc still needs G02 or G03. For repeated features at angles, polar coordinates combine well with G68 coordinate rotation, which rotates a whole feature program rather than placing single points.

G16 is not G112

The names sound similar, and both involve the word polar, but they do different jobs. G16 is polar coordinate command on a mill: a way to type positions. G112 polar coordinate interpolation is a lathe function for machines with live tooling, where the control coordinates the C axis and X axis so a rotating tool can mill flats and slots on the end face of a part. Confusing them in an exam or a conversation is common; confusing them in a program is rare, because they live on different machines.

Supported controls

Support for G15 and G16 varies. Fanuc-style mills commonly support them, sometimes as an option. The Wikipedia list of common G-codes includes them with the caveat that code meanings vary by manufacturer. LinuxCNC handles polar input differently, through special words rather than G16, and other controls use their own cycles. Before writing G16 for a new machine, check the manual or run a short test with the tool well above the part.

Partial circles and uneven spacing

Not every pattern is a full, evenly spaced circle. Flanges often have holes on an arc, or holes at irregular angles to clear a feature. Polar mode handles both just as easily, because each line simply states its own angle. Three holes at 15, 75 and 135 degrees on a 40 mm radius are three lines with Y15., Y75. and Y135., with the radius stated once.

Patterns on two different radii are also easy. State the new radius in X on the first hole of the second ring and the rest follow, because X is modal in polar mode just as it is in normal mode. That makes a two ring flange, inner ring on a 30 mm radius and outer ring on a 55 mm radius, a short block of lines that mirrors the print almost exactly.

Polar mode also reduces checking time. An inspector comparing a program to a print can read the angles straight across, hole by hole, instead of converting each X and Y back into a radius and angle to see whether it matches. For a twelve hole flange that is a real saving, and it means mistakes are found at the desk rather than at the machine.

Negative angles and angles over 360

Angles can usually be negative, measured clockwise from +X, and many controls accept values over 360 degrees. Both are legal but both are hard to read. A hole at minus 30 degrees is the same as one at 330 degrees, and a program that mixes the two invites mistakes when someone edits it later. Pick one convention, usually 0 to 360 counterclockwise, and use it throughout.

Common mistakes with polar coordinates

  • Polar centre in the wrong place, usually because the work zero is not at the circle centre.
  • Forgetting G15, so the next XY move is read as radius and angle.
  • Giving the diameter instead of the radius in X.
  • Measuring angles clockwise, or from the Y axis, because that is how the print was read.
  • Expecting G01 in polar mode to cut an arc.
  • Assuming every control supports G16.

Checking a polar program

Run it in graphics first and confirm the holes land on the pitch circle. At the machine, single block the first two holes with the rapid override low and compare the displayed X and Y with the values you would have calculated by hand. For the 50 mm, 60 degree hole above, the display should show X25 Y43.301. If it does, the centre and angle convention are right and the rest of the pattern will follow. The general routine is in how to safely test a G-code program without crashing.

Bottom line: radius in X, angle in Y

G16 lets a Fanuc-style mill take a radius and an angle instead of X and Y, which turns a bolt circle into one short line per hole. Put the polar centre at the work zero or shift it there with G52, cancel the drilling cycle with G80 and polar mode with G15, and check the first hole against a hand calculation. It saves trigonometry and mistakes, as long as your control supports it and you remember to turn it off. The G-code practice drills cover G15 and G16 alongside the canned cycles they usually work with.

Frequently asked questions

What are G15 and G16 in G-code?

On Fanuc-style mills, G16 turns on polar coordinate command mode and G15 turns it off. With G16 active in the G17 plane, the X word is read as a radius and the Y word as an angle in degrees, measured counterclockwise from the positive X axis. It makes bolt circles and radial features easy to program.

How do you program a bolt circle with G16?

Set the work offset at the circle centre, turn on G16, start a drilling cycle with X as the radius and Y as the first angle, then give only Y values for each following hole. Cancel the cycle with G80 and polar mode with G15. Each hole is one short line instead of two calculated coordinates.

What is the difference between G16 and G112?

G16 is polar coordinate command on a mill: you give radius and angle, and the control converts them to X and Y. G112 is polar coordinate interpolation on a lathe with live tooling: the control coordinates the C axis and X axis to mill flats and slots on the end face. Similar names, very different jobs.

What is the best way to learn polar coordinate codes?

Sketch a bolt circle, label each hole’s radius and angle, then write it once with G16 and once with calculated X Y values. Comparing the two makes the conversion stick. Then drill G15, G16 and the canned cycles to instant recall; a free app like G-Code Sprint quizzes those codes in timed rounds.

When should I not use G16?

When your control does not support it, which includes many hobby and some industrial controls, or when CAM already writes every hole position for you. Haas mills, for example, offer their own bolt hole pattern cycles. Also avoid it when you are unsure where the polar centre is, because a wrong centre moves every hole.

Sources