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…

By cnccode · Updated
PropertyValue
CodeG76
FunctionThreading Cycle (Lathe) / Fine Boring (Mill)
Modal group00/09
TypeOne-shot (non-modal) — active only in its own block
Used onMills and lathes
SyntaxLathe: 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

Format
Lathe: G76 P(m r a) Q(Δdmin) R(d)
G76 X_ Z_ R(i) P(k) Q(Δd) F(L)
AddressMeaning
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
XThread minor diameter (ext.)
P (line 2)Thread height in µm
Q (line 2)First pass depth in µm
FLead

G76 example program

Example
(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.

Frequently asked questions

Is G76 modal?
No. G76 is a one-shot (group 00) code and only acts in the block where it appears.
What does G76 mean in CNC?
G76 means 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 bar away from the wall before retracting, leaving no scratch.
What is the difference between G76 and G92?
G76 is Threading Cycle (Lathe) / Fine Boring (Mill), while G92 is Coordinate System Setting (Mill) / Threading Cycle (Lathe). See the G92 page for its syntax and examples.
Can I use G76 on a lathe?
Yes, G76 is used on both mills and lathes, although some parameters differ between them.