Versions Compared

Key

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

The history configuration for MQTT Engine tags can be configured as needed for your specific requirements as described in Ignition's Configuring Tag History and  How the Tag Historian System Works documents.

...

There are however some caveats regarding tag history configuration persistence and handling of historical event data that are detailed in this document.

Table of Contents
minLevel2

History Configuration Persistence  

Currently history

...

configuration for MQTT Engine tags is not persistent

...

and it may be required to delete MQTT Engine tags in certain cases

...

. One example is UDTs which are being propagated from the Edge and the UDT definition on the Edge has been updated. This requires one to delete all instances of the UDT under MQTT Engine and delete the corresponding UDT definition so that it can be recreated/updated at MQTT Engine for the Edge side changes to take affect.

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.

Alternatively you can use scripting to reapply the history configuration directly to MQTT Engine tags on demandHowever, when using MQTT Store and Forward where historical events will be published, there are some caveats to be aware of.


MQTT Engine Historical Event Processing

MQTT Engine has two ways to process historical events and insert the historical data into Ignition's Tag Historian module Table of ContentsminLevel2:

  • Writing historical events directly to the database, via the Historian, bypassing the tag
  • Writing historical events directly to the tag


Anchor
writetodatabase
writetodatabase
Writing historical events directly to the database, via the Historian, bypassing the tag

...

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 In-Order History is selected.

This ensures that 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

...

History configuration for MQTT Engine tags is not persistent however it may be required to delete MQTT Engine tags in certain cases.

For example if UDTs are being propagated from the Edge and the UDT definition on the Edge has been updated. This requires one to delete all instances of the UDT under MQTT Engine and delete the corresponding UDT definition so that it can be recreated/updated at MQTT Engine for the Edge side changes to take affect.

There are two options for persisting history configuration in this case and they are as follows:

Reference Tags

The recommend 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.

...

...


Back-fill support

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 Tags

If 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.

Scripting

Use Ignition scripting to reapply history configuration directly on MQTT Engine tags on demand.