Skip to content

G81, G82 and G83: choosing the drilling cycle and chaining positions

G81 drills in one pass, G82 does the same but dwells for a time at the bottom, and G83 comes up to clear chips every so much depth. The choice depends on two things: how many diameters deep the hole is and whether the bottom needs to come out clean. All three are modal and they share something that surprises beginners: once active, every coordinate block that follows drills another hole, without repeating the cycle.

For reference only: syntax changes with the control, the post-processor and the machine parameters. Check the official manual and run a simulation before cutting. Legal notice.

The brands and control names mentioned belong to their owners and are used only to identify the equipment. GetGCode is not affiliated with or endorsed by any manufacturer, ISO or ASME: this is our own content, not official documentation. Legal notice.

Family
Cycles
Machine
Milling, Mill-turn
Risk
High
Example
G81 X10 Y10 Z-12 R2 F120

Syntax by control

Fanuc (milling)
G99 G81 X20. Y10. Z-12. R2. F120
The cycle block carries the first position and already drills that hole. Following blocks with only X and Y repeat the cycle at each point until G80 cancels it.
Fanuc / Haas (G82 and G83)
G82 X20. Y10. Z-6. R2. P500 F100 / G83 X20. Y10. Z-45. R2. Q6. F90
P is the dwell at the bottom in G82: on Fanuc, in milliseconds and without a decimal point; on Haas, check the manual. Q is the peck increment in G83, always positive and always incremental.
Siemens 840D / 828D
CYCLE81(RTP, RFP, SDIS, DP, DPR)
Siemens doesn't use G81-G83: the equivalent family is CYCLE81, CYCLE82 and CYCLE83, and repeating at several positions is done by declaring the cycle with MCALL and then calling the coordinates. The number and order of parameters change with the software version, so it is best to generate the call from the control's screen form.
Heidenhain TNC (Klartext)
CYCL DEF 200 TALADRADO / CYCL DEF 203 TALADRADO UNIVERSAL
In Klartext the cycle is defined with Q parameters and then called with CYCL CALL or with CYCL CALL PAT on a position pattern. Cycle 200 covers drilling and already accepts a plunging depth (Q202); 203 adds decreasing peck depth.
Fagor
G81 / G82 / G83 depending on the control model
Fagor keeps the same numbers on the 8055 family, but the parameter letters aren't the Fanuc ones, and on 8060 and 8065 they coexist with screen-based cycles. Check the canned cycles chapter of your model's manual before porting a program.

Address letters used with it

LetterWhat it setsUnit
X YHole position. It is all you need to write from one hole to the next: the depth, the R plane and the feed are inherited from the cycle block, unless you give new values.mm / in
ZLevel of the bottom of the hole, absolute under G90. With a cone-point drill you have to add the height of the point if the hole is a through hole: about 0.3 times the diameter on a 118-degree drill.mm / in
RApproach plane: the level where the rapid turns into feed and where the drill returns to between holes when G99 is active.mm / in
QG83 only (and G73): depth of each peck, measured as an increment and always positive. A Q larger than the total depth makes the cycle behave like a G81.mm / in, incremental
PG82 only: dwell time with the drill at the bottom; on Fanuc it is in milliseconds and without a decimal point, and on Haas it has to be checked in the manual. It makes the bottom come out flat and breaks the chip before coming up.milliseconds on Fanuc
FPlunge feedrate. It is modal and carries over between holes; if it is inherited from a milling operation, the drill goes in at a feed that isn't its own.mm/min under G94
K / LNumber of times the cycle repeats at the same position when the program is in G91. This is the letter that varies most between controls: on some it is K and on others L, and with a value of zero the cycle is defined but doesn't drill.number of times

Worked example

Aluminum cover with three types of hole: two Ø8 through holes in 12 mm thickness, a 6 mm flat-bottom recess and a Ø6, 45 mm deep hole. The example shows what really distinguishes the three cycles and how to chain positions without rewriting the whole cycle for each hole.

