
B-63943EN-2/01 3.EXECUTION MACRO FUNCTION
- 55 -
3.2.15 Subprogram Call Using T Code
When bit 0 (TMACC) of compile parameter (No. 9005) is set to 0 and
bit 0 (TCAL) of compile parameter (No. 9002) is set to 1, execution
macro O9000 is called as a subprogram using a T 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.
Parameter
Setting bit 0 (TMACC) of compile parameter (No. 9005) to 0 and bit
0 (TCAL) of compile parameter (No. 9002) to 1 enables this type of
subprogram call. These parameters are initialized to the values set for
P-CODE at power-on.
Bit 0 (MTC) of parameter (No. 9011) can be used to disable this type
of subprogram call as required. This parameter can be changed from
MDI because it is an ordinary parameter.
Variables
Variable #8691 can be used to enable or disable this type of
subprogram call and check the setting. The value set for this variable
is reflected in bit 0 (MTC) of parameter (No. 9011).
#8691 =0 : Enables a call using a T code. (MTC=0)
=1 : Disables a call using a T code. (MTC=1)
Example
User program Execution macro
O0001 ;
:
T11;
G00X20.Z30.;
:
T12;
:
M02;
O9000 ;
G00 X…;
:
#8691=1;
:
M99;
← Functions as
ordinary T code
command.
Tt L l ;
t : Call T code
l : Repetition count (1 by default)
1 to 999999999
User program
(*1)
Execution macro
O0001 ;
:
T200 L2 ;
:
M30 ;
O9000 ;
:
:
:
M99 ;