Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem reconnection OPC in Visual BASIC

I have two applications in Visual basic which communicate with OPC. The fist application has a server OPC and the second has a client OPC (datasocket NI). The communication is very good but when the server application crash and restart, the second can�t reconnect automatically (messages �switch or retry� or the program close) and I must restart it too. What I can do to reconnect automatically a client opc avoid restart it when a server crash and restart?
0 Kudos
Message 1 of 2
(4,976 Views)
One thing you can do is to check the status of the connection when an error is reported, and if the connectionis broken, you can try to have it connect with the URL as an empty string, and then reconnect to the actaul URL after an interval. Datasocket doesnt try to automatically reconnect, its something you would need to implement, and its really simpel to do with the datasocket api

Hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 2
(4,976 Views)