mikepaubuchon

09-25-2009, 08:23 PM

I am trying to do helical milling on Citizens (without the h-mill option). I use a macro programs all the time but this one has me a little stumped. The holes come out nice (size,finish) but the program runs very slow. I freed up as much memory as I could, thinking maybe that might help, but it is still slow. I am not sure, but it seems to be waiting to recalculate before each move? If I try using G2/G3 I get alarm(no option). Do I need to RND or use different formula? If any has done helical milling I would appreciate some tips. I will paste copy below.Thanks.

O0006 (HELICAL-MILL)

(SAVE POSITION OF X-Y-Z)

(X) #141=#5041

(Z) #142=#5042

(Y) #143=#5043

(PROGRAM-RADIUS-COMP)

#110=[#7-#20]/2

(X-MOVEMENT-1-DEG)

#104=[#1/360]*2

(X-END-POINT)

#114=#24-[#2*2]

G50Y0Z0

G1 G98 Y0. Z0. X#24+.02 F#9

(LOOP-TO-BOTTOM)

#124=#24

#105=1

WHILE[#124GE#114]DO1

#125=#110*COS[#105]

#126=#110*SIN[#105]

G1 Y[#125 * #13] Z#126 X#124 F#9

#105=#105+1.(INC.-DEG.)

#124=#124-#104

END1

(FULL-REVOLUTION-BOTTOM)

WHILE[#105LE[#105+360.]]DO2

#125=#110*COS[#105]

#126=#110*SIN[#105]

G1 Y[#125*#13] Z#126

#105=#105+1.(INC.-DEG.)

END2

(ARC-OFF-BOTTOM)

WHILE[#105LE[#105+90.]]DO3

#125=#110*COS[#105]

#126=#110*SIN[#105]

G1 Y[#125*#13] Z#126

#105=#105+1.(INC.-DEG.)

END3

G1Y0Z0 F#9

G0X#24+.1

(SET-BACK-TO-ORIGINAL)

G50X#141Z#142Y#143

M99

(!!!-X=DIAM-VALUE-!!!)

(!!!-A,B=RAD.-VALUE-!!!)

(X- START-DIAMETER)

(A- DEPTH-PER-REVOLUTION-X)

(B- DEPTH-OF-HOLE)

(D- DIAM-OF-HOLE)

(F- FEED-IPM)

(T- TOOL-DIAMETER)

(M1- FOR-Y-RADIUS-MACHINES)

(M2- FOR-Y-DIAMETER-MACHINES)

(#105=PROGRAM-COUNTER-DEGREES)

(#110=PROGRAM-TOOL-RADIUS-COMP)

(#104=X-MOVE-1-DEGREE)

(#114=X-DIAM-AT-BOTTOM-OF-HOLE)

(#124=PROGRAM-X-COORDINATE)

(#125=PROGRAM-Y-COORDINATE)

(#126=PROGRAM-Z-COORDINATE)

(#141=X CURRENT POSITION)

(#142=Z CURRENT POSITION)

(#143=Y CURRENT POSITION)

O0006 (HELICAL-MILL)

(SAVE POSITION OF X-Y-Z)

(X) #141=#5041

(Z) #142=#5042

(Y) #143=#5043

(PROGRAM-RADIUS-COMP)

#110=[#7-#20]/2

(X-MOVEMENT-1-DEG)

#104=[#1/360]*2

(X-END-POINT)

#114=#24-[#2*2]

G50Y0Z0

G1 G98 Y0. Z0. X#24+.02 F#9

(LOOP-TO-BOTTOM)

#124=#24

#105=1

WHILE[#124GE#114]DO1

#125=#110*COS[#105]

#126=#110*SIN[#105]

G1 Y[#125 * #13] Z#126 X#124 F#9

#105=#105+1.(INC.-DEG.)

#124=#124-#104

END1

(FULL-REVOLUTION-BOTTOM)

WHILE[#105LE[#105+360.]]DO2

#125=#110*COS[#105]

#126=#110*SIN[#105]

G1 Y[#125*#13] Z#126

#105=#105+1.(INC.-DEG.)

END2

(ARC-OFF-BOTTOM)

WHILE[#105LE[#105+90.]]DO3

#125=#110*COS[#105]

#126=#110*SIN[#105]

G1 Y[#125*#13] Z#126

#105=#105+1.(INC.-DEG.)

END3

G1Y0Z0 F#9

G0X#24+.1

(SET-BACK-TO-ORIGINAL)

G50X#141Z#142Y#143

M99

(!!!-X=DIAM-VALUE-!!!)

(!!!-A,B=RAD.-VALUE-!!!)

(X- START-DIAMETER)

(A- DEPTH-PER-REVOLUTION-X)

(B- DEPTH-OF-HOLE)

(D- DIAM-OF-HOLE)

(F- FEED-IPM)

(T- TOOL-DIAMETER)

(M1- FOR-Y-RADIUS-MACHINES)

(M2- FOR-Y-DIAMETER-MACHINES)

(#105=PROGRAM-COUNTER-DEGREES)

(#110=PROGRAM-TOOL-RADIUS-COMP)

(#104=X-MOVE-1-DEGREE)

(#114=X-DIAM-AT-BOTTOM-OF-HOLE)

(#124=PROGRAM-X-COORDINATE)

(#125=PROGRAM-Y-COORDINATE)

(#126=PROGRAM-Z-COORDINATE)

(#141=X CURRENT POSITION)

(#142=Z CURRENT POSITION)

(#143=Y CURRENT POSITION)