Creating a Calculation Trigger

In Hyper Historian, you create calculation triggers that fire the Performance Calculation Engine to calculate calculated tags. (For more about calculated tags and their use, refer to the Calculated Tags topic.) Once you have created a calculation trigger, you can add it to the calculation tags it will execute calculations for.

 

Calculation triggers are much like regular Unified Data Manager (UDM) triggers except that they are designed to work with historical data. This topic describes how to create time triggers and data triggers for use with Hyper Historian calculated tags. (For comparison, you can read about regular UDM triggers in the Data Triggers and Time Triggers topics. Refer to these topics if you need to learn more about how time triggers and data triggers work.)

 

As you can see in the figure below, calculation triggers get their own Calculation Triggers node in the Hyper Historian tree structure in the Workbench Project Explorer. This is where you will create and store the calculation triggers that you create for executing calculations for calculated tags. In the Calculation Triggers node, notice that Time triggers are identified with a clock icon, and data triggers with a "X=" icon. This topic describes Time Triggers for Calculated Tags and Data Triggers for Calculated Tags.

 

Calculation Triggers and Folder in the Project Explorer

Time Triggers for Calculated Tags

A time trigger specifies specific times at which the trigger is to fire. When you add a time trigger to a calculated tag, the tag's calculations fire at the times indicated by the time trigger. The calculated tag can have any number of triggers associated with it, but a trigger must be enabled in order to fire. If it is not enabled, it won't fire.

 

To create a time trigger for calculated tags in Hyper Historian, follow these steps:

  1. In the Hyper Historian Project Explorer in GENESIS64 Workbench, expand the tree so you can see the Calculation Triggers node.

  2. Right-click the Calculation Triggers node and select New Time Trigger. The Hyper Historian Time Trigger form opens, as shown below.

Calculated Trigger - Time Trigger

  1. Enter a name and display name. Enter a description that aptly describes the trigger and how it is used.
  2. Enter a number between 0 and 255 in the Processing Phase to determine the order of calculations among trigger events that occur at the same time. The trigger with the lowest processing phase value completes its calculations first.
  3. Specify whether the trigger runs based on UTC time or local time on the server.
  4. For the Recurrence Type, specify whether you want the trigger to run at a specified Time Interval, or on Specific Dates and Times. For more information, refer to the Time Trigger Options topic for the UDM.
  5. Click the Preview button to see a display of the exact times at which the time trigger will fire. Previewing the times is helpful if you are configuring a complex recurrence pattern; it can help you to understand whether you have configured it properly or not.
  6. When you are done, click Apply.
  7. Now you can associate the trigger with a calculated tag as described in the Configuring a Calculated Tag topic.

Data Triggers for Calculated Tags

When you add a data trigger to a calculated tag, the tag's calculations fire when the value of a data point equals a specified value or condition. For example, it can fire when a machine switch gets set to on, or TRUE. A calculated tag can have any number of triggers associated with it, but a trigger must be enabled in order to fire. If it is not enabled, it won't fire.

 

To create a data trigger for calculated tags in Hyper Historian, follow these steps:

  1. In the Hyper Historian Project Explorer in GENESIS64 Workbench, expand the tree so you can see the Calculation Triggers node.

  2. Right-click the Calculation Triggers node and select New Data Trigger. The Hyper Historian Time Trigger form opens, as shown below.

Calculated Trigger - Data Trigger

  1. Enter a name and display name. Enter a description that aptly describes the trigger and how it is used.
  2. In the Trigger On drop-down list, choose the condition in which the trigger is to fire. The trigger can fire upon Any Datapoint Change or using an Expression in which you can specify any condition to execute the trigger. For more information about creating an expression that fires, refer to the Expression Editor topic.
  3. In the Data point field, specify the tag for the data point to be tested for the trigger.
  4. Specify whether you want to Ignore Bad or Uncertain quality tags.
  5. When you are done, click Apply.
  6. Now you can associate the trigger with a calculated tag as described in the Configuring a Calculated Tag topic.

See also:

Calculated Tags

Configuring a Calculated Tag

Scheduling Recalculation Tasks

Performance Calculation Functions