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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: merge multiple alarms |
From: | Tito Körner <[email protected]> |
To: | "Mooney, Tim M." <[email protected]> |
Cc: | "[email protected]" <[email protected]> |
Date: | Thu, 31 Oct 2013 15:28:35 +0100 |
Hi Tito,
If you used the calcout record, you could have, say, calcout.INPA linked to an input PV, and calcout.INPB linked
to calcout.INAV, which contains the link state of calcout.INPA (zero if the link is bad). Then you could have a
calc subexpression like this: "b?a:1".
Tim Mooney
From: [email protected] [[email protected]] on behalf of Tito Körner [[email protected]]
Sent: Tuesday, October 29, 2013 1:46 PM
To: [email protected]
Subject: merge multiple alarms
TitoRegards,When using caget to see the value of the checkit record it is '0' - what basically would be perfect - as far as I understand it, the No_Alarm state is also represented by a zero. But unfortunatelly this is not the case - level_status pvs containg nonexisting channel pvs become 0 and not 1 as I would need it. What can I do?Basically this works - I get a calc record that is either 0 or 1 depending if there is an alarm in one of the pvs or not. The problem is that some channels are not used and I'd prefer to not have them in my substitution file. Now lets say channel 7, level 4 of box 10 is not in use. Then there is a problem with the corresponding INP field in the calc record to calculate the status of the level because of this line:Using a calc record (BOX:$(BOXNO):<levelnumber>:level_stat I compare if all .STAT fields of the channels of one level are 0 or not (as calc records cannot deal with 40 inputs I decided to seperate the evaluation in all channels from one level and then all levels from one box). The INP fields of the level_status record look like this:I use a substitution file containing all used combinations, of box-level-channel.Hello,I have a set of pvs (created via an ai record and a substitution file) representing the channels of high voltage boxes looking like this:
BOX:<boxnumber>:<levelnumber>:<channelnumber>:read_volt
Now I'd like to have a record for each box, that displays if one of the voltage values is drifting away by using the alarm states of the ai record. The boxes are organised the following way: every box has 5 'levels' and each of them has 8 'channels' - so I have 40 voltage outputs per box.
field (INPA, "BOX:$(BOXNO):$(LEVELNO):0:read_volt.STAT")
field (INPA, "BOX:$(BOXNO):$(LEVELNO):1:read_volt.STAT")
...
Then I use another calc record that checks if all levels of a box are 1:
field (INPA, "BOX:$(BOXNO):0:level_stat")
...
field (INPH, "BOX:$(BOXNO):$(LEVELNO):7:read_volt.STAT")
I tried to understand what happens in the calc record when such an input does not exist by creating the following calc record:
record (calc, "checkit")
{
field (INPA, ":BOX:10:4:7:read_volt.STAT")
field (CALC, "A")
field (SCAN, ".1 second")
}