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

Subject: Re: Editing .pb files for the purpose of appending data to them
From: Tynan Ford via Tech-talk <tech-talk at aps.anl.gov>
To: Sky Brewer <sky.brewer at ess.eu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Mon, 29 Apr 2024 08:19:25 -0700
Hi Sky,

We have wondered if it's possible to append data to the appliance pb files since we have data from previous archivers that goes back many years. It would be useful to have that data imported into the appliance so all archived data can be retrieved via the same method. I naively thought we could write a script to create pb files like TESTPV:2001.pb, TESTPV:2002.pb, etc but I'm curious what you think?

Thanks
Tynan

On Wed, Apr 24, 2024 at 2:46 AM Sky Brewer via Tech-talk <tech-talk at aps.anl.gov> wrote:

Hi Windsor,

 

Some examples of python code for handling the pb files can be found at:

 

https://github.com/zhangt58/PyArchAppl/blob/master/main/data/pb/decode.py

https://github.com/dls-controls/aapy/blob/master/aa/pb.py

and

https://gitlab.esss.lu.se/ics-software/py-epicsarchiver/-/blob/master/epicsarchiver/pb.py?ref_type=heads

 

Obviously, I prefer my own code 😊

 

In terms of appending data, could you explain your use case? I don’t know why you would want to append data from outside the archiver.

The archiver makes many assumptions about these files in terms of what data is in them dependent on the name of the file. I would be

Careful about altering them.

 

A simple solution can be to push data into the files using a PV! Note that the archiver doesn’t do any checks that timestamps correspond to the current time.

Only that they are sequential. So as long as you are adding new events you can push extra events in.

 

A second solution is to use the merge data from another cluster in the ETL process. You can see some documentation at https://slacmshankar.github.io/epicsarchiver_docs/redundancy.html

I can probably create an example if you need it.

 

You could then set up a dummy PV to push the data you want in, and allow the archiver ETL process to merge the data for you.

 

I hope that helps.

Sky

 

 

 


Replies:
Re: Editing .pb files for the purpose of appending data to them Michael Davidsaver via Tech-talk
References:
Re: Editing .pb files for the purpose of appending data to them Sky Brewer via Tech-talk

Navigate by Date:
Prev: Re: Epics Integration with Allen Bradley 1769-L33ER PLC Hovanes Egiyan via Tech-talk
Next: Using PyAT 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
Navigate by Thread:
Prev: Re: Editing .pb files for the purpose of appending data to them Sky Brewer via Tech-talk
Next: Re: Editing .pb files for the purpose of appending data to them Michael Davidsaver 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
ANJ, 30 Apr 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·