Configuring a Calculated Tag

To create a calculated tag in Hyper Historian, follow the steps below. Each calculated tag that you create will store calculated values in the Hyper Historian database. You will be creating the calculated tag in the folder where the Hyper Historian tags you will be using as input are located. This is for organizational purposes only; the calculated tags that you create can reside anywhere in the Data Collections node. In fact, you can put them into a folder of their own if you like. For more information, refer to the Calculated Tags topic.

 

To create a calculated tag, follow these steps:

  1. In the GENESIS64 Workbench, make sure you are looking at the Hyper Historian provider. Expand the Data Collections node so that you are in the folder where you want to create the calculated tag.

  2. Right-click the folder where would like to add a new calculated tag, and select Calculated Tag, as shown below. This opens the Calculated Tag window with the Properties tab on top.

Adding a New Calculated Tag

  1. A new calculated tag appears in the navigation tree. Note how the calculated tag's icon differentiates it from a regular Hyper Historian tag whose icon looks like this: . The Hyper Historian Calculated Tag form opens (as shown below).

    Calculated Tag - Tag Properties Tab

     

  2. Enter the Name of the calculated tag in the Name text box. The name should be short; it is used as a part of the browse name, and for that reason, you want to keep it short. The Display Name field, not the Name field, is where you want to provide lengthy detail so that the Name field is not long; tags are logged with the browse name that you provided in the Name field, so you want to keep the name short.

  3. Optionally, you can enter a Display Name which appears for the calculated tag in the Project Explorer. Use the display name to supplement the shortened tag name that you entered in the Name field. If a Display Name is not provided, the Name appears in the Project Explorer instead.
    Tip: The Description field can contain a detailed description of several lines for the calculated tag. Use the description for a complete definition of the calculated tag.  

  4. Leave the Enabled checkbox unselected until you are ready to begin using the calculated tag. Enter a description that describes how the calculation is used; include information that will be helpful for later maintenance of the tag.

  5. You can optionally put a check mark in the Support Operator Annotations check box to allow operators to comment on the signal in displays. Later, as the tag’s data values play or replay in the Trend Viewer, you may want to be able annotate the tag’s data values as you see them trending before you. For example, maybe you want to note an operator action that altered the data slightly, or highlight a piece of data for analysis later. Putting a check mark in the Support Operator Annotations check box lets you do that. Such annotations are saved with the tag’s data in its logger file, which makes the annotations available in a replay, accessible to the Hyper Historian SQL Server Interface, and archived with the tag’s data.

  6. Select the data type from the Data Type drop-down menu. Among the options available to you are: Boolean, Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, Float32, Float64, and String.

  7. Specify the minimum amount of time between samples. This option is helpful for limiting samples from high-frequency sampling.
  8. Enter the engineering units or click the ellipsis button to select an alias tag for the Engineering Units using the Data Browser.

  9. Put a check mark next to Stepped interpretation to enable this feature if it is desired. The Stepped Interpretation check box is used primarily during playback, for interpreting the tag’s data values. This feature is applied only if you request a value for a certain point of time. The returned value will be the nearest older value available. In general, if the data comes from a discrete signal such as an on/off switch (or a Boolean data type), put a check mark in this box; but if data comes from a sine wave or analog signal, leave the box empty.

  10. Enter the ranges for the Lo Limit and Hi Limit. The high and low limits are used by the filter algorithms.

  11. In the Trigger section, add the triggers that determine when the calculations will occur. The triggers that you can add here are calculation triggers that must be predefined as described in the Creating a Calculation Trigger topic. Note that you can use the Up and Down buttons (on the right) to sequence triggers in the list. The sequence becomes important only when two triggers execute at the same time; the trigger that is higher in the list will execute first.

  12. Now go to the Expression tab to create an expression for the calculation. This expression should include the following:

Calculated Tag - Expression Tab

  1. Click the Syntax button at the bottom of the window to check the logical syntax of the expression. Make any necessary corrections.

  2. When you are satisfied with the calculation, make sure you put a check mark in the Enabled check box.

  3. Click Apply when you are done.

  4. At this point you can test the calculated tag to make sure the expression is calculating the result you are looking for.

See also:

Calculated Tags

Creating a Calculation Trigger

Scheduling Recalculation Tasks

Performance Calculation Functions

Expression Editor