O0710 (TRES CICLOS DE TALADRADO EN UNA TAPA)
( Program header. )
G21 G17 G40 G49 G80
( Millimeters, XY plane and a clean state. The G80 in the header makes sure no cycle is left active from the previous part. )
G91 G28 Z0.
( Z to the reference point before the tool change. )
T1 M06 (BROCA D8)
( Ø8 drill for the two through holes. )
G90 G54 G00 X20. Y10.
( Absolute, work offset and positioning over the first hole with Z up. )
G43 H01 Z50. M03 S3000
( T1 length offset and spindle on. Without this block the Z of the cycle doesn't correspond to the drill point. )
M08
( Coolant on. )
G99 G81 X20. Y10. Z-15. R2. F250
( G81 for a through hole: in and out without stopping. Z is -15 and not -12 because the cone point has to come out the other side: it measures 2.4 mm, so the full Ø comes out at Z-14.4 at the least. G99 makes it return only to the R plane between holes. )
X60. Y10.
( Second hole. Here is the chaining: neither G81 nor Z nor R nor F is repeated, just the new position, and the whole cycle runs again. )
G80 G00 Z50.
( Cancels the cycle BEFORE moving Z. Without G80, the next block with coordinates would drill again. )
G91 G28 Z0.
( Z to the reference point for the change. )
T2 M06 (FRESA PLANA D10)
( Flat-bottom tool for the recess. )
G90 G54 G00 X40. Y40.
( Positions over the recess. )
G43 H02 Z50. M03 S2400
( T2 length offset. )
G99 G82 X40. Y40. Z-6. R2. P500 F120
( G82 for the flat bottom: half a second of dwell at the bottom. That time is what makes the tool turn several revolutions at the same level, so the bottom comes out without a step. )
G80 G00 Z50.
( Cancels the cycle and retracts. )
G91 G28 Z0.
( Z to the reference point. )
T3 M06 (BROCA D6)
( Ø6 drill for the deep hole. )
G90 G54 G00 X80. Y40.
( Positions over the deep hole. )
G43 H03 Z50. M03 S2800
( T3 length offset. )
G98 G83 X80. Y40. Z-45. R2. Q6. F180
( G83 because it is more than seven diameters deep. Q6 means 6 mm pecks. G98 instead of G99 because, as this is the only hole, you want the drill to come all the way out and clear itself. )
G80 M09
( Cancels the cycle and turns the coolant off. )
G91 G28 Z0. M05
( Z to the reference point and spindle stop. )
G90 M30
( Back to absolute and end of program. )
Open the simulator to check the example

Practical keys to using G81/G82/G83 in the workshop

Which of the three goes with each hole

The rule of thumb is depth measured in diameters. Up to about three diameters, G81 has it covered: the chip comes out on its own along the flutes of the drill. Between three and five it still works if the coolant gets in well, but it is wise to lower the feed. From five diameters, and always above seven, it is G83 territory: the hole becomes a tube full of chips that slows the drill, heats it up and ends up snapping it. G82 is not a question of depth but of the bottom: countersinks, screw seating faces and any blind hole that has to come out flat call for that dwell at the bottom.

How positions are chained

All three cycles are modal, and that is their real advantage: you write the cycle once with all the depth, R plane and feed information, and after that one line with X and Y per hole is enough. The control repeats the complete sequence at each point. That means a coordinate block written carelessly after the cycle, even if it was only meant to reposition, drills. If the part height changes, on Fanuc Z and the R plane can be given in a following block without G80, and the cycle carries on with the new values.

G98, G99 and the R plane when chaining

With G99 the drill returns only to the R plane between one hole and the next, which saves a lot of time when there are dozens of positions. With G98 it goes up to the initial level from before the cycle. The difference stops being a detail as soon as there is a clamp, a clamping bolt or a step in the part between two holes: with G99 the traverse happens at the height of the R plane, and if that height is 2 mm above the face, the drill passes over everything at 2 mm. In that case, either raise the R plane or use G98 on the conflicting stretch.

Mistakes that cost you a part (or a tool)

  • Moving Z or changing tools without having programmed G80: the cycle is still active and the first block with coordinates drills where it shouldn't.
  • Leaving G99 on with clamps or steps between holes: the return to the R plane leaves the drill a couple of millimeters above the face and the traverse catches it.
  • Programming the Z of a through hole at the level of the bottom face: the cone point of the drill doesn't come out, leaving a burr or an uncut cap.
  • Writing a negative or signed Q in G83: the peck increment is always positive, and the cycle supplies the sign.
  • Writing P with a decimal point in G82 thinking in seconds: on most controls it is milliseconds, and P0.5 is not half a second.
  • Inheriting the feed from a milling operation: the drill goes in with an F meant for another tool and another type of cut.
  • Putting the R plane below the part face to save time: the rapid move ends inside the material.

Frequently asked questions

At what depth should I use G83 instead of G81?

The shop reference is five diameters: below that, G81 is usually enough; above it, chips stop coming out on their own and G83 is the better choice. From seven or eight diameters, pecking is no longer optional, unless you use a through-coolant drill designed for deep hole drilling.

Do I need to repeat the cycle for each hole?

No, and that is the beauty of it. You write the cycle once with Z, R and F, and from there each block with X and Y drills one more hole with the same values. You only have to rewrite the cycle if the depth, the R plane or the feed changes.

What is the difference between G82 and G81 if the dwell is short?

The dwell makes the tool turn several revolutions at the final level before coming up. That erases the step left by tool deflection and breaks the chip. In a through hole it adds nothing; in a countersink, a counterbore or any bottom that serves as a seating face, it is the difference between flat and conical.

Does G83 come all the way out on every peck?

In standard G83 the drill comes out to the R plane on each peck, which is what lets the chips fall and the coolant get in. The high-speed variant, G73 on most controls and G83.1 on some Fanucs, only backs off a little to break the chip without leaving the hole.

Why does it drill one extra hole at the end?

Almost always because the G80 is missing before the retract block or before G28. As long as the cycle is active, any block with coordinates is a drilling position, including the one you read as a simple move to get clear of the part.

Related codes

Detailed data sheet for each code

Syntax by control, address letters, a commented program and the typical mistakes for each one.

Other codes in Cycles

See the full list of G and M codes

Related apps