Haas Lathe (ST) Programming

A Haas ST-series lathe runs the same Next Generation Control as the Haas mills — same screens, same settings philosophy, same Fanuc-style macro layer with #-variables and G65. If you already know the mill side from Haas Programming & Macros, the control itself holds no surprises. What changes is everything specific to turning: a lathe G-code set built on Fanuc’s system-A turning cycles, X programmed as a diameter instead of a distance, tool geometry that includes a nose radius and a tip direction, and — on live-tooling machines — a C-axis and rotating tools that turn the lathe into half a mill. This page covers that lathe-specific layer.

Same Control, Different G-Codes

Start with the tool call, because it’s the first line that looks wrong to a mill programmer: there is no M06. A lathe turret indexes, it doesn’t swap, and the four-digit T word does two jobs at once — T101 indexes to station 1 and activates offset 01, T0315 is station 3 with offset 15. Running a tool with a different offset number than its station (a second offset for the same tool cutting a second feature, say) is normal practice, and T100 — offset 00 — cancels the offset entirely.

Beyond that, Haas lathes follow the Fanuc G-code system A conventions: no G90/G91 mode switch for absolute/incremental — instead X/Z are always absolute and U/W are their incremental twins on the same block. X values are diameters by default, which is how prints are dimensioned and how every example below is written. The turning cycles are the classic Fanuc set, with Haas’s single-block flavor:

Code What it does on the lathe Notes
G71OD/ID stock removal (roughing) along a P/Q profileHaas single-block form — depth of cut and finish allowances all on one line (worked example below).
G72End-face stock removalG71 turned 90° — roughs in X-heavy passes across the face.
G70Finishing cycleRe-runs the same P/Q profile blocks as a single finish pass, using the feeds programmed inside those blocks.
G73Irregular-path (pattern) stock removalFor castings/forgings already near shape — offsets the whole profile inward pass by pass.
G74End-face grooving / peck drilling on centerlineZ-axis pecking; with X words it steps over for face grooves.
G75OD/ID grooving cycleX-axis pecking with stepover — the groove-roughing workhorse.
G76Multi-pass threading cycleHaas single-block form — word-by-word below.
G96 / G97Constant surface speed on / off (direct RPM)G96 S600 = 600 SFM (or m/min); G97 S1200 = 1200 RPM. Thread and drill in G97.
G50Spindle speed clampG50 S3000 caps RPM so G96 can’t wind the chuck up to redline as X approaches zero. Program it before every G96 job.
G53, G54G59, G154 PnMachine coords, work offsets, expanded offsetsIdentical to the mill side — G154 P1P99 replaces Fanuc’s G54.1.
G98 / G99Feed per minute / feed per revolutionLathe meaning — not the mill’s canned-cycle return planes. G99 (per rev) is the turning default; switch to G98 for live-tool work with the main spindle stopped.

Note the classic collision of names: on a Haas mill, G70/G71/G72 are bolt-hole pattern cycles; on the lathe, the same numbers are finishing, roughing, and facing cycles. Same control family, same three digits, completely different worlds — keep that straight when you’re searching the manual or moving between machines, and never paste program fragments across the mill/lathe boundary.

The G96/G97/G50 trio is the rhythm section of every turning program, so it’s worth spelling out. In G96 the control retargets RPM continuously so surface speed at the tool stays constant — which means RPM climbs as X shrinks, and on a facing cut to centerline it would climb without bound. G50 S is the ceiling that makes that safe:

G50 S2500                     (NEVER EXCEED 2500 RPM - CHUCK/FIXTURE LIMIT)
G96 S550 M03                  (550 SFM, RPM NOW FLOATS WITH X)
G01 X0. F0.005                (FACE TO CENTER - RPM RISES, HITS THE)
(G50 CLAMP, AND HOLDS THERE)
G97 S1500                     (BACK TO FIXED RPM FOR DRILLING/THREADING)

Rules of thumb: turn and face in G96; drill, tap, and thread in G97 (threading needs a fixed RPM so the leadscrew sync holds); and never start a G96 job without a G50 S sized to the weakest thing spinning — usually the workholding, not the spindle.

Roughing and Finishing: G71 + G70

The single most-used block on any ST is G71. You describe the finished profile once, between two N-numbers, and the control generates every roughing pass itself. Haas uses a one-block G71: depth of cut (D) and finish allowances (U diameter, W length) ride on the same line as P/Q. Fanuc’s common two-block form — a first G71 U.. R.. line for depth and retract, then a second for P/Q and allowances — will not post correctly to a Haas: Fanuc’s first-block U (depth per pass) becomes Haas’s D, and the retract amount comes from a control setting rather than a program word.

