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

Subject: RE: IP asyn timeout connection
From: "Mark Rivers" <[email protected]>
To: "Dominique Touchard" <[email protected]>
Cc: [email protected]
Date: Thu, 11 Mar 2010 08:51:36 -0600
Hi Dominique,
 
Are you running vxWorks on your VME crates?
 
I am not sure, but I suspect that the problem you are seeing is actually due to a problem in vxWorks.  Depending on how you restart vxWorks you can have a problem, because it may not be cleanly closing the socket connections when it shuts down.  If this happens, then the remote system (modbus PLC in this case) can get confused.  I think this is because the remote systems thinks it is the same socket connection, but with an incorrect sequence number.  Then it has to time out before it starts working, which can take 30 seconds or more.
 
I have exactly this problem with vxWorks IOCs and Newport XPS motor controllers, which run vxWorks internally.  It also happens with connections from one vxWorks IOC to other vxWorks IOCs.
 
One way to avoid this is to always restart your vxWorks IOC with the "reboot" command.  That will cause the EPICS exit handlers to be called.  Recent versions of asyn install EPICS exit handlers which will cleanly close all TCP sockets, and EPICS CA also closes things cleanly.  Even if you need to power off the vxWorks system, you should first type "reboot", then power it off.  This will close the sockets cleanly.
 
One way to test if this is the problem is to temporarily run your IOCs that use Modbus on Linux.  See if you have reconnection problems on Linux.  If not, it is probably the problem I outlined above.
 
Let me know.
 
Mark
 

________________________________

From: Dominique Touchard [mailto:[email protected]]
Sent: Thu 3/11/2010 8:06 AM
To: Mark Rivers
Subject: IP asyn timeout connection



Hi Mark,

we are using the modbus tcp (thanks again for your software) to control
a few dozen of devices from an EPICS  vme crate. We are testing now our
configuration, and starting often the vme crate to change our test
configuration. At each time there could be a few modbus tcp devices that
are not available during the vme startup.

There are a lot of waste time to wait for timeout connections during the
drvMobusAsynConfigure command.( I suppose) (for example, we are testing
now 34 devices which owns 4 modbus functions, one global read and three
discret writes. In this case, the startup could spend half one hour
without any acces to the IOC)

I don't find where we can set the timeout for the first connection try.

Any help would be appreciated.

Thanks again.

Dominique Touchard.




Replies:
Re: IP asyn timeout connection Andrew Johnson

Navigate by Date:
Prev: Re: 2 MAXv problems Ron Sluiter
Next: Re: IP asyn timeout connection Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Building EPICS for multiple Linux distributions Dirk Zimoch
Next: Re: IP asyn timeout connection Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  <20102011  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 ·