CNC programming and alarms

G72 facing cycle explained: Fanuc lathe, G-code system A

Fanuc CNC lathe, G-code system A (Group A G-codes): G72 roughs a 1.500 in diameter stub, 0.400 in long, from 3.000 in bar by cutting across the face, 0.050 in per pass, then G70 finishes it.

Technical review pending. Formulas and values are cited. This notice comes down after a machinist review.

%
O0072 (G72 FACING CYCLE, 3.000 BAR, 1.500 STUB)
N10 G20 G40 G99 (INCH, TNRC OFF, FEED PER REV)
N20 T0101 (OD TURNING TOOL, 1/32 NOSE RADIUS)
N30 G50 S2000 (SPINDLE LIMIT 2000 RPM)
N40 G96 S400 M03 (CONSTANT SURFACE SPEED 400 SFM)
N50 G00 X3.100 Z0.050 M08 (CYCLE START POINT)
N60 G72 W0.050 R0.020 (DEPTH PER PASS, RETRACT)
N70 G72 P80 Q120 U0.010 W0.005 F0.010 (PROFILE, ALLOWANCES, ROUGH FEED)
N80 G00 Z-0.400 (PROFILE START, Z ONLY)
N90 G01 X1.500 F0.004 (SHOULDER FACE)
N100 Z-0.030 (1.500 DIAMETER)
N110 X1.440 Z0. (0.030 X 45 CHAMFER)
N120 X1.340 Z0.050 (CHAMFER LINE EXTENDED TO START Z)
N130 G70 P80 Q120 (FINISH PASS)
N140 G00 X4.000 Z2.000 M09
N150 M05
N160 M30
%

The bar is 3.000 in (76.20 mm) in diameter and already faced at Z0. The finished stub is 1.500 in (38.10 mm) in diameter from Z0 to Z-0.400, with a 0.030 in x 45° chamfer on the front edge and the shoulder face at Z-0.400 running out to the bar diameter. Feeds and the 400 SFM surface speed are starting points; take them from the insert maker's data.

Source: FANUC lathe (T series) operator's manual, Series 0i, multiple repetitive cycles G72 and G70 (G-code system A), summarized, not reproduced; Machinery's Handbook (surface finish, cutting speed)

Line by line

G72 facing program, block by block
BlockWhat it does
%Tape start. Some controls and DNC software need it; others ignore it.
O0072 (G72 FACING CYCLE, 3.000 BAR, 1.500 STUB)Program number and a comment naming the job.
N10 G20 G40 G99 (INCH, TNRC OFF, FEED PER REV)Inch mode, tool nose radius compensation off, feed per revolution. G99 is feed per rev in G-code system A.
N20 T0101 (OD TURNING TOOL, 1/32 NOSE RADIUS)Tool 1 with offset 1. Use your own tool and offset numbers.
N30 G50 S2000 (SPINDLE LIMIT 2000 RPM)In G-code system A, G50 with an S word caps spindle speed at 2,000 RPM while constant surface speed is on.
N40 G96 S400 M03 (CONSTANT SURFACE SPEED 400 SFM)Constant surface speed, 400 SFM (surface feet per minute), clockwise. 400 SFM is a placeholder; take SFM from the insert maker's data.
N50 G00 X3.100 Z0.050 M08 (CYCLE START POINT)Rapid to the cycle start point, 0.050 in clear of the bar on the radius and 0.050 in off the face. Coolant on. The cycle returns here after each pass and at the end.
N60 G72 W0.050 R0.020 (DEPTH PER PASS, RETRACT)First G72 line. W is the depth of cut per pass along Z, 0.050 in. R is the retract off the cut face after each pass, 0.020 in.
N70 G72 P80 Q120 U0.010 W0.005 F0.010 (PROFILE, ALLOWANCES, ROUGH FEED)Second G72 line. P and Q are the first and last block numbers of the finished profile (N80 to N120). U is the finish allowance on X, 0.010 in on diameter (0.005 in per side). W is the finish allowance on the Z faces, 0.005 in. F is the roughing feed, 0.010 IPR (inches per revolution).
N80 G00 Z-0.400 (PROFILE START, Z ONLY)First profile block. In a G72 type I profile this block moves Z only. The tool sits at X3.100, outside the bar.
N90 G01 X1.500 F0.004 (SHOULDER FACE)Shoulder face from the bar diameter in to 1.500 in. F0.004 is the finishing feed: G72 ignores F, S and T inside the profile, and G70 uses them.
N100 Z-0.030 (1.500 DIAMETER)The 1.500 in diameter, toward the face.
N110 X1.440 Z0. (0.030 X 45 CHAMFER)0.030 in x 45° chamfer: 0.030 in on the radius, 0.030 in along Z.
N120 X1.340 Z0.050 (CHAMFER LINE EXTENDED TO START Z)The chamfer line carried 0.050 in past the face to the start Z, in air, so the profile closes at the start point level.
N130 G70 P80 Q120 (FINISH PASS)Finishing cycle over the same blocks, N80 to N120, at F0.004, then back to the start point.
N140 G00 X4.000 Z2.000 M09Rapid clear. Coolant off.
N150 M05Spindle stop.
N160 M30End of program and rewind.
%Tape end.

