If-Elsif Control Structure / If-Elsif-Else Control Structure - Siemens SINUMERIK 840D sl Operating Manual

Integrate create myconfig - diff, expert, topo
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Create MyConfig - Expert
4.6 Script language
4.6.6.2

If-ElsIf control structure / If-ElsIf-Else control structure

After the If condition alternative conditions can be checked by specifying ElsIf or ElIf.
The instruction block is executed after the first fulfilled condition. The instruction block after
Else is executed if no condition is fulfilled.
Conditional execution - If ... ElsIf... Else... EndIf
Note
For the alternative conditions, the keywords "ElsIf" and "ElIf" are used as equivalents.
The control structure allows the conditional execution of different instruction blocks depending
on whether the "exp" condition is fulfilled or not.
If this is fulfilled (true), then the first instruction block "block_1" is executed, otherwise it is
checked whether the second alternative condition "exp_2" is fulfilled or not.
If this is fulfilled (true), then the second instruction block "block_2" is executed, otherwise it
is checked whether the next alternative condition "exp_3" is fulfilled or not.
If this is fulfilled (true), then the third instruction block "block_3" is executed, and so on.
Once a condition or alternative condition is fulfilled, the associated instruction block is executed
and then the execution continues after the associated keyword "EndIf".
As long as the condition or alternative condition is not fulfilled, the subsequent alternative
condition is checked.
If no alternative condition is fulfilled, the instruction block "block_E" in the alternative branch
is executed after the keyword "Else".
If no alternative branch "Else" was specified, then processing is continued after the keyword
"EndIf" without executing an instruction block.
284
If exp
block_1
ElsIf exp_2
block_2
ElsIf exp_3
block_3
...
Else
block_E
EndIf
SINUMERIK Integrate Create MyConfig - Diff, Expert, Topo
Operating Manual, 12/2017, A5E36537479B-AE

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828d

Table of Contents