On 3/8/22 00:39, Timo Korhonen via Core-talk wrote:
Hi all,
We noticed recently that if for instance the lower alarm limits are not explicitly defined in the EPICS database, CS-Studio reports all limits to be NaN. See here https://github.com/ControlSystemStudio/cs-studio/issues/2716 <https://github.com/ControlSystemStudio/cs-studio/issues/2716> for a description and a following discussion.
Kay pointed out that even when the limits are explicitly defined as 0, the IOC reports them as NaN. Now this starts to smell like a bug. But before I submit a bug report, I wanted to ask if there is a reason behind this behavior? Maybe it is a feature and not a bug?
The code in question (for aiRecord) seems reasonably clear.
Defining a level without a severity (implicitly NO_ALARM) isn't meaningful.
pad->upper_alarm_limit = prec->hhsv ? prec->hihi : epicsNAN;
pad->upper_warning_limit = prec->hsv ? prec->high : epicsNAN;
pad->lower_warning_limit = prec->lsv ? prec->low : epicsNAN;
pad->lower_alarm_limit = prec->llsv ? prec->lolo : epicsNAN;
https://github.com/epics-base/epics-base/blob/91941af992f6c32ef4f4ef55a2952f581aeee36a/modules/database/src/std/rec/aiRecord.c#L295-L298
There is another interesting case, described by Kay in the above issue report, when only one HIGH and not HIHI is defined. How should this case be interpreted? The “Process Database Concepts” documentation ( https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html#alarm-conditions-configured-in-the-database <https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html#alarm-conditions-configured-in-the-database> ) indicates that the alarm limits express a range, however not very explicitly. But this is not consistent with this case.
Any thoughts?
Timo
- Replies:
- Re: Definition (or not) of alarm limits Timo Korhonen via Core-talk
- References:
- Definition (or not) of alarm limits Timo Korhonen via Core-talk
- Navigate by Date:
- Prev:
Re: Definition (or not) of alarm limits Andrew Johnson via Core-talk
- Next:
Re: Definition (or not) of alarm limits Timo Korhonen via Core-talk
- Index:
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: Definition (or not) of alarm limits Andrew Johnson via Core-talk
- Next:
Re: Definition (or not) of alarm limits Timo Korhonen via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
<2022>
2023
2024
|