LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way for the user to input data or type for a variant control?

I have a variant on my front panel, and would like to edit the value (and if possible type). 
 
Is there any way to do this other than programmatically?
S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 1 of 3
(2,570 Views)
No I don't think you can.
And why?
The variant is usefull if you want to carry different data-types at the same wire around in LabVIEW.
And the type is strict: 'Variant'

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 3
(2,555 Views)
Hello SG,

I concur with Ton.  You must use the Variant functions on the Block Diagram to manipulate Variant data.

Here is the "Variant Data" information from the LabVIEW Help:

Variant data do not conform to a specific data type and can contain attributes. LabVIEW represents variant data with the variant data type. The variant data type differs from other data types because it stores the control or indicator name, information about the data type from which you converted, and the data itself, which allows LabVIEW to correctly convert the variant data type to the data type you want.

Use the Variant functions to create and manipulate variant data. You can convert flattened data and LabVIEW data to variant data and convert variant data to LabVIEW data.

The variant data type allows you to store attributes of the data. An attribute is information about the data that you define and the variant data type stores. For example, if you want to know the time when a piece of data was created, you can store the data as variant data and add an attribute called Time to store the time string. The attribute data can be of any type. You also can delete or retrieve attributes from variant data.

Best Regards,
T. McCarty

Message Edited by McCarty on 12-21-2007 11:47 AM
Message 3 of 3
(2,536 Views)