G81 to G89: Complete Guide to CNC Drilling and Tapping Cycles
CNC controllers like FANUC, Haas, and Siemens support a powerful set of canned cycles (G81–G89) to simplify drilling, tapping, and boring operations.
These commands automate multi-step processes into one line, reducing code length and increasing repeatability.
🧩 Canned Cycle Basics
Each cycle typically uses the following parameters:
G81 X__ Y__ Z__ R__ F__
| Parameter | Description |
|---|---|
| X/Y | Hole position |
| Z | Depth of hole |
| R | Retract (safe) height |
| F | Feedrate |
Use G98 or G99 to control return height after drilling.
🔹 G81 – Drilling Cycle
Simple drill in and out.
G81 X10 Y10 Z-15 R2 F100
- Rapid to R-level
- Feed to Z-depth
- Rapid return to R or initial depending on G98/G99
🔹 G82 – Drilling with Dwell
Same as G81 but pauses at bottom (for accuracy).
G82 X10 Y10 Z-10 R1 P200 F75
P200= dwell 200 milliseconds- Good for countersinking and harder materials
🔹 G83 – Peck Drilling Cycle
Used for deep holes or chip breaking.
G83 X10 Y10 Z-30 R2 Q5 F75
| Code | Meaning |
|---|---|
| Q5 | Peck depth 5 mm |
- Drills in steps of Q
- Retracts between pecks
- Excellent for deep holes
🔹 G84 – Tapping Cycle
Right-hand tapping cycle. Requires spindle sync.
G84 X10 Y10 Z-12 R2 F1.25
- Feed must match thread pitch (e.g., M10 × 1.25)
- Spindle rotates forward & reverses automatically
For left-hand taps use G74 (on some controls)
🔹 G85 – Boring Cycle (Feed in, feed out)
Used with boring bars.
G85 X10 Y10 Z-15 R2 F80
- Feed in and feed out at same rate
- Smooth finish, no rapid motion
🔹 G86 – Boring with Spindle Stop
G86 X10 Y10 Z-20 R2 F50
- Feed in
- Spindle stops at bottom
- Rapid retracts
Useful for accurate bore stops, not for through-holes.
🔹 G87 – Back Boring Cycle
Used when machining from the backside of a feature.
- Often requires subprograms and special setups
- Not available on all machines
🔹 G88 – Manual Retract Boring
G88 X10 Y10 Z-20 R2 F50
- Feed in
- Waits for manual retract from operator (Z-axis)
- Used in special boring/jig setups
🔹 G89 – Boring with Dwell at Bottom
G89 X10 Y10 Z-20 R2 P300 F50
- Feed in
- Dwell at bottom (
P300= 300 ms) - Feed out
📊 Comparison Table
| Code | Operation Type | Feed In | Dwell | Retract Type | Spindle Stop |
|---|---|---|---|---|---|
| G81 | Drilling | Yes | No | Rapid | No |
| G82 | Drilling + Dwell | Yes | Yes | Rapid | No |
| G83 | Peck Drilling | Yes | Optional | Retract | No |
| G84 | Tapping | Yes | No | Reversed Feed | No |
| G85 | Boring | Yes | No | Feed Out | No |
| G86 | Boring + Stop | Yes | No | Rapid | Yes |
| G87 | Back Boring | Yes | No | Complex | No |
| G88 | Manual Retract | Yes | Optional | Manual | Optional |
| G89 | Boring + Dwell | Yes | Yes | Feed Out | No |
⚙️ Tips for Safe Usage
- Use
G80to cancel canned cycles after use - Always set correct
Rheight to avoid crashes - Simulate before real machining
- Adjust feedrates carefully for tapping (G84)
📌 Conclusion
Mastering G81–G89 makes you a more efficient, accurate, and productive CNC programmer. These cycles eliminate repetitive code and standardize operations across parts.
Leave a comment