Haas System Variables
Haas system variables are the #-numbers a macro uses to read and write the control’s state — tool offsets, work offsets, live positions, probe results, timers, pallet data, even settings and parameters. Haas follows the Fanuc Macro B model closely, then extends it: the Next Generation Control (NGC) adds five-digit variable ranges that mirror settings (#20000+), parameters (#30000+), and the full tool table (#50001+), making a Haas unusually transparent to a macro programmer.
NGC vs Legacy Numbering
The Classic Haas Control (CHC) used the traditional three-digit macro ranges (#100–#999). The NGC moved general-purpose storage into five-digit ranges (#10000–#10999) and kept the legacy numbers working as aliases into the same storage — #100 and #10100 are two addresses for the same variable on an NGC machine. Programs written for a classic control run unchanged; new programs get much more room (plus ranges that have no legacy equivalent at all). The table below shows both addresses side by side.
| NGC Variable | Legacy Variable | Usage | Read/Write |
|---|---|---|---|
| Macro Arguments / General Purpose | |||
| #1-#33 | #1-#33 | Macro call arguments | r/w |
| #10000-#10149 | #100-#149 | General-purpose variables saved on power off | r/w |
| #10150-#10199 | #150-#199 | Probe values (if installed) | r/w |
| #10200-#10399 | N/A | General-purpose variables saved on power off | r/w |
| #10400-#10499 | N/A | General-purpose variables saved on power off | r/w |
| #10500-#10549 | #500-#549 | General-purpose variables saved on power off | r/w |
| #10550-#10599 | #550-#599 | Probe calibration data (if installed) | r/w |
| #10600-#10699 | #600-#699 | General-purpose variables saved on power off | r/w |
| #10700-#10799 | N/A | General-purpose variables saved on power off | r/w |
| #700-#749 | #700-#749 | Hidden variables for internal use only | |
| #709 | #709 | Used for the Fixture Clamp Input. Do not use for general purpose. | r |
| #10800-#10999 | #800-#999 | General-purpose variables saved on power off | r/w |
| #11000-#11063 | N/A | 64 discrete inputs | r |
| #1064-#1068 | #1064-#1068 | Maximum axis loads for X, Y, Z, A, and B Axes, respectively | r |
| #1080-#1087 | #1080-#1087 | Raw analog to digital inputs | r |
| #1090-#1098 | #1090-#1098 | Filtered analog to digital inputs | r |
| #1098 | #1098 | Spindle load with Haas vector drive | r |
| #1264-#1268 | #1264-#1268 | Maximum axis loads for C, U, V, W, and T-axes respectively | r |
| Tool Offsets | |||
| #1601-#1800 | #1601-#1800 | Number of flutes on tools #1 through 200 | r/w |
| #1801-#2000 | #1801-#2000 | Maximum recorded vibrations of tools 1 through 200 | r |
| #2001-#2200 | #2001-#2200 | Tool length offsets | r/w |
| #2201-#2400 | #2201-#2400 | Tool length wear | r/w |
| #2401-#2600 | #2401-#2600 | Tool diameter/radius offsets | r/w |
| #2601-#2800 | #2601-#2800 | Tool diameter/radius wear | r/w |
| System & Control | |||
| #3000 | #3000 | Programmable alarm #3000=1 (ALARM) | w |
| #3001 | #3001 | Millisecond timer | r/w |
| #3002 | #3002 | Hour timer | r/w |
| #3003 | #3003 | Single block suppression | r/w |
| #3004 | #3004 | Override [FEED HOLD] control | r/w |
| #3006 | #3006 | Programmable stop with message #3006=1 (STOP) | w |
| #3011 | #3011 | Year, month, day | r |
| #3012 | #3012 | Hour, minute, second | r |
| #3020 | #3020 | Power on timer | r |
| #3021 | #3021 | Cycle start timer | r/w |
| #3022 | #3022 | Feed timer | r/w |
| #3023 | #3023 | Present part timer | r |
| #3024 | #3024 | Last complete part timer | r |
| #3025 | #3025 | Previous part timer | r |
| #3026 | #3026 | Tool in spindle | r |
| #3027 | #3027 | Spindle RPM | r |
| #3028 | #3028 | Number of pallets loaded on receiver | r |
| #3030 | #3030 | Single block | r |
| #3032 | #3032 | Block delete | r |
| #3033 | #3033 | Opt stop | r |
| #3034 | N/A | Safe Run | r |
| #3196 | #3196 | Cell safe timer | r/w |
| #3201-#3400 | #3201-#3400 | Actual diameter for tools 1 through 200 | r/w |
| #3401-#3600 | #3401-#3600 | Programmable coolant positions for tools 1 through 200 | r/w |
| #3901 | #3901 | M30 count 1 | r/w |
| #3902 | #3902 | M30 count 2 | r/w |
| Modal Information | |||
| #4001-#4021 | #4001-#4021 | Previous block G-code group codes | r |
| #4101-#4126 | #4101-#4126 | Previous block address codes. NOTE: Mapping of 4101 to 4126 is the same as the alphabetic addressing of Macro Arguments section; e.g., the statement X1.3 sets variable #4124 to 1.3. | r |
| Position & Coordinate Data | |||
| #5001-#5006 | #5001-#5006 | Previous block end position | r |
| #5021-#5026 | #5021-#5026 | Present machine coordinate position | r |
| #5041-#5046 | #5041-#5046 | Present work coordinate position | r |
| #5061-#5069 | #5061-#5069 | Present skip signal position -X, Y, Z, A, B, C, U, V, W | r |
| #5081-#5086 | #5081-#5086 | Present tool offset | r |
| #5201-#5206 | #5201-#5206 | G52 work offsets | r/w |
| #5221-#5226 | #5221-#5226 | G54 work offsets | r/w |
| #5241-#5246 | #5241-#5246 | G55 work offsets | r/w |
| #5261-#5266 | #5261-#5266 | G56 work offsets | r/w |
| #5281-#5286 | #5281-#5286 | G57 work offsets | r/w |
| #5301-#5306 | #5301-#5306 | G58 work offsets | r/w |
| #5321-#5326 | #5321-#5326 | G59 work offsets | r/w |
| #5401-#5500 | #5401-#5500 | Tool feed timers (seconds) | r/w |
| #5501-#5600 | #5501-#5600 | Total tool timers (seconds) | r/w |
| #5601-#5699 | #5601-#5699 | Tool life monitor limit | r/w |
| #5701-#5800 | #5701-#5800 | Tool life monitor counter | r/w |
| #5801-#5900 | #5801-#5900 | Tool load monitor maximum load sensed so far | r/w |
| #5901-#6000 | #5901-#6000 | Tool load monitor limit | r/w |
| #6001-#6999 | #6001-#6999 | Reserved. Do not use. | |
| #6198 | #6198 | NGC/CF flag | r |
| Work Offsets / Additional Offsets | |||
| #7001-#7006 | #7001-#7006 | G110 (G154 P1) additional work offsets | r/w |
| #7021-#7026 | #7021-#7026 | G111 (G154 P2) additional work offsets | r/w |
| #7041-#7386 | #7041-#7386 | G112-G129 (G154 P3-P20) additional work offsets | r/w |
| #7501-#7506 | #7501-#7506 | Pallet priority | r/w |
| #7601-#7606 | #7601-#7606 | Pallet status | r |
| #7701-#7706 | #7701-#7706 | Part program numbers assigned to pallets | r/w |
| #7801-#7806 | #7801-#7806 | Pallet usage count | r/w |
| #8500 | #8500 | Advanced Tool Management (ATM) group ID — write the group to select it, then read #8501+ | r/w |
| #8501 | #8501 | ATM percent of available tool life of all tools in the group | r |
| #8502 | #8502 | ATM total available tool usage count in the group | r |
| #8503 | #8503 | ATM total available tool hole count in the group | r |
| #8504 | #8504 | ATM total available tool feed time (in seconds) in the group | r |
| #8505 | #8505 | ATM total available tool total time (in seconds) in the group | r |
| #8510 | #8510 | ATM next tool number to be used | r |
| #8511 | #8511 | ATM percent of available tool life of the next tool | r |
| #8512 | #8512 | ATM available usage count of the next tool | r |
| #8513 | #8513 | ATM available hole count of the next tool | r |
| #8514 | #8514 | ATM available feed time of the next tool (in seconds) | r |
| #8515 | #8515 | ATM available total time of the next tool (in seconds) | r |
| #8550 | #8550 | Individual tool ID — write the tool/group ID to select it, then read #8551+ | r/w |
| #8551 | #8551 | Number of flutes of tools | r |
| #8552 | #8552 | Maximum recorded vibrations | r |
| #8553 | #8553 | Tool length offsets | r |
| #8554 | #8554 | Tool length wear | r |
| #8555 | #8555 | Tool diameter offsets | r |
| #8556 | #8556 | Tool diameter wear | r |
| #8557 | #8557 | Actual diameter | r |
| #8558 | #8558 | Programmable coolant position | r |
| #8559 | #8559 | Tool feed timer (seconds) | r |
| #8560 | #8560 | Total tool timers (seconds) | r |
| #8561 | #8561 | Tool life monitor limit | r |
| #8562 | #8562 | Tool life monitor counter | r |
| #8563 | #8563 | Tool load monitor maximum load sensed so far | r |
| #8564 | #8564 | Tool load monitor limit | r |
| #9000 | #9000 | Thermal comp accumulator | r |
| #9000-#9015 | #9000-#9015 | Reserved (duplicate of axis thermal accumulator) | |
| #9016 | #9016 | Thermal spindle comp accumulator | r |
| #9016-#9031 | #9016-#9031 | Reserved (duplicate of axis thermal accumulator from spindle) | |
| #10000-#10999 | N/A | General purpose variables | r/w |
| #11000-#11255 | N/A | 256 discrete inputs | r |
| #12000-#12255 | N/A | Discrete outputs | r/w |
| #13000-#13063 | #1080-#1087 #1090-#1097 | Raw and filtered analog-to-digital inputs | r |
| #13013 | N/A | Coolant level | r |
| #14001-#14006 | N/A | G110 (G154 P1) additional work offsets | r/w |
| #14021-#14026 | N/A | G110 (G154 P2) additional work offsets | r/w |
| #14041-#14386 | N/A | G110 (G154 P3-G154 P20) additional work offsets | r/w |
| #14401-#14406 | N/A | G110 (G154 P21) additional work offsets | r/w |
| #14421-#15966 | N/A | G110 (G154 P22-G154 P99) additional work offsets | r/w |
| #20000-#29999 | N/A | Settings (mirror of the Settings page) | r |
| #30000-#39999 | N/A | Parameters (mirror of the service-level parameter list) | r |
| #32014 | N/A | Machine Serial Number | r |
| #50001-#50200 | N/A | Tool Type | r/w |
| #50201-#50400 | N/A | Tool material | r/w |
| #50401-#50600 | N/A | Tool Offset Point | r/w |
| #50601-#50800 | N/A | Estimated RPM | r/w |
| #50801-#51000 | N/A | Estimated Feedrate | r/w |
| #51001-#51200 | N/A | Offset Pitch | r/w |
| #51201-#51400 | N/A | Actually VPS Estimated RPM | r/w |
| #51401-#51600 | N/A | Work Material | r/w |
| #51601-#51800 | N/A | VPS Feedrate | r/w |
| #51801-#52000 | N/A | Approximate length | r/w |
| #52001-#52200 | N/A | Approximate diameter | r/w |
| #52201-#52400 | N/A | Edge Measure height | r/w |
| #52401-#52600 | N/A | Tool Tolerance | r/w |
| #52601-#52800 | N/A | Probe Type | r/w |
Reading & Writing System Variables in a Macro
Probe a surface and write the result to a work offset. The core “touch off and set zero” chain on a Haas: feed with G31 until the probe trips, read the latched skip position, write it into the offset. On Haas the skip block is #5061–#5069 in axis order X, Y, Z, A, B, C, U, V, W — so Z is #5063:
(TOUCH TOP OF PART, SET IT AS G54 Z0)
G90 G31 Z-25. F50. (feed down until the probe trips)
#5223 = #5223 + #5063 (shift G54 Z so the touched face = Z0)
G00 Z25. (retract)
Write an additional work offset (G154 P). The NGC exposes G154 P1–P99 at #14001+ (each P block is 20 apart); the legacy #7001+ block only reaches P20. Setting the G154 P5 X offset:
#101 = 5 (which G154 P offset)
#[14001 + [[#101 - 1] * 20]] = #5061 (G154 P5 X = probed X position)
Track cycle counts across power-off. Haas retains the general-purpose ranges through power-off, so a retained variable makes a free parts/maintenance counter alongside the built-in #3901/#3902 M30 counters:
#10800 = #10800 + 1 (survives power-off)
IF [#10800 LT 500] GOTO 99
#3006 = 1 (500 PARTS - CHECK FIXTURE CLAMPS)
#10800 = 0
N99 M30
Read machine state for logging or adaptive decisions — the NGC exposes far more than Fanuc does by default:
#100 = #3026 (tool currently in the spindle)
#101 = #3027 (spindle RPM right now)
#102 = #1064 (max X-axis load seen)
#103 = #20009 (Setting 9: dimensioning - branch inch vs metric)
Gotchas Worth Knowing
- Settings and parameters are read-only mirrors.
#20000+and#30000+let a macro read any setting or parameter, but writes are rejected — change offsets through their own writable variables (orG10), and change settings on the Settings page. - Legacy and NGC numbers are the same storage.
#500and#10500are one variable, not two. When porting a classic-control program, don’t “migrate” values between the two ranges — there is nothing to migrate. - Probe ranges are only meaningful with probing installed.
#10150–#10199(outputs) and#10550–#10599(calibration) belong to the Renishaw/WIPS macros when the option is present; without it they are just more general-purpose storage. #6001–#6999is reserved. Classic Fanuc habits sometimes park data there; on a Haas, don’t.- Read positions with the axes stopped. As on Fanuc,
#5021+/#5041+are only trustworthy after motion completes — except the skip variables#5061+, which are latched at the instant theG31input trips.
▶ Try these in the Macro Playground — pick the Haas control, set the system-variable inputs (like #5063), and watch the values update live as the macro runs.
See also: Haas Programming & Macros for the language itself, Settings & Parameters for what #20000+ is mirroring, Renishaw Inspection Plus for the full probing system, and Reading & Writing System Variables for the same patterns on every control.
References
- Haas, Operator’s Manual / NGC Programming Guide, Haas Automation, Inc.
Have a question or want to contribute?
Contact us with corrections, additions, or topics you'd like covered.
Get in Touch