4 separate program as subprogram, Operating sequence, Programming notes – HEIDENHAIN TNC 406 User Manual
Page 199: Calling any program as a subprogram
178
9 Programming: Subprograms and Program Section Repeats
9.4 Separ
a
te
Pr
ogr
a
m as Subpr
ogr
am
9.4 Separate Program as
Subprogram
Operating sequence
1
The TNC executes the part program up to the block in which
another program is called with CALL PGM.
2
Then the other program is run from beginning to end.
3
The TNC then resumes the first (calling) part program with the
block behind the program call.
Programming notes
Programs called from external storage media must not contain
subprograms or program section repeats.
No labels are needed to call any program as a subprogram.
The called program must not contain the miscellaneous functions
M2 or M30.
The called program must not contain a program call into the calling
program, otherwise an infinite loop will result.
Calling any program as a subprogram
8
To select the functions for program call, press the
PGM CALL key.
8
Program Name:
Enter the name of the program to be
called.
0 BEGIN PGM A
CALL PGM B
END PGM A
0 BEGIN PGM B
END PGM B
You can also call a program with Cycle 12 PGM CALL (see
also ”Calling Cycle 12 PGM-CALL” on page 171).