IMD SolutionComputing LibraryShop main store

Troubleshooting

Run central tag event scripts on remote Edge tags

Edge computing and IIoT Published 8 min read

Short answer

Tag Event scripts on tags hosted by a remote tag provider do not execute on the central Ignition gateway: the provider shares values and definitions, not event execution. Host the logic in a Gateway Tag Change event on the central gateway, subscribed to the remote tag's provider-qualified path.

On this page
  1. Why don't my tag event scripts run on the central gateway?
  2. What does a remote tag provider actually share?
  3. Where should the event script live instead?
  4. How do I set up the Gateway Tag Change event?
  5. How do I know the event fired and the actions ran?
  6. Why does the script run but the query or tag write fail?
  7. Should any of this logic stay on the Edge gateway?
  8. Questions asked

Tag Event scripts attached to tags hosted by a remote tag provider do not execute on your central Ignition gateway. A remote provider is a link to the tag provider on another gateway: it shares values and tag definitions over the Gateway Network, and it does not hand event execution to the gateway browsing the tags. Ignition Edge also disables gateway-level scripting, so the event has no host on either side. The fix is a Gateway Tag Change event on the central gateway, subscribed to the remote tag's provider-qualified path. That arrangement runs the named query and the tag write reliably and keeps the Edge gateway collecting. The steps below configure it, verify it, and close the two failure points that remain: gateway-scope database access and write permissions on the remote provider.

Why don't my tag event scripts run on the central gateway? #

Because a remote tag provider only links your central gateway to the tags on the Edge gateway: it shares values and tag definitions over the Gateway Network, and it does not move the execution of a Tag Event script to the gateway browsing the tags.

Your own test already narrowed the fault. The same UDT pasted into the central gateway's local tag provider, pointed at the same PLC data, fired the named query and wrote the destination tag, so the script, the query and the write are sound. The only variable left is which gateway hosts the tag. Being able to open and edit the UDT under All Providers/RemoteSite1/Data Types in the central Designer is configuration access, not execution ownership. And on the Edge side, Ignition Edge does not run gateway-level scripting, so the event attached to the Edge-hosted tag has no runtime there either. Neither gateway executes it, which is exactly what the bench test showed: no query, no write, good quality throughout.

What does a remote tag provider actually share? #

Values, tag definitions and edit access: the Ignition User Manual describes the remote tag provider as a link from your gateway to a provider on another gateway across a Gateway Network connection, and the shared tags behave like local ones for browsing and reading.

Inductive University's remote tag provider material shows the shared tags behaving like normal provider tags: editable, readable and writable from the central side. What is not shared is the hosting gateway's script context, the runtime that would execute a Tag Event, because that belongs to the gateway hosting the tag. History follows the data path rather than the script context, so trends keep working through the provider even while tag events do not: querying tag history from a remote tag provider uses the same provider-qualified paths. How you carve providers per site then decides what each central subscription can see, and Ignition tag provider architecture comparing single and multiple PLC providers works through that split.

Where should the event script live instead? #

In a Gateway Tag Change event on the central gateway, subscribed to the remote tag's provider-qualified path: the central full gateway owns detection, calls the named query and writes the destination tag, and this is the arrangement that works in practice.

The central gateway is a full Ignition gateway, so gateway event scripting exists exactly where you need it. The Edge gateway keeps its OPC device and its tag provider; nothing on the Edge side has to change. Collect at the edge, act centrally — the same split used when bridging OPC UA PLC data to MQTT with an edge PC.

How do I set up the Gateway Tag Change event? #

Create the event in the central gateway project, point it at the changing tag under the remote provider, and keep the destination tag out of the subscription so the script's own write cannot retrigger it — that one scope decision prevents most duplicate-run complaints.

  1. Confirm the Gateway Network connection to the Edge gateway shows running, and that the remote provider — RemoteSite1 in the test setup — is connected with the source tag browsing at good quality.
  2. In the central gateway's Designer, create a Gateway Tag Change event in the project the running gateway actually uses.
  3. Browse to the source tag under All Providers/RemoteSite1 and take the full path the browser shows; verify you did not pick a same-named local test tag.
  4. Choose the event mode deliberately: fire on value change, add a deadband when small excursions should not act, and treat quality changes as a separate condition so a flapping link cannot run your query.
  5. In the script, call the project's named query with its parameters, then write the destination tag with a matching data type.
  6. Save and push the project so the runtime gateway holds the change; an edit sitting in the Designer is not proof of that.

What does a 1 Hz toggle cost the central gateway? #

Eighty-six thousand four hundred executions a day at one change per second: a 1 Hz toggle is cheap for one tag and ruinous for fifty, and the arithmetic below sets the subscription scope. The test PLC toggles the source once per second, and a day holds 24 × 60 × 60 = 86,400 seconds, so the event fires 86,400 times per day. At an illustrative 120 ms per named-query execution — an example input, not a specification — the gateway spends 86,400 × 0.120 s = 10,368 s ≈ 2.88 h per day inside that one event, a 10,368 / 86,400 = 12% duty. One tag at 12% is comfortable. Ten identical tags are 10 × 12% = 120% of one execution path, and fifty are 600%, so subscribe only to tags whose change must act, deadband the noise, and keep the expensive query out of the per-change path when rates climb. Scaling toward hundreds of remote tags on one central gateway is a sizing question of its own, and sizing one Ignition gateway for 100,000 OPC UA tags covers where that load lands.

How do I know the event fired and the actions ran? #

