When programming a Vertical Machining Center (VMC), certain operations like drilling, boring, tapping, and reaming are repetitive. Writing full toolpath codes (G01, G00, G02, G03) for each step would be time-consuming.
To simplify this, Fanuc controls (and most CNC controls) use Canned Cycles – pre-programmed subroutines that perform common machining operations with just one command line.
In simple terms:
A Canned Cycle is a shortcut command that tells the machine how to drill, bore, or tap, without writing long G-code sequences.
Common Fanuc Canned Cycles in VMC
Here are the most widely used G-codes for drilling operations in VMC:
G-Code | Description |
---|---|
G73 | High-Speed Peck Drilling Cycle |
G74 | Left-Hand Tapping or Peck Drilling (Turning: Peck Drilling) |
G76 | Fine Boring Cycle |
G81 | Simple Drilling Cycle |
G82 | Drilling with Dwell Cycle |
G83 | Peck Drilling Cycle (Deep Hole Drilling) |
G84 | Tapping Cycle (Rigid / Floating Tap Holder) |
G85 | Boring Cycle (feed in, feed out) |
G86 | Boring Cycle (feed in, rapid out) |
G87 | Back Boring Cycle |
G88 | Boring Cycle (dwell, manual retract) |
G89 | Boring Cycle (feed in, dwell, feed out) |
General Format of a Canned Cycle
In Fanuc programming, the typical format looks like this:
Explanation of Parameters:
-
G98 / G99 → Reference return plane
-
G98: Return to Initial point (Z start position before cycle).
-
G99: Return to R plane (safe clearance plane).
-
-
X, Y → Hole position coordinates.
-
Z → Final drilling depth.
-
R → Reference plane (clearance plane where drill starts cutting).
-
P → Dwell time (used in G82, G89 etc.).
-
Q → Peck depth (used in G73, G83).
-
F → Feedrate (mm/min or inch/min).
Example Programs
1. Simple Drilling (G81)
The G81 drilling cycle is the simplest canned cycle used in VMC programming. The tool rapids to the R-plane, feeds straight down to the specified Z-depth, and then retracts to the R-plane or initial plane (depending on G98/G99). It’s commonly used for shallow holes where no pecking or dwell is needed.

N10 T1 M6
N20 G90 G54 G0 X20 Y30 S1200 M3
N30 G43 Z100 H01
N40 G81 G99 X20 Y30 Z-20 R2 F100
N50 X40 Y30
N60 X60 Y30
N70 G80
N80 G0 Z100 M5
N90 M30
This drills 3 holes at different X-Y positions up to Z-20, starting from R2 plane.
Learn More About G81 Cycle
2. Peck Drilling (G83)
The G83 peck drilling cycle is used for deep-hole drilling to prevent tool breakage and improve chip evacuation. The tool feeds down in small increments (Q value), retracts slightly to clear chips, and then continues until the final depth is reached. It’s ideal for drilling holes deeper than 3 times the drill diameter.

N10 T2 M6
N20 G90 G54 G0 X30 Y40 S1000 M3
N30 G43 Z100 H02
N40 G83 G98 X30 Y40 Z-40 R3 Q5 F80
N50 X50 Y40
N60 G80
N70 G0 Z100 M5
N80 M30
Here:
Z-40 = final depth.
R3 = clearance plane.
Q5 = peck depth (5 mm per step).
Learn More About G83 Cycle
3. Tapping Cycle (G84)
The G84 tapping cycle is used for creating internal threads with a tap. The spindle rotation and feedrate are synchronized to match the thread pitch, ensuring accurate threads without damaging the tool. After reaching the programmed depth, the spindle reverses and the tap retracts safely.

N10 T3 M6
N20 G90 G54 G0 X40 Y50 S500 M3
N30 G43 Z100 H03
N40 G84 G99 X40 Y50 Z-15 R2 F1.25
N50 G80
N60 G0 Z100 M5
N70 M30
Feedrate (F) is calculated based on pitch:
For M10 × 1.25 tap → Feed = 1.25 mm/rev × 500 rpm = F625.
Other Canned Cycles
Key Notes for Fanuc Users
-
Always cancel cycle with G80 after drilling operations.
-
Use G98/G99 carefully depending on tool path safety.
-
Calculate Feed (F) properly for tapping cycles.
-
Peck drilling (G83) prevents tool breakage in deep holes.
-
Use tool length offsets (H) and work offsets (G54-G59) correctly.
Conclusion
Canned cycles are an essential part of VMC programming on Fanuc controls. They reduce code length, simplify drilling/tapping operations, and improve machining efficiency.
By mastering cycles like G81, G82, G83, and G84, you can create faster and safer CNC programs.