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

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

Advertisement

Flexible NC programming

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

Example
Program code
...
N20 DEF INT VAR1 VAR2 VAR3
N30 CASE(VAR1+VAR2-VAR3) OF 7 GOTOF Label_1 9 GOTOF Label_2 DEFAULT GOTOF Label_3
N40 Label_1: G0 X1 Y1
N50 Label_2: G0 X2 Y2
N60 Label_3: G0 X3 Y3
...
The
1. If the value of the arithmetic function VAR1+VAR2-VAR3 = 7, then jump to the block with
2. If the value of the arithmetic function VAR1+VAR2-VAR3 = 9, then jump to the block with
3. If the value of the arithmetic function VAR1+VAR2-VAR3 is neither 7 nor 9, then jump to
1.11
Repeat program section (REPEAT, REPEATB, ENDLABEL, P)
Function
Program section repetition allows you to repeat existing program sections within a program
in any order.
The program lines or program sections to be repeated are identified by jump markers
(labels).
Note
Jump markers (labels)
Jump markers are always located at the beginning of a block. If a program number exists,
the jump marker is located immediately after the block number.
The following rules apply when naming jump markers:
 Number of characters:
 Permissible characters are:
 The first two characters must be letters or underscores.
 The name of the jump marker is followed by a colon (":").
102
instruction from
CASE
N30
the jump marker definition "Label_1" (→
the jump marker definition "Label_2" (→
the block with the jump marker definition "Label_3" (→
– Minimum 2
– Maximum 32
– Letters
– Numbers
– Underscores
defines the following program branch possibilities:
).
N40
).
N50
Programming Manual, 03/2013, 6FC5398-2BP40-3BA1
).
N60
Job Planning

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sinumerik 828dSinumerik 840de sl

Table of Contents