NCBy Kezuriba Editorial Team

Canned cycles at a glance: how G81, G83, G73, G84 and others move, and how to choose (machining center and lathe)

Once you know the type of hole, the canned cycle to use is decided. Don't forget G80 at the end!

Chips, the Kezuriba mascot
Canned cycles at a glance: how G81, G83, G73, G84 and others move, and how to choose (machining center and lathe)

For work like drilling, tapping and boring, where "the same motion is repeated many times", you can use canned cycles, which let you write the motion in one line. This article lists machining center G73–G89 and lathe G70–G76 and G90/G92/G94 with motion diagrams, and covers how to choose one and where mistakes tend to happen. The code follows FANUC-style controls (G-code system A).

G81 vs G73 vs G83 at a glance
CodeHow it cutsBest for
G81Feeds to the bottom in one pass, then rapids outShallow holes, center holes, through-coolant drills
G73Pecks by Q and backs off slightly to break the chip (high-speed peck drilling)Holes where broken chips clear on their own
G83Pecks by Q and retracts to the R point every time to clear the chips (deep-hole peck drilling)Deep holes and materials whose chips tend to pack
Cross-sectional comparison of CNC machining center holemaking operations: carbide drilling, peck drilling, rigid tapping, and precision boring
Tool motions for single-pass shallow drilling (G81), deep-hole peck drilling (G73/G83), tapping (G84), and fine boring (G76).Concept illustration(tap to enlarge)
What kind of hole?Drill a holeG81Shallow hole, center drillG82Counterbore, chamfer (dwell)G73Deep hole, break chipsG83Deep hole, clear chips outTap a threadG84Right-hand (fwd → rev)G74Left-hand (rev → fwd)Finish a holeG85Reamer (feeds out)G89Stepped bottom (dwell)G86Rough / semi-finish boringG76Finish boring (shift, retract)Counterbore from behindG87Back counterbore (back boring)Rigid tapping:M29 S_ etc. before G84(switching varies by machine)Return heightG98 = back to initial pointG99 = next hole at R pointUse G98 to clear clampsAlways cancel with G80 at the end (so drilling doesn't continue on the next move)
How to choose a canned cycle from the type of hole. Tap a code to go to its explanation in the G-code dictionary. Check the machine's operation manual for detailed conditions.

What is a canned cycle? One block for rapid → cut → return

For example, drilling a hole normally takes three or more blocks: rapid to above the hole, cutting feed to the hole bottom, then rapid back. A canned cycle replaces this fixed motion with the single block G81 X_ Y_ Z_ R_ F_ so for the second and later holes you only need to write X and Y to repeat the same motion[1]. Always cancel it with G80 at the end.

AddressMeaningNotes
X, YHole positionRapids here first, then drilling starts
ZHole bottom positionCoordinate in G90 (absolute); distance from the R point in G91 (incremental)
RR point (height where it switches to cutting feed)In G91 it is the distance from the initial point. Place it slightly above the workpiece surface
QDepth of cut per peck (G73, G83) / shift amount (G76, G87)Unsigned incremental value. 0 and negative values cannot be used[8]
PDwell at the hole bottom (stop time)Units vary by machine (seconds or milliseconds, decimal point handling)
FCutting feedFor tapping: pitch × rpm (feed per minute)
K (L)Repeat countCombine with G91 to drill evenly spaced holes

G98 and G99: the height at which the tool moves to the next hole after drilling

G98 goes back to the initial point (the height before entering the cycle), while G99 stays at the R point and moves to the next hole from there. G99 is faster, but it will hit a clamp or step between holes. It is standard to use G98 only for holes that cross an obstacle.

Diagram: Height to move to the next hole after drilling

G98: return to initial pointClampInitial pointR pointG99: move at R point heightClampInitial pointR pointCollides if in the way
G98 returns to the initial point (the height before entering the cycle) after drilling and then moves to the next hole. G99 moves at the R point height, which is faster, but collides with a clamp or step in the way.

Canned cycles for machining centers at a glance

Tap a code to go to its dictionary page, which covers syntax, differences between manufacturers, and a motion diagram.

CodeUseHow it cutsAt bottomReturn
G81Center holes, shallow holesDrilling cycle (spot drilling)Cutting feed straight to the bottom—Rapid
G82Counterbores, chamfers (clean bottom)Drilling cycle (counterboring, dwell at bottom)Cutting feed straight downDwell (P)Rapid
G73Deep holes (break chips)High-speed peck drilling cycle (chip break, small retract)Guide to Q and calculatorQ at a time; retracts slightly each time—Rapid
G83Deep holes (clear chips out of the hole)Peck drilling cycle (retracts to the R point each time)Guide to Q and calculatorQ at a time; pulls out to the R point each time—Rapid
G84Right-hand tapsTapping cycle (right-hand)Cutting feed with spindle CWReverse (CCW)Cutting feed
G74Left-hand tapsReverse tapping cycle (left-hand tap)Cutting feed with spindle CCWForward (CW)Cutting feed
G85Reaming, boringBoring cycle (feeds in and feeds out)Cutting feed—Cutting feed (strokes the bore on the way out)
G89Finishing the bottom of stepped holesBoring cycle (dwell at bottom, feeds out)Cutting feedDwell (P)Cutting feed
G86Boring (rough, semi-finish)Boring cycle (spindle stops at bottom, rapid out)Cutting feedSpindle stopRapid (the cutting edge may leave a line)
G76Finish boring (no return scratch)Fine boring cycleCutting feedOriented stop → shift by QRapid
G87Back counterbore (back boring)Back boring cycle (back counterboring)Bottom to top—Shifts the tool and pulls out
G88Boring with manual retract (rare today)Boring cycle (dwell at bottom, spindle stops, manual return)Cutting feedDwell, spindle stopManual

G82 and G89 both dwell at the bottom of the hole, but they differ in how they retract. G82 retracts at rapid, so it is used for counterboring and chamfering with a drill or countersink. G89 retracts at cutting feed, so it is used to finish the bottom and inner surface of a stepped hole with a boring bar (it takes longer because it also cuts on the way out).

Code numbers are common to FANUC-style controls, but some manufacturers have exceptions. For example, on Haas machining centers back counterboring is G77, and G87 is not in the list[5]. Check the code numbers in your own machine's manual before using them.

Drilling: G81, G82, G73 and G83 compared

G81 is the most used. It rapids to the R point, drills in one go at cutting feed to the hole bottom, and rapids back. When you want a clean bottom for counterbores or chamfers, use G82, which dwells for P at the hole bottom.

Diagram: G81 motion (side view)

RapidCutting feedInitial pointR pointHole bottom Z① Rapid to R point② To hole bottom ZCutting feed③ Rapid return
Rapid to the R point, then cutting feed from the R point to hole bottom Z. Figure shows G98 (return to initial point); with G99 it stops at the R point and moves to the next hole.

Deep holes use "pecking": G73 for speed, G83 for chip evacuation

If you drill a deep hole in one go, chips pack the flutes and the drill breaks. Peck drilling avoids this by cutting in steps of Q.

  • G73 (high-speed peck drilling): after every Q of cut it retracts slightly to break up the chips. It does not pull out of the hole, so it is fast, but weak at clearing chips out
  • G83 (deep hole peck drilling): after every Q of cut it pulls out to the R point to clear the chips, rapids back to just short of the previous depth, and then cuts again. It takes longer, but is strong on deep holes and materials whose chips pack easily

Diagram: G73 motion (side view)

RapidCutting feedQInitial pointR pointHole bottom Z① Rapid to R point② Cut in by Q③ Retract slightly (d)to break the chips④ Repeat to hole bottom⑤ Rapid return
Cuts in by Q each time, retracting a little (d, a machine setting) each time to break the chips. It doesn't retract out of the hole, so it is fast, but chip evacuation is weaker than G83. Figure shows G98.

Diagram: G83 motion (side view)

RapidCutting feedQInitial pointR pointHole bottom Z① Rapid to R point② Cut in by Q③ Rapid out to R pointto clear chips④ Rapid back to dabove previous depth⑤ Repeat to hole bottom⑥ Rapid return
After each cut of Q, it retracts to the R point to clear chips, then rapids back to d (a machine setting) short of the previous depth and cuts again. Figure shows G98.

Which one to useIf the chips will come out of the hole once they are cut fine, use G73; if they stay in the flutes even when cut, or the hole is deep, use G83. The retract amount and the clearance before re-entering the hole (d) are set on the machine side. On Haas, the G73 retract amount is Setting 22 (Can Cycle Delta Z), and how far G83 pulls out above the R point is Setting 52 (G83 Retract Above R)[7][12].

How Much Should Peck Depth Q Be? When Pecking Helps and When It Backfires

Pecking (step feed) is a motion that breaks the chips up, brings them out and gets coolant to the cutting edge. The price is longer cycle time and the cutting edge re-contacting the hole bottom on every entry. The tool makers' guide also recommends G81 without pecking first of all, and presents G73 for when chips do not come out easily and G83, which retracts fully out of the hole, for when there is no other way to get the chips out[11]. So the first decision is not "what should Q be" but "is pecking needed at all?".

With External Coolant, It Depends on Hole Depth and Material

For a tool without an oil hole (a coolant passage through the drill), where coolant is applied from outside with a hose ("external coolant"), the coolant stops reaching the cutting edge once the hole is deeper than 2D (twice the drill diameter). The chips then get hot, stretch, and set solid in the flute, packing it. A document from a maker of indexable-insert drills recommends that in carbon steel and cast iron, holes up to 2D can be drilled without steps at a low cutting speed (40–90 m/min), and that beyond 2D, steps of 1–3 mm be used[13]. The same document tabulates how to retract by material, depth and coolant volume.

Hole depth (D = drill diameter)MaterialsCoolant2D3D5D8D or moreCarbon steel /Alloy steelPlenty of coolantOne passG81DwellPause the feedProgressively shorterG73 typeFull retractG83 typeLittle coolantProgressively shorterG73 typeShort retractG73 typeFull retractG83 typeFull retractG83 typeLow-carbon steel /Stainless steelPlenty of coolantShort retractG73 typeShort retractG73 typeFull retractG83 typeFull retractG83 typeLittle coolantFull retractG83 typeFull retractG83 typeFull retractG83 typeFull retractG83 typeCarbon and alloy steel: S45C, S30C, SCM440, SCM420, etc.; low-carbon steel and stainless steel: SS400, S10C, SUS304, SUS316, etc.Progressively shorter: a long first step, then shorter steps as the hole gets deeper (from about 1D for φ10 and above, 0.5D for φ6–10)Short retract: back off about 0.3 mm from the hole bottom; Full retract: pull out to the R point each time; Dwell: stop the feed in place
A diagram of a tool maker's guide table for using an indexable-insert drill (φ6–26 mm) with external coolant[13]. In tests in the same document, cast iron shows a wider workable range than steel. Recommendations differ for solid drills and HSS drills, so give priority to the catalog of the tool you use.

As you can see, low-carbon steel and stainless steel produce stretchy chips, so even with plenty of coolant they need a "short retract" from 2D, and with little coolant a "full retract" from 2D. Conversely, with carbon or alloy steel and plenty of coolant, 2D goes in one pass and even 3D needs only a dwell.

Guide to Q: start from "feed × 5", and go smaller the thinner and deeper the hole

  • For a drill of about φ6–26 used with external coolant, Q ≈ feed (mm/rev) × 5, that is, dividing at about the chips from 5 drill revolutions, is the tool makers' guide. The aim is to even out the chip volume to a length that can come out without packing. The retract is about 0.3 mm from the hole bottom; the larger the retract, the more easily the chips get caught[13]
  • Shortening Q as the hole gets deeper (with a longer first step) reduces how often the cutting edge has to bite into the hole bottom again, and extends tool life[13]
  • Use smaller values for smaller diameters and deeper holes. As the table below shows, one study found that a drill broke quickly in a φ0.3 mm micro hole with steps of 0.4D or more[16]
  • The old guide of "1.5 times the drill diameter" has weak grounds and is too large for deep holes and small diameters. In a study drilling micro holes of more than L/D 10 in steel, the drill broke on the first hole without pecking regardless of conditions, and the proper Q found by watching the thrust was about 1/10 of the drill diameter[15]
Drill diameterGuide for QSource of the value
φ20–261–2 mmIndexable-insert drill, external coolant[13]
φ10–200.5–2 mmSame as above[13]
φ6–100.5 mmSame as above[13]
φ1.6–30.3–0.35DExample with a small-diameter carbide drill, external coolant (depth 3–10D)[17]
φ0.30.25D (breaks immediately at 0.4D or more)Study of micro deep holes in stainless steel (depth 20D)[16]
Micro drillAbout 0.1DStudy drilling holes of more than L/D 10 in steel[15]

When "feed × 5" and the table value disagree, take the smaller onethe smaller one. For example, with φ8 and a feed of 0.2 mm/rev, 5 × 0.2 = 1.0 mm, but it is held to the 0.5 mm guideline for φ6–10. The calculator below uses the same rule.

When Pecking Backfires

Drill pulled out of the hole(just after returning to the R point with G83)① The moment it comes out, chips in the flutefall to the hole bottom② On the next entry it bites at the bottom→ The cutting edge suddenly chipsCountermeasure: dwell (stop the feed in place)The drill does not leave the hole, so chipsare less likely to fall to the bottom (cooling is worse than with steps)
A pitfall of steps that retract fully out of the hole on a vertical machining center (illustration, drawn from the cautions in a tool maker's document)[13].
Three Drawbacks of Pecking
  1. On a vertical machine, a full retract drops chips to the hole bottom: when the drill retracts fully out of the hole, as with G83, chips fall to the hole bottom the moment it comes out, and on the next entry the cutting edge can bite them and chip suddenly. Stopping the feed in place with a Dwell instead causes less biting at the hole bottom and does not add much time. However, the cooling of the cutting edge is poorer than with steps that move away[13]
  2. The hole surface gets a little rougher: each time the drill comes out, the coolant washes chips and debris into the hole, and they rub the hole wall on the next entry. A study of pecking in stainless steel, together with earlier studies, shows a benefit in that the cutting edge temperature drops while the drill is out, but also a tendency toward slightly worse surface roughness than with continuous drilling[14]
  3. Longer cycle time: G83 retracts to the R point every time, so there is a lot of non-cutting travel, which can also be a disadvantage for tool life and hole quality[11]

Stop using "G83 Q1." by defaultThe order to decide in: ① for a drill with through-tool coolant, G81 (see the next section); ② for external coolant at 2D or less, G81 (at a low speed); ③ for deeper holes, G73 starting from Q = feed × 5; ④ for deep holes on a vertical machine or materials with stretchy chips, G83 or a dwell, watching for chips biting at the hole bottom. If in doubt, get a guide value from the calculator below and then check it against the tool's catalog.

Calculator: Peck Depth Q and Suggested Cycle

Depth ratio L/D—D
Guide for Q—mm
Number of pecks—passes

Q ≈ 5 × f (round to up to 0.5 mm for φ6–10, 0.5–2 mm for φ10–20, and 1–2 mm for φ20 and above)
Number of pecks = L ÷ Q (rounded up; with progressively shorter steps the number increases)
For a machine programmed in feed per minute, f = F ÷ S (F: mm/min, S: min⁻¹)
For small diameters under φ6, Q is in the range 0.1–0.35D; give priority to the tool maker's recommendation

The suggested cycles are based on a tool maker's table for using an indexable-insert drill with external coolant[13], and on a guide that puts drilling without pecking first[11]. Recommendations differ for solid drills, HSS drills and small-diameter drills, so give priority to the values in the catalog of the tool you use.

With a Through-Coolant Carbide Drill, the Basic Rule Is Not to Peck

When oil is passed at high pressure through a drill with oil holes, the chips are pushed out of the flutes, so deep holes can be drilled without pecking. In a study of small-diameter deep holes, the depth that could be drilled without pecking extended to more than 10D in S45C carbon steel and more than 15D in SUS303 stainless steel, the hole surface roughness was half the usual, and tool life in SUS304 was 2–3 times longer[18]. If you peck with through-tool coolant, only the drawbacks remain: longer time and the cutting edge biting in again. This is why tool makers recommend G81 first[11]. If chips pack, review the coolant pressure, volume and feed before adding pecking.

Pecking can sometimes be avoided even with external coolant. A study of no-step drilling with small-diameter drills confirmed a phenomenon in which negative pressure forms inside the hole as chips leave the flute, drawing in coolant applied from outside. And rather than a low feed that breaks the chips up finely, a higher feed that keeps the chips long gave better chip evacuation. With a slippery DLC coating, the feed could be raised even further[19][20]. There are also cases where, even with a standard HSS drill, too low a feed makes thin, long chips wind around the drill and calls for fine steps[21]. "Lowering the feed because chips pack" can backfire, in other words.

Drill point web thinning (grinding the central chisel edge short and giving it a rake angle) also affects how the chips come out. The chisel section crushes material rather than cutting it, and 50–70% of a drill's cutting resistance arises there. Thinning lowers the resistance, lets the central chips leave sooner, and improves the bite[22]. In a study of φ0.2 mm micro drills, thinning reduced thrust by up to 70%[23]. You can calculate drill thrust with the cutting force and required power calculator.

Chip control other than pecking: superimposing vibration on the feedA study of a method that superimposes a low-frequency vibration on the feed to cut the chips once per drill revolution found that the volume of chips accumulating around the hole fell to 1/11 in steel and 1/5 in aluminum. In steel, however, the cutting edge near the chisel chipped[24]. The "chip-breaking (vibration cutting)" function found on recent machine tools follows the same line of thinking: oscillating the feed finely to split the chips.

Through-tool coolant also works well for taps. In one example, 3 MPa through-tool coolant on a form tap (M6) extended tool life from 400 holes to 4,000 holes[25]. For the relationship between tap drill hole size and tap torque, see How to remove a broken tap: "How much does torque drop when you enlarge the tap drill hole by 0.1 mm?"; for the causes of chip packing and breakage in drills, see Machining Troubleshooting Encyclopedia entry "Chips packing (drill)" / "Drill breaks".

Tapping: G84 (right-hand) and G74 (left-hand)

G84 feeds in with the spindle running forward, reverses at the hole bottom, and feeds out. The feed is rpm × pitch (for feed per minute). For example, tapping M10×1.5 at 500 min⁻¹ gives F750[3]. You can calculate it with the tapping cutting-conditions calculator.

Diagram: G84 motion (side view)

RapidCutting feedReverse spindle at bottomInitial pointR pointHole bottom Z① Rapid to R point② Tap in with feed,spindle CW③ Reverse at bottom④ Feed out toR point (back to CW)⑤ Rapid to initial point
Taps in with feed with the spindle forward, reverses at the hole bottom and feeds out (right-hand thread). Feed = rpm × pitch. Figure shows G98 (rapid from R point to initial point).

The method that synchronizes spindle rotation and feed is called rigid tapping, and on FANUC-style controls it is often switched on by writing M29 S_ before G84, but how to switch it varies by machine (About M29). Do not mix it with the older method that uses a compensating chuck (floating tap holder). On most machines the feed override has no effect during tapping.

In tapping a blind hole, how deep the tap drill hole is drilled directly affects tap breakage. The tap drill hole depth, which is the chamfer length plus the drill point length, can be worked out with the "Tap drill hole depth for a blind hole" calculator in How to remove a broken tap.

Reaming and boring: G85, G86, G89, G76 and G87

  • G85: cutting feed both in and out. A reamer or rough boring bar strokes the bore surface back and forth
  • G89: G85 with a dwell at the hole bottom added. Finishes the bottom face of a stepped hole
  • G86: stops the spindle at the hole bottom and pulls out at rapid. Fast, but the cutting edge may leave a line on the bore
  • G76 (fine boring): at the hole bottom it brings the spindle to an oriented stop, shifts away from the cutting edge by Q, and then pulls out. No return scratch is left on the finished bore. The shift direction is set by a machine setting, and if it does not match the direction of the boring bar's cutting edge, the shift cuts the bore
  • G87 (back counterboring): passes through the hole with the tool shifted away, shifts it back on the far side, and cuts upward. The R point is below the hole, so the way of thinking is the reverse of the other cycles

Diagram: G85 motion (side view)

RapidCutting feedInitial pointR pointHole bottom Z① Rapid to R point② Feed to hole bottom③ Feed to R point(pull out)④ Rapid to initial point
Cutting feed both in and out. A reamer or boring bar strokes the bore surface in and out. Figure shows G98 (rapid from R point to initial point).

Diagram: G76 motion (side view)

RapidCutting feedQInitial pointR pointHole bottom Z① Rapid to R point② Feed to hole bottom③ Orient spindle stop④ Shift away from thecutting edge by Q⑤ Rapid out⑥ Shift back, spin spindle
At the hole bottom the spindle is stopped at an oriented position and shifted away from the cutting edge by Q before rapid retraction, so no return scratch is left on the bore. Shift direction is set by a machine setting. Figure shows G98.

Lathe canned cycles: single-type (G90, G92, G94) and multiple-type (G70–G76)

On a lathe (G-code system A), the same code number has a different meaning than on a machining center. G90 is not absolute programming but the OD cutting cycle, and G94 is not feed per minute but the facing cycle. Be especially careful when reusing a program written for a machining center[4].

CodeTypeMeaning
G90Single-typeOD/ID cutting cycle (single-type canned cycle, G-code system A)
G92Single-typeThreading cycle (single-type canned cycle, G-code system A)
G94Single-typeFacing cycle (single-type canned cycle, G-code system A)
G70Multiple-typeFinishing cycle (finishes the shape roughed out by G71–G73)
G71Multiple-typeOD/ID rough cutting cycle (cuts in the Z direction)
G72Multiple-typeFacing rough cutting cycle (cuts in the X direction)
G73Multiple-typeClosed-loop cutting cycle (pattern repeating; cuts along the blank shape, e.g., castings)
G74Multiple-typeFace grooving (cut-off) cycle / peck drilling of deep holes in Z
G75Multiple-typeOD/ID grooving (cut-off) cycle
G76Multiple-typeMultiple threading cycle

Single-type cycles perform the 4 motions "infeed → cut → retract → return" in one block, and you keep cutting with many blocks that change only X. Multiple-type cycles create the roughing passes automatically once you write the finish profile (the blocks from P to Q). The basic combination is to rough with G71 and then finish with G70 specifying the same P and Q.

Diagram: How G71 (lathe) cuts

ZXΔdFinish allowance (orange dotted)Start pointFinish profile (P–Q)
Cuts with Z-direction passes by Δd each, down to the line that leaves the finish allowance on the finish profile (P–Q). At the end of each pass it backs off a little (e) at 45° and returns by rapid; a final pass follows the profile once. Finish with G70.

Diagram (lathe): G76 (lathe), multiple threading cycle

Each passInfeed method (enlarged)Threaded sectionAEEnds with an angled pull-out1234Finish (d)ΔdkDepth of pass n = Δd × √n
Infeeds along one flank of the thread (flank infeed). The depth of pass n is Δd × √n, so the infeed shrinks and each pass removes about the same amount; the finishing allowance d is cut last. k is the thread height.

Watch the U in the 2 blocks of G71G71 uses a 2-block format. The U in the first block is the depth of cut (radius value), while the U in the second block is the finishing allowance in X (diameter value). The same address means different things in each block, and mixing them up cuts too much. The P, Q, and R of G76 (threading) also change meaning between the first and second blocks.

For details, see How to write lathe multiple repetitive cycles (G71, G70, G72, G73, G76): example programs, tool-path diagrams, the sign of U for ID work, and a G76 infeed calculator.

Program example: tapping M10 holes at 4 locations

The sequence is center drill → a 25 mm deep φ8.5 tap drill hole (G73) → M10×1.5 rigid tapping (G84). Only the holes with a clamp in between return to the initial point with G98. Tool numbers, spindle speeds, feeds, and Q are examples; use the tool maker's recommended conditions and your machine in actual work.

O1001 (M10 TAP x4)
G90 G17 G40 G49 G80          (safety block)
G54
T01 M06                      (center drill)
S1500 M03
G00 X20. Y20.
G43 Z50. H01 M08
G99 G81 X20. Y20. Z-3. R3. F120   (return to R point, then next hole)
X80.
G98 X80. Y60.                (clamp ahead: return to initial point)
G99 X20.
G80 M09
G91 G28 Z0.
T02 M06                      (φ8.5 drill)
S1100 M03
G90 G00 X20. Y20.
G43 Z50. H02 M08
G99 G73 X20. Y20. Z-25. R3. Q0.5 F160
X80.
G98 X80. Y60.
G99 X20.
G80 M09
G91 G28 Z0.
T03 M06                      (M10x1.5 tap)
G90 G00 X20. Y20.
G43 Z50. H03 M08
M29 S500                     (rigid tapping: varies by machine)
G99 G84 X20. Y20. Z-20. R5. F750  (F = 500 x 1.5; R point higher than for the drill)
X80.
G98 X80. Y60.
G99 X20.
G80 M09
G91 G28 Z0.
M30

The tap drill hole is 25 mm deep, about 3D, and external coolant is assumed, so, as the guideline suggests, the guideline aboveG73 is used. Q is the "feed × 5" value (at S1100 and F160, about 0.145 mm per revolution, × 5 gives about 0.73 mm) rounded down to the 0.5 mm upper limit for φ6–10. If chips remain in the hole, switch to G83. With a decimal point, Q is read in mm (Q0.5 = 0.5 mm); without one, it is read in the least input increment (0.001 mm on many machines), so do not forget the decimal point.

Putting G80 in the safety block is standard practice, even in university lab programs and Haas examples[10]. Even if a canned cycle is left over from the previous program, the first move won't start drilling.

In this example, the tap's R point (R5.) is set higher than the drill's (R3.). Rigid tapping starts moving from the R point with spindle rotation and feed synchronized, so this leaves enough room for the motion to settle before the tap's chamfer reaches the entrance of the hole. How much room is needed depends on the machine's acceleration and deceleration, so follow the recommendation in the machine's manual.

7 common mistakes

  1. Forgetting G80: a canned cycle is modal, so drilling continues even at the next G00 X_ Y_
  2. Crossing a clamp while still in G99: the tool moves sideways at R-point height and crashes. Use G98 for holes just before an obstacle
  3. Writing R and Z as absolute values in G91: in incremental mode, R is the distance from the initial point and Z is the distance from the R point
  4. Wrong sign or decimal point in Q: Q is unsigned. On machines that read a number without a decimal point in the least input increment, Q5 becomes 0.005 mm (decimal point input)
  5. Miscalculated F for tapping: for feed per minute, spindle speed × pitch; for feed per revolution, the pitch itself
  6. G76 shift direction opposite to the tool orientation: the shift cuts the finished bore
  7. Using G90 and G94 with machining-center habits on a lathe: on a system A lathe they are cutting cycles

For how to remove a tap that has broken, also see “Tap breakage” in the Machining Troubleshooting Encyclopedia and How to remove a broken tap. To calculate the positions of holes on a circle, or to turn a canned cycle into a one-line command of your own, the next step is Introduction to custom macros and subprograms, which use variables.

FAQ

What is the difference between G73 and G83?
The retract is different. G73 (high-speed peck drilling) backs off slightly after each Q to break the chip and never leaves the hole. G83 (deep-hole peck drilling) retracts to the R point after each Q to clear the chips, then rapids back to just above the previous depth and cuts again. G73 is faster; G83 is better at clearing chips.
Can I use cutter radius compensation (G41/G42) with canned cycles?
No. Canned cycles assume cutter radius compensation is not applied (per the NIST RS274NGC specification)[8]. Cancel it with G40 before using a cycle.
Is the repeat count K or L?
It depends on the machine. Most FANUC-type controls use K; older machines and some makers use L.
Which is faster, G73 or G83?
G73. Because it does not pull out of the hole every time, there is less air cutting. However, the chips do not come out of the hole, so G83 is safer for deep holes and sticky materials. G83, which pulls out to the R point, gets the chips out more easily, but toolmakers' materials caution that it takes longer and can be a disadvantage for tool life and hole quality. It is best treated as a measure for when chips cannot be cleared by other means[11].
What should I set the peck depth Q to?
For a drill of about φ6–26 with external coolant, start at feed × 5 (the chips of 5 drill revolutions) and make it shorter the deeper you go[13]. The thinner and deeper the hole, the smaller Q should be; in a study of micro holes of more than L/D 10 in steel, about 0.1D was proper[15]. "1.5 times the drill diameter" is too large for deep holes. You can get a guide value with the Q and cycle calculator.
Should I use G83 even for a drill with through-tool coolant?
Basically G81 (no peck). If you pass oil at high pressure, the chips are pushed out of the flutes[11][18]. If it still packs, first review the coolant pressure, volume and feed, and treat pecking as the last resort.

Sources

  1. Mitsubishi Electric, "The Basics of CNC Machining Programming (for Machining center)" e-learning material (PDF)
  2. Mitsubishi Electric, "The Basics of CNC Machining Programming (for Lathe)" e-learning material (PDF, BNP-C8027-688)
  3. Siemens AG, "SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Milling, 04.2007 Edition (6FC5398-7BP10-0BA0)"
  4. Siemens AG, "SINUMERIK 802D sl/840D/840D sl/840Di/840Di sl/810D Programming Manual ISO Turning, 04.2007 Edition"
  5. Haas Automation, Inc., "Mill Operator's Manual – 17 Mill G-Codes" (online edition)
  6. Haas Automation, Inc., "Lathe Operator's Manual – 16 Lathe G-Codes" (online edition)
  7. Haas Automation, Inc., "G-code, M-code, and Setting" (explanations by code)
  8. National Institute of Standards and Technology (NIST), "The NIST RS274NGC Interpreter – Version 3" (NISTIR 6556, 2000)
  9. Ministry of Health, Labour and Welfare, Ability Evaluation Office, Human Resources Development Bureau, "Human Resource Development Manual Using the Practical Test Tasks of Grade 3 Skill Tests: Numerically Controlled Lathe Work (March 2018)" (in Japanese)
  10. Saitama University, Faculty of Engineering, Department of Mechanical Engineering, lab course, "Machining Center Program 2019 (lab NC program O19-0101, with comments)" (in Japanese)
  11. ISCAR "Drilling Handbook" p.37 (retraction in pecking, tool life and hole quality)
  12. Haas Automation "Mill Operator’s Manual — Settings" (Setting 22 Can Cycle Delta Z, Setting 52 G83 Retract Above R)
  13. Tungaloy, "DrillMeister: Points for External Coolant Machining" (guide step values, table of methods by material, depth and coolant volume; PDF)
  14. Paper: Pelosin M. et al., "A predictive thermomechanical model for peck drilling", CIRP Journal of Manufacturing Science and Technology 66, pp.70–85 (2026)
  15. Paper: Kim D.W. et al., "Tool life improvement by peck drilling and thrust force monitoring during deep-micro-hole drilling of steel", International Journal of Machine Tools and Manufacture 49(3-4), pp.246–255 (2009)
  16. Technical report: Nanbu, Ochiai and Ebara, "A study on high-aspect-ratio micro deep-hole machining", Research Report of the Saitama Industrial Technology Center, Vol. 10 (2012)
  17. OSG, "Shape it 2026 Winter" (examples of small-diameter carbide drilling; PDF)
  18. Paper: Matsubara, Yamamoto, Okamura and Yamano, "A study of small-diameter deep-hole drilling with high-pressure coolant", Journal of the Japan Society for Precision Engineering 55(3), pp.520–525 (1989)
  19. Paper: Uchiyama and Sakata, "Cutting performance in no-step feed drilling with small-diameter drills, 1st report", Journal of the Japan Society for Abrasive Technology 59(1), pp.27–31 (2015)
  20. Paper: Uchiyama et al., "Cutting performance in no-step feed drilling with small-diameter drills, 2nd report: Effect of DLC coating on chip evacuation", Journal of the Japan Society for Abrasive Technology 61(8), pp.438–443 (2017)
  21. Nachi-Fujikoshi, "Drill feed rate and changes in the chips" (cutting tool blog)
  22. Mitsubishi Materials U.S.A., "Drill Terminology and Cutting Characteristics" (Web Thinning)
  23. Paper: Nanbu et al., "Effect of the chisel rake angle formed by thinning in micro deep-hole drilling", Journal of the Japan Society for Precision Engineering 77(7), pp.713–717 (2011)
  24. Paper: Kubota, Tabei and Sato, "A study of a drilling method that subdivides chips", Journal of the Japan Society for Precision Engineering 60(11), pp.1611–1615 (1994)
  25. Tanoi Seisakusho, "About form taps" (white paper)

More articles