CNC mill · G-code

G82: spot drill (dwell) cycle

G82 is G81 with a dwell P at the bottom, so a spot drill or counterbore cleans up the bottom before it retracts. Haas lists it in modal group 09. Formats below from Haas, LinuxCNC, Mach4 and Fanuc, each from its maker.

Worked example

Spot two holes with a half-second dwell. Written for this page in the Haas format.

T1 M06 (tool 1)G00 G90 G54 X1. Y1. (first hole)S1200 M03G43 H01 Z0.1 M08G82 Z-0.1 R0.1 P0.5 F8.X2.G80 G00 Z1. M09 (cancel the cycle)M30
The worked example’s toolpath, from the front (X, Z): feed moves solid, rapid moves dashed, from the start point.R planework surfacedepth Z-0.1rapidfeedstart pointXZ
The worked example’s toolpath. Drawn to the example’s own coordinates; the retracts drawn beside the plunges.

How each control writes it

Haas G82 X- Y- Z- R- P- F-

One source: Haas Automation, the control's maker

E
Chip-clean RPM: the spindle reverses to throw chips after each cycle (optional)
F
Feedrate
L
Number of holes (repeats) in G91 incremental mode (optional)
P
Dwell at the bottom, seconds (optional)
R
R plane: the Z position above the part the cycle feeds from (optional)
X
X location of the hole (optional)
Y
Y location of the hole (optional)
Z
Z position at the bottom of the hole
  • P is modal: a G04 P or M97 P inside the cycle uses the same value.

Source: Haas Automation, mill G82

LinuxCNC G82 X- Y- Z- R- L- P-

One source: the LinuxCNC project, the control's maker

X
Hole X location (optional)
Y
Hole Y location (optional)
Z
Final depth
R
Retract (R) plane along Z
L
Repeat count, used in incremental mode (optional)
P
Dwell at the bottom, seconds

Source: LinuxCNC documentation, "G82 Drilling Cycle, Dwell" (archived Oct 29, 2026)

Mach4 G82 X- Y- Z- R- P- L- F-

One source: Artsoft (Newfangled Solutions), the control's maker

X
Hole X position (optional)
Y
Hole Y position (optional)
Z
End point (bottom) of the hole
R
Retract plane; the rapid plane under G99 (optional)
P
Dwell at the bottom, milliseconds (optional)
L
Number of repetitions (optional)
F
Feed rate
  • P is in milliseconds, where Haas and LinuxCNC take seconds.

Source: Mach4 Mill Programming Guide v1.1 (Artsoft), "G82 Spot Face; chapter 3, canned cycle words" (archived Jul 1, 2024)

Fanuc G82 X_ Y_ Z_ R_ P_ F_ K_ ;

One source: FANUC, the control's maker

X
Hole X position (optional)
Y
Hole Y position (optional)
Z
Bottom of the hole: a position in G90, the distance from the R point in G91
R
R point: a position in G90, the distance from the initial level in G91
P
Dwell at the bottom of the hole (optional)
F
Feedrate
K
Number of repeats, for equally spaced holes (give the first hole in G91) (optional)
  • FANUC 0i-MF (machining centre), from its operator’s manual. On another FANUC model, check that control’s manual.
  • G98 returns to the initial level after the hole, G99 to the R point.
  • Start the spindle with an M code before the cycle.

Source: FANUC B-64604EN-2/01, Operator's Manual, 0i-MF (machining centre), §5.1.5

How the controls differ

  • Only Haas takes E.
  • Only Fanuc takes K.
  • A word two controls share can still mean different things: read each control's list above.

Haas follows Fanuc's numbering, but options and parameters differ between controls: check your control's manual.