FANUC Series 16/18/160/180-Model C for Lathe Operator Manual

PROGRAMMING
16. CUSTOM MACRO
B–62754EN/01
296
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 p L ȏ <argument–specification> ;
P : Number of the program to call
ȏ : 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.
16.6.1
Simple Call (G65)

D Call
D Argument specification

Leave a Reply

Your email address will not be published. Required fields are marked *