Subprograms and program section repeats – HEIDENHAIN PT 855 for Turning User Manual
Page 38

I - 3
Programming POSITIP
POSITIP 855
Operating Instructions
39
Subprograms and program section repeats
Subprograms and program section repeats only need to be entered
once in the program. You can then run them up to 999 times.
Subprograms can be run at any point in the program; program sec-
tion repeats are run several times in direct succession.
Inserting program marks (labels)
You mark subprograms and program section repeats with labels
(abbreviated in the program with
LBL
).
Labels 1 to 99
Labels 1 to 99 mark the beginning of a subprogram or program
section repeat.
Label 0
Label 0 is used only to identify the end of a subprogram.
Label call
In the program, subprograms and program section repeats are
called with the command
CALL LBL
.
The command
CALL LBL 0
is not allowed.
Subprogram:
A subprogram called with
CALL LBL
is executed immediately af-
ter the
CALL LBL
block.
Program section repeat:
The program section located before the
CALL
LBL
block is ex-
ecuted. You enter the number of desired repeats with the
CALL
LBL
command.
Nesting program sections
Subprograms and program section repeats can also be “nested.”
For example, a subprogram can in turn call another subprogram or
repeat a program section repeat.
Maximum nesting depth: 8 levels.
Fig. 24: On-screen operating instructions for
subprograms (page 5 of 5)
Fig. 25: On-screen operating instructions for
program section repeats (page 3 of 5)