Sue Witherspoon wrote:
>
> The problem is in the epics alarm subroutine:
...
> The comparison between a double and a float is okay as long as the precision of
> the comparison is not very large. For instance
...
> On the surface the solution would be to change the type of hihi to
> be double but on further inspection the ascii file for this record
> says that the field is DBF_FLOAT? Does this imply that the
> size of the record must also change?
This is a problem in more than just the ai & ao records, which I noticed a
few weeks ago. The fix I applied to the repository was different for the
3.13 branch to that on the 3.14 development tree. On the 3.13 branch I
just changed the type of the hyst and lalm variables in the alarm()
routine to be double, which improves the alarm handling without having to
change the DBD file. This change will appear in the 3.13.2 release
(whenever that comes out - it'll be just a bug-fix release). For 3.14
these fields and the relevent variables in alarm() should all be made into
double, but it looks like I haven't quite finished doing that yet.
To answer Ben's point, this is all due to historical baggage. AIUI the
original GTACS code which EPICS derives from used floats for everything.
When new devices came along that could provide extremely high accuracy and
needed greater precision, various records were converted to use doubles
but this wasn't done very well.
Personally I'd like to start again and design a complete new set of record
types which could even use a different API to the device support layer. I
suspect this will never happen though - we'll have to continue to support
existing record types to maintain the current control systems.
- Andrew
--
Complexity comes for free, Simplicity you have to work for.
- References:
- Problem with epics alarm Sue Witherspoon
- Navigate by Date:
- Prev:
Re: Problem with epics alarm Benjamin Franksen
- Next:
Re: Problem with epics alarm Steve Lewis
- 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: Problem with epics alarm Benjamin Franksen
- Next:
Re: Problem with epics alarm Steve Lewis
- 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
|