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

Subject: Re: calc VAL field not updating from bi VAL field
From: Andrew Johnson <anj@aps.anl.gov>
To: tech-talk@aps.anl.gov
Date: Wed, 30 May 2012 11:11:20 -0500
Hi Lewis,

On 2012-05-30 Allison, Stephanie wrote:
> Could this be a round-off error (long to double)?  Does this CALC work:
> 
> field(CALC, "A>0.5?1:0")

If that works, also try the expression "!!A" which is more efficient than 
using ?: anyway.  In general I never assume that a true value is 1, it's 
better to check for non-zero, so use "A!=0?1:0" or just "A?1:0".

However I admit I would be very surprised if the integer to double conversion 
is not exact for the value 1.

- Andrew
-- 
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte

Replies:
Re: calc VAL field not updating from bi VAL field J. Lewis Muir
References:
calc VAL field not updating from bi VAL field J. Lewis Muir
RE: calc VAL field not updating from bi VAL field Allison, Stephanie

Navigate by Date:
Prev: RE: Proposed change in asyn - request for comments Mark Rivers
Next: Re: calc VAL field not updating from bi VAL field J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
Navigate by Thread:
Prev: RE: calc VAL field not updating from bi VAL field Allison, Stephanie
Next: Re: calc VAL field not updating from bi VAL field J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·