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: Block CAPUT to not be able to modify PV value |
From: | "Johnson, Andrew N. via Tech-talk" <tech-talk at aps.anl.gov> |
To: | Adrian Martinez <adrian.martinez at sevensols.com> |
Cc: | EPICS tech-talk <tech-talk at aps.anl.gov> |
Date: | Thu, 15 Jul 2021 16:55:33 +0000 |
Hi Adrián,
On Jul 15, 2021, at 12:45 AM, Adrian Martinez <adrian.martinez at sevensols.com> wrote:
Yes, you have an EPICS database at your disposal which was designed to do that kind of thing. You would need to add two records, one to invert the value from StartUpOn (since it’s 0 when you want to disable those records) and the second
to copy the result into the DISP fields of the records to be disabled. I would probably use a dfanout for the latter, but a seq record would also work. Something like this should
do it:
record(calc, "$(user):UCrTcrDISP")
{
field(CALC, "!A")
field(INPA, "$(user):StartUpOn CP") field(FLNK, "$(user):UCrTcrDisable")
}
record(dfanout, "$(user):UCrTcrDisable")
{
field(DOL, "$(user):UCrTcrDISP")
field(OMSL, "closed_loop")field(SELM, "All") field(OUTA, "$(user):UCrTcrLimitUsSet.DISP MS") field(OUTB, "$(user):UCrTcrLimitUsRd.DISP MS")
}
The CP flag on the calc INPA link will cause it to process whenever the value of StartUpOn changes. Its forward-link field will then trigger the dfanout to copy the inverted value to the DISP fields of the other records, thus preventing
them from being modified by any CA clients while StartUpOn is zero (although DISP will not prevent those records from processing if they get triggered by some other means). You can disable up to 6 more records with this if you want, using the
dfanout links OUTC through OUTH.
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|