Closed yihan0512 closed 2 years ago
Could you provide a use case for this? Couldn't you just queue in the next command? Which will be executed upon termination of the first
@rockstorm101 it's for a research project. I'm recording some sensor data while the head is moving. Below is the workflow I'm doing:
for loop
1. randomly position the head
2. start recording
3. execute a gcode command
4. stop recording
end
I need to know when step 1 is finished so I can start recording. A workaround I came up with is to wait long enough to let step 1 finish. But I figure it'd be great if I can get feedback from the printer.
Send this https://marlinfw.org/docs/gcode/M400.html and by the time you receive its 'ok' the move should be done, I guess.
For this kind of application I usually send_now two M400s in a row and check when the queue is empty (printrun.priqueue.empty()).
Hello, I'm controlling a Lulzbot TAZ 6 with printcore. I use p.send_now() to send individual gcode command (e.g. G01 X100 Y100) to the printer (to move the head). My question is: would it be possible to check (using the printcore API) if the printer has done moving the head?