Yeah. A custom macro.
Are you wanting to know how to write one?
Hello all,
Attached is a scanned diagram from our HAAS milling machine manuals showing the G13 command, which is an incremental circular pocket milling command.
This G13 command does not exist on our newer Fanuc 16i-M controller for our horizontal boring mill.
Using the macro found here:
Circle Milling A Bolt Hole Pattern : Modern Machine Shop
I have been able to circular mill in a bolt hole pattern but in a single cut.
There must be a way to take multiple cuts as in this G13 haas cycle?
Any thoughts? Thank you in advance.
Similar Threads:
Yeah. A custom macro.
Are you wanting to know how to write one?
thank you, yes i am. i have a custom macro book here, that i have looked through and have used for minor changes in the past...but i am not very familiar at all with macros.
does this macro already exist somewhere to be seen? i imagine this has been asked for many times, but still cant seem to find it.
appreciate any insight.
I am sure someone has a macro to do this already in their library. Maybe they will upload it here. Until then, if you have the Haas macro, you can modify/rewrite it to work with Fanuc.
There are 2 existing threads on this.
In one I posted my G13 (yaznaq formatted) macro I use on a Mori Seiki with the MSC-518 ( Fanuc 18M) control.
Others built on it and those results were in a later thread.
thanks, unfortunately 'G13' is not a searchable word on this forum...
i've found one of the threads...
http://www.cnczone.com/forums/fanuc/...g13_fanuc.html
happen to have a link to the other? thank you
hehe! I suspect that thread went over your head ;-)
you can't use G13. it only cuts a single pass. you need a full blown pocket roughing macro.
I have not seen anything useful like this on the net so I'll release one from my archives for the community :-)
Here's a circle pocket milling macro I wrote about 25 years ago.
This will mill a 50mm x 24.5mm deep circular pocket taking 5mm deep rough cuts with center X0 Y0.
the explanation of the variables is at the bottom. just change the numbers on the G65 line to something simple in inches.
for example....
G65 P9205 A2. B0 E0.2 F0.01 H0 I2. J10. K2. Q40. R0.5 T-1. X0 Y0 Z-2.
it should be relatively easy to understand what its doing but unless you're an expert dont try to understand the macro.
just try it on the machine above the job/table to see the movements.
%
O0001 (MACRO-CIRCLE POCKET MILLING)
G40 G49 G90 G92 X-200. Y200. Z0
G0 X0 Y0 G43 H1 Z100. S500 M3
G65 P9205 A50. B0 E5. F1. H0 I50. J150. K50. Q40. R3. T-1. X0 Y0 Z-24.5
G0 G49 Z0 M5
G27 X-200. Y200. Z0
M30
%
%
O9205
#7=#2064
#10=#26+#9
IF [[[#1/2]-[#2/2]] GT [#7*2]] GOTO 1
#3000=64 (CUTTER LARGER THAN HOLE!)
N1 IF [#20 GT 0] GOTO 2
#12=3
GOTO 5
N2 #12=2
N5 #13=#1/2
#14=#2/2
#15=#13-#9-#24-#7
#16=#9+#7
#19=2*#7*#17/100
#21=#13-#14-2*#16
#22=#21/#19
#23=#21/#22
#27=#13-#9-#7
G0 X#24 Y#25
Z#18
X-#15
#28=#11
WHILE [#11 GT #10] DO 1
#28=#28-#8
IF [#28 GE #10] GOTO 3
#28=#10
N3 G1 Z#28 F#4
G#12 I#27 F#5
#29=1
WHILE [#29 LE #23] DO 2
G1 X-[#15-#29*#22] F#5
G#12 I[#27-#29*#22]
#29=#29+1
END 2
G0 Z#18
X-#15 Y#25
IF [#28 LE #10] GOTO 4
G1 Z[#28+1] F[10*#4]
END 1
N4 #15=#13-#24-#7
#21=#13-#14-2*#7
#22=#21/#19
#23=#21/#22
#27=#13-#7
G0 X-#15
G1 Z#26 F#4
G4 X.5
G#12 I#27 F#6
#29=1
WHILE [#29 LE #23] DO 1
G1 X-[#15-#29*#22] F#6
G#12 I[#27-#29*#22]
#29=#29+1
END 1
G0 Z#18
M99
%
#1 A:OUTSIDE DIAMETER
#2 B:INSIDE DIAMETER
#8 E:DEPTH OF ROUGHING CUT (Z AXIS)
#9 F:FINISHING ALLOWANCE (COMMON TO ALL AXIS)
#11 H:TOP OF JOB (Z AXIS)
#4 I:FEEDRATE DOWN (Z AXIS)
#5 J:FEEDRATE IN X-Y PLANE
#6 K:FINISHING FEEDRATE
#17 Q:PERCENTAGE OF CUTTER USED TO TAKE CUT IN X-Y PLANE
#18 R:RAPID POINT ABOVE JOB
#20 T:CUTTING DIRECTION 1=CLOCKWISE, -1=ANTI-CLOCKWISE
#24,#25 X,Y:CENTRE COORDINATES OF CIRCLE
#26 Z:DEPTH OF CAVITY
#2064 TOOL DIAMETER OFFSET 64 (2001 - 2064)
If using D1 use #2001
Last edited by fordav11; 10-28-2012 at 05:33 AM.
fordav - thank you! i'm going to give this a try, looks like just what i need
the last step, you want to create your own G-code call in Fanuc 18m, G13 g-code,
insert 13 in parameter 6050.
renumber O9205 to O9010 and your done.
now G13 will call program 9010, replace "G65 P9205" in your code,
Here is a macro we use on all of our Fanuc controls. You need to position to center of feature, and move down to desired depth. This macro does "1" shot holes and also will spiral. You can also loop with L command. (G13 I.xxx Dx Fx Lx)
Hope this helps.
:9013(G13 SPIRALLING MACRO)
#3003=1
(FOR FANUC 15M AND 16M, 18M ONLY.)
(15M PARAMETER 7053=13)
(16M, 18M PARAMETER 6053=13)
(G13,I,K,Q,D,F AND ALSO C)
(ON SPIRAL I=START RAD, K=FINISH RAD)
(Q=STEPOVER,D=DIAM OFFSET#,F=FEEDRATE)
(EX. FOR 2 DIAM WITH START FOR 1/2)
(G13I.25K1.0Q.1D1F25.0)
(IF USED, I,K AND D MUST BE GIVEN IN)
(THE SPECIFIC ORDER AS SHOWN ABOVE.)
(OMIT K AND Q FOR REGULAR)
(NON-SPIRALLING CIRCLE CUTTING.)
(I=FINISH RAD)
(EX. FOR 2 DIAM, G13 I1.0 D1 F25.0)
(DECIMAL PT NOT NEEDED ON ARGUMENT D)
(ALL OTHER ARGUMENTS MUST SHOW A DECIMAL PT)
(C MAY ALSO BE USED FOR # OF FULL 360 DEGREE)
(ROTATIONS BEFORE TOOL RETURNS TO CENTER.)
(IF C IS NOT USED, #3 DEFAULTS TO 1.)
(I=#4,K=#6,Q=#17,D=#7,F=#9,C=#3)
#27=#5041
#28=#5042
#31=#4001
#32=#4002
#33=#4003
IF[#3NE#0]GOTO1
#3=1
N1#3=ABS[FIX[#3]]
#7=ABS[FIX[#7]]
IF[#9NE#0]GOTO2
#9=#4109
N2#9=ABS[#9]
IF[#4009EQ80]GOTO3
#3000=150(NOT IN G80 STATUS)
N3IF[#4007EQ40]GOTO4
#3000=151(NOT IN G40 STATUS)
N4IF[#4NE#0]GOTO5
#3000=152(I VALUE NOT GIVEN)
N5IF[#7NE#0]GOTO10
#7=0
N10#20=#[13000+#7]
IF[[ABS[#20]]LT[ABS[#4]]]GOTO20
#3000=153(TOOL RADIUS TOO LARGE)
N20IF[#6NE#0]GOTO25
#29=1
#21=#4-#20
#22=#21/2
G17
G91
G3X#21Y0I#22J0F#9
WHILE[#29LE#3]DO1
X0Y0I-#21J0
#29=#29+1
END1
X-#22Y#22I-#22J0
X-#22Y-#22I0J-#22F#9
GOTO40
N25IF[#17NE#0]GOTO30
#3000=154(Q VALUE NOT GIVEN)
N30#17=ABS[#17]
IF[[ABS[#6]]GT[ABS[#4]]]GOTO35
#3000=155(I NOT LESS THAN K)
N35IF[#4GT0]GOTO36
#6=-[ABS[#6]]
#17=-#17
GOTO37
N36#6=ABS[#6]
N37#101=#5001
#102=#5002
#21=#4-#20
#22=#21/2
#16=#6-#20
#15=#16/2
#30=ABS[#16]-ABS[#21]
G17
G91
G3X#21Y0I#22J0F#9
X0Y0I-#21J0
WHILE[#30GT[ABS[#17]]]DO2
G1X#17F[#9/2]
G3X0Y0I-[#21+#17]J0F#9
#21=#21+#17
#30=#30-ABS[#17]
END2
G90
#29=1
G1X[#101+#15]F#9
Y[#102-#15]
G3X[#101+#16]Y#102I0J#15F#9
WHILE[#29LE#3]DO3
X[#101+#16]Y#102I-#16J0
#29=#29+1
END3
X[#101+#15]Y[#102+#15]I-#15J0
X#101Y#102I0J-#15F#9
N40G01G90X#27Y#28
G#31G#32G#33
F#9
#3003=0
M99
Are this is for fanuc 15? The reason I ask is because I am new on the trade and since some time I need to do some spot face of 2.250 inch on diameter I will like to know how to use this macro.
Thank you
Best Regards
Javier
Sorry for the thread resurrection.
I'm looking to build a macro for a y axis lathe that can helical mill to a depth in X (using the X, Y and Z axes) and then spiral mill out (using the Y and Z axes). I'm currently programming this longhand, which is fine, but it doesn't lend itself well to small changes. We also have manual guide on the machine but the fanuc cycles are not fit for purpose IMO
Thanks in advance
DB
Not a macro but this code generating Google Spreadsheet might work as well. I wrote it for a part with 2 diameters/depths. You just fill out the white cells on the lift hand side and it will create the code on the right hand side (? Copy the code below ?). It doesn't orientate the part in C (just add the C-value to the highlighted line in the code).
I haven't tried it but I'm pretty sure it works.
https://docs.google.com/spreadsheets...Hn6h4_9ousUFjI