Lessson 3: CNC Canned Cycles, Drilling, Tapping, Reaming and Boring Cycles
September 20, 2015, 2:49 pmArticle Summary
Eldar Gerfanov (Admin)
September 20, 2015, 2:49 pm
July 8, 2019, 10:32 pm
52612
Public
Author Summary
Sat September 7, 2024, 6:04 am
Sat September 7, 2024, 6:04 am
Canned cycles are used every time we need to drill, ream or tap holes on our CNC machine
Standard Fanuc G-Code language supports more than a dozen canned cycles.
The most common cycles that will cover 99.9% of your g-Code CNC programming work are:
G-Code | Name | Motion Style |
G81 | Standard Drilling | Feed-In, Rapid-Out |
G83 | Deep Hole Peck Drilling | Incremental Feed-In by Peck Distance, Rapid Out, Repeat |
G84 | Right Hand Tapping | Feed-In,Reverse Spindle, Feed-Out |
G85 | Reaming/Boring | Feed-In, Feed Out |
Subsequent holes
You can drill additional holes After your canned cycle has been initiated.
Any line with X Y position will be treated as another hole position.
Each position can have its own Retract value, feed rate and retract height modifier.
G80 - Canned Cycle Cancel Code
After all the holes of the canned cycle have been drilled, it is required to call G80 code in order to cancel the current cycle.
The less common canned cycles are:
G-Code | Cycle Name | Motion Style |
G73 | High Speed Chip-Break Drilling | Incremental Feed-In by Peck Distance, Stop Feed, Repeat |
G74 | Left Hand Tapping | Feed-In,Reverse Spindle, Feed-Out |
G76 | Boring, Orient | Feed-in, Orient Spindle, Rapid-Out |
G82 | Spot Drilling | Feed-In, Dwell, Rapid-Out |
G86 | Boring | Feed-In, Spindle Stop, Rapid-Out |
G87 | Back Boring Cycle | Orient Spindle, Move to Insert Point, Turn Spindle On, Feed-In to target Z, Retract to start Z, Move to insert point, Rapid Out |
G88 | Manual Dwell Boring Cycle |
Feed-in, Dwell, Stop Spindle, |
G89 | Dwell Boring Cycle | Feed-In, Dwell, Feed-Out |
Support of each of these cycles depends on your particular machine. So make sure to double-check you manual before using any. Especially the ones from the second table!
Retract control codes:
G98 and G99 codes control Z- retract distance between holes in the same cycle.
These codes must be applied on the same line as or before the canned Cycle. Or BEFORE each hole in the cycle
G-Code | Code Name | Motion Style |
G98 | Clearance Height Retract | After each hole Tool retracts to the last rapid - Z height before the application of the canned cycle. Used when there is need to avoid clamps or part features that are above the R-value height. |
G99 | R - Height retract | After each hole Tool retracts to the R value height of the canned cycle |
This is how G98 retract modifier behaves:
And this is how behaves the G99 retract modifier:
Where part geometry is calling for use of G98 you can combine G98 and G99 to save on some rapid time:
As you can see we need to apply G98 on the hole after which we need to retract to the clearance height.
The codes shown on this picture are missing X,Y locations in some places. The correct program would look like this:
G0 Z0.5
G81 G99 X1.5 Y2.0 Z-1.0 R0.1 (Drill First Hole. G99 - Retract to R-height)X2.0 Y2.0 R-0.75 (Drill Second Hole)
G98 X2.5 Y2.0 R-0.75(Drill Third Hole, After it Retract to 0.5" Z-Clearance height)
G99 X3.0 Y2.0 R.1 (Drill fourth hole. Retract to R-height)
X3.5 Y2.0 R-0.7 (Drill fifth hole. Retract to R-Height)
G80 (Cancel Canned cycle)
G0 Z0.5 (retract to clearance height)
The anatomy of a standard drilling program is as follows:
O0001 (COMMENT OR PROGRAM NAME) (Starting safety blocks) (Tool Change Routine) (Position Axis over the work) (Apply Tool length offset at retract height, Turn on Coolant) (Rapid tool to Safe Clearance height) (Activate Canned Cycle and drill the fist hole) (drill subsequent holes) (Cancel Canned Cycle) (Retract to Clearance height, turn coolant off) (Turn Spindle Off, Retract to TC height) (End Program)
G20 G17 G40 G49 G80 G90
T15 M6
G0 G54 G90 X1.5 Y2.125 S1500 M03;
G0 G43 H15 Z2.0 M8
G0 Z1.0
G81 G99 X1.5 Y2.125 Z-0.5 R0.1 F12.0
X1.75 Y2.5
G98 X2.5 Y3.0 (Retract to Clearance height to avoid clamp after THIS hole)
G99 X3.5 Y3.0 (Switch back to retracting to R-value)
G80
G0 Z2.0 M09
G0 G91 G28 Z0 M05
M30
Canned Cycles Format
G-Code | Name | Format | Standard Example |
G81 | Standard Drilling |
G81 X Y Z R F [K or L]
|
G81 X1.5 Y1.0 Z-0.5 R0.1 F15.0 |
G83 | Deep Hole Peck Drilling |
G83 X Y Z R Q F [K or L]
|
G83 X1.5 Y1.0 Z-0.5 R0.1 Q0.25 F15.0 X2.0 Y1.5 (subsequent hole 1) X2.5 Y2.1 (subsequent hole 2) G80 |
G84 | Right Hand Tapping |
G84 X Y Z R F [K or L]
|
G84 X1.5 Y1.0 Z-0.5 R0.1 F0.049 X2.0 Y1.5 (subsequent hole 1) X2.5 Y2.1 (subsequent hole 2) G80 |
G85 | Reaming/Boring |
G85 X Y Z R F [K or L]
|
G85 X1.5 Y1.0 Z-0.5 R0.1 F15.0 X2.0 Y1.5 (subsequent hole 1) X2.5 Y2.1 (subsequent hole 2) G80 |
As already noted above each control will handle these cycles a little differently.
So be careful!