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  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: Using AD plugins on asyn port
From: Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
To: Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>, "Johnson, Andrew N." <anj at anl.gov>, "Pearson, Matthew" <pearsonmr at ornl.gov>, "tech-talk at aps.anl.gov" <Tech-talk at aps.anl.gov>
Date: Wed, 23 Jul 2025 13:11:52 +0000
Hi Abdalla,

After your primary IOC should have sent waveforms to the NDSA driver, but before you start acquire in the NDSA driver please send the output of this command in the NDSA IOC:

dbpr NDSA:cam1:ArrayIn 2

And from a Linux shell do:

caget NDSA:cam1:ArrayIn

Mark



From: Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Sent: Wednesday, July 23, 2025 4:20 AM
To: Mark Rivers <rivers at cars.uchicago.edu>; Johnson, Andrew N. <anj at anl.gov>; Pearson, Matthew <pearsonmr at ornl.gov>; tech-talk at aps.anl.gov <Tech-talk at aps.anl.gov>
Subject: RE: Using AD plugins on asyn port
 

Hi all

 

Thanks for the feedback, I created an IOC with NDDriverStdArrays support, attached is the startup file. The ArrayIn PV is receiving data from my waveform record through an intermediate ‘aao’ record in the attached nd.db database, where the DOL field is set to a waveform of size 200 scanned at 1 second. The IOC boots but when I press acquire on the GUI, the IOC segfaults immediately. I added the gdb output of loading the core dump at the end of the startup file, it always crashes here: https://github.com/areaDetector/NDDriverStdArrays/blob/master/NDDriverStdArraysApp/src/NDDriverStdArrays.cpp#L259 . I used the IOC in the source code but I got the same segfault at the same location. Could it be related to the fact that the array size is 0? I also attached a screenshot of the NDDriverStdArrays UI file. Am I missing something?

 

Best Regards,

Abdalla Al-Dalleh

Control Engineer

SESAME

 

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Tuesday, July 22, 2025 7:37 PM
To: Johnson, Andrew N. <anj at anl.gov>; Pearson, Matthew <pearsonmr at ornl.gov>; tech-talk at aps.anl.gov; Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Subject: RE: Using AD plugins on asyn port

 

That’s a very useful addition.

 

Whether it can be used with NDDriverStdArrays depends on the behavior of the input waveform record you are copying via the aao record.  If it only posts monitors when the waveform is “done” then it could work.  But in some applications the input waveform may process many times with “intermediate results” before it is really done.  One example would be a waveform digitizer with relatively slow sample rate.  The waveform record may be processing multiple times during an acquisition so the operator can see the waveform trace update before it is complete.  Another example is an MCA spectrum which is acquiring for a relative long time.  The waveform will update during acquisition so the operator can see the waveform amplitude grow.  In these cases you probably don’t want the intermediate values of the waveform to be sent to NDDriverStdArrays, you only want to write the final value.  That is where a more sophisticated CA client may be needed.

 

Mark

 

 

From: Johnson, Andrew N. <anj at anl.gov>
Sent: Tuesday, July 22, 2025 11:14 AM
To: Pearson, Matthew <
pearsonmr at ornl.gov>; Mark Rivers <rivers at cars.uchicago.edu>; tech-talk at aps.anl.gov; Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Subject: Re: Using AD plugins on asyn port

 

You can use an aao (array analog output) record to read array data from another record using the DOL input link and write it through the OUT output link to another record. The DOL and OMSL fields were added to it in EPICS 7.0.7.

 

- Andrew

 

-- 

Complexity comes for free, Simplicity you have to work for.

On 7/22/25, 10:24AM, "Tech-talk" <tech-talk-bounces at aps.anl.gov> wrote:

 

Hi,

 

Apologies, I haven’t used that driver myself, and I assumed it would work like the pvaDriver. Mark is right, seems like you need an extra step to copy the waveform data into ArrayIn. One other option might be an array subroutine record.

 

Cheers,

Matt

 

From: Mark Rivers <rivers at cars.uchicago.edu>
Sent: Tuesday, July 22, 2025 8:43 AM
To: Pearson, Matthew <
pearsonmr at ornl.gov>; tech-talk at aps.anl.gov; Abdalla Ahmad <Abdalla.Ahmad at sesame.org.jo>
Subject: [EXTERNAL] Re: Using AD plugins on asyn port

 

