To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example uses some of the Variant utility VIs to determine the datatype contained in a variant.
Description
Converting from Variant Data to LabVIEW Data with the Variant to Data function requires knowing the type input beforehand. This example helps determine the LabVIEW data type using the GetTypeInfo VI.
Since the output for the GetTypeInfo VI in the case of an array is "Array", the code uses additional VIs to determine the array element data type.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
Run the VI
Additional Information or References
Use only the first GetTypeInfo VI if the generic data type is acceptable and use additional GetArrayInfo and GetTypeInfo VIs to determine the array element data type.
The GetTypeInfo & GetArrayInfo VIs are located in the vi.lib/Utility/VariantDataType folder.
Block Diagram
Front Panel
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Hi
I have been studying for the CLAD exam && when I was going through your files trying to get tuned in on type descriptors it occurred to that the descriptions only elaborated the data types, which made sense to me since data can originate from a control or be sent to an indicator. But what I havent figured out yet is how LabVIEW differentiates between a contol & an indicator.
In C++ as example the input, (w/o Visual C++) is Cin &
the output (w/o Visual C++) is Cout.
I would think that it would be necessary to have a similar construct, or way to discern a control icon from an indicator icon.
Any thoughts?
I was wondeirng if there was possibility of you releasing the password to this VI. I'm currently trying to write a functional programming suite for labview, and it would be helpful if I could view the source of this VI.
Just use the open G libs, they have the VIs open to decode variants