Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017 
<== Date ==> <== Thread ==>

Subject: Conversion issues (analog device support with float type raw data)
From: Ralph Lange <Ralph.Lange@gmx.de>
To: EPICS Core-Talk <core-talk@aps.anl.gov>
Date: Fri, 09 Jan 2015 11:04:04 +0100
All,

The standard conversions that are being done in analog record types convert between RVAL (integer type) and VAL (float type).

All device supports that are handling float-type raw data (mostly field buses, PLCs, ASYN, ...) cannot use the record support's conversion because of the mismatch in data types. They have to clone the code and do the conversion as part of the device support, RVAL is usually ignored.

This leads to the situation that for some input records (if they are connected to integer type raw data) the conversion can be tested by doing caputs to the RVAL field, for the other records caputs to the RVAL field are just being ignored.

Does anyone have a good idea how to straighten this out in a reasonable and compatible way?

We could add a second RVAL field of type double to the analog records, and define yet another DSET.read() return code to trigger a float-float conversion. That would at least move the conversion code back into the record scope, where it belongs. Admittedly this is not really cleaning things up a lot, but as long as there are no variable type fields in records, I don't see a way around adding a field for a double type raw value.

What do you think?
~Ralph

Replies:
Re: Conversion issues (analog device support with float type raw data) Michael Davidsaver
Re: Conversion issues (analog device support with float type raw data) Andrew Johnson

Navigate by Date:
Prev: Re: dbl output and record name aliases Johnson, Andrew N.
Next: Re: Conversion issues (analog device support with float type raw data) Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017 
Navigate by Thread:
Prev: Re: dbl output and record name aliases J. Lewis Muir
Next: Re: Conversion issues (analog device support with float type raw data) Michael Davidsaver
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·