LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

datasocket read with unpublished variable

When I try to read an unpublished variable using datasocket read (dstp protocol), I don't get any errors. Status and Quality fields are also blank. For strings, I can check if the return value is empty or not, but I'm afraid it will not work for a numeric data type.

Is there any way to check if a variable exists or not?

0 Kudos
Message 1 of 2
(2,218 Views)

hi abdel,

 

There are a few things here.  First, I found this KnowledgeBase discussing behavior of DataSockets when opening a connection.

 

How Do I Set an Initial Value for a DataSocket/OPC Connection in LabVIEW?

 

Second, I would suggest simply trying it.  Try polling the unpublished value and see what value is returned.

Stephen Meserve
National Instruments
0 Kudos
Message 2 of 2
(2,189 Views)