Comparison
Ignition PLC data over the internet: MQTT or a VPN
Short answer
An Ignition device connection is the gateway's own polling client socket, so no pipe module can sit between the OPC server and the tag. PLC data crosses the internet either through a VPN that keeps the existing driver, or as MQTT published on change from a converter at the PLC site. Use MQTT unless a secure site-to-site WAN already exists.

On this page
No Ignition module turns an OPC UA device connection into a transparent pipe across the internet, and none is needed. The device connection is the gateway's own polling client: the gateway opens the TCP session to the PLC and reads it, so the transport you would want to relocate already lives inside the gateway. PLC data crosses the internet by one of two paths. A VPN extends the IP network so the existing driver still reaches the PLC and the tag database stays untouched. Or a converter at the PLC site polls the controller on the local LAN and publishes the values over MQTT, and the gateway subscribes to the broker instead of polling across the WAN. The decision is simple: use MQTT unless a secure site-to-site WAN already exists. The sections below give the comparison, the traffic arithmetic, and the build and verification steps for both.
Why there is no pipe between the OPC server and the tag #
A tag fed by a device connection follows one path: the tag address in the Designer, the gateway OPC server, the device driver, the driver's TCP session to the PLC, the register read. The gateway initiates the session and drives the polling. Asking for the data to cross the internet before it reaches the tag means cutting that driver socket in half, but the socket is not a joint between two components you configure; it is the driver's own internal state. There is no layer between the OPC server and the tag where a module could pick the data up, because the OPC server is not relaying your request onward; it is generating reads of its own.
Three consequences set the design:
- Polling over a WAN adds one round trip per read cycle, and the cycle repeats whether or not a value changed.
- A dropped session takes every tag on that connection bad until the driver reconnects, so a flaky WAN link shows up as flapping tag quality.
- Modbus TCP carries no authentication and no encryption, so never forward the PLC's Modbus TCP port to the internet; the tunnel or the converter sits between the PLC and the internet instead.
Any data crossing the internet must therefore be either tunneled at layer 3 or converted at the site into a protocol designed for WAN transport.
The two paths side by side #
| Criterion | VPN tunnel | MQTT from the site |
|---|---|---|
| Who opens the connection | Tunnel endpoints at both sites; the driver session then looks local | Site converter dials the broker outbound; the gateway subscribes outbound |
| Ignition tag source | The existing OPC device connection, unchanged | An MQTT connection feeding tags in place of the device connection |
| Firewall rule at the site | A tunnel endpoint must be reachable, or must dial out | Outbound only |
| Traffic pattern | Fixed: the poll repeats every cycle, changed or not | Publish on change plus a heartbeat; an idle line goes quiet |
| Link loss | Session drops; all tags on the connection go bad until it recovers | Last-will message and birth and death certificates mark the site stale |
| Security carried by | The tunnel's encryption and your existing network policy | Broker authentication and TLS |
| Added equipment | A tunnel-capable router or firewall at each end | A converter at the PLC and a broker reachable from both ends |
The traffic row is the economic one, and for the same reason why OPC UA subscription updates beat polling PLC input changes: reporting a change costs a fraction of re-asking a question whose answer usually has not moved.
What the same site sends over each path #
Worked example, with example inputs: a site exports 400 tags, made up of 350 analog values sitting in 350 contiguous holding registers and 50 discrete inputs, at an update cycle of 2 s.
VPN path. Modbus TCP reads at most 125 holding registers per request, so the analog block needs three reads (125 + 125 + 100 registers) and the discretes one: four request/response pairs per cycle. Counting protocol bytes, a register read request is 12 bytes, and the response to a 125-register read is 7 header bytes + 1 function byte + 1 byte-count byte + 250 data bytes = 259, so that pair is 271 bytes. The 100-register pair is 12 + 209 = 221 bytes and the 50-input pair is 12 + 16 = 28 bytes, so one cycle carries 271 + 271 + 221 + 28 = 791 bytes.
At 791 bytes per 2 s cycle, the link moves 791 / 2 = 395.5 bytes per second, which is 395.5 × 86,400 = about 34.2 MB per day of application bytes, before TCP, TLS and retransmission overhead add their share. The load repeats every cycle whether the line is running or stopped. Latency sets a floor too: at a 60 ms round trip, four reads issued back to back with the driver waiting on each response add 4 × 60 = 240 ms to the cycle.
MQTT path. Publish the same 400 tags on change behind a 1% deadband, and assume the running line produces 2,000 tag changes per hour. At a conservative 150 application bytes per publish with no batching, that is 2,000 × 150 = 300,000 bytes per hour, so 300,000 × 24 = 7.2 MB per day; Sparkplug B publishers batch one report interval's changed tags into a single DATA message, so the real figure lands lower. Compare the two paths: 34.2 / 7.2 ≈ 4.7, roughly five times less traffic, and the MQTT load falls toward zero on a stopped line while the poll does not.
On a metered, shared or unreliable link, that ratio is the argument. On a private WAN whose cost ignores traffic volume, the poll's constant load is irrelevant and the VPN's untouched tag database wins.
Build the MQTT path #
- List what crosses the link: tag count, data types, deadband per analog, update behavior, and which tags need write-back.
- Place the converter directly behind the PLC. It polls the controller on the site LAN with the same register map the device connection used, which makes it a small site-level data concentrator; PLC data concentrator vs SCADA server for RTU polling covers where that role belongs. Keep the register poll on the LAN side: an edge gateway's Modbus TCP poll behaves differently when it runs over the WAN port, which edge gateway Modbus TCP polling over the WAN port treats in detail.
- Match the hardware to the tag count and the publisher software. Ignition Edge IIoT keeps the site inside the Ignition ecosystem; where a smaller footprint decides it, an industrial mini PC next to the controller is the usual host for a software publisher such as Node-RED.
- Stand up a broker reachable from both ends, and enable authentication and TLS before it faces the internet; a plain MQTT listener is not acceptable there.
- Configure the publisher for report on change with a heartbeat interval and a last-will message, and map topics one to one to the tag folders you want in the gateway.
- Configure the gateway as the broker subscriber and build the tags from that MQTT source, replacing the device-connection tags folder by folder.
- Decide stale-data behavior now, not after the first outage: birth and death certificates plus retained messages determine whether operators see stale, bad or empty tags when the site drops.
Build the VPN path #
- Put tunnel endpoints at the two sites and route the PLC subnet through the tunnel, so the gateway reaches the PLC address it already has.
- Leave the device connection untouched. Check the driver's connection timeout and reconnect behavior against the tunnel's rekey and recovery times, so a tunnel reset does not leave tags bad longer than operators expect.
- Load-test the link: force rapid changes at the PLC and watch the cycle time and tag quality over the tunnel.
- Prove failover by dropping the tunnel: tags must go bad, the driver must reconnect when the tunnel returns, and quality must recover without manual action.
Verify the link before operators trust it #
- Read the PLC values locally at the converter, through its diagnostics or a local client, and match them against the controller before anything crosses the WAN.
- Check the broker's client list for the site publisher's session, and confirm that session is authenticated and running TLS.
- Subscribe to the topic tree with a test client from the central side and confirm payloads change when a PLC value changes.
- Confirm the gateway tags show Good quality and values equal to the PLC's.
- Pull the site's WAN link, confirm the tags show the stale or bad state you defined, restore the link, and confirm recovery without manual action.
- Force one change at the PLC and compare its timestamp with the tag timestamp in the gateway to measure end-to-end latency.
How tag count changes the design #
Tag count sets two sizes: the converter's poll budget at the site and the message rate through the broker. Multiply tags per site by the update rate you can accept for a worst-case message rate, and multiply the poll rate by the register blocks per cycle for the converter's own budget, then check both against the converter's and broker's published limits. The central gateway's ceiling scales the same way as any Ignition tag load, which sizing one Ignition gateway for 100,000 OPC UA tags works through. A handful of tags on one machine never approaches these limits; a converter polling hundreds of registers per cycle for several sites is where the datasheet check earns its time.
The decision for each case #
A secure site-to-site WAN or corporate VPN already exists: tunnel the existing device connection through it and keep the tag database untouched. This is the only case where the VPN is the right first choice.
No WAN exists, the site may only make outbound connections, or the link is metered, shared or unreliable: put a converter behind the PLC, publish on change to an authenticated TLS broker, and subscribe from the gateway. No inbound firewall rule, traffic that tracks real change, and stale-data behavior you control.
Both are available: choose MQTT when link cost, volume or reliability dominates and the tag rework can be scheduled; choose the VPN when the tag database must stay frozen for a hard cutover on a private WAN. Either way, the conversion or the encryption happens before the internet, never after it.
Questions asked
Can the OPC UA device connection point at the MQTT broker directly?
No. The device connection speaks its driver protocol to a PLC, and an MQTT broker is not an OPC UA server. MQTT data enters the gateway through its own MQTT connection type, and the tags are built from that source instead of the device connection. The two sources can coexist on the same gateway while you cut tags over one folder at a time.
How does a tag write reach the PLC over MQTT?
MQTT is publish and subscribe, so a write needs a command topic plus a device at the site that acts on it. Sparkplug B defines a command message for exactly this: the gateway publishes the command, the site device writes the register and confirms on its next report. Design the acknowledgment path together with the command, or the operator never learns whether the write landed.
What do operators see when the site link drops?
Over the VPN, the driver session drops and every tag on that device connection goes bad until the tunnel and session recover. Over MQTT, tags hold their last published value; a configured last-will message and Sparkplug death certificates let the gateway flag the site's tags as stale, so a frozen value is not mistaken for a live one.
Where should the broker sit when there is only one remote site?
Put it at the central end. The site converter then makes the only outbound connection in the whole system and no firewall rule admits anything inbound. One broker is still required either way, because MQTT clients connect to a broker and never directly to each other.
Is Sparkplug B required, or will plain MQTT topics work?
Plain topics work, and they are fine for a single consumer you control. Sparkplug B earns its keep when a second consumer, integrator or vendor touches the same broker: it fixes the topic namespace and the payload encoding and adds birth and death certificates, so every subscriber interprets the same message identically instead of by private convention.


