Fanuc Canned Cycles — Drilling, Tapping and Boring on Fanuc Controllers
Fanuc controllers are the most widely used CNC controllers in production machining. Their canned cycle implementation is the de facto standard that most other controllers follow — but there are Fanuc-specific behaviors, parameter dependencies, and syntax details that differ from generic descriptions.
This guide covers canned cycles as they work specifically on Fanuc 0i, 30i, 31i, and 32i series controllers.
Fanuc Canned Cycle Activation and Cancellation
On Fanuc, a canned cycle activates on the first block containing both the cycle code (G81, G83, etc.) and a hole position (X/Y). The cycle remains active — modal — until cancelled with G80 or replaced by another group 9 G-code.
G99 G81 X20. Y20. Z-15. R3. F250 (activate and drill first hole)
X50. Y20. (drill second hole — G81 still active)
X80. Y20. (drill third hole)
G80 (cancel)
G80 cancels the cycle but does not move the tool. Always follow G80 with an explicit retract.
G81 — Standard Drill Cycle
G81 X_ Y_ Z_ R_ F_
Plunges at feed rate to Z depth, then retracts at rapid. No dwell, no peck.
Fanuc note: The retract distance from Z to R is always at rapid (G0 speed), regardless of feed rate. The plunge from R to Z is at F.
G99 G81 Z-20. R2. F300
X30. Y0.
X60. Y0.
G80
G0 Z50.
G73 — High-Speed Peck Drill
G73 X_ Y_ Z_ R_ Q_ F_
Pecks by Q amount, then retracts a fixed distance (set by machine parameter No. 5114, default typically 1mm) before the next peck. Does not retract to R between pecks.
Fanuc-specific: The chip-break retract distance is a machine parameter, not programmable in the cycle block. If the default causes chip packing, the parameter must be changed by the machine setter.
G99 G73 Z-45. R3. Q6. F350 (6mm pecks, 1mm chip-break retract)
G83 — Deep Hole Peck Drill
G83 X_ Y_ Z_ R_ Q_ F_
Full retract to R-plane between every peck. On re-entry, Fanuc rapids to a clearance distance above the previous depth before switching to feed rate.
Fanuc-specific: The re-entry clearance above the previous peck bottom is set by machine parameter No. 5115 (default typically 1mm). This is the distance where the drill transitions from rapid to feed rate on the way back into the hole.
G99 G83 Z-60. R3. Q5. F180 (5mm pecks, full retract, 1mm re-entry clearance)
G84 — Rigid Tapping
G84 X_ Y_ Z_ R_ F_ P_
Synchronized spindle and Z-axis. Feed rate must equal spindle speed × pitch.
Fanuc-specific rigid tapping requirements:
- The machine must have the rigid tapping option enabled (machine parameter bit)
- Spindle must be in speed mode (not torque mode)
- On some Fanuc versions, M29 (rigid tapping mode) must precede G84
M29 S800 (some Fanuc versions require M29 before rigid tapping)
G99 G84 Z-18. R3. F800 (M10×1.0 at 800 RPM)
On Fanuc 30i/31i/32i, M29 is typically not required — G84 activates rigid tapping automatically if the option is enabled.
P dwell: On Fanuc, P is in milliseconds and causes a dwell at the bottom before spindle reversal. P200 = 200ms dwell.
G99 G84 Z-18. R3. F600 P200
G85 — Boring Cycle (Feed In / Feed Out)
G85 X_ Y_ Z_ R_ F_
Bores at feed rate, retracts at feed rate. No spindle stop. Produces the best surface finish of the standard boring cycles.
Fanuc note: G85 retracts at the same F value used for the plunge. If you want a different retract speed, use G86 or G76 instead.
G86 — Boring Cycle (Feed In / Spindle Stop / Rapid Out)
G86 X_ Y_ Z_ R_ F_
Bores at feed rate, stops spindle (M5) at the bottom, retracts at rapid. Faster than G85 but may leave a drag mark on the bore wall where the non-rotating tool contacts the surface during retract.
G76 — Fine Boring Cycle
G76 X_ Y_ Z_ R_ Q_ P_ F_
The highest precision boring cycle on Fanuc. At the bottom:
- Spindle orients (M19) to a fixed angle
- Tool shifts by Q in the direction opposite to the boring bar tip (away from the wall)
- Tool retracts at rapid with no wall contact
- Spindle resumes at the R-plane
Q parameter: The shift amount in mm. Direction is determined by machine parameter (tool tip orientation).
G76 Z-30. R3. Q0.2 P0 F60 (bore, shift 0.2mm, retract without contact)
G76 requires spindle orient (M19 function) to be available and configured on the machine.
G80 — Cycle Cancel
Cancels any active group 9 canned cycle. Non-modal — does not move the tool.
Group 9 codes on Fanuc: G73, G74, G76, G80, G81, G82, G83, G84, G85, G86, G87, G88, G89. Activating any of these cancels the previous cycle in the group.
Fanuc-Specific Cycle Behavior Summary
| Cycle | Fanuc behavior note |
|---|---|
| G73 | Chip-break distance = parameter No. 5114 |
| G83 | Re-entry clearance = parameter No. 5115 |
| G84 | May require M29 on older Fanuc versions |
| G76 | Shift direction = parameter-dependent |
| G87 | Back boring — available on Fanuc, rare in practice |
Simulate on a Fanuc Machine Model
Fanuc canned cycle behavior — especially parameter-dependent details like re-entry clearance and rigid tapping activation — varies between firmware versions and machine configurations. Eureka3X simulates canned cycles as your specific Fanuc controller interprets them, not as a generic approximation.
Try Eureka3X free for 30 days →