Figure 4.1.8.1 execution of a subprogram – Yaskawa YASNAC PC NC Programming Manual User Manual
Page 205
4 - 68
YASNAC PCNC Programming Manual
Chapter 4: Enhanced Level Commands
(b) End of Subprogram Code (M99)
At the end of a subprogram, M99 must be specified in a block without other commands.
Upon execution of M99, the program automatically returns to the block in the main pro-
gram next to the one where the subprogram has been called up. Fig, 4.1.8.1 shows how a
subprogram called up from the main program is executed.
FIGURE 4.1.8.1 Execution of A Subprogram
•
By specifying “M99P • • • • •;”, the program returns to the block specified by the P
command. in the main program instead of the block next to the one where the subpro-
gram has been called up.
•
If M99 is specified in a main program, the program returns to the beginning of that
main programming and the program is repeatedly executed.