G86 Cycle | Boring | Milling

G86 CNC Code: The Ultimate Guide to the Boring Cycle (Machining Centers)

Introduction:

In the world of CNC machining, precision and efficiency are paramount. The G86 Boring Cycle is a specialized canned cycle used on machining centers (mills) to create accurately sized and positioned holes with excellent surface finish. Unlike some other boring cycles, G86 incorporates a spindle stop at the bottom of the hole before retracting the tool. This seemingly small detail has significant implications for certain applications. This comprehensive guide explains the G86 cycle in detail, covering its function, syntax, differences from other cycles, implementation across major control systems (Fanuc, Siemens, Haas, Mazatrol, Mitsubishi, Heidenhain, and others), best practices, and troubleshooting. This guide is written for CNC users of all skill levels, from beginners to experienced machinists.

1. What is the G86 Boring Cycle?

G86 is a G-code command that initiates a canned cycle specifically designed for boring operations on machining centers. A canned cycle is a pre-programmed sequence of operations that simplifies programming complex machining tasks. The G86 cycle performs the following actions:

  1. Rapid Positioning: The tool rapidly moves to the programmed X and Y coordinates of the hole center.
  2. Rapid to R-Plane: The tool rapidly moves to the programmed R-plane (a clearance position above the workpiece).
  3. Feed to Depth: The tool feeds down in the Z-axis to the programmed Z-depth at the specified feed rate.
  4. Spindle Stop: At the bottom of the hole, the spindle stops rotating. This is the defining feature of the G86 cycle.
  5. Rapid Retract: The tool rapidly retracts to the R-plane.
  6. Spindle Start (Manual): The spindle does not automatically restart. The programmer must include a separate command (e.g., M03 on many controls) to restart the spindle before the next operation.

Key Concepts:

  • Boring: Enlarging and refining an existing hole to achieve precise dimensions and a good surface finish. G86, like other boring cycles, requires a pre-drilled hole. It cannot create a hole from solid material.
  • Canned Cycle: A pre-programmed routine that automates a common machining task.
  • R-Plane: A clearance plane above the workpiece.
  • Feed Rate: The speed at which the tool moves into the workpiece.
  • Spindle Stop: The controlled stopping of the spindle rotation.
  • Rapid Retract: A fast movement (G00) to withdraw the tool from the hole.

2. Key Differences: G86 vs. Other Boring Cycles (G85, G76, G89)

Understanding the differences between G86 and other boring cycles is crucial for choosing the right cycle for a specific application:

Cycle Description Key Difference from G86
G85 Boring Cycle (Feed In/Feed Out) Retracts at the feed rate. G86 retracts rapidly after stopping.
G76 Fine Boring Cycle (with Shift) Shifts the tool slightly before retracting to avoid drag marks.
G89 Boring Cycle (with Dwell) Includes a dwell (pause) at the bottom of the hole before retracting (at feed rate).
G81 Drilling Cycle For creating hole. Rapid out.
G83 Peck Drilling Cycle For creating deep hole.
G87 Back Boring Cycle

Why Use G86?

The combination of spindle stop and rapid retract in G86 offers specific advantages:

  • Reduced Tool Deflection: Stopping the spindle before retracting minimizes the risk of the tool deflecting and scraping against the newly bored hole wall, especially in softer materials or when using less rigid tooling.
  • Improved Chip Clearance: Stopping the spindle can help break chips and prevent them from interfering with the retraction.
  • Time Savings (in some cases): While G85 provides a superior surface finish in most situations, the rapid retract of G86 can reduce cycle time, particularly for deeper holes, if the material and tooling allow for it.

It’s important to note that G86 is NOT generally recommended for hard materials or applications requiring the absolute best surface finish. G85 (feed in/feed out) is usually preferred for those scenarios.

3. G86 Syntax and Parameters

The basic syntax of the G86 command is similar across different control systems, but parameter names and options can vary.

General Syntax (Milling):

G86 X[Hole X] Y[Hole Y] Z[Hole Depth] R[Return Plane] F[Feed Rate]
  • G86: The G-code for the boring cycle (spindle stop before rapid retract).
  • X[Hole X]: The X-coordinate of the hole center.
  • Y[Hole Y]: The Y-coordinate of the hole center.
  • Z[Hole Depth]: The final Z-depth of the bore (negative if Z-zero is at the workpiece surface).
  • R[Return Plane]: The Z-coordinate of the retract plane (a safe position above the workpiece).
  • F[Feed Rate]: The feed rate for the boring movement (downward in Z).

4. Control System Variations

