Difference Gateway Event vs Tag Event Scripts

There are differences, but your conclusions are the opposite of what you might find.

Both mechanisms will never miss a tag change event delivered by the tag system.

A gateway event tag change script has an unbounded queue to hold and execute these change events. You won’t ever miss events, but it’s technically possible to run your memory up if your script execution blocks for a long time, or indefinitely, as events continue to queue up.

Tag event scripts have a bounded queue, per-tag, size 5, and if an execution of a script on that tag takes too long it’s possible for the events to queue up and for the oldest changes to start getting discarded. This is what the missedEvents flag is for.

Most of the time people “miss events” it’s because they don’t fully grasp that data from PLCs is usually polled, and unless you’re using something like DNP3, which can buffer and deliver multiple changes per point, you can simply miss value changes in between polls.

1 Like