I'm using emcrsh to control EMC programmatically.

Socket 1 is for primary communication.  It opens at program start, and
is where MDI commands get sent.

Socket 2 is only for aborting the current process.  It opens at
program start, and whenever the current command needs to be aborted,
it sends the appropriate commands and aborts.

So my program goes along, sending commands over socket 1 until there
is an event that requires an abort, and then it aborts over socket 2.

For reasons that I can explain if necessary, both sockets are set to
SET_WAIT DONE, so they block until the current command is finished.  I
need it to work this way.

My problem: occasionally socket 1 never gets a return value from a
command that was pending when an abort happened.  This leaves the
socket in a blocked state and further communication (after the abort
is finished) fails.

Example:

socket 1: SET MDI G1 x1 y1 f10 (takes a while)
socket 2: SET ENABLE pwd
socket 2: SET SET_WAIT DONE
socket 2: SET ABORT (machine immediately stops)
socket 1: SET MDI ACK (socket 1 gets its ACK and can move on to the next thing)

This is how it should work and is how it usually works.

But occasionally that last SET MDI ACK never happens.

Any ideas?  I'm pretty stuck and not sure what to try next.  Not even
sure if it's my problem or EMC.  I tried setting a timeout on socket 1
of 10 seconds, and sure enough, I get a timeout error on those times
where I never get that last response after the abort, so I'm at least
pretty sure this is where my problem is.

thanks!

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

Reply via email to