603,844 active members*
3,606 visitors online*
Register for free
Login
Results 1 to 15 of 15
  1. #1
    Join Date
    Feb 2009
    Posts
    6

    macro B PROGRAMMING

    I need help to make a macro program for machining slots,bores,squares etc with tapered sides. is this possible

  2. #2
    Join Date
    Jun 2008
    Posts
    1511
    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. #3
    Join Date
    Feb 2009
    Posts
    6
    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. #4
    Join Date
    Feb 2006
    Posts
    1792
    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.

  5. #5
    Join Date
    Feb 2009
    Posts
    6
    any chance of giving me an example of the macro program you suggest as i'm out of my depth here

  6. #6
    Join Date
    Feb 2006
    Posts
    1792
    Quote Originally Posted by KNEELY View Post
    any chance of giving me an example of the macro program you suggest as i'm out of my depth here
    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. #7
    Join Date
    Jun 2008
    Posts
    1511
    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.7E25F50H100Q4R1S250T2X0Y0 Z-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

  8. #8
    Join Date
    Feb 2009
    Posts
    6

    program

    cheers stevo1 i'll give it a go and see how it goes

  9. #9
    Join Date
    Jan 2009
    Posts
    21
    %
    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. #10
    Join Date
    Jan 2009
    Posts
    21
    %
    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
    %

  11. #11
    Join Date
    Jan 2009
    Posts
    21
    %
    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. #12
    Join Date
    Jan 2009
    Posts
    21
    %
    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
    %

  13. #13
    Join Date
    Feb 2009
    Posts
    6
    sorry about the delay program works fantastic can this be changed to mill a tapered square of 100mm by 100mm at the the top to 40mm by 40mm at the bottom 30mm deep

  14. #14
    Join Date
    Jan 2013
    Posts
    4

    Re: macro B PROGRAMMING

    Quote Originally Posted by KNEELY View Post
    sorry about the delay program works fantastic can this be changed to mill a tapered square of 100mm by 100mm at the the top to 40mm by 40mm at the bottom 30mm deep
    I do not have a macro for an inside square, but have a pyramid macro for an outside square:

    O4444(CAP 0-180 DEG SQUARE PYRAMID)
    (ABSOLUTE SURFACING MACRO)
    (PROVEN)

    (FORMAT G65/G66 AQDTMSRZEF)
    (A = #1 - INCLUDED ANGLE OF PART FROM TOP)
    (Q = #17 - STEPOVER IN Z/ CUSP HEIGHT)
    (D = #7 - TOOL DIAMETER)
    (T = #20 - TOOL RADIUS/ BALL OR BULL)
    (M = #13 - MATERIAL SIZE/ SQUARE OR ROUND)
    (S = #19 - INSCRIBED CIRCLE/ SQUARE TOP)
    (R = #18 - R PLANE)
    (Z = #26 - Z START ZERO)
    (E = #8 - END OF TAPER IN Z)
    (F = #9 - FEEDRATE)
    (***********************************)

    #100=ABS[#26]-ABS[#8]
    #100=ABS[#100]
    IF[[#26*#8]GE0]GOTO1
    #100=ABS[#26]+ABS[#8]
    N1#101=ROUND[#100/#17]
    #102=#100/#101
    IF[#102GT[#100/2]]GOTO1000
    #103=#5001
    #104=[#103-.1]-[[#7/2]+[#13/2]]
    #105=#5002
    #115=[#105+.1]+[[#7/2]+[#13/2]]
    #145=0
    IF[#7EQ[#20*2]]GOTO10
    #145=#145+[[#7/2]-#20]
    N10#145=#145+[#19/2]
    #125=90.+[#1/2]
    #145=#145+[#20/TAN[#125/2]]
    G0G90X#104Y#115
    Z[#26+.1]
    G1Z#26F#9
    #106=#5003
    #109=#9
    #135=[#145*2]*3.14
    WHILE[#101GE0]DO1
    IF[#101LT0]GOTO100
    #101=#101-1.
    G1Z#106F#109
    G41Y[#105+#145]
    X[#103+#145]
    Y[#105-#145]
    X[#103-#145]
    Y[#105+[#145+.1]]
    G0Z[#106+.1]
    G40X#104
    #145=#145+[TAN[#1/2]*#102]
    #147=[#145*2]*3.14
    #109=#9*[#147/#135]
    #106=#106-#102
    END1
    N100G0G90Z#18
    X#103Y#105
    M99
    N1000#3000= 1( Q VALUE TOO BIG )

  15. #15
    Join Date
    Mar 2016
    Posts
    3

    Re: macro B PROGRAMMING

    Quote Originally Posted by stevo1 View Post
    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.7E25F50H100Q4R1S250T2X0Y0 Z-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
    Hello, just curious if you made an ramp down version of this one?

Similar Threads

  1. Macro programming using I/O
    By Drache in forum Fanuc
    Replies: 5
    Last Post: 06-06-2014, 03:25 AM
  2. MACRO PROGRAMMING
    By Stebedeff in forum G-Code Programing
    Replies: 14
    Last Post: 07-11-2010, 05:49 AM
  3. Macro Programming
    By john terrell in forum Daewoo/Doosan
    Replies: 3
    Last Post: 08-19-2008, 02:16 AM
  4. Macro Programming
    By danhaskell in forum Fanuc
    Replies: 1
    Last Post: 05-07-2008, 08:04 PM
  5. Macro Programming
    By dapoling in forum G-Code Programing
    Replies: 4
    Last Post: 01-18-2008, 06:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •