LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I determine the representation of a numeric control from a reference?

Property nodes report Class ID and Class Name but those are the same for U8, I32, DBL,... 18 and Digital, respectively.

Maybe there is a better way to do what I am trying to do. I have a cluster with mostly numeric controls, mixed U8, U16, U32, and SGL. I want to write the values and labels to a config file. I was going to select which type of Write to Config File VI to use based on the datatype. I take a reference to the cluster, get the array of Controls[] references and feed that to a for loop. But I cannot seem to find a way to distinguish the numeric types from each other. The Data Range property can be used to identify the integer types (as long as it has not been modified), but I cannot find a property for the representation itself.

Thanks,

Lynn
0 Kudos
Message 1 of 5
(3,614 Views)
Hi Lynn,

This LAVA post covers your question (scripting used), but what about the OpenG Variant Config tools?
They do exactly what you want!

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 5
(3,611 Views)
Ton,

Thanks,

That got me on the right path.

Lynn
0 Kudos
Message 3 of 5
(3,583 Views)
If you are using LV8.0 or later, there are a group of datatype VIs in vi.lib which also do the same thing.  Be aware that they are not "finished" so the API and location may change from LV version to LV version.  Since they are used internally, changes should be minimal.  You can find them at <vi.lib>/Utility/VariantDataType.
0 Kudos
Message 4 of 5
(3,562 Views)
I saw a reference to these in another thread where you posted.

Thanks,

Lynn
0 Kudos
Message 5 of 5
(3,556 Views)