Files
ecmc_plugin_grbl/iocsh/plc/grbl.plc
Anders Sandstrom ccd0c53ed3 WIP
2022-02-02 13:54:25 +01:00

24 lines
586 B
Plutus Core

#
# Test of GRBL plugin for g-code parsing
#
println('GRBL busy :', grbl_get_busy());
println('Parser busy :', grbl_get_parser_busy());
println('Error :', grbl_get_error());
println('Row :', grbl_get_code_row_num());
println('Ecmc error :', ax1.error, ax2.error, ax3.error);
if(grbl_get_error()) {
println('Try reset');
grbl_reset_error();
#ax1.reset:=1;
#ax2.reset:=1;
#ax3.reset:=1;
} else if(not(grbl_get_parser_busy())) {
static.counter+=1;
println('Retrigger g-code. Counter: ', static.counter);
grbl_set_execute(0);
grbl_set_execute(1);
};