
3 M Code
3 - 20
NJ/NY-series G code Instructions Reference Manual (O031)
M98 Subprogram Call
The M98 is a function to call a subprogram from the program currently running.
Specify a subprogram to call by a number next to the P argument.
The called subprogram is executed from the first block.
When M99 is executed in the subprogram, the execution control returns to the main program from
which the subprogram was called.
If the specified subprogram is not found, an alarm is output and the program stops running.
When you specify P1000 as shown in the following sample, subprogram 1000 is called.
Also when you specify the number 10 after the L argument as shown in the following, the subprogram
can be called 10 times.
Subprograms must be called within the depth of 8. The depth is counted from 1.
If the depth exceeds 8, subprograms are not invoked but the next block is executed.
Refer to the programming example of
Instruction format
M98 P{data} [L{data}]
Relevant M codes
M99
N30 M98 P1000 // Calls subprogram P1000.
N40 G00 X100
N30 M98 P1000 L10 // Calls the P1000 subprogram 10 times.
N40 G00 X100
Programming Example
Содержание NJ501-5300
Страница 13: ...11 CONTENTS NJ NY series G code Instructions Reference Manual O031...
Страница 28: ...Revision History 26 NJ NY series G code Instructions Reference Manual O031...
Страница 38: ...1 Basic Information on NC Programming 1 10 NJ NY series G code Instructions Reference Manual O031...
Страница 40: ...2 G Code 2 2 NJ NY series G code Instructions Reference Manual O031...
Страница 53: ...2 15 NJ NY series G code Instructions Reference Manual O031 2 Dwell Instruction Name Page G04 Dwell P 2 16...
Страница 72: ...2 G Code 2 34 NJ NY series G code Instructions Reference Manual O031...
Страница 108: ...3 M Code 3 2 NJ NY series G code Instructions Reference Manual O031...
Страница 112: ...3 M Code 3 6 NJ NY series G code Instructions Reference Manual O031...
Страница 124: ...3 M Code 3 18 NJ NY series G code Instructions Reference Manual O031...
Страница 128: ...3 M Code 3 22 NJ NY series G code Instructions Reference Manual O031...
Страница 136: ...4 PROGRAM CODES 4 8 NJ NY series G code Instructions Reference Manual O031...
Страница 141: ......