14.18 Command: If
Assigns values to variables. An assignment puts the computed value of the right
hand side into the variable on the left hand side. This can be useful in complex
programs.
14.18 Command: If
An “if...else” construction can make the robot change its behavior based on sensor
inputs or variable values. Use the expression editor to describe the condition under
which the robot should proceed to the sub-commands of this If. If the condition is
evaluated to True, the lines inside this If are executed.
Each If can have several ElseIf and one Else command. These can be added
using the buttons on the screen. An ElseIf command can be removed from the
screen for that command.
The open Check Expression Continuously allow the conditions of the If
and ElseIf statements to be evaluated while the contained lines are executed. If
a expression evaluates to False while inside the body of the If-part, the following
ElseIf or Else statement will be reached.
CB3 II-86 Version 3.4.5
Copyright © 2009–2017 by Universal Robots A/S. All rights reserved.