
PROGRAMMING
B–63194EN/02
13. CUSTOM MACRO
259
Bolt hole circles are machined. Each time positioning is performed, a bolt
hole is machined at that location.
270°
Bolt hole
X
Y
D The origin of the polar coordinate
system is the same as that of the
workpiece coordinate system.
D The plane is the X–Y plane.
150°
30°
G65 P9110 Rr;
R: Radius of a bolt hole circle (#18). . . . . . . . . . . . . . . . . . . . . . . . .
O0001;
G17 G90 G16; Polar coordinate command, X–Y plane selection. .
The origin of the polar coordinate system is the same
as that of the workpiece coordinate system.
G66 P9110 R10.0 F2000; Macro modal call specification. . .
G00 X100.0 Y30.0; Radius: 100 mm, angle: 30 deg.. . . . . . . .
G00 X150.0; Radius: 100 mm, angle: 150 deg.. . . . . . . . . . . . . .
G00 Y270.0; Radius: 100 mm, angle: 270 deg.. . . . . . . . . . . . . .
G15; Polar coordinate command cancel. . . . . . . . . . . . . . . . . . . .
M30;
O9110;
G91 G15;
G24; Piercing. . . . . . . . . . . . . . . . . . . . .
G01 Y–#18; Bolt hole machining. . . . . . . . . . . . . . .
G03 J#18; Bolt hole machining. . . . . . . . . . . . . . . .
G90 G16;
M99;
Sample program
D Calling format
D Program that calls a
macro program
D Macro program
(program called)