Program Loop With Alternative (If, Else, Endif) - Siemens Sinumerik 840D sl Programming Manual

Job planning
Hide thumbs Also See for Sinumerik 840D sl:
Table of Contents

Advertisement

Runtime response
In interpreter mode (active as standard), it is possible to shorten program processing times
more effectively by using program branches than can be obtained with check structures.
There is no difference between program branches and check structures in precompiled
cycles.
Supplementary conditions
Blocks with check structure elements cannot be suppressed.
Jumper markers (labels) are not permitted in blocks with check structure elements.
Check structures are processed interpretively. When a loop end is detected, a search is
made for the loop beginning, allowing for the check structures found in the process. For
this reason, the block structure of a program is not checked completely in interpreter
mode.
It is not generally advisable to use a mixture of check structures and program branches.
A check can be made to ensure that check structures are nested correctly when cycles are
preprocessed.
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
Job planning
Programming Manual, 02/2011, 6FC5398-2BP40-1BA0
Flexible NC programming
1.12 Check structures
107

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de slSinumerik 828d

Table of Contents