About this task
This topic describes how to create a calculation formula using the pre-built functions. You
can also create a calculation formula
using a VBScript code.For information on a list of the available types and
associated functions, refer to Types of Functions Supported. For information on each pre-defined
function, refer to Built-In Functions. In addition to the built-in functions, you can
create your own customized
functions.
Procedure
-
To create a calculation formula using Configuration Hub:
-
Access Configuration Hub.
-
In the NAVIGATION section, under the Configuration Hub plugin for Historian, select Tags.
A list of tags appears.
-
Select a calculation tag, right-click or select
more options, and then select
Calculation.
The calculation editor appears.
-
In the CALCULATION section, remove
Null
(and retain the Result =
).
-
In the Calculation editor, place the cursor in the location where you
want to insert the pre-built function.
-
In the DETAILS section, under Pre-Built Functions, in the Function Type field, select a function type.
Depending on the function type you have selected, a list of functions appears in the Function field.
-
In the Function field, select a function.
Based on the selected function, the related fields will be
displayed.
-
Enter values in the other fields that appear after selecting a
function.
-
In the Input Tag field, select , and then select the tag where applicable.
The function preview appears below the calculation
editor.
-
Select Insert Function.
The function is inserted at the cursor position.
-
To test the function, select .
A message appears, stating whether the syntax is correct.
-
In the upper-left corner of the page, select Save.
The calculation formula is created.
-
If you want to create a calculation formula using Historian Administrator:
-
Access Historian Administrator.
-
Select Tags, select the tag for which you want to create a calculation formula, and then select Calculation.
-
In the Calculation section, remove
Null
(retain Result =
).
Tip: Avoid selecting other tags until you save your changes or you will lose your code changes.
-
Select Wizard.
The Insert Function Wizard window appears.
-
Under Select Function, select values in the available fields, and then select Insert.
-
If you want to perform an unsolicited (also called event-based) calculation, in the Type field, select Add A Calculation Trigger. Search and select the tag that you want to add, and then select Insert.
The calculation formula is created.
-
To verify that the syntax is correct, select Test.
A message appears, stating whether the syntax is correct.