
3.EXECUTION MACRO FUNCTION B-63943EN-2/01
- 52 -
3.2.13 Subprogram Call Using M Code (Specification of 3 Sets)
Up to three sets, each consisting of a start M code number used for
subprogram calling, start execution macro number to be called, and
the number of execution macros to be defined, can be set in compile
parameters. This capability can additionally define three separate
sets of execution macros.
Local variable levels
By setting bit 3 (LCLLV) of compile parameter (No. 9163) to 1, the
level can be changed as in the case of macro calls when an execution
macro is called from a user program. In this case, all local variables
are set to <null> when an execution macro is called. (Series 16i
compatibility specifications)
When an execution macro is called from another execution macro, the
level remains unchanged as in the case where bit 3 (LCLLV) of
compile parameter (No. 9163) is set to 0. In this case, the local
variables at the call source are passed.
Parameter setting
The table below indicates the compile parameters to be set for each
set.
1st set 2nd set 3rd set
Start M code number
9111 9114 9117
Number of execution macros to
be defined
9112 9115 9118
Start execution macro number
9113 9116 9119
Example
Setting of the 1st set: No. 9111=100 No. 9113=8000 No. 9112=10
Setting of the 2nd set: No. 9114=150 No. 9116=8100 No. 9115=30
Setting of the 3rd set: No. 9117=200 No. 9119=8900 No. 9118=5
The settings above define the following sets of subprogram calls:
1st set 2nd set 3rd set
M100
→
O8000 M150
→
O8100 M200
→
O8900
M101
→
O8001 M151
→
O8101 M201
→
O8901
M102
→
O8002 M152
→
O8102 M202
→
O8902
: : : : M203
→
O8903
M109
→
O8009 G179
→
O8129 M204
→
O8904