
3.EXECUTION MACRO FUNCTION B-63943EN-2/01
- 28 -
3.2.3 Macro Call Using G Code
Execution macro O9010 to O9019 is called using the G code specified
for compile parameters (Nos. 9013 to 9022) as a macro.
When a negative G code is set for a parameter, a modal call is
performed for the corresponding execution macro. For details of
modal calls, see Subsection 3.2.5.1, "Macro Modal Call Using G
Code".
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
O9010 9013
O9011 9014
O9012 9015
O9013 9016
O9014 9017
O9015 9018
O9016 9019
O9017 9020
O9018 9021
O9019 9022
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. So, the
number of repeats cannot be specified. Address N, when
specified before a call G code, is used not as an argument but as
a sequence number.
Gg L l <argument-specification> ;
g : Call G 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 ;
:
G81 X10.0 Y20.0 Z-10.0 ;
:
M30 ;
O9010 ;
:
:
:
N9 M99 ;
Compile parameter (No.9013)=81