Experimental Physics and Industrial Control System
Hi all,
we all know the PREC field of many records. Unforunately, its purpose is
not documented very precisely. The Application Developer's Guide says in
chapter 3.5.1 (EPICS Overview - Channel Access - Client Services):
"In addition to requesting process variable values, any combination of
the following additional information may be requested:
[...]
* Precision: Precision with which to display floating point numbers."
In the Record Reference Manual, one can read e.g. in the ai chapter:
"The PREC field determines the floating point precision with which to
display VAL."
But what does this exactly mean? I think, the most intuitive sense is to
format the value like "%.<PREC>f". At least this is the default
behaviour of medm when using a text monitor. But why not like
"%.<PREC>g" or "%.<PREC>e"? And why does neither caget nor camonitor
honor PREC? And what about negative PREC values?
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);
All tools including caget and camonitor should honor PREC.
Any comments?
Dirk
--
Dr. Dirk Zimoch
Swiss Light Source
Paul Scherrer Institut
Computing and Controls
phone +41 56 310 5182
fax +41 56 310 4413
- Replies:
- Re: PREC Ralph Lange
- Re: PREC Marty Kraimer
- Re: PREC Eric Norum
- Re: PREC Brian McAllister
- Navigate by Date:
- Prev:
Re: Archiver 2.x Data Retreival Noboru Yamamoto
- Next:
Re: PREC Ralph Lange
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
<2004>
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Archiver 2.x Data Retreival Noboru Yamamoto
- Next:
Re: PREC Ralph Lange
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
<2004>
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024