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
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
Jignesh PATEL
Control Systems Integration Technician
CODAC Section
ITER Organization, Building 72/286, CHD, Control System Division
Route de Vinon-sur-Verdon - CS 90 046 - 13067 St Paul Lez Durance Cedex – France
Phone: +33 4 42 17 84 72
Get the latest ITER news on
http://www.iter.org/whatsnew