LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to search a 1D array for a cluster ?

Message 11 of 13
(1,269 Views)

@Alain S wrote:
No comment Smiley Indifferent

Note that in LabVIEW 2012 we now have conditional tunnels, significantly simplifying your code. 😄

 

 

 

 

Message 12 of 13
(998 Views)

I ran into the same problem. I have several cluster arrays and need to search them on different occasions.

The idea of adding a for loop to my code every time seemed a bit cumbersome and just wouldn't look good, so a SubVI was needed. But every one of these arrays contains different cluster types, so I needed a sub-VI that I could use for any type of cluster array.

In the end, I found a very usefull VI in the OpenG toolkit, named "Get Cluster Element by Name". Using that, I made a SubVI with variant inputs.

So far, it seems to be working just fine.


ElementLabel is the label.text of the cluster element you want to select on

SearchValue is the requested value of the element

 

SearchClusterArray.jpg

 

Maybe this can be of some use to anyone.

0 Kudos
Message 13 of 13
(933 Views)