Repeat Program Section (Repeat, Repeatb, Endlabel, P) - Siemens SINUMERIK 840D sl Programming Manual

Nc programming
Hide thumbs Also See for SINUMERIK 840D sl:
Table of Contents

Advertisement

Work preparation
3.1 Flexible NC programming
<jump target_1>:
<jump target_2>:
<jump target_n>:
Example
Program code
...
N20 DEF INT VAR1 VAR2 VAR3
N30 CASE(VAR1+VAR2-VAR3) OF 7 GOTOF Label_1 9 GOTOF La-
bel_2 DEFAULT GOTOF Label_3
N40 Label_1: G0 X1 Y1
N50 Label_2: G0 X2 Y2
N60 Label_3: G0 X3 Y3
...
The CASE statement from N30 defines the following program branch possibilities:
1. If the value of the arithmetic function VAR1+VAR2-VAR3 = 7, then jump to the block with the
jump marker definition "Label_1" (→ N40).
2. If the value of the arithmetic function VAR1+VAR2-VAR3 = 9, then jump to the block with the
jump marker definition "Label_2" (→ N50).
3. If the value of the arithmetic function VAR1+VAR2-VAR3 is neither 7 nor 9, then jump to the
block with the jump marker definition "Label_3" (→ N60).
3.1.6

Repeat program section (REPEAT, REPEATB, ENDLABEL, P)

Program section repetition allows you to repeat existing program sections within a program in
any order.
468
A branch is made to this jump target if the value of the variable or arithmetic
function corresponds to the first specific constant.
The jump target can be specified as follows:
<jump marker>:
Jump target is the jump marker (label) set in the
program with a user-defined name: <jump
marker>:
<block number>:
Jump target is main block or sub-block number
(e.g.: 200, N300)
STRING type varia‐
Variable jump target. The variable stands for a jump
ble:
marker or a block number.
A branch is made to this jump target if the value of the variable or arithmetic
function corresponds to the second specified constant.
A branch is made to this jump target if the value of the variable does not
assume the specified constant value.
Programming Manual, 12/2019, 6FC5398-2EP40-0BA0
NC programming

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 840de sl

Table of Contents