G85 CNC Code: The Definitive Guide to the Boring Cycle (Turning and Milling)
Introduction:
In CNC machining, achieving precise internal diameters with excellent surface finish is often accomplished through boring. Unlike drilling, which creates a hole from solid material, boring enlarges and refines an existing hole. The G85 Boring Cycle is a canned cycle that automates this process, providing a controlled feed into the hole and a controlled feed out of the hole. This guide provides a thorough explanation of G85, covering its function, syntax, use in both turning and milling, variations between control systems (Fanuc, Siemens, Haas, Mazatrol, Mitsubishi, Heidenhain, and others), best practices, troubleshooting, and programming examples. This article aims to assist CNC users of all experience levels.
1. What is the G85 Boring Cycle?
G85 is a G-code command that initiates a canned cycle for boring. A canned cycle is a pre-programmed sequence of operations. The G85 cycle performs the following actions:
- Rapid Positioning: The tool rapidly moves to the programmed X and Y coordinates (milling) or X and C coordinates (turning with live tooling) of the hole center.
- Rapid to R-Plane: The tool rapidly moves to the programmed R-plane (a clearance position above the workpiece).
- Feed to Depth: The tool feeds down in the Z-axis (milling) or X-axis (turning, for face boring) to the programmed Z-depth (or X-depth) at the specified feed rate.
- Feed Out: The tool feeds out of the hole at the same feed rate used for feeding in. This is the defining characteristic of G85.
Key Concepts:
- Boring: Enlarging and refining an existing hole to achieve precise dimensions and a good surface finish. A hole must already be present. You cannot create a hole from solid material with G85.
- Canned Cycle: A pre-programmed routine that automates a common machining task.
- R-Plane: A clearance plane above the workpiece. The tool moves to this position before and after the boring operation.
- Feed Rate: The speed at which the tool moves into and out of the workpiece.
- Feed Out: G85 uses feed out motion.
- Live Tooling (Lathes): Powered rotary tools that allow a lathe to perform milling and drilling operations.
2. Boring vs. Drilling:
- Drilling: Creates a hole from solid material. Uses drill bits.
- Boring: Enlarges and refines an existing hole. Uses boring bars (turning) or boring heads (milling). Boring provides better control over hole diameter, straightness, roundness, and surface finish than drilling.
3. Why Use G85 (Feed-Out Retraction)?
The key feature of G85, and what distinguishes it from G81 (drilling), is the feed-out retraction. Here’s why this is important:
- Improved Surface Finish: Retracting at rapid traverse (like G81) can leave tool marks or scratches on the hole wall. Feeding out at a controlled rate produces a smoother, more consistent finish.
- Reduced Tool Wear: Rapid retraction can sometimes cause the tool to chip or wear prematurely, especially in harder materials. Feeding out reduces this risk.
- Precise Hole Diameter: Feeding out helps to maintain the precise diameter of the hole, especially in materials that tend to “spring back” after cutting.
- Accurate Depth: More accurate depth can be achieved.
4. G85 Syntax and Parameters (Milling)
The syntax for the G85 command is generally consistent across controls, although variations exist:
General Syntax (Milling):
G85 X[Hole X] Y[Hole Y] Z[Hole Depth] R[Return Plane] F[Feed Rate] K[Repetitions]
- G85: The G-code for the boring cycle.
- 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 both the boring (in) and retracting (out) movements.
- K[Repetitions]: (Optional) Specifies the number of times to repeat the cycle (for multiple holes at the same depth).
Example (Milling - Fanuc/Haas/Mitsubishi):
O0001 (G85 Boring - Milling)
G90 G21 G17 G40 G80 ; Safety line
T01 M06 ; Select Tool 1 (Boring Head)
G54 ; Select Work Coordinate System
G00 X25.0 Y25.0 ; Rapid to first hole position (hole already exists)
G43 H01 Z5.0 ; Activate tool length compensation, rapid to safe Z
; --- G85 Boring Cycle ---
G85 X25.0 Y25.0 Z-15.0 R2.0 F100 ; Bore to Z-15, feed in/out at F100
X50.0 Y25.0 ; Second hole (G85 is modal)
X75.0 Y40.0 ; Third hole
G80 ; Cancel the G85 cycle
G00 Z50.0 ; Rapid retract to safe Z
M30 ; Program end
Explanation:
- Safety Line and Tool Selection: Standard setup.
- Work Offset and Positioning: G54 work offset is selected, and the tool rapids to the first hole location.
- G43: Tool length compensation is activated.
G85 X25.0 Y25.0 Z-15.0 R2.0 F100
:
G85
: Initiates the boring cycle.X25.0 Y25.0
: The location of the first hole.Z-15.0
: The boring depth (15mm deep).R2.0
: The retract plane (2mm above the surface).F100
: The feed rate (100 mm/min) for both boring and retracting.
- Modal Behavior: The
G85
cycle is modal. It repeats at each new X, Y position. G80
: Cancels theG85
cycle.- Retract and End: The tool retracts, and the program ends.
5. G85 in CNC Turning (Face Boring with Live Tooling)
On CNC lathes, G85 is primarily used for face boring operations using live tooling (powered rotary tools). It’s used to enlarge and finish an existing hole on the face of the workpiece.
General Syntax (Turning - with Live Tooling):
G85 X[Hole Depth] Z[Hole Position] R[Return Plane] F[Feed Rate] C[C-axis position]
Or when boring on the center:
G85 X[Hole Depth] Z[Hole Position] R[Return Plane] F[Feed Rate]
- G85: The G-code for the face boring cycle.
- X[Hole Depth]: The final X-depth of the bore (for off-center boring with live tooling). This is a decreasing value as you bore deeper into the face.
- Z[Hole Position]: The Z-axis position of the hole (often the face of the part, Z0, or a small offset).
- R[Return Plane]: The X-coordinate (for face boring) of the retract plane.
- F[Feed Rate]: The feed rate (often in mm/rev or inches/rev in turning).
- C[C-axis Position]: (Live Tooling) The angular position of the C-axis for off-center boring.
Example (Turning - Fanuc-style, Live Tooling, Face Boring):
O0002 (G85 Face Boring - Turning, Live Tooling)
T0505 ; Select Tool 5 (Live Boring Bar)
G98 G97 S1000 M03 ; Feed per minute, constant RPM, live tool on
G00 X40.0 Z5.0 C0.0; Position for boring (center of the face)
M08 ; Coolant on
G43 H05; Tool length compensation
; --- G85 Face Boring Cycle ---
G85 X10.0 Z0.0 R25.0 F0.1 ; Bore to X10, feed in/out at F0.1
G80 ; Cancel the G85 cycle
G00 X40.0 C0.0; Rapid retract
M09; Coolant off
M05 ; Stop live tool spindle
M30 ; Program end
Explanation (Turning):
X10.0
: The final X-depth of the bore. We are boring inwards along the X-axis on the face.- Live tooling and C axis may be used.
6. Control System Variations
The implementation of G85, while consistent in its basic function, varies between controls:
-
Fanuc, Haas, Mitsubishi: The syntax and behavior are generally as described above for both milling and turning (with live tooling).
-
Siemens (SINUMERIK):
- CYCLE85: Siemens uses
CYCLE85
for boring with feed-out retraction. - Parameters:
CYCLE85
has parameters for:RTP
: Retract planeRFP
: Reference planeSDIS
: Safety distanceDP
: Final drilling depthDPR
: Final drilling depth relative to reference planeDTB
: Dwell time at drilling depthFRF
: Feed rate factor for retract Example (Siemens):CYCLE85(5, 0, 1, -15, , 0.5, 100, 1) ; Bore with dwell and feed out
- CYCLE85: Siemens uses
-
Mazatrol (Mazak):
- Conversational Programming: Boring operations are defined within the conversational programming interface (often a “BORE” unit). You would select a boring operation and specify the parameters (depth, retract plane, feed rate, etc.).
- BORING UNIT: Mazak has this unit for boring.
- EIA/ISO (G-code): Mazak machines can run standard G-code, and G85 would function similarly to Fanuc.
-
Heidenhain:
- CYCL DEF 205 (UNIVERSAL BORING): Heidenhain uses
CYCL DEF 205
for various boring operations, including those that would use G85 on other controls.CYCL DEF 205
has parameters for depth, feed rate, retract plane, dwell time, and more. It provides very fine control over the boring process.
- CYCL DEF 205 (UNIVERSAL BORING): Heidenhain uses
-
Other Controls: Always consult the programming manual. Okuma, Fagor, and other controls will have their own specific cycles or methods for boring with feed-out retraction.
Key Differences:
- Syntax:
G85
is the most common command, but Siemens usesCYCLE85
and Heidenhain usesCYCL DEF 205
. - Parameters: The names and availability of parameters for fine-tuning the cycle (dwell time, retraction behavior) vary.
- Conversational vs. G-code: Mazatrol primarily uses conversational programming.
7. Best Practices for Using G85
- Correct Boring Tool: Use a boring bar (turning) or boring head (milling) designed for the specific operation and material. Ensure the tool is sharp and in good condition.
- Pre-Drilled Hole: G85 is for enlarging and finishing an existing hole. You must pre-drill the hole to a suitable diameter before using G85.
- Appropriate Feed and Speed: Use recommended feed rates and spindle speeds for the boring tool, material, and desired surface finish. Boring often requires lower speeds and feeds than drilling.
- Safe R-Plane: Set the R-plane to a safe position that clears any clamps, fixtures, or other obstructions.
- Use Coolant: Use appropriate cutting fluid.
- Verify the Toolpath: Always simulate your program.
- Rigidity: Ensure sufficient rigidity in the setup (workpiece holding, tool holding, and machine). Boring, especially deep boring, is susceptible to vibration.
- Spindle Orientation (Turning): Use M19 for positioning.
8. Troubleshooting Common G85 Problems
- Incorrect Hole Diameter:
- Cause: Incorrect tool offset, tool wear, machine backlash, or incorrect programming of the X-axis coordinate (especially in turning).
- Solution: Double-check tool offsets, inspect the tool for wear, verify machine calibration, and carefully review the program.
- Poor Surface Finish:
- Cause: Dull tool, incorrect feed/speed, insufficient coolant, vibration, or chip buildup.
- Solution: Use a sharper tool, adjust feed/speed, ensure adequate coolant, check for machine stability, and consider chip-breaking techniques.
- Tapered Hole:
- Cause: Tool deflection, misalignment, or insufficient rigidity in the setup.
- Solution: Use a shorter, more rigid boring bar, reduce the depth of cut, check tool alignment, and improve workpiece clamping.
- Machine Alarms:
- Cause: Syntax errors, incorrect parameters, exceeding machine limits, or problems with the machine’s axes or spindle.
- Solution: Consult your machine’s manual for alarm codes, check your program, and inspect the machine.
- Chatter:
- Cause: Tool overhang is too long, feed and speed is not appropriate.
- Solution: Use shorter overhang, optimize parameters.
9. Conclusion: Precise Hole Finishing with G85
The G85 Boring Cycle is a valuable tool in both CNC turning and milling, providing a reliable method for enlarging and finishing pre-drilled holes with a controlled feed-out retraction. This feed-out motion is what distinguishes G85 from G81 (drilling) and is key to achieving superior surface finishes and dimensional accuracy, especially in counterboring applications.