Posted by john constable on 13/07/2018 22:17:15:
So GRBL is a piece of software – like an OS – that runs on the arduino board and controls the controller board by interpreting gcode that is sent to it by usb from a pc which is running one of many user-written GUIs?
Do the GUIs generate code from instructions you give it or do they convert from a CAD image?
"So GRBL is a piece of software – like an OS – that runs on the arduino board and controls the controller board" – exactly right. It translates G-code commands into the motor steps needed to move a tool or print head to an X,Y,Z coordinate.
grbl will respond to commands typed into a character terminal, this is the best way to test your configuration to prove the motors respond correctly to simple commands. For production work that simplicity gets tedious, hence the GUIs. They do the same job but – once properly set up – are slicker, more helpful and whatever else the designer has thought of.
What the GUI's do varies a bit, but there look to be three levels of sophistication:
- An improved version of a character terminal, tailored to support 3D, with easier connection.
- A 'sender', allowing lists of g-code commands to be sent from files, providing access to folders, with buttons allowing grbl to be reset, jog, or otherwise positioned.
- A 'sender with previewer', these can display the tool-path on screen, allowing the operator to see obvious mistakes before sending them to the machine.
A picture's worth a thousand words, this example is grblgui. (I've not used any of them and can't comment on installation, ease of use, or bugs.)
![](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Do the GUIs generate code from instructions you give it or do they convert from a CAD image?
As far as I can see none of the free GUIs convert from CAD, you either type the code in by hand, or load it from a file. The file is usually created by something else; either a conversion program, or by the drawing package itself. Jason's post shows how Fusion360 does it.
A superficial read suggests OpenSCAD can't produce g-code directly, rather users export the model as a DXF file and run that through a DXF to G-code converter. At this stage it's worth mentioning a potential booby trap! The g-code files needed to print a 3d object are additive, that is the object is built inside-out by depositing layers until the shape is finished. The g-code instructions needed to mill the same 3d object are subtractive, that is the tool removes material from a solid block until the shape is finished, outside in. grbl doesn't care, but it's possible that software written specifically for 3D printing might not support milling and vice-versa. Your lathe is subtractive and the g-code you send to grbl needs to be that way round. It may be necessary to try a few alternatives to find what suits you best.
Dave
Dave