Create a Calculation Formula Using a VBScript Code
About this task
Important: If a tag
contains bad data quality, you cannot store its value through a calculation formula.
For example, if your VBScript includes:
Result = 7 Quality = 0
,
Historian does not store the 7
, it stores
0
.Before you begin
Procedure
- Access Historian Administrator.
- Select Tags, select the tag for which you want to create a calculation formula, and then select Calculation.
-
If you want to perform an unsolicited (also called event-based) calculation,
add the trigger tags to the calculation:
-
In the Calculation field, enter the calculation formula
using the VBScript syntax.
Tip:
- For examples, refer to Examples of Scheduling Polled Triggers and Examples of Scheduling Unsolicited Triggers.
- To verify that the syntax is correct, select Test. A message appears, stating whether the syntax is correct.