G-code reference

G71 G-Code: Stock Removal in Turning (Roughing Cycle)

Stock Removal in Turning (Roughing Cycle) — Fanuc two-line roughing cycle along Z. It removes material in passes of depth U until the profile between P and Q is reached, leaving finishing stock.

By cnccode · Updated
PropertyValue
CodeG71
FunctionStock Removal in Turning (Roughing Cycle)
Modal group00
TypeOne-shot (non-modal) — active only in its own block
Used onLathes
SyntaxG71 U(Δd) R(e) G71 P_ Q_ U(Δu) W(Δw) F_

What does G71 do?

Fanuc two-line roughing cycle along Z. It removes material in passes of depth U until the profile between P and Q is reached, leaving finishing stock.

G71 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
G71 U(Δd) R(e)
G71 P_ Q_ U(Δu) W(Δw) F_
AddressMeaning
U (line 1)Depth of cut per side
RRetract amount
P QProfile start/end block
U (line 2)X finishing allowance (diameter)
WZ finishing allowance
FRoughing feed

G71 example program

Example
G00 X52.0 Z2.0
G71 U2.0 R0.5
G71 P10 Q20 U0.4 W0.1 F0.3
N10 G00 X20.0
G01 Z-25.0 F0.12
G02 X30.0 Z-30.0 R5.0
G01 X50.0
N20 Z-50.0

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Type I profiles must be monotonic in X; Type II allows pockets (needs both X and Z in block P).
  • Siemens G71 means metric.
  • Start point must be outside the stock.

Controller compatibility

G71 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 G71 modal?
No. G71 is a one-shot (group 00) code and only acts in the block where it appears.
What does G71 mean in CNC?
G71 means Stock Removal in Turning (Roughing Cycle). Fanuc two-line roughing cycle along Z. It removes material in passes of depth U until the profile between P and Q is reached, leaving finishing stock.
What is the difference between G71 and G70?
G71 is Stock Removal in Turning (Roughing Cycle), while G70 is Finishing Cycle (Lathe). See the G70 page for its syntax and examples.
Can I use G71 on a mill?
Usually not with the same meaning: G71 is documented here for lathes. Check your control manual for the equivalent.