Program Section Repeats; Principle; Programming Notes - HEIDENHAIN TNC 370 User Manual

Conversational programming
Table of Contents

Advertisement

6
Subprograms
and Program
Section Repeats
L-
6.2
Program
Section
Repeats
As with subprograms,
program
section repeats are
marked with labels.
Principle
1
'-
The program
is executed
up to the end of the
labelled program
section (block with CALL LBL) (0,
0).
Then the program
section between
the called LBL
and the label call is repeated
the number
of times
entered
after REP in the CALL LBL command
(0,
0).
After the last repetition,
the program
is resumed
(@.
0
BEGIN PGM
0
1
LBL 1
CALL LBL 1 REP 2/Z
0
5
END PGM
Programming
notes
l
A program
section can be repeated
up to 65 534
times in succession.
l
The number behind the slash after REP indicates
Fig. 6.2:
Flow diagram
with
program
section
repeats,
@=
return
the number of remaining
repetitions.
jump
l
The total number
of times the program
section
will be carried out is always one more than the
programmed
number
of repetitions.
Programming
and calling
a program
section
repeat
To mark the beginning
Repeat the program
section beginning
with LABEL 7.
Resulting
NC block: LBL 7
Number
of repetitions
Enter the number of repetitions
in the block which
calls the label. This
block also identifies
the end of the program
section.
LABELNIJMBER?
Execute the program
section beginning
with LABEL 7.
L
r
'"1
REX'EATREP?
>
Repeat the program
section from LBL 7 to this block 10 times.
The oroaram
section will therefore
be executed
a total of 11 times.
Resulting
NC block: CALL LBL 7 REP IO/IO
i
TNC 370
6-5
i

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents