g+
g+ Communities
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  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
<== Date ==> <== Thread ==>

Subject: Re: aiRecord conversion
From: Bruno Seiva Martins <brunoseivam@gmail.com>
To: Ralph Lange <Ralph.Lange@gmx.de>
Cc: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Tue, 28 Aug 2012 11:11:46 -0300
Hi Ralph,

Thanks for your advice! I'm still learning EPICS, so I'm using those A/D's just for experimenting. When it comes to the real deal, I'll keep in mind what you said.

Best regards,


Bruno Seiva Martins




On Tue, Aug 28, 2012 at 11:05 AM, Ralph Lange <Ralph.Lange@gmx.de> wrote:
On Tue Aug 28 2012 15:28:34 GMT+0200 (CEST), Bruno Seiva Martins <brunoseivam@gmail.com> 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 Dirk Zimoch
References:
aiRecord conversion Bruno Seiva Martins
Re: aiRecord conversion Dirk Zimoch
Re: aiRecord conversion Bruno Seiva Martins
Re: aiRecord conversion Bruno Seiva Martins
Re: aiRecord conversion Ralph Lange

Navigate by Date:
Prev: Re: aiRecord conversion Nicholas P. DiMonte
Next: Re: aiRecord conversion Eric Norum
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
Navigate by Thread:
Prev: Re: aiRecord conversion Ralph Lange
Next: Re: aiRecord conversion Dirk Zimoch
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·