PROGRAMMING 15. CUSTOM MACRO
B–63834EN/02
271
When G65 is specified, the custom macro specified at address P is called.
Data (argument) can be passed to the custom macro program.
G65 P_ L_ <argument–specification> ;
P_ : Number of the program to call
L_ : Repetition count (1 by default)
Argument : Data passed to the macro
O0001 ;
:
G65 P9010 L2 A1.0 B2.0 ;
:
M30 ;
O9010 ;
#3=#1+#2 ;
IF [#3 GT 360] GOTO 9 ;
G00 X#3 ;
N9 M99 ;
D After G65, specify at address P the program number of the custom
macro to call.
D When a number of repetitions is required, specify a number from 1 to
9999 after address L. When L is omitted, 1 is assumed.
D By using argument specification, values are assigned to corresponding
local variables.
Two types of argument specification are available. Argument
specification I uses letters other than G, L, O, N, and P once each.
Argument specification II uses A, B, and C once each and also uses I, J,
and K up to ten times. The type of argument specification is determined
automatically according to the letters used.
Argument specification I
A
B
C
D
E
F
H
#1
#2
#3
#7
#8
#9
#11
I
J
K
M
Q
R
S
#4
#5
#6
#13
#17
#18
#19
T
U
V
W
X
Y
Z
#20
#21
#22
#23
#24
#25
#26
Address Address
Address
Variable
number
Variable
number
Variable
number
D Addresses G, L, N, O, and P cannot be used in arguments.
D Addresses that need not be specified can be omitted. Local variables
corresponding to an omitted address are set to null.
D Addresses do not need to be specified alphabetically. They conform
to word address format.
I, J, and K need to be specified alphabetically, however.
Example
B_A_D_ … J_K_ Correct
B_A_D_ … J_I_ Incorrect
15.6.1
Simple Call (G65)
Explanations
D Call
D Argument specification