- 06 Feb 2024
- Print
- PDF
Sum Two Tags
- Updated on 06 Feb 2024
- Print
- PDF
Purpose: Learn to build a simple expression that sums the values of two tags.
Task: Create an expression that is the sum of two tags. Add the expression tag to a Trend.
Steps:
Open a new Trend. Open Tag Browser and add two tags to the Trend.
Back in Tag Browser, right-click on the first tag and choose Script Editor.
Once the Script Editor loads, type “IV + ” in the Script Edit section.
Next, return to Tag Browser and drag the second tag into the edit area and drop it next to the plus sign. Note the additional code added to the tag name.
Click the Run button to see sample calculation results.
Click on the yellow tag symbol next to the tag and drag and drop onto the Trend to add it to the tag set. Adjust the new expression tag’s Plot Max to make it visible in the Trend.