Trigger one known transition on the PLC, then check three things in order: the event's execution in the gateway logs, the database row from the named query, and the destination tag's new value — each side effect gets its own check, in that order.

  • Watch the source tag in the central tag browser: it must keep changing at good quality, which proves the provider link is live before you judge the event.
  • Confirm the event ran, from gateway logs or a temporary logging line you remove after the test.
  • Confirm the named query updated the intended row, and only that row.
  • Confirm the destination tag holds the expected value and type.
  • Repeat several transitions to catch duplicate runs.
  • Drop and restore the Gateway Network link once and repeat a transition: central features that stop and stay stopped after a disconnect are a known pattern — why Ignition tag history disables after a gateway disconnect covers the same class of failure — and a test pass is the cheap place to find it.

If a check fails, map it straight to the cause:

What you see What it means What to do
Remote tag changes at good quality; no query, no write The value path works; the event has no host Move the logic into a central Gateway Tag Change event
The local-provider copy runs both actions Script, query and write are sound Keep them; only the hosting gateway was wrong
Central event configured but silent Wrong path, undeployed project, or unmet condition Recheck the subscribed path, push the project, recheck the event mode
Script runs, database row unchanged Gateway-scope query problem Check the named query's path, parameters and connection in gateway scope
Query works, destination tag unmoved Write path, type or permission Verify the destination path, data type and provider write permission

Why does the script run but the query or tag write fail? #

Because gateway event scripts run in the gateway's scope, not a client session: check the named query's path, parameters and database connection as the central gateway sees them, and for a remote destination tag, confirm write permissions are enabled on that provider before blaming the event.

A named query that tests clean in the Designer can still fail from a gateway event when the connection or project context differs, so verify the database connection the query binds to is available to the running central project. Writing through a remote tag provider is a deliberate, documented permission: Ignition requires write permissions enabled on the provider before remote writes go through, and a good-quality readable tag proves nothing about write access. Treat that permission as a security boundary — enable it for the one provider on the one segmented Gateway Network link that needs it, and nothing broader. Match the source and destination data types on purpose; a mismatch fails the write or lands a coerced value. Rapid repeated runs mean the destination tag sits inside the subscription and the script's own write is retriggerring the event, so take it out.

Should any of this logic stay on the Edge gateway? #

Only collection: Ignition Edge disables gateway-level scripting, so the Edge box hosts the OPC connection, the tags and their alarms, while every named query, database write and cross-tag action belongs in the central gateway's event scripts.

Edge still earns its cabinet space: it holds the OPC connection and the tag provider, and it keeps logging history to its own storage through a WAN outage — where the Ignition Edge tag historian writes its data covers that local store. If an action must execute while the central gateway is unreachable, a tag event on the Edge side cannot be the mechanism, because the runtime that would execute it is disabled there; the edge-side answers are local history for the data and publishing changes over MQTT for the signal.

The decisions, case by case:

  • Named queries and central tag writes on remote-site data: central Gateway Tag Change events on provider-qualified remote paths — the committed pattern for this architecture.
  • Central actions that must write back to the Edge site: the same events, with write permissions enabled on that one provider only.
  • Actions that must survive a WAN outage: not tag events at all — Edge local history plus MQTT publishing carries them instead.

Questions asked

Is moving the UDT into the central gateway's local provider a valid fix?

It makes the events fire, because the tag is then hosted on the full gateway where gateway scripting exists — your local-provider test proved exactly that. But it pulls tag hosting away from the Edge gateway. If the tags must stay at the remote site, keep them there and use a central Gateway Tag Change event; you get the same actions without moving the collection.

Can I edit the remote tags from the central Designer?

Yes. A remote tag provider lets the central Designer browse and edit the shared tags, read their values and write them where permissions allow. That is configuration and data access, not execution: being able to open the UDT under the remote provider does not make its Tag Event run on the central gateway.

Do tag events fire on quality changes and alarms as well as value changes?

Tag events respond to value changes, quality changes and alarm conditions, and you choose which one triggers the script. On a remote-provider tag this matters twice: a flapping Gateway Network link produces quality changes with no real value change behind them, so firing on quality can run your query for no process reason.

What happens to changes that occur while the Gateway Network link is down?

The central gateway cannot fire an event on a change it never saw. When the link returns, the event acts on subsequent changes, not on the ones missed during the outage. If you need the missed values, recover them from the Edge gateway's local history rather than expecting the event to catch up.

Keep reading

  • How-to

    Pushing UDT definitions to Ignition Edge gateways with EAM

    Yes. An EAM Send Tags task pushes nested UDT definitions to every Edge gateway, because each gateway resolves its instances locally; a remote tag provider will not resolve a type held only on the main gateway. Expect remote tag delay of the 100 ms poll rate plus the network round trip, delivered over WebSockets.

    Edge computing and IIoT

  • Explainer

    ABB TotalFlow module for Ignition: what exists today

    The ABB TotalFlow entry on the Ignition Edge IIoT page is an entitlement, not a download: the driver is a third-party Cirrus Link module that reached beta after that listing was written. It runs on Ignition Edge and standard Ignition, polls G2 late, G3, G4 and G5 flow computers, and needs MQTT Transmission to publish, because the G5 has no native MQTT client.

    Edge computing and IIoT

  • Troubleshooting

    Edge tags unreachable after a PC replacement

    Keep the remote tag provider as it is. After an Edge PC replacement, the SecurityException on provider access traced to the MQTT Transmission module, whose entitlement did not survive the backup, license transfer and restore; reinstalling the module restored browsing from the central gateway. Confirm zones and tag-access policy first, then check module licensing before touching the provider.

    Edge computing and IIoT