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: aSubRecord VAL field
From: Bruce Hill <[email protected]>
To: Techtalk <[email protected]>
Date: Wed, 14 Sep 2011 22:04:58 -0700
I have an application where I'm using aSub to calculate RMS for an array.
It worked fine when I just wanted to generate the RMS value and return it
via VAL. However, when I extended the routine to also calculate MIN and MAX
and return them via OUT links, I found that if my SNAM routine returns a
non-zero value, it's treated as a status error and aSubRecord.c suppresses the
updates of the output links.

I'm getting around it by returning zero from my SNAM routine and returning
all my results via OUT link waveforms, but it seems we should either update
the wiki documentation to note this behaviour or modify aSubRecord.c to not
treat the SNAM return value as an error code.

i.e.
--- rec/aSubRecord.c    (revision 7338)
+++ rec/aSubRecord.c    (working copy)
@@ -269,8 +269,7 @@
    }

    if (!status) {
-        status = do_sub(prec);
-        prec->val = status;
+        prec->val = do_sub(prec);
    }

I'm running base version 3.14.12.
Comments welcome.

Thanks,
- Bruce

--
Bruce Hill
Member Technical Staff
SLAC National Accelerator Lab
2575 Sand Hill Road M/S 10
Menlo Park, CA  94025


Replies:
RE: aSubRecord VAL field Hu, Yong

Navigate by Date:
Prev: Re: Another newbie question - seq record example? Paul Nord
Next: RE: aSubRecord VAL field Hu, Yong
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: ioc linux crash using errlogprintf Davidsaver, Michael
Next: RE: aSubRecord VAL field Hu, Yong
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 ·