G-codeCanned CyclesMill

G73 & G83: Peck Drilling Cycles

G83 drills deep holes in steps and lifts the drill right out of the hole between steps, so the swarf leaves with it. G73 takes the same steps but backs off a fraction of a millimetre, just enough to snap the chip, which keeps the cycle short. Q sets the depth of each step on both. Past roughly three times the drill diameter a hole wants the full retract of G83; under that, G73 gets it done in less time. Either cycle is cancelled by G80.

Syntax

G73 X__ Y__ Z__ R__ Q__ F__      Peck with a short backoff, breaks the chip
G83 X__ Y__ Z__ R__ Q__ F__      Peck with a full retract to R, clears the chip
G80                              Cancel the cycle

Parameters

AddressMeaningNotes
X YHole positionOptional on the cycle block. Each later block carrying an X or a Y drills another hole there
ZFinal depthWhere the point of the drill finishes, not where full diameter finishes
RRetract planeWhere the rapid ends and the feed begins, and on G83 the height every peck comes back to. 2 to 3mm (0.08 to 0.12in) clear of the face
QPeck depthIncremental and unsigned, and required. Around half a diameter for G73, one to one and a half diameters for G83
FDrilling feedThe plunge only. Positioning between holes stays rapid
KRepeat countL on a Haas

Two distances that shape the cycle are not on the block at all. The short backoff G73 makes after each peck, and the height above the last depth that a G83 rapid stops at on the way back down, both live in machine data rather than in the program. Fanuc keeps them in parameters 5114 and 5115.

Example

O0005 (MANIFOLD BLOCK, 20MM MILD STEEL PLATE)
G21 G17 G40 G49 G80 G90          (safe start block)
T11 M06                          (8.5mm HSS-Co drill, M10 tapping size)
G54
S1050 M03                        (28m/min, 0.18mm/rev)
G00 X25. Y20.                    (first hole, clear of the clamps)
G43 H11 Z25. M08                 (tool length comp on, flood coolant)
G99 G73 Z-23.5 R2. Q4. F190      (2.7xD through the plate, 4mm pecks)
X75.                             (second hole)
Y60.                             (third)
X25.                             (fourth)
G80 G00 Z25. M09                 (cancel the cycle before anything else moves)
M05
T12 M06                          (6.8mm HSS-Co drill, M8 tapping size)
S1300 M03                        (28m/min, 0.15mm/rev)
G00 X50. Y40.
G43 H12 Z25. M08
G99 G83 Z-40. R2. Q6. F195       (5.9xD blind hole, full retract every 6mm)
G80 G00 Z25. M09
G49
G91 G28 Z0.                      (home Z)
M30

Controller differences

ControlBehaviour
FanucThe two retract distances are machine data, not program data: parameter 5114 sets how far G73 backs off after a peck, parameter 5115 how far above the last depth a G83 rapid stops before feeding again. Neither is on the block, so the same program pecks differently on two machines. Q is held as cycle data and cleared by G80.
HaasG73 and G83 take three extra addresses for a reducing peck: I is the first peck, J the amount taken off each following peck, K the smallest peck allowed. G83 also accepts P for a dwell at the bottom of the hole. Setting 22, Can Cycle Delta Z, is the G73 backoff, and Setting 52, G83 Retract Above R, is the distance above R the drill retracts to between pecks.
Siemens 840DOne cycle covers both. CYCLE83 is called with a parameter list, and VARI picks the behaviour: chip breaking, which is what G73 does, or chip removal with a full retract, which is G83. FDEP sets the first drilling depth and DAM reduces each following one, _VRT is the chip-breaking retract, DTB and DTS are dwells at depth and at the start point. MCALL makes the call modal. G73 and G83 run in ISO dialect mode only.
MazakEIA/ISO programs run both cycles as on Fanuc. A Mazatrol conversational program has no cycle block: the depth per pass sits in the DRILLING unit alongside the feed, and the hole positions come from the pattern units underneath.
GrblNeither cycle exists. G73 and G83 stop the stream with error:20, and only G80 is in the supported list because motion-mode cancel is the state Grbl sits in. The CAM system has to post every peck as its own G01 plunge and G00 retract.
MarlinNo canned cycles. G73 and G83 answer "Unknown command" and the firmware moves on to the next line, so the drill never plunges and the job finishes early looking like it ran.

What goes wrong

Snapped drills at the bottom of deep holes almost always trace back to G73. The short backoff breaks the chip and leaves it in the hole, so at 6 or 8 times diameter the flutes pack solid and the drill twists off 10mm up from the tip. Past about three times diameter the hole wants G83, where every peck lifts the drill clear of the R plane and the swarf comes out with it.

Second, the retract distance is not in the program. A Fanuc holds the G73 backoff in parameter 5114 and the G83 rapid-down clearance in 5115, and a Haas puts the first of those in Setting 22. Move a proven program to the machine next to it and the pecking changes without a single character of the code changing with it.

Third, parameter 5115 sitting at zero. The G83 rapid then drops the drill onto the exact depth it reached last peck, onto whatever swarf settled there, at full rapid. Two or three holes of that and the corners of the drill are gone.

Fourth, Q written without a decimal point. On a Fanuc set for least-increment input, Q6 is six microns rather than 6mm, so a 40mm hole turns into over six thousand pecks and the cycle looks hung while the operator reaches for reset.

Last, cycle time. G83 with Q3. in a 60mm hole means 20 full retracts and 20 rapids back down, about ten seconds of nothing but air. On a plate with 24 holes that is four minutes a part. Open Q up towards a full drill diameter once the swarf proves it is clearing.

Updated 11 Oct 2026