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

Subject: Re: EPICS database Feature request
From: "Pearson, Matthew R." <[email protected]>
To: Emmanuel Mayssat <[email protected]>
Cc: EPICS mailing list <[email protected]>
Date: Fri, 6 Jun 2014 16:11:12 +0000
Hi,

If you know the record will be there when you build the db, you could do this via MSI with an optional macro passed into the template db file. e.g.:

$(COMMENT=#) record(ao, "myAO") {
$(COMMENT=#)    field(VAL, "21")
$(COMMENT=#) }

Then just uncomment it when you build the db, by passing in "".

Or, you could have some extra records that are able to change those fields at runtime?

record(stringout, "myPV:ChangeFLNK") {
  field(VAL, "AnotherAO")
  field(OUT, "myAO.FLNK CA")
}

record(stringout, "myPV:ChangeFLNKBack") {
  field(VAL, " ")
  field(OUT, "myAO.FLNK CA")
}
 
Cheers,
Matt



On Jun 6, 2014, at 11:22 AM, Emmanuel Mayssat <[email protected]> wrote:

> Hello all,
> A feature I use a lot with my db  file is overwriting a record, ie:
> 
> record(ao, "myAO") {
>    field(VAL, "20")
>    field(DRVH, "40")
> }
> 
> and later in the same or another db file
> 
> record(ao, "myAO") {
>    field(VAL, "21")
>    field(FLNK, "AnotherAO")
> }
> 
> The above is equivalent to  1 single entry with
> 
> record(ao, "mAO") {
>   field(VAL, "21")
>   field(DRVH, "40")
>   field(FLNK, "AnotherAO")
> }
> 
> 
> Now the issue is that to overwrite the field of a record, you need to know its type (i.e. ao) as you need to repeat the record line.
> Is it possible to have a database entry (maybe like the alias entry) where you could just say:
> 
> changefield("myAO", VAL, 21)
> 
> which doesn't create the record if it doesn't exist, but which perform the equivalent to 
> 
> record(ao, "myAO") {
>   field(VAL, "21")
> }
> 
> if it does.
> 
> Maybe a similar command already exist.
> If so let me know,
> --
> Emmanuel
> 
> 
> 
> 
> 



References:
EPICS database Feature request Emmanuel Mayssat

Navigate by Date:
Prev: Porting EPICS to a new OS Emmanuel Mayssat
Next: Re: EPICS database Feature request Pete Jemian
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS database Feature request Shen, Guobao
Next: Re: EPICS database Feature request Pete Jemian
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  <20142015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 17 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·