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  <20132014  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  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: PV name change and autosave
From: Pete Jemian <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Sat, 08 Jun 2013 07:45:43 -0500

Emmanuel:
On 6/7/2013 5:22 PM, Emmanuel Mayssat wrote:
I am looking for a solution where just changing the PVname AUTOMATICALLY
changes the autosave configuration.

You might be able to construct some shell script to compose a .req file in the same directory as the .db file, then create a Makefile rule to run this script when the .db file is changed. A "make" would be required to implement the automation. Perhaps this last step could be configured into a specific and capable editor used to change the .db file? Then the process would be automated when the .db file is saved from the editor.


It is likely you have a design or use case that is different than what we see. Indulge me a deeper explanation of our use case with regards to .req files.

We avoid doing automatic generation of .req files since we consider the items for autosave are only those required to be restored upon restart of the IOC. (This might be where our use cases differ.) The choice of what goes in the .req file associated with a particular .db always requires some human judgment.

in your case, if I understand correctly, changing a PVname ALSO requires
a change in the req template or macros.

This is correct.

Obviously, compared to dbgrep or autosaveFields, the advantage of the
req template for developers is that it is easy to identify what is being
saved and what isn't. But to date, most of the problems I have with
autosave is due to PV name changes and out-of-sync req file.

And that raises the real question for me here.
What part of the PV name changes for you and why was this required?

At APS, we tend to think of PV names as being constructed from parts. The first part describes the IOC or system, almost always using the P macro. The next part or parts might describe a particular instance of a database on that IOC or system. In the motor example I sent, this is the M macro. The final part describes the record(s) in the particular .db file.

The .req file is then (re)constructed by the database designer (a human) based on knowledge of the features provided by the .db and a decision of what needs to be restored on IOC restart. The macros used in the .req file are almost always the same as those used for the .db file to simplify things. In many instances of .db files, there are records and fields defined that should not be added to the .req file. For instance, the synApps motor.db file, it makes no sense to add the $(P)$(M)_ableput, $(P)$(M)_vCh, and $(P)$(M)_twCh records to autosave.


https://subversion.xray.aps.anl.gov/synApps/motor/trunk/motorApp/Db/motor.db

https://subversion.xray.aps.anl.gov/synApps/motor/trunk/motorApp/Db/motor_positions.req

https://subversion.xray.aps.anl.gov/synApps/motor/trunk/motorApp/Db/motor_settings.req

It helps for the .db and .req files to be co-located in the <top>/someApp/Db directory. This helps on several levels: first, we have infrastructure that automatically looks on this path, and more importantly, it supports the discipline we must have to consider changes in both .db and .req files together. Several IOCs can use the same pair of .db and .req files, changing only the values of the macro parameters. Additional macro parameters might be used to configure specifics within the .db file such as default BAUD of a serial port.

Changes in the .db file record names often have consequences on downstream software such as autosave, user interfaces, PV logging, and processing. We make efforts to minimize such changes.

Regards,
   Pete


--
----------------------------------------------------------
Pete R. Jemian, Ph.D.                <[email protected]>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source,   Argonne National Laboratory
Argonne, IL  60439                   630 - 252 - 3189
-----------------------------------------------------------
   Education is the one thing for which people
      are willing to pay yet not receive.
-----------------------------------------------------------



References:
PV name change and autosave Emmanuel Mayssat
Re: PV name change and autosave Tim Mooney
RE: PV name change and autosave Emmanuel Mayssat
Re: PV name change and autosave Kevin Peterson
RE: PV name change and autosave Emmanuel Mayssat

Navigate by Date:
Prev: Adding error msgs to dbAccess.c Bruce Hill
Next: Is there any plugins or modules for Gaussian fitting? Yingbing Yan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: PV name change and autosave Emmanuel Mayssat
Next: Re: PV name change and autosave Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·