Skip to end of metadata
Go to start of metadata

Before we get started on the requirements for enabling History on MQTT Engine Tags, one should take note of the two ways that MQTT Engine historical event processing can result in historical inserts into the database:

  1. Engine is configured by default, to write historical events directly to the database, via the Historian, bypassing the Tag.
  2. Engine can be configured to write historical events to the Tag instead of directly to the Historian. Reasons for writing directly to the Tag are:
    1. To have Tag Events scripts fire when applicable.
    2. To have alarms triggered when applicable.

There are caveats to configuration option 2 above (to write historical events directly to the Tag):

  1. If MQTT Engine is configured to write historical events directly to the Tag, history on the Edge (i.e., Transmission side) must be configured to flush history in order. This means that when the Edge side client comes back online and flushes history, it must flush the oldest historical events first (in order) before sending live Tag changes events to Engine. This is because Ignition will ignore writes to the Tag if the timestamp on the Tag change is older that then current value. Please see the screenshots below for context:

Having the [MQTT Engine Settings -> General -> Miscellaneous -> Store Historical Events] setting unchecked/false…

Requires the [MQTT Transmission Settings -> Transmitters -> [Your Transmitter… Default/Custom] -> Configuration -> In-Order History] setting to be checked/true

There are some rules for enabling history on MQTT Engine Tags. They are:

  1. History must be enabled on the Edge via Transmission side configuration settings.
    1. A History Store must be defined under MQTT Transmission -> History -> History Stores and it must be enabled.
    2. A Transmitter under MQTT Transmission -> Settings -> Transmitters must consume the enabled History Store.
    3. Ignition 8 Only: “Enable History Storage by Default” needs to be enabled or the 'CL Store Forward Enabled' custom property must exist on the Edge side Tag in order for historical events to be sent to MQTT Engine.

  2. History *must* be enabled on the MQTT Engine Tag and the history settings for that Tag must be as follows:
    1. History Enabled: true
    2. Storage Provider: Must be set to an existing Storage Provider
    3. Sample Mode: On Change
    4. Min Time Between Samples:  0 ms
    5. Ignition 7 Only: “Timestamp Source” must be set to “Value” (*not* “System”)
      This is required in order for the historical event to have the timestamp when the value changed on the Edge, instead of when the historical event is being processed by Engine. Having the
      “Timestamp Source” set to “System” will result in historical events being inserted with the wrong (later) timestamp.
      NOTE: the above history settings will ensure the proper historical event processing by MQTT Engine when writing history directly to the database and when writing history directly to the Tag.
  • No labels