GCode Live modification
-
What is the best way to integrate a control loop algorithms in the duet firmware. This algorithm should be able to more or
less modify life, the gcode. I am fine with having a delay of e.g. a defined buffer size before the new/modified gcode takes action.I tried out modifying the gcode or deleting it during the print. But It looks like you are using a huge buffer or writing the gcode to a different location during print.
Streaming the gcode in the sense of sending it command by command might be a bit slow I guess?
-
@qurt I think it would need to be modified before it gets to the command queue, as it's very difficult to modify anything once it gets there. For more information on how the command queue works, see https://docs.duet3d.com/en/User_manual/Reference/Gcodes#command-queueing
You can shorten the command queue for quicker response to changes that you are streaming in, using M595.
But the shorter the queue, the more likely buffer starvation will occur. If you are streaming Gcode over USB, see Printing over USB connection for other limitations.
Ian