Tendrias que hacer un interprete de GCode.