Haas G-Code — What's Different from Standard Fanuc

Haas Automation machines use a controller — the Haas NGC (Next Generation Control) on current machines, and the Classic Haas Control on older ones — that is largely compatible with Fanuc G-code but has meaningful differences in syntax, M codes, and behavior. If you're coming from Fanuc or programming for a Haas for the first time, knowing these differences prevents wasted time and unexpected machine behavior.

Tool Change — T and M06 on the Same Line

On Fanuc, it is common practice to pre-select the next tool with a T word at the end of the previous tool's section, then execute the change with M06 later:

T2             (pre-select tool 2 while tool 1 is cutting)
...            (finish cutting with tool 1)
T2 M6          (execute tool change)

On Haas, T and M06 on the same line is the standard — and it works reliably:

T2 M6          (select tool 2 and change — Haas standard)

Pre-selection works on Haas too, but the NGC carousel pre-positions during the previous operation, so the distinction is less critical than on some Fanuc setups.

G28 vs G53 for Tool Changes

Haas documentation and post-processors frequently use G53 (machine coordinate move) rather than G28 for positioning before tool changes:

G53 G0 Z0.     (rapid to machine Z zero — Haas tool change position)
T3 M6

This is faster than G28 because it goes directly to machine zero without the intermediate point logic. G28 works too, but G53 is the Haas-idiomatic approach for tool change retract.

Haas-Specific M Codes

Haas has a large set of proprietary M codes not found on Fanuc. The most commonly encountered:

M CodeFunction
M09Coolant off (standard)
M08Flood coolant on (standard)
M88Through-spindle coolant on
M89Through-spindle coolant off
M83Air blast on
M84Air blast off
M75Set G68 reference point
M76Display message (classic control)
M109Interactive user input / message
M97Local subprogram call
M98External subprogram call
M99Return from subprogram

M97 is particularly useful on Haas — it calls a subprogram defined within the same program file using an N-number label, avoiding the need for a separate O-numbered program:

M97 P1000 L3    (call local sub at N1000, repeat 3 times)
...
N1000
G91
G1 X20. F400
G90
M99

Rigid Tapping — No M29 Required

On Haas NGC, G84 activates rigid tapping automatically — no M29 preamble is needed (unlike some older Fanuc firmware). The controller synchronizes spindle and Z-axis from the G84 block itself:

S600 M3
G99 G84 Z-18. R3. F600    (M10×1.0 — rigid tapping, no M29)

On Classic Haas Control, check the machine manual — some versions require a spindle mode selection before G84.

Haas Canned Cycle Differences

G73 chip-break retract: On Haas, the chip-break retract distance in G73 is typically 0.5mm (fixed, not user-configurable via parameter in the same way as Fanuc). This is adequate for most aluminum work but may need G83 for deeper steel holes.

G83 re-entry: Haas rapids back to within 0.5mm above the previous peck depth before switching to feed rate. This value is fixed in the Haas implementation.

G84.2 — Left-hand tapping: Haas supports G84.2 for rigid tapping with left-hand threads (counterclockwise spindle, reversed retract):

S500 M4          (CCW for left-hand tap)
G84.2 Z-15. R3. F500

Work Offsets — G54 Through G59 and Beyond

Haas supports the standard G54–G59 offsets plus additional offsets G110–G129 (20 extra offsets). These are accessed directly by G-code:

G110    (additional work offset 1)
G111    (additional work offset 2)
...
G129    (additional work offset 20)

On Fanuc, extended offsets use G54.1 P_ syntax. The Haas approach (separate G-codes) is simpler but requires different post-processor output.

Haas High-Speed Machining — G187

Haas NGC has a smoothness/accuracy setting for high-speed machining controlled by G187:

G187 P1    (roughing — maximum speed, reduced accuracy)
G187 P2    (default)
G187 P3    (finishing — maximum accuracy, reduced speed)

This affects how the controller handles corner deceleration and look-ahead. For finishing passes on complex surfaces, P3 produces better results at the cost of cycle time.

Coordinate Rotation — G68 / G69

Haas fully supports G68 (coordinate rotation) and G69 (cancel rotation), useful for parts with angled features:

G68 X0. Y0. R45.    (rotate coordinate system 45 degrees around X0,Y0)
(machining at 45 degrees)
G69                  (cancel rotation)

Haas-Specific Program Structure

A typical Haas program follows this structure:

%
O00100 (HAAS PROGRAM EXAMPLE)
(T1 - 10MM END MILL)
(T2 - 6MM DRILL)
G00 G17 G21 G40 G49 G80 G90    (safety line)
T1 M06                          (tool change)
G00 G90 G54 X0. Y0. S5000 M03  (position + spindle)
G43 H01 Z50.                    (tool length comp)
M08                             (coolant)

(machining operations)

M09                             (coolant off)
M05                             (spindle stop)
G53 G00 Z0.                     (Z to machine zero)
M30                             (end)
%

Note the tool comments (T1 - description) at the top — this is Haas convention and displays on the operator's tool list page.

Simulate Haas Programs Before Running

The differences between Haas and Fanuc are subtle enough that a program that looks correct on paper can behave unexpectedly on the machine — particularly around tool changes, M code timing, and canned cycle parameters. Eureka3X includes Haas VF-2 as one of its four standard machine models, simulating Haas-specific behavior including M codes and canned cycle implementation.

Try Eureka3X free for 30 days →

Related Articles

Start verifying your real G-code today.

Ensure your programs are safe and accurate with Eureka 3X Pro.

Start 30-Day Free Trial