I'm trying to get a macro working that mills a helical bore
I've wrote it with two different methods, and the motion still pauses at the end of each loop
each loop being the next helical move incrementally down in Z
The call looks like this:
G65 P9012 X0 Y0 Z1. D2. R0. T.5 Q.1 F10.
X,Y = center of bore
Z = depth
D = diameter
R = top of bore
T = tool diameter
Q = depth increment
F = feedrate
the first method uses a subroutine and L count:
the second uses an IF loop with a counter variable:Code:% O09012 #26= ABS[ #26 ] #100= ROUND[ #26 / #17 ] IF [ #100 LT [ #26 / #17 ] ] THEN #100= #100 + 1 #101= #26 / #100 #102= 0 - #101 #103= 1 #104= [ #7 / 2 ] - [ #20 / 2 ] G00 X#24 Y#25 Y [ #25 + #104 ] Z [ #18 + 0.1 ] G03 I#104 Z#18 F#9 M97 P1000 L#100 G03 I#104 F#9 G00 Y#25 Z [ #18 + 0.1 ] M30 N1000 G91 G03 I#104 Z#102 F#9 G90 M99 %
anybody got some help for me?Code:% O09012 #26 = ABS[ #26 ] #100 = ROUND [ #26 / #17 ] IF[#100 LT [ #26 / #17 ] ] THEN #100 = #100 + 1 #101 = #26 / #100 #102 = 0 - #101 #103 = 1 #104 = [ #7 / 2 ] - [ #20 / 2 ] G00 X#24 Y#25 Y [ #25 + #104 ] Z [ #18 + 0.1] G2 I#104 Z#18 F#9 N1 IF [ #103 GT #100 ] GOTO 75 G2 I#104 Z#102 F#9 #102 = #102 - #101 #103 = #103 + 1 GOTO 1 N75 G2 I#104 F#9 G00 Y#25 Z [ #18 + 0.1 ] M30 %
it'd be much appreciated


LinkBack URL
About LinkBacks




