G83 Peck Drilling Cycle: G-Code Format, Q, R and G73 vs G83

By editor 7 min read
G83 and G73 peck drilling motion compared

G83 is the peck drilling canned cycle in G-code. The drill feeds down by the Q increment, rapids all the way out to the R plane to clear chips, then rapids back to just above the last depth and feeds again, until it reaches the final Z depth. A typical block is G98 G83 X1.0 Y1.0 Z-1.0 R0.1 Q0.25 F8. Use it for deep holes and stringy materials. G73 is the faster chip-breaking version that backs off only slightly between pecks.

G83
peck, full retract
G73
chip break, short retract
Q
peck increment
G80
cancels the cycle

G83 Format and Parameters

G83 X- Y- Z- R- Q- F- (L-)

WordMeaningNotes
X, YHole positionRapid move to XY before drilling
ZFinal hole depthAbsolute in G90; in G91 an increment from the Z position before the drilling move
RRetract planeFeed starts here; sticky; incremental from the current position in G91
QPeck increment along ZMust be positive; zero or negative is an error
FFeed rateUnits per minute in G94 mode
LRepeats (optional)Used in G91 incremental mode to drill equally spaced holes
G98 / G99Final retract modeG98 to the start Z (if above R); G99 to R
From the LinuxCNC G-code reference (G83, canned cycle common words, retract mode).

How G83 Moves

  1. Preliminary motion: if Z is below R, rapid up to R. Rapid to the XY position, then rapid down to R.
  2. Peck: feed down by Q, or to the final Z if that is less deep.
  3. Clear: rapid back out to the R plane.
  4. Return: rapid back down to the current hole bottom, less 0.010 in (0.254 mm).
  5. Repeat the peck, clear and return steps until Z is reached.
  6. Final retract: rapid to clear Z, the R plane (G99) or the starting height (G98).
G83 and G73 drilling cycle motion comparedSide views of a hole drilled in four pecks. In G83 the drill feeds one Q increment, rapids all the way out to the R plane, rapids back down to just above the previous depth and feeds the next increment. In G73 the drill only backs off a small distance between increments.G83 vs G73: drill depth over time for one holeG83 peck drilling (full retract)timeR planeZ depthRapid out to R after every peck: clears chipsG73 chip breaking (short retract)timeR planeZ depthRapid up only 0.010 in: breaks chips, fasterfeedrapidIndustrialBasicsindustrialbasics.com
Figure 1: Motion sequence from the LinuxCNC G-code reference (G73 and G83), example R0.1, Z-1.0, Q0.25. Schematic.

LinuxCNC describes G83 as intended for deep drilling, or milling with chip breaking. The retracts clear the hole of chips and cut off long stringers, which are common when drilling aluminum. Apart from the retracts, G83 works the same as the plain G81 drilling cycle.

G83 vs G73 vs G81

G81G73G83
NameDrilling cycleHigh-speed peck / chip breakingPeck drilling (deep hole)
Between pecksNo pecksRapid up 0.010 in (0.254 mm)Rapid out to R, back to depth − 0.010 in
Clears chips from hole—No (breaks them)Yes
SpeedFastestFastSlowest
Best forShallow holesModerate depth, chip controlDeep holes, stringy chips
Example time (R0.1 to Z-1.0, Q0.25, F8, rapid 300 in/min)8.5 s8.8 s9.8 s
Cycle behavior from LinuxCNC; times calculated by IndustrialBasics (acceleration ignored).

In this example the feed time dominates: the extra rapids of G83 add only about 1.0 s per hole over G73. On deep holes the full retract is worth it, because packed chips break drills.

Peck Drilling Calculator and Code Generator

G83 / G73 Peck Drilling Calculator and Code Generator
IndustrialBasics calculator. Motion follows the LinuxCNC G73/G83 definitions (small retract clearance 0.010 in / 0.254 mm); time ignores acceleration and the move between holes. Other controls (Fanuc, Haas, Siemens) can differ in words, decimal rules and retract amounts. Always verify on your control with a dry run.

