IndustrialPublished 7 min read

How Do You Connect an Existing PLC to an IoT Dashboard?

You connect an existing PLC (programmable logic controller) to an Internet of Things (IoT) dashboard by adding an industrial IoT gateway that reads the PLC through a protocol it already supports and publishes normalised tags over MQTT (Message Queuing Telemetry Transport) or HTTPS (Hypertext Transfer Protocol Secure). The PLC program stays unchanged and access stays read only.

How Do You Connect an Existing PLC to an IoT Dashboard?

You connect an existing PLC (programmable logic controller) to an IoT dashboard by adding an industrial IoT gateway that reads the PLC through a protocol it already supports, such as Modbus TCP, OPC UA (Open Platform Communications Unified Architecture) or a vendor native Ethernet protocol, and publishes normalised tags to the dashboard over MQTT (Message Queuing Telemetry Transport) or HTTPS. The PLC program and its control logic stay unchanged, and the gateway is configured for read only access by default. Where the PLC has no usable communication port, isolated hardwired signal taps or an added communication module provide the data instead.

What are the ways to get data out of a PLC without replacing it?

Most brownfield PLCs offer at least one of the following data paths. The right choice depends on the free ports, the protocols already enabled and how much change the controls owner will accept.

Data access methods for an existing PLC
MethodWhen it fitsTypical effortMain risk
Native Ethernet protocol (Modbus TCP, OPC UA, EtherNet/IP, Siemens S7 communication)PLC has a free Ethernet port or a switch port on the control network and the protocol is enabledGateway configuration; often no PLC program changeUnmanaged access to the control network if segmentation is skipped
Modbus RTU over RS 485Older PLC with a serial port configured as a Modbus slaveWiring, termination and register mappingOnly one master per RS 485 bus: use a free serial port, take over the master role, or read through SCADA (supervisory control and data acquisition)
Added communication modulePLC rack has a spare slot and the vendor offers a moduleModule purchase and installation during a planned stopNeeds a PLC hardware configuration download
Existing SCADA or HMI (human machine interface) as the sourceA SCADA system already polls the PLC and exposes an OPC serverConfiguration on the SCADA sideDependency on SCADA licences, uptime and tag naming
Hardwired taps through isolated I/ONo usable port, or the PLC cannot be touched under the machine warrantyElectrical work per signalWiring mistakes; taps must be isolated so control circuits are not loaded

What is the step by step procedure?

The procedure below assumes a single machine or line and an agreed set of dashboard use cases.

  • Step 1: Inventory the PLC. Record make, model, firmware version, free ports, enabled protocols, the existing master on each serial bus, every client on each Ethernet network and who owns the PLC program.
  • Step 2: Define what the dashboard must answer, for example machine state, part count, alarm codes and cycle time, and derive a minimum tag list with units, scaling, data type and required update rate for each tag.
  • Step 3: Locate each tag in the PLC: holding or input register addresses for Modbus, node IDs for OPC UA, data block addresses for vendor protocols. Ask for an export from the PLC programming tool instead of copying addresses from screens.
  • Step 4: Choose the access method from the table above and agree a written read only policy with the controls engineer: no Modbus write function codes, no writes to OPC UA nodes and no PLC program change without owner approval.
  • Step 5: Install the gateway on its own network segment, connected to the control network through a firewall or a dedicated interface, with outbound only connections to the cloud or on premises server.
  • Step 6: Configure polling. Read contiguous registers in one request, set intervals per tag class (for example 1 s for machine state, 10 s for temperatures, 60 s for energy counters) and set timeouts and retries that fit the bus master's polling cycle and the PLC connection limits.
  • Step 7: Normalise on the gateway. Apply scaling, convert raw counters to deltas with rollover handling, timestamp each value at acquisition and buffer locally (store and forward) during network outages.
  • Step 8: Publish over MQTT with TLS (Transport Layer Security) using a topic structure that names site, line, machine and tag, and a payload that carries value, unit, quality and timestamp.
  • Step 9: Validate for at least one full shift by comparing dashboard values with the HMI and physical counts, and record the result in a commissioning report.

How fast should you poll a PLC?

Poll only as fast as the use case needs. On Modbus RTU at 19,200 bit/s, each byte with start, parity and stop bits takes about 0.57 ms, so reading 10 holding registers (an 8 byte request and a 25 byte response) occupies roughly 20 to 25 ms of bus time before adding the PLC response delay and inter frame gaps. A bus shared with an HMI that already polls every 200 ms has limited spare capacity, which is why grouping registers and slowing slow tags matters. On Ethernet the bus time is negligible, but each request still consumes PLC communication processing, so check the communication load figures in the PLC diagnostics before and after commissioning.

How do you keep the PLC and the process safe?

Treat the PLC as a production asset that the IoT project must not disturb. Enforce read only access in two places: in the gateway configuration and in a firewall rule or protocol aware filter that blocks write function codes. Never bridge the control network to the office or internet at Layer 2; the gateway terminates the OT (operational technology) connection and opens a separate outbound connection. Any later request to write setpoints from a dashboard is a different project that needs a process safety review and a change procedure. The security side of this is covered in our guide on securing an industrial IoT gateway and OT network connection.

Commissioning checklist

