I am working on some probing routines in qtvcp.
I am calling an MDI command to probe and then using the command,
wait_complete()

wait_complete can return some status info (from docs):
Return -1 if timed out, return RCS_DONE or RCS_ERROR according to command 
execution status.

RCS_ERROR seems to only give errors if the Gcode syntaxt is wrong, not if the 
command
finished in error.

The usual way to catch errors is to poll the error channel but if I do that 
then the usual error
consuming code misses the error (errors can be consumed by only one object)
Because of the probing function is in the same thread as error checking, i 
can't catch the
error untill it's too late.

I tried adding:
emcmotStatus->commandStatus = EMCMOT_COMMAND_INVALID_COMMAND;
to the probing code in control.c to no joy.
I can't seem to find where wait_complete's RCS return codes are generated.

It seems silly to be able to wait for a command to finish but to not know if it 
errored.
Any ideas how this could be added?
In this case I don't need to know what the error was, just that there was one, 
but
of course knowing what the error was could be useful too.

Chris Me

_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to