LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Datasocket reference check

   How do you check if the data socket connection is valid or not ?
 
--trupti
0 Kudos
Message 1 of 4
(3,027 Views)
You can monitor the error cluster coming out of your Datasocket fuctions (open, close, read, write) to see if an error gets thrown or if there is a timeout due to no valid connection with the Datasocket Server.  You can build this error-handling into your code so that it can be specific to your application.  Once you have opened a connection, you can simply perform a Datasocket write or read and if it works without error, you know the connection is valid.
0 Kudos
Message 2 of 4
(3,011 Views)
You can also close and open the server if necessary by using the VIs in the Datasocket LLB found in vi.lib.

___________________
Try to take over the world!
0 Kudos
Message 3 of 4
(3,005 Views)
Hello All,

I believe that the easiest way to do this is with the "Not A Number/Path/Refnum?" VI?  I believe that this checks the validity of the datasocket connection.

hope it helps!
Travis M
LabVIEW R&D
National Instruments
0 Kudos
Message 4 of 4
(2,993 Views)