Haas Machine Data Acquisition: MTConnect, Ethernet Q-Codes and the NGC Control Explained

Haas machines are everywhere in small and mid-sized job shops. They are affordable, easy to run, and usually the first machines a growing shop buys. They are also some of the easiest CNCs to monitor, if you know which door to knock on.

A Haas control offers more than one way to get data out. Pick the wrong one and you get a part counter that never moves, or a status that says “idle” while the spindle is cutting. This article explains the data sources on Haas controls, what each one gives you, and where the limits are. When you are ready to build it, the Haas machine monitoring setup guide walks through the installation.

The problem: two generations of control

Haas has two control families you will meet on the floor:

  • NGC (Next Generation Control): the current control, on machines built from roughly 2014 onward. It has a built-in Ethernet port, wireless option and native support for modern data collection.
  • The classic Haas control: older machines. Data collection here mainly runs over the RS-232 serial port, with Ethernet available on some later versions.

Most of this article focuses on NGC, because that is what most shops are connecting today. Where classic controls differ, we say so.

What data you can collect

Signal Typical Haas source Used for
Machine status (running, idle, alarm) MTConnect execution state, or Q500 status Availability, live status
Active program MTConnect program, or Q500 Traceability
Part count M30 parts counter (Q402/Q403) or MTConnect part count Production count, performance
Cycle time Last cycle time (Q303), previous cycle (Q304) Performance
Power-on and motion time Q300, Q301 Utilisation
Spindle speed and load MTConnect, or macro variables via Q600 Utilisation, tool wear
Alarms MTConnect conditions Downtime reasons
Tool changes Q200 Tool life tracking

These cover the machine side of OEE (overall equipment effectiveness): availability and performance. Quality still needs operator input or inspection data. Our OEE improvement guide explains how the three parts combine.

Source 1: MTConnect

MTConnect is an open, read-only standard for machine data. The control (or an agent) publishes a structured XML document over HTTP. Any client can request the current values or a stream of changes.

On the NGC, MTConnect is built into the control. You enable it in the network settings and the control serves the agent on a TCP port (commonly 8082 on Haas). There is no extra software on the machine and no license fee that we have met in the field.

Why we like it:

  • It is standard. The same client code reads Haas, and other MTConnect-capable machines, with the same data model.
  • It gives named data items: execution state, controller mode, program, part count, spindle speed, and alarm conditions.
  • It is read-only. Nobody can change the machine from the monitoring system, which keeps maintenance teams relaxed.

What to watch: the exact data items depend on the NGC software version. Open the agent’s probe page in a browser and check what this machine actually publishes before you design the dashboard.

Source 2: Ethernet Q-codes (Machine Data Collection)

Haas has supported a simple query protocol for decades. You send a short text command, such as ?Q500, and the control replies with a comma-separated answer. This is often called Machine Data Collection, and it is enabled with a control setting (Setting 143 on many machines).

On the NGC, Q-codes work over Ethernet on a TCP port (commonly 5051). On classic controls, they run over RS-232 at the baud rate set on the control.

The commands we use most often:

Command Returns
Q100 Machine serial number
Q101 Control software version
Q102 Machine model
Q104 Mode (MEM, MDI, JOG and others)
Q200 Tool changes total
Q300 Power-on time total
Q301 Motion time total
Q303 Last cycle time
Q304 Previous cycle time
Q402 / Q403 M30 parts counters #1 and #2
Q500 Program, status and part count in one reply
Q600 xxxx Value of macro variable xxxx

Q600 is the flexible one. It reads any macro variable, which opens up system values such as spindle load, and any custom variable your programmer writes to. Check the variable numbers in the Haas operator’s manual for your control version.

The Q-code approach is simple and very reliable. Its weakness is that you have to poll, and you must parse plain text. A malformed reply or a busy control can return an empty line, so the gateway must handle that.

Source 3: Hardwired signals

On older Haas machines without usable Ethernet, or when IT will not allow a network connection, a gateway can read the stack light and an M-code relay. Haas machines have spare user relays that a programmer can switch with M-codes. Firing one at the end of each cycle gives you a clean part signal.

Hardwired monitoring gives you status and part count. It will not give you program names or alarm text.

Haas Connect and other vendor tools

Haas offers its own remote monitoring service for NGC machines (HaasConnect), which sends alerts and status to a phone. It is useful for a few Haas machines. It does not combine Haas data with your FANUC, Siemens or Mitsubishi machines on one dashboard, so mixed shops usually need an independent route as well.

Choosing the right source

Situation Recommended route
NGC, network allowed MTConnect for status and alarms, plus Q-codes for counters and cycle times
NGC, simple needs Q500 polling alone
Classic control with RS-232 Q-codes over serial, through a serial-to-Ethernet adapter or gateway port
Any control, no network allowed Hardwired stack light and M-code relay

On most NGC installations we combine MTConnect and Q-codes. MTConnect gives clean states and alarms. Q-codes give the native Haas counters and cycle times exactly as the operator sees them on the screen.

Architecture in words

  1. Haas machines connect from their Ethernet port to a switch on an isolated machine network.
  2. An edge gateway on that network reads MTConnect over HTTP and sends Q-code queries over TCP. It also reads any hardwired inputs.
  3. The gateway converts those readings into events (status change, cycle complete, alarm) and publishes them to an MQTT broker on the plant network.
  4. A monitoring platform subscribes to the broker, stores history and shows live status, OEE and downtime on a dashboard.

Only the gateway has a foot in both networks. The machines are never exposed to the office LAN.

Common mistakes

  • Counting with the wrong counter. Q402 counts M30 executions. If the program runs two parts per cycle, multiply, or have the programmer increment a macro variable per part and read it with Q600.
  • Forgetting the setting. Q-codes return nothing until Machine Data Collection is enabled on the control.
  • Polling too fast. Query every 1 to 2 seconds. Hammering the control every 100 ms gains nothing.
  • Trusting MTConnect without checking the probe. Not every software version publishes every data item.
  • Network conflicts. Shops often plug a Haas into the office network with DHCP. When the address changes, monitoring stops. Use static IPs.

Conclusion

Haas gives you three practical routes: MTConnect for standard, structured status; Q-codes for native counters and cycle times; and hardwired signals for anything else. On an NGC machine, combining the first two gives a complete picture with very little effort. Put an edge gateway in the middle, publish to MQTT, and the Haas machines sit on the same dashboard as everything else.

Ready to build it? Read the Haas step-by-step monitoring setup. Running other brands too? See Siemens SINUMERIK and S7 data sources, FANUC FOCAS data acquisition, Mitsubishi M70/M80 and MELSEC and Delta PLC Modbus.

Not sure what your Haas machines can share? Book a free assessment. We will check the control versions and tell you exactly which data you can collect.

Know More About Our CNC Machine Monitoring Software

Related Blogs