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

Subject: RE: asyn/stream reconnect problems
From: "Mark Rivers" <[email protected]>
To: "Allison, Stephanie" <[email protected]>, "EPICS Tech-Talk" <[email protected]>
Date: Thu, 1 May 2008 10:37:00 -0500
Hi Stephanie,

Thanks for finding this bug.  I have committed the fix to CVS.  I will
be in asyn R4-10 which should be released soon.

Mark
 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of Allison, Stephanie
> Sent: Wednesday, April 30, 2008 12:52 PM
> To: EPICS Tech-Talk
> Subject: Re: asyn/stream reconnect problems
> 
> Hello,
> 
> I'm currently upgrading all my GPIB device support from 
> old-style GPIB to new-style GPIB/ASYN support and find myself 
> struggling with a similar problem reported by Benjamin 
> Franksen in January:
> 
> http://www.aps.anl.gov/epics/tech-talk/2008/msg00066.php
> 
> In my case, the first time the LAN/GPIB gateway box is 
> power-cycled after an IOC reboot, everything automatically 
> reconnects but the second (and all times afterward), only the 
> port automatically reconnects and not the device.  I can 
> manually reconnect the device by setting the CNCT field of 
> the ASYN record but this shouldn't be required since the 
> device has the autoConnect attribute set.  Perhaps this has 
> been fixed or reported already (sorry if it has!), but in 
> asyn version 4-9, there is a bug in the routine 
> autoConnectDevice in asyn/asynDriver/asynManager.c where 
> pport pointer is accidentally used instead of pdevice.  When 
> fixed, I have no problems reconnecting after power cycles:
> 
>     if(!pdevice->dpc.connected
>     &&  pdevice->dpc.autoConnect
>     && !pdevice->dpc.autoConnectActive) {
>         epicsTimeStamp now;
> 
>         epicsTimeGetCurrent(&now);
>         if(epicsTimeDiffInSeconds(
>             &now,&pdevice->dpc.lastConnectDisconnect) < 2.0) 
> return FALSE;
>         epicsTimeGetCurrent(&pdevice->dpc.lastConnectDisconnect);
>         pdevice->dpc.autoConnectActive = TRUE;
>         epicsMutexUnlock(pport->asynManagerLock);
>         connectAttempt(&pdevice->dpc);
>         epicsMutexMustLock(pport->asynManagerLock);
> /*****  pport is the wrong *****/
> /****   pport->dpc.autoConnectActive = FALSE;   *****/
> 	  pdevice->dpc.autoConnectActive = FALSE;
>     }
> 
> Stephanie Allison
> 
> 


References:
Re: asyn/stream reconnect problems Allison, Stephanie

Navigate by Date:
Prev: Re: asyn/stream reconnect problems Allison, Stephanie
Next: CAS-client: Message Szalata, Zenon M.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: asyn/stream reconnect problems Allison, Stephanie
Next: Engineer Position at SNS White, Karen S.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·