Home › G-codes › LinuxCNC Tormach › G81
G81 Drill cycle
LinuxCNC Tormach G-code · Mill
Rapids to R, feeds to Z, then rapids back out. Basic drilling and spot drilling.
Format
G81 X Y Z R [L] F
Addresses
| Address | What it does |
|---|---|
X Y | Hole position |
Z | Hole bottom |
R | Retract plane where feed starts |
L | Repeat count, used with G91 |
F | Feed rate |
How it works
Modal, motion group. Cancel with G80 or another motion code.
Example program
G20 G17 G40 G49 G54 G80 G90 G94 (INCH, SAFE START)
T2 M6 G43 (.201 DRILL)
S2500 M3 M8
G0 X1 Y1 Z0.5
…
T2 M6 G43 (.201 DRILL)
S2500 M3 M8
G0 X1 Y1 Z0.5
…
The full 8-line example is in the app. Example is in inch. Check offsets and clearances first.
Watch out for
- Retract goes to the start height with G98 or to R with G99.
- L repeats the hole. In G91 each repeat steps by X Y. L0 is not allowed.
- Error if cutter compensation is on.
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 |
| Mach3 Mach4 | Drill cycle |
| Centroid CNC12 Acorn | Drilling cycle |
| Hurco WinMax (NC) | Drill or spot drill cycle |
| Fadal | Drill, spot drill |
Every G-code for LinuxCNC Tormach 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 LinuxCNC Tormach G-codes