Does it make sense to change the code to:
if (prec->drvh >= prec->drvl)
And change the default values so that DRVL>DRVH (e.g. DRVL=0, DRVH=-1)
Then nothing would change if the db designer ignores the fields.
Another alternative is to set default values DRVL=-Inf and DRVH=Inf.
Dirk
On 25.07.2014 14:05, Benjamin Franksen wrote:
On Thursday 24 July 2014 11:27:24 Andrew Johnson wrote:
On 07/24/2014 04:47 AM, Benjamin Franksen wrote:
On Thursday 24 July 2014 11:15:56 Dirk Zimoch wrote:
On 21.07.2014 12:41, Benjamin Franksen wrote:
Why don't you just set DRVL=DRVH=<the desired value>.
/* check drive limits */
if (prec->drvh > prec->drvl) {
if (value > prec->drvh)
value = prec->drvh;
else if (value < prec->drvl)
value = prec->drvl;
}
DRVL=DRVH => no check at all!
Strange. Not intuitive to me. And contrary to the docs.
That check predates the CVS history of the aoRecord.c file (1995). It
makes perfect sense to me, there has to be a way to disable the
clipping behaviour,
Hm, yes, that makes sense.
and the assumption is that you would only create
ao records for things that you want to be able to actually change.
In general, yes, but there are exceptions. I have used ao or ai records
to hold physical constants as parameters for a calculation. It would be
nice if I could tell the database to fix the value and not even allow a
db or ca put to change them. (One solution could be a simple record type
for such parameters. Maybe I'll write one when I have some leisure...)
If
you want to stop changes for a while, disable record processing using
SDIS & DISV.
I don't think this will prevent the VAL from changing e.g. due to put
operations, or does it?
This is from the
RRM
(https://wiki-ext.aps.anl.gov/epics/index.php/RRM_3-14_Analog_Outpu
t#Desired_Output_Parameters):
"""
The VAL field's value is forced to be within the limits specified in
the fields DRVH and DRVL, which are configured by the designer:
DRVL<=VAL<=DRVH
Note: If nothing is entered for DRVH and DRVL, the output value will
never change.
"""
Wiki page fixed to document existing code.
Thanks.
Ben
--
"Make it so they have to reboot after every typo." â Scott Adams
________________________________
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Prof. Dr. Dr. h.c. mult. Joachim Treusch, stv. Vorsitzende Dr. Beatrix Vierkorn-Rudolph
Geschäftsführung: Prof. Dr. Anke Rita Kaysser-Pyzalla, Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
D-14109 Berlin
http://www.helmholtz-berlin.de
- Replies:
- Re: EPICS alarming on VAL != X Benjamin Franksen
- References:
- EPICS alarming on VAL != X Jameson Graef Rollins
- Re: EPICS alarming on VAL != X Benjamin Franksen
- Re: EPICS alarming on VAL != X Andrew Johnson
- Re: EPICS alarming on VAL != X Benjamin Franksen
- Navigate by Date:
- Prev:
Re: EPICS alarming on VAL != X Benjamin Franksen
- Next:
Re: EPICS alarming on VAL != X Benjamin Franksen
- 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
- Navigate by Thread:
- Prev:
Re: EPICS alarming on VAL != X Benjamin Franksen
- Next:
Re: EPICS alarming on VAL != X Benjamin Franksen
- 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
|