G81 to G89 Drilling Cycles in CNC Milling: Full Guide with Examples
CNC milling machines offer a range of canned drilling cycles from G81 to G89 to automate and simplify complex hole-making operations.
Each code targets a different operation:
- G81: Simple drilling
- G82: Drilling with dwell
- G83: Peck drilling
- G84: Tapping (RH thread)
- G85–G89: Boring and reaming cycles
Let’s go over each one with explanations and real G-code examples.
📌 General Format of Drilling Cycles
G81 X... Y... Z... R... F...
| Code | Description |
|---|---|
| X/Y | Hole location |
| Z | Final hole depth |
| R | Retract level (clearance) |
| F | Feedrate |
Use G80 to cancel the active drilling cycle after a block of holes.
🛠️ G81 — Simple Drilling
Description:
Rapid to R-plane → Drill at feedrate to Z → Rapid retract
G81 X50 Y30 Z-10 R2 F150
- Drills a single hole to 10mm deep
- Retracts to 2mm above surface
⏱️ G82 — Drilling with Dwell
Description:
Same as G81, but adds a dwell time at bottom of hole (usually for countersinking or breaking chips).
G82 X0 Y0 Z-10 R2 P100 F150
| P100 = dwell time in milliseconds (100ms) |
🦴 G83 — Peck Drilling
Description:
Breaks drilling into smaller steps (“pecks”) to reduce chip buildup and tool stress.
G83 X0 Y0 Z-20 R2 Q5 F150
- Drills in 5mm steps (Q = peck depth)
- Ideal for deep holes
🔩 G84 — Tapping Cycle (Right-Hand)
Description:
Feeds down and reverses spindle at bottom for thread tapping.
G84 X0 Y0 Z-12 R2 F1.5
- F = Thread pitch (feed per rev)
- Spindle must reverse at bottom
For Left-Hand Tapping:
Use G74 instead of G84.
🔁 G85 — Boring Cycle (No Dwell)
Description:
Bores at feedrate, then retracts without spindle stop or reversal.
G85 X20 Y20 Z-15 R2 F100
Used when boring bars do not need to reverse.
🧱 G86 — Boring with Spindle Stop
Description:
Spindle stops at Z-depth before retracting rapidly.
G86 X20 Y20 Z-15 R2 F100
Used when tool should not spin while retracting.
🔄 G87 — Back Boring (Through Holes)
Description:
Used when boring from backside of through-hole.
Rare in modern CAM but can be used in sub-spindle work.
🛑 G88 — Manual Retract
Description:
Stops at bottom and waits for operator to manually retract tool.
Not used in automatic production — mostly in manual/supervised mode.
⏸️ G89 — Boring with Dwell
Description:
Like G85 but adds dwell time at bottom.
G89 X20 Y20 Z-15 R2 P200 F100
- P200 = 200 milliseconds dwell at bottom
✅ G80 — Cancel Canned Cycle
After a drilling pattern, use G80 to cancel the active cycle.
G80
🧠 Drilling Cycle Quick Reference Table
| Code | Function | Key Feature |
|---|---|---|
| G81 | Simple drill | Rapid in/out |
| G82 | Drill with dwell | Delay at bottom |
| G83 | Peck drill | Chip-breaking pecks |
| G84 | Tap (RH) | Spindle reverse |
| G85 | Boring (no dwell) | Feed in/out |
| G86 | Boring w/ spindle stop | Safer retraction |
| G87 | Back boring | Reverse side boring |
| G88 | Manual retract | Stops for operator |
| G89 | Boring with dwell | Delay + retract |
🔍 Sample Multi-Hole Pattern with G81
G90 G98 G81 Z-10 R2 F150
X10 Y10
X10 Y30
X10 Y50
G80
- Drills 3 holes
- Returns to R after each hole (G98)
🧩 G98 vs G99 — Return Levels
| Code | Returns to… |
|---|---|
| G98 | Initial point (Z0 or prior point) |
| G99 | R-plane (faster for grouped holes) |
🔧 CAM Software Output Tips
Most CAM post-processors use:
G98 G81 Z-10 R2 F100
You can customize peck depths, dwell, or use macros for patterns.
🧠 Final Thoughts
Mastering G81 to G89 gives you complete control over hole-making cycles in CNC milling.
Whether it’s a simple drilled hole or a precision bored taper, these canned cycles are fast, reliable, and repeatable.
“Drilling may seem simple — until you automate it at scale. Then G81–G89 become your best allies.”
📚 Next Up: CNC Coordinate Systems G53–G59
In the next content, we’ll explore G53, G54–G59, G92, and how work offsets affect CNC programming.
Want to continue?
Leave a comment