![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Haas Mills Discuss Haas machinery here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| A recent discussion here at the Haas factory has brought up the topic of program structure and efficiency. Most people write a program with the following structure: % O123456 G20 G0 G17 G40 G49 G80 G90 T1 M6 G0 G90 G54 X1.75 Y0. S10000 M3 G43 H1 Z2. T2 M8 < program> M5 M9 G91 G28 Z0. M01 T2 M6 G0 G90 G54 X1. Y0. S60000 M3 G43 H2 Z2. T1 M8 < program> M5 M9 G91 G28 Z0. G28 Y0. M30 % A faster approach would be as follows: % O123456 G20 G0 G17 G40 G49 G80 G90 T1 M6 S10000 M3 G43 H1 G0 G90 G54 X1.75 Y0. Z2. M8 < program> T2 M6 M01 S6000 M3 G43 H2 G0 G90 G54 X0. Y0. Z2. T1 M8 < program> M9 G91 G28 Z0. G28 Y0. M30 % Any thoughts? |
|
#2
| |||
| |||
| Only puzzled ones. ![]() Second one is faster in what way? Faster to write faster to run? Apart from the fact that your first one will not run unless you have come out with a 60,000rpm spindle.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#5
| |||
| |||
| Okay, their are a few reasons this will be faster to run. And no Geof we did not introduce a 60K spindle - just my fat fingers stumbling across the keyboard. Okay now for the explianation. On the Haas control all M codes are executed last. So if I command any motion and the spindle to turn on the same line, the spindle will turn on at the end of the motion. Also, like Geof said, Spindle No Wait, will allow rapid motion while the spinlde is accelerating to commanded speed. If it is not at speed when it encounters a feed motion the machine will wait until the commanded speed is achieved. Commandin all three axis to rapid to your starting point is obviously faster then doing XY motion then Z motion. By not commanding any motion prior to a tool change the machine will turn the spindle off and move to the tool change position all at the same time. In the first example the spindle is commanded off and the machine will wait and then go to the home postion. Mactec54 please feel free to send me your examples at wreilly@HaasCNC.com. I am sure that I can make the code much shorter, but my intention was to reduce cycle time. |
| Sponsored Links |
|
#6
| |||
| |||
| Hi Haas Apps After reading your post it does make it a little better cycle time you may save a half a second on what you have done above but having less Gcode is better than having a shorter cycle time If you have like a M9 that turns off the juice & the spindle that would save having to have a M5 at the end of a single tool program Even if you saved one second per part because how you start the cycle & end the cycle that is not enough to make a difference over a day or even a week But if you have to write less Gcode (if you do it by hand ) this could save more time than you would save at the machine My 8 year old son & I have been working on optimizing programs for some time I have done some of these programs on the Zone before & for the start & end of the program I already have our programs with less G code than what you have done above Geof writes most of his G code by hand so in many cases is already making his programs with minimal Gcode
__________________ Mactec54 |
|
#8
| ||||
| ||||
![]() I agree that this is faster but the only danger is that a 3 axis move for new programmers is not a good idea. Just a little food for thought.
__________________ Toby D. "Imagination and Memory are but one thing, but for divers considerations have divers names" Schwarzwald (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) www.refractotech.com |
|
#9
| |||
| |||
| Aw Heck; you mean I can't have a 60,000rpm SuperUperDuperMiniMill. ![]() Short cycle time and machine safety are my overriding concerns. My typical program would be this: G10 G17 G20 G40 G49 G80 G90 T1 M06 G43 H01 M03 S10,000 {G54} G00 X0. Y0. {Z1.} For a program working with a limited clearance {Z1.} fixture the Z move is put on this next line. Z0.1 M08 etc etc G00 Z1. M09 T2 M06 etc etc G53 G49 G00 Z0. {T1 M06} M30 Spindle No Wait is turned on. When you have the safety line, which is largely redundant but nothings beats belts and braces, you don't need to repeat G20 or G90 eleswhere; you don't really need to repeat G00 for the first move but I do it just as a reminder that it is a rapid. Following the M03 command with a Rapid moves means the machine moves into position as the spindle accelerates to speed. It also means if you have pulled a boner and crash the machine the spindle hits spinning; the spindle bearings can absorb far more impact when they are spinning than when they are stationary, also when the spindle hits spinning things do not stop as fast because melting takes place at the point of contact I avoid using G28 with or without G91. If you forget the G91 before the G28 you might bury the tool in a fixture, if you forget G90 after the G91 things can also get interesting. I rarely use M05 because when a tool change is called the machine does the whole sequence for me. I turn M08 on just before cutting and M09 of so I can see things and the flow is less during the tool change; also with it off if I happen to open the door just after the tool change I don't get a bath. Spindle No Wait can make quite a difference in the cycle time when a lot of tools are involved; I timed it at about 1 to 1-1/2 seconds per tool change. However, the best way to reduce cycle time per part is stick more parts in the machine; this divides tool change times by the number of parts and can make a big difference. The next step up is to use indexing fixtures so a single loading operation finishes parts on three or four sides; this can make a huge difference.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#10
| |||
| |||
| Many good points. But lets just say that you have a program that has 4 tools and depending on the machine you save about 1 second per tool. If you have a production run of 1000 parts.You would save about one hour. |
| Sponsored Links |
|
#11
| ||||
| ||||
| Can you share your better/shorter way with all of us? I'm always on the lookout for improvements. I'm sure most of us are here or we wouldn't be here. |
![]() |
| 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 |
| Newbie- Takeout Unused G Code commands in Mastercams Generated G Code | shneek | Mastercam | 8 | 12-15-2010 02:32 PM |
| learning g code or cad-cam code output? | slow_rider | G-Code Programing | 3 | 02-27-2010 08:48 PM |
| Need Help!- G-Code viewing source code | Hussam | Visual Basic | 3 | 03-15-2009 12:15 PM |
| G-code for beginners - want to learn G-code | FPV_GTp | G-Code Programing | 7 | 11-17-2008 11:25 PM |
| looking for g code 3d from bobcadcam or simmilar for indexer lpt v5 with g code soft | troyswood | Ability Systems - LPT Indexer and G-Code | 2 | 12-24-2006 09:21 PM |