Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Interesting problem in EPICS 3.13.5 and earlier
From: Andy Foster <ajf@observatorysciences.co.uk>
To: Epics Questions <tech-talk@aps.anl.gov>
Date: Mon, 17 Mar 2003 17:44:33 +0000 (GMT)
Dear All,

I've just been working with Marty to track down a problem
which I experienced in EPICS release 3.13.4. Actually, the
problem was shown to me by Steven Beard of the UK ATC and
Philip Taylor of OSL.

There are 3 records in the database, 2 longouts and a CALC.
Longout A has it's DOL field referencing the CALC VAL field.
Longout B has it's DOL field referencing a record which
does not exist anywhere on my LAN.

The CALC record is set up as a simple counter, incrementing
every second.

The longout's are also set on a 1 second SCAN.

When I use cau to monitor longout A, I see it incrementing every second
as expected.

However, when I use cau to monitor longout B, I also see this
incrementing every second. Further, when I set the SCAN field
of the CALC record to Passive, longout A AND longout B stop
updating. Clearly, longout B is somehow getting the value of
the CALC record, even though it's DOL field is referencing a
non-existent record.

We traced this down to a bug in the 3.13.4 release of
"base/src/db/dbCa.c", (routine "dbCaGetLink"):

    if(!pca->chid || ca_state(pca->chid) != cs_conn) {
        pca->sevr = INVALID_ALARM;
        goto done;
    }

should be:

    if(!pca->chid || ca_state(pca->chid) != cs_conn) {
        pca->sevr = INVALID_ALARM; status = -1;
        goto done;
    }

NOTE: THIS HAS BEEN FIXED IN RELEASES OF BASE FROM 3.13.6
      ONWARDS

However, the point of this message is just to make anyone using
earlier releases of base aware of the problem.

In our particular application, we were using the DOL field to
pull in the value of a heartbeat from another IOC. We wanted to
notice when the other system went down. However, due to this
problem, it always looked like the other system was up and running.

For anyone interested, here is a database which will show the
problem:

record(longout,"test:B") {
    field(DESC,"long output record")
    field(SCAN,"1 second")
    field(PINI,"NO")
    field(PHAS,"0")
    field(EVNT,"0")
    field(DTYP,"Soft Channel")
    field(DISV,"1")
    field(SDIS,"0.000000000000000e+00")
    field(DISS,"NO_ALARM")
    field(PRIO,"LOW")
    field(FLNK,"0.000000000000000e+00")
    field(OUT,"0.000000000000000e+00")
    field(DOL,"test:xxx NPP NMS")
    field(OMSL,"closed_loop")
    field(IVOA,"Continue normally")
    field(IVOV,"0")
}
record(longout,"test:A") {
    field(DESC,"long output record")
    field(SCAN,"1 second")
    field(PINI,"NO")
    field(PHAS,"0")
    field(EVNT,"0")
    field(DTYP,"Soft Channel")
    field(DISV,"1")
    field(SDIS,"0.000000000000000e+00")
    field(DISS,"NO_ALARM")
    field(PRIO,"LOW")
    field(FLNK,"0.000000000000000e+00")
    field(OUT,"0.000000000000000e+00")
    field(DOL,"test:calc NPP NMS")
    field(OMSL,"closed_loop")
    field(IVOA,"Continue normally")
    field(IVOV,"0")
}
record(calc,"test:calc") {
    field(DESC,"calculation record")
    field(SCAN,"1 second")
    field(PINI,"NO")
    field(PHAS,"0")
    field(EVNT,"0")
    field(DISV,"1")
    field(SDIS,"0.000000000000000e+00")
    field(DISS,"NO_ALARM")
    field(PRIO,"LOW")
    field(FLNK,"0.000000000000000e+00")
    field(CALC,"A+1")
    field(INPA,"test:calc.VAL .NPP.NMS")
}

I'd like to thank Marty for his help.

Cheers,

Andy

--------------------------------------------------------------------
Observatory Sciences Limited    Email: ajf@observatorysciences.co.uk
William James House             Tel: 44 - (0)1223 - 508259
Cowley Road                     Fax: 44 - (0)1223 - 508258
Cambridge, CB4 0WX, UK          http://www.observatorysciences.co.uk


Navigate by Date:
Prev: Re: compile problem medmCartesianPlot Burkhard Kolb
Next: PC-104/Plus as IOC's Billy R. Adams
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Re: compile problem medmCartesianPlot Burkhard Kolb
Next: PC-104/Plus as IOC's Billy R. Adams
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·