What's new
What's new

Fanuc speed feed macro also sub in main prog plus cutter comp and helix

AngryJon

Plastic
Joined
Jan 6, 2022
I have had many people ask me to write a programme that works on a fanuc robodrill
where we have no option of cutter comp also no option of looping a helix move i.e.

G01 Z0. F500.
G91 G41 X15. D01
G03 I-15. Z-2.5 L10 F1000.
G03 I-15.
G01 G40 X-15.
G90 G00 Z10

which works well on a HAAS this would give us a 30mm dia taking a 2.5mm cut per turn which would end up -25. deep
also they could not have sub programmes in the main programme
well here u go i hit all 3

O1236 (SUB try out)
(T1 H1 D1 - 10 SGS )
#1 = 10.0 (TOOL1 CUTTER DIA) <<change cutter dia here to remove or leave meat on
#2 = 30.0 (G54 HOLE DIA) << here is the dia of your hole
#3 = 1.0 (G54 Z START POINT) << we start this move 1mm above job
#4 = -2.0 (G54 Z MOVE PER CIRCLE) << z move per turn (this needs to divide into the start point and fin depth i.e 26mm / 2mm works but 1.9mm will not)
#5 = -25.0 (G54 Z FINAL) << final z depth of hole

T1 M06
G00 G90 G54 X0.0 Y0.0
S4000 M03
G43 H1 Z50.
M08
G00 X0.0 Y0.0 Z50.
Z1.
GOTO 1000 << GOTO move here is where it jumps to N1000
G90 G00 Z10.

M01
M09
G00 G53 Z0.
G53 X10. Y-10.
M30

N1000
G01 G91 X[[#2/2]-[#1/2]] F500.
WHILE [#3GT#5] DO1
#3=#3+#4
G03 I-[[#2/2]-[#1/2]] Z#4 F800.0
END1
G03 I-[[#2/2]-[#1/2]]
X-[[#2/2]-[#1/2]]
M99 <<M99 takes u back to the line under GOTO


we work on fanuc robodrills 16i-m
we have no cutter comp and we can not helix down
so i wrote this macro to helix down to z-25. with a dia of 30mm
if u change the tool dia in #1 the hole will adjust
also i added a GOTO so i can read a sub programme added after the m30 :)


FEED SPEED MACRO.....

(FEED AND SPEEDS MACRO)
#1 = 200 (VC)
#2 = .125 (FEED PER TOOTH) this must be feed per tooth check vendor as some give exact feed i.e .25 i just divided by teeth
#3 = 8 (DIA OF DRILL)
#4 = 2 (NUMBER OF FLUTES)

#501 = ROUND[[#1*1000]/[#3*3.1416]] (CALCULATE RPM)
#502 = [#4*#2*#501] (CALCULATE FEED)

(#501 IS 200(VC)*1000=200000 / 8(DIA)*3.1416(PI)=25.1328 SO 200000/25.1328=7957RPM)
(#502 IS 2(TEETH)*.125(FEED PER TOOTH)*7957(RPM)=1989FEED)

SO YR SPEED AND FEED IN PROGRAMME SHOULD LOOK LIKE THIS
S#501
F#502

IF U WAND TO GO HALF FEED RATE TO PLUNGE IN MAT 1ST THEN FEED LOOKS LIKE THIS
F#502/2 WHICH WILL DIVIDE 1989FEED IN 2
 








 
Back
Top