Versions Compared

Key

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

...

The recommended way of configuring history for MQTT Engine tags is to use reference tags to indirectly reference MQTT Engine tags. This allows the history configuration to be persisted on the reference tag when the underlying MQTT Engine tags are deleted. 

Note
The reference tag must be a Reference tag only.  Derived, Expression and OPC tags (expose MQTT Engine tag provider through OPCUA server) will not properly store history when MQTT Engine tags are updated with historical data at a high rate of speed. This is a limitation within the Ignition platform and may be addressed in a future release.

...

  • To have Tag Events scripts fire when applicable
  • To have alarms triggered when applicable
  • You are using reference tags and not using the Ignition back-fill option

The configuration parameters required to write historical events to the Tag instead of directly to the Historian are detailed below. 

...

History must be enabled on the tag (either directly on the MQTT Engine tag or reference tag) with these two settings required:

...

Note
All other properties such as Max Time Between Samples, Deadband etc are ignored when writing historic data

 

...

Edge Client 

If you are not using reference tags, the Edge side client must publish historic data in-order (synchronously) before live data resumes. This is because because Ignition will ignore writes to the tag if the timestamp on the tag change is older that the current value.

If you are using reference tags and have the Ignition Allow Back-fill Data disabled on the tag provider that will contain the reference tags

...

, the Edge side client must publish historic data in-order (synchronously) before live data resumes.

...

This is because because Ignition will ignore writes to the tag if the timestamp on the tag change is older that the current value.

If you are using reference tags and have the Ignition Allow Back-fill Data enabled on the tag provider that will contain the reference tags, the Edge side client can publish historic in-order either synchronously or asynchronously. Using each of these different flush methods has the following implications:

  • In-order history from the Edge Node
    • Historical data will be stored for the Reference Tag
    • If history is enabled on MQTT Engine tags, historical data will be stored the MQTT Engine Tag
  • Asynchronous history from the Edge Node
    • Historical data will be stored for the Reference Tag
    • Even if history is enabled on MQTT Engine tags, historical data will not be stored the MQTT Engine Tag. New values will only be stored in the historical database if it is a non-historical value.


Note

If you are using MQTT Transmission as the Edge side client, under the MQTT Transmission Settings for your transmitter, navigate to the History Settings and ensure that to select or deselect the In-Order History is selectedconfiguration parameter.

This ensures that As shown below, when the MQTT Transmission client comes back online and flushes history, it will flush the oldest historical events first (in order) before sending live Tag changes events to Engine. 

Examples





Anchor
backfill
backfill
Ignition Allow Back-fill

...

Data

Starting

...

Historical back-fill support was added in Ignition 8.1.4 which allows Reference Tags in Ignition to be updated even if history arrives out of order. See the following document for details : MQTT History Back-Fill with Reference TagsIf using an Ignition release before v8.1.4, in order for the historical tag changes at the MQTT Engine tag to propagate to the referencing tag, MQTT Engine must be configured to write historical data directly to its tags. See the Writing historical events directly to tag section for configuration details.Ignition supports a feature to 'back-fill' historical data for tag providers.

Normally if a tag is updated with a value that is older than the current value, Ignition simply throws it away. In doing so, no tag change event will ever fire and the tag will not be updated. The back-fill option allows the value to be stored to the historical database if history is enabled on that tag. However even with this option enabled, it is important to note that no tag change event will fire. So, tag change event scripts, transaction groups, and any other subsystem that relies on tag change events will not be notified of the event if it is older than the current tag value (i.e. is historical).

To enable this option, browse to the Ignition Gateway Web UI → Config → Tag Providers → Realtime. Select 'edit' for the Tag Provider that will contain Reference Tags that will point to MQTT Engine tags. Scroll to the bottom and click the 'Show advanced properties' checkbox. This will show the 'Allow Back-fill Data' option. Set it to true as shown below and then click 'Save Changes'.

Image Added