Expressions

An expression is "any calculation that returns a result". In more practical terms, an expression is something that…

  • Can combine or compare multiple tag values for monitoring or reporting.
  • Can signal a need for control actions based on any set of system conditions.
  • Can consider the time, date, signed-in operator, system status, etc.
  • Can extend the capabilities of VTScada.

General steps to create an expression:

In any VTScada tag configuration field that has the options, Constant, Expression, Tag...

Expressions are frequently used for tag configuration

  1. Click the Expression option to select it.
  2. Click the expression editor button.
  3. Enter an expression into the editor window.

    The expression editor window can be re-sized as needed.

  4. Click OK to save your work and return to the tag configuration.

You cannot save an expression that contains a syntax error. For example: unbalanced parenthesis "2 + (2/3" , or using an operator without an operand "2 + ".
It is perfectly legal to save an expression that will have an INVALID result, such as any number divided by zero.

The maximum length of an expression is 65535 characters.
If your expression approaches this limit, you should consider whether there might be a shorter way to write it.