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

Subject: Re: aiRecord conversion
From: Michael Davidsaver <[email protected]>
To: [email protected]
Date: Wed, 29 Aug 2012 18:42:48 -0400
On 8/28/2012 1:08 PM, Eric Norum wrote:
On Aug 28, 2012, at 9:42 AM, Bruno Seiva Martins <[email protected]> wrote:

...

The documentation at https://wiki-ext.aps.anl.gov/epics/index.php/RRM_3-14_Analog_Input#special_linconv describes this pretty well:

special_linconv(precord,after)

This routine is called whenever any of the fields LINR, EGUF, EGUL or ROFF is modified. To support linear conversion, EOFF and ESLO must be set accordingly. The record support sets EOFF to EGUL before calling this routine, which is the very common case when RAWL is zero below.

A useful formula for calculating EOFF and ESLO is this one:

EOFF = (RAWF * EGUL - RAWL * EGUF) / (RAWF - RAWL)
ESLO = (EGUF - EGUL) / (RAWF - RAWL)

Here, RAWL and RAWF are the lowest resp. highest possible raw value. For instance, a 16 bit bipolar ADC might have RAWL=-0x7fff, RAWF=0x7fff.


Did RAWF and RAWL ever exist in a 3.14 release?

A quick search through VCS history shows that these fields only existed briefly between 3.14.0-alpha2 and -beta1 (circa 2001).

It would be nice to have them, then linear conversions would be unambiguous defined by fields and we could do without special_linconv().

Michael


Replies:
Re: aiRecord conversion Benjamin Franksen
References:
aiRecord conversion Bruno Seiva Martins
Re: aiRecord conversion Eric Norum
Re: aiRecord conversion Bruno Seiva Martins
Re: aiRecord conversion Eric Norum
Re: aiRecord conversion Ralph Lange
Re: aiRecord conversion Bruno Seiva Martins
Re: aiRecord conversion Eric Norum

Navigate by Date:
Prev: Keithley 6517B support? ulrik.pedersen
Next: Re: aiRecord conversion Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: aiRecord conversion Eric Norum
Next: Re: aiRecord conversion Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·