# Getting data out of machines

> Five ways to collect data from CNC machines and PLCs, from operator entry to Modbus, MTConnect, OPC UA and FANUC FOCAS, and what to ask your machine builder.

Source: https://deda.systems/handbook/machine-data-collection
Last updated: 2026-11-13

A plant does not need to connect every machine to see what is happening on the floor. **There are five ways to capture machine data, and the cheapest one that answers your question is the right one.** This page compares them and names the standards involved, so you know what to ask a machine builder or a software vendor.

## What to capture first

Most of the value comes from four facts per machine. Everything else can wait.

- **State.** Is the machine running, idle or stopped, and since when.
- **Count.** How many cycles or parts it has completed.
- **Reason.** Why it stopped. A machine cannot tell you it is waiting for material, so this always needs a person.
- **Job.** Which work order or part number it is running, so counts and time land against the right job.

These four are enough to calculate [OEE](https://deda.systems/handbook/oee-calculator), track orders and see where time is lost. Spindle load, temperatures, vibration and alarms matter later, for predictive maintenance and process monitoring.

## Five ways to collect the data

| Method | What you get | What it needs | Fits |
| --- | --- | --- | --- |
| 1. Operator entry on a tablet | Job, start and stop, good and reject counts, stop reason. | A tablet or shared screen at the machine. No connection to the machine. | Any machine of any age, including manual machines, presses and assembly benches. |
| 2. Electrical signal | Run or idle state and a cycle count, automatically. | A wire from a signal the machine already has (stack light, cycle-start or cycle-complete relay) or a current sensor on the supply, into a small input module. | Older machines and machines whose controller has no network option. |
| 3. PLC registers | Counts, states, speeds, temperatures and anything else the PLC program holds. | Network or serial access to the PLC and its register list. Modbus is the most widely supported protocol. | Moulding machines, presses, furnaces, packaging lines and special-purpose machines. |
| 4. CNC controller interface | Execution state, program name, part count, feed and speed overrides, alarms, axis and spindle load. | An Ethernet connection and the right option or software on the control: MTConnect, OPC UA or the builder’s own library. | CNC lathes, machining centres and grinders with a networked control. |
| 5. Added sensors | Things the machine does not measure itself: vibration, temperature, energy, part images. | The sensor, a gateway and somewhere to send the data. | Predictive maintenance, energy monitoring and vision inspection. |

> Methods 1 and 2 together cover most small plants: the signal gives honest run time and counts, and the operator supplies the job and the reason. That combination is described in the [paper job cards to live OEE](https://deda.systems/case-studies/paper-job-cards-to-live-oee) case study.

## The standards and protocols, in plain terms

| Name | What it is | Who maintains it |
| --- | --- | --- |
| Modbus | A simple protocol for reading and writing numbered registers in a PLC or instrument. Modbus RTU runs over a serial line and Modbus TCP over Ethernet. It was introduced by Modicon in 1979 and the specification is free. It has no built-in authentication, so it belongs on a protected network. | [Modbus Organization](https://www.modbus.org/) |
| MTConnect | An open, royalty-free standard that gives manufacturing equipment data a common vocabulary, so a part count or an execution state is named the same way on every machine. Software reads the data from an MTConnect agent over the network. It is designed for monitoring, not for controlling the machine. Version 1.4 is an American National Standard (ANSI/MTC1.4-2018). | [MTConnect Institute](https://www.mtconnect.org/), part of AMT, the Association for Manufacturing Technology |
| OPC UA | A platform-independent standard for exchanging industrial data securely, also published as the IEC 62541 series. It can read, write and subscribe to values. For machine tools there is a companion specification, OPC 40501-1 “OPC UA for Machine Tools”, which defines how a machine tool describes itself. The umati initiative promotes these companion specifications. | [OPC Foundation](https://opcfoundation.org/about/opc-technologies/opc-ua/); [machine tool specification](https://reference.opcfoundation.org/MachineTool); [umati](https://umati.org/) |
| MQTT | A lightweight publish and subscribe protocol for carrying messages from many devices to a central broker. It is the transport, and says nothing about what the data means. It is an OASIS standard; version 3.1.1 is also ISO/IEC 20922. Sparkplug, an Eclipse Foundation specification published as ISO/IEC 20237, adds a common payload format for industrial use. | [mqtt.org](https://mqtt.org/); [OASIS MQTT 5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html) |
| FANUC FOCAS | FANUC’s own programming libraries (FOCAS1 and FOCAS2) for applications that communicate with FANUC CNCs over Ethernet or HSSB, a fibre-optic link. It is a vendor interface, not an open standard, and it can write to the control as well as read from it. | [FANUC](https://www.fanucamerica.com/products/software/focas2-library) |

## What the common CNC controls offer

> This is what each builder documents publicly. **Whether a particular machine has it depends on the control model, its age and the options that were ordered.** Confirm with the machine builder or dealer before planning around it.

| Control | Documented interface | Builder’s reference |
| --- | --- | --- |
| FANUC | FOCAS libraries over Ethernet or HSSB. | [FOCAS2 library](https://www.fanucamerica.com/products/software/focas2-library) |
| Siemens SINUMERIK | An OPC UA server, offered as a licensed option for SINUMERIK 840D sl, 828D and SINUMERIK ONE. | [OPC UA configuration manual (PDF)](https://support.industry.siemens.com/cs/attachments/109807257/840Dsl_828D_OPCUA_config_man_0522_en-US.pdf) |
| Haas (Next Generation Control) | Machine Data Collection using Q commands over Ethernet, and MTConnect. | [NGC machine data collection](https://www.haascnc.com/service/online-manuals/next-gen-control-electrical---service-manual/ngc---machine-data-collection.html) |
| Okuma (OSP-P) | MTConnect, using an agent and adapter supplied by Okuma. | [Okuma MTConnect](https://www.okuma.com/mtconnect) |
| HEIDENHAIN TNC | HEIDENHAIN DNC and the HEIDENHAIN OPC UA NC Server, both software options. | [OPC UA NC Server brochure (PDF)](https://www.heidenhain.de/fileadmin/pdf/en/01_Products/Broschueren/BR_OPC_UA_NC_Server_ID1355797_en.pdf) |
| Mazak | MTConnect-compatible machine monitoring. | [Mazak monitoring and analysis](https://www.mazak.com/us-en/technology/monitoring-analysis/) |

**Questions to ask the machine builder:** Does this control have an Ethernet port that is enabled? Which data interface is installed, and is it a paid option? Which values does it expose? Is the interface read-only, or can it also write to the control?

## Where this sits in the plant

The standard ISA-95, published internationally as IEC 62264 “Enterprise-control system integration”, describes a plant in levels. It is a useful map when vendors use these words.

- **Levels 0 to 2.** The physical process, its sensors and actuators, and the PLCs, CNC controls and operator panels that run it.
- **Level 3.** Manufacturing operations management: scheduling, tracking production, quality and maintenance. This is where an MES, a job card system or an OEE system sits.
- **Level 4.** Business planning and logistics: orders, purchasing, stock and accounts. This is where the ERP or accounting system sits.

Machine data collection carries facts from levels 1 and 2 up to level 3, and a good system then passes finished quantities and consumption on to level 4 so nobody types them twice.

## Keep the machines on a protected network

- **Separate the machine network** from office Wi-Fi and from the internet. Machine controls often run old operating systems and should not be reachable from outside.
- **Prefer read-only access** for monitoring. If an interface can write to the control, restrict who and what can use it.
- **Data can stay in the building.** A collection server inside the plant works without an internet connection. Cloud is a choice, not a requirement.
- **Never change PLC or CNC parameters** to enable data collection without the machine builder’s guidance and a backup of the existing parameters.

## Where this comes from

> The formulas and definitions on this page are the standard published ones. These are the references we checked them against. If you find an error, write to [deep@deda.systems](mailto:deep@deda.systems) and we will correct it.

- [MTConnect Institute](https://www.mtconnect.org/). The MTConnect standard and its documentation.
- [OPC Foundation](https://opcfoundation.org/about/opc-technologies/opc-ua/). OPC Unified Architecture; [OPC 40501-1, OPC UA for Machine Tools](https://reference.opcfoundation.org/MachineTool).
- [Modbus Organization](https://www.modbus.org/). Modbus history and specifications.
- [OASIS, MQTT Version 5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html); [ISO/IEC 20922](https://www.iso.org/standard/69466.html).
- [ISA-95, Enterprise-Control System Integration](https://www.isa.org/standards-and-publications/isa-standards/isa-95-standard) (IEC 62264).
- Machine builder documentation linked in the table above: FANUC, Siemens, Haas, Okuma, HEIDENHAIN and Mazak.

## Frequently asked questions

### Do I need new machines to collect machine data?

No. Any machine can be covered by operator entry on a tablet, and most can give an automatic run signal and cycle count through a simple electrical signal. A networked controller is only needed for richer data such as program names, alarms and spindle load.

### What is the difference between MTConnect and OPC UA?

MTConnect is an open standard focused on monitoring manufacturing equipment, with a fixed vocabulary for machine data that software reads from an agent. OPC UA is a broader industrial data exchange standard (IEC 62541) that can read, write and subscribe to values, with companion specifications such as OPC 40501-1 for machine tools.

### Can I get data from an old CNC machine with no Ethernet port?

Yes. A signal taken from the stack light, a cycle-start relay or a current sensor on the supply gives run and idle time and a cycle count. The operator adds the job and the stop reason.

### Is Modbus secure?

Modbus has no built-in authentication or encryption. Devices that speak Modbus should sit on a separate, protected machine network and not be reachable from the office network or the internet.

### Does FANUC FOCAS come as standard?

Availability depends on the control model, its age and the options ordered with the machine. Confirm with the machine builder or FANUC before planning a project around it.

### Does machine data have to go to the cloud?

No. A data collection server can run inside the plant on the factory network, with no internet connection. Cloud hosting is optional.
