
15.
15.1
CUSTOM MACRO
Macro
CaJi
Command (Custom Macro Command)
When these M codes are specified in a macro called with a G code or in a
subprogram called with an M code or a T code, the subprogram is not called, but
these M codes are treated as ordinary
M
codes. Set parameters
6071
to
6073.
15.1.6
Subprogram call with
T
code
If parameter TCS (No.
6OOW5)
is set to 1 in advance, a subprogram can be called
with a T
code.
N G X Z
--
T t;
isequiva=o
the following two blocks.
#149=t;
N G X Z
---
M98
P9000;
Tcode t is stored as an argument in common variable
#149.
The T code is displayed
on the program check screen, but TF and T codes are not transmitted.
When this T code is specified in a macro called with a G code, or in a subprogram
called with an M or T code, the subprogram is not called; but this T code is treated as
ordinary T code.
15.1.7
Difference between M98 (subprogram call) and
G65
(custom macro body call)
(
1
a
15.1.8
Multiplex
calls
(1)
Multiplex calls
G65
can include arguments; M98 cannot.
M98 is used to branch to a subprogram after executing a command other than
M or P in the block;
G65
is used to branch only.
When a M98 block includes an address other than 0, N and P, execution of the
block stops as single block stop, a
G65
block does not stop as single block
stop.
G65
changes the level of local variable; M98 does not. That is,
#l
specified
before G65 is one thing and
#I
in the calling custom macro body is another.
#l
specified before M98 is the same as
#l
in the calling subprogram.
Up to four
G65
calls, including G66, can be made in addition, M98 calls can be
made up to four calls.
Similarly to a subprogram called from another subprogram, a macro can be
called from another macro.
The multiplicity should be less than or equal to four including simple and modal
calls.
-Multiplex modal calls
In modal calls, the specified macro is called each time a motion command is
executed. When several modal macros are specified, the next macro is called
each time a motion command in the first macro is executed.
Macros are
successively called from those assigned later.
(Example 1)
G66
P9100;
z 1000.0; (l-l)
.
1-76