6 Subprograms and Program Section Repeats
d
d
6.3 Program as Subprogram
Principle
4
A program is executed until another program is
called (block with CALL PGM) (0).
The called program is executed from beginning to
end (@I.
Execution of the program from which the other
program was called is then resumed with the block
following the CALL PGM block (0).
0
BEGIN PGM A...
:
,,, ” 0
BEGIN PGM B...
I
I
1
4
. CALL PGM B
,,,, ,.,. ,,l.
I
4
3
END PGM A... ’
,.,,,
END PGM B..
Operating limits
Fig. 6.3: Flow
diagram of a program as subprogram;
@ = jump, @ = return jump
l
Programs called from an external data storage
medium must not contain any subprograms or
program section repeats.
l
No labels are needed to call programs as
subprograms.
l
The called program must not contain the miscel-
laneous functions M2 or M30.
l
The called program must not contain a jump into
the calling program.
Calling a program as a subprogram
F
PR4IXXAM P#UMRER?
‘I
d
Enter the main program call and the number of the program you want to call.
/
._
Call an externally stored program
r-
-
EXT
/
Call a plain-language program
r--
4
.
H ;
Call an IS0 program
Call a program from the TNC memory
(default setting)
Resulting NC block: CALL PGM NAME
l
A main program can atso be
called
with cycle 12
PGM CALL bee page 83%
l
Whan
calling an tS0 program, the program name must not contain G50, E70 OF G71.
4
6-8
TNC 370