O00300 (ROUGH AND FINISH AN OD PROFILE - 2.0 DIA BAR)
T101 (ROUGHING TOOL, OFFSET 1)
G50 S3000                     (CLAMP RPM BEFORE CSS)
G97 S1200 M03                 (FIXED RPM TO START)
G00 G54 X2.1 Z0.1 M08         (START POINT JUST OFF THE STOCK)
G96 S600                      (CONSTANT SURFACE SPEED, 600 SFM)
G71 P10 Q20 D0.1 U0.02 W0.005 F0.012
(P/Q = PROFILE BLOCKS  D = 0.100 DEPTH PER PASS - RADIUS VALUE)
(U = 0.020 LEFT ON DIAMETERS  W = 0.005 LEFT ON FACES  F = ROUGH FEED)
N10 G00 X0.5                  (FIRST PROFILE BLOCK - X ONLY, NO Z MOVE)
G01 Z0. F0.006                (FEED TO THE FACE - FINISH FEEDS LIVE HERE)
X0.75 Z-0.125                 (45 DEG CHAMFER TO THE .750 DIA)
Z-0.75                        (TURN THE .750 DIA)
X1.25 Z-1.0                   (TAPER UP TO 1.250)
Z-1.5                         (TURN THE 1.250 DIA)
G02 X1.5 Z-1.625 R0.125       (CORNER RADIUS INTO THE SHOULDER)
X1.75                         (FACE UP THE SHOULDER)
N20 X2.1                      (LAST BLOCK - PULL CLEAR ABOVE STOCK)
G00 X4. Z2.                   (CLEAR FOR THE TOOL CHANGE)
T202 (FINISH TOOL, OFFSET 2)
G96 S800                      (FASTER SURFACE SPEED FOR FINISHING)
G00 X2.1 Z0.1                 (BACK TO THE CYCLE START POINT)
G70 P10 Q20                   (FINISH PASS - RUNS N10-N20 ONCE,)
(USING THE FEEDS INSIDE THOSE BLOCKS)
G00 X4. Z2. M09               (CLEAR, COOLANT OFF)
G53 X0 Z0 M05                 (HOME IN MACHINE COORDS, SPINDLE OFF)
M30

Three details trip people up. First, the P block must be a G00/G01 move in X only — it defines where each roughing pass starts. Second, feeds written inside the P–Q blocks are ignored during roughing (the F on the G71 line rules) but become live during G70 — so put your finish feeds in the profile. Third, D is a radius value while U is a diameter value; leaving 0.020 with U0.02 means 0.010 of material on the tool.

Threading: G76

Haas G76 is also a single-block cycle. The words that matter:

Word Meaning
XFinal thread minor diameter (major diameter for an ID thread)
ZThread end point in Z
KThread height — single-side depth from crest to root, a radius value
DDepth of the first pass; later passes shallow out so chip load stays constant
ATool nose angle — A60. makes the tool feed down the flank instead of straight in
FFeedrate = thread lead (1 ÷ TPI for a single-start inch thread)
IOptional taper amount for pipe threads

A 1.000–8 UNC external thread, 1.5 long: pitch is 0.125, thread height for a 60° form is about 0.6134 × pitch = 0.0767, so the minor diameter lands at 1.000 − 2 × 0.0767 = 0.8466:

T303 (60 DEG THREADING TOOL)
G97 S800 M03                  (FIXED RPM - NEVER THREAD IN G96)
G00 G54 X1.2 Z0.25            (START CLEAR OF THE OD, LEAD-IN ROOM)
(LEAD-IN OF 2-3 THREADS LETS Z GET TO SPEED BEFORE THE FIRST FLANK)
G76 X0.8466 Z-1.5 K0.0767 D0.015 A60. F0.125
(X = MINOR DIA   K = THREAD HEIGHT   D = 0.015 FIRST PASS)
(A = 60 DEG COMPOUND-STYLE INFEED    F = 0.125 LEAD FOR 8 TPI)
G00 X4. Z2.                   (CLEAR)
G53 X0 Z0 M05
M30

The control computes the pass count from K and D, decreasing each pass depth so every pass removes a similar amount of material — a constant-depth schedule would make the last pass the heaviest, since the flank engagement grows as the tool goes deeper. The A60. word matters more than it looks: it angles the infeed down the thread flank the way a manual machinist sets a compound, so the insert cuts mostly on one edge instead of plowing both flanks at once — leave it off (A0) and you get radial plunge infeed, which chatters on all but the finest threads.

For a multi-start thread, use the technique the Haas manual documents: program F as the full lead (starts × pitch), run the cycle once, then shift the Z start point by one pitch and run it again for each additional start — a 2-start 8-TPI thread is two G76 cycles at F0.25 with start points 0.125 apart. Since the second start reuses the same X depths, the cycle repeats its full pass schedule in the new groove and the two starts come out identical.

