newsch / hairy_plotter

A collection of scripts for working with a cnc poster printer
MIT License
2 stars 1 forks source link

Periodic errors during file streaming #14

Open newsch opened 5 years ago

newsch commented 5 years ago

Every now and then while streaming a file through CNC.js GRBL will return an error, related to the gcode sent. Sending the same command will then receive an ok. The last time this happened I tried sending different permutations of the command with a character missing, and was able to get similar results (I copied that below). Based on this, I think characters are getting dropped, presumably over serial?

Note that this is different from #15 - the arduino remains connected and can be resumed with ~.

Some potential fixes:

GRBL page on error codes

Error examples w/ missing characters:

> G4 P0.4 (line=6)
error:1 (Expected command letter)
> G4 P0.4 (line=6)
error:2 (Bad number format)
client> !
client>
ok
Grbl 1.1f ['$' for help]
> G4 P0.4
ok
> G4 P.4
ok
> G4 0.4
error:23 (Invalid gcode ID:23)
> G4 P0.
ok
> G4 P0
ok
> G4 P0.4 (line=6)
ok
> G4 P0.4 (line=6
ok
> G4 P0.4 line=6)
error:2 (Bad number format)
> G4 P0.4 (line=6)
ok
> G4 P0. (line=6)
ok
> G4 P0.4 (line=6)
ok
> G4 P0.4 line=6)
error:2 (Bad number format)
> 4 P0.4 (line=6)
error:1 (Expected command letter)
>