2.5 Canned Drilling & Tapping Cycles (G81-G84) & Subprogram Structure
Key Takeaways
On a Haas mill, G81 drills, G82 adds a bottom dwell, G83 pecks and retracts for chip clearance, and G84 synchronizes tapping feed with spindle rotation.
For a single-start 16 TPI tap at 700 RPM in G94, program 43.75 in/min because the lead is 1/16 in per revolution.
G98 returns to the initial Z height and G99 to R in the illustrated Haas cycle. Select the higher return on the hole before the fixture crossing.
On Haas mills G80 explicitly cancels a canned cycle. G00 or G01 also cancels it; an XY-only block while the cycle remains active can drill another hole.
On a Haas mill, M98 calls an external subprogram, L specifies a repeat count, and M99 returns from the call. Track any modal changes made by the subprogram.
2.5 Hole-Making Cycles and Program Reuse
A canned cycle puts recurring Z motions into one command. The Haas mill examples below use G17, G20, G90 and G94 with an established fixture offset and known tool length. In this setup Z is the final depth in the active work coordinates, and R gives the work Z position of the R plane. Incremental cycle programming uses different address meanings; verify them in the control manual.
Select and Trace the Cycle
| Haas mill code | Operation | What changes |
|---|---|---|
| G81 | Basic drilling | Feeds to the programmed depth in one pass, then retracts. |
| G82 | Spot drilling with dwell | Pauses at the Z depth for the programmed P time. |
| G83 | Normal peck drilling | Cuts in stages and retracts for chip clearance. Q gives a fixed incremental peck when used. |
| G84 | Tapping cycle | Synchronizes axial travel with spindle rotation, then reverses to withdraw the tap. |
A typical vertical drill cycle positions to the hole, moves to the R plane, feeds to its depth by the selected cycle, and retracts to the active return plane after the hole. Use a spotting or pecking operation based on the tool data, material, depth and chip evacuation. A universal hole-depth ratio does not determine the correct cycle.
For a G82 exercise, G82 Z-0.250 R0.100 P0.5 F6.0 commands a 0.5-second dwell after reaching Z−0.250 in. Use explicit decimal-seconds syntax for the Haas example. The dwell time and depth must suit the tool and the intended spot or chamfer.
For a fixed-peck exercise, G83 Z-0.650 R0.100 Q0.250 F7.0 commands a final Z of −0.650 in with a 0.250-in peck increment. The Haas control retracts between pecks. Setting 52 can add chip-clearance travel above R; the final return still depends on G98 or G99. Haas also supports variable pecks with I, J and K instead of Q. Check the tool and settings when estimating chip clearance or cycle time.
Worked Clamp-Clearance Trace
Before this fragment, the Haas mill is in the state described above at work Z+1.000 in, which establishes the initial plane. The verified tool and holder envelope clears the path from the first hole at X1.000 to the second at X3.000 at R+0.100 in. A clamp between the second and third holes reaches Z+0.500 in and requires the verified initial plane. The holes are all at Y1.000 in. The spindle state and coolant have been established for the drill.
G99 G81 X1.000 Y1.000 Z-0.500 R0.100 F8.0
G98 X3.000
G99 X5.000
G80
The first hole ends at R+0.100 in. This is the starting clearance for travel to the second hole. The G98 on that second hole makes its return end at Z+1.000 in, high enough to cross the clamp on the next move to X5.000. G99 on the third hole changes where that hole ends. Changing to G98 on the third hole would be too late for the incoming crossing.
G80 cancels the active cycle explicitly. Haas mills also cancel the cycle with G00 or G01. A bare XY positioning word can trigger another hole while the cycle is still active. Verify the actual mode and the Z clearance before using coordinates for another purpose.
Worked Rigid-Tapping Feed
For a single-start 3/8–16 tap, one revolution advances the tool by 1 ÷ 16 = 0.0625 in. With G94 active and a specified speed of 700 RPM, multiply 700 × 0.0625 = 43.75 in/min. Changing RPM changes the correct feed in this mode. The illustrated Haas G84 cycle starts and stops the spindle as needed. It does not require a separate M03 block.
(At the hole location with verified tap length, travel and depth)
G98 G84 Z-0.600 R0.200 S700 F43.75
G80
Interpret Z−0.600 as the programmed tap depth, not a guaranteed full-form thread depth. Check the tap lead, the prepared hole and bottom allowance before cutting a blind hole. Use the geometry and tool data for the actual thread.
Reusable Subprograms
On a Haas mill M98 P2005 L4 calls program O02005 four times. The called program ends with M99 to return to the caller. Haas searches the main program directory first for a numbered external subprogram, then the location in Setting 251 if configured. Verify that the intended revision is the one the control will find.
Here is a graphics-only position trace starting at work X0.000 in with known Z clearance, no active canned cycle and inch units. Keep these as two separate programs:
(Main program fragment)
M98 P2005 L4
G90
M30
O02005
G91 G00 X1.000
M99
After successive calls the position is X1.000, X2.000, X3.000 and X4.000. G91 remains in effect after the call until the main program restores G90. This analysis applies to other state the subprogram changes as well, including an active cycle or feed. A computer-aided manufacturing (CAM) postprocessor translates toolpaths for a control, but the output still needs a review for the correct machine, options, units, and active states.
Sources: Haas mill canned cycles and subprograms and Haas mill G-code reference.
What distinguishes Haas mill G83 from G81?
G83 reverses spindle rotation to pull out a tap.
G83 feeds in pecks with chip-clearance retracts. G81 feeds directly to depth.
G83 sets work zero, while G81 positions at machine zero.
G83 uses R as an arc radius.
A Haas mill completes a G81 drill cycle. What happens if the next block contains only new XY coordinates, with no cancellation and the cycle still active?
The active drilling cycle executes at the new location.
The control always treats it as a G00 move.
All work offset registers are erased.
The mill automatically goes to machine zero first.
In the worked three-hole example, which hole must use G98 to clear a clamp between holes two and three?
Hole one only
Hole three only
Hole two
G98 has no effect on the crossing height.
What feed should the Haas mill use in G94 with a single-start 3/8–16 tap at 700 RPM?
35.00 in/min
43.75 in/min
0.0625 in/min
56.25 in/min
Sections you finish are checked off in the contents.