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  <20112012  2013  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  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: gensub to asub
From: Andrew Johnson <[email protected]>
To: [email protected]
Date: Mon, 24 Jan 2011 13:40:53 -0600
On Monday 24 January 2011 13:04:20 [email protected] wrote:
> On 03:48 Sat 22 Jan, Matthieu Bec wrote:
> > I think your routine needs to return 0 on success to push the values out
>
> Yes, that fixed the problem.
> With gensub I used counter to keep tracks of how many times the record was
> called. For gensub records, the returned value was assigned to the record.

For aSub records the value returned by the subroutine is an error status; if 
it returns a negative number the record goes into SOFT_ALARM with severity 
controlled by the BRSV field.  Positive but non-zero status values do not 
result in an alarm, but they do disable pushing the OUTx links.

> Q: Is there a way to change the value of the asub record?

The VAL field is set to the return status of the subroutine, but it only 
pushes the VALx field values through their OUTx links if that status is zero 
(OK).  You'll want to use a different VALx field to hold your counter.

- Andrew
-- 
If a man is offered a fact which goes against his instincts, he will
scrutinize it closely, and unless the evidence is overwhelming, he will
refuse to believe it.  If, on the other hand, he is offered something
which affords a reason for acting in accordance to his instincts, he
will accept it even on the slightest evidence.  -- Bertrand Russell


References:
gensub to asub emmanuel_mayssat
Re: gensub to asub Matthieu Bec
Re: gensub to asub emmanuel_mayssat

Navigate by Date:
Prev: Re: gensub to asub emmanuel_mayssat
Next: gensub/asub inputs not PP Till Straumann
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: gensub to asub emmanuel_mayssat
Next: Driver for ABC 1260 Neutron Detector / Dosimeter from Framework Scientific Bryce Karnaghan
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  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 ·