EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Alarm for noisy readback channel
From: Paul Sichta <[email protected]>
To: [email protected]
Date: Wed, 22 Feb 2012 19:08:39 -0500
Looking at Setphanie's CALC record, I never realized one could cascade
the conditional statements.

-ps


On Wed, Feb 22, 2012 at 17:54, Allison, Stephanie <[email protected]> wrote:
> Hi Paul,
>
> I use ALH to set audible alarms.  I use the ALARMCOUNTFILTER option to filter out misbehaving PVs (see the ALH user's guide).  However, if you don't want the PV to flash on an EDM display or you don't want spikes in your archived data, then the CALC is the way to go.
>
> Here is an example database for a device that sometimes time out and ends up with an invalid severity - I don't want the value that goes into the archive or alh to show invalid until it's invalid for a few times in a row:
>
> record(ai, "$(loc):$(type)$(dev)Input")
> {
>        field(DESC, "$(loc):$(type)$(dev)")
>        field(SCAN, "10 second")
>        field(DTYP, "stream")
>        field(INP, "@$(proto).proto DATA-STRING01($(ctl),$(ch)) $(port)")
>        field(ASG,  "Internal")
>        field(PREC, "$(prec)")
>        field(EGU,  "$(egu)")
>        field(HOPR, "$(hopr)")
>        field(LOPR, "$(lopr)")
>        field(FLNK, "$(loc):$(type)$(dev)Upd")
> }
> # Process value when the input is valid or the input has been
> # invalid for more than INPC times.  The controller
> # sometimes does not reply so allow some replyTimeout's to pass before setting
> # the external value invalid.
> record(calcout, "$(loc):$(type)$(dev)Upd")
> {
>        field(DESC, "Invalid check")
>        field(ASG,  "Internal")
>        field(CALC, "A<3?0:B>C?0:B+1")
>        field(INPA, "$(loc):$(type)$(dev)Input.SEVR")
>        field(INPB, "$(loc):$(type)$(dev)Upd")
>        field(INPC, "4")
>        field(OUT,  "$(loc):$(type)$(dev).PROC PP")
>        field(OOPT, "When Zero")
> }
> record(ai, "$(loc):$(type)$(dev)")
> {
>        field(DESC, "$(loc):$(type)$(dev)")
>        field(INP,  "$(loc):$(type)$(dev)Input MS")
>        field(PREC, "$(prec)")
>        field(EGU,  "$(egu)")
>        field(HOPR, "$(hopr)")
>        field(LOPR, "$(lopr)")
>        field(HYST, "0.1")
>        field(HHSV, "MAJOR")
>        field(LLSV, "MAJOR")
>        field(HSV,  "MINOR")
>        field(LSV,  "MINOR")
> }
>
> Stephanie Allison
>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On Behalf
>> Of Paul Nord
>> Sent: Wednesday, February 22, 2012 2:29 PM
>> To: EPICS Tech Talk
>> Subject: Alarm for noisy readback channel
>>
>> I've got a network device that's misbehaving.  It "sometimes" reports an absolutely
>> ridiculous value.  I'd like to set an alarm on this PV but I don't want the alarm sounding
>> once or twice an hour when there's not really anything wrong.  (Never cry wolf.)
>>
>>
>> In the typical failure mode it reports a "crazy" value once and then goes back to the normal
>> value.  (The device actually returns the voltage value for a channel when you ask for a
>> current.  And it formats a reply and happily returns "Current: 3600 A", which would be
>> impressive for a supply running at 3600 V.  It works out to 13 MegaWatts.  The real current
>> is just ~100 uA.)
>>
>> What's the best way to deal with this?
>>       A CALC pv that takes this value as an input but returns zero if the reading was
>> outside of some range?
>>       A CALC pv that counts the number of readings which are outside of the proper
>> range?  (e.g. A>1.0?(VAL+1):0 )
>>
>> Are there other good mechanisms?
>>
>> Paul
>>
>>
>> record(ai, "$(SYSTEM):measurement_current_$(SLOT)$(ID)")
>> {
>>  field(DTYP, "Snmp")
>>  field(SCAN, ".5 second")
>>  field(PREC, "6")
>>  field(EGU,  "")
>>  field(INP,  "@$(HOST) pwd WIENER-CRATE-
>> MIB::outputMeasurementCurrent.$(SLOT)$(ID) Float: 100")
>>  field(ADEL, "1")
>> }
>>
>
>


References:
Alarm for noisy readback channel Paul Nord
RE: Alarm for noisy readback channel Allison, Stephanie

Navigate by Date:
Prev: RE: Alarm for noisy readback channel Allison, Stephanie
Next: Re: EDM Installation Error Ed Villasenor
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Alarm for noisy readback channel Allison, Stephanie
Next: Re: EDM Installation Error Ed Villasenor
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024