06-16-2014 05:11 AM
I have a cluster of:
3 Strings
a Timestamp
7 Doubles
a Boolean
2 Numerics
a Numeric array of 4 elements
a String
How would I convert these into a human readable string output?
06-16-2014 05:35 AM
Dear Paul,
Unbundle your cluster and use "Format into String" with "%d" as format string for numerics.
For boolean, first change them into "1 and 0" representaion and then use the above function as it is.
For the numeric array, use the same function but inside a For Loop so it indexes through each element and converts them.
Regards.
06-16-2014 05:52 AM
You may try something like this.
I have shown only for Boolean type. You can expand this according to the data type and convert it to string seperately. Finally you can feed the array to a table.
06-16-2014 05:59 AM
Thanks P@Anand
Have you got the Vi the drag and drop isnt working?
06-16-2014 06:08 AM
This is a snippet and you should be able to pull it into a Block diagram if you have LV2013
06-16-2014 06:11 AM
Hi PauldePaor,
I'd go for a generic subvi that you can reuse for any type of cluster. You'll have to make a case for each control you are using, just use the 'All Class ID's' array to see the ID numbers you have right now. Once you are done you can recycle the subvi for all sorts of neat property controls etc. For example, I use it to make all items in a any cluster a certain color.
Just use the reference as the subvi`s input, and the array of strings as output. Wire any cluster's reference to the input, and out comes the result.
Hope this helps.
06-16-2014 06:13 AM
Wow, this is actively replied to; P@Anand beat me to it by far!
06-16-2014 06:18 AM
When I drag the Vi Snippet it just drops the link to the forum
06-16-2014 06:20 AM
Save the image and then pull the image to your BD.
Also you may use the snippet attached.
10-27-2020 07:20 PM
Hi all, there are open G VIs that could help you with this.