← Back to CNC Programming

Worked Project: Stepped Shaft

A Ø40×100 mm bar stock, faced to establish Z0, then rough-turned and finish-turned to a two-step profile (Ø30 and Ø36). This project covers facing, setup, Haas single-line G71 roughing, and G70 finishing.

Concept

We machine the front end of a Ø40×100 bar. The finished part has two diameters: Ø30 from Z0 to Z−20, and Ø36 from Z−20 to Z−40. We do not part off or turn the back — this setup completes only the front contour.

ItemClassroom model
Raw stockØ40 × 100 mm; axial range Z−99 to +1
Finished datumFinal face at Z0 (1 mm stock to remove from original face at +1)
Chuck jaw frontZ−55; gripping from Z−99 to Z−55 (44 mm grip length)
Original projection56 mm from jaw front to stock end; 55 mm after facing
Front sectionØ30, Z0 to Z−20
Rear sectionØ36, Z−20 to Z−40
Retained zoneZ−40 to Z−55 (15 mm gap, not machined)
TolerancesØ30/Ø36 ±0.05; shoulder position ±0.10

Tool: T0101, a right-hand turning/facing tool with 0.4 mm nose radius. X is programmed in diameter. The virtual tool tip defines the geometry offset; the actual r0.4 nose leaves a small radius at the shoulder root — this is allowed and is not a sharp internal corner.

Why It Matters

The facing operation is not optional: it establishes the axial datum (Z0). If you skip facing and set Z0 on the rough stock face at +1, every axial dimension is off by 1 mm. The 44 mm grip length and 55 mm projection are classroom geometry assumptions — real gripping force, jaw envelope, and toolholder clearance must be verified on the actual machine.

Setup geometry (px=440+4Z, radial 2px/mm) CHUCK (grip Z-99 to Z-55) Ø40 stock Ø36 Ø30 Z0 (face) orig Z+1 Z-55 jaw Z-40 Z-20

How It Works

Two Facing Cuts

We take two 0.5 mm facing passes to remove the 1 mm stock from the original face at Z+1 down to Z0:

  1. Approach at X42 Z2 (outside the stock).
  2. Feed to Z0.5, then face from X42 to X−0.5 (0.5 mm cut).
  3. Retract +Z to 2, then return X42 (do not radial-retract in the cut).
  4. Feed to Z0, face from X42 to X−0.5 (remaining 0.5 mm).
  5. Retract +Z to 2, return X42, ready for roughing.

At S1000 and F0.10 mm/rev, ideal feed = 100 mm/min. Each facing pass traverses X42.5 radially (21.25 mm actual radius), taking about 12.75 seconds of ideal cutting time — not including acceleration, approach, or center-cutting effects.

Haas Single-Line G71 Roughing

We use the Haas single-line format:

G71 P10 Q20 D1.0 U0.4 W0.1 F0.20

The P-Q contour defines the finished shape (Type I, no grooves):

N10 G00 X30.
G01 Z0. F0.10
Z-20.
X36.
Z-40.
N20 X42.

G70 Finishing

After G71, the same T0101 runs G70 at S1200 to cut the finished profile at F0.10. Rough diameter after G71: Ø30.4 and Ø36.4 (U0.4 diameter allowance). Final: Ø30 and Ø36.

Nose Radius at Shoulder (r0.4, local enlargement: 20px = 0.4mm) tangent tangent r0.4 virtual tip

Clearance and Retraction

After machining, retract in two axes: first to X100 (clear of OD), then to Z100 (away from chuck). These X100/Z100 numbers are classroom safe positions for this model — verify on your machine. The toolholder's rearward Z envelope is 8 mm, so at Z−40 the tool body reaches Z−48, leaving 7 mm to the jaw front at Z−55.

G71 Type I Roughing (X-Z schematic, r=X/2) Z r Stock r=20 (Ø40) r15 (Ø30) r18 (Ø36) Z0 Z-20 Z-40 Selected cutting segments (not full G71 simulation) W0.1 = 0.1mm axial finish stock

Setup Procedure Summary

  1. Mount raw Ø40 bar in 3-jaw chuck, project 56 mm from jaw face.
  2. Install T0101 right-hand turning tool in turret station 1.
  3. Set G54: X offset at bar center (touch off OD and set diameter), Z offset by touching the original rough face and entering Z+1 (the facing program then cuts 1 mm to reach Z0).
  4. Set T0101 geometry offsets: X and Z geometry for the virtual tool tip, plus nose radius 0.4 and tip direction number (for this right-hand OD tool, direction 3). Wear offsets are adjusted during inspection.
  5. Test air cut at rapid override 25% before full run.
  6. Face, then run G71 roughing, inspect diameters, then G70 finishing.

Example: Complete Program

O0027 (STEPPED SHAFT PROJECT)
G21 G18 G97 G99
T0101 (RIGHT-HAND TURNING/FACING TOOL, R0.4)
G54 S1000 M03

(FACING PASS 1 - REMOVE 0.5mm)
G00 X42. Z2.
G01 Z0.5 F0.10
G01 X-0.5
G00 Z2.
G00 X42.

(FACING PASS 2 - REMOVE REMAINING 0.5mm TO Z0)
G01 Z0 F0.10
G01 X-0.5
G00 Z2.
G00 X42.

(ROUGHING CYCLE)
G71 P10 Q20 D1.0 U0.4 W0.1 F0.20
N10 G00 X30.
G01 Z0. F0.10
Z-20.
X36.
Z-40.
N20 X42.

(FINISHING CYCLE)
S1200 M03
G70 P10 Q20

(RETRACT)
G00 X100.
G00 Z100.
M05
M30

Common Mistakes

Practice

1. After G71 with U0.4, what are the rough diameters?

Show answer

Ø30.4 and Ø36.4. U0.4 is diameter allowance, so each rough diameter is 0.4 mm over finished.

2. You measure Ø30.03 and Ø36.07. Are both acceptable at ±0.05?

Show answer

Ø30.03 is within 30.00±0.05 (29.95–30.05) — OK. Ø36.07 is above 36.05 — out of tolerance by 0.02 mm.

3. If the toolholder rearward envelope is 8 mm behind the tip, and the jaw front is at Z−55, what is the minimum gap when machining to Z−40?

Show answer

Tool body reaches Z = −40 − 8 = −48. Gap to jaw at Z−55 is 7 mm. This is a geometric model; verify the actual toolholder envelope on the machine.

Sources