Need Help! Drilling problem - machine crash - Page 2


Page 2 of 4 FirstFirst 1234 LastLast
Results 21 to 40 of 61

Thread: Drilling problem - machine crash

  1. #21
    Member kstrauss's Avatar
    Join Date
    Apr 2013
    Location
    Canada
    Posts
    1788
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Unneeded "safety" code is certainly not a problem but does make the program harder to follow. Coming from a software development background I try to avoid unnecessary commands.
    Not wanting to pick an argument but in a normal job why would one ever want to specify a tool offset for a tool that isn't the current tool? That is, in the suggested code of:
    T4M6
    G0G90G54X8.5Y0S6000M3
    G43H4Z1.M8
    Z.1

    why do you explicitly specify "H4" with the G43? It seems redundant plus that sequence leads to disaster if one edits the tool number without remembering to also change the offset to be applied. Also, you move in both X and Y while using the previous tool's offsets. Since tool offsets can specify offsets for all coordinates this sequence could easily fail (I have an auxiliary, high speed, spindle that uses X/Y/Z offsets relative to the primary spindle). Why specify G54 at tool change rather than in the preamble? That makes it impossible to call the code fragment as part of a larger job that uses various G5x to machine a multi-component fixture.



  2. #22
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by machinehop5 View Post
    ...is it just me or is this normal format of a program that F360 produces? Why would they put the G43 H26 on the same Line as the TC and before calling the Workoffsets? Also, should have G49 H0D0 at the end of each Tool. Very sloppy programming looks like to me.

    %
    (1005)
    (Machine)
    ( vendor Autodesk)
    ( description Generic 3-axis)
    (T26 D=5. CR=0. TAPER=118deg - ZMIN=-15.5 - drill)
    G90 G54 G64 G50 G17 G40 G80 G94 G91.1 G49
    G21 (Metric)
    G30

    N10(Drill5 3)
    T26 G43 H26 M6
    S5000 M3 M8
    G54
    G0 X17.214 Y27.
    G0 Z15.
    G0 Z5.
    G98 G81 X17.214 Y27. Z-15.5 R2.5 F1000.
    X-17.1
    G80
    G0 Z15.
    M5 M9

    G30
    M30
    %
    Because these guys that wrote this post processors are programmer's and have no machine experience or what is a correct G-Code format should look like

    Mactec54


  3. #23
    Member kstrauss's Avatar
    Join Date
    Apr 2013
    Location
    Canada
    Posts
    1788
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    I hesitate to mention that this message board is solely devoted to Tormach controllers so whether a another controller works differently (or fails to handle a particular command) is irrelevant. In that vein, the operator cannot issue MDI commands "between tool changes".

    In my opinion values should not be given in two places for the same thing -- that only results in errors. Hence, NEVER use H? to specify the default tool used by G43.



  4. #24
    Member kstrauss's Avatar
    Join Date
    Apr 2013
    Location
    Canada
    Posts
    1788
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by mactec54 View Post
    Because these guys that wrote this post processors are programmer's and have no machine experience or what is a correct G-Code format should look like
    Is there a style guide for gcode? Where do I find it?



  5. #25
    Member mountaindew's Avatar
    Join Date
    Nov 2007
    Location
    earth
    Posts
    2151
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by mactec54 View Post
    Because these guys that wrote this post processors are programmer's and have no machine experience or what is a correct G-Code format should look like


    Question for all readers. What would be a good standard reference or guide to follow for g code generated by cam posts?

    I have used cnc programing hand book by P. Smid for years as a reference to evaluate the code Spit out by my cam software.
    Only recently I decided to start modifying the posts for the machines to get more consistent cleaner code for personal use.
    And would like to know what reference others use or best practices to follow



  6. #26
    Member
    Join Date
    Jun 2018
    Location
    on my feet
    Posts
    962
    Downloads
    1
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by kstrauss View Post
    Is there a style guide for gcode? Where do I find it?
    haas manual is probably the best for explaining and showing solid examples of g code , otherwise experience of working in the industry is the best way to learn the trade . I've worked in many shops and worked on most controls and the one thing that is very constant is the formatting . Obviously some have their own g codes but the format is consistent . While there are many ways to skin a cat there is only one way to go about it professionally

    T4M6 tool change call
    G0G90G54X8.5Y0S6000M3 move to first postion spindle start up
    G43H4Z1.M8 first z move with tool height call , coolant
    Z.1

    there is no recipe for disaster here for the trained eye . The same concept of "what if" can go for any portion of the program if a guy isn't paying attention while editing


    Quote Originally Posted by kstrauss View Post
    I hesitate to mention that this message board is solely devoted to Tormach controllers so whether a another controller works differently (or fails to handle a particular command) is irrelevant. In that vein, the operator cannot issue MDI commands "between tool changes".

    In my opinion values should not be given in two places for the same thing -- that only results in errors. Hence, NEVER use H? to specify the default tool used by G43.

    following different rules for different machines may work but what if you decide to work in the industry or lets say buy a haas . The bad habits will carry from one machine to the next , and not applying an h value to a mill will not work out well



  7. #27

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by kstrauss View Post
    why do you explicitly specify "H4" with the G43? It seems redundant plus that sequence leads to disaster if one edits the tool number without remembering to also change the offset to be applied. Also, you move in both X and Y while using the previous tool's offsets. Since tool offsets can specify offsets for all coordinates this sequence could easily fail (I have an auxiliary, high speed, spindle that uses X/Y/Z offsets relative to the primary spindle). Why specify G54 at tool change rather than in the preamble? That makes it impossible to call the code fragment as part of a larger job that uses various G5x to machine a multi-component fixture.
    I have a good friend that has been in CNC programming, machining, and post processor development for about 20-25 years. He created a program for me recently that had that same format of placing the tool length command with the first Z move. I asked him that very same question since my only experience is with Tormach's and the fusion 360 post that we all started with.

    Quote Originally Posted by metalmayhem View Post
    haas manual is probably the best for explaining and showing solid examples of g code , otherwise experience of working in the industry is the best way to learn the trade . I've worked in many shops and worked on most controls and the one thing that is very constant is the formatting . Obviously some have their own g codes but the format is consistent . While there are many ways to skin a cat there is only one way to go about it professionally

    T4M6 tool change call
    G0G90G54X8.5Y0S6000M3 move to first postion spindle start up
    G43H4Z1.M8 first z move with tool height call , coolant
    Z.1

    there is no recipe for disaster here for the trained eye . The same concept of "what if" can go for any portion of the program if a guy isn't paying attention while editing
    And that was almost word for word his answer. Personally, I prefer to have the length called out at the same time as the tool change for the reason Kstrauss mentions. The first time I ran my friend's code it scared the piss out of me when I saw the tool moving around with the wrong offset applied. Even knowing that it's going to work fine, it makes me nervous to run his program because of that. But, that is apparently a standard approach and the way he and others have been doing it for a long long time. I don't like it, and I choose to generate my code the way I'm used to but that's how it's done other places and it's not technically "wrong"



  8. #28
    Member
    Join Date
    Nov 2012
    Location
    United States
    Posts
    591
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Because these guys that wrote this post processors are programmer's and have no machine experience or what is a correct G-Code format should look like
    That feels a bit like a particular preference. Kind of like how some people are so used to inches, they feel uncomfortable working in millimeters.

    The behavior of a machine tool based on all the standard G codes is fairly well specified. The specification is a bit weird in places to a modern eye, because they're based on how the original microcontroller interpreted the original code in the original FANUC controllers, and those microcontrollers only had a precious small amount of program storage, so the code had to be designed to be convenient for the controller, not for the operator.

    The behavior of the "H" word is well specified, and can be provided anywhere in the program. To make a tool change do the right thing, you need to do it and the G43 before/at the first Z move, but you can do it at whatever point you want after the previous Z move.

    Yes, people have preferences, and it's often wise to change as little as possible compared to what people's current preferences are, but saying that there is "only one right way" isn't particularly useful IMO. It of course depends on your environment -- in production with very long series and high quantities, you need a different kind of personality than in a R&D / prototype / short-run job shop environment. Flexibility is much more important in the latter, consistency is more important in the former, but that doesn't make one approach more "right." Just "right for certain applications."



  9. #29
    Member mactec54's Avatar
    Join Date
    Jan 2005
    Location
    USA
    Posts
    15362
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by kstrauss View Post
    Is there a style guide for gcode? Where do I find it?
    The best Style Format is standard Fanuc there are variations of this format for slight changes, that different manufactures use in there controls But the basic's are the same, this is very much industry standard that all controls use

    For hobby guys anything that works for them is what they use, then when a crash happens they don't know what to do be cause it looks right to them, keep it simple Here is a simple format that will work on most machines, you just add or change this format which is simple and easy to see where you can make a change to how ever you want it to work for you

    Keep it simple is best as it is easy to see if you have a problem some where

    %
    ( O1503 Drill Mag Block )
    G17G40G80
    ( could put your G30 Here if you needed it Tormach only or anyone using PP Can use a G0Z---- also )
    T4M6
    M8
    G54
    S2250M3
    G90G0X1.75Y-.384
    G43Z.1H4
    G83G98X1.75Y-.384Z-.4276R.1Q.03F8.
    X1.375Y-.216
    X1.Y-.384
    X.625Y-.216
    X.25Y-.384
    G80G0Z3. ( Canned cycle Canceled Z moves up 3 inches )
    M9
    M5
    G53Y0. ( This can be used with X as well and any number where you want your table to move too when your job is complete )
    M30
    %

    Mactec54


  10. #30
    Member kstrauss's Avatar
    Join Date
    Apr 2013
    Location
    Canada
    Posts
    1788
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by mountaindew View Post
    Question for all readers. What would be a good standard reference or guide to follow for g code generated by cam posts?

    I have used cnc programing hand book by P. Smid for years as a reference to evaluate the code Spit out by my cam software.
    Only recently I decided to start modifying the posts for the machines to get more consistent cleaner code for personal use.
    And would like to know what reference others use or best practices to follow
    How about G Codes plus the Tormach manual since PP is LinuxCNC with a few additions. Would you use a French grammar book to learn German?



  11. #31
    Member kstrauss's Avatar
    Join Date
    Apr 2013
    Location
    Canada
    Posts
    1788
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by metalmayhem View Post
    ...following different rules for different machines may work but what if you decide to work in the industry or lets say buy a haas . The bad habits will carry from one machine to the next , and not applying an h value to a mill will not work out well
    The consequence of not following different rules for different machines is that only the lowest common denominator capabilities can be used -- no conditional constructs, no named variables, no canned cycles, no polar coordinates, no setup photos, etc, etc. From my perspective that is far too much to lose. YMMV



  12. #32
    Member mountaindew's Avatar
    Join Date
    Nov 2007
    Location
    earth
    Posts
    2151
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by kstrauss View Post
    How about G Codes plus the Tormach manual since PP is LinuxCNC with a few additions. Would you use a French grammar book to learn German?
    Good point.!
    Linuxcnc would be best reference for any changes or mods to a post for a linuxcnc driven machine.



  13. #33
    Member
    Join Date
    Jun 2018
    Location
    on my feet
    Posts
    962
    Downloads
    1
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Had anyone under my supervision coded as poorly as the original code then that would have been the last time , at least until they learned to do things properly . I have yet to walk into a shop and not be able to have a machine running in no time . The biggest difference on controls is the way they are setup , once that is figured out then the rest falls into place . With the exception of figuring out some of the optional g codes which will vary
    That little clip of code I posted is snipped from code I run on pathpilot on a daily basis .

    Mactecs code is a bit different but similar to mine , both are common format . They are examples of what is expected in the industry and there is more to lose than there is to gain from not learning them . I see guys in the forums who have had machines for numerous yrs , done everything to trick them out with all the bells and whistles , yet they are still terrified to step into the unknown and learn the code they are running . Without softwares like fusion they are lost , and with it they are still lost because they cannot follow or edit the code . Thats blind !

    I posted what I did because I thought it would be of help to someone . Whether it does or not , no skin off my ass



  14. #34
    Member machinehop5's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    1567
    Downloads
    5
    Uploads
    2

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by oldlock View Post
    It was the G30. Never having done a manual tool change on the machine until the ATC died I had no awareness of it !

    Thanks everyone.
    ...Thanks for starting this simple Thread of confussing thing called code. taking notes test later

    Last edited by machinehop5; 05-03-2021 at 09:44 PM. Reason: the other half of story of code


  15. #35
    Member mountaindew's Avatar
    Join Date
    Nov 2007
    Location
    earth
    Posts
    2151
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by metalmayhem View Post
    Without softwares like fusion they are lost , and with it they are still lost because they cannot follow or edit the code . Thats blind !
    I agree with follow, review and understand. But I never hand edit cam code. I always go back to the software and adjust settings for desired results. I admit, I have never written on single program by hand. I guess I would use conversation systems for g code more. But with years of power user level cad-cam experience I find any other method clumsy and error prone.

    Side note I see users struggle with the software also. Personally I consider most of this a perishable skill. Even when you learn, refine and practice all the steps its still easy to make scrap.



  16. #36

    Default Re: Drilling problem - machine crash

    Seems we're getting into a calculator vs long hand division type debate here. FWIW I'm of the generation that had to learn all the manual ways of doing things only to later have easy access to the now abundant tech that does it all for me. I value my ability to do long division as I value my ability to read gcode (and python, C++, swift, html, css, javascript, xaml......) for those rare occaisions when it's necessary. It allows me to do more than other people I know who are limited to letting software or hardware do the work for them but mostly only those random edge case scenarios where the off the shelf solution isn't quite what I'm after even though it could still be made to work. For everything else, I rely on the tech to do the work for me and I'm happy to have it.

    Industry standards are important, to a point, at which point they are a hindrance more than a help. It's departure from standards that allows us to have things like tormach's and internet forums where we can debate what the right way to write gcode is. This is the way we've always done it is just as blind a mentality as relying completely on software to generate code without any understanding of the code it creates. It stifles creativity and prevents advancement. I guarantee that any professional machinist or software engineer would look at my gcode, or any of the applications I've written, and laugh at the "poor" formatting of my code. Maybe they'd even be right to. But it does the job I need it to do when nothing else was available to do that job so why is it bad just because someone else would have arranged things differently?



  17. #37
    Member kstrauss's Avatar
    Join Date
    Apr 2013
    Location
    Canada
    Posts
    1788
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    +1, soofle616!



  18. #38
    Member
    Join Date
    Jun 2018
    Location
    on my feet
    Posts
    962
    Downloads
    1
    Uploads
    0

    Default Re: Drilling problem - machine crash

    Quote Originally Posted by soofle616 View Post
    Industry standards are important, to a point, at which point they are a hindrance more than a help. It's departure from standards that allows us to have things like tormach's and internet forums where we can debate what the right way to write gcode is. ?
    I can't see it as a hindrance in any shape or form . The industry hasn't fallen behind by following standards and it's still marching forward . Hobby hasn't done anything ground breaking by not following and seems to want to mimic final results similar to industrial . I've seen some cool stuff from hobby and especially from some of the die hard linux guys , but still nothing ground breaking

    The remark why use a french book to learn german really doesn't make sense . G code is g code and it's all the same within it's language . Most manuals are terrible for examples , and haas is the only one that I've seen that gives a great explanation of each code , it's use and gives full examples (available online in pdf) . Wheres the difference between open and closed mindedness .

    I have a pathpilot post that came with my bobcad package , aside from a couple codes to match pathpilot the format is the same as I've always used . I can load a new program in the machine , fire it up and walk away

    If you read back 20+ yrs ago , within these forums there are numerous guys who said conversational programming will be the end of g code . I'm talking true conversational vs an app that simply spits out g code . It's now 2021 and we are still running the same g codes with varying proprietary optional codes . Meanwhile conversational is where it belongs , something that most shops won't have
    I previously said there are many ways to skin a cat , but there are reasons for unspoken standards . Once it's in your head it is automatic and almost robotic no different from most any other profession . At shift change , a guy doesn't pull his job off the machine to finish the following day , he hands it over to the next guy . It's important that everyone is on the same page in every way shape and form . Shops will vary in many aspects but some things remain consistent .

    Now macro coding is a whole other beast that we throw into g coding and it's an incredible tool in the right hands , but thats a whole other story

    For hobby whatever works works , it's not going to be regimented , may be sloppy but it can get the job done and I can respect that . But , to argue against the regiment is silly and has nothing to gain . Thinking outside the box is what has created the industry to what it is today and there are incredible minds at work



  19. #39
    Member kstrauss's Avatar
    Join Date
    Apr 2013
    Location
    Canada
    Posts
    1788
    Downloads
    0
    Uploads
    0

    Default Re: Drilling problem - machine crash

    My comment regarding using a French dictionary to learn German was in reference to understanding how to use LinuxCNC (essentially PP) commands. Regardless of the general quality of the Haas manual I don't think that it contains explanations of how to use LinuxCNC conditional commands or named local variables or any of many other capabilities. Please correct me if I missed that section of their manual.

    An important argument against mindless regimen is that innovation and "thinking outside the box" are unlikely to result from using only the commands that are common to all gcode implementations, including redundant commands only because they are favoured by some supervisors and may make shift changes easier in certain rigid environments. Such a mindless and almost robotic mindset is a significant reason why gcode today is as unappealing today as what was created by NIST 50 years ago.



  20. #40
    Member
    Join Date
    Jun 2018
    Location
    on my feet
    Posts
    962
    Downloads
    1
    Uploads
    0

    Default Re: Drilling problem - machine crash

    you'll find most machines will work with macro variable and many follow the same style , but it can be all over the board . You already said you aren't that great with g code yet you have such strong convictions . G code is in action today because nobody has come up with anything better . Even factory automation with omron for example uses simple g code . I've had discussions about this with a friend who owns the local distribution and to be honest I was a bit surprised .

    Macro variables tend to be used by those who are already proficient with g code . Simple variables can be used for all sorts of things , complex variables and calculations can be used for many things as well . I've got macro coding for rotarys which will calculate a new g52 shift for every rotation . This only requires the deviation between the initial part zero and the center of rotation . Theres a lot to it and a multitude of reasons for doing things this way but that is a long and off topic discussion

    Last I saw with linuxcnc and pathpilot is they speak g code (both of which I have) , the same g code I see with any other machine . The only difference is a few codes which isn't uncommon
    Innovation is what creates new optional g codes , fixturing methods , cutters and cutting methods , the list goes on . Was it outside the box hobby guys who dreamed that up , I don't think so . It's the mindless robot thinkers and the mindless regime that your referring to . Walk into a shop where they are doing $100k + one off parts and tell them they are doing it all wrong , and show them how it's done . For that matter walk into a $1/part shop , see how that works out for you



Page 2 of 4 FirstFirst 1234 LastLast

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

Drilling problem - machine crash

Drilling problem - machine crash