LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading Cluster Index in For Loop without converting to array

Hello,

 

I am trying to write a program that uses 2 clusters. The first cluster is boolean data type and contains the items on the front panel. The second boolean cluster contains the data information of different data types. I am trying to index each element, line by line in a for loop to allow the program to perform an action. For the first cluster, I am converting it to an array. For the second cluster, I cannot convert it directly to an array, because of the data type mismatch. My question is, how do I index the information contained in the 2nd cluster element? I tried playing with the property nodes, but was not sure how to proceed. Thanks for any feedback!

 

I've included the VI and screenshots of the block + front panel.

Download All
0 Kudos
Message 1 of 3
(6,580 Views)

Hello,

 

What action are you planning to perform on the elements of the 2nd cluster?

You could use the Controls[] prperty of the cluster, index the array of references, and use property/method to perform certain actions. Since the references are generic you cannot perform all actions unless you typecast them.

 

 

0 Kudos
Message 2 of 3
(6,552 Views)

Hi, 

          To read a cluster which contains different data types as pacificsaid you can use Controls[] to read cluster elements lables etc but value you cant read so you can use reference. I have done that in your VI.Pls check it and let me know is that you are looking for.

 

Regards

Gita

0 Kudos
Message 3 of 3
(6,540 Views)