Raspberry Pi g-code senders for Grbl

Discussion about the arduino based g-code interpreter, grbl
chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by chamnit » Sat May 09, 2015 5:02 pm

@WillWinder : I was using the stable 1.08 build downloaded from your site. I just tried 2.0 nightly, but had some problems. It kept crashing on the RPi2 with a NullPointerException when getting the control state. It did work a few times, but it looked like it performed about the same. Maybe not quite as well as the 1.08 from a subjective point of view.

I don't think it's the serial library that's the problem. Both the Python-based GUIs and the NodeJS/Go based GUIs seem to run the job fine on the RPi2 in terms of the actual streaming of the g-code program. For example, Chilipeppr's SP JSON server ran the job great, because the entire job was directly uploaded to the server and run from there. It was the Chilipeppr interface that choked on the data coming back from the server.

What I don't understand is why bCNC runs so well on the RPi and RPi 2, when it has to do almost as much. It has to update the coordinate data, a progress bar, a simple visualizer, and terminal window. The terminal window being active doesn't seem to effect its performance. It's either tkinter and python has some better background handling of things like this on slow machines, or Vasilis' skill at programming. (If you look at his code, it's pretty impressive and very clean.)

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by Will Winder » Mon May 11, 2015 8:36 pm

@chamnit I suspect bCNC's performance is a combination of efficient programming and lightweight GUI framework. If you don't mind trying my experimental UGSPlatform build I'd be curious if it can run the job at full speed. I also made a couple optimizations based on things I noticed while running with a profiler which are in both 2.0 nightly builds.

I don't think the gcode file I was running is as aggressive as the one you're testing with so I might have been noticing different bottlenecks. Have you made your gcode file available so I could give it a try?
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by chamnit » Sun May 24, 2015 7:48 pm

Some new developments:

GrblWeb: Andrew Hodel updated GrblWeb for the RPi 2 (not RPi 1) and added webcam streaming! He also made a little easier to get up and running, but it's still requires being comfortable with doing things in Linux command line. You can download the RPi 2 image here (https://groups.google.com/forum/#!topic ... Bg9SSKiWLg).

To get it running, flash this image to an SD card, as you would with any RPi image. Power up your RPi 2 with the SD card. It'll boot up to a login prompt. Login with the username and password in the link. There will be some information printed on the screen after you login, like how to get a WiFi dongle working. Basically it says to to edit the "/etc/rc.local" via a "nano /etc/rc.local" command to enable GrblWeb. Comment out the reprapweb and uncomment "grblweb". Ctrl-X and yes to save. Then, type "reboot" at the prompt and wait for it to boot.

At this point, you should be good to go, if you have the RPi2 connected to your local network either through Ethernet or configured a WiFi dongle. Connect to GrblWeb via "xyzbots.local" in a remote web browser on your local network. And, a webcam should be plug-n-play if its compatible with the RPi and you're power supply can provide enough amps to power it.

As for the browser screen refreshing problem, where the browser would lock up or crash if a job was fairly aggressive, Andrew is working on fixing that issue. Hopefully, that will be fixed, because it was seemingly the only limitation.

EDIT: You may also need to change the baud rate to 115200 in the ~/grblweb/config.js file. This should be updated in the standard build soon.

bCNC: It's getting polished up and is working pretty nicely now. The virtual pendant has been updated with web sockets, jQuery, and CSS to be a nice foundation for building on top of. It works great now and is very responsive, even on a smartphone. It still looks basic (should be beautified soon), but anyone can make their own custom virtual pendant, if they know a little CSS and html. It could go as far as having something like GrblWeb and JSCut as the virtual pendant or headless main controller. There doesn't seem to be a limit to what you can do with it.

chamnit
Posts: 376
Joined: Tue Aug 12, 2014 2:16 pm
Location: Albuquerque NM, USA
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by chamnit » Wed Jun 24, 2015 10:22 pm

All: Here's a new development. Will Winder has been hard at work trying to identify and fix performance issues with UGS running on an RPi 2. We've been going back and forth for a few weeks, but there is good news! Will has done an amazing job. UGS now runs beautifully on an RPi 2. (I haven't tested on an RPi 1.)

His UGS nightly build passed all of the tests with one small caveat. For aggressive g-code programs, like the one I test with, you'll need to disable the scrolling output. Otherwise, it completed the job nicely and the GUI was responsive with feed holds and updating real-time data. Will still has some more work to do with cleaning up some bugs that were a consequence of refactoring his code a bit, but knowing him, he'll have a stable version very soon. And when that comes out, I can now fully recommend UGS on an RPi 2!

newtothis
Posts: 125
Joined: Wed Feb 04, 2015 6:10 pm
Location: North Suburbs of Chicago

Re: Raspberry Pi g-code senders for Grbl

Post by newtothis » Tue Jul 07, 2015 8:00 pm

chamnit wrote:Will still has some more work to do with cleaning up some bugs that were a consequence of refactoring his code a bit, but knowing him, he'll have a stable version very soon. And when that comes out, I can now fully recommend UGS on an RPi 2!
This was from about 2 weeks ago but don't know if this last bit of cleaning up happened yet?
Shapeoko 3 #304

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by Will Winder » Tue Jul 07, 2015 9:47 pm

The UGS nightly build should be good to go. There are still a couple more performance improvements I can make, but that will always be the case. :)

As always please report any issues you come across.
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

RobCee
Posts: 587
Joined: Wed Jan 08, 2014 11:33 am
Location: Birmingham, UK

Re: Raspberry Pi g-code senders for Grbl

Post by RobCee » Thu Aug 27, 2015 12:07 pm

I am looking to get UGS up and running on a RPi2, but being a complete RPi noob am looking for a bit of guidance.
Does anyone have (up to date) references for me to follow to get going?
ShapeOko2 #3400 - Chinese 800W AC Spindle - Stiffened X-Axis - TR10 Z-Axis - Inverted Z Motor - Hall Effect Limits - Drag Chains & Custom Brackets

lordmundi
Posts: 207
Joined: Wed Jan 01, 2014 4:02 am
Location: Friendswood, TX
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by lordmundi » Thu Aug 27, 2015 6:53 pm

how do we get this latest UGS for the Pi? I see 1.0.8 download link, but not sure how to try the nightly build.

onekk
Posts: 29
Joined: Thu Dec 18, 2014 2:29 pm

Re: Raspberry Pi g-code senders for Grbl

Post by onekk » Thu Aug 27, 2015 8:43 pm

try bCNC on github it work very well on the Raspberry Pi chamnit had tested it on his Raspberry if i didn't remember wrong I'm using it on an Olimex Olinuxino that is a similar computer on a board. It's a Python program and use tkinter and pyserial so it's less reqursting than UGCS that is java based.

Sended with tapatalk

Will Winder
Posts: 435
Joined: Fri Apr 20, 2012 2:40 pm
Location: Hudson, MA
Contact:

Re: Raspberry Pi g-code senders for Grbl

Post by Will Winder » Thu Aug 27, 2015 9:20 pm

The UGS nightly build link is on the github page right above the 1.0.8 link.

To run on a raspberry pi install Java 7 runtime environment, and double click the UGS jar (or run the start.sh script if Raspbian doesn't map .jar's to java).
ShapeOko #367: Dual-Y drive, Belt on outside, 1000mm Y-Axis, DW660 Spindle, Nema-23 X/Y motors.

Primary developer on Universal Gcode Sender.

Post Reply