g+
g+ Communities
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  <20122013  2014  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
<== Date ==> <== Thread ==>

Subject: calc VAL field not updating from bi VAL field
From: "J. Lewis Muir" <jlmuir@imca-cat.org>
To: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Tue, 29 May 2012 22:09:53 -0500
I've got a problem where a calc record's VAL field is not
updating when I expect it to.

I load the following database into my IOC:

calc-bi.db >>>
record(bi, "$(P)Unidig1Bi1") {
  field(ZNAM, "Low")
  field(ONAM, "High")
}

record(calc, "$(P)ClcBacklightBi") {
  field(INPA, "$(P)Unidig1Bi1.VAL CP MS")
  field(CALC, "A=1?1:0")
}
<<<

like this:

st.cmd >>>
...
dbLoadRecords("calc-bi.db","P=17lab:")
...
<<<

I then start camonitor:

camonitor console >>>
$ camonitor 17lab:ClcBacklightBi.VAL 17lab:ClcBacklightBi.A
17lab:ClcBacklightBi.VAL       2012-05-29 19:48:44.845452 1 LINK
INVALID
17lab:ClcBacklightBi.A         2012-05-29 19:48:44.845452 0 LINK
INVALID
<<<

And then I perform a series of caput commands in another console:

caput console >>>
$ caput 17lab:Unidig1Bi1.VAL 0
Old : 17lab:Unidig1Bi1.VAL           Low
New : 17lab:Unidig1Bi1.VAL           Low
$ caput 17lab:Unidig1Bi1.VAL 1
Old : 17lab:Unidig1Bi1.VAL           Low
New : 17lab:Unidig1Bi1.VAL           High
$ caput 17lab:Unidig1Bi1.VAL 0
Old : 17lab:Unidig1Bi1.VAL           High
New : 17lab:Unidig1Bi1.VAL           Low
$ caput 17lab:Unidig1Bi1.VAL 1
Old : 17lab:Unidig1Bi1.VAL           Low
New : 17lab:Unidig1Bi1.VAL           High
<<<

camonitor shows the following:

camonitor console >>>
17lab:ClcBacklightBi.VAL       2012-05-29 21:11:28.307312 1
17lab:ClcBacklightBi.A         2012-05-29 21:11:28.307312 0
17lab:ClcBacklightBi.A         2012-05-29 21:11:33.423978 1
17lab:ClcBacklightBi.A         2012-05-29 21:11:36.990645 0
17lab:ClcBacklightBi.A         2012-05-29 21:12:32.507352 1
<<<

As you can see, the 17lab:ClcBacklightBi record's VAL field
updates once when the record first processes and then never
again.  The "A" field is updating correctly as I change
17lab:Unidig1Bi1.VAL, but 17lab:ClcBacklightBi.VAL never updates
again.

If I change the CALC expression to "A", the VAL field updates
correctly.  If I change it back, it stops working again.

Environment:
* VME processor module: Motorola MVME-2100 (vxWorks-ppc603)
  - CPU: MPC 8240
  - Memory: 32 MB
* OS: VxWorks 5.5.2
* Kernel: WIND 2.6
* BSP: mv2100-asd5 (by Andrew Johnson)
* Build toolchain: Tornado 2.2.2
* EPICS 3.14.12.2 (+Known Problems patches)

I tried this on darwin-x86 (x86_64) and it did not fail, so to
date it is only failing for me on my VME systems.  (I initially
discovered the problem on an MVME-5100.)

This worked fine with older software (i.e. VxWorks 5.4.2 with
EPICS 3.14.11) on my VME systems.

Thanks,

Lewis

Replies:
RE: calc VAL field not updating from bi VAL field Hu, Yong
RE: calc VAL field not updating from bi VAL field Allison, Stephanie
Re: calc VAL field not updating from bi VAL field Tim Mooney
Re: calc VAL field not updating from bi VAL field J. Lewis Muir

Navigate by Date:
Prev: Re: CSS-BOY combo boxes Christian Roehrig
Next: RE: calc VAL field not updating from bi VAL field Hu, Yong
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
Navigate by Thread:
Prev: Re: CSS-BOY combo boxes Christian Roehrig
Next: RE: calc VAL field not updating from bi VAL field Hu, Yong
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICSv4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·