Most plants don't have a "smart factory" problem. They have a 20-year-old press next to a 3-year-old CNC next to a compressor nobody has opened since it was installed. The data you need (running hours, stoppages, current draw, temperature, energy) often already exists inside a PLC, a drive or an energy meter. It just has never left the panel.
Retrofitting means getting that data out without replacing the machine or rewriting its control logic. It's usually the first step towards real-time machine monitoring and automatic OEE. This guide explains the three ways to do it, how to choose per machine, and the mistakes that cause bad data.
Three ways to get data from an existing machine
| Method | How it works | Best for | Watch out for |
|---|---|---|---|
| 1. Read the controller | Poll the machine's PLC, drive (VFD) or CNC controller for values it already holds, usually over Modbus TCP, Modbus RTU (RS-485) or OPC UA | Machines with a PLC or drive that exposes data: counts, speeds, states, alarms | You need the register map. Some controllers lock their ports, and some integrators restrict access under warranty |
| 2. Read the meters | Poll existing energy meters, flow meters or temperature controllers, almost always over Modbus RTU | Energy per machine or line, utility monitoring | Word order and scaling mistakes (see below) |
| 3. Add sensors | Fit non-invasive sensors: a current clamp for run/idle/off, a vibration sensor on a bearing, a temperature probe, a proximity sensor to count parts | Old machines with no controller, or where you can't touch the controller | Mounting position matters. Calibrate against a real reading |
Most real plants use all three: read the PLC where there is one, read the meters that are already installed, and add clamps or vibration sensors to the rest.
How to choose, machine by machine
Work through each machine with these questions:
- Does it have a PLC, drive or CNC controller? If yes, find the make and model, and check whether it supports Modbus, OPC UA or the maker's own protocol.
- Can we get the register map or tag list? It's in the manual, or with the machine builder or the integrator who programmed it. Without it, reading the controller is guesswork.
- Are we allowed to connect? Check with whoever maintains the PLC program and with the machine's warranty terms. Reading is far less risky than writing, so insist on read-only access.
- If none of the above: what do you actually need to know? For "is it running, and for how long?" a current clamp on the motor supply is often enough. For "is the bearing wearing out?" you need a vibration sensor.
| What you want to know | Simplest source |
|---|---|
| Running, idle or off; running hours | Current clamp, or a "run" signal from the PLC |
| Parts produced | PLC counter, or a proximity sensor on the output |
| Stoppage reasons | PLC alarm codes, plus a simple operator input (tablet or button box) |
| Energy per machine | Existing or added Modbus energy meter |
| Bearing or motor health | Vibration and temperature sensors |
| Hydraulic or pneumatic health | Pressure sensor |
The gateway: the small box that does the heavy lifting
Between the machines and the cloud there's usually a gateway on site. It:
- Polls each controller and meter at a set interval.
- Converts protocols, for example reading Modbus and publishing to the platform over MQTT (this is what people search for as a "Modbus to MQTT gateway").
- Buffers readings when the internet drops and sends them later with the correct timestamps.
- Protects the machine network, so the cloud never connects directly to a PLC.
On the network side, the gateway can sit on plant Ethernet, Wi-Fi, a 4G link or a LoRa link, depending on what reaches the machine. (See choosing connectivity for industrial monitoring.)
Where retrofits go wrong: decoding
Wiring a Modbus connection is the easy part. Turning raw register values into correct engineering numbers is where most integrations break. The classic mistakes:
| Mistake | What you see | Cause |
|---|---|---|
| Wrong word order | A meter reads exactly double, or a nonsense number | 32-bit values span two registers. Some devices send the high word first, others the low word |
| Missing scaling | 215 °C instead of 21.5 °C | The device stores one decimal place as a whole number. The map needs a ×0.1 scale |
| Signed vs unsigned | A small negative value shows as 65,000-something | The register holds a signed number but is read as unsigned |
| Wrong register bank | A "running" bit always reads 0 | Coils, discrete inputs, input registers and holding registers are separate tables in Modbus. Address 0 in one isn't address 0 in another |
| Filling gaps | Smooth charts, wrong reports | A missing reading was replaced with zero or the last value |
Our rule is simple: never fabricate a reading. If a register read fails or a value is out of range, that reading is dropped and flagged, not guessed. For anything feeding a maintenance alert or a compliance record, a gap is far safer than a wrong number. Our engineering note on connecting PLCs and meters over Modbus shows how our platform handles each of these cases.
Safety and permissions
- Panel work is electrical work. Use a qualified electrician, follow your plant's lock-out/tag-out procedure, and get the panel owner's sign-off.
- Read-only first. A monitoring project should never write to a PLC. If a later phase needs control (for example remote start/stop), treat it as a separate project with its own safety review.
- Keep the machine network separate. The gateway should be the only bridge between the machine network and the internet.
The survey checklist
Before any quote, collect this for every machine:
- Make, model, year, and the PLC/drive/CNC model if any
- Communication ports available (Ethernet, RS-485, none) and protocols supported
- Register map or tag list: available, obtainable, or unknown
- Who maintains the PLC program, and do they approve read-only access?
- Existing meters on the machine or its feeder
- Power available near the panel for a gateway or sensor
- Network reach at the machine (Wi-Fi strength, mobile signal, cable route)
- Safe mounting points for clamps or vibration sensors
- What decision this data should support (the reason we're connecting it)
Frequently asked questions
Do we need to replace our PLCs to do IoT?
Usually not. If the PLC can be read over Modbus, OPC UA or the maker's protocol, a gateway can read it without changing its program. If it can't, add-on sensors can capture most of what you need.
Can we monitor machines that have no PLC at all?
Yes. A current clamp on the motor supply tells you when the machine is running, idle or off. Vibration and temperature sensors tell you about its health. Neither requires opening the control panel's logic.
What's a Modbus to MQTT gateway?
A device that reads Modbus registers from machines and meters on site and publishes the values to an IoT platform using MQTT, a lightweight messaging protocol designed for unreliable networks.
Will connecting a gateway affect the machine's operation?
Read-only polling at a sensible interval doesn't change what the PLC does. Still, test it during a planned window first, and agree the polling rate with whoever maintains the PLC.
How long does a retrofit take per machine?
It depends on what the survey finds. Machines with readable controllers and known register maps are quick. Machines that need new sensors, cabling or a register map worked out by testing take longer. Your vendor should give a per-machine estimate after the survey, not before.
Have machines you want to connect? Send us the make and model of your PLCs and meters, and we'll tell you what can be read as-is and what needs a sensor. Talk to our IoT engineers → · See machine monitoring running →