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: "Kasemir, Kay" <[email protected]>
Cc: tech-talk <[email protected]>
Date: Thu, 21 Feb 2013 16:15:04 +0100
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


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

Navigate by Date:
Prev: Re: Rounding in conversion of ao record Kasemir, Kay
Next: RE: Rounding in conversion of ao record Mark Rivers
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 Kasemir, Kay
Next: Re: Rounding in conversion of ao record Kasemir, Kay
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 ·