If
An If statement executes a Then, Else, or Else If scope based on a condition.
The statement initiates with the Then and Else scope. One or more Else If scopes can be added by clicking on the "+" which is visible when the mouse hovers over the If Statement. Each Else If scope has their own condition.
Then scope is executed if the If Statement condition is true.
Else If scope is executed if it has the first true condition.
Else scope is executed if other conditions are false.
Properties
Name | Description |
Condition | Defines an expression that when evaluated returns either a
True or False value.
A True value executes the Then scope of statements. A False value executes the Else scope of statements. The expression can reference routine variables, robot I/O ports, and component properties. To reference a routine variable, the statement and variable must belong to the same routine. To reference a port in robot, use the format IN[<port number>]. To reference a component property, default properties can be referenced by name, whereas a grouped property must use the format <group/tab Name>::<property name>. In this case, you are referencing the property value. |