Nose-Radius Comp and Tip Direction

A turning insert cuts on a nose radius, not a point — and on any taper or arc, an uncompensated program cuts the part wrong by a function of that radius. G41/G42 tool-nose compensation fixes it, but on the lathe the control needs two pieces of geometry you don’t enter on a mill: the nose radius and the tip direction — a digit that tells the control which way the imaginary sharp point sits relative to the radius center (a standard OD turning tool and a boring bar point opposite ways). Both live on the tool geometry page next to the X/Z offsets. Straight turning and facing come out on size without comp; the moment your profile has a taper, chamfer, or radius — like the G71 example above, which a real job would run with G42 active in the profile — comp is the difference between a part on size and one that’s off by a few thou exactly where the geometry is interesting. The full imaginary-tool-tip theory, with diagrams of why tapers cut oversize and which direction codes mean what, is at Fanuc Turning Programming — it applies to the Haas verbatim.

Live Tooling and the C-Axis

Live-tooling ST models add driven tool stations and a full-contouring C-axis, which moves milling, cross-drilling, and off-center work onto the lathe. The control layer is a small set of M-codes: M133/M134 run the live-tool spindle forward/reverse (with a P word for RPM) and M135 stops it; M154 engages the C-axis so the main spindle becomes a positioning axis, and M155 disengages it back to turning mode. Once engaged, C moves are degrees, and radial versus axial work is just a question of which way the live tool points — radial tools drill toward centerline (X moves), axial tools drill parallel to Z into the part face.

(CROSS-DRILL TWO 1/4 HOLES THROUGH A 2.0 DIA, 180 APART)
T505 (RADIAL LIVE DRILL, OFFSET 5)
M154                          (ENGAGE THE C AXIS)
G98                           (FEED PER MINUTE - MAIN SPINDLE IS STOPPED)
M133 P2500                    (LIVE TOOL ON, 2500 RPM)
G00 G54 X2.2 Z-1.0 C0.        (ABOVE THE OD, AT THE HOLE Z, PART AT 0 DEG)
G01 X1.4 F4.0                 (DRILL THROUGH THE WALL - X IS A DIAMETER)
G00 X2.2                      (RETRACT CLEAR OF THE OD)
C180.                         (INDEX THE PART HALF A TURN)
G01 X1.4 F4.0                 (SECOND HOLE)
G00 X2.2
M135                          (LIVE TOOL OFF)
M155                          (DISENGAGE C - BACK TO TURNING MODE)

The axial version is the same idea rotated 90° — an axial live drill pointed at the part face, Z doing the plunging, and C indexing between holes. A bolt circle on a flange face is just:

(THREE HOLES ON A 1.5 BOLT CIRCLE, PART FACE)
T606 (AXIAL LIVE DRILL)
M154
G98
M133 P3000
G00 G54 X1.5 Z0.25 C0.        (X = BOLT CIRCLE DIA, CLEAR OF THE FACE)
G01 Z-0.4 F6.0                (DRILL HOLE 1)
G00 Z0.25
C120.                         (INDEX A THIRD OF A TURN)
G01 Z-0.4
G00 Z0.25
C240.                         (LAST HOLE)
G01 Z-0.4
G00 Z0.25
M135
M155

For features that are milled around the diameter or across the face — flats, slots, pockets — indexing hole-by-hole isn’t enough; you want polar interpolation, G112, which lets you program the face in plain X/Y Cartesian coordinates while the control coordinates X and C underneath (cancel with G113). Live tools also support mill-style rigid tapping, both axial and radial, so tapped cross-holes don’t need a tension-compression head — the live-tool tapping cycles are in the ST manual’s canned-cycle chapter. One habit worth keeping: always pair every M154 with an M155 before returning to turning, and get the live tool stopped with M135 before the main spindle restarts.

Macros on the Lathe

Everything on the Haas Programming & Macros page applies to the ST unchanged: same #-variable families (#1#33 locals, #100s volatile, #500s retained, the NGC #10000s), same G65 argument map, same IF/WHILE control flow, same #3000/#3006 messaging, same G103 P1 lookahead discipline, same DPRNT output routing. Two lathe-specific footnotes:

Diameter mode reaches into your variables. Position reads follow the programming convention, so #5041 (current X in work coordinates) returns a diameter value, just as you’d program it. Any macro math that treats X as a distance from centerline — trig for a cross-hole depth, a radial clearance calculation — needs an explicit divide-by-two, and it’s the single most common bug when a mill macro gets ported to the lathe.

Tool offset variables map differently. A lathe tool carries more geometry than a mill tool — X and Z offsets, wear values, nose radius, and tip direction — so the system-variable layout for tool offsets is not the mill’s H/D arrangement. The concept (geometry vs wear, radius vs tip data, one variable range per field) is laid out at Fanuc Turning System Variables; for the exact Haas numbers, verify the variable map against the macro-variable table in your ST operator’s manual before writing to anything — the ranges differ between control generations, and a wrong write lands in someone else’s offset.

