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.

Why Create an Expression?

Many reasons. With an expression you can:

  • Create a custom trigger for an alarm or event.
  • Perform calculations using values from several I/O tags.
  • Configure alarm suppression rules.
  • Create context-sensitive operator instructions, telling them what to do in the current situation.
  • Create custom tag types with many I/O child tags, all of which configure themselves based on settings in one parent tag.
  • Hide controls based on a user's security privileges.

And much, much more.

Why Not Create an Expression?

As the adage says, "don't reinvent the wheel". All too often, people end up calling technical support for help with an expression only to be told that they could have simply used the Trigger tag, the Multi-Write, or one of the tags from the Analytics group. Always take a moment to look for existing tools before attempting to build one from scratch.

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.

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.