(Common to Power Mate i–D and –H)
11. PROGRAM CONFIGURATION
If a program contains a fixed sequence or frequently repeated pattern, such
a sequence or pattern can be stored as a subprogram in memory to simplify
A subprogram can be called from the main program.
A called subprogram can also call another subprogram.
(or the colon (:) optionally in the case of ISO)
M99 need not constitute a separate block as indicated below.
Example) X100.0 Y100.0 M99 ;
M98 P ;
Number of times the
subprogram is called
When no repetition data is specified, the subprogram is called just once.
When the main program calls a subprogram, it is regarded as a one–level
subprogram call. Thus, subprogram calls can be nested up to four levels
as shown below.
(One–level nesting) (Two–level nesting) (Three–level nesting)
A single call command can repeatedly call a subprogram up to 999 times.
For compatibility with automatic programming systems, in the first
block, Nxxxx can be used instead of a subprogram number that follows
O (or :). A sequence number after N is registered as a subprogram number.
See Chapter V–10 for the method of registering a subprogram.
1 The code signal and strobe signal of M98 and M99 signals
are not output to the machine tool.
2 If the subprogram number specified by address P cannot be
found, an alarm (No.078) is output.