Where the numbers come from

Roughing passes on the shoulder

depth to rough = 0.400 - 0.005 = 0.395 in; passes = 0.395 / 0.050 = 7.9, so 8 cutting passes, the last 0.045 in

Symbol key
SymbolMeaningUnit
0.400Shoulder depth from the face, Z0 to Z-0.400in
W (second line)Finish allowance on the Z faces, 0.005in
W (first line)Depth of cut per pass along Z, 0.050in

The first 0.050 in step from the start point at Z0.050 only brings the tool to the face at Z0, so the cutting passes start below the face. Roughing leaves the diameter at 1.500 + 0.010 = 1.510 in and the shoulder at Z-0.400 + 0.005 = Z-0.395. How the control splits the last step varies by control and series.

Stock per side is (3.000 - 1.500) / 2 = 0.750 in on the radius over a 0.400 in length: short in Z, deep in X. That is the job G72 suits. G71 would take many long passes along Z for the same step.

Spindle speed under constant surface speed

RPM = (SFM x 12) / (pi x D) = (400 x 12) / (3.1416 x 3.100) = 493 RPM at X3.100

Symbol key
SymbolMeaningUnit
RPMSpindle speedrev/min
SFMSurface speed set by G96 S400ft/min
DDiameter the tool is cutting at (the X value)in

At X1.500 the spindle runs 1,019 RPM and at X1.340 it runs 1,140 RPM, so this program never reaches the 2,000 RPM cap from G50 S2000.

Theoretical finish from the G70 pass

Ra = f^2 / (32 x r) = 0.004^2 / (32 x 0.03125) = 0.000016 / 1.0 = 0.000016 in = 16 µin (0.41 µm)

Symbol key
SymbolMeaningUnit
RaTheoretical roughness averagein
fFinishing feed, F0.004in/rev
rTool nose radius, 1/32 = 0.03125in

The actual finish runs rougher than the theoretical value with tool wear, chatter or built-up edge. The surface finish calculator runs the same formula for other feeds and nose radii.

Parameter notes

Setup notes for the next shift

  • W means two things: depth per pass on the first G72 line, Z finish allowance on the second. Mixing them up is the common G72 error.
  • For a type I profile, the profile changes in one direction on each axis: from P to Q, X never increases and Z never decreases. Check the control manual for type II (pockets).
  • The signs of U and W set which side the allowance goes on. Positive U and W here leave stock on the outside diameter and on the faces toward the start point.
  • TNRC (tool nose radius compensation) is off (G40), so the chamfer comes out short by the nose radius effect. This profile runs away from the chuck (N100 feeds +Z along the 1.500 in diameter), so the tool sits on the left of the path and compensation is G41, not the G42 used for OD turning toward the chuck. Use G41, or compensate by hand.
  • Constant surface speed (G96) suits facing. Keep a G50 spindle cap ahead of it every time.
  • The 400 SFM, F0.010 roughing feed and F0.004 finishing feed are placeholders. On a light lathe, start at the low end of the insert maker's range.

Variations for other controls

FAQ

What do W and R mean on the first G72 line?

W is the depth of cut per pass along Z, 0.050 in in this example. R is the retract off the cut face after each pass, 0.020 in.

Why does W appear on both G72 lines?

On the first line W is the depth per pass (0.050 in). On the second line W is the finish allowance left on the Z faces (0.005 in). Mixing them up is the common G72 error.

Should you use G71 or G72?

Rule of thumb: G71 cuts along Z and suits long parts with shallow steps; G72 cuts across the face and suits short parts with big diameter changes, like this 0.400 in long step that is 0.750 in deep on the radius.

Does G72 make the finish pass?

No. G72 roughs to the U and W allowances. G70 P80 Q120 then runs the profile at the finishing feed, F0.004.

Why put G50 S2000 ahead of G96?

Under constant surface speed the RPM rises as X gets smaller. 400 SFM at X0.250 would ask for 6,112 RPM. G50 S2000 caps the spindle at 2,000 RPM. This program peaks at 1,140 RPM at X1.340, under the cap.

How many roughing passes does the example take?

8 cutting passes at 0.050 in, the last one 0.045 in, leaving 0.005 in on the shoulder face for G70. How the control splits the last step varies by control and series.

Last updated