re-establish connection to OPC server


Recommended Posts

Hi

I have an application that uses both modbus and OPC to communicate with several different type of machines. all works well most of the time but at very peak network times connection can be lost with the OPC server.

question....

Is there an easy way to force reconnection with the server other than shutting down and restating

The direct modbus connection remains active. the OPC server appears to be running but connection is lost between daqfactory and OPC and does not recover on its own. only happens once or twice a week but this is too often really

regards

Nigel

Link to comment
Share on other sites

Maybe. The problem is that you are using Async tags and the tag list gets sent to the server once. DF doesn't know that the server got disconnected, and just assumes that the lack of communication is because the tags aren't changing. There are two possible solutions I can think of:

1) use sync tags, but this has its own issues

2) the entire list of async tags is sent to the server whenever a new tag is created in the channel table. However, even though you may have Timing on your Async tags, this doesn't cause the table to be resent every interval. You can, however, trigger a reload by creating a new channel. Make it identical to one of your normal Async channels, but change the name slightly. Maybe use format() to put the time stamp in it so its unique (i.e.: format("MyChannel%d",systime()). You can delete the channel a few seconds after creating it if you want. This should, I believe, cause the async tag list to be resent to the server. You'll need some way, however, to figure out when to do this.

Link to comment
Share on other sites

OK

I am going to try all sync channels. I have also tried removing any connection with the factory network.

Another problem, on I believe the modbus channels, I get an error socket error 10061 any idea what this means or what to look for? The strange thing is the modbus channels are all working correctly and data is being displayed correctly. Modbus seems very reliable on DF we have systems that have been on for months with no errors or restarts needed.

regards

Nigel

Link to comment
Share on other sites

With all socket errors, its best just to search the internet. Just search "socket 10061". It means connection refused. My guess is you have an extra port in the quick device configuration that isn't assigned to a device and you forgot to delete it (or assign it a blank IP)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.