Calculations

You can define Calculation Tags to perform automatic processing of math formulas with any number of local or remote Tags as a data source.  You can even use values directly from OPC Servers with the DirectOPC interface, and these OPC Items can also come from the local service or a remote service. 

View the following video presentation on Calculations.

https://www.opcsystems.com/calculations_video.htm

If you enable Security on a remote Service to disable all or selected Tags you will need to define the OPC Systems Service User Name and Password under Configure Options, but also recommend to then enable Security to limit access of Read Tags under Configure-Security.

 

Step

Task

1

Using Configure-Tags create a new Tag with the name Total.

Select the local Service or the remote Service with the Ramp, Sine, and Random Tags.

2

Select the new Total Tag and set the Data Source as Calculation.

3

Use the Edit Calculation button at the right to show the Calculation editor.

Select the Insert Tag button and select Ramp.Value.

Add a + symbol after [Ramp.Value] and insert the Tag Sine.Value.

Add a + symbol after [Sine.Value] and insert the Tag Random.Value.

The equation should now represent a total of all 3 Tags as the following.

[Ramp.Value]+[Sine.Value]+[Random.Value]

You can select OK and Apply Changes to then see the Total Tag value update to the total of all 3 Tags.

Refer to the Configure-Tags-Calculations section in the OPC Systems.NET Help file for descriptions of each Function for the Calculation engine.

Note

If any tag data source in a calculation is bad the resultant data quality for the calculation tag will also be bad unless you use the property Source When Bad.