Sign off each item before the dashboard is handed to production users:

  • Tag list approved with addresses, data types, units, scaling and a named owner.
  • Read only access confirmed in the gateway and enforced by a firewall or filter rule.
  • Existing HMI and SCADA communication error counters unchanged after the gateway starts polling.
  • Polling load measured on the serial bus or in the PLC communication diagnostics.
  • Gateway clock synchronised with NTP (Network Time Protocol) and time zone handling verified.
  • Store and forward tested by disconnecting the uplink for a defined period and checking for gaps.
  • Counter rollover, PLC restart and power cycle behaviour tested.
  • Dashboard values compared with HMI values and physical counts for at least one shift.
  • Credentials, certificates and remote access procedure documented and handed over.

When does this approach not apply?

Safety PLCs and safety rated I/O should only be read through interfaces the vendor documents for diagnostics, and never written. Some OEM (original equipment manufacturer) machines restrict any connection under warranty, which leaves hardwired taps or an OEM data option. A PLC scan cycle is not a high frequency measurement system: vibration or current waveforms sampled in kHz need dedicated sensors and an edge device, not PLC polling. Finally, a dashboard built on undocumented PLC addresses is fragile; when the PLC program changes, the tag list must be revalidated.

Sources and standards

Standards and specifications referenced in this guide:

  • IEC 61131 Part 3 (PLC programming languages)
  • Modbus Application Protocol Specification V1.1b3 and Modbus over Serial Line V1.02
  • IEC 62541 (OPC UA)
  • OASIS MQTT Version 5.0
  • IEC 62443 series (security for industrial automation and control systems)
PLCIndustrial IoTModbusOPC UACommissioning

EmbedCrest Engineering Team

Embedded Systems Engineers at EmbedCrest Technology

Embedded systems, IoT and Edge AI engineering, delivered from Kalyan, Maharashtra, India.

FAQ

Frequently Asked Questions

How do you connect an existing PLC to an IoT dashboard without replacing the PLC?

Add an industrial IoT gateway that reads the PLC over a protocol it already supports, such as Modbus TCP, Modbus RTU or OPC UA, and publishes the data to the dashboard over MQTT or HTTPS. The PLC program stays unchanged, access is read only, and controllers without a free port are covered by isolated hardwired signal taps.

Do I need to change the PLC program to collect data?

Usually not. Most data a dashboard needs, such as state bits, counters and alarm words, already exists in PLC memory and can be read over an enabled protocol. A program change is needed only when a value is not stored anywhere, for example a reject count, and then it goes through the plant change procedure with the controls owner.

Can the gateway read the PLC while SCADA is also polling it?

Yes, on Ethernet protocols the PLC serves several clients, within its connection limit. On a Modbus RTU serial bus only one master is allowed, so the gateway takes over the master role, reads from SCADA instead, or uses a separate PLC port. Check PLC connection limits before adding a client.

What if the PLC has no free communication port?

Options are an added communication module in a spare rack slot, reading the same data from an existing SCADA or HMI, or tapping signals such as running state and cycle complete through isolated digital inputs and current transformers. Hardwired taps give fewer signals but leave the PLC and its program untouched.

Which protocols does a gateway typically use to read an existing PLC?

A gateway typically reads an existing PLC over Modbus RTU, Modbus TCP or OPC UA, or over vendor protocols such as EtherNet/IP, Siemens S7 communication or Mitsubishi SLMP where drivers exist. Controllers without a usable port are read through isolated digital or analog I/O. Northbound, the gateway usually publishes over MQTT with TLS. The full list of factory gateway protocols is compared in our Modbus vs OPC UA vs MQTT article.

Related Articles

Continue Reading

Explore more articles on related embedded systems topics.

Building Industrial IoT Gateways: Architecture and Best Practices
Industrial

Building Industrial IoT Gateways: Architecture and Best Practices

Design and build robust IIoT gateways, covering hardware selection, protocol translation, edge computing, security, and cloud platform integration for connected plants.

Read Article
Modbus vs OPC UA vs MQTT: Which Protocol Fits a Factory Gateway?
Industrial

Modbus vs OPC UA vs MQTT: Which Protocol Fits a Factory Gateway?

Most factory Internet of Things (IoT) gateways use all three: Modbus reads meters, drives and older programmable logic controllers (PLCs), OPC UA (Open Platform Communications Unified Architecture) reads structured data from modern controllers, and MQTT (Message Queuing Telemetry Transport) publishes normalized data to a broker or cloud. This comparison explains where each fits and how to choose.

Read Article
How Is OEE Calculated From Machine and PLC Data?
Industrial

How Is OEE Calculated From Machine and PLC Data?

OEE (Overall Equipment Effectiveness) is calculated as Availability multiplied by Performance multiplied by Quality, using running state, total count and reject count from the PLC (programmable logic controller) plus planned production time and ideal cycle time from engineering data. This guide shows the formula, a worked example with hypothetical numbers and the data checks that keep the result honest.

Read Article
How Do You Secure an Industrial IoT Gateway and OT Network Link?
Security

How Do You Secure an Industrial IoT Gateway and OT Network Link?

You secure an industrial Internet of Things (IoT) gateway by segmenting it between operational technology (OT) and information technology (IT) networks, allowing only outbound encrypted connections with mutual Transport Layer Security (TLS), giving each device a unique identity, enforcing secure boot and signed updates, and keeping control devices read only. IEC 62443 gives that work a structure.

Read Article

Ready to Build Your Embedded Solution?

From Edge AI to industrial IoT, our engineering team delivers end to end embedded systems solutions. Let us discuss your project requirements.

Discuss This With an Engineer