EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: A general question about convert e.g. in longout record drvh, drvl handling
From: Ralph Lange via Core-talk <core-talk at aps.anl.gov>
To: EPICS Core Talk <core-talk at aps.anl.gov>
Date: Wed, 27 Jan 2021 12:04:44 +0100
On Wed, 27 Jan 2021 at 11:56, Heinz Junkes via Core-talk <core-talk at aps.anl.gov> wrote:
My memories are that this has also been discussed at tech-talk.

I have defined a longout record and wanted to achieve that you can set exactly only one value.

In my example I tried this with DRVL = DRVH = 32768.

But the conversion function in the logout record looks like this:

static void convert(longoutRecord *prec, epicsInt32 value)
{
        /* check drive limits */
        if(prec->drvh > prec->drvl) {
                if (value > prec->drvh) value = prec->drvh;
                else if (value < prec->drvl) value = prec->drvl;
        }
        prec->val = value;
}

Something speaks against the check like this ?

if(prec->drvh => prec->drvl)

The default case of DRVH = DRVL = 0 would limit the device to 0.

Cheers,
~Ralph


References:
A general question about convert e.g. in longout record drvh, drvl handling Heinz Junkes via Core-talk

Navigate by Date:
Prev: Unit tests on Windows DLL internals Ralph Lange via Core-talk
Next: Re: A general question about convert e.g. in longout record drvh, drvl handling Ralph Lange via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
Navigate by Thread:
Prev: A general question about convert e.g. in longout record drvh, drvl handling Heinz Junkes via Core-talk
Next: Re: A general question about convert e.g. in longout record drvh, drvl handling Ralph Lange via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  <20212022  2023  2024 
ANJ, 27 Jan 2021 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·