G71 and G70 explained: rough and finish turning on Fanuc and Haas

G71 and G70 in 90 seconds, run on a Fanuc 0i-TF in NC Proof Turn. Press play to watch.

A lathe part usually starts as round bar and ends as a profile: a chamfer, a few diameters, a taper, a radius, a shoulder. You could program every roughing pass by hand. With G71, you write the finished profile once and the control works out the roughing passes. G70 then runs one finish pass along that same profile. These two cycles are the canned cycles you’ll use most on a CNC lathe, on Fanuc and on Haas.

The profile: from P to Q

You write the finished shape as normal G00/G01/G02/G03 blocks, numbered at the start and the end:

N10 G00 X0.75
G01 Z0. F0.006
X0.875 Z-0.0625
Z-0.75
X1.25
X1.5 Z-1.25
Z-2.
G02 X1.75 Z-2.125 R0.125
G01 Z-2.75
N20 X2.1

P10 points at the first block of the profile and Q20 at the last. The profile starts at the chamfer diameter, cuts the 0.875” diameter, the face up to a taper, the 1.5” diameter, a 0.125” radius into the 1.75” diameter, and finishes above the 2.0” bar. G71 reads these blocks but doesn’t run them one by one. It uses them as the shape to rough down to.

G71 on Fanuc: two lines

Fanuc 0i and most Fanuc-style controls write G71 on two lines:

G00 X2.1 Z0.1
G71 U0.1 R0.02
G71 P10 Q20 U0.02 W0.005 F0.012
  • First line: U = depth of cut per pass, on the radius (0.100” per side here). R = retract after each pass (0.020”).
  • Second line: P and Q are the first and last block of the profile.
  • U = finish allowance in X, on the diameter (0.020” on diameter, so 0.010” per side).
  • W = finish allowance in Z (0.005” on the faces).
  • F = the roughing feed.

The same letter U means two different things on the two lines: depth of cut on the first line, finish allowance on the second. Mixing them up is one of the most common G71 mistakes.

The start point matters. G71 starts its passes from where the tool is when the cycle starts, here X2.1 Z0.1. That point should be just outside the bar and just off the face. The cycle cuts from that diameter down to the profile, and returns there when it’s done.

Feeds inside the profile are skipped while roughing. G71 uses the F on its own line. The F0.006 in the profile is used later, by G70. The same goes for S and T words in the profile.

G71 on Haas: one line

Haas lathes write the whole cycle on one line, with D for the depth of cut:

G00 X2.1 Z0.1
G71 P10 Q20 U0.02 W0.005 D0.1 F0.012

P, Q, U, W and F mean the same as on Fanuc’s second line. D is the depth of cut per pass, a positive radius value. There’s no R word: the retract distance comes from a setting on the control, not the program. If you paste a Fanuc two-line G71 into a Haas program, or a Haas one-line G71 with D into a Fanuc 0i program, NC Proof Turn warns you.

G70: the finish pass

After roughing, the part is left with the U/W allowance on every surface. G70 runs the profile once, this time at the profile’s own feeds:

T0303 (FINISH OD)
G50 S3000
G96 S800 M03
G00 X2.1 Z0.1
G70 P10 Q20

G70 is the same on Fanuc and Haas: just P and Q. It’s usually run with a different tool, a sharper finishing insert, at a higher surface speed. Rapid back to the same start point before G70, and the finish pass follows the profile from N10 to N20 using F0.006. Then the tool returns to the start point.

Tool nose radius compensation. The example has no G41/G42, to keep it short. With a real insert (a 1/32” nose radius, say), the chamfer, taper and radius come out slightly off size unless you turn on G42 before G70 (outside turning) and cancel it with G40 after. See Cutter compensation explained for how compensation works on a mill; the lathe version works the same way, with the nose radius in place of the cutter radius.

The full program, Fanuc and Haas

Here is the whole job: rough with T01 (a CNMG 432), finish with T03 (a VNMG 331), on 2.0” bar with Z0 at the front face.

Fanuc 0i-TF:

%
O01071 (G71 ROUGHING + G70 FINISHING - SHAFT)
(FANUC 0I-TF)
(STOCK DIA 2.0 X 4.0 LONG - Z0 FRONT FACE)
(T01 CNMG 432 - ROUGH OD)
(T03 VNMG 331 - FINISH OD)
G20 G18 G40 G99
G28 U0. W0.
T0101 (ROUGH OD)
G50 S2500
G96 S600 M03
G00 X2.1 Z0.1 M08
G71 U0.1 R0.02
G71 P10 Q20 U0.02 W0.005 F0.012
N10 G00 X0.75
G01 Z0. F0.006
X0.875 Z-0.0625
Z-0.75
X1.25
X1.5 Z-1.25
Z-2.
G02 X1.75 Z-2.125 R0.125
G01 Z-2.75
N20 X2.1
G00 X3. Z1.
G28 U0. W0.
T0303 (FINISH OD)
G50 S3000
G96 S800 M03
G00 X2.1 Z0.1
G70 P10 Q20
G00 X3. Z1. M09
G28 U0. W0.
M30
%

