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: "Allison, Stephanie" <[email protected]>
To: "EPICS Tech-Talk" <[email protected]>
Date: Wed, 30 Apr 2008 10:52:05 -0700
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


Replies:
RE: asyn/stream reconnect problems Mark Rivers

Navigate by Date:
Prev: RE: procServ V2.1.0 soft IOC server released Thompson, David H.
Next: RE: asyn/stream reconnect problems Mark Rivers
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 Benjamin Franksen
Next: RE: asyn/stream reconnect problems Mark Rivers
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 ·