G82 G-Code: Spot Drilling with Dwell at the Bottom of the Hole

G82 is a canned cycle that drills a hole in one straight pass and pauses at the bottom before retracting. That pause is called a dwell, and it’s the one thing that makes G82 different from a standard G81 drill cycle.

Key Takeaways

  • G82 drills a hole in a single pass and dwells (pauses) at the bottom before retracting
  • The dwell cleans up the bottom of the hole and improves surface finish
  • Use P to set the dwell time — units are usually milliseconds, but check your control
  • G82 is modal — it stays active until you cancel it with G80 or another canned cycle
  • For deep holes, use G83 instead — G82 has no peck capability
G82 – At A Glance
FunctionDrilling with dwell at bottom
FormatG82 X_ Y_ Z_ R_ P_ F_
TypeModal (Canned Cycle)
Cancelled byG80, or any other canned cycle
Used withG98, G99, G90/G91

What does G82 do?

G82 rapid-moves to the XY position, feeds down to the Z depth you specify, pauses for the dwell time you set, then retracts back to the R plane or initial point depending on whether G99 or G98 is active.

G82 Code Illustration

The dwell lets the tool spin in place at the bottom of the hole for a moment. This clears any remaining material and leaves a cleaner, more accurate hole bottom. It’s a small thing that makes a real difference on close-tolerance blind holes.

When should you use G82?

Use G82 when you need a cleaner bottom finish than G81 gives you, but the hole isn’t deep enough to require peck drilling.

illustration that shows the difference between peck drilling and standard drilling in a CNC machine

Common applications:

  • Spot drilling to accurately locate holes before drilling to full depth
  • Counterboring (creating a flat-bottomed step in a hole)
  • Shallow blind holes where bottom finish matters

If the hole is deep — generally more than 3–4 times the drill diameter — switch to G83. G82 drills in one shot with no chip clearing, so chip packing becomes a real problem in deeper holes.

G82 code format

G98 G82 X2.0 Y3.0 R0.1 Z-0.75 P500 F10.0

Here’s what each word means:

  • X2.0 Y3.0 — location of the hole in XY
  • R0.1 — the R plane (where the tool slows from rapid to feed rate, just above the part surface)
  • Z-0.75 — the bottom of the hole (negative = down into the part)
  • P500 — dwell time at the bottom (usually milliseconds — so P500 = 0.5 seconds)
  • F10.0 — feed rate in inches per minute
  • G98 — return to initial Z point after each hole

In practice, the XY coordinates often appear on their own line before the canned cycle call:

X2.0 Y3.0
G98 G82 R0.1 Z-0.75 P500 F10.0
X4.0 Y3.0
X6.0 Y3.0
G80

The machine positions at each XY, runs the canned cycle, then moves to the next one. Once G80 is called, the drilling stops.

COMMON MISTAKE – P Value Units

The P word sets dwell time, but the units depend on your machine.

Most Fanuc controls use milliseconds (P500 = 0.5 seconds). Some controls use seconds (P0.5). Always check your control’s parameter documentation before running the program. A P5000 when you meant P500 will just waste time — but getting it backwards on a tight-tolerance hole can affect finish quality.

Milliseconds to seconds converter

Result

G98 and G99: Where does the tool go after drilling?

After completing each hole, the machine needs to move to the next XY location. G98 and G99 control where the Z-axis goes between holes.

  • G98 — returns to the initial Z height (wherever the tool was before the canned cycle started)
  • G99 — returns to the R plane only (the reference plane just above the part)
visualization of how a cnc machine moves using g98 and g99 codes shows motion of travel for the machine

G98 is the safer default. It puts more air between the tool and the part when moving between holes, which matters if you have any clamps, fixture bolts, or features in the way.

G99 makes cycle times shorter because the tool doesn't travel as far. Use it when your setup is clean and open with nothing to crash into.

Positioning mode matters

G82 reads your X, Y, and Z values based on whatever positioning mode is active.

Most programs use G90. If G91 is active by mistake, your Z depth and XY positions will be completely wrong — and that's a crash waiting to happen. Double-check your positioning mode before running any canned cycle.

How to cancel G82

Use G80 to cancel G82 and all other canned cycles.

G80

If you don't cancel it, the machine will try to drill a hole at every XY move that follows. That's usually not what you want after your hole pattern is complete. Put G80 on its own line right after the last hole.

G82 vs Similar Canned cycles

CodeNameUse When
G81Standard drillingSimple through-holes, no finish requirement at bottom
G82Drilling with dwellBlind holes, counterbores, spot drilling with better finish
G83Peck drilling (full retract)Deep holes that need chip clearing
G73Peck drilling (chip break)Moderate-depth holes where cycle time matters

FAQS

What is the dwell in G82 and why does it matter?

The dwell is a short pause at the bottom of the hole while the spindle continues to spin. It allows the tool to clean up any remaining material before retracting, which improves the surface finish and accuracy of the hole bottom. It's especially useful on blind holes and counterbores.

What's the difference between G81 and G82?

G81 drills to depth and immediately retracts — no pause at the bottom. G82 is identical except it adds a dwell (P) at the bottom of the hole before retracting. If bottom finish matters, use G82. If you just need to drill through, G81 is faster.

Is G82 good for deep holes?

No. G82 has no peck capability — it goes straight to full depth in one pass. On deep holes, this causes chips to pack around the drill, which can break the tool or damage the hole. Use G83 (full retract peck drilling) or G73 (chip-break peck) for holes deeper than 3–4 times the drill diameter.

What does P500 mean in a G82 block?

On most Fanuc-style controls, P500 means 500 milliseconds, or half a second. The P word sets the dwell time at the bottom of the hole. Units vary by machine control — some use seconds, some use milliseconds. Check your control documentation to be sure.

Leave a Comment