
3.EXECUTION MACRO FUNCTION B-63943EN-2/01
- 54 -
3.2.14 Subprogram Call Using S Code
When bit 0 (SSC) of parameter (No. 9105) is set to 1, execution
macro O9029 is called as a subprogram using an S 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 S code is passed to variable #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.
Limitation
• Usually, when an execution macro is called from a program
called using an S 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
an S 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.
Ss L l ;
s : Call M code
l : Repetition count (1 by default)
1 to 999999999
User program
(*1)
Execution macro
O0001 ;
:
S200 L2 ;
:
M30 ;
O9029 ;
:
:
:
M99 ;