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: "Hu, Yong" <[email protected]>
To: "'haquin'" <[email protected]>, tech-talk <[email protected]>
Date: Thu, 21 Feb 2013 14:06:06 +0000
Hi Christophe,

If you are talking about the code such as "prec->rval = (epicsInt32)(value + 0.5) - prec->roff" in the ao record, I don't think this should be changed because this is the appropriate way how ao / ai performs the conversion in the routine convert() called by record support process routine process().

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;

HTH,

Yong

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of haquin
Sent: Thursday, February 21, 2013 8:12 AM
To: tech-talk
Subject: Rounding in conversion of ao record

Hi people,

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.

Could this be changed ?

Regards,
Christophe




Replies:
Re: Rounding in conversion of ao record Kasemir, Kay
References:
Rounding in conversion of ao record haquin

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