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

Subject: Re: Rounding in conversion of ao record
From: haquin <[email protected]>
To: Mark Rivers <[email protected]>
Cc: tech-talk <[email protected]>
Date: Thu, 21 Feb 2013 16:27:24 +0100
yes I am referring to the LINR conversion

Le 21/02/2013 16:24, Mark Rivers a écrit :
What conversion are you referring to?  The LINR conversion?  If so, then yes LINR is designed to convert from engineering units (epicsFloat64) to device units (epicsInt32).  If you use the asynFloat64 device support then your VAL field is assumed to already be in engineering units, and the VAL field is written directly with no conversion.

Mark

________________________________________
From: [email protected] [[email protected]] on behalf of haquin [[email protected]]
Sent: Thursday, February 21, 2013 9:15 AM
To: Kasemir, Kay
Cc: tech-talk
Subject: Re: Rounding in conversion of ao record

What I find disapointing is that the conversion forces the cast to Int32,
for exemple, in my initial situation (asynFloat64 device support):
- if I don't use the conversion the output is Float
- if I use the conversion the output is Integer

You never expect the conversion to prevent you from Float output.


Le 21/02/2013 15:16, Kasemir, Kay a écrit :
On 2/21/13 09:06 , "Hu, Yong" <[email protected]> wrote:
For the conversion of ao, the data flow (conversion direction) is VAL
(double type) --> RVAL (integer); input is double, output is integer;

For the conversion of ai, the data flow (conversion direction) is RVAL
(integer) --> VAL (double); input is integer, output is double;
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of haquin
There is a rounding operation (cast to (epicsInt32)) when using the
conversion of the ao record, hence, with this conversion only integer is
output, no float ...
This is surprising and not equivalent to what is done for the ai record.
As Yong describes, it is consistent both ways: There is usually a
conversion from the double type to/from the integer, and device support
would then use the integer.

But that's up to the device support.

With EPICS base, you get the "Soft Channel" device support for example
that will transfer the double VAL field.
The "Raw Soft Channel" device support will transfer the integer RVAL field.


For the EtherIP device support, floating point typed PLC tags are
transferred in/out of the VAL fields, otherwise the RVAL fields are used.
So it depends on your device support.

Thanks,
-Kay


begin:vcard
fn:Christophe Haquin
n:Haquin;Christophe
email;internet:[email protected]
tel;work:02 31 45 46 61
x-mozilla-html:FALSE
version:2.1
end:vcard


References:
Re: Rounding in conversion of ao record Kasemir, Kay
Re: Rounding in conversion of ao record haquin
RE: Rounding in conversion of ao record Mark Rivers

Navigate by Date:
Prev: RE: Rounding in conversion of ao record Mark Rivers
Next: Re: Rounding in conversion of ao record haquin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Rounding in conversion of ao record Mark Rivers
Next: Re: Rounding in conversion of ao record haquin
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·