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: "Kasemir, Kay" <[email protected]>
To: Emmanuel Mayssat <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Fri, 7 Jun 2013 13:36:25 -0400
On Jun 7, 2013, at 1:30 PM, Emmanuel Mayssat <[email protected]> wrote:
> Can the req file, generate itself "automatically"?
> dbgrep *O > myfile.req


One way is via annotations in the EPICS database:

record(type, "$(S):SomeRecord")
{
    info(autosaveFields, "VAL LOW")
    field(SCAN, "1 second")
    field(INP,  "whatever")

When you create new *.db files, it is easy enough to add those info annotations right away.

Assume, however, your application uses an existing *.db file. That *.db file contains the records that you need, but the original author did not include info annotations to support autosave:

# Original database that did not include info() statements
record(type, "$(S):SomeRecord")
{
    field(SCAN, "1 second")
    field(INP,  "whatever")

You may not want to edit these 3rd party *.db files because they originate from another distribution. When you later receive an update of those *.db files, you would have to re-apply your info annotations.

As a solution, note that you can load multiple definitions of the same record. You can load a second database file that contains the same record names, but only the missing infoannotations:

record(type, "$(S):SomeRecord")
{
    info(autosaveFields, "VAL LOW")




Anyway, finally you do this in the IOC startup file just before the usual create_monitor_set to create the config file from the record annotations:

makeAutosaveFileFromDbInfo("<IOCNAME>.req", "autosaveFields");
create_monitor_set("<IOCNAME>.req", 5)


-Kay

References:
PV name change and autosave Emmanuel Mayssat

Navigate by Date:
Prev: PV name change and autosave Emmanuel Mayssat
Next: Re: PV name change and autosave Andrew Johnson
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: PV name change and autosave Emmanuel Mayssat
Next: Re: PV name change and autosave Andrew Johnson
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 ·