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

Subject: Re: calc VAL field not updating from bi VAL field
From: Tim Mooney <mooney@aps.anl.gov>
To: "J. Lewis Muir" <jlmuir@imca-cat.org>
Cc: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Wed, 30 May 2012 14:29:03 -0500 (CDT)
Oops,  I mean "a!=1?0:1".  Also, how's "1=1" working for you?
Tim

----- Original Message -----
From: "Tim Mooney" <mooney@aps.anl.gov>
To: "J. Lewis Muir" <jlmuir@imca-cat.org>
Cc: "EPICS Tech Talk" <tech-talk@aps.anl.gov>
Sent: Wednesday, May 30, 2012 2:21:43 PM
Subject: Re: calc VAL field not updating from bi VAL field

Lewis,
This is just bizarre.  I don't see this problem on a roughly comparable VME system.  I'm stumped and flailing.
Two things that I haven't seen proof of so far are that the calc record actually is processing, and that the "=" operator works.
Could you set 17lab:ClcBacklightBi.TPRO to 1, and also try "a<>1?0:1".
Could you try a calcout record, so you can check the CLCV field?
Tim

----- Original Message -----
From: "J. Lewis Muir" <jlmuir@imca-cat.org>
To: "EPICS Tech Talk" <tech-talk@aps.anl.gov>
Sent: Tuesday, May 29, 2012 10:09:53 PM
Subject: calc VAL field not updating from bi VAL field

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

-- 
Tim Mooney (mooney@aps.anl.gov) (630)252-5417
Software Services Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab

-- 
Tim Mooney (mooney@aps.anl.gov) (630)252-5417
Software Services Group (www.aps.anl.gov)
Advanced Photon Source, Argonne National Lab

Replies:
Re: calc VAL field not updating from bi VAL field J. Lewis Muir
References:
Re: calc VAL field not updating from bi VAL field Tim Mooney

Navigate by Date:
Prev: Re: calc VAL field not updating from bi VAL field Tim Mooney
Next: Re: calc VAL field not updating from bi VAL field Maren Purves
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
Navigate by Thread:
Prev: Re: calc VAL field not updating from bi VAL field Tim Mooney
Next: Re: calc VAL field not updating from bi VAL field J. Lewis Muir
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·