G-code Drilling Cycle Generator

Build a complete drilling program for any hole pattern. Pick an operation, dial in the peck schedule down to each individual plunge, and copy clean Fanuc, Haas or GRBL G-code. Always sanity-check generated code on your control before cutting.

Operation
Choose the drilling cycle to generate

Retract fully each peck to clear chips (G83).

Cut

mm

Below stock top

mm/min

Peck schedule

canned G-code
mm
#DepthProgressCut
14
+4
28
+4
312
+4
416
+4
520
+4
5 plunges
sec

Optional

Cross-section
Play the peck cycle or hover a plunge
↑ safe ZR plane48121620
Hover a peck row or depth line to inspect it
Holes
3
Plunges / hole
5
Depth
20 mm
Est. cycle time
31s
approx
Feed travel
60 mm
Program lines
18
1000.nccanned18 lines
1%
2O1000 (DRILLING JOB)
3G90 G94 G17 G21 G54 G40 G49 G80
4(PECK DRILL D6MM DEPTH 20MM)
5T1 M6
6(6MM DRILL)
7S1500 M3
8M8
9G43 H1 Z25.
10G99 G83 X0. Y0. Z-20. R2. Q4. F150
11X25. Y0.
12X50. Y0.
13G80
14G0 Z25.
15M9
16M5
17M30
18%

How the drilling cycles work

Canned cycles vs long-hand

On Fanuc and Haas controls the generator emits compact canned cycles (G81, G82, G83, G73, G85/86/89 and rigid-tap G84). As soon as you customise the peck table, choose a diminishing schedule, mix hole heights or target GRBL, the program is automatically expanded into explicit G0/G1 moves so every plunge is honoured exactly.

The peck table

Start from an even peck increment, switch to a diminishing schedule for deep holes, or hit “Expand & customise” to edit every individual plunge: its depth, how far it retracts and any dwell. Add a deeper final plunge to break through cleanly at the bottom of the material.

Heights and safety

The R plane is a small clearance above the stock where rapid switches to feed. The safe plane sits clear of clamps; choose G98 to return there between holes, or G99 to stay at the R plane for speed on flat parts.

Holes and DXF import

Enter hole coordinates by hand, generate line, grid or bolt-circle patterns, or import a DXF and pick the circles you want to drill. Each hole can carry its own top-of-stock Z for stepped, 3-axis setups.

Generated G-code is a starting point. Verify work offsets, tool lengths, speeds, feeds and retract heights, and dry-run above the part before cutting. Rigid tapping on GRBL requires a spindle-sync build.