> 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
|