A short worked example ties the pieces together — a G65 macro that cuts a pattern of identical OD grooves, the lathe cousin of the mill page’s bolt-circle macro. Same argument decoding, same #0 validation, same WHILE loop; what’s new is that every X word is a diameter:

(PARENT - FOUR 0.125 WIDE GROOVES, 0.100 DEEP, 0.5 APART)
T404 (0.125 GROOVE TOOL, OFFSET 4)
G97 S1000 M03
G00 G54 X2.1 Z0.5             (CLEAR OF THE 2.0 OD)
G65 P9020 X2.0 I1.8 Z-0.5 W0.5 H4. F0.003
(X=OD  I=GROOVE MINOR DIA  Z=FIRST GROOVE  W=SPACING  H=COUNT)
G00 X4. Z2.
G53 X0 Z0 M05
M30

O09020 (OD GROOVE PATTERN MACRO)
IF [#11 EQ #0] GOTO 900       (H COUNT MISSING? #0 IS NULL, NOT ZERO)
IF [#4 EQ #0] GOTO 901        (I MINOR DIA MISSING?)
IF [#4 GE #24] GOTO 902       (GROOVE DIA MUST BE UNDER THE OD)

#30 = 0                       (GROOVE COUNTER)
#31 = #24 + 0.1               (CLEARANCE DIA = OD + 0.100 - DIAMETERS,)
(SO THAT IS 0.050 OFF THE PART PER SIDE)
WHILE [#30 LT #11] DO1
#32 = #26 - #30 * #23       (THIS GROOVE'S Z = FIRST - N * SPACING)
G00 X#31 Z#32               (RAPID OVER THE GROOVE)
G01 X#4 F#9                 (PLUNGE TO THE MINOR DIAMETER)
G00 X#31                    (RETRACT TO CLEARANCE)
#30 = #30 + 1               (NEXT GROOVE)
END1
M99

N900 #3000 = 100 (NO GROOVE COUNT H)
N901 #3000 = 101 (NO MINOR DIA I)
N902 #3000 = 102 (GROOVE DIA NOT UNDER OD)

Production version: peck the plunge for deep grooves (or hand the plunging to G75 and let the macro just position), and add a width argument with multiple stepped plunges for grooves wider than the insert. The skeleton — validate, compute in diameters, loop — doesn’t change.

Porting Checklist: Fanuc Lathe Program onto a Haas ST

The lathe counterpart to the mill page’s porting list — the items a known-good Fanuc turning program trips over on an ST:

Check Why
Collapse two-block G71/G72 into the Haas single-block formFanuc’s first-block U (depth per pass) becomes the Haas D word; the first-block R retract has no program word on Haas — it comes from a setting.
Rewrite G76 from the Fanuc two-block formFanuc’s G76 P(m)(r)(a) Q.. R.. packs finish-pass count, chamfer, and angle into one P word; on Haas the angle is a plain A, first pass is D, thread height is K.
Replace G54.1 Pn with G154 PnSame substitution as the mill side — Haas has no G54.1.
Audit every G50With an S word it’s the spindle clamp on both controls. Legacy programs that use G50 X.. Z.. as a coordinate set depend on the control’s coordinate-system compatibility mode — verify before running, exactly like G92 on the mill side.
Confirm feed-mode codesHaas lathes use G98/G99 for per-minute/per-rev. A program posted for a Fanuc G-code system that uses G94/G95 for the same jobs needs re-posting, not find-and-replace.
Enter nose radius and tip direction for every toolG41/G42 is only as good as the geometry page. A missing tip direction fails louder than a missing radius — but a wrong one cuts a mirror-image error.
Check diameter assumptions in macrosPosition variables like #5041 return diameters. Any ported macro doing radial math needs its divide-by-two audited.

As on the mill, none of these are exotic — each is a five-minute check at the control, and the first two are the ones that stop the first part from being scrap.

Open the Macro Playground — pick the Haas control and practice the macro math (thread heights, diameter-vs-radius conversions, pass counts) with live variable values in your browser.

Where to Go Next

The mill-side companion is Haas Programming & Macros, with the full variable map at Haas System Variables. For the Fanuc-side theory this page leans on — imaginary tool tip, tip direction codes, and the two-block cycle forms — see Fanuc Turning Programming. Threading in more depth, including rigid tapping across controls, is at Threading & Rigid Tapping.

References

  • Haas Automation, ST-Series Lathe Operator’s Manual (Next Generation Control), Haas Automation Inc.

Have a question or want to contribute?

Contact us with corrections, additions, or topics you'd like covered.

Get in Touch