Yaskawa J50M Instructions User Manual
Page 104

2.11.2 USER MACRO CALL COMMANDS (Cent’d)
(6) Multiple Call
A. G65
Simple Call and G66 Modal Call
As a subprogram is called from another subprogram, a
user macro may be called from another user macro.
Quadruple nesting is permitted for simple call and modal
call combined.
Program example
061 ;
062 ;
DO1 ;
DO1 ;
D02 ;
M98P63 ;
M98P62 ; – 1
GOT020 ;
O ;
END1 ;
END2 ;
N20M99 ;
END1 ;
N1OM3O ;
M98 or /G65 can be specified at the above
Besides quadruple nesting is permitted for
subprogram.
Multiple call is disabled for the macro
call by arbitrary G code, or M code or T code.
B. Multiple Call by G66 Modal Call
In modal call, each time a move command is ex-
ecuted, the designated macro is run.
This is
also valid for the move command in the macro
called by multiple call.
The macros are sequen-
tially executed from the one designated latest.
Sample Program
G66 P9500 ;
GOO z20. ;
B
;
;
GOO Z30. ;
09400 ;
GOO X40. ;
E
GOO Y50. ;
D
M99 ;
F
G
Main
Program
Macro
Macro
The above sample program is executed in the
following order :
2.11.3 ARGUMENT DESIGNATION
Argument is the real value to be assigned to a
variable used in the user macro body. Argument
designation, therefore, is the act of assigning
real values to variables.
Argument designation is
of type I and type II, which
q u i r e d .
(
Argument Designation 1
may be designated
cept for G, L, N, O, and P.
can be selected as re-
in any address
The relationships
between the argument designation addresses and
the variables are as shown below.
Table 2.32 Argument Designation I
Address of
Argument Designation
A
B
c
D
E
F
H
I
J
K
M
Q
R
s
T
u
v
x
Y
z
Variable in
User Macro Body
#1
#2
#3
#7
#8
#9
#11
#4
#5
#6
#13
#17
#18
#19
#20
#21
#22
#23
#24
#25
#26
For the address in which no argument need be designat-
ed, the command can be omitted.
Sample Program
#1 #2
#24
#26
t
G 6 5 P 9 1 O O L 3
x 3 4 . 8
;
I
Argument Designation
Part
(2)
A r g u m e n t D e s i g n a t i o n I I
A, B and C arguments and 10 sets of I, J and K argu-
ments can be designated. I, J and K must be designated
in this order. The relationships between the argument
designation addresses and the ‘variables are as
in
Table 2.33.