Hello,
I´m using Labview 8.2.1 in XP_SP2.
Currently I created a test-vi with Datasockets. (Open, Get, Set, Close). In my Demo-vi where everthing is in one Vi inside a loop everything works fine. That means i can set a URL which is sent to the "Datasocket_Open". Then i see that my OPC-Server (external program) goes active (this is shown by getting a new icon next to the clock in the taskbar).
The Open returns a connection-ID which i can use to "send" and "get" values from the opened URL / Item.
Now i did the same with separate VIs. One VI for Open, one for send, one for get and one for close.
The Open-Vi opens a URL and stores the returned connection ID in a global variable.
Then i wanted to use this ID from the global in the other three VIs (send, get, close)
But the problem is, that after i executed OPEN, that the connection doesnt keep alive. The icon (in the taskbar) is only visible as long as the VI is running. That means, when i create a breakpoint at the end of the open-vi and start then my GET-vi then i can read values with the connection id from the global. But as soon as the vi (which opended the datasocket) is finished the connection is lost.
So the big question is: Is this normal that the connection is only valid during runtime of the vi which created this connection ID? What can i do to solve this problem so that the id is not lost after the vi is finished?
Thank you very much for your help