
B-63944EN/02 PROGRAMMING 13.PROGRAM CONFIGURATION
- 295 -
- Using a subprogram only
A subprogram can be executed just like a main program by searching
for the start of the subprogram with the MDI.
(See III-10.4 for information about search operation.)
In this case, if a block containing M99 is executed, control returns to
the start of the subprogram for repeated execution. If a block
containing M99Pn is executed, control returns to the block with
sequence number n in the subprogram for repeated execution. To
terminate this program, a block containing /M02 ; or /M30 ; must be
placed at an appropriate location, and the optional block switch must
be set to off ; this switch is to be set to on first.
N1010 . . . ;
N1020 . . . ;
N1030 . . . ;
N1040 . . . M02 ;
N1050 M99 P1020 ;
/
Optional block skip
ON