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:
-
In the Hyper Historian Project Explorer in GENESIS64 Workbench, expand the tree so you can see the Calculation Triggers node.
-
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
-
Enter a name and display name. Enter a description that aptly describes the trigger and how it is used.
-
Enter a number between 0 and 255 in the Processing Phaseto 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.
-
Specify whether the trigger runs based on UTC time or local time on the server.
-
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.
-
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.
-
When you are done, click Apply.
-
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:
-
In the Hyper Historian Project Explorer in GENESIS64 Workbench, expand the tree so you can see the Calculation Triggers node.
-
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
-
Enter a name and display name. Enter a description that aptly describes the trigger and how it is used.
-
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.
-
In the Data point field, specify the tag for the data point to be tested for the trigger.
-
Specify whether you want to Ignore Bad or Uncertain quality tags.
-
When you are done, click Apply.
-
Now you can associate the trigger with a calculated tag as described in the Configuring a Calculated Tag topic.
See Also: