--- Begin Message ---
> I am really confused about the initial values of ASLO for ai and ao
> records.
You are right - the situation is a bit confusing.
> In the record reference manual it says that the
> initial value for ai and ao are 1.0.
> [...]
> The results are:
> ASLO has a default of 0 for ao records and
> a default of 1.0 for ai records.
Right. But a glance at the code might clarify the situation:
aoRecord.c (~line 192):
case(0): /* convert */
value = (double)pao->rval + (double)pao->roff;
if(pao->aslo!=0.0) value *= pao->aslo;
value += pao->aoff;
aiRecord.c (~line 365):
val = (double)pai->rval + (double)pai->roff;
/* adjust slope and offset */
if(pai->aslo!=0.0) val*=pai->aslo;
val+=pai->aoff;
So there's no real difference between ASLO being not set, 0.0 or 1.0.
(Actually ASLO being 0 saves a few usec for the multiplication.)
> I am putting 1.0 as the value of ASLO in all the capfast symbols
> that we are using for both ai and ao records, which seems to be the
> right way to go to me.
Generally agreed.
We could actually have a default of 1.0 for ao records in the dbd file and
get rid of the test against zero in the code.
Or we could have a default of 0 for both record types and define the value
0 for ASLO as "don't use it". (This would need a word in the doc.)
Should we do something? Is this worth the effort? *Shrug.*
Ralph
--- End Message ---
- References:
- ASLO initial values Rozelle Wright
- Navigate by Date:
- Prev:
ASLO initial values Rozelle Wright
- Next:
Re: Record support question Benjamin Franksen
- 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:
ASLO initial values Rozelle Wright
- Next:
HP-UX 10.20 (hp700) Extensions Binaries 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
|