Turning Coordinates & Toolpaths
CNC lathes work differently from mills: the part rotates, the tool moves in X and Z, and X is programmed in diameter. This page covers the lathe coordinate system, diameter programming, turret tool selection, and basic turning operations.
Concept
A CNC lathe has two linear axes: X (radial, in and out from the spindle centerline) and Z (axial, along the spindle). Unlike a milling machine where the workpiece stays still and the tool moves in X/Y/Z, on a lathe the workpiece rotates and the cutting tool moves in X and Z. The spindle chuck holds and rotates the part; the turret holds the tools.
The most important concept in lathe programming: X is programmed in diameter, not radius. When you write X40, the tool tip is positioned so it cuts a 40 mm diameter, not 40 mm from center. This means the actual radial travel from X50 to X40 is only 5 mm (the radius changes by 5 mm, but the diameter changes by 10 mm).
Z0 is typically set on the front finished face of the part. Positive Z moves the tool along the spindle axis away from the chuck; negative Z moves it toward the chuck into the part. Cutting along the part length happens in the negative Z direction.
Why It Matters
Programming X as if it were radius is the #1 beginner mistake on lathes. If you write X20 thinking you want a 20 mm radius (40 mm diameter), the machine actually moves to a 20 mm diameter — cutting the part in half. Every X value is a diameter, and every radial depth of cut is half the X difference between two positions.
Z direction is the second trap. On a mill, Z negative goes down into the part. On a lathe, Z negative goes along the part toward the chuck. Writing Z50 instead of Z−50 moves the tool away from the part — no cut, and the tool does not reach the expected position; verify the path before running.
How It Works
Diameter Programming in Detail
| Action | X Move | Diameter Change | Radial Depth |
|---|---|---|---|
| OD turn from Ø50 to Ø44 | X50 → X44 | 6 mm smaller | 3 mm |
| Face cut to center | X50 → X0 | 50 to 0 | 25 mm |
| Take a 2 mm deep roughing pass | X50 → X46 | 4 mm smaller | 2 mm |
| Finish to Ø30 | X32 → X30 | 2 mm smaller | 1 mm |
The radial depth of cut is always (X_start − X_end) / 2. When you plan a 2 mm depth of cut, the X coordinate drops by 4 mm.
Basic Turning Operations
- Facing — tool feeds from outside diameter toward center (X decreasing) at Z0. Produces a flat front face. Often the first operation after gripping raw stock.
- OD (outside diameter) turning — tool feeds along Z at a fixed X, reducing the outer diameter. Roughing takes multiple passes; finishing takes one light pass.
- ID (inside diameter) boring — tool feeds inside a pre-drilled hole at a fixed X, enlarging the bore. X increases as the bore gets larger.
- Taper turning — X and Z move simultaneously to produce an angled surface.
- Grooving and parting — see page 21.
- Threading — see page 22.
Turret and Tool Selection
On a CNC lathe, tools are mounted on a turret that indexes directly to the next tool station. There is no automatic tool changer (M06) like on a mill. Instead, a T code both selects the tool and activates its offset. T0101 means tool station 1, offset register 1. The first two digits select the turret position; the last two digits select the tool offset (geometry and wear).
Common practice: T0101 = OD turning tool, T0202 = facing tool, T0303 = drill, T0404 = boring bar, T0505 = grooving/parting tool, T0606 = threading tool. The offset numbers must match the tool being used; T0102 selects tool 1 with offset register 2, which is correct only when that register has been calibrated and chosen intentionally.
Spindle Control on Lathes
Lathe spindles use G97 S (constant RPM) or G96 S (constant surface speed, CSS). Under G96, n = 1000 vc / (πD): as diameter D shrinks, RPM rises. Example at vc = 100 m/min: at D = 50 mm, n = 636.6 RPM; at D = 25 mm, n = 1273.2 RPM. A G50 max-RPM clamp caps the spindle at a classroom limit (say 2000) so it does not over-speed near center. G97 holds a fixed RPM regardless of diameter; threading always uses G97. The main example on this page uses G97 for simplicity.
Example
Worked example (classroom assumptions): Ø45 raw bar in a chuck, front jaw face at roughly Z−65, projecting past the tool clearance needed to reach Z−50. Operations: (1) face the front, (2) rough turn OD Ø45→Ø41 over Z0→Z−50, (3) finish to Ø39.5. Z0 on the front face after facing. Rough S1000 F0.2 mm/rev (2 mm radial); finish S1500 F0.1 (0.75 mm radial). This is a teaching program, not a full setup sheet; confirm jaw position, bar projection, and tool envelope on the machine.
O0019 (TURNING FUNDAMENTALS EXAMPLE)
G21 G18 G97 G99 G40 (known state: mm, XZ plane, RPM, feed/rev, no comp)
G54 (work offset already calibrated)
T0101 M03 S1000 (OD tool, forward rotation confirmed)
G00 X47. Z2. (approach: X outside stock, Z off face)
(FACE)
G01 Z0 F0.2
X-1.0 F0.15 (feed past center; endpoint assumes insert geometry, center height, and allowed travel are confirmed)
G00 Z1. (+Z off face first, one axis)
G00 X47. (then X outward to verified clearance)
(ROUGH TURN O45 TO O41, Z-50)
G00 X46. Z2.
G01 Z0 F0.2
X41.0 (rough to O41, 2 mm radial depth)
Z-50. (turn along Z to -50 mm)
G00 X47. (X clear first, outside stock)
G00 Z2. (then Z back)
(FINISH TURN TO O39.5)
S1500
G00 X39.5 Z2.
G01 Z0 F0.1
Z-50. (finish pass, 0.75 mm radial)
G00 X50. (X out first)
G00 Z100. (then Z to clear)
M30
Feed rate calculation: Rough: S1000 F0.2 = 200 mm/min, 50 mm = 15 s. Finish: S1500 F0.1 = 150 mm/min, 50 mm = 20 s. Times cover the 50 mm cut only; approach, retract, and acceleration are excluded.
Approach and Retract Sequence on a Lathe
A safe lathe approach on OD work: rapid to a position above and clear of the stock (X larger than stock, Z off the face), then feed toward the cut. After an OD pass at Z−50, retract X out past the shoulder first, then retract Z back to the start plane; this avoids rubbing the finished surface on the Z return. On ID boring, the retract order reverses: move X inward to clear the bore, then Z out. On facing, move +Z away from the face before returning X outward.
ID Boring vs OD Turning
On an OD turn, X decreases as the part gets smaller. On ID boring, X increases as the bore gets larger, and the tool enters the hole at a smaller X, then bores out. The radial depth formula is the same: (X_end − X_start)/2. Boring bar deflection and chatter are the limit, not the machine power; keep boring bar overhang as short as the part allows.
Work Offsets on a Lathe
On a Haas lathe, a common G54 work offset selects the part datum, and each T code also carries a tool geometry and wear offset. Z0 is set by touching the front face; X0 is the spindle centerline, set by touching an OD and entering the measured diameter. The program selects which offset set it uses; that set must be calibrated. T0101 means tool station 1 plus offset register 1; using a different register (T0102) is intentional when a second setup needs its own values, not always an error.
Common Mistakes
- Treating X as radius — X40 means 40 mm diameter. Radial depth = (X_start − X_end)/2.
- Z direction reversed — cutting into the part (along the spindle) is negative Z, not positive.
- Forgetting the second offset number — T01 selects the tool but T0101 also activates the offset. T01 alone may not load geometry.
- Not retracting X before Z retract — after turning to Z-50, retract X away from the part before moving Z, or the tool rubs along the finished surface.
- Using an arbitrary negative X endpoint when facing — the required endpoint depends on insert geometry, tool orientation, center height, and the machine's permitted travel. Verify the toolmaker's guidance and the actual setup. X−1 in this classroom example is an assumed endpoint, not a universal rule for removing a center nub.
Practice
1. X moves from Ø50 to Ø44. What is the radial depth of cut?
Ans
(50 − 44) / 2 = 3 mm radial depth. The diameter reduces by 6 mm.
2. Where is Z0 typically set?
Ans
On the finished front face of the part, after facing. Positive Z is away from the chuck; negative Z goes into the part.
3. Why is there no M06 on a lathe?
Ans
The turret indexes tools directly. T0202 rotates the turret to tool station 2 and activates offset register 2 in one command.
4. You want a 2 mm deep roughing pass on Ø50 stock. What X do you program?
Ans
2 mm radial depth = 4 mm diameter reduction. X goes from 50 to 46. Program X46. for the pass.
Contour and Nose Radius on a Lathe
Lathe tools have a corner nose radius (commonly 0.4 or 0.8 mm). Programmed coordinates refer to the theoretical sharp corner, but the cutting edge contacts the part on the radius. Nose-radius compensation in the T offset corrects the contour error that this radius would otherwise cause on tapers and radii; it is not a command that rounds corners automatically. This is separate from mill cutter compensation.
Chuck Clearance and Part-off
Program Z travel so the tool never reaches the chuck jaws: leave at least the jaw height plus a margin based on the actual setup. Part-off depth, feed, and catcher arrangement depend on the blade, tool height, and fixture; see page 21. On facing, feed slightly past center to clean the face; the exact past-center amount depends on the nose radius and tool height.
Spindle Direction and Tool Orientation
M03 is forward and M04 reverse on a Haas lathe. Which one cuts correctly depends on the machine, main/sub-spindle configuration, and tool mounting. This page's example assumes a forward-rotation setup already verified on the machine; confirm the cutting edge engages rather than rubs before running.
Metric vs Inch on a Lathe
G21 selects mm, G20 selects inches. On a lathe, X in inch is diameter in inch. Mixing G20 and G21 mid-program scales every move by 25.4 and is a common crash cause. The startup block always sets G21 explicitly.
Block Trace for the Worked Program
| Block | X (diameter) | Z | Action |
|---|---|---|---|
| G00 X47 Z2 | 47 | 2 | outside stock, off face |
| G01 Z0 F0.2 | 47 | 0 | approach face |
| X-1 F0.15 | −1 | 0 | face past center |
| G00 Z1 / X47 | 47 | 1 | +Z off face, then X out |
| G01 Z0 / X41 / Z-50 | 41 | −50 | rough OD, 2 mm radial |
| G00 X47 / Z2 | 47 | 2 | X clear first, then Z back |
| S1500 / G00 X39.5 Z2 / G01 Z0 / Z-50 | 39.5 | −50 | finish OD, 0.75 mm radial |
Why X Is Diameter on a Lathe
Programming X in diameter matches how a machinist measures a turned part with a caliper. If you move the tool 5 mm radially, the diameter changes by 10 mm, so writing X46 from X50 means a 2 mm depth of cut. This is a convention, not a physical law; some controls can switch to radius programming, but diameter is the default on Haas.
Work Offset and Tool Offset Together
The machine only knows its own X/Z positions. G54 tells it where the part origin is; each T offset tells it where that tool's tip is. Both must be set, or coordinates land in the wrong place. When you change a tool, call the T that carries its geometry; when you change a setup, check G54 is the right one. The startup block sets known units and plane so neither offsets nor coordinates drift.
Axial Reach Is Not Tool Clearance
The jaw sits near Z−65 and the cut ends at Z−50, leaving about 15 mm axial distance. That number does not by itself prove the turret, tool holder, and tool post clear the chuck; the tool envelope must be checked on the machine. A 15 mm reach can still bind if the holder is long or the tool post is wide.
First-Part Check and Offset Correlation
After the first rough and finish passes, stop and measure the turned diameter and shoulder length. Compare the rough diameter against the planned O41, not against a vague expectation. Before changing any wear offset, check the program target, the U/W allowance, the G54 datum, the tool geometry offset, the measurement itself, and tool deflection. If the finish diameter is 39.4 rather than 39.5, that part is already undersize and cannot be restored; for the next part, adjust X wear by 0.1 in the appropriate field and confirm the sign convention on the control.
Two Radial Depths, Two Feeds
The rough step removes 2 mm radial from O45 to O41 at F0.2; the finish step removes 0.75 mm radial to O39.5 at F0.1. The smaller finish depth pairs with higher spindle speed and lighter feed for surface finish. The tool tip coordinates describe the programmed path; the holder, turret, and chuck envelope are separate clearance checks that must be made on the machine.