Page 1 of 3

Use GRBL instead of TinyG

Posted: Mon Feb 16, 2015 7:22 pm
by metRo_
Hi,
Did you change the TinyG firmware or you just send G-code commands to it? I'm asking that because I have a grbl shield for arduino so I can save some money here :D

thank you

Re: Use GRBL instead of TinyG

Posted: Mon Feb 16, 2015 8:28 pm
by JuKu
I'm using TinyG in JSON mode. I'm not familiar with GRBL, so I don't know if it has that, but the feedback of JSON is essential. I'm also using TinyG's settings down/upload, and individual settings set/read with JSON. So, it is much more than G-code that is going on.

Re: Use GRBL instead of TinyG

Posted: Tue Feb 17, 2015 12:39 am
by metRo_
JuKu wrote:I'm using TinyG in JSON mode. I'm not familiar with GRBL, so I don't know if it has that, but the feedback of JSON is essential. I'm also using TinyG's settings down/upload, and individual settings set/read with JSON. So, it is much more than G-code that is going on.
Can you elaborate a little on what type of information you change between the desktop app and the tinyg because I can't think of thinghs diferent than move here or there.

Re: Use GRBL instead of TinyG

Posted: Tue Feb 17, 2015 7:29 am
by JuKu
It is mostly moves, of course. Feedback is important, the software needs to know when movement has stopped. Also, the TinyG settings are done through the desktop app, but you might get away by doing settings outside the app. The z limit switches are reconfigured on the fly.

Re: Use GRBL instead of TinyG

Posted: Tue Feb 17, 2015 9:37 am
by metRo_
I haven't look at your code yet but how hard do you think is to use g-code instead of Jason interface?

Re: Use GRBL instead of TinyG

Posted: Tue Feb 17, 2015 10:43 am
by JuKu
Sending, not very. I don't know what and how GRBL reports back, but the feedback is important, you need to detect when machine has stopped moving. Using JSON, the status reports are automatically parsed, so you need to write a routine that gets the feedback and calls the required status variable update routines. You also need to handle the limit switches reconficuration and connect FET drivers to M commands.

Re: Use GRBL instead of TinyG

Posted: Tue Feb 17, 2015 2:12 pm
by metRo_
GRBL also has the feedback report. If someone needs to buy the tinyg vs (arduino + grbl shield) the price diference is only some $. I was thinking on that because I already got the electronics laying around :p

Re: Use GRBL instead of TinyG

Posted: Wed Feb 18, 2015 3:08 am
by Lars
I would absolutely prefer to use GRBL / pure g-code instead of having to use a proprietary tinyG controller as the tinyG hardware is not Open Source :(
g-code with a feedback (machine move complete) is really more interesting, just imagine having more axis than tinyG or a servo system which can't be run with tinyG.

Best regards!

Re: Use GRBL instead of TinyG

Posted: Wed Feb 18, 2015 10:18 am
by bobc
The problem with GCode is that it is a file format, not a comms protocol. So there is no standard for how a controller should respond to commands. In Reprap, the controller replies with "OK" (or an error message).

"OK" means that the command has been queued for execution, but provides no feedback when the command is completed. The simplest way I think is to add an M-code command "wait for all commands complete".

Either way, you would need to make a small modification to the controller firmware and PC software, it's a small mod, but means you probably couldn't use stock firmware.

I have a bunch of Reprap controllers, I had planned to use one for my PnP machine. I have spent some time working on Reprap firmware (Marlin, Teacup etc), so it would be easy for me to make modifications.

Re: Use GRBL instead of TinyG

Posted: Wed Feb 18, 2015 11:02 am
by metRo_
bobc wrote:The problem with GCode is that it is a file format, not a comms protocol. So there is no standard for how a controller should respond to commands. In Reprap, the controller replies with "OK" (or an error message).

"OK" means that the command has been queued for execution, but provides no feedback when the command is completed. The simplest way I think is to add an M-code command "wait for all commands complete".
Using GRBL you have that kind of feedback I just don't know if is automatic or you need to polling it but you definitively know when the machine is working, moving or stopped.