Siemens SINUMERIK 840Di sl Programming Manual page 427

Hide thumbs Also See for SINUMERIK 840Di sl:
Table of Contents

Advertisement

The area between a label and the following ENDLABEL is repeated P=n times. Any name
can be used to define the start label. If the block with the start label or ENDLABEL contains
further statements, these are executed on each repetition.
Note
If no ENDLABEL is found between the start label and the block with the REPEAT call, the
loop ends before the REPEAT line. The construct therefore has the same effect as described
above in "repeat area from label".
If P is not specified, the program section is repeated once.
After the last repetition, the program is continued at the line zzz following the REPEAT line.
Parameters
LABEL:
REPEAT
REPEATB
Example of repetition of positions
N10 POSITION1: X10 Y20
N20 POSITION2: CYCLE(0,,9,8)
N30 ...
N40 REPEATB POSITION1 P=5
N50 REPEATB POSITION2
N60 ...
N70 M30
Example 5 squares with increasing width are to be produced
N5 R10=15
N10 Begin: R10=R10+1
N20 Z=10-R10
N30 G1 X=R10 F200
N40 Y=R10
N50 X=-R10
N60 Y=-R10
N70 Z=10+R10
N80 REPEAT BEGIN P=4
N90 Z10
N100 M30
Fundamentals
Programming Manual, 11/2006, 6FC5398-1BP10-2BA0
Jump destination; the name of the jump destination is followed by a
colon
Repeat (repeat several lines)
Repeat block (repeat one line only)
;Width
;Execute area from N10 to N70 four times
Program section repetition
11.1 Program section repetition
;Position cycle
;Execute BLOCK N10 five times
;Execute block N20 once
427

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents