LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to automatically get element information of any Frontpanel element @cluster in cluster

I have a complex cluster, containing numerics, strings, bools, arrays and even another clusters.

If I change element values in frontpanel, I need an event case that gives me the reference or information of the changed element to show name and new value. (Kind of event logger)

I tried to compare with "unequal" old and new value in event case. This gives me an array of bools. I can compare that with my elements[]. That works.

 

But what if I have a cluster in cluster? Any ideas?

0 Kudos
Message 1 of 4
(1,727 Views)

That's not quite right.  When I set up a cluster within a cluster, the result of the comparison is a cluster in a cluster structure where the various elements compared (numerics, strings, ....) are show up as booleans.  It is the same hierarchy as the original cluster, not an array of booleans.

0 Kudos
Message 2 of 4
(1,693 Views)

Thanks for your answer.

I know, thats my point. If I had only a simple cluster, I could convert the result of the comparison to an array of bools and walk through the elements.

But how can I do that, if I have cluster in a cluster?

0 Kudos
Message 3 of 4
(1,677 Views)

You could try iterating through the cluster to find booleans. If you find a nested cluster then call the VI recursively. The array implementation needs work though.

 

Search the VIPM for OpenG toolkit to get the SubVIs.

 

snip.png

 

Snip2.png

 

Download All
0 Kudos
Message 4 of 4
(1,635 Views)