Hi Amien,
I have a few comments and questions.
In "cur" you have this line:
field(INPB, "$(dev):coefOffset.PROC CP MS")
I don't think this will work. You have CP on the PROC field, meaning you want the record to process when the PROC field changes. However, EPICS does not post monitors on the PROC field according to this document:
https://wiki-ext.aps.anl.gov/epics/index.php/RRM_3-14_dbCommon
In coefOffset you have this line:
field(FLNK, "$(dev):newcur")
This will process newcur, but not cause it to obtain a new value. Is this intended?
In calc_offset1 you have this line:
field(OUT, "$(dev):newcur")
The will write the new value to newcur, but without processing newcur. Is this intended? It means newcur will only process when coefOffset is processed.
You have not shown the "range" record. Does that have an FLNK to coefOffset?
Mark
________________________________
From: [email protected] <[email protected]> on behalf of Amien WORK <[email protected]>
Sent: Thursday, January 25, 2018 3:25 AM
To: EPICS Tech-Talk
Subject: CalcOut record update to another record
Hi
record(calcout, "$(dev):cur")
{
field(INPA, "$(dev):raw_cur.VAL CP MS")
field(INPB, "$(dev):coefOffset.PROC CP MS")
field(OOPT, "Every Time")
field(DOPT, "Use CALC")
field(CALC, "A-B")
field(FLNK, "$(dev):rangeunit")
}
record(ao, "$(dev):newcur")
{
field(DTYP, "Soft Channel")
}
record(sel, "$(dev):coefOffset")
{
field(SELM, "Specified")
field(NVL, "$(dev):range")
field(INPB, "$(dev):calc_offset1.VAL")
field(INPC, "$(dev):calc_offset2.VAL")
field(INPD, "$(dev):calc_offset3.VAL")
field(INPE, "$(dev):calc_offset4.VAL")
field(INPF, "$(dev):calc_offset5.VAL")
field(INPG, "$(dev):calc_offset6.VAL")
field(INPH, "$(dev):calc_offset7.VAL")
field(INPI, "$(dev):calc_offset8.VAL")
field(FLNK, "$(dev):newcur")
}
## below is offset1 of 8 possible offsets I need to save
record(bo, "$(dev):store_offset1")
{
field(PINI, "YES")
field(VAL, "0")
field(FLNK, "$(dev):calc_offset1" )
}
record(bo, "$(dev):clear_offset1")
{
field(VAL, "0")
field(OUT, "$(dev):store_offset1")
field(FLNK, "$(dev):store_offset1")
}
record(calcout, "$(dev):calc_offset1")
{
field(PINI, "YES")
field(INPA, "$(dev):raw_cur.VAL") # rawval
field(INPB, "$(dev):store_offset1")
field(OOPT, "Every Time")
field(DOPT, "Use CALC")
field(CALC, "B=1?A:0*A")
field(OUT, "$(dev):newcur")
}
My problem is that I see the calculated values like $(dev):calc_offset1 correctly, but the $(dev):newcur shows 0.
I want to have a 'current' offset (newcur) that changes depending on what the current 'range' is (user can select Range 1 to 8)
Amien
- References:
- CalcOut record update to another record Amien WORK
- Navigate by Date:
- Prev:
Problems with scaler record on epics archiver Gabriel de Souza Fedel
- Next:
Re: Problems with scaler record on epics archiver Mark Rivers
- 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
- Navigate by Thread:
- Prev:
CalcOut record update to another record Amien WORK
- Next:
Problems with scaler record on epics archiver Gabriel de Souza Fedel
- 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
|