
16.CUSTOM MACRO PROGRAMMING B-63944EN/02
- 458 -
16.7.10 Subprogram Call Using an M Code (Specification of Multiple
Definitions)
By setting the starting M code number used to call a subprogram, the
number of the starting subprogram to be called, and the number of
definitions, subprogram calls using multiple M codes can be defined.
Explanation
As many subprograms as the number specified in parameter No. 6046
can be called using as many M codes as the number specified in
parameter No. 6046. The numeric value set in parameter No. 6044
indicates the starting M code number and the numeric value set in
parameter No. 6045 indicates the starting subprogram number. To
disable this type of call, set 0 in parameter No. 6046.
[Example]
Set parameter No. 6044 to 80000000, parameter No. 6045 to 30000000,
and parameter No. 6046 to 100.
M80000000 → O3000
M80000001 → O3001
M80000002 → O3002
:
M80000099 → O3099
Subprogram calls for 100 combinations are defined as shown above.
NOTE
1 The calls defined by this setting become all invalid in
the following cases:
<1> A value outside the valid data range is set in
one of the above parameters.
<2> (No. 6045 + No. 6046 - 1) > 99999999
2 If the M code set in parameter Nos. 6071 to 6079 to
call the corresponding subprogram is within the M
code range for calling subprograms using multiple M
codes, the subprogram corresponding to the M code
set in parameter Nos. 6071 to 6079 is called.