Need Help! Fanuc g54-g59 help please


Results 1 to 9 of 9

Thread: Fanuc g54-g59 help please

  1. #1

    Default Fanuc g54-g59 help please

    Dear Friends,

    I need to run program with 2 different parts on 1 fixture . The program have 6 tools and is to long to fit in my machine . I know that i can program only one part and use g55 to make the other part, but that means all 6 tools need to be finished and that go in the program and replace g54 with g55. Is there any way to make the program after tool no.1 is finished on g54 position to continue to g55 ? But not to double the size of the program ?

    Thanks Alex

    Similar Threads:


  2. #2
    Member
    Join Date
    Jun 2005
    Location
    us
    Posts
    232
    Downloads
    0
    Uploads
    0

    Default Re: Fanuc g54-g59 help please

    use a sub pogram maybe

    Tim


  3. #3
    Member
    Join Date
    May 2016
    Location
    United States
    Posts
    471
    Downloads
    0
    Uploads
    0

    Default Re: Fanuc g54-g59 help please

    Yes put each tool move into a subroutine. This will only add approximately 12 lines of code to the main program and a couple lines of code to your tool movements in each subroutine. Mainly the program number on one line and M99 at the end of each.

    Start each tool in the main program, bring it to first position and clearance height, then switch to your subroutine with M98. Be sure to include the clearance height as your last line in the sub and your initial position as the first. If you like you can also bring your tool to the first cutting depth while still in the main program, (as in tool 2 example) just be sure to have it included in what would be the 2nd line of your sub after initial position. You'll want all that info there after jumping over to G55.

    If you have a bunch of holes to spot, drill and tap just put all your positions in the sub and start all the drill cycles in the main program. See below.Add K0 at the end of each cycle call so it doesn't double drill the first hole each time.

    T1M6 (1/2 END MILL)
    G17G20G40G49G54G80G90G98

    G0X-0.35Y-3.
    G43Z0.1H1S4500M3T2
    M8
    M98P1001 (ALL YOUR MILL MOVES/FEEDS IN HERE)
    G55
    M98P1001
    M9

    T2M6 (CHAMFER)
    G17G20G40G49G54G80G90G98

    G0X-0.09.Y-3.
    G43Z0.1H2S6500M3T3
    M8
    G1Z-0.1F65.
    M98P1002 (ALL YOUR CHAMFER MOVES/FEEDS IN HERE)
    G55
    M98P1002
    M9

    T3M6 (SPOT DRILL)
    G17G20G40G49G54G80G90G98

    G0X3.5Y-4.5
    G43Z0.1H3S3500M3T4
    M8
    G99G81Z-0.075R0.1P75F21.K0
    M98P1003 (ALL YOUR HOLE POSITIONS IN HERE)
    G55
    M98P1003
    G80
    M9

    T4M6 (13/64 DRILL)
    G17G20G40G49G54G80G90G98

    G0X3.5Y-4.5
    G43Z0.1H4S3500M3T5
    M8
    G98G81Z-0.625R0.F21.K0
    M98P1003 (SAME SUB AS PREVIOUS)
    G55
    M98P1003
    G80
    M9

    T5M6 (1/4-20 TAPPER)
    G17G20G40G49G54G80G90G98

    G0X3.5Y-4.5
    G43Z0.15H5T1
    M8
    M29S1000
    G99G84Z-0.7R0.15F50.K0
    M98P1003 (SAME SUB AS PREVIOUS)
    G55
    M98P1003
    G80
    M9
    G53Z0.Y0.M5
    M30

    01001 (END MILL SUB)

    G0X-0.35Y-3.
    G1Z-0.323F33.
    -
    -
    G0Z0.1
    M99

    01002 (CHAMFER SUB)

    G0X-0.09.Y-3.
    G1Z-0.1
    -
    -
    G0Z0.1
    M99

    O1003 (HOLE POSITION SUB)

    X3.5Y-4.5
    X4.5
    X6.
    Y-6.
    X4.5
    X3.5
    G80 (CANCEL DRILL EITHER HERE OR IN MAIN PROGRAM DEPENDING ON OTHER NEEDS OF THESE POSITIONS)
    M99

    Just an example. A few minutes of finger punching. Arbitrary F & S and locations.



  4. #4

    Default Re: Fanuc g54-g59 help please

    Dear friend,

    Im sure you are giving good explanation how to make the program, but because of my poor knowledge in programming is kinda hard to understand. Do you mind if i send you copy of the program to you, and you to make the changes on the program ? That way i will have the old and new version of the program and i will understand better about every detail, and know for future programs
    Thanks



  5. #5
    Member
    Join Date
    May 2016
    Location
    United States
    Posts
    471
    Downloads
    0
    Uploads
    0

    Default Re: Fanuc g54-g59 help please

    Sure. Just post it here. If it's very large, post a couple tools worth that I can edit to help you get an idea of what to do.

    BTW - please include the year and make of your machine and the control make and version. It might matter. Thanks.



  6. #6

    Default Re: Fanuc g54-g59 help please

    Dear Friend,

    The machine is Stama Fanuc MC010 (old vesrion of robodrill), year :1987, control : Fanuc OM Mate

    Check bellow sample of the program. I did cut bunch of lines to make it shorter.
    PLEASE Include g55 and g56 to see the exact changes in case i need to run more than one offset

    %
    O1000(TEST)
    (DATE=DD-MM-YY - 02-05-20 TIME=HH:MM - 20:28)
    (MCX FILE - C:\USERS\ALEX\DESKTOP\TEST.MCX-5)
    (NC FILE - C:\USERS\ALEX\DESKTOP\TEST.NC)
    (MATERIAL - ALUMINUM MM - 2024)
    ( T1 | 6MM | H1 )
    ( T2 | 6/8 | H2 )
    ( T3 | CENTER DRILL | H3 )
    ( T4 | 4MM DRILL | H4 )
    ( T5 | 4MM | H5 )
    ( T6 | 106 | H6 )
    N0 G21
    N1 G0 G17 G40 G49 G80 G90
    N2 T1 M6
    N3 G0 G90 G54 X-171.75 Y-4. S2000 M4
    N4 G43 H1 M8 Z10.
    N5 G1 Z-2. F1000.
    N6 X-156.75 F300.
    N7 X140.45
    N8 X146.45
    N9 G0 Z10.
    N10 X-171.75
    N11 G1 Z-4. F1000.
    N12 X-156.75 F300.
    N13 X140.45
    N14 X146.45
    N15 G0 Z10.
    N16 M5
    N17 G91 G28 G49 Z0.
    N18 M01
    N19 T2 M6
    N20 G0 G90 G54 X-171.75 Y-4. S2000 M4
    N21 G43 H2 M8 Z10.
    N22 G1 Z-3. F1000.
    N23 X-156.75 F300.
    N24 X140.45
    N25 X146.45
    N26 G0 Z10.
    N27 M5
    N28 G91 G28 G49 Z0.
    N29 M01
    N30 T3 M6
    N31 G0 G90 G54 X-158.75 Y-4. S1500 M4
    N32 G43 H3 M8 Z2.
    N33 G99 G81 Z-5. R2. F300.
    N34 X-154.3
    N35 X-150.
    N61 X124.7
    N62 X129.
    N63 G80
    N64 M5
    N65 G91 G28 G49 Z0.
    N66 M01
    N67 T4 M6
    N68 G0 G90 G54 X-158.75 Y-4. S1500 M4
    N69 G43 H4 M8 Z2.
    N70 G99 G81 Z-10. R2. F300.
    N71 X-154.3
    N72 X-150.
    N98 X124.7
    N99 X129.
    N100 G80
    N101 M5
    N102 G91 G28 G49 Z0.
    N103 M01
    N104 T5 M6
    N105 G0 G90 G54 X-158.75 Y-4.05 S2000 M4
    N106 G43 H5 M8 Z2.
    N107 G1 Z-8.5 F1000.
    N108 X-156.75 F200.
    N109 X-150.007
    N110 G3 X-149.993 Y-3.95 R.05
    N183 G1 X98.
    N184 X91.25
    N185 X89.25
    N186 G0 Z2.
    N187 X120.25 Y-4.05
    N188 G1 Z-8.5 F1000.
    N189 X122.25 F200.
    N190 X128.993
    N191 G3 X129.007 Y-3.95 R.05
    N192 G1 X129.
    N193 X122.25
    N194 X120.25
    N195 G0 Z2.
    N196 M5
    N197 G91 G28 G49 Z0.
    N198 M01
    N199 T1 M6
    N200 G0 G90 G54 X-119.071 Y-29.447 S2000 M4
    N201 G43 H1 M8 Z10.
    N202 G1 Z-2.1 F1000.
    N203 X-119.15 Y-20.447 F300.
    N204 Y-20.4
    N916 G3 X145.95 Y-26.1 R3.1
    N917 G1 X156.75
    N918 G3 X159.85 Y-23. R3.1
    N919 G1 Y-20.4
    N920 G0 Z10.
    N921 M5
    N922 G91 G28 G49 Z0.
    N923 M01
    N924 T6 M6
    N925 G0 G90 G54 X-121.003 Y-26.011 S2000 M4
    N926 G43 H6 M8 Z10.
    N927 G1 Z-6.2 F1000.
    N928 X-122.203 Y-26. F300.
    N929 X-122.25
    N1272 G1 X140.45
    N1273 G2 X143.45 Y1.6 R3.
    N1274 G1 Y-4.475
    N1275 G0 Z10.
    N1276 M5
    N1277 G91 G28 Z0.
    N1278 G28 X0. Y0.
    N1279 M30
    %

    Thank you



  7. #7
    Member
    Join Date
    Dec 2012
    Location
    The Netherlands
    Posts
    395
    Downloads
    0
    Uploads
    0

    Default Re: Fanuc g54-g59 help please

    Hi,

    This program is an example for 3 tools on 3 fixtures that should run on a FANUC 0M
    All Z-values are for a save distance, when your program runs OK you can always adjust them.
    Be careful with your line N32, a rapid to Z2. level can be a little tricky, spindles are very expensive .... LOL
    On our older controls I use for multiple parts a simple Macro with G52, not G55, G56 etc. but also sub-programs like this example.
    All your nc-data for each tool must be saved in the sub-programs.
    Maybe you can remove the lines G00 G90 X0. Y0. and G43 Z100. H01 above each G55 and G56 but it's only for safety.

    You can try this program first and look if it runs, good luck.

    %
    O3200( DRILL + TAP - M6 - METRIC - PROGRAM )
    N1 ( TOOL T01 = DRILL - 5.0MM )
    G54 G17 G21 G40 G80 G94
    G90 G49
    T01 M06
    S3500 M03
    G00 G90 X0. Y0.
    G43 Z100. H01
    /M08
    M98 P3201 ( CALL SUB-PROGRAM TOOL T01 )
    G00 G90 Z150.

    G55
    G00 G90 X0. Y0.
    G43 Z100. H01
    M98 P3201
    G00 G90 Z150.

    G56
    G00 G90 X0. Y0.
    G43 Z100. H01
    M98 P3201
    G00 Z150. M09
    G28 G80 G91 Z0. M05
    M01

    N2 ( TOOL T02 = COUNTERSINK - 10.0MM )
    G54 G17 G21 G40 G80 G94
    G90 G49
    T02 M06
    S750 M03
    G00 G90 X0. Y0.
    G43 Z100. H02
    /M08
    M98 P3202 ( CALL SUB-PROGRAM TOOL T02 )
    G00 G90 Z150.

    G55
    G00 G90 X0. Y0.
    G43 Z100. H02
    M98 P3202
    G00 G90 Z150.

    G56
    G00 G90 X0. Y0.
    G43 Z100. H02
    M98 P3202
    G00 Z150. M09
    G28 G80 G91 Z0. M05
    M01


    N3 ( TOOL T03 = TAP - M6 )
    G54 G17 G21 G40 G80 G94
    G90 G49
    T03 M06
    S800 M03
    G00 G90 X0. Y0.
    G43 Z100. H03
    /M08
    M98 P3203 ( CALL SUB-PROGRAM TOOL T03 )
    G00 G90 Z150.

    G55
    G00 G90 X0. Y0.
    G43 Z100. H03
    M98 P3203
    G00 G90 Z150.

    G56
    G00 G90 X0. Y0.
    G43 Z100. H03
    M98 P3203
    G00 Z150. M09

    G94 ( MM/MIN )
    G00 G28 G80 G91 Y0. Z0. M05
    G53 G90 X75.
    T01 M06
    M30

    O3201( DRILL-5.0 )
    G00 G90 X10. Y0. Z20.
    G73 Z-20. R2. Q6.5 F500
    X0. Y10.
    X-10. Y0.
    X0. Y-10.
    G00 G80 Z20.
    M99

    O3202( COUNTERSINK-10.0MM )
    G00 G90 X10. Y0. Z20.
    G81 Z-2. R0.5 F200
    X0. Y10.
    X-10. Y0.
    X0. Y-10.
    G00 G80 Z20.
    M99

    O3203( TAP-M6 )
    G00 G90 X10. Y0. Z20.
    G95 ( MM/REV )
    M29 S800
    G84 Z-15. R2. F1.
    X0. Y10.
    X-10. Y0.
    X0. Y-10.
    G00 G80 Z20.
    G94( MM/MIN )
    M99
    %

    Last edited by Heavy_Metal; 05-02-2020 at 05:01 PM.


  8. #8
    Member
    Join Date
    May 2016
    Location
    United States
    Posts
    471
    Downloads
    0
    Uploads
    0

    Default Re: Fanuc g54-g59 help please

    Like Heavy Metal, I find line numbers mostly useless. You're wanting to save memory space. Line numbers eat up tons of it.

    Below is your code cleaned up a little and built into a subroutine work regime. This will make 3 parts located in three different positions and controlled by the G54,G55 and G56 Work Offsets. If you want to make only one part, all you have to do is turn on block skip.

    You had your spindle turning backwards on all of them. You want M3 not M4. Unless there is something different about your machine.

    In 20 years I have never written a G28. It's not needed. Only if your M6 tool change macro is junk should it ever be needed. G53 is a safer and easier call to send things home. The one added at the end of your program will send the head home and table forward for reloading stock.

    Hope this helps and I hope you can follow it. Basically all you do is program for one part. Then create empty subroutine files. Then I copy and paste everything from the first line of each tool right up to the last move to clearance height. Once it's in the subroutine I delete the complete G43 line and the M8 following it. Everything else is there. Then convert your main program to a subroutine layout like shown.

    Depending on how your control acts, you may be able to copy all of this over as one file. The control will separate them into individual files.

    Good luck. Time to go home.

    %
    O1000(TEST)
    (DATE=DD-MM-YY - 02-05-20 TIME=HH:MM - 20:28)
    (MCX FILE - C:\USERS\ALEX\DESKTOP\TEST.MCX-5)
    (NC FILE - C:\USERS\ALEX\DESKTOP\TEST.NC)
    (MATERIAL - ALUMINUM MM - 2024)
    ( T1 | 6MM | H1 )
    ( T2 | 6/8 | H2 )
    ( T3 | CENTER DRILL | H3 )
    ( T4 | 4MM DRILL | H4 )
    ( T5 | 4MM | H5 )
    ( T6 | 106 | H6 )

    (BLOCK SKIP ON FOR ONE PART)

    T1 M6 (6MM END MILL)
    G17 G21 G40 G49 G54 G80 G90 G98

    G0X-171.75 Y-4.
    G43 H1 Z10.S2000 M3 T2
    M8
    M98P1001
    /G55
    /M98P1001
    /G56
    /M98P1001
    M9
    M01

    T2 M6 (6/8 WHATEVER THAT IS)
    G17 G21 G40 G49 G54 G80 G90 G98

    G0X-171.75 Y-4.
    G43 H2 M8 Z10.S2000 M3 T3
    M8
    M98P1002
    /G55
    /M98P1002
    /G56
    /M98P1002
    M9
    M01

    T3 M6 (CENTER DRILL)
    G17 G21 G40 G49 G54 G80 G90 G98

    G0X-158.75 Y-4.
    G43 H3 Z2. S1500 M3 T4
    M8
    G99 G81 Z-5. R2. F300.K0
    M98P1003
    /G55
    /M98P1003
    /G56
    /M98P1003
    G80
    M9
    M01

    T4 M6 (4MM DRILL)
    G17 G21 G40 G49 G54 G80 G90 G98

    G0X-158.75 Y-4.
    G43 H4 Z2. S1500 M3 T5
    M8
    G99 G81 Z-10. R2. F300.K0
    M98P1003
    /G55
    /M98P1003
    /G56
    /M98P1003
    G80
    M9
    M01

    T5 M6 (4MM END MILL)
    G17 G21 G40 G49 G54 G80 G90 G98

    G0X-158.75 Y-4.05
    G43 H5 Z2.S2000 M3 T1
    M8
    M98P1004
    /G55
    /M98P1004
    /G56
    /M98P1004
    M9
    M01

    T1 M6 (6MM END MILL)
    G17 G21 G40 G49 G54 G80 G90 G98

    G0X-119.071 Y-29.447
    G43 H1 Z10.S2000 M3 T6
    M8
    M98P1005
    /G55
    /M98P1005
    /G56
    /M98P1005
    M9
    M01

    T6 M6 (106 WHATEVER THAT IS)
    G17 G21 G40 G49 G54 G80 G90 G98

    G0X-121.003 Y-26.011
    G43 H6 Z10. S2000 M3 T1
    M8
    M98P1006
    /G55
    /M98P1006
    /G56
    /M98P1006
    M9
    G53Z0.Y0.M5
    M30
    %
    O1001 (6MM END MILL SUB)

    X-171.75 Y-4.
    G1 Z-2. F1000.
    X-156.75 F300.
    X140.45
    X146.45
    G0 Z10.
    X-171.75
    G1 Z-4. F1000.
    X-156.75 F300.
    X140.45
    X146.45
    G0 Z10.
    M99
    %
    O1002 (6/8 WHATEVER THAT IS SUB)

    X-171.75 Y-4.
    G1 Z-3. F1000.
    X-156.75 F300.
    X140.45
    X146.45
    G0 Z10.
    M99
    %
    O1003 (HOLE POSITION SUB)

    X-158.75 Y-4.
    X-150.
    X124.7
    X129.
    M99
    %
    O1004 (4MM END MILL SUB)

    X-158.75 Y-4.05
    G1 Z-8.5 F1000.
    X-156.75 F200.
    X-150.007
    G3 X-149.993 Y-3.95 R.05
    G1 X98.
    X91.25
    X89.25
    G0 Z2.
    X120.25 Y-4.05
    G1 Z-8.5 F1000.
    X122.25 F200.
    X128.993
    G3 X129.007 Y-3.95 R.05
    G1 X129.
    X122.25
    X120.25
    G0 Z2.
    M99
    %
    O1005 (2ND 6MM END MILL SUB)

    X-119.071 Y-29.447
    G1 Z-2.1 F1000.
    X-119.15 Y-20.447 F300.
    Y-20.4
    G3 X145.95 Y-26.1 R3.1
    G1 X156.75
    G3 X159.85 Y-23. R3.1
    G1 Y-20.4
    G0 Z10.
    M99
    %
    O1006(106 WHATEVER THAT IS SUB)

    X-121.003 Y-26.011
    G1 Z-6.2 F1000.
    X-122.203 Y-26. F300.
    X-122.25
    G1 X140.45
    G2 X143.45 Y1.6 R3.
    G1 Y-4.475
    G0 Z10.
    M99
    %

    PS. I haven't double checked this.

    Last edited by the_gentlegiant; 05-02-2020 at 09:01 PM.


  9. #9

    Default Re: Fanuc g54-g59 help please

    Dear Friends

    Thank you very much for your help and your time. I will try these days to make the program and run it.

    Heavy_Metal : the line that you mentioned N32 does not rapid in the material, its comes down next to it and starts roughing. Thank you anyway

    the_gentlegiant : i did use this program on my other machine and there i need to use M4 to run clockwice instead M3. The inverter was at service and now M3 and M4 are switched

    About the extra line in the program are generated from mastercam and im not very familiar with them, but now that you mention i will fix that also. Thank you very much

    Best Regards Alex



Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Fanuc g54-g59 help please

Fanuc g54-g59 help please