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  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 
<== Date ==> <== Thread ==>

Subject: Re: Handling failures in st.cmd
From: Till Straumann <strauman@slac.stanford.edu>
To: tech-talk@aps.anl.gov
Date: Thu, 12 May 2011 19:02:18 -0500
On 05/12/2011 05:22 PM, Zelazny, Michael Stanley wrote:
If, for example, dbLoadRecords, initializing some hardware module, cd("some/dir"), etc. fails while an IOC is booting, is there any way to trap this in my st.cmd and take an action, such as abort the IOC boot?




Under RTEMS (cexpsh shell -- every line is a C expression)
you can easily do that (provided that the routine you want to trap returns a status)

dbLoadRecords(...) && bsp_reset()

will reset the board if dbLoadRecords() returns
a non-zero value.

However, rebooting is maybe not the best way to
handle this since you will most likely end up in
an endless loop (since the error condition doesn't
go away with a reboot).

HTH
-- Till

Replies:
Re: Handling failures in st.cmd Ernest L. Williams Jr.
References:
Handling failures in st.cmd Zelazny, Michael Stanley

Navigate by Date:
Prev: Handling failures in st.cmd Zelazny, Michael Stanley
Next: Re: Handling failures in st.cmd Ernest L. Williams Jr.
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 
Navigate by Thread:
Prev: Handling failures in st.cmd Zelazny, Michael Stanley
Next: Re: Handling failures in st.cmd Ernest L. Williams Jr.
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 
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 ·