G-code reference
G76 G-Code: Threading Cycle (Lathe) / Fine Boring (Mill)
Threading Cycle (Lathe) / Fine Boring (Mill) — Lathe: Fanuc two-line multiple-pass threading cycle with automatic depth reduction and infeed angle. Mill: fine boring that orients the spindle and shifts the…
| Property | Value |
|---|---|
| Code | G76 |
| Function | Threading Cycle (Lathe) / Fine Boring (Mill) |
| Modal group | 00/09 |
| Type | One-shot (non-modal) — active only in its own block |
| Used on | Mills and lathes |
| Syntax | Lathe: G76 P(m r a) Q(Δdmin) R(d)
G76 X_ Z_ R(i) P(k) Q(Δd) F(L) |
What does G76 do?
Lathe: Fanuc two-line multiple-pass threading cycle with automatic depth reduction and infeed angle. Mill: fine boring that orients the spindle and shifts the bar away from the wall before retracting, leaving no scratch.
G76 is a one-shot code: it only acts in the block where it is written, and the previously active modal codes take over again afterwards.
Syntax and parameters
Lathe: G76 P(m r a) Q(Δdmin) R(d)
G76 X_ Z_ R(i) P(k) Q(Δd) F(L)| Address | Meaning |
|---|---|
P (line 1) | mm rr aa: finishing passes, chamfer, infeed angle (e.g. 010060) |
Q (line 1) | Minimum depth of cut (µm) |
R (line 1) | Finish allowance |
X | Thread minor diameter (ext.) |
P (line 2) | Thread height in µm |
Q (line 2) | First pass depth in µm |
F | Lead |
G76 example program
(M20x2.5 external)
G00 X22.0 Z5.0
G76 P010060 Q50 R0.02
G76 X16.933 Z-30.0 P1533 Q400 F2.5▶ Open this example in the G-code viewer
Tips and common mistakes
- Use our Thread Calculator to compute X, P and Q for any metric or UN thread.
- Mill G76 requires spindle orientation (M19) and Q shift direction set correctly.
Controller compatibility
G76 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.
Related codes
- G92 — Coordinate System Setting (Mill) / Threading Cycle (Lathe)
- G32 — Thread Cutting (Single Pass, Lathe)
- G86 — Boring Cycle (Spindle Stop, Rapid Out)