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  <20132014  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  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== 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 @ all,

Thanks for the replies.

@Wesley: I guess you mean this: http://www-csr.bessy.de/control/SoftDist/sequencer/
I haven't heard of that before. I had a quick look so far, but I'm not really sure how this can help me, yet. But I'll investigate more later, because I found a different solution by now - but thanks anyway. ;-)

@Tim: That should work, too - thanks for telling me.

I had another look at the available record types and found out that the selection record does the trick. For the selection record not existing pvs are zero, like a pv.STAT with status No_Alarm. So I exchanged my calc records with sel records and chose 'High Signal' in the SELM field. This way the pvs created by the sel record are zero as long as there is no alarm - in case there is one, the value of this STAT field and hence  the pvs from the sel record are bigger than 0, and that's exactly what I wanted.

Thanks again!

Regards,
Tito


2013/10/30 Mooney, Tim M. <[email protected]>
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

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.
I use a substitution file containing all used combinations, of box-level-channel.

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:

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")
...

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:

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")
}

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?

Regards,
Tito


References:
merge multiple alarms Tito Körner
RE: merge multiple alarms Mooney, Tim M.

Navigate by Date:
Prev: RE: Asyn asynDrvUser interface Mark Rivers
Next: Channel access over wireless? Emmanuel Mayssat
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: merge multiple alarms Mooney, Tim M.
Next: GTR: thread-safety issue with devGtr.c Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  <20132014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 20 Apr 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·