LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I manipulate control properties inside a cluster?

One way I've tried is to put the controls inside a cluster on the front panel.  This works, but the problem is...on my front panel I want to place boolean's near these sliders to perform some other functions.  When I place a cluster of controls over another cluster of controls, I have some issues with "bring to front".  Take a look at the "Control Try 3.vi" attached...

 

Another way I've tried is to modify each control reference individually.  This works, but will make the programming very ugly for future maintenance.  Take a look at the "Control Try 2.vi" attached...

 

Then I tried to bundle all of the control references, and follow the same logic as the "Control Try 3.vi" logic.  This changes the reference properties within the cluster, but doesn't change the actual control properties.  Refer to "Control Try.vi".  Is there a way to break this down farther, so that I can change the actual control properties?  I've tried to go to more specific classes, but this doesn't work.  I would really like to use this version if at all possible.  Can someone give me some advice?

Download All
0 Kudos
Message 1 of 9
(3,911 Views)

FYI... 

 

In each vi, I'm trying to change the visibility and caption of each control when the second column of the array on the front panel is modified.

0 Kudos
Message 2 of 9
(3,908 Views)

Hi JBSLab,

 

I think I am a little confused as to what you are after.  What is wrong with your Control Try 3.vi?  Seems like the way to do things.  Your problem with Control Try.vi makes sense.  You are modifying the Caption of the Reference Control.  What you would need to do is use the actual reference.  This would mean reading direct values from the cluster.  I hope this helps, but again, I am not exactly sure what you are getting at.

 

Cheers, 

Brian A.
National Instruments
Applications Engineer
Message 3 of 9
(3,874 Views)
As for placing clusters of controls on top of each other on the front panel, if you use a classic cluster (instead of the "modern" one), you can make the border and interior transparent, which may solve your problems placing them on top of each other.  You might see a shadow when editing the VI but it will disappear when you run it.  Also, is it possible you could place your booleans inside your cluster as well, and solve the problem that way?
0 Kudos
Message 4 of 9
(3,868 Views)

Hi Brian and nathand -

 

I can understand the confusion.  Very hard to explain, but I was having bring to front issues with the clusters before, placing overtop of one another.  In other words, I wasn't able to control one of the clusters when the vi was running.  I don't seem to have the issue now, so I'm going to stick with the "Control Try 3" approach like nathand suggested.  Seems like the bring to front issue must have went away after I installed LabView 8.5.

 

I still am curious though, on how to read the direct values from the cluster, like Brian suggested.  Brian, if you have time, could you show me an example?  I think that this would come in handy in the future.

0 Kudos
Message 5 of 9
(3,859 Views)

Glad you got something working the way you want. 

 

Attached is what I meant about reading direct values.  If you have a cluster of references, simply unbundle the cluster, then feed those references to the property node.   I made a quick edit to your VI just to show what I mean.

Brian A.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 9
(3,838 Views)

Hi Brian -

 

Can I get you to save this as 8.5?

 

Thanks

0 Kudos
Message 7 of 9
(3,823 Views)

Hi JBS,

 

My Nugget entitled 

 

"A Case Study of Exploiting Control References to Reduce Development Time"

 

 may be helpful in getting an understanding of how to work with cluster using control references. It discusses all of the most common ways of manipulating clusters, as well as some of the most obscure.

 

I hope that helps,

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(3,816 Views)
Here ya go.
Brian A.
National Instruments
Applications Engineer
0 Kudos
Message 9 of 9
(3,791 Views)