LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generalize a search of an array of a cluster

Is it possible to write a general cluster search routine that would let me pass the component of the cluster I would like to search? I have a VI -see attached- and It searches for the passed string in the Channel Name component. To avoid having a different VI for each component I want to search in, it would be optimium to just pass the component I want to search in. Is this possible?
0 Kudos
Message 1 of 5
(3,055 Views)
Try this it may work for you.

Randall
0 Kudos
Message 2 of 5
(3,055 Views)
This is great, this will definatly help, but I do have 2 different arrays of clusters than this will not work as well. Anyone know a way todo this even more generally? Possible by using variants as you Randall suggested?
0 Kudos
Message 3 of 5
(3,055 Views)
Yes it is possible to have a general search by cluster item using Data Tools from OpenG Toolkit at Openg.org.

The subVI code is shown in the diagram. It has two variant inputs: the array of clusters and the cluster element value to search. To change the cluster item to make the search on, simply select it in the unbundle in the calling diagram.

The variant in put contains both the cluster element name and its data. "Get Data Name" and "Get Cluster Element by Name" are used to extract the cluster element from the cluster and compare it with the searched value.


LabVIEW, C'est LabVIEW

Download All
Message 4 of 5
(3,055 Views)
perfect thank you very much
0 Kudos
Message 5 of 5
(3,055 Views)