EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Processing a record a in loop
From: David Michel <[email protected]>
To: Mark Rivers <[email protected]>
Cc: EPICS mailing list <[email protected]>
Date: Wed, 3 Sep 2014 13:24:21 +0100
Adjusting the time is the first thing I tried of course... but although the typical response time is very short, i.e. a couple of ms, after a while, I get the "No reply from device within x ms" even with a timeout set to something ridiculous like 10000ms

The protocol is very simple:

are_you_done {
    out "done?";
    in "%b";
}

used with a BI record.

I just tried to use an EVENT record: i.e. FWDLINK the BI record to the EVENT record and set the SCAN field of the BI record to that event... but same error eventually comes up.

The only remedy is to kill and restart the IOC.

David



On 3 September 2014 13:08, Mark Rivers <[email protected]> wrote:
What is the maximum/typical time between when you send a query and receive a response?

You should be able to set the timeout to a value just longer than the maximum and then you can process the record with any fixed rate (1 seconds, 10 seconds, etc.).  The record will be busy (PACT=1) if the next scan interval happens before the reply from the previous one.  So it will not keep sending query messages, it will wait for a reply before proceeding.

What does your protocol file look like?  Is it a single query per response, etc.?

Mark

________________________________
From: [email protected] [[email protected]] on behalf of David Michel [[email protected]]
Sent: Wednesday, September 03, 2014 6:02 AM
To: EPICS mailing list
Subject: Processing a record a in loop


Hi All,

I'm using StreamDevice to talk to a custom device that doesn't support I/O interrupt so one has to keep sending commands to it to get status information.

Problem is that after a while (~ couple of hours), the device's buffer fills up and doesn't reply anymore. Increasing the ReplyTimeOut improves things slightly, but the problem still eventually occurs.

One potential solution would be to send the next command only once the previous one has returned in a loop (instead of using a set frequency).

Making the record FWD link to itself doesn't seem to do it... I started something using purely database trickery with a FANOUT record set with a fixed SCAN field and disabling it depending on whether the streamdevice record has finished processing or not... but it's getting messy

Is there an elegant way of doing this?

David






Replies:
RE: Processing a record a in loop Mark Rivers
References:
Processing a record a in loop David Michel
RE: Processing a record a in loop Mark Rivers

Navigate by Date:
Prev: Re: synApps_5_7 build error on Windows 8.1 x64 Zachary Brown
Next: RE: Processing a record a in loop Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Processing a record a in loop Mark Rivers
Next: RE: Processing a record a in loop Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·