If-Group

Evaluates conditions in a specific order one after the other and executes the corresponding subsequence when a condition is met.

Each If-group consists of at least one if element. Optionally, any number of else if elements and a single else element at the end can be added.

The individual conditions of the If-group are evaluated in sequence from top to bottom. If one of the conditions is true, the corresponding subsequence is executed and everything following it in the if group is ignored. If none of the given conditions are true and the if group reaches the else element during evaluation, this subsequence is executed. This means that else is a fallback option that is always executed if none of the previous conditions are true.

../_images/IfGroup.png

Screenshot of an If group in the program editor

Variables

Input/Output

Name

Type

Description

Input

lhs

Bool, Integer, Double, String, Pose, JointPosition, Product, Box, ROI, Obstruction, PickSearchParamSet

Left-hand side

Input

Operation

Parameter

Selecting the comparison operator. The available operators depend on the variable type. For all variables:

  • ==

  • !=

For integer and double variables only:

  • <

  • >

  • <=

  • >=

For bool variables only:

  • AND

  • OR

  • NAND

  • NOR

Input

rhs

Bool, Integer, Double, String, Pose, JointPosition, Product, Box, ROI, Obstruction, PickSearchParamSet

Right-hand side