I’m not sure if I titled this correctly but the issue I am having is the following: I have been calibrating and setting things up the past couple days and I will suddenly notice (not sure what the proper name of this is but the area your 4x8 sheet and cut lines show up) the “workspace” is no longer displayed on my monitor, however, on my phone or laptop if I’m logged into via my Rpi @ :5000/ , will display it. The only fix I found was to reload webcontrol on my Rpi, which means I’m back to step one all over again. I’m not sure how to delete the old files from the Rpi as I can’t find them when I open the “delete software” dropdown, so I just keep adding more and more corrupt versions onto it I suppose.
The last issue I had was I had everything re-set and I loaded gcode from the garden (scoutbridge). Everything looked good…I hit play, (no router bit installed) and the program executes. Perfect! I then thought it would be interesting to watch the gcode scroll past (not sure if it is designed to do that?) so when I clicked on “view/edit g code”, the operation stopped. Nothing I tried would get it to start up again. Now this may be operator error on my part but after about 30 minutes of NOTHING responding to my mouse clicks, I shut it down and did a restart (not even the shutdown webcontrol button worked), so it was not a proper shutdown for sure. When I restarted the webcontrol, all I got was a white screen and webcontrol again is corrupted on my Rpi.
Curious is there is a more stable way to load and operate wc from a Rpi? I loaded WC by copying and pasting command lines into the CLI.
Thanks, Jerry
Pressing edit gcode actually opens a text editor to modify the gcode. You can see the gcode as it gets sent to the controller in the lower right of webcontrol. But not a good idea to try to edit the file while it is being run.
Some have reported issues running the desktop version on the raspberry pi and running the webcontrol server at the same time. Running them together with a raspberry pi is not ideal. The pi is underpowered or webcontrol is inefficient (however you choose to look at it) and the raspberry pi does best as a command line interface server so you can interact with it from a phone or a laptop. Set up webcontrol to run as a service and it does not need a display. A power button to turn it off would be a good idea though.
Well thats interesting because after I loaded it this last time (after I posted this question) I noticed the CPU was running at 100% most of the time and would not respond to any input such as play. This went on for well over 30 minutes. It kept giving me a message that it can’t do anything while it is sending gcode. I did finally get the view gcode to open and although it was still running at 100%, the code was all there, so I’m not sure if that meant it was sending it to the arduino that whole time?? Eventually, it ran the cut, although I did not have the router operating and it seemed to work but the CPU was at 100% the whole time.
It looks like I will have to look at possibly not running it as a desktop. Getting webcontrol on my pi was a HUGE hurddle for me as you may recall but now that I understand how to use the CLI, and I understand some of this computer lingo a bit better, I may have to go that route. I’ll read the earlier instructions I was given and see if I can’t figure it out.
Jerry
open a terminal window and run top, then hit 1 to show the per-cpu stats.
the pi 4 has 4 CPUs, and so the CPU utilization can bo up to 400%. Webcontrol
(written in python) is only going to use 1 core, leaving 3 available to run your
desktop. That should be pleanty to run a browser.
how much memory on the pi 4? depending on what you are using as a desktop you
could be running into memory issues. If you run short on memory and start using
swap, it doesn’t matter how much cpu you have available, you are waiting on the
memory (top will show this in the block of data at the top)
For what it’s worth, I use a Pi4B with 8GB RAM. I have found that my Pi functions perfectly as a WebControl web server OR a Linux desktop client but it has a really hard time doing both.
My recomendation is that if you are already doing so, discontinue using the desktop environment on the Pi that is also running the WebControl web server and start using a browser on another client machine to manage the WebControl interface. I think you will find that the CPU usage of the Pi will decrease dramaticaly. You can further improve performance by permanently disabling the X Windows manager on the Pi and just have it boot to the CLI. You can always re-enable it again using the raspi-config utility.
As @dlang has pointed out, there should be enough resources to run it all but I haven’t been able to figure out how yet. To me, in my case it always seemed like maybe only one core was being utilized and I was somehow not making effective use of the others.
I turned on my Rpi and attempted to start WC and once again it would not open…just a white screen that asked if I wanted to wait, which I did 2 times and it just wasn’t loading. I then re-installed WC, uploaded a sample gcode and within a few seconds, the CPU usage on WC was saying 100%. I was NOT logged into it with another device, only using it as a desktop. At this point, I ran top and this is what it looked like. Unfortunately, I’m not sure how to interpret this or what to do based on it?
I’m not sure how to do this? Currently, I have to open the CLI and type: ./webcontrol >enter to get webcontrol to open. How do I configure it to open automatically and disable the x windows manager?
Also, how would a person access the CLI once this is done to make changes if necessary?
opens the program that allows you to select boot to cli or to desktop. look around in there or google that to find the CLI option for boot.
your question on top. I prefer htop because it is colored. and you can use the arrow keys to go down the the webconrol items on the right and press F9 and 9 to kill them and then you can restart webcontrol. No need to reinstall it. Simply stop it and restart it.
OK believe it or not I’m kinda smelling what you’re cooking now.
I got into htop and I’m thinking I know how to make it auto start…just afraid to do it till I do a bit more research. What I’m not sure of is what to “kill”? Is it the “X windows” that @jonatpridesleap mentioned when he said
Also…the work “kill” seems kinda permanent. Does it delete it forever or just turn it off till you go back in again? i.e., can a “killed” command be “unkilled”?
Another dumb question is, can I keep the monitor and keyboard connected to the Rpi so that I can get into the CLI or does everything have to go through my client machine?? Lots of “obvious” things are not so obvious to someone who has never done this.
Thanks, Jerry
kill just terminates the process, it doesn’t remove anything from the system.
you can leave kb/monitor on the system so that you can easily access it, or you
can remotely access it via ssh (or from windows, with programs like putty that
implement the ssh protocol)
Hey I bumbled through and got the Rpi to start to the CLI (forgive me if I’m totally butchering all the lingo). I then manually entered ./webcontrol on the Rpi CLI and it ran some lines of whatever. Then I entered the ip address and BINGO! I’m in! Maybe all I’ll need help with is to have it auto-start WC without having to enter the ./webcontrol? Oh, and how do I shut down the Rpi without damaging the program?
Jerry
I just want to update everyone so perhaps we can add this as a data point for Rpi performance. So I’m running a Rpi 4B with a 28gb micro sd.
When it was running as a desktop, it was showing 100% CPU usage on the WC screen when gcode was loaded into it. It would freeze and several times crashed to where it would not properly re-start. I have not done extensive testing but since I changed it to start to the CLI instead of desktop, and I log in with an iphone AND a laptop, the CPU usage has gone down to:
I’m still going to try to figure out a few things as to auto-start, etc., but besides recording this for the geniuses out there, I want to also encourage others who like myself are not very computer literate. STICK with it! This is extremely rewarding to plug through. I could easily just connect my laptop but this will be so much better and the feeling of success is amazing!
Jerry
click on the actions menu and see if there is a shutdown option in webcontrol. I put one in there… but probably not in your release version… you can use one of the overlay commands to set up a raspberry pi pin as a shutdown button and when that pin contacts ground, it will shut down the OS so you can then cut power to the system.