EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: PREC
From: "Allison, Stephanie" <[email protected]>
To: TECHTALK <[email protected]>
Date: Fri, 11 Jun 2004 09:49:00 -0700
Hi,

> > I suggest the following:
> > PREC >= 0 means to format the value like printf("%.*f",PREC,VAL);
> > PREC < 0  means to format the value like printf("%.*e",-PREC,VAL);
> > 
> 
> I worry that there are a lot of tools out there that might 
> not take well to negative PREC values.

For edd/dm, specifying a negative precision in the graphic object properties means to use PREC from the database.  0 or greater means to use the user-specified value instead.  So edd/dm would have to change.

Here is a radical thought - it would be nice to have a new string field (ie, .FMT) that specifies how to display the value as a string.  Then I could set up the format of our vacuums (ie, VALs that should always be displayed using exponential notation) in the database instead of having to override the default display format in each client.  Also, some save/restore tools won't restore the proper values of things like vacuum limits unless you set a ridiculously large PREC.

BTW, in some legacy control systems (like the SLAC SLC control system), the right precision to use is determined based on the value using an algorithm that is better than the printf rules.  Mike Zelazny ported that algorithm from VMS Fortran to C++ in his channel watcher (so I don't have to worry about losing precision if I restore a channel watcher saveset during bumpless reboot).

Stephanie Allison

Replies:
Re: PREC Tim Mooney

Navigate by Date:
Prev: Re: PREC Dirk Zimoch
Next: Initializing a record VAL field with a constant J. Frederick Bartlett
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: PREC Dirk Zimoch
Next: Re: PREC Tim Mooney
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  <20042005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·