If

This is the conditional VSL object. It is a 'level' type of object: other VSL code can be placed inside it. The object defines a condition, and sub objects are executed only when the condition is met.

If object can be paired with an Else object, that follows the If object in VSL hierarchy. Its contents are evaluated when If condition are not met.

If-object can be used in two ways: for single execution of sub objects ('If 'option selected) or for continuous execution ('While' option selected). The condition is defined for each sub channel separately. It has five alternatives:

  • Always true: the sub channel does not set any condition
  • If inside: true if sub channel value is inside a given range
  • If outside: true if value is outside a given range
  • If greater: true if value is greater than or equal to the given value
  • If less: true if value is less than or equal to the given value

The channel sub tests are combined using a suitable logical operation:

  • AND operation: The sub objects are executed if all sub channel conditions are true.
  • OR operation: The sub objects are executed if at least one sub channel condition is true.