3 months by cncdivi

## What are Plane Selection G-Codes (G17, G18, and G19) used for?

It’s convenient to refer to planes for various purposes. A plane is a flat 2-dimensional space defined by two axes. For example, the default plane on most mills is XY. If you draw an arc without specifying a change in the plane, it will be drawn on the XY plane. There is a plane for each combination of the linear axes XYZ.

The G17, G18, and G19 G-Codes select which plane is active.

• G17:  XY
• G18:  XZ
• G19:  YZ

Here is a visual representation of the planes:

Plane selection is modal, so once you have established a plane all future arcs will be against that plane until a different plane selection g-code is invoked.

The selected working plane affects the following commands:

• G02/G03 circular (arc) interpolation
• G16:  polar coordinates
• G41/G42:  Cutter radius compensation.  Radius compensation is relative to the selected plane.
• G43/G44:  Cutter length compensation.  Length compensation is along the axis that is perpendicular to the selected plane.
• Many canned cycles.

It’s a good idea to include a plane selection gcode such as G17 in the preamble or safety block at the top of your g-code program.  Most g-code operates in G17 mode and you will seldom use G18 or G19.

## FAQs

### What is G18 on a lathe?

The G18 gcode specifies XZ as the active plane on a lathe.

### What is the difference between G17 and G18 CNC?

G17 specifies XY as the active plane while G18 specifies XZ as the active plane.

### What is the g-code G19?

G19 specifies YZ as the active plane.

### What plane is G18?

G18 selects the XZ plane.  The active plane determines how the tool path of an arc is interpreted.

## Like what you read on CNCCookbook?

Join 100,000+ CNC'ers!  Get our latest blog posts delivered straight to your email inbox once a week for free. Plus, we’ll give you access to some great CNC reference materials including:

• Our Big List of over 200 CNC Tips and Techniques
• Our Free GCode Programming Basics Course
• And more!

Full Name
Email *
100% Privacy: We will never Spam you!