While running over BlueTooth via Grbl Controller on Android, the job was pausing a few lines before the end.
I noticed the last line sent was G4 P0.05. That was not in the original gcode. Grbl Controller was adding G4 P0.05 at certain points. G4 is a dwell, so that line says to pause for 50 milliseconds. The real intent is to sync the planner. Grbl will process all moves in the planner before executing a delay.
It was an experiment that got left in the Grbl controller code. There is a an Issue about it here.
Strangely there is also a G4 at the beginning of the code that did not cause a problem. That comes before any moves, so the planner is already empty.
Regardless, this needs to be fixed in the firmware because that is legal gcode.
#1 – buildlog 于 2018-08-02
Grbl Controller has been updated to no longer inject the gcode. I have tested gcode files with hundreds of G0 P0.05 and other durationson the lastest version of the firmware and there are no issues.
Closing