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  <2026 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  <2026
<== Date ==> <== Thread ==>

Subject: Re: 回复: Re: Archiver Appliance cannot archive structured PV data
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: "lvhh at sari.ac.cn" <lvhh at sari.ac.cn>
Cc: tech-talk <tech-talk at aps.anl.gov>
Date: Fri, 3 Jul 2026 08:23:54 -0700
On 7/3/26 3:17 AM, lvhh--- via Tech-talk wrote:
Hi all,

...
info(0:group,
"DEVITEST:waveStruct":{
     "shot id":{+channel:"VAL"}
}

})
}

I use pva://DEVITEST:waveStruct to add to AA.
But this PV remains stuck in the initial sampling state, and no error logs are generated during the process.


Have you also run:


pvinfo DEVITEST:waveStruct


This is what AA sees.


The core point is this.  PVAccess protocol allows you to define arbitrary structures, such as the one you show with a single sub-structure named "shot it".  However, general purpose client applications like AA do not know how to interpret an arbitrary structure.  AA needs to be able to extra one time from each update.  The type definition you have does not provide this.  So AA can do nothing other than get "stuck".


The NT (Normative Type) definitions are meant to define some common structure understood by general purpose applications.  In the case of AA the primary one are NTScalar and NTScalarArray.  These are the type definitions which QSRV exports by default.  Try running:


pvinfo DEVITEST:shotID


You will see a field "value", also sub-structures "alarm" and "timeStamp".


Sky's previous reply mentions "timestamp".  He is referring to the "timeStamp" sub-structure, which is the absolute minimum which must be provided for AA (a time series archiver) to extract meaning from the value of a PV.


Another version of the link which Sky provided is:


https://docs.epics-controls.org/en/latest/pv-access/Normative-Types-Specification.html#ntscalar


Another link which may be informative:


https://epics-base.github.io/pvxs/nt.html





Thanks a lot for any suggestions.
Best regards,

Huihui


 
发件人: Sky Brewer
发送时间: 2026-07-01 14:38
主题: Re: Archiver Appliance cannot archive structured PV data
Hi Huihui,

The archiver does support custom structures but they must follow the format https://github.com/epics-docs/epics-docs/pull/182/changes 

Youll note here the timestamp, the timestamp is what looks to be the problem in the error log. 

Hope that helps.
Sky

Sent from Outlook for Mac
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of 吕慧慧 via Tech-talk <tech-talk at aps.anl.gov>
Date: Wednesday, 1 July 2026 at 04:39
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Archiver Appliance cannot archive structured PV data



Hi all,

I have implemented a structured PVA data in an EPICS V7 IOC. The db is as follows:

record(longin, "DEV1:RED:SHOT_ID_TEST") {
    field(DTYP, "PSC Reg")
    field(INP , "@$(NAME) 526 2")
    field(SCAN, "I/O Intr")
    field(TSE , "-2")
    info(Q:group, {
        "DEV1:RED:WAVE_TEST_PVA": {
            "COUNT": {
                +channel:"VAL"
            }
        }
    })
}

record(waveform, "DEV1:RED:WAVE_TEST_C1") {
    field(DTYP, "PSC Block I16 In")
    field(INP , "@$(NAME) 8193")
    field(SCAN, "I/O Intr")
    field(FTVL, "DOUBLE")
    field(NELM, "20000000")
    info(Q:group,{
        "DEV1:RED:WAVE_TEST_PVA": {
            "VALUE": {
                +channel:"VAL"
            }
        }
    })
}

When I try to archive this PV using the pva://pvname prefix in Archiver Appliance, the archiver throws error messages  and cannot establish persistent archiving. 


2026-06-30 15:48:19,766 ERROR [JCA Command Thread 9] pv.EPICS_V4_PV (EPICS_V4_PV.java:241) - Cannot determine the timestamp bitset for PV DEVI:RED:WAVE_TEST_PVA. This means we may not save any data at all for this PV
2026-06-30 15:48:19,767 ERROR [JCA Command Thread 9] pv.EPICS_V4_PV (EPICS_V4_PV.java:442) - exception when reading pv
java.lang.reflect.InvocationTargetException: null
at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:72) ~[?:?]
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:486) ~[?:?]
at org.epics.archiverappliance.engine.pv.EPICS_V4_PV.fromStructure(EPICS_V4_PV.java:278) ~[classes/:?]
at org.epics.archiverappliance.engine.pv.EPICS_V4_PV.subscribe(EPICS_V4_PV.java:438) ~[classes/:?]
at org.epics.archiverappliance.engine.pv.EPICS_V4_PV.handleConnected(EPICS_V4_PV.java:388) ~[classes/:?]
at org.epics.archiverappliance.engine.pv.JCACommandThread.run(JCACommandThread.java:194) [classes/:?]
Caused by: java.lang.NullPointerException: Cannot invoke "org.epics.vtype.PVStructure.getString()" because "timestampPVStructure" is null
at org.epics.archiverappliance.common.TimeUtils.convertFromPVTimestamp(TimeUtils.java:531) ~[classes/:?]
at edu.stanford.slac.archiverappliance.PB.data.PBV4GenericBytes.<init>(PBV4GenericBytes.java:78) ~[classes/:?]
at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) ~[?:?]
... 6 more



I would like to ask two questions: 

1. What is the cause of this failure? I have attached the full error logs from AA engine. 

2. Does the current stable version of Archiver Appliance fully support archiving user-defined custom PVA structure PVs?


Thanks a lot for any suggestions.

 Best regards,

Huihui




Replies:
Re: 回复: Re: Archiver Appliance cannot archive structured PV data Dmitry Yu. Bolkhovityanov via Tech-talk
References:
Archiver Appliance cannot archive structured PV data 吕慧慧 via Tech-talk
Re: Archiver Appliance cannot archive structured PV data Sky Brewer via Tech-talk
回复: Re: Archiver Appliance cannot archive structured PV data lvhh--- via Tech-talk

Navigate by Date:
Prev: WEISS release 1.3.0 André Favoto via Tech-talk
Next: Re: 回复: Re: Archiver Appliance cannot archive structured PV data Dmitry Yu. Bolkhovityanov 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  <2026
Navigate by Thread:
Prev: 回复: Re: Archiver Appliance cannot archive structured PV data lvhh--- via Tech-talk
Next: Re: 回复: Re: Archiver Appliance cannot archive structured PV data Dmitry Yu. Bolkhovityanov 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  <2026
ANJ, 06 Jul 2026 · Home · News · About · Talk · Base · Modules · Extensions ·
· Distributions · Download · Documents · Links · Licensing ·