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


Page 1 of 7 1234 ... LastLast
Results 1 to 20 of 132

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

  1. #1

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

    I have a strange issue where if I try do a arc in the XZ plane with G43 tool height compensation enabled the machine goes on the wrong arc path then does a sharp jump with a loud bang!

    The following program should do an arc from X50, Z100 to X100, Z50 of radius 50 (center at relative I0, K-50). If I run the program with no tool height offset it works exactly as expected. However, when I enable tool height offset (G43), the 50mm tool offset is applied before the arc is started, then the arc begins, however radius is wrong and it heads off on a wrong path (radius seems to be 100 now). Then part way through the arc the machine jumps with a loud bang.

    G90 G94 G17 G49 G40
    G21
    G54
    G0 X50. Y0 Z110.
    G43 Z105. H1 <---- This is the offending line! H1 is set to 50 in tool offset table
    G1 Z100. F175
    G18 G3 X100. Z50. I0. K-50.

    Below is a link to a video showing the problem happening. The video shows the program working as expected with the G43 line removed. Then it shows what happens when the G43 line is enabled. After that it shows the machine screen while stepping through the program (I stopped before it crashed again as this is exactly repeatable!).



    Any ideas what might be going on?

    It scared the ****e out of me when it went bang! Note that the rapid rate was on 10% and the feed rate slow so I don't know why it moved so fast! The machine when into a fault state with a Z axis alarm and had to be power cycled after the bang. There are no mechanical problems with the machine motion.

    Similar Threads:


  2. #2
    Member machinehop5's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    723
    Downloads
    2
    Uploads
    0

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

    ..does Offset H1 have + or - value?



  3. #3
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    11573
    Downloads
    0
    Uploads
    0

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

    Quote Originally Posted by ashes-man View Post
    I have a strange issue where if I try do a arc in the XZ plane with G43 tool height compensation enabled the machine goes on the wrong arc path then does a sharp jump with a loud bang!

    The following program should do an arc from X50, Z100 to X100, Z50 of radius 50 (center at relative I0, K-50). If I run the program with no tool height offset it works exactly as expected. However, when I enable tool height offset (G43), the 50mm tool offset is applied before the arc is started, then the arc begins, however radius is wrong and it heads off on a wrong path (radius seems to be 100 now). Then part way through the arc the machine jumps with a loud bang.

    G90 G94 G17 G49 G40
    G21
    G54
    G0 X50. Y0 Z110.
    G43 Z105. H1 <---- This is the offending line! H1 is set to 50 in tool offset table
    G1 Z100. F175
    G18 G3 X100. Z50. I0. K-50.

    Below is a link to a video showing the problem happening. The video shows the program working as expected with the G43 line removed. Then it shows what happens when the G43 line is enabled. After that it shows the machine screen while stepping through the program (I stopped before it crashed again as this is exactly repeatable!).



    Any ideas what might be going on?

    It scared the ****e out of me when it went bang! Note that the rapid rate was on 10% and the feed rate slow so I don't know why it moved so fast! The machine when into a fault state with a Z axis alarm and had to be power cycled after the bang. There are no mechanical problems with the machine motion.
    If your control is using Fanuc format code then H1 is your tool number not an offset number, if you can you need to change how the machine retracts also, it is doing a dog leg return or are you using a G91 for the return, you need to do a G0Z0. before the X Y move or it will crash like you see in the video

    Mactec54


  4. #4

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

    Quote Originally Posted by machinehop5 View Post
    ..does Offset H1 have + or - value?
    H1 is set to +50. Near the end of the video I showed the tool offset table. When I got this machine, all the tool height offsets were set to numbers like -120 to -200. I still haven't quite got my head around tool height offsets on this machine!



  5. #5

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

    Quote Originally Posted by mactec54 View Post
    If your control is using Fanuc format code then H1 is your tool number not an offset number, if you can you need to change how the machine retracts also, it is doing a dog leg return or are you using a G91 for the return, you need to do a G0Z0. before the X Y move or it will crash like you see in the video
    The machine has an unknown Mazak controller on it made by Mazak. It does not seem to match any other controllers on early Mazaks and seems to be unique to this machine.

    The controller doesn't seem to have tool table, just a single screen where you can set up to 64 tool length H and diameter D numbers (as shown near the end of the video). From my testing H seems to refer to an entry into that table. The machine can hold 10 tools but there is nowhere to program which tools are installed.

    The program was just a bare minimal example to show the problem. You are right that the first move would be bad, and a G0 Z0 is required (and was in the bigger program where this problem first showed up). Although, that is not the crash I am talking about. I am referring to the big jump doing the arc and loud bang at 1:42 in the video!



  6. #6
    Member machinehop5's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    723
    Downloads
    2
    Uploads
    0

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

    ...might try using a R value and discard the I K
    G18 G3 X100. Z50. R.50

    ....If, machine home position for Z axis is zero and you use a gage block to set tool heights from Top of Part.... than all of the Offsets would be a negative number (my way its easier for me)...Big Shops use a Tool Setter.. programming a G43 and G44 would make a difference also, depending how You want to set your tools.



  7. #7

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

    Quote Originally Posted by machinehop5 View Post
    ...might try using a R value and discard the I K
    G18 G3 X100. Z50. R.50
    I did actually try with R and got the same behavior. I probably should have mentioned that. The only way it works properly is if I don't apply tool height offset with G43.

    I find it hard to believe this machine in its 25 years of use has not had to do an arc in XZ with tool height offset enabled. So either I really dont understand what I am doing or...



  8. #8
    Member
    Join Date
    Dec 2012
    Location
    The Netherlands
    Posts
    352
    Downloads
    0
    Uploads
    0

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

    Hi,

    Remove that first Z110. because it has no relation to the Tool lenght for tool T01.
    With a correct setup - G54/G59 Z-level and a correct H01 Tool Lenhgt Offset (H01) you only can program a first Z-value in the G43 line.
    Sometime you can use a G53 for a first Z-value ( or XY ) but only for safe distance values.


    G90 G94 G17 G49 G40
    G21
    G54
    G0 X50. Y0 Z110. --- [ REMOVE THIS Z110. ]
    G43 Z105. H1
    G1 Z100. F175
    G18 G3 X100. Z50. I0. K-50.

    Last edited by Heavy_Metal; 09-19-2020 at 06:52 AM.


  9. #9
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    11573
    Downloads
    0
    Uploads
    0

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

    Quote Originally Posted by Heavy_Metal View Post
    Hi,

    Remove that first Z110. because it has no relation to the Tool lenght for tool T01.
    With a correct setup - G54/G59 Z-level and a correct H01 Tool Lenhgt Offset (H01) you only can program a first Z-value in the G43 line.
    Sometime you can use a G53 for a first Z-value ( or XY ) but only for safe distance values.


    G90 G94 G17 G49 G40
    G21
    G54
    G0 X50. Y0 Z110. --- [ REMOVE THIS Z110. ]
    G43 Z105. H1
    G1 Z100. F175
    G18 G3 X100. Z50. I0. K-50.
    That's not totally correct he can use that line but not like he has it


    G0Z110.
    G0X50.Y0.

    It would work like this

    I wonder though where his Z0 is because he has all positive numbers for the Z move

    Mactec54


  10. #10
    Member
    Join Date
    Dec 2012
    Location
    The Netherlands
    Posts
    352
    Downloads
    0
    Uploads
    0

    Default 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.



  11. #11

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

    Thanks everyone for your suggestions. This program was actually generated by Fusion 360. Once I found what was going on, I stripped it down to bare essentials and rounded the numbers to some values easier to visualise.

    Sorry, I have not quite understood what it is you guys are discussing I have done wrong. Bear in mind I am new to g code and CNC programming in general.

    I can see that I have done a Z move to Z110 before the tool height offset is applied, which would put the tip of the tool to well below Z110, then applied the tool height with G43 Z105. H1, which would bring the tip of the tool back up to Z105. Not ideal in a real world scenario, but remember this is an example to demonstrate the machine losing the plot part way through the arc movement (as per the loud bang in the video). No actual metal is going to be cut with this program.

    In the video you can see those two movements being made. When the example is being run without the G43 line, Z Z110 move is there to set the starting point of the cycle (e.g. first cycle in the video)

    To switch between the two examples, instead of adding/removing the G43 line, I probably should have replaced G0 X50. Y0 Z110. with G43 Z105 H1, and had a G0 Z0 at the program start.

    All that aside, none of it should affect the radius of the arc or make the machine go bang while it makes the arc right???



  12. #12

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

    Quote Originally Posted by mactec54 View Post
    I wonder though where his Z0 is because he has all positive numbers for the Z move
    Z0 was set so the pencil lined up with the 0,0 axis of the drawing (refer video) by setting G54 work offset to that location. With no tool offset applied.



  13. #13
    Member
    Join Date
    Jan 2005
    Location
    USA
    Posts
    11573
    Downloads
    0
    Uploads
    0

    Default 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


  14. #14

    Default 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.



  15. #15
    Member
    Join Date
    Dec 2012
    Location
    The Netherlands
    Posts
    352
    Downloads
    0
    Uploads
    0

    Default 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.

    Last edited by Heavy_Metal; 09-20-2020 at 03:24 AM.


  16. #16

    Default 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...



  17. #17
    Member
    Join Date
    May 2005
    Location
    canada
    Posts
    1639
    Downloads
    0
    Uploads
    0

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

    Having a mystery control is a lousy situation. The worst.
    I have a hunch that setting length to zero in the tool offset page will allow this program to run with G43. Unfortunately that's just another experiment and does not solve the problem.
    Another hunch (wild guess really) is when G18 is called the control is trying to apply the compensation to another plane (Y?) which is not possible in it's current configuration. This may be a settable parameter but I sure can't help with that. Why the machine makes this violent move instead of throwing an error is mystery in itself.
    A Hail Mary manouver would be adding a J0 to the arc move. That shouldn't work but nothing lost in trying.

    Anyone who says "It only goes together one way" has no imagination.


  18. #18

    Default 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.

    Attached Thumbnails Attached Thumbnails Why does this program make the machine crash? - with video-xz-example-jpg  
    Attached Files Attached Files


  19. #19

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

    Quote Originally Posted by cyclestart View Post
    Having a mystery control is a lousy situation. The worst.
    I have a hunch that setting length to zero in the tool offset page will allow this program to run with G43. Unfortunately that's just another experiment and does not solve the problem.
    Another hunch (wild guess really) is when G18 is called the control is trying to apply the compensation to another plane (Y?) which is not possible in it's current configuration. This may be a settable parameter but I sure can't help with that. Why the machine makes this violent move instead of throwing an error is mystery in itself.
    A Hail Mary manouver would be adding a J0 to the arc move. That shouldn't work but nothing lost in trying.
    You are on the money with the zero tool offset. The arc is correct if H1 = 0. See my last post for an example.

    I will definitely try adding a J0, willing to give anything a go at the moment. This XZ (and probably YZ) arc thing is a reasonably big deal as it seems most CAM software likes to make a nice little arc to transition from moving on one axis to another. Actually I suppose I should run the exact same test in the YZ plane and see what it does.



  20. #20
    Member
    Join Date
    May 2005
    Location
    canada
    Posts
    1639
    Downloads
    0
    Uploads
    0

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

    Oh this is real time conversation
    I should be sleeping and too tired to do more than semi-coherent babble. If a brainwave hits I'll be back.

    Anyone who says "It only goes together one way" has no imagination.


Page 1 of 7 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

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

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

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