
B-63943EN-2/01 3.EXECUTION MACRO FUNCTION
- 57 -
3.2.16 Subprogram Call Using Second Auxiliary Function Code
When bit 1 (BSC) of compile parameter (No. 9105) is set to 1,
execution macro O9028 is called as a subprogram using a second
auxiliary function 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.
Argument
The specified second auxiliary function code is passed to variable
#146.
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.
Limitation
• Usually, when an execution macro is called from a program
called using a second auxiliary function code, only a G65 or
M98 command can be specified. When bit 2 (PCDC) of
compile parameter (No. 9163) is set to 1, G66 and G66.1 are also
usable.
• When bit 2 (PCDC) of compile parameter (No. 9163) is set to 1,
a call using a G code can be made from a program called using a
second auxiliary function code by setting bit 6 (GMP) of
parameter (No. 6008) to 1. This parameter is an ordinary
parameter, so that this parameter can be modified, for example,
through the MDI panel.
Bb L l ;
b : Call second auxiliary function code
l : Repetition count (1 by default)
1 to 999999999
User program
(*1)
Execution macro
O0001 ;
:
B100 L2 ;
:
M30 ;
O9028 ;
:
:
:
M99 ;