12-16-2013 03:27 PM
Is there a way to change a control or indicator's underlying data type? I have a VI that I want to use that will accept any data type (basically varriant data) and display it accordingly. I have different controls selected to display data of different types in the sense of integer data vs decimal data vs boolean but some data types will be of type uint32 vs int16 vs uint64 etc. Is there a way to programatically change the data type so I don't need to have every combination of indicator?
Solved! Go to Solution.
12-16-2013 03:50 PM
The short answer is no. The long answer is that LabVIEW has no "generic" controls that allow you to display any data type (aside from the variant obviously). There are several ways of attempting to overcome this but all require you as the programmer to explicitly handle every data type that you could possibly encounter. Here are a few possibilities (in no particular order), please let me know if you would like help implementing any particular one of these.
That's all I can think of right now, again, let me know if you'd like more info/help on any of the options.
12-16-2013 04:14 PM
Hi Charles
Some weird combination of 1 and 2 is what I'm currently doing, I was just wondering if there was a way that would prevent me from having to create separate indicators for the various UINT, INT and floating point variables which I guess is my next task. Thanks for the quick response.
08-07-2019 02:14 AM
There is something called Malleable VIs in versions 2017 and above.
Go through the link given below once.
https://www.mediamongrels.com/introduction-to-malleable-vis-labview/
Hope this helps 🙂
08-07-2019 03:03 AM
You can check the data type of a variant and use this connected to a Case structure to convert it to a string for a 'catch all' indicator.
/Y