Hello,
I'm connecting to an OPC-server with datasockets and have a problem when I have more than ~6 open connections.
I use the Datasocket open-, read/write- and close VIs with LabView 7.0.
With 6 open connections everything is ok, but when I add a couple more then the whole program freezes randomly (LabView needs to be killed with taskmanager).
It is not a problem with a _particular_ OPC-connection, lets say that I have connections to OPC data A,B,C,D,E,F (that's 6 connections) it works. Then I add connections to G and H -> it freezes on some runs.
If I then delete (lets say) B and C and have: A,D,E,F,G,H -> it works fine again.
So the program I'm running is of the following sort:
A flat sequence with three frames. In the first frame I open the connections with the DataSocket Open VIs. Error ins and outs are serially connected, so the Open VIs don't execute in parallel. This should be ok? With ~6 opens here the program runs great, but with ~7-8 opens it freezes randomly. I have tried timeouts in the range of 500ms to 40s. When a DataSocket VI freezes (execution highlighted to see where everything goes wrong) there is no timeout. Everything just freezes.
The second frame has a while loop and inside that loop there is code that modifies/reads the contents of the corresponding OPC data connections.
In the last frame I close all the connections with DataSocket close VIs.
Is this a problem with LabView 7.0 DataSocket VIs or is there something wrong with my datasocket usage..
I would require only about 15 open connections, what would be the best choice to subscribe and publish OPC data?
Should I open and close the connections inside the loop on EVERY loop iteration? (which doesn't sound that wise) That way I would not have many connections open at the same time.
And what happens if I DON'T use the DataSocket Open/Close VIs, instead I use the write/read VI straight away (you can specify the URL directly to the read/write VIs and it works, atleast it gives/writes data). Does the write/read VIs automatically close the connection when finished?
Well, any comments or experience with similar problems would be nice.
-Olli