Back to Supported G-Codes

G81, G82 & G83 - Drilling Cycles

DMC File Mode: Not Supported
Streaming Mode: Supported

Description

The drilling cycle commands provide automated drilling operations that combine multiple movements into a single command. These cycles are essential for efficient drilling operations in CNC machining:

  • G81 (Simple Drill Cycle): Performs basic drilling with rapid positioning, controlled drilling, and return
  • G82 (Drill with Dwell): Same as G81 but includes a dwell time at the bottom of the hole
  • G83 (Peck Drilling Cycle): Performs drilling in incremental steps with retraction between cuts

All drilling cycles work with the current plane selection (G17/G18/G19) and can be repeated multiple times using the L parameter. The cycles automatically handle positioning, drilling, and return operations. Return behavior is controlled by G98/G99 commands.

Syntax

G81 X[pos] Y[pos] Z[depth] R[retract] F[feedrate] L[repeat]
G82 X[pos] Y[pos] Z[depth] R[retract] F[feedrate] P[dwell] L[repeat]
G83 X[pos] Y[pos] Z[depth] R[retract] F[feedrate] Q[peck] P[dwell] L[repeat]

Parameters

ParameterDescriptionUsed InExample
X, YDrilling position coordinates in working planeAll cyclesX10 Y20
ZFinal drilling depth (bottom of hole)All cyclesZ-5.0
RRetract position (safety height above workpiece)All cyclesR2.0
FDrilling feedrate (units per minute)All cyclesF100
PDwell time at bottom of hole (milliseconds)G82, G83P500
QPeck drilling depth increment per cutG83Q1.0
LNumber of repetitions (L1 = 2 holes, L2 = 3 holes, etc.)All cyclesL3

Note: X, Y, Z, R, and F parameters are required for all drilling cycles. P and Q parameters are optional and used only by specific cycles as indicated.

Drilling Cycle Types

G81 - Simple Drill Cycle

The basic drilling cycle that performs rapid positioning to the XY coordinates, rapid move to R position, controlled drilling to Z depth, and return according to the current return mode.

Operation sequence:
  1. Rapid move to XY position
  2. Rapid move to R position
  3. Feed to Z depth at specified feedrate
  4. Return to initial position or R position

G82 - Drill with Dwell

Similar to G81 but includes a dwell time at the bottom of the hole.

Operation sequence:
  1. Rapid move to XY position
  2. Rapid move to R position
  3. Feed to Z depth at specified feedrate
  4. Dwell for P milliseconds
  5. Return to initial position or R position

G83 - Peck Drilling Cycle

Advanced drilling cycle that breaks deep holes into smaller increments with chip evacuation.

Operation sequence:
  1. Rapid move to XY position
  2. Rapid move to R position
  3. Feed down by Q depth increment
  4. Rapid retract to R position (chip clearing)
  5. Repeat steps 3-4 until full Z depth is reached
  6. Optional dwell at final depth if P is specified
  7. Return to initial position or R position

Return Mode Control

Drilling cycles support two return modes that control where the tool moves after completing each drilling operation:

G98 - Return to Initial Position

Returns the tool to the Z coordinate where the drilling cycle was started.

G98
G81 X10 Y10 Z-5 R2 F100

G99 - Return to R Position

Returns the tool to the R retract position.

G99
G81 X10 Y10 Z-5 R2 F100

For detailed information about return modes, see the G98/G99 - Drill Cycle Return Modes.

Plane Selection Support

Drilling cycles work with all three coordinate planes. The drilling axis is automatically determined by the current plane selection:

PlaneWork AxesDrill AxisCommon Use
G17 (XY)X, Y positioningZ drillingStandard vertical drilling
G18 (ZX)Z, X positioningY drillingSide drilling operations
G19 (YZ)Y, Z positioningX drillingFront/back drilling

Examples

G81 - Basic Drilling

; Select XY plane for standard drilling
G17
; Drill a hole at X10, Y20 to depth Z-5 with retract at R2
G81 X10 Y20 Z-5 R2 F100
Creates a simple hole with rapid positioning and controlled drilling.

G82 - Drilling with Dwell

; Drill with 500ms dwell for finishing
G82 X15 Y25 Z-8 R3 F80 P500
Drills hole and dwells for 500ms at the bottom for a clean finish.

G83 - Peck Drilling

; Deep hole with 1mm peck increments
G83 X30 Y40 Z-15 R5 F60 Q1.0
Drills 15mm deep hole in 1mm increments, retracting between each cut for chip evacuation.

Repetition with L Parameter

; Drill 4 holes total (L3 means 3 additional = 4 total)
G81 X0 Y0 Z-4 R2 F100 L3
The L parameter creates multiple drilling operations at each specified position.

Different Plane Drilling

; Switch to ZX plane for side drilling
G18
; Drill horizontally in Y direction
G83 Z10 X20 Y-8 R-2 F50 Q0.5
; Return to XY plane
G17
Demonstrates drilling in different orientations using plane selection.