Build a Simple Formula
  • 06 Feb 2024
  • PDF

Build a Simple Formula

  • PDF

Article summary

Purpose: Build a simple formula using the OV variable.

Task: Build a formula to convert degrees F to degrees C. Save the formula so it can be reused or modified later.

Steps:

  1. Find a temperature tag in Tag Browser and drag it onto a new Trend.

  2. Right-click on the tag in Tag Browser and choose Script Editor.

  3. Change the Script Type to Formula.

  4. Type a formula name in the Formula field. Type a Description if desired. Do not include spaces or special characters in the formula name.

  5. Change the Data Type to Numeric.

  6. In the script edit area, enter the code for the script utilizing the OV output variable. Type: “OV = (IV-32) *5/9”.

  7. Click Run to see test results.

  8. Click the Save Formula button on the Home tab.

  9. Drag the scripted tag onto the Trend. Adjust the Plot Max from the default of “100” to see values. Notice the tag name now has a tag switch appended to it: “ /CALC=YOURNAME_DegFtoDegC”.


Was this article helpful?