IMD SolutionComputing LibraryShop main store

How-to

Reusing Ignition edge tag structures on a central gateway

Edge computing and IIoT Published 7 min read

Short answer

Yes. Rebuild the edge UDTs as reference tags in a realtime provider at the central gateway so copied windows resolve unchanged, cluster the four brokers into two pairs, publish the regional and backup streams under distinct Edge Node IDs, and let the national UDT select the healthy source per tag.

On this page
  1. Can I reuse my edge project's windows and UDTs at the central gateway?
  2. Why don't the edge tag paths survive the trip over MQTT?
  3. How do I rebuild the UDTs as reference tags?
  4. Can MQTT Engine subscribe to two brokers for redundancy?
  5. How should four brokers be arranged?
  6. Should the regional and backup pairs publish the same Sparkplug identity?
  7. How does the national gateway choose the healthy source?
  8. When should I skip MQTT and use the gateway network?
  9. Questions asked

Yes, and the answer is one added layer rather than a rewrite: at the central gateway, create a realtime tag provider, rebuild the edge UDTs so every member is a reference tag into the MQTT Engine tree, and point the copied windows, templates and symbols at that provider. The four brokers are a separate decision: cluster them in pairs so each pair behaves as one redundant source, publish the regional and backup streams under distinct Sparkplug Edge Node IDs, and let the national UDT pick the healthy source per tag. The steps below take the two problems in the order you meet them: tag structure first, brokers and identity second, selection last.

Can I reuse my edge project's windows and UDTs at the central gateway? #

Yes — put a realtime tag provider between MQTT Engine and your screens, rebuild each edge UDT with reference-tag members pointed at the MQTT Engine tree, and every copied window resolves after a single provider or folder change.

The reference layer is the only tree your project ever binds to. It gives you a structure you control, it survives broker and identity changes because those live underneath it, and it becomes the single place where the source selection later in this article happens. Screens bound straight to the MQTT Engine provider inherit every change the transport makes, which is exactly what you are trying to avoid.

Why don't the edge tag paths survive the trip over MQTT? #

Because MQTT Engine builds its tree from Sparkplug birth certificates, every tag it auto-creates lands under the publisher's Group ID, Edge Node ID and Device ID instead of under your edge project's folders.

In the tag browser the auto-created tags sit in the provider the module keeps for itself, shown as [MQTT Engine] in a path. A tag provider is just a named tag database, so the central gateway ends up with two worlds: the edge-shaped tree your project understands and the Sparkplug-shaped tree the transport creates. Any window copied from the edge project still carries the edge provider name and edge folder paths, so its bindings resolve to nothing until they are repointed. Repointing hundreds of bindings by hand is the fate the reference layer exists to prevent.

How do I rebuild the UDTs as reference tags? #

Export the UDT definitions from the edge gateway, import them into the central realtime provider, and change each member from an OPC or memory tag into a reference tag whose Source Tag Path points at the matching MQTT Engine tag.

A reference tag refers to an existing tag using its Source Tag Path, and inside a UDT that path can be built from parameters. Work through it in this order:

  1. Create the realtime provider on the central gateway, in the gateway web UI under Config → Tag Providers → Realtime. One shared provider with a folder per edge unit is the layout that scales at a national center, because a folder name is one UDT parameter; one provider per edge unit is the alternative when projects must stay separable.
  2. Export the UDT definitions from the edge gateway's designer and import them into that provider.
  3. Change each member to a reference tag and set its Source Tag Path from the Sparkplug identity, for example [MQTT Engine]{group}/{node}/{device}/Run for a member named Run. The parameter names here are illustrative; the path needs one parameter each for the Group ID, the Edge Node ID and the Device ID. A tag reference built this way must not be wrapped in quotes.
  4. Instantiate the UDTs with the same instance names the edge project uses.
  5. Import the edge project's windows, templates and symbols, and change only the provider name or the top-level folder. Everything below resolves because the UDT structure is identical.

Configure history on these members, not on the auto-created MQTT Engine tags: in the gateway web UI under Config → Tag Providers → Realtime, edit the provider and set the historian options there.

Can MQTT Engine subscribe to two brokers for redundancy? #

Not as one merged data source: the server list in MQTT Engine and MQTT Transmission is a failover order, and the client stays attached to one server from that list at a time.

Server arrangement What the client does What you see
Two standalone brokers in one list Attaches to one; fails over on connection loss Transmission and Engine can sit on different brokers and stop seeing each other
Two clustered nodes, both listed Attaches to one node; messages route across the cluster Publisher and consumer exchange data whichever nodes they sit on
Two brokers carrying the same namespace as simultaneous sources Not a failover mechanism Competing births and deaths for one Sparkplug identity

Failover between two standalone brokers recovers only because the edge republishes births after reconnecting; when the consumer's state does not rebuild cleanly after a switch, you are in rebirth failures after switching Sparkplug MQTT brokers territory. The same one-attachment rule governs the controller side of the plant, covered in PLC MQTT failover to a redundant second broker.

How should four brokers be arranged? #

Cluster them in pairs — 4 brokers ÷ 2 nodes per cluster = 2 clusters — then list both nodes of a cluster in the server configuration of every Transmission and Engine that uses that pair.

