System information

SECTION FIVE - MISCELLANEOUS FUNCTIONS (M CODES)
Subprogram execution
A subprogram is executed when called by the main program or another subprogram. A
subprogram call has the following format.
M98 PXXXX LXXX
Where PXXXX = subprogram number
And LXXX = number of times the subprogram is to be
repeated
Example: M98 P0002 L5
M98 P2 L5
Call 2 L5
This command reads, call subprogram number 2 five times.
When the loop number is omitted, the subprogram is run once.
A subprogram call command and move command can be specified in the same block.
Example: X1 M98 P0200
In this example the subprogram 200 is called after completing movement in the X axis direction.
The execution sequence of a main program which calls a subprogram is as follows.
When the subprogram is called by another subprogram, it is executed in the same sequence as
shown in the above example.
319