
3.EXECUTION MACRO FUNCTION B-63943EN-2/01
- 58 -
3.2.17 Subprogram Call Using Specific Code
When bit 1/2 (ACL1/ACL2) of compile parameter (No. 9002) is set to
1, execution macro O9004/9005 is called as a subprogram by using
the NC address (ASCII code converted to a decimal character code)
specified in parameters (Nos. 6090 and 6091). The parameters (Nos.
6090 and 6091) are ordinary parameters, so that the parameters can be
modified, for example, through the MDI panel.
Format
*1 When bit 2 (PCDC) of compile parameter (No. 9163) is set to 1,
a call can be made from an execution macro.
Call code
None of addresses O, N, P, L, and G and axis name addresses can be
used as the call command for a subprogram call using a specific code.
Correspondence among parameter numbers, program numbers, and
argument numbers
Parameter for enabling
a call
Parameter for a
call code
Program
number
Argument
AC1(No. 9002#1) No.6090 O9004 #146
AC2(No. 9002#2) No.6091 O9005 #147
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.
a L l ;
a : Call specific code
l : Repetition count (1 by default)
1 to 999999999
User program
(*1)
Execution macro
O0001 ;
:
E100 L2 ;
:
M30 ;
O9004 ;
:
:
:
M99 ;
Parameter (No.6090)=69(E)