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