Use wait_complete() to wait for the probe move to finish, then look at
the probe result parameters (#5070 and #5061-#5069) to see the result.

Parameter info here:

http://linuxcnc.org/docs/2.7/html/gcode/overview.html#sub:numbered-parameters

Unfortunately it's a bit awkward to read interpreter parameters
anywhere outside of the interpreter itself...  In python you could mdi
('(debug, probe result is: #5070)'), then poll the
linuxcnc.error_channe() and look at the result there.

On Sat, Dec 8, 2018 at 8:41 AM Chris Morley <chrisinnana...@hotmail.com> wrote:
>
> 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
> Emc-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-developers



-- 
Sebastian Kuzminsky


_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to