Subprograms and program section repeats | Nesting
8
Repeating program section repeats
Example
0 BEGIN PGM REPS MM
...
15 LBL 1
Beginning of program section repeat 1
...
20 LBL 2
Beginning of program section repeat 2
...
27 CALL LBL 2 REP 2
Program section call with two repeats
...
35 CALL LBL 1 REP 1
The program section between this NCblock and LBL1
...
(NCblock 15) is repeated once
50 END PGM REPS MM
Program execution
1 Main program REPS is executed up to NCblock27
2 The program section between NCblock27 and NCblock20 is
repeated twice
3 Main program REPS is executed from NCblock28 up to
NCblock35
4 The program section between NCblock35 and NCblock15 is
repeated once (including the program section repeat between
NCblock20 and NCblock27)
5 Main program REPS is executed from NCblock36 up to
NCblock50. Return jump to NCblock1 and end of program
260
HEIDENHAIN | TNC620 | Klartext Programming User's Manual | 01/2022