NCT Group 99M Microscope & Magnifier User Manual


 
13 Part Program Configuration
75
main program
O0010
......
......
......
subprogram comment
execution of program
O0010
N101 M98 P0011
–––>
O0011 calling sub-program
O0011
......
......
......
execution of sub-
program O0011
N102 ......
<–––
M99 return to the next
block of the calling
program
......
......
resumption of program
O0010
The use of instruction
M99 P...
in a sub-program means the end of that sub-program, and the program execution returns to the
block of calling program specified at address P. In this case the limit values of P are to 99999.
main program
O0010
......
......
......
subprogram comment
execution of program
O0010
N101 M98 P0011 –––> O0011 calling sub-program
O0011
......
......
......
execution of
subprogram O0011
N250 ...... <––– M99 P250 return to the N250
block of the calling
program resumption of
O0010
......
......
Instruction
M99 (P.....) L....
will rewrite the cycle counter of the calling program. With 0 written for L, the sub-program will be
called only once. If, e.g., subprogram O0011 is called with instruction M98 P11 L20, and a return
is made with instruction M99 L5, subprogram O0011 will be called 6 times. (The limit values of L
are 1 to 9999.)
L Note:
– An error message 3070 NOT EXISTING BLOCK NO. P is displayed when the return block
number (P) is not found in the calling program.