EPICS Home

Experimental Physics and Industrial Control System


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

Subject: Re: CA links and EPICS Records user routines
From: Ralph Lange <Ralph.Lange@bessy.de>
To: Andy Foster <ajf@observatorysciences.co.uk>
Cc: EPICS Tech Talk <tech-talk@aps.anl.gov>
Date: Fri, 14 Jan 2005 10:24:29 +0100
Hello Andy,

What would you think about a field with an additional subroutine name instead?

A routine that (if non-null) gets called in case of disconnected input links? This would be empty by default ("NEW" behaviour), and could be set to the same subroutine name as SNAM ("OLD" behaviour) or to a separate routine that does something completely different.

I guess that approach would be more general. It also would avoid a menu type with values "NEW"and "OLD", which are not really comprehensive. (After the next change in core behaviour: Would the new menu choices be "NEWER" and "STEAMING"?)

Cheers,
Ralph


Andy Foster wrote:


Dear All,

This is just an observation about a change in the behaviour of
those EPICS records which can have a user routine associated with
them (i.e. through the SNAM field). In particluar, I have in mind
the sub and genSub records.

Prior to 3.13.8, the user routine was always called, regardless of
whether any CA input link was connected or not. This changed
at 3.13.8 because "dbGetLink" started returning -1 if a link
was disconnected. And, hence, in that case, the user routine never
gets called. And consequently, the output links never fire off
or get updated.

We may be alone in this, but for our telescope systems, we have
a few instances where we have an input CA link to a genSub
and the status of the connection (or the ALARM severity of the
record, if propagated with MS), is used within the user routine
itself to determine what values to use in the calculation.
If the connection is good, it pulls in the real values, if it
is bad, it uses some simulated values or something else. This
design breaks now because the user routine never gets called.
I say value(s) because often it is an array we are dealing with.

I'm sure there are ways around this by using an intervening record
to link to the outside world and so convert all the genSub links
into local DB links but one thing I thought of doing was adding an extra
field to the genSub which could take two values:

OLD meaning ignore the return status for disconnected links
   and call the user routine anyway (and to help support this
   it would nice be if "dbGetLink" returned a different error number
   for a disconnected link than it does for other types of error)

or

NEW behave as 3.13.8 onwards

(The default for the field would be NEW)

I'm just interested to know if this change in behaviour, at 3.13.8,
has affected anyone else besides us! Of course, I'm only
talking about changing the genSub record above, since it is outside of
"base". The change, at 3.13.8, still affects the sub record.

I would be very interested to hear any comments.

Best wishes,

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


--
Ralph Lange               Ralph.Lange@bessy.de     Fon: +49 30 6392-2117
BESSY Controls Group      www.bessy.de             Fax:      ...   -4859


References:
CA links and EPICS Records user routines Andy Foster

Navigate by Date:
Prev: MSVCPRT.LIB bharoto
Next: Solution to a different version of the S_errno_ENOBUFS problem Redman, Russell O.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020 
Navigate by Thread:
Prev: CA links and EPICS Records user routines Andy Foster
Next: RE:counting semaphore for 3.14.x Kate Feng
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020