Emmanuel,
I guess I'd use a calcout record to do that:
record(calcout, "watchdog") {
field(SCAN, "1 second")
field(INPA, "watchdog.VAL")
field(CALC, "b?60:a>0?a-1:0;b:=0")
field(OOPT, "Every Time")
field(DOPT, "Use OCAL")
field(OCAL, "a>0?0:1")
field(OUT, "bark PP")
}
Write 1 to watchdog.B roughly every 60 seconds or less. If you fail, watchdog.VAL gets decremented to 0, and bark gets set to 1.
----- Original Message -----
From: "Emmanuel Mayssat" <[email protected]>
To: "epics" <[email protected]>
Sent: Monday, June 18, 2012 7:33:31 PM
Subject: watchdog record
What is the simplest way to implement a watchdog PV?
I would like something that behave as follow:
* Process set PV to 1 (ping the PV)
* if PV is no reset to 1 (re-pinged) in the next minute then the PV goes automatically to 0.
I have been using APS RunControl records to do this, but was wondering if there are other ways...
Cheers,
--
Emmanuel
--
Tim Mooney ([email protected]) (630)252-5417
Software Services Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab
- References:
- watchdog record Emmanuel Mayssat
- Navigate by Date:
- Prev:
watchdog record Emmanuel Mayssat
- Next:
BOY XY graph tick marks [SEC=UNCLASSIFIED] LYNCH, Damien
- 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:
watchdog record Emmanuel Mayssat
- Next:
RE: watchdog record nick.rees
- 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
|