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: [EXTERNAL] Phoebus Archive xml config file: Automate generation. |
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>, Kuldeep Joshi <kuldeep.joshi at gmail.com> |
Date: | Mon, 26 Jul 2021 16:12:44 +0000 |
> I was wondering if there is a way by which we can auto generate config xml file for archiving the PV's to the CSS Phoebus Archiver.
i.e. Similar to the autosave module in SynApps, whereby we add a .req file along with the db definition.
It can certainly be useful to keep the archive settings close to the record definitions.
That way, it's easier to remember adding "ADEL", and you see the scan rate, so you can determine a suitable archive setting.
We sometimes do that here by adding 'info' tags to the records, somewhat like this:
record(ai, "MyRecord")
{
# Request archiving on change
info(archive, "Monitor, 00:01:00")
# Setting ADEL to minimize archived changes
field(SCAN, "1 second")
field(ADEL, "0.5")
or
# Scan
info(archive, "Scan, 01:00:00")
Note that we're not using the info settings on the IOC.
We're simply (mis-)using the familiar syntax for storing some related info in the *.db file.
Might as well have used "#info(..." to turn it into a magic comment that's ignored by the database yet used by our tool, which is a python script that parses the database files for "record(xx, THE_NAME)" and then an optional "info(archive...)", from which
it creates the archive configuration file.
The script won't handle macros in the database files and doesn't promise to handle all possible database files, but it's been helpful for this purpose.
-Kay
|