Calculation Triggers

In Hyper Historian, you can create calculation triggers that fire the Performance Calculation Engine to calculate calculated tags. 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.

The Calculation Triggers node in the Hyper Historian tree structure in the Workbench is where you will create and store the calculation triggers that you create for executing calculations for calculated tags. In the Calculation Triggers node, time triggers are identified with a clock icon, and data triggers with a "X=" icon. Expand the Calculation Triggers node and you will see the pre-existing Trigger Folders: Periodic and Sample Triggers. The Periodic folder contains samples of time triggers, while the Sample Triggers folder contains a sample data trigger.

Add a Time Trigger

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:

  1. Start the Workbench, then expand your project. Next, expand the Historical Data node to show the Hyper Historian node. Expand the Hyper Historian node to show the Calculation Triggers node.

  2. Right-click the Calculation Triggers node in the navigation tree, or any of its sub-nodes, and select Add Time Trigger, as shown in the figure below.

Add Time Trigger in the Project Explorer

-OR-

Select the Calculation Triggers node in the Project Explorer, or any of its sub-nodes, then click on the Add Time Trigger button, shown below, in the Edit section of the Home ribbon in the Workbench.

Add Time Trigger Button

  1. This opens the Time Trigger properties window, shown below, beneath the Project Details section in the Workbench. Enter a name in the Trigger Name text entry field.

Hyper Historian Time Trigger Properties

  1. Enter a Display Name. This specifies the name to be used when displaying the tag in a GUI, such as in the Project Explorer.
  2. Click the Enabled checkbox to specify that the trigger is enabled.

Properties

  1. Enter a Description in the text entry field that aptly describes the trigger and how it is used.
  2. Enter a number between 0 and 255 in the Processing Phase text entry field 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.

Time Trigger Options

  1. In Time Zone, specify whether the trigger runs based on UTC time or localserver time.
  2. For the Recurrence Type, use the pulldown menu to specify whether you want the trigger to run One time only, at a specified Time interval, or on Specific dates and times. Your selection will affect the remainder of the properties window. For instance, selectingTime intervalwill showStarting at, andRecur every. Selecting Specific dates and times will showStarting at, Recur every[where you can select Second(s), Minute(s), Hour(s), Day(s), Week(s), Month(s), and Year(s)] and that selection affects the remainder of the form] andPick specific times.
  3. 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.
  4. When you are done, click Apply.
  5. Now you can associate the trigger with a calculated tag.

Add a Data Trigger

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:

  1. Start the Workbench, then expand your project. Next, expand the Historical Data node to show the Hyper Historian node. Expand the Hyper Historian node to show the Calculation Triggers node.

  2. Right-click the Calculation Triggers node in the navigation tree, or any of its sub-nodes, and select Add Data Trigger, as shown in the figure below.

Add Data Trigger in the Project Explorer

-OR-

Select the Calculation Triggers node in the Project Explorer, or any of its sub-nodes, then click on the Add Data Trigger button, shown below, in the Edit section of the Home ribbon in the Workbench.

Add Data Trigger Button

  1. This opens the Data Trigger properties window, shown below, beneath the Project Details section in the Workbench. Enter a name in the Trigger Name text entry field.

Hyper Historian Data Trigger Properties

  1. Enter a Display Name. This specifies the name to be used when displaying the tag in a GUI, such as in the Project Explorer.
  2. Click the Enabled checkbox to specify that the trigger is enabled.

Properties

  1. Enter a Description in the text entry field that aptly describes the trigger and how it is used.
  2. Enter a number between 0 and 255 in the Processing Phase text entry field 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.

Data Trigger Options

  1. 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.
  2. In the Data point field, specify the tag for the data point to be tested for the trigger. Click on the ellipsis button [...] to open the ItemBrowser window where you can navigate to your selected data point.
  3. Specify whether you want to ignore Bad or Uncertain Quality tags.
  4. When you are done, click Apply.
  5. Now you can associate the trigger with a calculated tag.

See Also:

Add Trigger Folder

Welcome to Hyper Historian