
How Is Data Read from a PLC?
Reading data from a PLC is the process of transferring status bits, counters, alarm codes and process values from the programmable logic controller’s memory to an MES, SCADA or data collection system through a communication protocol. Done correctly, machine data can be monitored in real time without the need for operator input.
- Routes: built-in OPC UA server, Modbus TCP, EtherNet/IP, brand protocols (Siemens S7, Mitsubishi MC, Omron FINS), gateway.
- Requirements: PLC IP address, address/tag map, network access, read permission.
- Priority data: running bit, part counter, alarm code.
- Rule: the MES only reads; write permission is defined separately.
How Is PLC Data Structured?
PLC memory consists of input (I), output (Q), flag/marker (M) and data block (DB) or register areas. The machine’s “running” information sits in these areas as a bit, the production count as a counter and the target temperature as a floating-point value. In modern PLCs these areas can also be presented as named tags (“Machine.Running”). The first step in reading data is to obtain the map showing which information is at which address and of which type.
Reading Methods
| Method | Suitable PLCs | Pros | Cons |
|---|---|---|---|
| OPC UA (built-in server) | Siemens S7-1500, Beckhoff, B&R, newer Rockwell | Secure, typed, named data | Not available on older PLCs |
| Modbus TCP | Almost all brands (enabled in the program) | Simple, widespread | Raw registers, no security |
| EtherNet/IP | Rockwell/Allen-Bradley, Omron NJ/NX | Reading by tag name | Brand-focused |
| Siemens S7 (ISO-on-TCP) | S7-300/400/1200/1500 | DB reading without programming | Access permission must be enabled on the 1500 |
| Mitsubishi MC, Omron FINS | The respective brands | Built-in, fast | Brand-dependent |
| Gateway / edge device | Serial or older PLCs | Converts any protocol to OPC UA/MQTT | Extra hardware, extra latency |
Step-by-Step Implementation
- Inventory: Machine, PLC model, firmware, existing communication card and IP address.
- Address map: Extract the addresses of the running bit, counter, alarms and recipe from the machine builder or the PLC program. If there is none, define a small “MES interface block” with the PLC programmer: all required data gathered in a single DB or register block.
- Network access: Open a firewall rule only for the required port from the OT segment where the PLC sits to the data collection server.
- Test read: Verify the values with a client tool by observing them at the machine: does the counter increase by one per part, does the bit really drop when the machine stops?
- Scanning and subscription: 500 ms–1 s for status bits, a few seconds for counters; prefer change subscriptions in OPC UA.
- Putting it in context: The count and status read are matched in the MES with the work order, product and shift; only then are OEE and downtime analysis produced.
Common Mistakes
- Not accounting for counter overflow (16 bit → 65535); negative values appear when calculating differences.
- Planning a project without access to the machine builder’s locked PLC program; request the address map at the contract stage.
- Deriving “running” from the motor output and counting idle running as production.
- Not noticing that addresses shifted after a firmware update; verify read values periodically.
Frequently Asked Questions
Can data be read without touching the PLC program?
Does reading data from a PLC slow down the machine?
Which PLC data is enough for MES?
PLC Data Reading in EFFIX MES
EFFIX MES connects directly to PLCs with the OPC UA, Modbus, EtherNet/IP, Mitsubishi MC and Omron FINS protocols; MTConnect is used for CNC machines and Euromap 63/77 for injection moulding machines. On machines without protocol support, Inolink wireless IoT nodes collect data at signal level. The status and counter values read are turned into automatic downtime records, OEE and work order progress; from the HMI terminal, the operator only completes information the machine cannot know, such as the downtime reason. For details, see the EFFIX MES page or request a demo.
