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.
Retract fully each peck to clear chips (G83).
Cut
Below stock top
Peck schedule
canned G-codeOptional
1%2O1000 (DRILLING JOB)3G90 G94 G17 G21 G54 G40 G49 G804(PECK DRILL D6MM DEPTH 20MM)5T1 M66(6MM DRILL)7S1500 M38M89G43 H1 Z25.10G99 G83 X0. Y0. Z-20. R2. Q4. F15011X25. Y0.12X50. Y0.13G8014G0 Z25.15M916M517M3018%
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.