588,531 active members*
9,076 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > G-Code Programing > Why does this program make the machine crash? - with video
Results 1 to 20 of 139

Hybrid View

  1. #1
    Join Date
    Dec 2012
    Posts
    395

    Re: Why does this program make the machine crash? - with video

    Hi mactec54

    Of course he can use that line but I'll never program it that way, can you explain me how the machine knows where that Z110. is without (/ before) a G43 Z105. H01
    Maybe you have a different way of setting G54 Z-level and Tool Lengt Offset H but I prefer programming it like below:

    He should program:
    G00 X50. Y0
    G43 Z110. H01
    G01 Z105. F175.

  2. #2
    Join Date
    Jan 2005
    Posts
    15362

    Re: Why does this program make the machine crash? - with video

    Quote Originally Posted by Heavy_Metal View Post
    Hi mactec54

    Of course he can use that line but I'll never program it that way, can you explain me how the machine knows where that Z110. is without (/ before) a G43 Z105. H01
    Maybe you have a different way of setting G54 Z-level and Tool Lengt Offset H but I prefer programming it like below:

    He should program:
    G00 X50. Y0
    G43 Z110. H01
    G01 Z105. F175.
    No not at all, if there is no tool change Like a T1M6 in the code, then he must move the Z axis into a safe position then you can move X Y axis

    Once a Machine is homed it knows where Z0 is so any number you want to use for a Z axis move you can use, up or down

    No this is not how must CNC users would program but when there is no Tool call ( T1M6 ) then you need to use a Z axis move by using a G0Z---- Move

    Just like what you see in the video at the end he is moving all 3 axis at the same time and it crashes the tool into the part he needs to move the Z axis up first with a G0Z---- move and then move the X Y axis
    Mactec54

  3. #3
    Join Date
    Aug 2020
    Posts
    95

    Re: Why does this program make the machine crash? - with video

    Quote Originally Posted by mactec54 View Post
    Just like what you see in the video at the end he is moving all 3 axis at the same time and it crashes the tool into the part he needs to move the Z axis up first with a G0Z---- move and then move the X Y axis
    While I appreciate everyone's help and please don't stop giving advice, the crash I am worried about is not at all to do with the start move, it is the arc. The start move just gets to where the arc needs to begin. There is no work in the machine so so no risk. What I really want to focus on is the arc movement and why it goes nuts at 1:42 in the video.

  4. #4
    Join Date
    Dec 2012
    Posts
    395

    Re: Why does this program make the machine crash? - with video

    You end the program just after the arc with a %.
    I always use a T-call even when I use only one pot or tool, everything to avoid problems, but you can program the way you like of course, as long you know what you are doing.

    Try the next code:

    %
    G90 G94 G17 G49 G40
    G21
    G54
    T01 M06 ( or M06 T01 - depends on the machine )
    G0 X50. Y0.
    G43 Z110. H1
    G1 Z100. F175
    G18 G3 X100. Z50. I0. K-50.
    G1 X105.
    G0 Z110. ( for a safe retract in Z before moving X-Y )
    G0 G91 G28 Y0 Z0 M05 ( or G0 G53 Y0 Z0 )
    M30
    %

    If there's still a problem with the use of H1 then your value H01 (+50) is to high or low or + or -, whatever.
    Then you have to be sure your Tool Lenght (H01) and G54 (Z0) is correct before you start.

  5. #5
    Join Date
    Aug 2020
    Posts
    95

    Re: Why does this program make the machine crash? - with video

    Quote Originally Posted by Heavy_Metal View Post
    as long you know what you are doing.
    Haha, thats the million dollar question! I am learning fast, nothing like a tricky problem to make you study how everything works! As for an instruction following the arc, I did try that today. See my next post...

  6. #6
    Join Date
    Aug 2020
    Posts
    95

    Re: Why does this program make the machine crash? - with video

    OK, So I did another experiment today. This time I setup a proper tool offset and set the work offset to a real location. The result was exactly the same, the arc does not go as expected.

    What I have managed to prove I think is that the arc center is not taking the tool length compensation into account. The arc Z center is always at work offset Z - radius. This suggests that K is absolute. But even absolute should use tool height compensation? Also, I did a test and proved that I and J are incremental. I also found a printout from factory of all the machine parameters and checked they are as per factory.

    I have prepared a better example program and a drawing showing what happens. Maybe this will better help people understand what I am seeing. See attached picture and pdf for higher resolution.

    I did not run this program on the machine, just on the controllers tool path simulator, but I know from experience it will make it go bang! I suspect the bang is caused when it tries to perform an arc that does not lie on both the start and end points. The simulation shows the arc start point disconnected from machines current position. In practice the machine starts moving from its actual position then sometime later packs a sad.

  7. #7
    Join Date
    Jan 2005
    Posts
    15362

    Re: Why does this program make the machine crash? - with video

    Quote Originally Posted by ashes-man View Post
    OK, So I did another experiment today. This time I setup a proper tool offset and set the work offset to a real location. The result was exactly the same, the arc does not go as expected.

    What I have managed to prove I think is that the arc center is not taking the tool length compensation into account. The arc Z center is always at work offset Z - radius. This suggests that K is absolute. But even absolute should use tool height compensation? Also, I did a test and proved that I and J are incremental. I also found a printout from factory of all the machine parameters and checked they are as per factory.

    I have prepared a better example program and a drawing showing what happens. Maybe this will better help people understand what I am seeing. See attached picture and pdf for higher resolution.

    I did not run this program on the machine, just on the controllers tool path simulator, but I know from experience it will make it go bang! I suspect the bang is caused when it tries to perform an arc that does not lie on both the start and end points. The simulation shows the arc start point disconnected from machines current position. In practice the machine starts moving from its actual position then sometime later packs a sad.
    Now you have it set up basically how it should be, try this I'm not sure what your radius ( R ) is but change it to suit what you need

    Your first X Y move into position also needs to be used with a G17 you have G17 active so nothing to worry about

    G18G3X50.Z-50.R50.F175.
    Mactec54

  8. #8
    Join Date
    Aug 2020
    Posts
    95
    Quote Originally Posted by mactec54 View Post
    Now you have it set up basically how it should be, try this I'm not sure what your radius ( R ) is but change it to suit what you need

    Your first X Y move into position also needs to be used with a G17 you have G17 active so nothing to worry about

    G18G3X50.Z-50.R50.F175.
    Thanks for the idea. I have tried radius instead of ijk but got exactly the same behavior. I also tried with a feed rate too. Nothing I try changes anything, I am going mad!!!

  9. #9
    Join Date
    Jan 2005
    Posts
    15362

    Re: Why does this program make the machine crash? - with video

    Quote Originally Posted by ashes-man View Post
    While I appreciate everyone's help and please don't stop giving advice, the crash I am worried about is not at all to do with the start move, it is the arc. The start move just gets to where the arc needs to begin. There is no work in the machine so so no risk. What I really want to focus on is the arc movement and why it goes nuts at 1:42 in the video.
    How did you arrive at the H1 with a 50 offset
    Mactec54

  10. #10
    Join Date
    Dec 2012
    Posts
    395

    Re: Why does this program make the machine crash? - with video

    It seems that you don't need the G43 H_ on a Mazak, it's a parameter setting when you want to program like Fanuc/Haas ( G43 Z___ H__ ).
    Are there no programs stored in the LIB that you can use as an example that shows G43 H is not necessary.
    I think there is a parameter active that conflicts with the use of G43.

    http://www.cnctrainingcentre.com/tag/mazak/
    They don't tell which parameter but maybe it depends on the Mazak model.
    .... scroll down on the page.

  11. #11
    Join Date
    Aug 2020
    Posts
    95

    Re: Why does this program make the machine crash? - with video

    Quote Originally Posted by Heavy_Metal View Post
    It seems that you don't need the G43 H_ on a Mazak, it's a parameter setting when you want to program like Fanuc/Haas ( G43 Z___ H__ ).
    Are there no programs stored in the LIB that you can use as an example that shows G43 H is not necessary.
    I think there is a parameter active that conflicts with the use of G43.

    http://www.cnctrainingcentre.com/tag/mazak/
    They don't tell which parameter but maybe it depends on the Mazak model.
    .... scroll down on the page.
    Thanks for digging that info out. The older manuals I have say that you should not use G43 if you are using a Mazatrol based machine. Apparently Mazatrol takes care of the tool length offset for you and you don't need G43. My controller does not support Mazatrol as far as I know.

    I did some more experiments this morning. I tried making sure tool 1 was loaded as I was using H1 with tool 0, but as I suspected that did not help. The machine does not associate tool numbers with offsets, there is just a table of offsets, up to you to choose which offset should be used.. I also tried swapping to a positive tool length offset that represents the actual tool length from the spindle as per the manual (rather than negative tool length method). I corrected the work offset to suit. Interestingly, this did change the arc shape. It was still not correct but definitely changed it. I will plot out the differences and also try without G43 at all tonight and maybe I can come up with some useful information.

  12. #12
    Join Date
    Jan 2005
    Posts
    15362

    Re: Why does this program make the machine crash? - with video

    Quote Originally Posted by Heavy_Metal View Post
    It seems that you don't need the G43 H_ on a Mazak, it's a parameter setting when you want to program like Fanuc/Haas ( G43 Z___ H__ ).
    Are there no programs stored in the LIB that you can use as an example that shows G43 H is not necessary.
    I think there is a parameter active that conflicts with the use of G43.

    http://www.cnctrainingcentre.com/tag/mazak/
    They don't tell which parameter but maybe it depends on the Mazak model.
    .... scroll down on the page.
    Yes it will depend on what control he has as they can do both

    Depending on his control vintage is to how the control is setup if it is using Mazatrol or Fanuc they can do both, depending on the vintage, it seem that he is not having a problem with that part of it though
    Mactec54

Similar Threads

  1. Replies: 35
    Last Post: 04-25-2017, 09:56 AM
  2. program crash
    By Cartel, LLC in forum BobCad-Cam
    Replies: 10
    Last Post: 05-26-2013, 09:17 PM
  3. Make Machine Beep During Program?
    By behindpropeller in forum Haas Mills
    Replies: 17
    Last Post: 12-13-2011, 07:43 PM

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
  •