Application of the Industrial Gateway to CNC Data Acquisition
This page explains what an industrial gateway actually does on a CNC machine, which signals are worth collecting, and how to tell a useful data setup from a shelf of unused dashboards. It is written for process engineers and maintenance leads who have to specify the hardware and live with the result.

What the gateway sits between
An industrial gateway is a small industrial computer that sits between the machine control and your network. On one side it talks to the CNC: Fanuc FOCAS, Siemens 840D, Heidenhain, Mitsubishi, Mazak Smooth, or a plain Modbus register map on older controls. On the other side it speaks something your IT team accepts, usually OPC UA, MQTT, or a REST endpoint. The gateway does not change the machine. It reads what the control already exposes and republishes it in a consistent shape.
The reason the application industrial gateway cnc pairing matters is polling behavior. A CNC control is a real-time system. If you hammer it with reads during a finishing pass, you can add tens of milliseconds of jitter to the servo loop. Good gateways poll on a schedule, cache the answer, and only push changes upward. That single design choice separates a unit that runs for years from one that gets unplugged after a month.
Physically the box is nothing special: DIN rail, 24 V DC, two Ethernet ports, often a serial port for legacy controls. What you are really buying is the driver set and the firmware discipline. Ask for the supported control list in writing before you order. A gateway that lists twenty protocols but has never been tested on your specific 1990s Mitsubishi will cost you weeks.
- 1Read sideControl-native protocol, polled and cached
- 2Write sideOPC UA, MQTT, or REST to your broker
- 3Power24 V DC, DIN rail, fanless enclosure
- 4What you buyDriver coverage and firmware updates
Which signals are worth collecting
Start with the question you want answered, then pick the tag. Cycle count and run time tell you about utilization. Spindle load and axis current tell you about tool wear. Program number and offset changes tell you what actually ran. Alarm history tells you why it stopped. Those four groups cover most real projects, and each one has a different sampling requirement.
Spindle load needs 50 to 200 ms sampling to catch a chipped insert. Utilization counters can be read once per second and lose nothing. Temperature and vibration sensors added on top of the control want 1 to 10 kHz for bearing analysis, which is far beyond what a gateway polling the control will give you. When you need that bandwidth, put the accelerometer on its own DAQ and let the gateway carry only the result.
Digitizing signals at the edge is the part teams underestimate. A 10 kHz vibration channel across 40 machines produces about 1.6 GB per day if you store raw. Send the RMS and the crest factor instead and the volume drops by three orders of magnitude. Filtering close to the machine also means a dropped network link does not lose data. The gateway buffers locally and forwards when the link returns.
- 1UtilizationProgram number, run state, cycle count
- 2Tool conditionSpindle load, axis current, feed override
- 3QualityOffset changes, alarm codes, probe results
- 4Condition monitoringVibration and temperature, own DAQ
Sampling rate and transport by signal type
Match the sampling interval to what you are trying to detect, not to what the gateway can theoretically do.
| Signal | Sampling interval | Transport to server |
|---|---|---|
| Run state and cycle count | 1 s | MQTT, change of state only |
| Program number | 1 s or on change | MQTT, change of state only |
| Spindle load | 50–200 ms | OPC UA subscription |
| Axis current | 50–200 ms | OPC UA subscription |
| Alarm and event log | On event | MQTT, retained flag |
| Vibration (bearing) | 1–10 kHz | Edge FFT, send RMS and crest |
| Coolant temperature | 1–5 s | MQTT, batched every 30 s |
| Tool offset change | On change | MQTT, retained flag |
When the gateway approach is the wrong tool
A gateway reads data the control already computes. If the control does not expose a value, no gateway will invent it. Older Fanuc 0i and similar controls expose very little over FOCAS: run state, program number, some alarms. If your project depends on per-axis following error at 1 kHz, that value lives on the servo bus, and you need a different hardware path. Say so before the purchase order, not after.
Network topology causes more failures than hardware. Putting thirty gateways on the same flat VLAN as office traffic invites broadcast storms and a support call at 2 a.m. Give the machine network its own VLAN, restrict outbound traffic to the broker, and disable any remote shell you are not using. This is also where ISO 27001 discipline helps: the same controls that protect customer files apply to plant data.
Do not collect a tag just because it is available. Every tag has a cost in storage, dashboard maintenance, and the meeting where someone asks why it is flat. A tight tag list of twelve values per machine, reviewed every quarter, beats a 400-tag dump that nobody opens. If a tag has not driven a decision in three months, delete it.
- 1Not exposedServo following error, drive internal state
- 2Too fastStructural vibration above 10 kHz
- 3Not worth itTags with no owner and no decision
A rollout order that survives contact with the shop floor
Pilot on one machine for two weeks before you touch the rest. Pick a machine that runs regularly and has a known problem you want to solve, not the newest one in the best cell. The goal of the pilot is to prove the data path end to end: tag read, broker delivery, dashboard display, and one decision made from it. If that last step does not happen, the pilot failed regardless of how clean the graphs look.
Tag naming is the part that ages badly. Use a scheme that encodes site, cell, machine, and signal, and write it down in one file that lives with the project. When the second plant joins a year later, that file is the difference between a one-week integration and a one-month argument. Keep units in the tag name or the metadata, never in the value.
After rollout, watch two numbers: gateway uptime and tag freshness. A gateway that reports 99% uptime but has not updated a tag in six hours is worse than one that is visibly offline, because the stale value looks plausible on a dashboard. Alert on freshness, not just reachability.
If you are still specifying the machining side of the project, the data work goes faster when the parts are already stable. We machine prototypes and production runs to ±0.005 mm with 100% inspection before shipment, and we can hold tolerances that make cycle-to-cycle comparison meaningful. Send a drawing and we will return a quotation and a DFM analysis within 12 hours.
- 1Week 1–2One machine, one problem, one decision
- 2Week 3Tag naming file and unit convention
- 3OngoingAlert on tag freshness, not just uptime
Common questions
Can a gateway read data from a CNC with no Ethernet port?
Yes, if the control has a serial or fieldbus port and the gateway supports that driver. RS-232, RS-485, and older fieldbus cards are common on machines from the 1990s and 2000s. Expect a lower polling rate and a shorter tag list than an Ethernet-connected control.
Does adding a gateway affect cycle time or surface finish?
Not if it polls on a schedule and caches results. The risk comes from high-frequency reads that compete with the control's own tasks. Keep polling intervals at 50 ms or slower for control reads, and put fast sensor data on a separate DAQ. Then verify with a cycle-time log before and after installation.
Which protocol should we use to the server, MQTT or OPC UA?
MQTT suits many machines over unreliable links, because it is lightweight and buffers well. OPC UA suits a plant where the SCADA layer already speaks it and you need structured, typed data. Some sites run both: OPC UA inside the cell, MQTT to the cloud broker.
How much storage does one machine need?
For twelve tags at one-second change-of-state reporting, a few megabytes per machine per month. Raw vibration is the outlier at roughly 1.6 GB per day per channel, which is why edge FFT and sending only RMS and crest factor is the practical choice.
Can we keep the machine network isolated from the office network?
Yes, and we recommend it. Put the machines on their own VLAN, allow outbound traffic only to the broker, and disable unused remote services. Physical separation, or a firewall between the two networks, removes most of the attack surface without touching the CNC controls.
What documentation should we ask a gateway vendor for?
Ask for the tested control list with firmware versions, the tag dictionary the driver exposes, the polling behavior, and the update policy. A vendor that cannot state which controls were tested in the last year is a support risk.
Parts stable enough to compare cycle to cycle
Send a drawing and get a quotation plus a DFM analysis within 12 hours. Production can start within 24 hours.
12-hour quote±0.005 mm100% inspectionNo minimum order quantity