I noticed a problem when running files from an SD card that contain non gcode characters.
If you have any comments or other characters not normally found in gcode you will get errors that result in stopping the job. This is due to how the data from the SD is processed.
Data from other sources is read a character at a time. Once a line end is found it is send to the gcode processor. The SD card feature sends a full line at a time to the gcode processor.
The character at a time does some clean up to remove illegal characters. Since the SD feature skips that process, illegal characters will be sent to the gcode processor. This should be a simple fix, but will take some time to implement and test.
Until there is a fix, just manually strip any problem lines from your gcode if you plan to use the SD card.
#1 – bdring 于 2019-04-28
It turns out the only issues was the handling of a % at the beginning of the file. I had the SD card feature ignore that.
I also had issues with M6 (tool change) causing Grbl to generate an error. I added a handler for that. Right now, M6 will only pop out a [MSG: Tool Change] and Tx will pop out a message [MSG:Tool No: x]. These messages go to all clients.
I’ll push this to the devt branch soon.