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  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Fwd: question about ca arrays
From: Ned Arnold <[email protected]>
To: [email protected]
Date: Wed, 28 May 2008 13:27:26 -0500


Begin forwarded message:

From: Ned Arnold <[email protected]>
Date: May 28, 2008 1:27:11 PM CDT
To: Matthieu Bec <[email protected]>
Subject: Re: question about ca arrays

Matthieu -

I don't think either of the test clients are guaranteed to get consistent data.  Since the arrays are not buffered (as you correctly recall), if the delivery of the array to the client gets delayed for some reason, the next packet could be overwriting the buffer as the ca server is sending it. 

To avoid a similar problem, the sscan record (available in modules/soft) uses a double buffer for a single array field so that one may be written as the other is served up via the ca server (look for A_BUFFER/B_BUFFER).  Something like this would give you more confidence, but once again would not be guaranteed unless you added some "has-been-delivered-tokens" and designed appropriate exception handling .

HTH -

   Ned


On May 28, 2008, at 12:24 PM, Matthieu Bec wrote:


Hi all,

I setup an epics x86-ioc attached to a tcp server, the ioc listens to known size packets from the server and fills an epics waveform record with the data. The packets are ~21kB and update at ~50Hz, our clients have EPICS_CA_MAX_ARRAY_BYTES set.

One of our user reported seeing intermittent corrupt values, the rate is highly unpredictable: one bad sample every few seconds to few minutes.

I setup two minimal test clients to check what was happening -

1. one polling ca_get (which is how my user implemented his client app)
2. another using ca_monitor

(1) reproduce the problem while (2) appears trouble free.

I remember reading a post on tech-talk about string/array not being buffered and thought that might explain the issue with (1), something like concurrent read/write maybe. Could this be the issue?

Also, I was wondering if (2) is guaranteed to be consistent? Do I need to put something else in place so every single waveform update will be consistent.

Thanks,
Matthieu

--
Matthieu Bec              Gemini Observatory
Tel: +56 51 205785        c/o AURA, Casilla 603
Fax: +56 51 205650        La Serena, Chile



Replies:
Re: Fwd: question about ca arrays Matthieu Bec

Navigate by Date:
Prev: question about ca arrays Matthieu Bec
Next: Power Supply Info Ahed Aladwan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: question about ca arrays Matthieu Bec
Next: Re: Fwd: question about ca arrays Matthieu Bec
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·