Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
G-Code interpreter
20-12-2011, 04:28 PM,
G-Code interpreter

As it was mentioned in a different topic, and as I'm personally interested in this topic, here it is. I'll try to post progress on the project, and I hope to deliver a working G-Code interpreter for the Pinguino.

After initial discovery of the RepRap library for Arduino, which is almost 4 years old and written in C++, I finally came across the newest version of RepRap firmware, written completely in pure C. I think this makes it quite easy to create a library out of it, at least for 32-bit Pinguinos...

Here is the link to the official GIT repository for the Firmware:
Of greatest interest are, I think, files 'gcode_parse.c' and 'gcode_process.c' I'll try porting them when I have some time.
20-12-2011, 04:30 PM,
RE: G-Code interpreter
that would be great
we work on 4 axis stepper controller shield for Pinguino
Let me know if you want to be beta tester I can send you one of the first prototypes

20-12-2011, 04:48 PM,
RE: G-Code interpreter
Sure, I would be glad to. Right now I have some Pololu stepper drivers controlled by two pins (step, direction) - I think a dedicated board would also need some extra analog inputs for measuring temperature (two at least) and six digital inputs for end-stops, maybe some extra for emergency stops... Great idea, I haven't seen any dedicated shields for RepRap/Ultimaker/CNC/Lasercutting - they are usually integrated solutions with everything on one board. Having the option to use any controller in a modular fashion would be great!
21-12-2011, 12:10 PM,
RE: G-Code interpreter
Great!! That's exactly what I was looking for! We're doing the same thing, so, if you want, we could split tasks Wink
Although, if the code is too big for the 2550(I don't know), I'll make a simpler "just CNC" version for it.
21-12-2011, 11:58 PM,
RE: G-Code interpreter
Sure, I'll probably start with communication via CDC for PIC32 Pinguinos, as that is the part that needs most changes compared to the original. If you are interested in the command parser itself (as that would be the part common to all platforms), go ahead and remember to share your findings. ;-) I'll post what I have, but that will probably have to wait until after Christmas...

So, Merry Christmas everyone! Big Grin
12-02-2012, 03:53 PM,
RE: G-Code interpreter
Hi again! A lot of time has passed, so I think it's a good idea to "report" our work.
I didn't use that gcode parser, instead I used the contraptor parser. I found a lot simpler, so probably is not as good quality.

But a ran into some problems. When I reached a certain point, compiler gave me some "error allocating memory" problem, or something like that (I don't remember well the exact words and I didn't know what they meant Huh). So I decided to make the gcode interpreter on the PC side (Python) and then just pass through CDC the steps (delta steps,target steps, etc).

The interpreter is basically finished (for routing purposes, it just read straight lines, curves, home...) but now I'm struggling with Python to comunicate decently with pinguino (don't know if using threads, events... An advice would be much appreciated Wink)

And thinking all of this, I thought why don't we use USB bulk? I've never used it, but supposedly it is really (REALLY) faster than CDC, so why not?

What are your thoughts about this?

P.S: Thanks to Olimex soon I will have a 32 bits pinguino, so I could help you code in that platform too! Smile
17-03-2012, 09:06 AM,
RE: G-Code interpreter
I am so glad that I have found some other guys with same objective.
I have joined this forum just to discuss with some other geeks willing to port GRBL to Pic.
I would like to use 4550 version since I have a test board.

Please tell me what C compiler are you using ?

17-03-2012, 10:23 AM,
RE: G-Code interpreter
Hello and welcome! I'm using a PIC32, so I go straight with GCC, only need to specify a target of 'mipsel-elf' (also see here). I'm not really sure what you should use for a 4550, it is a PIC18F4550, right?

Anyway, as I have not updated on this for a long time, I have little progress because I had a lot going on with looking for work and such. But I hope I can pick this up again in a short while! Wink
17-03-2012, 06:45 PM,
RE: G-Code interpreter

I didn't take a look to GRBL but it could be interesting to port it. What is exactly GRBL ? I would like to see it and know if it can interpolate at least 3 axes.
I use EMC2 to drive CNC machine but it could be interesting to use Pinguino as a Gcode interpreter.

18-03-2012, 10:54 AM,
RE: G-Code interpreter
GRBL it's the father of all those flavors of embedded G-Code interpreters :

After this have appeared all those flavors :
From this list I am looking which one to choose

Indeed I would like to use : PIC18F4550 since I have some demo boards available .
So I am tight to 8bit PIC18F4550 .
What compiler do you recommend for this family ? wich one it's most easy to use ?
from opensource domain what should I choose ?

Forum Jump:

Users browsing this thread: 1 Guest(s)