LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I control a front panel indicator cluster?

I created a cluster of indicators on my front panel that is composed of boolean and numeric indicators. However, I can't seem to figure out a way to control the values programmatically.

For instance, I would like to wire a boolean 'true' to one of the boolean indicators on the front panel, but I can't seem to access this indicator from the block diagram.

I am a newbie, and I am not so sure I understand the behavior of clusters. At any rate, thanks for your help!
0 Kudos
Message 1 of 13
(4,665 Views)
Make sure all indicators have a label, then use the bundle by name function in the cluster palette.

Else you can also use the regular bundle function. Verify the order of the cluster elements in this case.

Both methods are shown in the example below.
Message 2 of 13
(4,665 Views)
Thanks for the help, it was very useful.

I don't know if there is a way around this, but I have created what could be called a MOAC (Mother Of All Clusters) on the front panel. Unfortunately, I need to control different indicators during different states, but would like to do so without using the bundle function to bundle controls and ending up with a bulky group of block diagram controls. Basically, I am looking for a way to control just the item of interest in my cluster. I have tried doing this using "Unbundle by Name" and then trying to wire the desired value to it, but this doesn't seem to work. For example, I have a numeric indicator and a boolean indicator in the same cluster, and I only want to update the value of the boolean indicator without cha
nging the value of the numeric indicator.

Any suggestions?
0 Kudos
Message 3 of 13
(4,665 Views)
You use the Bundle by Name to update a single element in a cluster. You wire up the Input Cluster connection to your cluster, select the item by right clicking the element input and the output is the original cluster with a new value. The attached picture should give you the idea.
0 Kudos
Message 4 of 13
(4,665 Views)
I think we are trying to do two different things. I have included a vi of my example that kind of steps through what I would like to do. It doesn't work, but I think it shows where I am confused.

To explain it, I created a front panel cluster with 6 indicator lights in a cluster and an on/off switch. When the switch is on, I want to turn on Ouputs 1&5. When the switch is off, I want to turn off those indicators and turn on Outputs 2 and 4. For the sake of this example, I don't care about the other indicators.

Thanks for your help...
0 Kudos
Message 5 of 13
(4,665 Views)
You can use property nodes to write to the value property of individual cluster elements.
Right-click on the cluster element (e.g. a boolean indicator), then select Create >> Property Node.
Move the Property Node to the point on your diagram where you want to change its value.
Right-click on the Property Node and select Change to Write.
Right-click on the Property Node and select Properties >> Value.
Wire the desired new value to the Property Node.
Message 6 of 13
(4,665 Views)
You used the Unbundle by Name function. Dennis suggested using Bundle by Name. Take another look at his example.
0 Kudos
Message 7 of 13
(4,665 Views)
Here's your example fixed - using the Bundle by Name.
0 Kudos
Message 8 of 13
(4,665 Views)
Thanks-- that was exactly what I was looking for!!!
0 Kudos
Message 9 of 13
(4,665 Views)
> Thanks-- that was exactly what I was looking for!!!

This may simplify your diagram, but unless you are doing UI programming,
I'd say that you are going to suffer some pretty big performance hits
and possible race conditions with other parts of your diagram.

Ideally what you wind up doing is taking the cluster apart into the
chunks you need for a given section of diagram, using and possibly
modifying it using unbundle and bundle, and then rebuilding it at the
right edge of the diagram. If you want it to cycle around to the next
iteration, use a shift register, not a control to do this.

Also, keep the number of accesses, via locals, terminal, and properties
to a small number and use more wires. Don't get in the habit of using
the
se things as though they are variables in C or Basic. It might not
affect performance much this time, but it is a bad approach and sooner
or later you will need to learn the better style of doing this.

Greg McKaskle
0 Kudos
Message 10 of 13
(4,665 Views)