Hi Abdalla, it is exactly what I need, but it is still unclear how it interfaces with my existing waveform record, i.e. How to pass data from my waveform record to $(P)$(R)ArrayIn. My waveform record already has its INP field set to read input

Hi Abdalla,

 

·          it is exactly what I need, but it is still unclear how it interfaces with my existing waveform record, i.e. How to pass data from my waveform record to $(P)$(R)ArrayIn. My waveform record already has its INP field set to read input from a compress record doing circular buffer at 200 Hz from the hardware.

 

You probably need to use some additional code, for example in Python or SNL.  That code will read from your existing waveform record and write to ArrayIn.  It can also configure the other records in NDDriverStdArrays, and decide when to copy the waveform record.  For example, it may only copy when the waveform record is "full", not on each incremental update.

 

There are examples of Python and IDL code in the NDDriverStdArrays repository.

 

Mark

 


From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Abdalla Ahmad via Tech-talk <tech-talk at aps.anl.gov>
Sent: Tuesday, July 22, 2025 1:58 AM
To: Pearson, Matthew <
pearsonmr at ornl.gov>; tech-talk at aps.anl.gov <Tech-talk at aps.anl.gov>
Subject: RE: Using AD plugins on asyn port

 

Thanks Matt, it is exactly what I need, but it is still unclear how it interfaces with my existing waveform record, i.e. How to pass data from my waveform record to $(P)$(R)ArrayIn. My waveform record already has its INP field set to read input from a compress record doing circular buffer at 200 Hz from the hardware.

 

Best Regards,

Abdalla Al-Dalleh

Control Engineer

SESAME

 

From: Pearson, Matthew <pearsonmr at ornl.gov>
Sent: Monday, July 21, 2025 5:01 PM
To: Abdalla Ahmad <
Abdalla.Ahmad at sesame.org.jo>; tech-talk at aps.anl.gov
Subject: RE: Using AD plugins on asyn port

 

Hi Abdalla,

 

This might be what you need:

https://areadetector.github.io/areaDetector/NDDriverStdArrays/NDDriverStdArraysDoc.html

 

It monitors a waveform record and can turn it into an NDArray, which can then be processed by other areaDetector plugins as needed. It doesn’t connect to the Asyn port that is producing the waveform data directly, but instead sets up a channel access monitor.

 

Cheers,

Matt

 

From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Abdalla Ahmad via Tech-talk
Sent: Monday, July 21, 2025 3:14 AM
To:
tech-talk at aps.anl.gov
Subject: [EXTERNAL] Using AD plugins on asyn port

 

Hi Is there a way to apply AD plugins on a waveform record processed from asyn port without rewriting an asynNDArrayDriver class? i. e. , something to be done in the st. cmd maybe? Best Regards, Abdalla Al-Dalleh Control Engineer SESAME ‍ ‍ ‍ ‍ ‍ ‍

 

Hi

 

Is there a way to apply AD plugins on a waveform record processed from asyn port without rewriting an asynNDArrayDriver class? i.e., something to be done in the st.cmd maybe?

 

Best Regards,

Abdalla Al-Dalleh

Control Engineer

SESAME

 


Replies:
RE: Using AD plugins on asyn port Abdalla Ahmad via Tech-talk
References:
Using AD plugins on asyn port Abdalla Ahmad via Tech-talk
RE: Using AD plugins on asyn port Pearson, Matthew via Tech-talk
RE: Using AD plugins on asyn port Abdalla Ahmad via Tech-talk
Re: Using AD plugins on asyn port Mark Rivers via Tech-talk
RE: Using AD plugins on asyn port Pearson, Matthew via Tech-talk
Re: Using AD plugins on asyn port Johnson, Andrew N. via Tech-talk
RE: Using AD plugins on asyn port Mark Rivers via Tech-talk
RE: Using AD plugins on asyn port Abdalla Ahmad via Tech-talk

Navigate by Date:
Prev: RE: Using AD plugins on asyn port Abdalla Ahmad via Tech-talk
Next: Support for DBR_INT64 missing in caget/camonitor? Heinz Junkes (FHI) 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  2022  2023  2024  <2025
Navigate by Thread:
Prev: RE: Using AD plugins on asyn port Abdalla Ahmad via Tech-talk
Next: RE: Using AD plugins on asyn port Abdalla Ahmad 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  2022  2023  2024  <2025
ANJ, 24 Jul 2025 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·