G86 CNC Code Explained: An Easy Intro for Beginners [Boring with Rapid Retract]

What does a G86 code do?

The G86 command activates a boring canned cycle.

The steps the machine will take are:

  1. Rapid traverse to the R plane
  2. The machine will start boring/reaming from the R plane to the bottom of the hole (Z) at the listed feedrate (F)
  3. At the bottom of the hole, the spindle will stop and then the machine will rapid move back out of the hole.

This cycle will feed into the hole at a set feedrate but move at max speed coming back out.

The G86 canned cycle is very similar to G85 command except G85 will make the machine feed back out of the hole instead of rapid retract.

Learn CNC Programming – It’s Easier Than You Think!

Learning G Code doesn’t have to be difficult…

If you know what to focus on.

Join our simple, easy-to-follow course, “G Code Made Easy: CNC Programming for Beginners“. We walk you through all the important codes – with simple explanations and real-world examples.

Want to become a super-skilled CNC programmer? Join now to take the shortcut to becoming a G Code Master today!

Make Learning G Code Easy

What is boring?

Boring uses a single point cutting tool to create holes very accurately. This includes size, location and roundness requirements.

Boring involves creating a hole either by drilling it or some other means and then making it larger through the boring operation. Often this will require taking multiple passes to “sneak up” on the correct size requirements.

Other codes used with the G86 code

There are many different parameters used in a G86 code. They are similar to those used in other canned cycles. 

See the list below to understand all the different parts of the code.

The retracting value (R) or clearance level refers to the plane perpendicular to the Z-axis where the tool can move safely from one hole to another. 

The R value should be set so the machine will clear any and all obstacles including clamps, fixtures and the part itself.

Format for using a G86 code

G86 X2.0 Y3.0 R1.0 Z-5.0 F25.0

It would be easy to assume that the Z location is the location of the start of the hole. In reality, it is the Z location for the bottom of the boring/reaming movement.

Keep in mind that the X and Y coordinates of the hole are not usually in the same line as the G86 command.

In most programs you will see them in this format:

X2.0 Y3.0

G98 G86 R1.0 Z-5.0 F25.0

The program first identifies the coordinates of the hole and then starts the boring/reaming process.

How to cancel a G86 code

The G80 code is used to cancel the G86 boring canned cycle.

G80 is the code used to cancel all canned cycles.

If the G80 code is not used, the machine will attempt to bore a hole at each new location given in the program.

G85 vs G86

G85 and G86 are both boring canned cycles. They both move into the part at the set feedrate.

The G85 code will tell the CNC to feed back out at that same feedrate.

G86 stops the spindle and rapid retracts back out of the hole.

This means that G85 usually provides a better surface finish for the hole being machined, but takes more machining time.

R planes

The G98 and G99 codes control what position your machine will return to after finishing a canned cycle. 

The G86 code is most commonly used with the G98 code. 

Retract planes are important because they control how your machine will act when moving between locations when using canned cycles such as G86.

visualization of how a cnc machine moves using g98 and g99 codes shows motion of travel for the machine
G98 and G99 – canned cycle return comparison

Retract planes should be chosen so that the machine avoids any and all obstacles such as clamps, fixtures and the workpiece itself. 

Want to learn more about CNC G Code?

Leave a Comment