EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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  <20232024  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  <20232024 
<== Date ==> <== Thread ==>

Subject: Re: Fwd: Raising alarms with P4P
From: Michael Davidsaver via Tech-talk <tech-talk at aps.anl.gov>
To: "Claus, Ric" <claus at slac.stanford.edu>
Cc: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Date: Sun, 10 Dec 2023 21:43:20 -0800
On 12/8/23 15:56, Claus, Ric via Tech-talk wrote:
Hello,

  I have written a PV server using P4P based on the lazycounter_server_cothread.py example in the P4P repository.  It uses NTScalars with the valueAlarm option set to True.  I am able to set valueAlarm fields through both the program and pvput commands and then see the results with pvget:
...
However, I don’t see the alarm structure’s fields changing (although I’m not sure what to expect).  Where should the alarm evaluation occur?

The SharedPV class does not have any special logic associated
with the Value in contains.  It is intended as a "cache" around
which custom logic is built.  eg. it could as easily hold an
NTTable, where the meaning of an alarm isn't so clear.

You could do the alarm calculations as appropriate your
data type, and set "alarm.severity".

You might also want to investigate:

https://dls-controls.github.io/pythonSoftIOC/master/index.html

or

https://github.com/mdavidsaver/pyDevSup

which give access to real process database records from python.


I found this comment in the Normative-Types-Specification page:

Code that checks for alarms should use code similar to the following:

followed by some C code showing how to do the alarm evaluation (without hysteresis) and raising.  Is it the intention that similar code should be in the application layer of my PV server, rather than in some common lower layer?  If so, how should this be done since I haven’t found the equivalent of some of these routines in P4P?

Thank you for any guidance you can give me!

Ric Claus
SLAC/LCLS



References:
Fwd: Raising alarms with P4P Claus, Ric via Tech-talk

Navigate by Date:
Prev: Fwd: Raising alarms with P4P Claus, Ric via Tech-talk
Next: Epics Sequencer and pvAccess Syed Naqvi via Tech-talk
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  <20232024 
Navigate by Thread:
Prev: Fwd: Raising alarms with P4P Claus, Ric via Tech-talk
Next: Epics Sequencer and pvAccess Syed Naqvi via Tech-talk
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  <20232024 
ANJ, 11 Dec 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·