Example program · Mill

Peck Drilling a Hole Grid (G83) — G-Code Example

Drills a 3 × 2 grid of 8 mm holes, 40 mm deep, in steel with G83 full-retract pecking.

By cnccode · Updated

Drills a 3 × 2 grid of 8 mm holes, 40 mm deep, in steel with G83 full-retract pecking.

ItemValue
MachineCNC mill / machining centre (Fanuc-style)
UnitsMetric (G21)
Lines17

Program

G-code
O1005 (G83 GRID 8 MM X 40 DEEP)
G21 G17 G40 G49 G80 G90
T5 M06 (8 MM HSS-CO DRILL)
G54 G00 X10. Y10.
S800 M03
G43 H05 Z25. M08
G99 G83 Z-42.4 R2. Q8. F100.
X30.
X50.
Y30.
X30.
G98 X10.
G80
M09
G91 G28 Z0
G90
M30

▶ Simulate in the G-code viewer

How it works

  • Z-42.4 adds 0.3 × D for the 118° point to reach full diameter at 40 mm.
  • G99 returns to R between holes; the last hole uses G98 to go back to the initial plane.
  • Q8 = 1 × D pecks for steel.

Codes used in this program

Always check feeds, speeds, offsets and clearances for your own machine and tooling, and prove new programs with single block and reduced rapid.

More milling programs