Let’s examine how G86 is implemented on various popular CNC control systems:

  • Fanuc and Similar (Haas, Mitsubishi):

    • The general syntax above applies.

    • Spindle Restart: Crucially, you must manually restart the spindle after the G86 cycle using M03 (or the appropriate spindle start command). G86 itself does not restart the spindle.

    • Example (Fanuc):

      O0003 (G86 Boring - Fanuc)
      G90 G21 G17 G40 G80 ; Safety line
      T01 M06 ; Select Tool 1 (Boring Head)
      G54 ; Select Work Coordinate System
      G00 X20.0 Y20.0 ; Rapid to first hole position (pre-drilled)
      G43 H01 Z5.0 ; Tool length compensation, rapid to safe Z
      
      ; --- G86 Boring Cycle ---
      G86 X20.0 Y20.0 Z-10.0 R2.0 F80 ; Bore to Z-10, stop, rapid retract
      M03 S500 ; *Restart the spindle* (must be programmed separately!)
      
      X40.0 Y30.0 ; Second hole (G86 is modal)
      M03 S500 ; *Restart the spindle* (again!)
      
      G80 ; Cancel the G86 cycle
      G00 Z50.0 ; Rapid retract to safe Z
      M30 ; Program end
      
  • Siemens (SINUMERIK):

    • CYCLE86: Siemens uses CYCLE86 for this type of boring operation.

    • Parameters: CYCLE86 includes parameters for:

      • RTP: Retract plane
      • RFP: Reference plane
      • SDIS: Safety distance
      • DP: Final drilling depth
      • DPR: Final drilling depth relative to reference plane
      • DTB: Dwell time at drilling depth (optional)
      • SDIR: Spindle rotation direction
    • Example (Siemens):

      CYCLE86(5, 0, 1, -10, , 0, 3) ; Bore, stop spindle, rapid retract
      M03 S500 ; Restart spindle
      
  • Mazatrol (Mazak):

    • Conversational Programming: Boring cycles are typically defined using Mazatrol’s conversational interface. You would select a boring operation and specify parameters like depth, feed rate, retract plane, and the option for a spindle stop before retracting.
    • EIA/ISO (G-code): Mazak machines can also run standard G-code; G86 would function similarly to Fanuc.
  • Heidenhain:

    • CYCL DEF 202 (BORING): Heidenhain uses CYCL DEF 202 for boring operations that correspond to G86. This cycle has parameters for depth, feed rate, retract plane, dwell time, and, importantly, a parameter to control spindle behavior at the bottom of the hole (including stopping the spindle).
    • Example:
      CYCL DEF 202 BORING
      Q200=2 ;SET-UP CLEARANCE
      Q201=-20 ;DEPTH
      Q206=150 ;FEED RATE FOR PLNGNG
      Q211=0 ;DWELL TIME AT THE BOTTOM
      Q203=+0 ;SURFACE COORDINATE
      Q204=50 ;2ND SET-UP CLEARANCE
  • Other Controls: Always consult the programming manual for the specific implementation of G86 (or its equivalent) on your machine’s control system. Okuma, Fagor, and others will have their own approaches.

5. Best Practices for Using G86

  • Pre-Drilled Hole: G86 requires a pre-existing hole. Ensure the hole is drilled to the correct diameter and depth for the boring operation.
  • Appropriate Boring Tool: Select a boring bar or boring head suitable for the material, hole size, and required accuracy.
  • Correct Feed and Speed: Use recommended cutting parameters for the tool and material. Boring often requires lower speeds than drilling.
  • Safe R-Plane: Set the R-plane high enough to clear any clamps or obstructions, but close enough to the workpiece to minimize rapid traverse time.
  • Coolant: Use appropriate cutting fluid for the material and operation. Good coolant flow is essential for chip evacuation and tool life.
  • Verify the Program: Always simulate your program in your CNC control’s simulation mode (or using a separate CAM verification tool) to check for errors and potential collisions.
  • Manual Spindle Restart: Remember to restart the spindle (e.g., with M03) after the G86 cycle completes. This is a very common source of errors when using G86.
  • Consider Alternatives (G85, G76): In many cases, G85 (feed in/feed out) or G76 (fine boring with tool shift) will produce a better surface finish than G86. G86 is best suited for specific scenarios where spindle stop and rapid retract are advantageous.
  • Rigidity: Boring requires the best possible machine.

6. Troubleshooting Common G86 Problems

  • Poor Surface Finish:
    • Cause: Vibration, dull tool, incorrect feed/speed, or the material may not be suitable for rapid retract after a spindle stop.
    • Solution: Check for machine rigidity, use a sharper tool, adjust cutting parameters, and consider using G85 instead.
  • Incorrect Hole Size:
    • Cause: Incorrect tool offset, tool wear, or machine backlash.
    • Solution: Check and adjust tool offsets, replace the tool, and verify machine calibration.
  • Tool Breakage:
    • Cause: Excessive feed rate, incorrect pre-drill size, dull tool, or material issues.
    • Solution: Reduce feed rate, verify pre-drill size, use a new/sharper tool, and check material properties.
  • Machine Alarms:
    • Cause: Syntax errors, incorrect parameters, or exceeding machine limits.
    • Solution: Consult the machine’s manual for alarm code explanations, double-check your program, and verify machine setup.
  • Failure to Restart Spindle:
    • Cause: Forgetting the M03 (or equivalent) command.
    • Solution: Always include a spindle restart command in the line after a G86 operation.

7. Conclusion

The G86 Boring Cycle is a specialized canned cycle used on CNC machining centers for boring operations that require a spindle stop at the bottom of the hole before rapid retraction. While not as commonly used as G85 (feed in/feed out), G86 provides advantages in specific situations, such as minimizing tool deflection in softer materials or reducing cycle time when the material and tooling permit rapid retraction.