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  2014  2015  2016  2017  2018  2019  2020  2021  <20222023  2024  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  <20222023  2024 
<== Date ==> <== Thread ==>

Subject: Re: areaDetector synchronization question
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: EPICS Tech Talk <tech-talk at aps.anl.gov>, Ralph Lange <ralph.lange at gmx.de>
Date: Wed, 17 Aug 2022 13:25:55 +0000
Hi Jörn,

I want to read the ArrayData from the NDStdArrayPlugin and the Centroid and
> Profile information from the NDStatsPlugin at a rate of 10Hz.

In general I agree with Ralph, pvAccess is better because the image and the attributes are part of the same structure.  Here is how to set up the plugin chain:

camera -> NDPluginStats -> NDPluginPva

In NDPluginStats you create an attributes XML file that defines the Centroid as a PARAM attribute to attach to the NDArray.  That means it reads the attribute directly from the NDPluginStats plugin, not using Channel Access.  There is an example of such a file here:
Then the Centroid will be an attribute that is part of the pvAccess NTNDArray structure.

However, there is a problem for your application, because you said you also want to read the Profile information.  The Profile is an array, and currently NDAttributes are limited to being scalar values and strings.  That means you cannot pass the Profile data as an attribute in the NDArray.

If you use Channel Access do the following:
  • Put monitor callbacks on the ArrayData from the NDPluginStdArrays image data, the UniqueID from both plugins, and the Centroid and Profile values.
  • In the monitor callback for that ArrayData capture the most recent callback values for the UniqueID, Centroid, and Profile PVs.
  • I think this is likely to give you synchronized data at 10 Hz, but of course it is not guaranteed.
Mark


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Ralph Lange via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, August 17, 2022 7:58 AM
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: Re: areaDetector synchronization question
 
On Wed, 17 Aug 2022 at 14:46, Jörn Dreyer via Tech-talk <tech-talk at aps.anl.gov> wrote:

If I read the unique id from both plugins and make sure the are the same, how
big is the chance that the data does not match if I read them in two threads
(thread 1: the  image, thread 2: the stats information)?

Would the situation improve if I can remove the gateway process?

The one thing that would remove the issue:
Use pvAccess, where the stats and the image are part of the same structure, and the client is guaranteed to get consistent updates.
If you are exporting into a different protocol anyway, the difference shouldn't be that much. In terms of being future-proof, it would be a big step forward.

Cheers,
~Ralph


References:
areaDetector synchronization question Jörn Dreyer via Tech-talk
Re: areaDetector synchronization question Ralph Lange via Tech-talk

Navigate by Date:
Prev: Re: areaDetector synchronization question Shen, Guobao via Tech-talk
Next: Re: RTEMS 5 Cannot Read Event Generator Andrew Johnson via Tech-talk
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  <20222023  2024 
Navigate by Thread:
Prev: Re: areaDetector synchronization question Shen, Guobao via Tech-talk
Next: EPICS for a small lab - overkill? Sean Leavey - STFC UKRI via Tech-talk
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  <20222023  2024 
ANJ, 14 Sep 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·