Branch (if else iend) command -22 – Yaskawa MotionSuite Series Machine Controller Programming Manual User Manual
Page 107

MotionSuite™ Series Machine Controller Programming Manual
Chapter 3: Advanced Programming Methods
3-22
3.1.9
Branch (IF ELSE IEND) Command
! Outline
The Branch (IF ELSE IEND) command executes the block between [IF~ELSE] if a
conditional expression is valid; and the block between [ELSE~IEND] if a conditional
expression is invalid.
! Detailed Explanation
The Branch (IF ELSE IEND) command method is shown as follows:
According to the above command, execute Process 1 if the conditional expression is
valid; and Process 2 if the conditional expression is invalid.
• The ELSE can be omitted. At this point, if the conditional expression is invalid, the
execution is continued from the next block followed by the IEND.
Important Point
The Branch (IF ELSE IEND) command can be nested up to 8 levels.
IF (Conditional expression)
... (Process 1)
ELSE;
... (Process 2)
IEND;
Process 2
Process 1
Conditional
Expression
Valid
Invalid