523,811 active members*
2,488 visitors online*
Register for free
Login
Results 1 to 18 of 18
  1. #1
    Registered
    Join Date
    Jun 2017
    Posts
    123

    TNG freezing while running gcode

    Using the latest TNGv2 I have had it completely freeze 3 times while running gcode recently. The only thing I can do is kill it using task manager. This time it had almost finished luckily. But it freezes, it hasn't lost connection to the controller and consumes lots of CPU. Any idea why?

    Attached Thumbnails Attached Thumbnails TNG freeze.jpg  

  2. #2
    Registered
    Join Date
    Jun 2017
    Posts
    123

    Re: TNG freezing while running gcode

    This has happened another 2 times since I posted. Both times running different scripts. The last 2 where similar in the it stopped on the line before the M5. But previously it stopped in a random position in the middle of a script.

    It looks like JerryBurks might be having a similar issue? See https://www.cnczone.com/forums/plane...-software.html

    Cheers
    Simon

  3. #3
    Registered
    Join Date
    Apr 2013
    Posts
    94

    Re: TNG freezing while running gcode

    Unfortunately I have to confirm this problem. It has happened to me a couple of times always with very long jobs (specifically trochoidal milling), over 100,000 lines of GCode; To me the work is completed but then the program no longer responds to any command.

  4. #4
    Registered
    Join Date
    Jun 2017
    Posts
    123

    Re: TNG freezing while running gcode

    I have had it happen on a few very long jobs 50k-100k lines of gcode, and in those cases it had 10-15 lines to go. But I have also had it happen once in a very short job where I was just drilling about 25 holes that I needed accurately places. In that job it just stopped after 14 of 25 holes. I suspect it is a bug introduced about 2 versions back as I didn't have issues before.

  5. #5
    Registered
    Join Date
    Jun 2017
    Posts
    123

    Re: TNG freezing while running gcode

    If it is of any help the first time I had a crash was on the 1st of April. That was a job just drilling 32 spot holes in a panel. I have been keeping TNGv2 up to date so that means I have only had the problem with the most recent version (2020.03.24).

  6. #6
    Registered
    Join Date
    Aug 2011
    Posts
    979

    Re: TNG freezing while running gcode

    Quote Originally Posted by theRat View Post
    It looks like JerryBurks might be having a similar issue? See https://www.cnczone.com/forums/plane...-software.html.....
    Hmm, maybe. But in my case the program did not crash. The g-code finshed as planned. I did have to turn off the spindle manually because the PP is missing the M5 but I don't think this is relevant. After that I could still turn the spindle on and off with the screen button and the pendant button. I also could close the PC program with the windows control. So it was still partly responsive, just the jogging was completely dead, no matter if using the screen, the hardware jog buttons or the wireless handwheel. After restart of the PC program everything was normal again.
    FWIW, the g-code program was pretty long, maybe around 100k lines. This is the first time I used the machine since last November because I moved. The software is latest version. Oh...and I switched from an old laptop to a brand new integral desktop (both with latest Win10).
    Box Joint and Dovetail CAM software here: WWW.TAILMAKER.NET

  7. #7
    Registered
    Join Date
    May 2012
    Posts
    9

    Re: TNG freezing while running gcode

    I have had a similar problem with TNG2. I reported this off-forum about a month or two ago. From what I can tell, it appears that my ongoing problems might be somewhat related to what is being reported in this post.

    My problem has been that the controller/machine will freeze just prior to making a tool change - late in a gcode program (typically after more than 50K lines of code, or about 45 minute into a complicated job). Immediately prior to reaching a M6 T# command, the machine stops moving, although the spindle and cooling remain running; however, everything else is frozen. The software buttons or menus that remain functional/responsive are the spindle and cooling buttons and the Estop. No other commands are possible.

    The only way I am able to release the locked-up condition is to close the program, restart and then reload my code. Upon restarting, the program operates as normal.

    This problem always happens on longer programs, after running tens of thousands of lines of code. Also, the problem always happens just before a tool change (M6). Tool changes at the start of a program occur without issues; the problem only appears after an extended period of time between tool changes.

    At first, I thought the problem could be due to the spindle delay that I had programmed for allow for adequate time for spin-up; however, when I removed this delay, the freeze-up problem remained. I also thought the problem could have been caused by PC power management issues, however, I have verified that my control PC has been optimized to prevent these issues.

    It seems like there might be a bug has something to do with the tool change script or within the TNG2 program when interpreting the script after many lines of code. This doesn’t seem to make much sense.

    I've used two different CAM programs to produce my gcode, and I have modified my post-processor to help trouble-shoot this problem, but the problem remains regardless of the changes that I have tested.

    The gcode job that I ran yesterday had five or six tool changes and was about 150K lines of code in length. The first four tool changes occurred within the first 15K lines of code, and each tool change occurred without issue. The next tool change was programmed to occur at line 64,195. On line 64,194 the controller froze with the spindle spinning and the coolant on. No other functions were possible. I was forced to close the program, restart, reload the gcode, and chose "start from selected line” (at line 64,195). From that point forward, everything operated perfectly to the end of the program.


    From this point forward, I am forced to run shorter toolpaths that only use a single tool. This works OK, and I get good results (without any freeze-ups), but it’s a bit cumbersome and inefficient when generating g-code that requires multiple tools and different toolpath requirements.

    It’s my belief that the freeze-up problem (associated with tool changes) appeared immediately after the tool change script was implemented (a number of releases back).

    I have run out of ideas at this point.

    - Tom the SpindleJockey

  8. #8
    Registered
    Join Date
    Jun 2017
    Posts
    123

    Re: TNG freezing while running gcode

    Today I ran the same job twice, approx 26-27k lines. The first time it got almost to the end and stopped executing at the M5 command with only a handful of lines to go. The second time it ran as it should.
    My M5 is a custom script, so I suspect the problem is occurring with any call to a custom script after a certain time, because its not repeatable I am suspecting a memory leak (maybe). This is really frustrating as you can't leave the machine unattended as when it crashes the spindle is still running.

    Simon

  9. #9
    Registered
    Join Date
    Aug 2011
    Posts
    979

    Re: TNG freezing while running gcode

    Just as an experiment I tried to run a few jobs with a high speed USB isolator (to avoid possible ground loops). But no difference. The jogging freeze still happens occasionally (about 1 out of 4 times and also with shorter g-code like 20,000 lines). But I have never had the whole program freeze or not finish the g-code.

  10. #10
    Moderator
    Join Date
    Mar 2017
    Posts
    629

    Re: TNG freezing while running gcode

    I believe I fixed this freezing issue. I published beta version. Please test and confirm that problem is fixed.
    Here is download link:
    https://planet-cnc.com/wp-content/up...2020-05-18.zip

  11. #11
    Registered
    Join Date
    Jun 2017
    Posts
    123

    Re: TNG freezing while running gcode

    So I should stop running that gcode that you emailed me? It has been running for a bit more than an hour so far and hasn't failed. I will download and install the new version, but won't be able to do a real test until Wednesday.

  12. #12
    Moderator
    Join Date
    Mar 2017
    Posts
    629

    Re: TNG freezing while running gcode

    You can type "=_hw_cmdbufffree" into MDI. When you'll run out of free buffer program will freeze.


    Value will be printed to output window.
    Attached Thumbnails Attached Thumbnails buff.png  

  13. #13
    Registered
    Join Date
    Jun 2017
    Posts
    123

    Re: TNG freezing while running gcode

    I just went to stop running that test script you sent and it had frozen after 459 times around the loop, which was about 1 hour 20 minutes. _hw_cmdbufffree returned a value of 2. I will install the new version and run the test again.

  14. #14
    Registered
    Join Date
    May 2012
    Posts
    9

    Re: TNG freezing while running gcode

    Great work, Andrej!

    I just tested the latest beta (2020-05-18) and my gcode ran to completion without any freeze-ups. This was the same code that previously would freeze up at line 35266, just prior to a M3/S10000 command. I did notice (for just a fraction of a second) that the buffer "gauge" dropped from the normal value of 100%, down to about 45%, at line 35266, but then it immediately returned to 100%.

    TNG2 ran exactly as programmed.

    The changes made to the 2020-05-18 beta seems to have resolved this freeze up problem based on my very limited testing (one test), and I will try to confirm these results with further testing on Monday.


    - Tom (The SpindleJockey)

  15. #15
    Registered
    Join Date
    Jun 2017
    Posts
    123

    Re: TNG freezing while running gcode

    I ran the test script that you sent me for 2 hours (666 loops) and it did not fail, however when I hit the stop button it stopped the motion, but left the spindle running and did not run the OnStop script. It also became unresponsive. Thinking this might be profile related I loaded it up in simulation mode on another PC with a completely fresh default profile. Every time I stopped a gcode program the application stopped responding. I then added the default onStart, onEnd and onStop scripts and it also did not run the onStop as it should. After hitting the stop button I had to use task manager to close PlanetCNC. I suspect this fix has introduced a new issue.

    Cheers
    Simon

  16. #16
    Moderator
    Join Date
    Mar 2017
    Posts
    629

    Re: TNG freezing while running gcode

    I couldn't replicate exact problem but I fixed something that might be related.
    Same download link:
    https://planet-cnc.com/wp-content/up...2020-05-18.zip

    Keep in mind that this is just beta version and it is not tested.

  17. #17
    Registered
    Join Date
    Jun 2017
    Posts
    123

    Re: TNG freezing while running gcode

    No problem, happy to help iron out issues.

    This version works for me almost all of the time. The one issue I am seeing though is if I hit the stop button while it is executing my M5 script it terminates the script and fails to run the OnStop script. I have a SpindleStopDelay set so during that period is where I hit the stop button. This ends up stopping the spindle, but leaving the coolant pump running. It also leaves M3 as the active state.

    If I hit the stop button anywhere else in the code it runs the OnStop script and everything is perfect.

    Cheers
    Simon

  18. #18
    Registered
    Join Date
    Jun 2017
    Posts
    123

    Re: TNG freezing while running gcode

    A quick update. Today I ran an program with 85K lines in it twice with zero issues

Similar Threads

  1. Vibration from steppers but only when running Gcode
    By curiosity22 in forum Australia, New Zealand Club House
    Replies: 11
    Last Post: 04-18-2020, 01:30 AM
  2. Why isn't my gcode running??
    By airbrush in forum BobCad-Cam
    Replies: 29
    Last Post: 03-09-2016, 03:32 PM
  3. Bridgeport Conversion (Which kit is best for just running imported gcode?)
    By ronderkis in forum Bridgeport / Hardinge Mills
    Replies: 14
    Last Post: 04-04-2013, 01:02 AM
  4. Running a gcode output file in the computer
    By Palafox in forum Uncategorised CAM Discussion
    Replies: 3
    Last Post: 06-10-2008, 11:56 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
  •