Types of Triggers

You can create the following types of triggers for a calculation:
  • Polled or scheduled: Used to trigger a calculation based on a scheduled time interval. For example, you can calculate the average value of tag data collected every hour.

    The polled type trigger functions the same as the other collectors. Although Historian internally optimizes calculation execution times, the data for polled tags is timestamped on the data collection interval. For example, if the calculation engine is unable to process the polled triggers as scheduled, the calculations will be executed later, but with data interpolated back to the scheduled time. If there are too many triggers to be processed, some triggers will be dropped and no samples are logged for that calculation time.

    For information on creating a polled trigger, refer to Create a Polled Trigger.

  • Unsolicited or event-based: Used to trigger a calculation based on an event. For example, you can calculate the average value of tag data when the data exceeds a certain value.

    When you set an event-based trigger, you must also set up a dependency list of one or more tags. Event-based tiggers will keep calculations as up to date as possible. They are also useful when you want to do on-demand calculations. You can use a trigger tag that is written to by an external program or operation.

    If you want to perform raw sample replication you would use an event-based trigger. To retrieve data from a tag, use the formula:
    Result=CurrentValue("Tag1")+CurrentValue("Tag2")

    If you are using recovery mode, all referenced tags in an unsolicited calculation must be listed as trigger tags because recovery will be performed only for the configured trigger tags.

    Event-based triggers have a dependency list of trigger tags. The trigger fires whenever there is a data change for the trigger tag (for example, changes in the quality and value of a trigger tag). The value of a trigger tag can change when the tag exceeds the collector compression (if you enabled collector compression).

    The calculation is processed each time any tag in the dependency list changes. If you have multiple tags in the list and they change even one millisecond apart, then you will have multiple events, and the calculation formula will be processed for each.

    However, the following actions do not trigger a calculation:
    • Deletion of a tag that is in the dependency list.
    • Re-addition of a tag in the dependency list.

    The calculation is triggered at the same time as the timestamp of the sample in the trigger tag. The values of all other tags in the formula are interpolated forward to this time so that the timestamps of all input tags are the same. Even if these are sequential events, they have the same timestamp. The calculation time becomes the timestamp for the sample stored in the destination tag.

    Event-based triggers have a collection interval. The Calculation collector notifies the archiver not to send notification of changes to trigger tags any faster than the collection interval setting.

    For information on creating an unsolicited trigger, refer to Create an Unsolicited Trigger.