While

A While statement executes a scope of statements in a loop as long as a condition is true.

Properties

Name Description
Condition Defines an expression that when evaluated returns a True or False value.

A True value executes a scope of statements, and then the program would loop back and reevaluate Condition before executing the next iteration.

A False value does not execute a scope of statements and ends the statement.

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.

Note: In order to avoid an endless loop, use a condition that references a routine variable, port in robot, Break statement or a controller property.