Nodes (tags) calculations

Created by Ybone Hernandez, Modified on Wed, 4 Nov, 2020 at 4:09 PM by Ybone Hernandez

It is very requested to make calculations among tag values. This is a simple example of how to do an addition of two tag values and represent the result on a third tag:


1. Create three integer nodes: tag1, tag2 and sum.


2. Create a script wherever you consider according to your strategies. In general cases, it is recomended to place the script where it can be called easily (Script Library or a folder for Scripts under OBJECTS). But in this example, it is something specific, so it is created under the sum node itself:



3. In the script editor, create two parameters (tag1 and tag2), Type "node.value", check the Trigger and select the path for tag1 and tag2 nodes:



4. Make the addition and assign the result to the "sum" node value:


5. Save the script and test it by changing the values of tag1 and tag2.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article