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  <20092010  2011  2012  2013  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  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Alarm Limits
From: Dirk Zimoch <[email protected]>
To: Pierrick Hanlet <[email protected]>
Cc: [email protected]
Date: Thu, 19 Mar 2009 13:38:44 +0100
Hi Pierrick,

Somehow you have to process the calcout records. For example with a FLNK from Q1SetCurrent to the first calcout and then with FLNK from one calcout the next one.

Also be aware that the ai record changes its alarm status only when it processes. That means if the value suddenly falls into the new alarm limit you will see the effect only when the record is processed the next time. Depending on the SCAN settings, this delay may be noticeable. You may use PP in the OUT link of the last calcout record to the ai record or another FLNK to force re-processing of the ai.

Changing the alarm limits on the fly might confuse some client programs. The records will behave correctly (i.e. change their alarm status at the new limits), but client programs that display alarm limits (e.g. as colored areas on a meter or bar) usually only read the limits when they connect for the first time.


Dirk

Mark Rivers wrote:
Hi Pierrick,
You can use a calcout, but not the way you are doing it. You are not actually using the output of the calcout to write the values to the .HIHI field, you are trying to use the ai record to read the values from the calcout: record(ai, "$(user):Q1ReadCurrent") {
...
        field(HIHI, "$(user):calcQ1I_HiHi.VAL")
        field(HIGH, "$(user):calcQ1I_High.VAL")

That won't work, because the HIHI etc. fields are not input links. You need to do something like the following:
record(calcout, "$(user):calcQ1I_LoLo") {
        field(DESC, "Q1 I Min Major limit")
        field(PREC, "3")
        field(INPA, "$(user):Q1SetCurrent.VAL  NPP NMS")
        field(INPB, "$(user):ILimMajor.VAL  NPP NMS")
        field(CALC, "A-A*B")
    --> field(OUT, "$(user):Q1ReadCurrent.HIHI  NPP NMS")
}

You might also want to change under what conditions the calcout writes its output: only on change, etc.
Mark

________________________________

From: [email protected] on behalf of Pierrick Hanlet
Sent: Thu 3/19/2009 6:10 AM
To: [email protected]
Subject: Alarm Limits




Hi,
Can one use the output of a calc or a calcout routine to set values for HIHI, HIGH,
LOW, and LOLO?  When I load my database, I always get errors in these lines.  Is
there some sort of special incantation that I must do?

Here's what I have.  I've used camonitor to check that all of the records leading
up to and including the calc records work as expected.  For the calcout routines,
I have a value between 0<= VAL <=1 for ILimMajor and ILimMinor.  The calcout
records appear to do what I want them to do:

======================================
record(calcout, "$(user):calcQ1I_HiHi") {
        field(DESC, "Q1 I Max Major limit")
        field(PREC, "3")
        field(INPA, "$(user):Q1SetCurrent.VAL  NPP NMS")
        field(INPB, "$(user):ILimMajor.VAL  NPP NMS")
        field(CALC, "A+(A*B)")
}
record(calcout, "$(user):calcQ1I_High") {
        field(DESC, "Q1 I Max Minor limit")
        field(PREC, "3")
        field(INPA, "$(user):Q1SetCurrent.VAL  NPP NMS")
        field(INPB, "$(user):ILimMinor.VAL  NPP NMS")
        field(CALC, "A+A*B")
}
record(calcout, "$(user):calcQ1I_Low") {
        field(DESC, "Q1 I Min Minor limit")
        field(PREC, "3")
        field(INPA, "$(user):Q1SetCurrent.VAL  NPP NMS")
        field(INPB, "$(user):ILimMinor.VAL  NPP NMS")
        field(CALC, "A-A*B")
}
record(calcout, "$(user):calcQ1I_LoLo") {
        field(DESC, "Q1 I Min Major limit")
        field(PREC, "3")
        field(INPA, "$(user):Q1SetCurrent.VAL  NPP NMS")
        field(INPB, "$(user):ILimMajor.VAL  NPP NMS")
        field(CALC, "A-A*B")
}
record(ai, "$(user):Q1ReadCurrent") {
        field(DESC, "Q1 Magnet Readback Current")
        field(PREC, "3")
        field(INP,  "$(user):rampQ1Current.VAL NPP NMS")
        field(EGUF, "10")
        field(EGU,  "A")
        field(HOPR, "2000")
        field(LOPR, "0")
        field(HIHI, "$(user):calcQ1I_HiHi.VAL")
        field(HIGH, "$(user):calcQ1I_High.VAL")
        field(LOW,  "$(user):calcQ1I_Low.VAL")
        field(LOLO, "$(user):calcQ1I_LoLo.VAL")
        field(HHSV, "MAJOR")
        field(HSV,  "MINOR")
        field(LSV,  "MINOR")
        field(LLSV, "MAJOR")
        field(FLNK, "$(user):Q1RampCurrent.PROC")
}
======================================
Thanks,
Pierrick


-----------------------------------------------------------------------------------------
Pierrick Hanlet
Fermilab, P.O. Box 500, M.S. 122
Batavia, IL 60510
[email protected]
(630)840-5555/8871/6039         office/lab/fax
http://www-d0.fnal.gov/~hanlet

"Whether you think you can or think you can't, either way, you are correct" -- Henry Ford







--
Dr. Dirk Zimoch
Paul Scherrer Institut, WBGB/006
5232 Villigen PSI, Switzerland
Phone +41 56 310 5182

Replies:
Re: Alarm Limits Benjamin Franksen
References:
Alarm Limits Pierrick Hanlet
RE: Alarm Limits Mark Rivers

Navigate by Date:
Prev: RE: Alarm Limits Mark Rivers
Next: Re: epics GUIs (update) Tom Pelaia
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Alarm Limits Mark Rivers
Next: Re: Alarm Limits Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·