LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

close datasocket connection

Hello
It's the first time I use DataSocket, and DataSocket server.
I have developed an application, using the examples "DS Writer" and "DS writer" as a base.

In my application one of the subVI has a while loop, and is subscribed to a DataSocket variable.
When I stop this subVI from the Main VI, whith a button, using references and property nodes, it doesn't stop, and I have seen that the process keeps on connected.
How can it be? How can I solve it?
Thank you all for your help.
0 Kudos
Message 1 of 4
(2,879 Views)

Do you close the DataSocket connection using the DataSocket Close function and by passing it the connection ID? If not, do this outside the While Loop.

Regards,

Khalid


Message 2 of 4
(2,879 Views)
Thank you Khalid. I tried doing this, but the problem was I can't pass the connection ID, because I haven't opened the connection. Finally I open and close the connection and works properly.
One more question. It's necessary to open a connection for each variable in the datasocket server?
Regards,
Esther
0 Kudos
Message 3 of 4
(2,879 Views)
Yes. As I know, you have to create it for each item in the datasocket server

crisR
0 Kudos
Message 4 of 4
(2,879 Views)