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  2009  2010  2011  <20122013  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  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: calc VAL field not updating from bi VAL field
From: Mark Rivers <[email protected]>
To: Tim Mooney <[email protected]>, "J. Lewis Muir" <[email protected]>
Cc: EPICS Tech Talk <[email protected]>
Date: Wed, 30 May 2012 21:08:01 +0000
I was able to reproduce Lewis' results on exactly the same configuration:

MVME2100
vxWorks 5.5.2
EPICS 3.14.2.2
BSP: mv2100-asd5 (by Andrew Johnson)



I was also able to reproduce it on the MVME2700, and Lewis said he already reproduced it on the MVME5100.  Since those constitute the vast majority of CPUs in use at the APS this is a serious problem.  I just saw his message that said it goes away with -O0.  L hope we can get a fixed cross-compiler!


corvette:CARS/iocBoot/ioc13lab>more bi_test.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")
}

corvette:CARS/iocBoot/ioc13lab>caput 13LAB:Unidig1Bi1.VAL 0
Old : 13LAB:Unidig1Bi1.VAL           Low
New : 13LAB:Unidig1Bi1.VAL           Low
corvette:CARS/iocBoot/ioc13lab>caput 13LAB:Unidig1Bi1.VAL 1
Old : 13LAB:Unidig1Bi1.VAL           Low
New : 13LAB:Unidig1Bi1.VAL           High
corvette:CARS/iocBoot/ioc13lab>caput 13LAB:Unidig1Bi1.VAL 0
Old : 13LAB:Unidig1Bi1.VAL           High
New : 13LAB:Unidig1Bi1.VAL           Low
corvette:CARS/iocBoot/ioc13lab>caput 13LAB:Unidig1Bi1.VAL 1
Old : 13LAB:Unidig1Bi1.VAL           Low
New : 13LAB:Unidig1Bi1.VAL           High
corvette:CARS/iocBoot/ioc13lab>caput 13LAB:Unidig1Bi1.VAL 0
Old : 13LAB:Unidig1Bi1.VAL           High
New : 13LAB:Unidig1Bi1.VAL           Low
corvette:CARS/iocBoot/ioc13lab>caput 13LAB:Unidig1Bi1.VAL 1
Old : 13LAB:Unidig1Bi1.VAL           Low
New : 13LAB:Unidig1Bi1.VAL           High



corvette:CARS/iocBoot/ioc13ida>camonitor 13LAB:ClcBacklightBi.VAL 13LAB:ClcBacklightBi.A
13LAB:ClcBacklightBi.VAL       2012-05-30 15:48:13.655935 1 LINK INVALID
13LAB:ClcBacklightBi.A         2012-05-30 15:48:13.655935 0 LINK INVALID
13LAB:ClcBacklightBi.VAL       2012-05-30 15:49:16.957795 1
13LAB:ClcBacklightBi.A         2012-05-30 15:49:16.957795 0
13LAB:ClcBacklightBi.A         2012-05-30 15:49:22.041128 1
13LAB:ClcBacklightBi.A         2012-05-30 15:49:27.607795 0
13LAB:ClcBacklightBi.A         2012-05-30 15:49:30.024461 1
13LAB:ClcBacklightBi.A         2012-05-30 15:49:31.641128 0
13LAB:ClcBacklightBi.A         2012-05-30 15:49:32.557795 1


________________________________________
From: [email protected] [[email protected]] on behalf of Tim Mooney [[email protected]]
Sent: Wednesday, May 30, 2012 2:21 PM
To: J. Lewis Muir
Cc: EPICS Tech Talk
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" <[email protected]>
To: "EPICS Tech Talk" <[email protected]>
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 ([email protected]) (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 Andrew Johnson
References:
calc VAL field not updating from bi VAL field J. Lewis Muir
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 J. Lewis Muir
Next: Re: calc VAL field not updating from bi VAL field Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: calc VAL field not updating from bi VAL field J. Lewis Muir
Next: Re: calc VAL field not updating from bi VAL field Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·