Home › G-codes › Mach3 Mach4 › G81
G81 Drill cycle
Mach3 Mach4 G-code · Mill
Feeds to Z and rapids out. The basic drill and spot cycle.
Format
G81 X Y Z R [L] F
Addresses
| Address | What it does |
|---|---|
X Y | Hole position |
Z | Hole bottom |
R | Retract plane |
L | Repeat count |
F | Feed rate |
How it works
Modal, canned cycle group. Cancel with G80.
Example program
G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
T1 M6 (SPOT DRILL)
S2500 M3 (SPINDLE ON)
G0 X1.0 Y-1.0 (FIRST HOLE)
…
T1 M6 (SPOT DRILL)
S2500 M3 (SPINDLE ON)
G0 X1.0 Y-1.0 (FIRST HOLE)
…
The full 10-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- In G91 Z is measured from R, not from the start.
- Cancel with G80 on its own line. A left over cycle drills at the next XY move.
- R and Z are work coordinates in G90. L repeats the hole, mostly used in G91.
Related codes
G81 on other controls
The same number can mean something different on another control.
| Control | Meaning |
|---|---|
| Fanuc | Drilling cycle |
| Haas NGC | Drill canned cycle |
| Mazak (EIA) | Drilling cycle, spot drill |
| Okuma OSP | Drill or spot cycle |
| Mitsubishi M70 M80 | Drilling cycle |
| Brother Speedio | Drilling cycle |
| Fagor 8055 8065 | Drilling canned cycle |
| LinuxCNC Tormach | Drill cycle |
| Centroid CNC12 Acorn | Drilling cycle |
| Hurco WinMax (NC) | Drill or spot drill cycle |
| Fadal | Drill, spot drill |
Every G-code for Mach3 Mach4 in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.
Open G81 in the app All Mach3 Mach4 G-codes