Bird
0
0
CNC Programmingscripting~10 mins

Drilling operation (G81 canned cycle) in CNC Programming - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Drilling operation (G81 canned cycle)
Start G81 cycle
Move to position X,Y
Drill down to Z
Retract to R plane
Check for next position
Move to next
The G81 cycle moves the drill to each specified XY position, drills down to a set depth Z, retracts to a clearance plane R, then moves to the next position until all are done.
Execution Sample
CNC Programming
N10 G90 G81 X10 Y10 Z-5 R2 F100
N20 X20 Y10
N30 X20 Y20
N40 G80
This program drills holes at (10,10), (20,10), and (20,20) to depth -5 with retract plane 2, then cancels the cycle.
Execution Table
StepCommandPosition (X,Y)Z DepthActionOutput
1G81 start at X10 Y10 Z-5 R2(10,10)-5Move to (10,10), drill down to -5, retract to 2Hole drilled at (10,10)
2X20 Y10(20,10)-5Move to (20,10), drill down to -5, retract to 2Hole drilled at (20,10)
3X20 Y20(20,20)-5Move to (20,20), drill down to -5, retract to 2Hole drilled at (20,20)
4G80 cancel(20,20)N/ACancel canned cycleCycle ended
💡 G80 command cancels the G81 drilling cycle after all holes are drilled
Variable Tracker
VariableStartAfter Step 1After Step 2After Step 3Final
Xundefined10202020
Yundefined10102020
Zundefined-5-5-5N/A
R (Retract plane)undefined222N/A
Cycle ActiveFalseTrueTrueTrueFalse
Key Moments - 3 Insights
Why does the drill retract to the R plane after drilling down?
The retract to R plane (see Step 1 in execution_table) prevents the drill from dragging across the workpiece when moving to the next hole, protecting the tool and part.
What happens if we omit the G80 command at the end?
Without G80 (Step 4), the machine stays in drilling cycle mode and will drill at any new XY moves, which might cause unintended holes.
Does the Z value change for each hole in this G81 cycle?
No, the Z depth stays the same (-5) for all holes as set in the initial G81 command (see Steps 1-3). Only XY changes.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the Z depth during Step 2?
A-5
B2
C0
DN/A
💡 Hint
Check the 'Z Depth' column for Step 2 in the execution_table
At which step does the drilling cycle end?
AStep 3
BStep 4
CStep 2
DStep 1
💡 Hint
Look for the G80 cancel command in the execution_table
If the R plane was changed from 2 to 5, how would the execution_table change?
AThe XY positions would change
BThe drill depth Z would change to -5
CThe retract height in 'Action' would be 5 instead of 2
DThe cycle would end earlier
💡 Hint
R plane controls retract height shown in the 'Action' column
Concept Snapshot
G81 canned cycle drills holes at specified XY positions
Moves drill down to Z depth, then retracts to R plane
Repeats for each XY move until G80 cancels cycle
Use G81 with X, Y, Z, R, and feed rate F
G80 stops the drilling cycle
Full Transcript
The G81 canned cycle automates drilling multiple holes. It starts by moving the drill to the first XY position, drills down to the specified Z depth, then retracts to the R plane to avoid dragging. It repeats this for each new XY coordinate until the G80 command cancels the cycle. The retract plane R is important to protect the tool and workpiece during moves. The Z depth remains constant for all holes unless changed. Omitting G80 keeps the cycle active, which can cause unintended drilling. This visual trace shows each step's position, depth, and action clearly.