
B-63943EN-2/01 3.EXECUTION MACRO FUNCTION
- 37 -
3.2.8 Special Macro Call Using T Code
When bit 7 (TMACC) of compile parameter (No. 9005) is set to 1,
execution macro O9008 is called as a macro by 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
When bit 7 (TMACC) of compile parameter (No. 9005) is set to 1,
this type of macro call is enabled. This parameter is 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 macro call as required. MTC can be changed from MDI because it
is an ordinary parameter.
Variable
Variable #8691 can be used to enable or disable this type of 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
Tt <argument-specification> ;
t : Call T code.
argument : Data to be passed to the execution
macro. Argument specifications I is
available.
User program
(*1)
Execution macro
O0001 ;
:
T20A2B3M06
:
M30 ;
O9008;
:
:
:
M99 ;
O0001 ;
:
T20A20.0B30.0M06
G00X20.Z30.;
:
T12;
:
M02;
O9008 ;
G00 X#1Z#2;
:
#8691=1;
:
M99;
← Functions as
ordinary T code
command.