
3.EXECUTION MACRO FUNCTION B-63943EN-2/01
- 34 -
3.2.6 Macro Call Using M Code
Execution macro O9020 to 9029 is called using the M code specified
for compile parameters (Nos. 9023 to 9032) as a macro.
Format
*1 When bit 2 (PCDC) of compile parameter (No. 9163) is set to 1,
a call can be made from an execution macro.
*2 When bit 5 (MCARG) of compile parameter (No. 9008) is set to
1, address L is also used as an argument, so that the number of
repeats cannot be specified.
Correspondence between parameter numbers and program numbers
Program number Compile parameter number
O9020 9023
O9021 9024
O9022 9025
O9023 9026
O9024 9027
O9025 9028
O9026 9029
O9027 9030
O9028 9031
O9029 9032
Argument specification
• Argument specification I or II is automatically determined
according to the address used.
• When bit 5 (MCARG) of compile parameter (No. 9008) is set to
1, address G/L/P/N is also used as an argument. Address N,
when specified before a call M code, is used not as an argument
but as a sequence number.
Mm L l <argument-
specification> ;
m : Call M code. Must be specified before any
argument.
l
(*2)
: Repetition count (1 by default)
1 to 999999999
argument : Data to be passed to the execution
macro. Argument specifications I and II
are available.
User program
(*1)
Execution macro
O0001 ;
:
M200 X10.0 Y20.0 Z-10.0 ;
:
M30 ;
O9020 ;
:
:
:
N9 M99 ;
Compile parameter (No.9023)=200