- 06 Feb 2024
- Print
- PDF
Raise Value to Power
- Updated on 06 Feb 2024
- Print
- PDF
Purpose: Learn to use the Math function to build an expression that raises a tag’s value to a power.
Task: Create an expression that raises a tag’s value to the power of 3.
Steps:
Find a tag in the Tag Browser.
Drag the tag onto a Trend and then right-click the tag in Tag Browser and choose Script Editor.
In the Script Editor, type “Math.” and choose Pow from the list.
Next, type “(“ to see more information, including syntax. Note the end parenthesis is added automatically.
Then type “IV,3” inside the parentheses. The completed formula will look like: “Math.Pow(IV,3)”.
Click the Run button to see sample results.
Click on the yellow tag symbol next to the expression tag and drag and drop onto the Trend. Right-click on tag to and choose Auto Scale to see values.