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.

However, 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 Contents
minLevel2

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

The configuration parameters required to write historical events directly to the database, via the Historian, bypassing the Tag are shown below.

MQTT Engine

Under the MQTT Engine Settings General Tab, navigate to the Miscellaneous Settings and ensure Store Historical events is selected

Image Modified

Tag History Configuration

History must be enabled on the tag but the only property used from the tag history configuration is the Storage Provider.

All historic data will be written to Storage Provider, via the Historian, using the timestamp associated with the historical data.

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

Examples


Image ModifiedImage Modified





Image ModifiedImage Modified


Image ModifiedImage Modified







Writing historical events directly to tag

There are several reasons why you might need to write directly to the tag which include:

  • To have Tag Events scripts fire when applicable
  • If indirectly referencing MQTT Engine tags
  • To have alarms triggered when applicable

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

MQTT Engine

Under the MQTT Engine Settings General Tab, navigate to the Miscellaneous Settings and ensure Store Historical events is de-selected

Image Modified

Tag History Configuration

History must be enabled on the tag but the two settings required are:

  • Sample Mode set to On Change
  • Min Time Between Samples set to 0
    • This is to account for historical metrics with high resolution timestamp eg. timestamps 1 ms apart for a single tag.

Image Modified


All historic data will be written to Storage Provider, via the Historian, using the timestamp associated with the historical data.

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

 

Warning

When configuring MQTT Engine to write historical events directly to the tag, 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.


Note

If you are using MQTT Transmission, 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 Edge side 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. 

Image Modified

Examples


Image Added


Image Added


Image Added




Image Added





Image Added












Image Added