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.
| Property | Value |
|---|---|
| Code | G71 |
| Function | Stock Removal in Turning (Roughing Cycle) |
| Modal group | 00 |
| Type | One-shot (non-modal) — active only in its own block |
| Used on | Lathes |
| Syntax | G71 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
G71 U(Δd) R(e)
G71 P_ Q_ U(Δu) W(Δw) F_| Address | Meaning |
|---|---|
U (line 1) | Depth of cut per side |
R | Retract amount |
P Q | Profile start/end block |
U (line 2) | X finishing allowance (diameter) |
W | Z finishing allowance |
F | Roughing feed |
G71 example program
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.
Related codes
- G70 — Finishing Cycle (Lathe)
- G72 — Stock Removal in Facing
- G73 — Pattern Repeating (Lathe) / High-Speed Peck Drilling (Mill)