Welcome to Our Community

Some features disabled for guests. Register Today.

Large Gcode file will not run on Raspberry Pi

Discussion in 'Control Software' started by Ed Parsons, Feb 16, 2021.

  1. Ed Parsons

    Builder

    Joined:
    May 6, 2020
    Messages:
    11
    Likes Received:
    10
    I have been using OpenBuilds Control on the Raspberry Pi for about 4 months now and have not had any issues to speak of. However, the largest gcode file that I have cut during that time period was just over 120,000 lines of code. I was asked by someone if large files caused any issue with the Raspberry Pi version of OpenBuilds Control, so I went through and found the largest file that I had cut. This was done about six months ago, and was done with OpenBuilds Control on a Windows machine. The file is about 460,000 lines of code. On the Raspberry Pi, it loads and the 3D view is rendered properly, but when I hit Run Program, nothing happens. I have experimented with some other files, and the closest I can get (to the critical size) with existing files is that a file that has 264,000 lines of gcode will run on the Pi, but a file with 396,000 lines of code will not. The Raspberry Pi is a model 4 with 4GB of RAM. It is slightly overclocked to 2.0 MHz and the swapfile size has been increased from 100MB to 2GB. It is running on a Bob's CNC Evolution 4.

    I also want to further explain "nothing happens". The button is highlighted when I move the mouse over it, it "depresses" on click, but afterward, it is as if I hadn't pressed the button. The software is not locked up or anything - I can still home the machine, etc., but there is no physical activity on the machine. I thought it might have just been taking a while to process, so I let it sit for 20-30 minutes, but still nothing.

    If it would be helpful, I could create a file with a size and number of lines in between to try and determine closer to the cut-off.

    Thanks,
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,750
    Likes Received:
    4,265
    Note the heading on top of OpenBuilds/OpenBuilds-CONTROL (in bold)
    That said, are you up to date? This sounds like a bug that was fixed months ago
     
  3. Ed Parsons

    Builder

    Joined:
    May 6, 2020
    Messages:
    11
    Likes Received:
    10
    H
    Hi Peter,
    I am at version 1.0.284.

    Ed
     
    Peter Van Der Walt likes this.
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,750
    Likes Received:
    4,265
    Ctrl+shift+i > Console tab any errors when you press Play?
     
  5. Ed Parsons

    Builder

    Joined:
    May 6, 2020
    Messages:
    11
    Likes Received:
    10
    Well, the only errors that I received were one that I received when I first opened the console which was:
    "Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist"
    But then it went on from there. I periodically received the error (4 times over about a half hours time):
    "Websocket is already in CLOSING or CLOSED state." which I believe was accompanied by a message in the OpenBuilds serial console that said:
    "[websocket] Disconnected. OpenBuilds CONTROL probably quit or crashed"
    When I loaded the file, I let the rendering occur, and when it seemed to be done, I watched the Trouble-shooting Console and the number (on the process?) kept running. When it finally reached 2500, I decided to go ahead and hit the play button. No visible change in the Trouble-shooting console, the counters would keep increasing, and occasionally start a new one.
    I did notice at one time, that on the Serial Console, the settings for the GRBL controller scrolled through again, like it does when connecting or clearing the alarm.

    NOTE: I do have the Bob's Evolution GRBL driver that created issues around release 280. Although smaller files do run fine, is it possible that this is creating an issue again?

    Sorry I can't be more help.
     
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,750
    Likes Received:
    4,265
    Pi too slow, websockets time out waiting for response from/to back/frontend - probably out of RAM, resorting to SWAP. Disable the 3D viewer from Troubleshooting > Application Diagnostics
     
  7. Ed Parsons

    Builder

    Joined:
    May 6, 2020
    Messages:
    11
    Likes Received:
    10
    Thanks Peter, but that didn't seem to help either. I understand that the Pi is not technically supported by OpenBuilds, and I do appreciate your assistance anyway. At this point, as much as I like OpenBuilds, I am more committed to my Raspberry Pi than I am to OpenBuilds, so I am going to experiment with some other software options. Once again, thanks for your help.
     
    sharmstr and Peter Van Der Walt like this.
  8. Ed Parsons

    Builder

    Joined:
    May 6, 2020
    Messages:
    11
    Likes Received:
    10
    Peter, I am pleasantly confused. When I posted in the Bobs CNC forum on Facebook, someone suggested that I increase the swapfile size. I tried setting the swapfile size to 10GB, but I have Conky running on my desktop and after I rebooted, I saw that the swapfile was still at 2GB. When I went back into dphys-swapfile, there were comments that indicated that with a 32bit operating system, there was a limit of 2G on the swapfile size. I am running Twister OS which is built on the 32bit Raspberry OS. So I went back through the process to correct the swapfile size in the file to 2GB. When I did the setup, it said it was already 2GB and it wasn't changing, but I rebooted it anyway. After reboot, I tried running a large file in OpenBuilds again (which I thought was going to be a waste) but it worked this time. By the way, I had been watching the RAM utilization with Conky, and it never got above above 1.5GB, so it never used the swapfile anyway. I still need to try on my other Pi, but I'm not sure exactly what I need to do.....

    By the way, I had also turned the visualizer back on as well, so it is consuming full resources. I swear the only other thing I did was to try to resize the program window, so that I could see the Conky display on my desktop. It shrunk to a tiny square in the upper left corner of my monitor, but I was able to grab it and drag it to a reasonable size. I realize that this is unrelated, but just wanted you to know.

    I would love to keep using OpenBuilds - I am hoping I can get my other Raspberry Pi working as well.
     
    Peter Van Der Walt and sharmstr like this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice