EPICS Home

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: Ralph Lange <[email protected]>
To: EPICS Tech Talk <[email protected]>
Date: Tue, 28 Aug 2012 16:05:46 +0200
On Tue Aug 28 2012 15:28:34 GMT+0200 (CEST), Bruno Seiva Martins <[email protected]> wrote:
Rectifying:

   epicsFloat64 div;

   pao->eguf = 10.0;
   pao->egul = (type == LCN12BMP || type == LCN16BMP) ? 0.0 : -10.0;
   div = (type == LCN12BMP || type == LCN12BBP) ? 4095.0 : 65535.0;
   pao->hopr = pao->eguf; 
   pao->lopr = pao->egul; 
   pao->eslo = ((pao->eguf) - (pao->egul)) / div;


Bruno Seiva Martins

Another comment:

The linear conversion mechanism is intended to convert the digitized value into the final engineering units.

You might want to use your A/D converter for signals that correspond to positions [mm], pressures [mbar], or temperatures [C].
In those cases, the database designer will set EGU, EGUL and EGUF to e.g. "mm", -5 and 25, meaning that -10V are equivalent to -5mm, and +10V are equivalent to +25mm. To limit the range that is shown in the GUI, the designer might also want to set e.g. LOPR to -2 and HOPR to +2, so that graphs and meters show the "interesting" range, -2mm to +2mm.

To have this work correctly, setting EGUF, EGUL, HOPR and LOPR in your device support may actually not be a good idea.
Normally, I would just set ESLO and EOFF.

Cheers,
~Ralph

Replies:
Re: aiRecord conversion Bruno Seiva Martins
References:
aiRecord conversion Bruno Seiva Martins
Re: aiRecord conversion Dirk Zimoch
Re: aiRecord conversion Bruno Seiva Martins
Re: aiRecord conversion Bruno Seiva Martins

Navigate by Date:
Prev: Re: aiRecord conversion Bruno Seiva Martins
Next: Re: aiRecord conversion Nicholas P. DiMonte
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 Ralph Lange
Next: Re: aiRecord conversion Bruno Seiva Martins
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