Helical interpolation loop calculation
%
N400
(LOOP FUNCTION)
(FOR EXAMPLE CROSSHOLE HELICAL MILLING)
G28U0.V0.
G30W0.
T0505
G19
#110=5.(STARTPOINT IN X)
#111=4.625(ENDPOINT IN X)
#112=.15(BACK OFF FROM BOTTOM FOR REDUCED FEED)
#113=.05(FEED PER HELICAL REVOLUTION)
#114=.02(FEED PER HELICAL REVOLUTION AT BOTTOM)
#115=.75(TOOL DIAMETER)
#116=1.(DIAMETER OF HOLE)
#117=20.(FEEDRATE)
#118=10.(REDUCED FEEDRATE AT BOTTOM)
(#119 = ENDPOINT IN X WITH OR WITHOUT BACKING OFF AT BOTTOM)
IF[#112EQ0]THEN#119=#111
IF[#112GT0]THEN#119=[#111+2*#112]
#120=FUP[[#110-#119]/2/#113](NO. OF LOOPS)
#121=[#110-#119]/2/#120(CALCULATED FEED PER HELICAL REVOLUTION)
(#122 ROUNDING MIGHT NOT BE NECESSARY)
#122=[[ROUND[#121*10000]]/10000](ROUNDED CALCULATED FEED PER HELICAL REVOLUTION)
#123=FUP[#112/#114](NO. OF LOOPS)
#124=#112/#123(CALCULATED FEED PER HELICAL REVOLUTION)
(#125 ROUNDING MIGHT NOT BE NECESSARY)
#125=[[ROUND[#124*10000]]/10000](ROUNDED CALCULATED FEED PER HELICAL REVOLUTION)
G0X#110(X STARTPOINT)
G98G3G41V-[[#116-#115]/2]J-[[#116-#115]/4]F#117
#100=1
WHILE[#100LE[#120-1]]DO1
G3J[[#116-#115]/2]U-[#121*2]
#100=#100+1
END1
G3J[[#116-#115]/2]X#119(FINAL HELICAL PASS)
IF[#5001GT#111]GOTO1234(#5001 = CURRENT X POSITION)
G3J[[#116-#115]/2](FINAL FLAT BOTTOM PASS)
V[[#116-#115]/2]J[[#116-#115]/4](RETURN TO CENTER OF HOLE)
GOTO1235
N1234
#100=1
WHILE[#100LE[#123-1]]DO1
G3J[[#116-#115]/2]U-[#124*2]F#118
#100=#100+1
END1
G3J[[#116-#115]/2]X#111(FINAL HELICAL PASS)
G3J[[#116-#115]/2](FINAL FLAT BOTTOM PASS)
V[[#116-#115]/2]J[[#116-#115]/4](RETURN TO CENTER OF HOLE)
N1235
G0X#110(RETURN TO X STARTPOINT)
G40
G18
M0
(*************************)
N500
(LOOP FUNCTION)
(FOR EXAMPLE FACEHOLE HELICAL MILLING)
G28U0.V0.
G30W0.
G17
T0505
G0X10.Z1.
#110=.05(STARTPOINT IN Z)
#111=-.395(ENDPOINT IN Z)
#112=.2(BACK OFF FROM BOTTOM FOR REDUCED FEED)
#113=.05(FEED PER HELICAL REVOLUTION)
#114=.02(FEED PER HELICAL REVOLUTION AT BOTTOM)
#115=.75(TOOL DIAMETER)
#116=1.(DIAMETER OF HOLE)
#117=20.(FEEDRATE)
#118=10.(REDUCED FEEDRATE AT BOTTOM)
(#119 = ENDPOINT IN Z WITH OR WITHOUT BACKING OFF AT BOTTOM)
IF[#112EQ0]THEN#119=#111
IF[#112GT0]THEN#119=[#111+#112]
#120=FUP[[#110-#119]/#113](NO. OF LOOPS)
#121=[#110-#119]/#120(CALCULATED FEED PER HELICAL REVOLUTION)
(#122 ROUNDING MIGHT NOT BE NECESSARY)
#122=[[ROUND[#121*10000]]/10000](ROUNDED CALCULATED FEED PER HELICAL REVOLUTION)
#123=FUP[#112/#114](NO. OF LOOPS)
#124=#112/#123(CALCULATED FEED PER HELICAL REVOLUTION)
(#125 ROUNDING MIGHT NOT BE NECESSARY)
#125=[[ROUND[#124*10000]]/10000](ROUNDED CALCULATED FEED PER HELICAL REVOLUTION)
G0Z#110(Z STARTPOINT)
G98G3G41V-[[#116-#115]/2]J-[[#116-#115]/4]F#117
#100=1
WHILE[#100LE[#120-1]]DO1
G3J[[#116-#115]/2]W-#121
#100=#100+1
END1
G3J[[#116-#115]/2]Z#119(FINAL HELICAL PASS)
IF[#5001GT#111]GOTO1234(#5003 = CURRENT Z POSITION)
G3J[[#116-#115]/2](FINAL FLAT BOTTOM PASS)
V[[#116-#115]/2]J[[#116-#115]/4](RETURN TO CENTER OF HOLE)
GOTO1235
N1234
#100=1
WHILE[#100LE[#123-1]]DO1
G3J[[#116-#115]/2]W-#124F#118
#100=#100+1
END1
G3J[[#116-#115]/2]Z#111(FINAL HELICAL PASS)
G3J[[#116-#115]/2](FINAL FLAT BOTTOM PASS)
V[[#116-#115]/2]J[[#116-#115]/4](RETURN TO CENTER OF HOLE)
N1235
G0Z#110(RETURN TO Z STARTPOINT)
G40
G18
M0
%
Comments
Post a Comment