
PROGRAMMING
B–63534EN/02
15. CUSTOM MACRO
423
G65 P9110 X x Y y Z z R r F f L l ;
X: X coordinate of the hole (absolute specification only) (#24). . . .
Y: Y coordinate of the hole (absolute specification only) (#25). . . .
Z : Coordinates of position Z (absolute specification only) (#26). . .
R: Coordinates of position R (absolute specification only) (#18). . .
F : Cutting feedrate (#9). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
L : Repetition count
O0001;
G28 G91 X0 Y0 Z0;
G92 X0 Y0 Z50.0;
G00 G90 X100.0 Y50.0;
G66 P9110 Z–20.0 R5.0 F500;
G90 X20.0 Y20.0;
X50.0;
Y50.0;
X70.0 Y80.0;
G67;
M30;
O9110;
#1=#4001; Stores G00/G01.. . . . . . . . . . . . . .
#3=#4003; Stores G90/G91.. . . . . . . . . . . . . .
#4=#4109; Stores the cutting feedrate.. . . . . . . . . . . . . .
#5=#5003; Stores the Z coordinate at the start of drilling.. . . . . . . . . . . . . .
G00 G90 Z#18; Positioning at position R. . . . . . . .
G01 Z#26 F#9; Cutting feed to position Z. . . . . . . . .
IF[#4010 EQ 98]GOTO 1; Return to position I
G00 Z#18; Positioning at position R. . . . . . . . . . . . .
GOTO 2;
N1 G00 Z#5; Positioning at position I. . . . . . . . . . . . .
N2 G#1 G#3 F#4; Restores modal information.. . . . . . . .
M99;
By setting a G code number used to call a macro program in a parameter,
the macro program can be called in the same way as for a simple call
(G65).
O0001 ;
:
G81 X10.0 Y20.0 Z–10.0 ;
:
M30 ;
O9010 ;
:
:
:
N9 M99 ;
Parameter No.6050 = 81
By setting a G code number from 1 to 9999 used to call a custom macro
program (O9010 to O9019) in the corresponding parameter (N0.6050 to
No.6059), the macro program can be called in the same way as with G65.
For example, when a parameter is set so that macro program O9010 can
be called with G81, a user–specific cycle created using a custom macro
can be called without modifying the machining program.
D Calling format
D Program that calls a
macro program
D Macro program
(program called)
15.6.3
Macro Call Using
G Code
Explanations