Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

DataSocket Functions and Variant Data

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Use variant data when a VI or other application that programmatically reads data cannot convert the data back into its original data type, such as when you read data from another application. You also can use variant data to add an attribute, such as a time stamp or warning, to data you read or write when the data types do not permit this additional attribute.

You can use the To Variant function to programmatically convert the data you write to a data connection to variant data. The following block diagram continually acquires a temperature reading, converts the data to variant data, and adds a time stamp as an attribute to the data.

When another VI reads the live data, the VI must convert the variant data to a data type it can manipulate. The following block diagram continually reads temperature data, converts the variant data into a temperature reading, retrieves the time stamp attribute associated with each reading, and displays the temperature and the time stamp on the front panel.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit