1.12.1
Program loop with alternative (IF, ELSE, ENDIF)
Function
A construction with IF and ELSE is used if the program loop should contain an alternative
program block: If the IF condition is fulfilled, then the program block following the IF is
executed. If the IF condition is not fulfilled, then the alternative program block following
ELSE is executed.
Note
If an alternative is not required, then an IF loop can be programmed also without ELSE
instruction and the program block following ELSE.
Syntax
IF <condition>
...
ELSE
...
ENDIF
Significance
IF:
ELSE:
ENDIF:
<condition>:
Job Planning
Programming Manual, 06/2009, 6FC5398-2BP20-0BA0
Introduces the IF loop.
Introduces the alternative program block.
Marks the end of the IF loop and results in a return jump to the
beginning of the loop.
Condition that determines which program block is executed.
Flexible NC programming
1.12 Check structures
109