LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Variant to numeric array, working backwards

Hello,

 

I am working with a variant that contains a cluster of 4 elements (VISA Resource, DBL, DBL, boolean). I used the Variant to Flattened String function to obtain the data string and type string. What I want to do next is to convert this information to read back the values of the two DBL elments, and the boolean.

 

I've seen examples where a numeric array was converted to a data string and type string. I want to do the opposite of that and convert back to an array. Thanks!

Download All
0 Kudos
Message 1 of 4
(2,782 Views)
It's a bit hard to tell without any code, but you should be able to convert the flattened string back to a variant (using the appropriate primitive) and then convert that variant to your cluster by using the Variant to Data primitive.

___________________
Try to take over the world!
Message 2 of 4
(2,768 Views)

Well, first you need to convert it back to a variant, using "flattened string to variant", then use "variant to data" with the original cluster as type. Now you can unbundle your desired values.

 

Which step is giving you problems?

 

Please attach some real code (not front panel images) if you get stuck. 😉

Message 3 of 4
(2,767 Views)
Thanks!! I must have wired the wrong type cluster before. It works perfectly now.
0 Kudos
Message 4 of 4
(2,764 Views)