Script Editor
  • 02 Feb 2024
  • PDF

Script Editor

  • PDF

Article summary

Three types of scripting are available in PARCview: client-side scripts, MDE scripts, and server-side scripts. Client-side scripts are ad hoc calculations using the data currently being displayed; these calculated values are not historized. Server-side scripts are calculated by PARCcalc Server and are historized. MDE scripts are calculated by MDE displays using cell values rather than input values and are historized into the MDE source.

The Script Editor is used to create client-side scripts. Client-side scripts are divided into three categories: Expressions, Simple Formulas, and Advanced Formulas. Expressions are one-line modifiers that perform calculations on normalized data and can be added to the end of a tag using the  syntax /EXPR= “expression”. Expressions are ideal for short, simplistic calculations that will not need to be used repeatedly or require much variability to generalize. Formulas are similar to expressions, but a formula can contain multiple lines of code and is saved independently from any scripted tags that call it. Formulas can also accept arguments, allowing for more flexibility.

The Script Editor is also used to create calc tags. Calc tags are formulas or expressions that have be saved to create new independent tags. A calc tag can have its own name, description, units, range, interpolation type, and draw mode like any process tag and can be used throughout PARCview.


Was this article helpful?