![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#2
| |||
| |||
| Anything is possible with macro's. We are going to need a lot more information. What make and model machine and control are you using? We also need more descriptions on the type of parts you are making...dimensions, multiple parts, tooling, fixturing, how many operations/tools ect. Stevo |
|
#3
| |||
| |||
| Hi stevo1, sorry about the wait working shifts. the machine is a european axe & status vertical milling m/c with fanuc oi-mc control. i have already put macros for milling bores,slots ,pcd holes etc using old programs from fanuc 6 and 10m systems and work ok but i need to know how to mill say a slot or a bore with any taper using macros as i do not have acess to cad cam. the work i do are one offs so i need to be able to change the values in the programme for every piece. say i want to machine a bore of 100mm diameter at the top decreasing to 30mm dia 50mm deep using a ballnose cutter how can i program this. if you do not hear from me in a couple of days it is because of my shift work, not that iam rude |
|
#4
| |||
| |||
| First prepare a macro for a circular pocket, with variable radius . Start circular interpolation from the centre, and spiral out to the final radius. Then call it in a loop, with the radius defined in terms of depth, till you reach the final depth. The depth of the pocket should be very small for obtaining smooth side-wall. You will also need to use radius compensation; alternatively, define the centre of the ballnose cutter as the tool reference point, and reduce the radius of the pocket by the radius of the tool. First make a block diagram of the algorithm, and then start writing the code. |
|
#6
| |||
| |||
|
I do have a ready-made program for circular pocket. But, it is an standard application and many people have such a macro with them. Somebody should post it here. |
|
#7
| |||
| |||
| I know this is not exactly what you are looking for and it’s not the prettiest, but I don’t have a macro designed to spin the hole ramping down and in a cone at the same time. Only straight wall ramping C-bore. This program is the only one that I have right now that will do conical milling. However it steps down instead of ramping. Now I have not used this program in awhile and I had to change a few things because this was originally designed to step mill down a part that was already precast with some extra stock on it. You however want to achieve this with no center hole or maybe a small drilled hole first. I also have it designed to use an indexable mill not a ball nose tool. I never ran the calculations with a ball nose but it might work. If you use a mill you must not set your pick(Q) larger than the tool tip radius or you will step the part. We would rough using larger picks which would create steps but then finish with smaller picks at a much faster feedrate. If I get some time I will start working on a ramping conical macro. I never had a use for it but I think it might come in handy someday. A=cone side angle(#1) C=tool corner radius(#3) I=ramp radius(#4) K=feature position(#6) D=tool radius(#7) E=exit plane(#8) F=feed rate(#9) H=feature diameter at “K”(#11) Q=pick size in Z(#17) R=reference plane(#18) S=spindle speed(#19) T=tool number used(#20) X=center position of hole(#24) Y=center position of hole(#25) Z=final cutting depth(#26) O0001(MAIN PROGRAM) G65P8013A35C6.35I10K0D12.7E25F50H100Q4R1S250T2X0Y0Z-50 M30 O8013(G17 M3 CCW ID CONICAL STEP MILLING) #30=#17*TAN[#1] IF[#18EQ#6]THEN#18=#3-#3*TAN[#1/2] IF[#6EQ#0]THEN#6=#18 #32=#11/2+[#18-#6]*TAN[#1]+#3-#3*TAN[45-#1/2]-#7 IF[#4EQ#0]THEN#4=#32/2 G90G17G0X#24Y#25Z#8M3S#19 Z[#18+#17]F#9 N1 G1X#24Y#25M8 IF[#18LT#26]THEN#18=#26 Z#18 G1X[#24+#32-#4]Y[#25-#4]M8 #33=#32/[#7+#32] G03X[#32+#24]Y#25R#4F[#9*#33] X[#24-#32]Y#25R#32 X[#32+#24]Y#25R#32 X[#32-#4+#24]Y[#25+#4]Z[#18+#23]R#4F[#9*#33*3] #32=#32-#30 #18=#18-#17 IF[[#18+#17]GT#26]GOTO1 G1X0Y0M9 G0Z#8M5 M99 Stevo |
|
#9
| |||
| |||
| % O9013(RADIAL ARC) IF[#7EQ#0]GOTO2001 IF[#1EQ#0]GOTO2002 IF[#11EQ#0]GOTO2003 IF[#3EQ#0]GOTO2004 IF[#9EQ#0]GOTO2005 IF[#1EQ#0]GOTO2006 #140=#5003 #27=#7/2 #100=0 #101=360/#11 #102=#11 G0X[#27*COS[#19-#1]]Y[#27*SIN[#19-#1]] WHILE[#100LT#102]DO1 N1G0Z#18 G1Z#26F#3 G3X[#27*COS[[#100*#101]+[#19+#1]]]Y[#27*SIN[[#100*#101]+[#19+#1]]]R#27Z #2F#9 G0Z#140 #100=#100+1 G0X[#27*COS[[#100*#101]+[#19-#1]]]Y[#27*SIN[[#100*#101]+[#19-#1]]] END1 G0Z#5003 M99 N2001#3000=1(NO DIAMETER GIVEN) N2002#3000=9(NO START ANGLE "S" GIVEN) N2003#3000=2(NO HOLE VALUE "H" GIVEN) N2004#3000=8(NO PLUNGE FEED "C" GIVEN) N2005#3000=3(NO CUTTING FEED "F" GIVEN) N2006#3000=18(NO HALF ANGLE "A" WAS GIVEN) (Z=depth to start slots) (D=diameter of slots) (B=depth to end slot if a ramped slot is to be cut) (C=plunge feed) (F=feed to cut with) (A=angle of slot from centreline) (S=angle of centerline of first slot) (H=number of slots to cut) M30 % |
|
#10
| |||
| |||
| % O9010(BOLT HOLE MACRO) IF[#7EQ#0]GOTO2001 IF[#11EQ#0]GOTO2002 IF[#9LT#0]GOTO2003 IF[#3EQ#0]GOTO2004 IF[#18EQ#0]GOTO2005 #100=1 27=#7/2.0 G0X[[COS[#1]*#27]+#24]Y[[SIN[#1]*#27]+#25] G[#3*10000]Z#26R#18F#9Q#17P#20 #101=360/#11 N1WHILE[#100LTABS[#11]]DO1 X[[[COS[[#101*#100]+#1]*#27]+#24]]Y[[[SIN[[#101*#100]+#1]*#27]+#25]] #100=#100+1 END1 M99 N2001#3000=1(NO DIAMETER GIVEN) N2002#3000=2(NO HOLES GIVEN) N2003#3000=3(NO FEEDRATE "F" GIVEN) N2004#3000=4(NO DRILL CYCLE GIVEN) N2005#3000=20(NO REFERENCE POINT GIVEN) (X=X AXIS CENTER) (Y=Y AXIS CENTER) (Z=Z AXIS DEPTH) (R=REFERENCE POINT ABOVE PART) (T=DWELL VALUE FOR G82) (Q=PECK INTERVAL FOR G73,G83) (H=NUMBER OF HOLES TO DRILL) (A=START ANGLE OF FIRST HOLE) (D=DIAMETER OF BOLT CIRCLE) (C=DRILL CYCLE TO USE) M30 % |
| Sponsored Links |
|
#11
| |||
| |||
| % O9016(COUNTERBORING CYCLE) N1IF[#7EQ#0]GOTO2001 N2IF[#9EQ#0]GOTO2002 N3IF[#18EQ#0]GOTO2003 IF[#26EQ#0]GOTO2004 N4#140=#5003(STORE INITIAL Z PT.) N7#143=#4107+2000(H + 2000) N8#144=#[#143](RADIUS OF END MILL) N9#27=#7/2 N10#100=#27-#144(RAD OF CTRBR - RAD OF EM) #101=#100*2 G0Z#18(RAPID TO REF PT.) G1Z#26F#9(FEED TO DEPTH) G1Y-#100 G3G91X0.0 Y#101R#100 G3G91X0.0Y-#101R#100 G1Y#100F20. G0Z#140 M99 N2001#3000=1(NO DIAMETER GIVEN) N2002#3000=3(NO FEEDRATE GIVEN) N2003#3000=20(NO REFERENCE POINT) N2004#3000=7(NO "Z" DEPTH GIVEN) (Z=DEPTH OF COUNTERBORE) (D=DIAMETER OF COUNTERBORE) (R=REFERENCE POINT ABOVE PART) (F=FEEDRATE) M30 % |
|
#12
| |||
| |||
| % O9017(LINE-ANGLE) IF[#11EQ#0]GOTO2001 IF[#9EQ#0]GOTO2002 IF[#3EQ30]GOTO2003 IF[#26EQ#0]GOTO2004 IF[#24EQ#0]GOTO2005 IF[#25EQ#0]GOTO2006 IF[#1EQ#0]GOTO2007 IF[#4EQ#0]GOTO2008 #100=1 G0X#24Y#25 G98G[#3*10000]Z#26R#18F#9Q#17P#20 WHILE[#100LT#11]DO1 N1G91X[COS[#1]*#4]Y[SIN[#1]*#4] #100=#100+1 END1 M99 N2001#3000=2(NO H VALUE GIVEN) N2002#3000=3(NO FEEDRATE GIVEN) N2003#3000=4(NO DRILL CYCLE "C" GIVEN) N2004#3000=7(NO Z DEPTH GIVEN) N2005#3000=15(NO "X" START PT. GIVEN) N2006#3000=16(NO "Y" START PT. GIVEN) N2007#3000=10(NO ANGLE GIVEN) N2008#3000=17(NO I VALUE GIVEN) (I DISTANCE BETWEEN HOLES) (A ANGLE FROM X AXIS CCW) M30 % |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I learn about Macro programming? | ChsBrown | Haas Lathes | 5 | 01-06-2011 10:32 PM |
| MACRO PROGRAMMING | Stebedeff | G-Code Programing | 14 | 07-10-2010 11:49 PM |
| Need Help!- Macro Programming | john terrell | Daewoo/Doosan | 3 | 08-18-2008 08:16 PM |
| Macro Programming | danhaskell | Fanuc | 1 | 05-07-2008 02:04 PM |
| Macro Programming | dapoling | G-Code Programing | 4 | 01-18-2008 11:33 AM |