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: Structured PVs archiving and archived data retrieval problem |
From: | Aleš Kete via Tech-talk <tech-talk at aps.anl.gov> |
To: | "mdavidsaver at gmail.com" <mdavidsaver at gmail.com> |
Cc: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Fri, 28 Mar 2025 07:26:11 +0000 |
On 3/17/25 04:46, Aleš Kete via Tech-talk wrote:
Hello everyone,
(I am pretty new to EPICS software ecosystem and am trying to learn about typical workflows for acquiring and archiving data through EPICS.)
To start, I have two questions:
* How complete is support for structured PVs in EPICS archiver appliance and aaclient tools (more details below)?Unless specifically handled in Archiver Appliance code, arbitrary PVA Structures can only be stored and retrieved verbatim. So most (all?) of the binning and statistical operations can not be used.
* Is there (also some other) standard tool for archiving EPICS data?There are standard tools for the standard data types. Primarily the scalar and simple array types (NTScalar and NTScalarArray).
With NTTable, there is also some ambiguity on how to interpret. eg. I wrote one tool which subscribes to an NTTable PV, then treats each update as additional rows to be appended to one very long table. In this case, that does not seem like what you are looking for. So, I don't have a recommendation for an out-of-the-box solution.
Some context from which the questions arose:
We are working on custom record type support for PVs providing multi-channel signal acquisitions, we added support (via qsrv / qsrv2) for obtaining data through PV structured according to epics:nt/NTTable:1.0 specification.
If you are working in the context of QSRV1/2, I would suggest configuring Archiver Appliance to record the individual waveform/aai records. If you can arrange that each one updates with exactly matching timestamps (eg. copied with the TSEL link), that would provide sufficient information to reconstruct on retrieval. Still extra work though.
Same behavior was observer, however, using "Tbl" PV from pva2pva's iocimagedemo.
We have trouble using EPICS Archiver (https://github.com/archiver-appliance/epicsarchiverap, v2.0.7, deployed using Docker singletomcat image): despite data being archived,it cannot be viewed using built-in viewer,To my knowledge, none of the Archiver Appliance viewers/clients know how to handle arbitrary Structures.
nor can we retrieve data using aaclient tools (v0.0.3, https://github.com/mdavidsaver/aaclient) - segfault occurs.
oops. https ://github.com/mdavidsaver/aaclient/issues/1
That said, I'm not sure how this case should be handled. So in the short term, I will just make this fail more obviously.
$ aaget ioc7:signals:dod:pvaSegmentation fault (core dumped)$ aah5 test.h5 ioc7:signals:dod:pvaINFO:aaclient.cmd.h5:Writing /home/ales/test.h5free(): corrupted unsorted chunksAborted (core dumped)
From PV details page in EPICS Archiver appliance:
Archiver DBR type (from typeinfo): DBR_V4_GENERIC_BYTES
Archiver DBR type (initial) DBR_V4_GENERIC_BYTES
Is this a scalar: YesNumber of elements: 1
Data can be retrieved using PVA CLI tools, pvaPy and p4p.
$ pvinfo ioc7:signals:dod:pvaioc7:signals:dod:pvaServer: 10.0.6.13:5075Type:epics:nt/NTTable:1.0structure recordstructure _optionsint queueSizeboolean atomicalarm_t alarmint severityint statusstring messagetime_t timeStamplong secondsPastEpochint nanosecondsint userTagstring[] labelsstructure valueshort[] Ashort[] Bshort[] Cshort[] D
$ pvget ioc7:signals:dod:pvaioc7:signals:dod:pva 2025-03-14 10:17:41.584A B C D108 9 118 102108 10 119 102111 11 121 105108 9 119 102104 6 115 98106 7 116 99108 9 119 102...>>> from p4p.client.thread import Context >>> ctxt = Context('pva')
>>> sub = ctxt.monitor('ioc7:signals:dod:pva', lambda pv: print(pv.value['A'][1:5])) >>> [109 110 109 106] [109 108 105 108] [105 108 111 106] [110 108 104 105] [109 107 107 112] [106 102 110 112] [105 109 110 105] ... >>> sub = c.close() ...
Any information or directions for continuing will be appreciated,
BR, Ales