1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 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 2008 2009 2010 2011 2012 2013 <2014> 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: TCP connection status : drvAsynIPPort |
From: | Mark Rivers <[email protected]> |
To: | "'Patel Jignesh'" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Tue, 7 Oct 2014 15:30:33 +0000 |
Hi Jignesh, What version of asyn are you using? > So I have tried some active method to detect the connection status, like dummy write(as this is write channel) and after checking the connection status with icConnected() but that also don’t report the broken connection
Please turn on all asynTrace debugging on that port in your startup script: asynSetTraceIOMask(“myPort”,0,2) asynSetTraceMask(“myPort”,0,255) I think that failed write operations should trigger the channel to disconnect, but if not then we need to fix that. If you don’t attempt any write or read operations then isConnected() won’t detect a disconnect, because the driver only detects a disconnect when it tries to do a write or read. Mark From: [email protected] [mailto:[email protected]]
On Behalf Of Patel Jignesh Hi, I am working on Siemens S7 PLC driver development based on Asyn. Currently I have two channels of communication between IOC application and PLC, one of which just sends data to PLC on specific port when there is change
like simple commands from user. So most of the time the channel remains ideal without any traffic. The other channel is bidirectional and have periodic data traffic on read direction. Now I want to monitor this channel connection status in case of disconnection or failure from PLC side. I tried with isConnected() function, which doesn’t not work with this channel. But this method is working for other
channel where I have bidirectional and periodic data traffic. So I have tried some active method to detect the connection status, like dummy write(as this is write channel) and after checking the connection status with icConnected() but that also don’t report the broken connection
so finally I tried with dummy read and checking the connection status with isConnected() which successfully detect the broken connection.. So please give comments for the above scenario and also suggest, is there any other method to check the connection status using drvAsynIPPort for such type of situation ? Thanks for your support, BR, Jignesh |