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  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  <20222023  2024  2025 
<== Date ==> <== Thread ==>

Subject: Re: NTNDArray with attributes using QSRV group Pas
From: "Kasemir, Kay via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>, Joao Paulo Martins <JoaoPaulo.Martins at ess.eu>
Date: Wed, 2 Nov 2022 14:28:30 +0000
I think this shows that the "info(Q:group, ..." approach may not be the one, only and final way to assemble information from records into custom PV Access data structures.

Info tags can be useful to configure a simple aggregation of records into a combined data type. But if we then want to control the exact naming and layout of the resulting structure, add details about the order of timing, time stamps, .. we're starting to invent a new programming syntax. At that point, maybe it's better to fall back to an existing programming syntax like python or lua. We can already create custom PVA data structures from python, maybe tying that into the IOC's record processing is a better approach for creating fully custom data structures?

From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Joao Paulo Martins via Tech-talk <tech-talk at aps.anl.gov>
Sent: Wednesday, November 2, 2022 10:04 AM
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: [EXTERNAL] NTNDArray with attributes using QSRV group Pas
 

Hello,

 

I’m trying to instantiate a NTNDArray with some NTAttributes in my IOC using QSRV group PV definitions, as the example in pva2pva (https://github.com/epics-base/pva2pva/blob/master/iocBoot/iocimagedemo/image.db ).

 

If I set the database as the following:

 

record(waveform, "$(P)ArrayData") {

    field(FTVL, "USHORT")

    field(NELM, "262144")

    info(Q:group, {

        "$(N):Array":{

            +id:"epics:nt/NTNDArray:1.0",

            "value":{+type:"any",

                     +channel:"VAL",

                     +trigger:"*"},

            "":{+type:"meta", +channel:"SEVR"}

        }

    })

}

 

record(mbbi, "$(P)FOO") {

    info(Q:group, {

        "$(N):Array":{

            "attribute[0].value":{+type:"any", +channel:"VAL"},

            "attribute[0].timeStamp":{+type:"meta", +channel:"TIME"}

 

        }

    })

}

 

the resulting NTNDArray PV will have the following structure in its attribute[0] field:

 

structure

            structure timeStamp

                alarm_t alarm

                    int severity 0

                    int status 0

                    string message NO_ALARM

                time_t timeStamp

                    long secondsPastEpoch 1667394506

                    int nanoseconds 335496073

                    int userTag 0

            any value

                double  0

 

The timeStamp values of the top structure are correctly taken from the “ArrayData” record. However, for the “attribute[0]” field, the timestamp values are taken from the “FOO” record, but the structure of the NTAttribute contains two other structures (alarm and timeStamp) inside the “top” timeStamp structure.

 

The question is: how one can set the “timeStamp” structure of the attribute[] taking the TIME information from a different record than the one used to get the array value?

 

Thanks in advance!

 

João Paulo Martins

European Spallation Source ERIC


Replies:
Re: NTNDArray with attributes using QSRV group Pas Veseli, Sinisa via Tech-talk
Re: NTNDArray with attributes using QSRV group Pas Michael Davidsaver via Tech-talk
References:
NTNDArray with attributes using QSRV group Pas Joao Paulo Martins via Tech-talk

Navigate by Date:
Prev: Phoebus and dynamic macros GAGET Alexis via Tech-talk
Next: Re: Phoebus and dynamic macros Kasemir, Kay 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  2025 
Navigate by Thread:
Prev: NTNDArray with attributes using QSRV group Pas Joao Paulo Martins via Tech-talk
Next: Re: NTNDArray with attributes using QSRV group Pas Veseli, Sinisa 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  2025 
ANJ, 02 Nov 2022 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions ·
· Download · Search · IRMIS · Talk · Documents · Links · Licensing ·