Octoprint for CNC / Grbl

Post Reply
PxT
Posts: 3
Joined: Tue Jun 25, 2013 2:20 am

Octoprint for CNC / Grbl

Post by PxT » Tue Jun 25, 2013 2:40 am

I'm new to CNC & Shapeoko, having just got my kit recently and assembled it over the weekend. I have spent quite a bit of time in the 3D printer world so most of this is at least somewhat familiar.

I was a bit surprised to see that nobody has really made any mention of trying to use Octoprint with Grbl or the Shapeoko. If you're not familiar, it's a nice little web GUI meant for 3D printers that allows you to control the machine remotely using just a web browser. It essentially takes the place of your host software (Repetier or Printrun in the FDM world, GCodeSender in the CNC world) and is often setup to run on a Raspberry Pi board so that you don't need a large dedicated sending host.

Octoprint doesn't work out of the box with Grbl because it expects to send and receive slightly different status commands than those that Grbl uses. Not to be deterred I have made a fork of the source code and put together a preliminary version that works with the Shapeoko: https://github.com/PxT/OctoPrint

The Temperature panel doesn't make much sense in this context, but the Control and Terminal panels work great in my testing with the Shapeoko and I was able to load and send the Hello World example gcode with only minor issues.

I'm pretty new to Octoprint itself so there are certainly bugs but I'd be happy to hear of any success (or failures!) you guys might have with this.

bjbsquared
Posts: 102
Joined: Mon Nov 26, 2012 10:48 am

Re: Octoprint for CNC / Grbl

Post by bjbsquared » Tue Jun 25, 2013 10:02 am

This or something like this is on my to do list. I'm not a software/system admin type. I tread water with python so something like this seems like a big time sync if it didn't work the first time. But, I am headed in that direction.

I've been looking at the raspberry pie AlaMode but haven't committed to anything yet.
#1016 - 1M x 1M Y: Dual Motor Drive w/Looped Belts, X:Dual Rail with wlanfox blocks, Z: Stock, Spindle:DW660

PxT
Posts: 3
Joined: Tue Jun 25, 2013 2:20 am

Re: Octoprint for CNC / Grbl

Post by PxT » Mon Jul 01, 2013 4:04 pm

Thanks to whoever added this info to the wiki.

I corrected a couple of issues this weekend and pushed the changes to github. I also added the ability to round floats on the fly, to avoid the too-long-line problem that we're all familiar with. It is turned on by default and rounds to 3 decimal places.

spelle
Posts: 15
Joined: Wed Aug 21, 2013 3:13 pm
Location: Blois, FR

Re: Octoprint for CNC / Grbl

Post by spelle » Fri Aug 30, 2013 1:23 pm

How do we load GCode file ?

There is the Upload button, but it looks it it expect an SD Card somewhere...

Cheers !
Z Axis Acme screw upgrade, dual Y motor. Plan to use Kress spindle.

bjbsquared
Posts: 102
Joined: Mon Nov 26, 2012 10:48 am

Re: Octoprint for CNC / Grbl

Post by bjbsquared » Wed Sep 11, 2013 1:25 pm

Hey,

I just hooked my 3D printer up to a Raspberry Pi in my garage and using wifi + OctoPrint I printed a part from my Mac which is on the same network but in my computer room. So in other words. My 3D printer is now wireless.

I do not have a webcam hooked up but Octoprint has provisions for that as well. I could see doing something like this for the shapeOko. It would be nice to be able to monitor it over my network and not have to wear sight and hearing protection while I baby sit the job.
#1016 - 1M x 1M Y: Dual Motor Drive w/Looped Belts, X:Dual Rail with wlanfox blocks, Z: Stock, Spindle:DW660

WillAdams
Posts: 8488
Joined: Mon Apr 09, 2012 6:11 pm
Location: Pennsylvania --- south of the Turnpike, East of US-15
Contact:

Re: Octoprint for CNC / Grbl

Post by WillAdams » Wed Sep 11, 2013 2:08 pm

Very, very cool!

Much nicer than my ``solution'' of using VNC to control a spare computer which I have cabled up to my ShapeOko.

William
Shapeoko 3XL #0006 w/Makita RT0701 Router w/0.125″ and ¼″ Elaire precision collets
Nomad 883 Pro #596 (bamboo)

calica
Posts: 107
Joined: Wed Apr 11, 2012 8:13 am

Re: Octoprint for CNC / Grbl

Post by calica » Thu Sep 12, 2013 1:08 am

How does the gcode viewer work with non reprap gcode?

jabbaHut
Posts: 12
Joined: Wed Feb 26, 2014 10:07 am

Re: Octoprint for CNC / Grbl

Post by jabbaHut » Wed Mar 19, 2014 1:07 pm

I don't think this fork of Octoprint can upload gcode. It seems to be missing three parts from the octoprint src folder, which are the filemanager folder, the slicers folder, and the server folder. Also from the static folder from that same src folder, is missing the app folder from within the js folder. Also, it didn't have the sockjs.tornado component that should have been listed in the first Octoprint's requirements.txt.

It was easy to fix the last problem, just swap requirements text files from the original Octoprint to this version of Octoprint, and then run sudo pip install -r requirements.txt. Fixing the missing four folders isn't as simple as copying the folders into their respective locations. I suspect this is because some initializing code is different between this version by Pxt and the original Octoprint by Foosel. The missing parts, by their names, seem important to the job of uploading gcode to the uploads folder. Those are the parts I found missing, but who knows what other parts are also missing. Unfortunately I do not know how to do javascript or python, whatever language octoprint.init or run files are coded in.

jabbaHut
Posts: 12
Joined: Wed Feb 26, 2014 10:07 am

Re: Octoprint for CNC / Grbl

Post by jabbaHut » Wed Mar 19, 2014 1:12 pm

I forgot to say that this fork has been the only version of Octoprint that I got to work with my raspberry pi. I managed to get the webcam to work and the machine moving on line per line instruction on the command line textfield box. The only piece missing from this version is the ability to upload, or at least the ability for Octoprint to recognize a gcode file placed in the designated uploads folder.

Sprenkle
Posts: 18
Joined: Wed Jan 15, 2014 5:13 pm

Re: Octoprint for CNC / Grbl

Post by Sprenkle » Wed Apr 09, 2014 9:26 pm

I forked your code from GitHub and am trying to get it to run on the Yun. From what I have seen it seems to be working well on the PC.

When I copied it onto the Yun. I could not get the 3dUtil to work so I deleted it and did not seem to make a diff. My problem is that it does not recognize the \dev\ttyAth0 port, any ideas. I have just started looking at it but I think It is doable.

Nice work on the port.

Post Reply