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: Calcout using CA output link sometimes gets INVALID severity
From: Andrew Johnson <anj@aps.anl.gov>
To: tech-talk@aps.anl.gov
Date: Fri, 12 Oct 2012 10:09:52 -0500
Hi Lewis,

On 2012-10-11 J. Lewis Muir wrote:
> I've got a problem with a calcout record where, if I do a dbpf
> after iocInit on an ao record that has a forward link to the
> calcout record which in turn reads the ao record VAL field and
> writes a calculated value to an ai record using a Channel Access
> output link, sometimes the calcout record's SEVR field will be
> INVALID, and it does not write the calculated value to the ai
> record.  This doesn't happen every time, but I can usually get
> it to happen within 5 tries.  If I change the output link type
> from CA to PP, the problem goes away.  Does anyone know what's
> wrong?

Is the dbpf that triggers this in the IOC's startup script, or being issued 
manually?  I'm guessing it's in the script, and I suspect what's happening 
when you get the link alarm may be that the CA link hasn't finished connecting 
up by the time the dbpf runs.  CA link processing involves several different 
threads even when the target PV is local, and if they haven't all had a chance 
to finish before the calcout runs and uses the link then the link operation 
will fail and put the record into a LINK/INVALID alarm state.

Try inserting an epicsThreadSleep(2) delay between iocInit and the dbpf 
command, which should be enough time for your local CA links to connect up.

- Andrew
-- 
Never interrupt your enemy when he is making a mistake.
-- Napoleon Bonaparte

Replies:
Re: Calcout using CA output link sometimes gets INVALID severity J. Lewis Muir
References:
Calcout using CA output link sometimes gets INVALID severity J. Lewis Muir

Navigate by Date:
Prev: Re: API to get list of record names Benjamin Franksen
Next: Re: Calcout using CA output link sometimes gets INVALID severity 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 
Navigate by Thread:
Prev: Calcout using CA output link sometimes gets INVALID severity J. Lewis Muir
Next: Re: Calcout using CA output link sometimes gets INVALID severity 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 ·