Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Prerequisites

Installation of Cirrus Link Modules at v4.0.10 or greater

  • Distributor
  • Transmission
  • Engine

Abstract

Tag Latching is used for synchronizing events at an Ignition Gateway running MQTT Engine. In a normal running system events will arrive at MQTT Engine in real time typically at a fairly regular known rate. However, this can increase dramatically when Edge Nodes (MQTT Transmission) is flushing historical data. Also, if events are occuring quickly and need to be synchronized, when using tag change scripts.

If events are occurring very quickly (many times per second) this can lead to synchronization problems in tag change scripts and the use of trigger and latch tags can be used to accomplish thisresolve this.

Another scenario for rapidly changing tags is when the Edge Node is flushing large volumes of historical data and MQTT Engine is configured to write these historical events directly to the tag. 


In this tutorial we will show how to use trigger and tag latches to synchronize events.



Trigger and Latch Tag Usage

...

The problem arises when we have store and forward configured in MQTT Engine or if the tag change rate is much faster. For store and forward this only applies if we're using 'in order' store and forward. Make sure you understand this document before proceeding. Only in order store and forward will trigger tag change events including our example script. With a flush quantity's default value of 10000, MQTT Engine could receive 10000 tag change events and call 'update tag' on both Data1 and Data2 very quickly (many times per second). This can lead to synchronization problems in our tag change script. This is because by the time the script is reading Data2, MQTT Engine has already written a new value to it and we end up with an erroneous output. See the output of this scenario below.

...