Ho trovato da qualche parte la macro
Qui gli argomenti che bisogna passargli "come usarla"
G65 P9100 X x Y y Z z R r F f I i A a B b H h ;
X: X coordinate of the center of the circle (absolute or incremental
specification) (#24) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Y: Y coordinate of the center of the circle (absolute or incremental
specification) (#25) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Z: Hole depth (#26) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
R: Coordinates of an approach point (#18) . . . . . . . . . . . . . . . . . . . . .
F : Cutting feedrate (#9) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
I : Radius of the circle (#4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A: Drilling start angle (#1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B: Incremental angle (clockwise when a negative value is specified)
(#2) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
H: Number of holes (#11)
Qui la macro da inserire in memoria
Codice: Seleziona tutto
O9100;
#3=#4003
G81 Z#26 R#18 F#9 K0
IF[#3 EQ 90]GOTO 1
#24=#5001+#24
#25=#5002+#25
N1 WHILE[#11 GT 0]DO 1
#5=#24+#4*COS[#1]
#6=#25+#4*SIN[#1]
G90 X#5 Y#6
#1=#1+#2
#11=#11–1
END 1
G#3 G80
M99