1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 <2014> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 <2014> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Processing a record a in loop |
From: | Mark Rivers <[email protected]> |
To: | "'David Michel'" <[email protected]> |
Cc: | EPICS mailing list <[email protected]> |
Date: | Wed, 3 Sep 2014 15:15:09 +0000 |
> Though all I can see from it is: > [timestamp] [ip:port] read 3 > [timestamp] [ip:port] write 5 That is because you have not set the ASYN_TRACEIO_ESCAPE in asynTraceIO Here is how to do it in your startup script any time after the asyn port is created: #This sets ASYN_TRACEIO_ESCAPE(=2) asynSetTraceIOMask(“myPort”, 0, 2) # This sets ASYN_TRACE_ERROR (=1) and ASYN_TRACEIO_DRIVER (=8)
asynSetTraceMask(“myPort”,0,9) Once you do that you should see that actual data being sent and received as well. Mark From: David Michel [mailto:[email protected]]
Hi Mark, >I don’t think you need to do anything to guarantee that you will not send a request until the first one returned; that is the way asynchronous record processing with StreamDevice works. Fair enough. To be honest, I wasn't entirely sure of that thus me trying to level my doubts. >Are you aware of the asynTrace facility? No, I wasn't - thanks for that! Though all I can see from it is: [timestamp] [ip:port] read 3 [timestamp] [ip:port] write 5 ... So not learning much from this David On 3 September 2014 15:14, Mark Rivers <[email protected]> wrote: > So no evidence... but that's why I wanted to try only sending a request after the first one returned to see if that fixes it. I don’t think you need to do anything to guarantee that you will not send a request until the first one returned; that is the way asynchronous record processing with StreamDevice
works. Once the record sends a request the record is busy (PACT=1) until it either gets a response or times out. If I understand what you are worried about it is that EPICS could send a second request (“Done?”) before the first one returns a response or
times out. But that should not happen. Thus if your record is processing with 0.1 second and the response takes 0.2 second then it will not process the record again until the previous processing is complete. Are you aware of the asynTrace facility? I would highly recommend that you set the ASYN_TRACEIO_DRIVER and ASYN_TRACEIO_ESCAPE bits on the underlying asyn port. That way you will
see all of the communication to and from the device, including time stamps. > Not sure what I would learn from using asyn directly ? Are you thinking of ruling out (or not!) streamdevice as the cause of the issue? Yes, but as I said I think that you will see the same behavior. Mark From: David Michel [mailto:[email protected]]
Hi David, Good point about the buffer filling up vs. restarting the IOC... The buffer being full was simply a speculation of mine as to what might be going on... but you're right, restarting
the IOC would not be affecting this of course. So no evidence... but that's why I wanted to try only sending a request after the first one returned to see if that fixes it. I think I've managed to do this using the EVENT record... but the problem still persists, so it might not be the device's buffer after all... Not sure what I would learn from using asyn directly ? Are you thinking of ruling out (or not!) streamdevice as the cause of the issue? David p.s. when I say "custom"... I mean a non commercial product made by 3rd party suppliers... nothing that I have direct control of. Just trying to work things out before contacting
them.
On 3 September 2014 13:39, Mark Rivers <[email protected]> wrote: Hi David,
But in your last message you said: That does not really make sense to me. If the device buffer is full why does restarting the IOC fix the problem? How does the device know that you did that?
On 3 September 2014 13:08, Mark Rivers <[email protected]<mailto:[email protected]>>
wrote: From:
[email protected]<mailto:[email protected]> [[email protected]<mailto:[email protected]>]
on behalf of David Michel [[email protected]<mailto:[email protected]>] Sent: Wednesday, September 03, 2014 6:02 AM |