An arc is a circle drawn in two axes, but a machine has three. G17, G18, and G19 tell the control which two axes the current arc, and several other operations, live in. Most of the time you set the plane once and forget it, but when an arc bends the wrong way, plane selection is usually why.

What the active plane controls

Plane selection does more than steer arcs. The active plane sets three things at once, as laid out in the LinuxCNC plane-selection reference:

  • The two axes an arc (G02 or G03) is drawn in.
  • The sense of clockwise versus counterclockwise, judged from the positive direction of the third axis.
  • The tool axis used for drilling cycles and tool length offset.

That is why the plane matters even on a simple part: it is the frame of reference for circular motion and for which way the drill goes.

G17, G18, and G19

Each code names a plane by its two axes, leaving the third as the tool axis:

CodePlaneAxesTool axisCommon on
G17XYX and YZMilling (default)
G18XZX and ZYLathes, vertical arcs
G19YZY and ZXSide-plane work

G17 is the default on virtually every milling machine, because the work sits in the XY plane and the spindle points down in Z. G18 is the normal default on lathes. The standard plane-selection guides describe the same mapping.

Arcs follow the plane

The clearest place plane selection bites is circular interpolation. The arc-center offset words change with the plane:

PlaneArc-center words
G17 (XY)I (X), J (Y)
G18 (XZ)I (X), K (Z)
G19 (YZ)J (Y), K (Z)

So an arc that uses I and J only makes sense in G17. Try the same words in the wrong plane and you get an error or a wrong-shaped move. The direction sense of G02 vs G03 is also defined relative to the active plane, viewed from the positive third axis, so the plane and the arc code work together. A radius R word can define many arcs without the offset letters, but the plane still sets where the arc lies.

When to switch planes

Most milling never leaves G17. You reach for G18 or G19 only for specific work:

SituationPlane
Standard flat milling, drilling down in ZG17
Arc or radius cut in a vertical (front) planeG18
Arc cut in a vertical (side) planeG19
Lathe turning and profilingG18

Because G17 is the safe default, it usually appears in the opening safety block (G21 G17 G40 G90), which is one of the first things you decode when you read a CNC program. That is also why plane selection sits on every list of common G-codes for CNC beginners: it is easy to ignore until an arc or a drill goes somewhere unexpected. Get the plane wrong for an arc and you can trip Fanuc alarm 021, illegal plane axis commanded. The full address grammar is summarized on the Wikipedia G-code page.

Bottom line

G17 is the XY plane, G18 is XZ, and G19 is YZ. The active plane sets which two axes arcs are drawn in, which I, J, K words define the center, the clockwise sense, and the tool axis. Milling lives in G17; switch to G18 or G19 only for arcs in a vertical plane or for lathe work.

Sources

Frequently asked questions

What is the difference between G17, G18, and G19?

G17 is the XY plane, G18 is the XZ plane, and G19 is the YZ plane. The active plane decides where arcs are drawn, which arc-center words apply, and which axis is the tool axis. G17 is the default on mills.

Why does plane selection affect arcs?

An arc is a circle in two axes, so the control needs to know which two. The plane sets that pair and defines clockwise versus counterclockwise from the positive third axis, and the center words follow it: I J for G17, I K for G18, J K for G19.

When do you use G18 or G19 instead of G17?

Most milling stays in G17. Switch to G18 or G19 to cut arcs in a vertical plane or for helical features, and G18 is the normal default on a lathe.

What is the best way to learn plane selection codes?

Drill them with active recall. A free app like G-Code Sprint quizzes G17, G18, and G19 alongside the rest of the everyday codes and repeats whichever ones you miss.

G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.