Check Structures; If Control Structure / If-Else Control Structure - Siemens SINUMERIK 840D sl Operating Manual

Sinumerik 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
In the task/script editor, area data can be inserted via the context menu "Insert script → Area
data...". Furthermore, the area data can be inserted via the Windows clipboard from Diff.
Note
You can get the options for the cross-area reading and writing of area data from section Data
accesses (Page 244).
4.6.8

Check structures

The following variants of the control structures are available:
● If control structure (Page 250)
● If-Else control structure (Page 250)
● If-ElsIf control structure (Page 251)
● If-ElseIf-Else control structure (Page 251)
● While control structure (Page 252)
In the script/task editor, using the shortcut menu "Insert script" you are supported when creating
a control structure.
4.6.8.1

If control structure / If-Else control structure

Conditional execution - If ... Else ... EndIf
The control structure allows the conditional execution of two different operation blocks
dependent on whether the condition "exp" is fulfilled or not. If this is fulfilled (true), then the
first operation block "block1" is executed, else the second execution "block2" is executed.
Each of the two operation blocks can, in turn, contain control structures; this means that any
nesting depth is possible.
Example
250
If exp
block1
Else
block2
EndIf
CHANDATA(1)
If Up.Velo_X != null
If Up.Velo_X > ($MA_MAX_AX_VELO[AX1]+ 100)
$MA_MAX_AX_VELO[AX1] = Up.Velo_X
Else
$MA_MAX_AX_VELO[AX1] = 1000
EndIf
EndIf
SINUMERIK Integrate Create MyConfig - Diff, Expert, Topo
Operating Manual, 11/2016, A5E36537479B-AD

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828d

Table of Contents