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 Format and Parameters
G83 X- Y- Z- R- Q- F- (L-)
| Word | Meaning | Notes |
|---|---|---|
| X, Y | Hole position | Rapid move to XY before drilling |
| Z | Final hole depth | Absolute in G90; in G91 an increment from the Z position before the drilling move |
| R | Retract plane | Feed starts here; sticky; incremental from the current position in G91 |
| Q | Peck increment along Z | Must be positive; zero or negative is an error |
| F | Feed rate | Units per minute in G94 mode |
| L | Repeats (optional) | Used in G91 incremental mode to drill equally spaced holes |
| G98 / G99 | Final retract mode | G98 to the start Z (if above R); G99 to R |
How G83 Moves
- Preliminary motion: if Z is below R, rapid up to R. Rapid to the XY position, then rapid down to R.
- Peck: feed down by Q, or to the final Z if that is less deep.
- Clear: rapid back out to the R plane.
- Return: rapid back down to the current hole bottom, less 0.010 in (0.254 mm).
- Repeat the peck, clear and return steps until Z is reached.
- Final retract: rapid to clear Z, the R plane (G99) or the starting height (G98).
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
| G81 | G73 | G83 | |
|---|---|---|---|
| Name | Drilling cycle | High-speed peck / chip breaking | Peck drilling (deep hole) |
| Between pecks | No pecks | Rapid 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 |
| Speed | Fastest | Fast | Slowest |
| Best for | Shallow holes | Moderate depth, chip control | Deep holes, stringy chips |
| Example time (R0.1 to Z-1.0, Q0.25, F8, rapid 300 in/min) | 8.5 s | 8.8 s | 9.8 s |
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
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.
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.
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
- LinuxCNC: G-Codes reference: G73, G80–G89 canned cycles, G83 peck drilling, G98/G99, sticky words and errors.
- Wikipedia: G-code: RS-274 and ISO 6983 history, control variants and post-processors.