Example G83 Program

G20 G90 G17 (inch, absolute, XY plane)
T2 M6 (drill)
S1800 M3
G0 X1.0 Y1.0
G43 H2 Z1.0
G98 G83 X1.0 Y1.0 Z-1.0 R0.1 Q0.25 F8.0
X2.0
X3.0 Y1.5
G80
G0 Z1.0

The first G83 block drills the hole at X1 Y1. The next lines give only new positions; the Z, R, Q and F words are sticky and stay in effect until G80. G98 returns the drill to the starting height (Z1.0) between holes, clearing clamps. G99 would return only to R0.1, which is faster on a clear part. Spindle speed and feed depend on the drill and material, so check the tooling manufacturer’s data.

Programming tip: Choose Q from the chip behavior. Use smaller pecks for deeper holes and for materials that pack or string, and larger pecks where chips break cleanly. Hole depth relative to drill diameter is the usual guide. Check thread-hole drill sizes in the 4-40 tap drill size guide.

Controller Differences

G-code is standardized as RS-274 (EIA, final revision RS-274-D in 1979) and ISO 6983. Wikipedia notes there are many variants, from Fanuc, Siemens, Haas, Heidenhain, Mazak, Okuma and others, and CAM post-processors exist to output the right dialect for each machine. For G83 that means:

  • Some controls accept extra words, such as a dwell at the bottom or variable peck depths.
  • The small retract clearance before each re-entry is often a machine setting rather than a fixed 0.010 in.
  • Decimal point handling for Q, Z and F differs between controls, so check how yours reads numbers written without a decimal point.
  • Incremental (G91) behavior of Z and R follows each control’s rules.
Safety note: Always prove a new drilling cycle with a dry run or single block, with the feed override reduced, and confirm the R plane clears clamps and the part.

Frequently Asked Questions

What is G83 in G-code?

G83 is the peck drilling canned cycle. The drill feeds down by the Q increment, rapids all the way out to the R plane to clear chips, rapids back down to just above the last depth and feeds the next increment, repeating until it reaches Z.

What is the format of a G83 block?

G83 X- Y- Z- R- Q- F- (with optional L for repeats). X and Y locate the hole, Z is the final depth, R the retract plane, Q the peck increment and F the feed rate. G98 or G99 sets where it retracts at the end.

What does Q mean in G83?

Q is the peck increment, the depth drilled on each peck along Z. It must be positive; a zero or negative Q is an error (LinuxCNC).

What is the difference between G83 and G73?

Both drill in Q increments. G83 rapids back out to the R plane after every peck, clearing chips from the hole. G73 backs off only a small distance (0.010 in in LinuxCNC) to break the chip, so it is faster but does not clear chips from deep holes.

When should I use G83 instead of G81?

Use G81 for shallow holes where chips clear easily. Use G83 for deep holes or materials that make long stringy chips (common in aluminum), because the full retracts clear the hole and cut off stringers.

What is the R plane in a drilling cycle?

R is the retract position along Z where feed moves begin and, in G99 mode, where the drill returns between holes. It is sticky: once set it stays in effect for the following holes.

What is the difference between G98 and G99?

They set the final retract in a canned cycle. G98 returns to the starting Z height (if above R); G99 returns to the R plane. In G83, the retracts before final depth always go to R even in G98.

How do I cancel a G83 cycle?

Program G80, or any other motion G-code such as G0 or G1. Using G80 explicitly is clearer and prevents the cycle drilling at the next XY position by accident.

Can I drill several holes with one G83 line?

Yes. After the first G83 block, each following line with only X and Y drills another hole with the same Z, R, Q and F, because these words are sticky until G80 cancels the cycle.

What is G73 in G-code?

G73 is the high-speed peck or chip-breaking drilling cycle. It feeds in Q increments with a short rapid retract between them, then rapids to R at final depth.

Sources and Further Reading

About the author

editor

Leave a Comment