Siemens SINUMERIK 840D sl Programming Manual page 49

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

Advertisement

Note
For more information on the GOTO commands, see Chapter 10, Arithmetic parameters and
program jumps
In cases where the constant matches none of the predefined values, the DEFAULT
statement can be used to determine the branch destination.
If the DEFAULT statement is not programmed, the jump destination is the block following the
CASE statement.
Example 1
CASE(expression) OF 1 GOTOF LABEL1 2 GOTOF LABEL2 ... DEFAULT GOTOF
LABELn
"1" and "2" are possible constants.
If the value of the expression = 1 (INT constant), jump to block with LABEL1
If the value of the expression = 2 (INT constant), jump to block with LABEL2
...
otherwise jump to the block with LABELn
Example 2
DEF INT VAR1 VAR2 VAR3
CASE(VAR1+VAR2-VAR3) OF 7 GOTOF LABEL1 9 GOTOF LABEL2 DEFAULT GOTOF LABEL3
LABEL1: G0 X1 Y1
LABEL2: G0 X2 Y2
LABEL3: G0 X3 Y3
Job planning
Programming Manual, 03/2006 Edition, 6FC5398-2BP10-1BA0
Flexible NC programming
1.11 CASE statement
1-35

Advertisement

Table of Contents
loading

Table of Contents