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
- Replies:
- Re: Alarm Limits Dirk Zimoch
- References:
- Alarm Limits Pierrick Hanlet
- Navigate by Date:
- Prev:
RE: Alarm Limits Owens, PH (Peter)
- Next:
Re: Alarm Limits Dirk Zimoch
- 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:
RE: Alarm Limits Owens, PH (Peter)
- Next:
Re: Alarm Limits Dirk Zimoch
- 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
|