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

Subject: RE: epicsAtExit
From: Mark Rivers <[email protected]>
To: "'Andrew Johnson'" <[email protected]>, "Szalata, Zenon M." <[email protected]>
Cc: "[email protected]" <[email protected]>
Date: Thu, 28 Jun 2012 20:53:05 +0000
Closing vxWorks network connections cleanly is really important for some devices, particularly when talking to other vxWorks systems.  An example is the Newport XPS-C8 motor controller, which runs vxWorks internally.  If your vxWorks IOC does not cleanly close the network connection to an XPS when rebooting, then it can take 5 minutes or more to reconnect to the XPS when you reboot.  The same is true when trying to reconnect to another vxWorks IOC.  The more times you reboot, the longer it takes to reconnect if you don't close the connections cleanly.

Mark


-----Original Message-----
From: Andrew Johnson [mailto:[email protected]] 
Sent: Thursday, June 28, 2012 2:25 PM
To: Szalata, Zenon M.
Cc: [email protected]; Mark Rivers; Williams Jr., Ernest L.
Subject: Re: epicsAtExit

Hi Zen,

On 2012-06-28 Szalata, Zenon M. wrote:
> Is it desirable
> to have the vxWorks routine sysAtReboot(), that is, how important it is? I
> could ask Ernest to include whatever needs to be included and rebuild
> vxWorks to have this routine available.

The advantage of having it is that vxWorks IOCs get to shut down their CA 
other network connections nicely.  It might be essential with some badly-
written network attached devices though, I think there were some LAN-GPIB 
devices that really needed it.  The rebootHookAdd() call that you're using is 
fine if you only need to disable hardware interrupts, but by the time the 
epicsAtExit() routines get to run the vxWorks network stack has been shut down 
so the CA server and any Asyn network Port code can't close their sockets 
properly.

> On the other hand, adding
> rebootHookAdd(epicsExitCallAtExits) to my st.cmd file fixes my immediate
> problem. Thank you again,

It sounds like you don't /need/ the sysAtReboot() code for your IOC, although 
having it would remove the need for you to run that yourself.  If Ernest wants 
to add it he can find out what to do here:
    http://www.aps.anl.gov/epics/tech-talk/2005/msg00004.php

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


References:
epicsAtExit Szalata, Zenon M.
Re: epicsAtExit Andrew Johnson
RE: epicsAtExit Szalata, Zenon M.
Re: epicsAtExit Andrew Johnson

Navigate by Date:
Prev: Re: epicsAtExit Andrew Johnson
Next: ethernet-based Gamma ion pump controller (mpc) Scott Baily
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: epicsAtExit Andrew Johnson
Next: LabVIEW EPICS connection Steve Kinder
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  <20122013  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 ·