Haas NGC: the same job, with a one-line G71 and Haas tool numbers.

%
O01072 (G71 ROUGHING + G70 FINISHING - SHAFT - HAAS)
(HAAS NGC)
(STOCK DIA 2.0 X 4.0 LONG - Z0 FRONT FACE)
(T01 CNMG 432 - ROUGH OD)
(T03 VNMG 331 - FINISH OD)
G20 G18 G40 G99
G28 U0. W0.
T101 (ROUGH OD)
G50 S2500
G96 S600 M03
G00 X2.1 Z0.1 M08
G71 P10 Q20 U0.02 W0.005 D0.1 F0.012
N10 G00 X0.75
G01 Z0. F0.006
X0.875 Z-0.0625
Z-0.75
X1.25
X1.5 Z-1.25
Z-2.
G02 X1.75 Z-2.125 R0.125
G01 Z-2.75
N20 X2.1
G00 X3. Z1.
G28 U0. W0.
T303 (FINISH OD)
G50 S3000
G96 S800 M03
G00 X2.1 Z0.1
G70 P10 Q20
G00 X3. Z1. M09
G28 U0. W0.
M30
%

Both programs run in NC Proof Turn with no errors or warnings, and they cut the same part.

Type I or Type II: grooves in the profile

So far the profile only climbs: every block moves to a larger diameter or further down Z. That’s Type I, and it’s the default. Now add a groove in the middle of the 1.5” diameter:

X1.5 Z-1.25
Z-1.45
X1.3
Z-1.65
X1.5
Z-2.

The profile now goes down to X1.3 and back up. In Type I, the control rejects that: on Fanuc and on Haas it alarms when the profile doesn’t go one way. NC Proof Turn flags it on the G71 line: “G71 P10: the profile is not monotonic in X/Z. The control will alarm on G71 Type I.”

Type II allows pockets like this, so the passes go into the groove too. You select it in the first block of the profile, by giving it both an X and a Z, even if Z doesn’t move:

  • Fanuc: N10 G00 X0.75 W0. (W0 = no Z motion).
  • Haas: N10 G00 X0.75 Z0.1 (Z at the start position).

Type II still has one rule: the profile must keep going one way along Z. A pocket in X is fine; a profile that goes forward and back in Z isn’t.

Check it before Cycle Start

G71 hides the roughing passes inside one line, so it’s hard to see what the machine will do from the code alone. NC Proof Turn runs the cycle the way the control does and draws every pass on the 3D bar. Before the program goes near the machine, you see:

  • every roughing pass, the 45° retracts and the finish pass on the stock;
  • a Type I profile that isn’t monotonic (the control alarms);
  • a Type II profile that goes back along Z;
  • a finish allowance U or W on the wrong side of the profile, so roughing cuts past the finished size;
  • several roughing passes that cut nothing at all (the start point is too far away);
  • a Fanuc two-line G71 in a Haas program, or a Haas one-line G71 with D in a Fanuc 0i program;
  • a missing first line (no depth of cut) or a missing P / Q block.

G71 and G70 FAQ

What is the difference between G71 and G70? G71 is the roughing cycle: it removes material in passes down to the profile plus a finish allowance. G70 is the finishing cycle: it runs the profile once at the feeds written in the profile blocks.

What do U and W mean in G71? On the Fanuc first line, U is the depth of cut per pass (radius). On the line with P and Q, U is the finish allowance in X (on the diameter) and W is the finish allowance in Z.

How is the Haas G71 different from Fanuc? Haas writes G71 on one line with D for the depth of cut, and the retract comes from a control setting. Fanuc 0i writes it on two lines, with the depth and retract (U and R) on the first line.

Why does my G71 alarm when the profile has a groove? G71 Type I needs a profile that keeps going one way. For a groove or pocket, use Type II by putting both X and Z in the first profile block (W0 on Fanuc, the start Z on Haas).

Does G71 use the feed written in the profile? No. G71 uses the F on its own line; F, S and T words inside the profile are used by G70.

Paste your own G71 into NC Proof Turn and watch every pass before it goes to the machine. The user guide explains the rest of the app.

More from the blog