Search code examples
c++embeddedfpgag-code

Interpret G-code into motor control signals


I'm not sure that this is the right place to post this question, but I figured it was a good start since it deals with code... if not, please point me to the right forum, thanks.

I'm looking to create a G-Code interpreter on a C/C++/FPGA embedded system and I'm not quite sure of how to translate G-code into motor movement signals. This is a project for a proprietary system so there's a lot of extras I don't need like variable gearing ratios, etc. Does anyone know where I can find this info, or know if there's an open source interpreter that I can view as an aid?

Thanks all!


Solution

  • There are many open source implementations of G-code interpreters for 3D printers and home-made CNC machines. Even though there is no universal standard (as Hans mentions in comments), the open source community arrived at a consensus that seems to be generally accepted (description can be found on reprap wiki).

    Reprap website also provides a list of open source firmwares and interpreters used in 3D printers and CNC machines, which you can use as a start. I am not sure if there is an open source implementation on an FPGA, though, as most open source projects use an Arduino or similar mainstream controllers.

    Personally, for CNC machines, I have successfully used the grbl firmware, which many other firmware implementations derive from (e.g., Marlin).