Siemens sinumerik 840d Programming Manual page 57

Hide thumbs Also See for sinumerik 840d:
Table of Contents

Advertisement

04.00
1
840D
840D
NCU 571
NCU 572
NCU 573
In cases where the constant matches none of the
predefined values, the DEFAULT instruction can be
used to determine the jump destination.
If the DEFAULT instruction is not programmed, the
jump destination is the block following the CASE
statement.
Programming example
Example 1
CASE(expression) OF 1 GOTOF LABEL1 2 GOTOF LABEL2
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
 Siemens AG 2000. All rights reserved
SINUMERIK 840D/840Di/810D/FM-NC Programming Guide Advanced (PGA) − 04.00 Edition
FM-NC
810D
840Di
Flexible NC programming
1.11 CASE instruction
... DEFAULT GOTOF
1
1-57

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik fm-ncSinumerik 840diSinumerik 810d

Table of Contents