Asking machine about motion status
If you send G1 or any other motion commands those are buffered for good reasons.
I'm doing a pick and place machine with 2 board setup and need to know if the machine has reached it's target position before issuing a depending command to the other board.
Is there any way to ask the machine for the size of the motion buffer, or wait until everything before had been processed?
I'm doing a pick and place machine with 2 board setup and need to know if the machine has reached it's target position before issuing a depending command to the other board.
Is there any way to ask the machine for the size of the motion buffer, or wait until everything before had been processed?
Comments
It is so obvious, at least in the sourcecode.
The reason is that the first M400 sends the ok before it waits.
So in respect of the gcode stream itself it works, but the client still has no idea if the target position is reached.
It is the second M400 (or any other command), which returns its ok after the first M400 finished and I assume this only works because GCODE_BUFFER_SIZE is set to 1.
For me the workaround is good enough, but I'm not sure if this is intended.
Reading the sourcecode it might be difficult to change.