One cluster serves the regional control center, the other serves the backup center. EMQX is one broker that documents clustering; whatever broker you run, the requirement is the same, that both nodes route messages between them so a publisher on one node and a subscriber on the other still exchange data. Every Transmission at the regional pair lists both nodes of the regional cluster, and every Transmission at the backup pair lists both nodes of the backup cluster. The national Engine keeps one failover set per cluster, so it holds one connection per data source and both streams stay visible to the selection layer. Run the two gateways of a redundant pair on separate fanless industrial mini PCs so one box or one power feed never removes both.

Should the regional and backup pairs publish the same Sparkplug identity? #

No: give the two streams different Edge Node IDs, because one Sparkplug identity cannot carry two live publishers — births and deaths from the two centers collide on that node and values alternate or go stale.

The symptoms of a shared identity are specific: values from the two centers alternate on the same tag, a death certificate from one center marks tags stale while the other center is still healthy, and rebirth requests loop between the sources. Keep the Group ID and Device ID identical across the two streams so the payloads map one-to-one, and make only the Edge Node ID differ, with the regional pair on one and the backup pair on another. The national Engine then shows two parallel trees with independent online state and per-tag quality, and the difference is one path segment your {node} parameter already absorbs. Keying tags to the right identifier is its own failure mode, which why Ignition MQTT shows tagid None and what to key on works through.

How does the national gateway choose the healthy source? #

Per tag, inside the UDT: give each member a regional reference, a backup reference and a selection tag that passes the regional value while its quality is good and the backup value when it is not.

When a stream's death certificate arrives, its MQTT Engine tags go stale, the reference quality follows, and the selection moves on its own with nothing rewired.

The arithmetic for that shape, with round numbers: a Motor UDT with four members — Run, Speed, Amps and Winding — needs per instance two references per member plus one selection tag, so 4 × (2 + 1) = 12 tags. A site with 30 motors carries 30 × 12 = 360 tags in the realtime provider, all governed by one UDT definition. If three of those motors lose regional quality, per-tag selection serves 27 from the regional stream and 3 from the backup — 3 ÷ 30 = 10% of the site switched — while a site-level switch would either discard 27 good regional values or carry the 3 bad ones. Alarm on each stream's online state regardless: selection keeps values flowing, and without that alarm a fully dead regional center looks like an ordinary screen.

When should I skip MQTT and use the gateway network? #

When every node is an Ignition gateway on routable IP and no third party needs the feed, the gateway network's remote tag providers expose the edge tree with its original folder structure and the remapping disappears.

Reading history through a remote provider has its own query path, covered in querying tag history from a remote tag provider. MQTT stays the right choice when you need report-by-exception over constrained links, third-party subscribers, a broker that already exists in the design, or a policy against direct gateway-to-gateway connections. The architecture here is already committed to the broker layer, which is why everything above assumes it stays.

Questions asked

Do reference tags add polling load at the central gateway?

A reference tag adds no scan of its own; it follows the tag its Source Tag Path names, so the gateway subscribes once to the MQTT Engine tag and the reference mirrors it. Size the provider by tag count and by what you enable on the members, such as history, not by the extra indirection layer.

Should history run on the MQTT Engine tags or on the reference tags?

On the reference members in your realtime provider. The MQTT Engine tree is rebuilt from birth certificates and is not where logging configuration should live; the realtime provider is edited in the gateway web UI under Config, Tag Providers, Realtime, and its members carry the historian settings you keep under change control.

How do I test the switchover without stopping production?

Stop one broker node in a cluster during a quiet period and confirm the client reattaches to the other node with no tag changes. Then take one whole cluster offline and watch the selection members move to the backup stream tag by tag. Repeat in the other direction, and finish by proving the death path marks the offline stream stale rather than freezing values.

What do screens show if both the regional and backup streams die?

Bad quality on every selection member and on everything bound to it. When an edge node's death certificate arrives, the MQTT Engine tags under that identity go stale, the references follow, and the selection tag has no good source left, so operators see faults rather than silently old values, which is also why each stream needs its own online alarm.

Do Perspective views rebind as easily as Vision windows?

Yes. Perspective views resolve tag paths the same way, so the same rule applies: import the views, repoint the provider name or the top-level folder parameter, and leave the paths below it alone because the UDT structure is identical to the edge project's.

Keep reading

  • How-to

    Push ClearSCADA values to MQTT through an edge gateway

    ClearSCADA and Geo SCADA do not publish straight to an MQTT broker: the value travels from the SCADA server through an edge gateway to the broker as two independent client connections. Prove the SCADA read on one known point and the MQTT publish on a fixed test payload separately, join them only after both pass, and chase a login failure in the server's own web logs, never in the broker settings.

    Edge computing and IIoT

  • Explainer

    Do you need a historian or just an OPC tag server?

    No. An OPC tag server (OPC DA) supplies the current value, quality and timestamp of each item and stores nothing, so monthly figures need a historian or a SQL logger collecting from that same server. Keep a reporting client like ActiveFactory only if you also run the historian it expects.

    Edge computing and IIoT

  • Comparison

    Getting Wonderware Historian data into Ignition Edge for MQTT

    Yes — Ignition Edge can publish this data as MQTT Sparkplug, but through two separate routes. Live values come from the existing DAServer acquisition layer behind a DA-to-UA gateway, because Edge's OPC client is UA-only. History and aggregates come from SQL queries against the Historian Runtime database, using its documented stored procedures.

    Edge computing and IIoT