LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

modifying controls in a cluster within an array by reference

Hello.  Let me briefly outline what I am trying to do.

 

We have a board where motion sensors are mounted for testing.  the wall is pre-wired with terminal strips to connect the units to, and a DAQ monitors the alarm outputs to see which ones alarm.  I am developing the GUI to display the UUT#, information about the unit, and its alarm status.  As not all the locations are used all the time, I will have a mechanism to configure which slots are monitored.  The slots that are not being monitored I would like to indicate on the control panel those slots are not populated.  The first item that comes to mind is to make the indicators (model number, reference, alarm) invisible, and leave the UUT# visible.  the indicator consists of a 2 dimensional array that has a cluster embedded in it, and the cluster contains the uut#, model, reference, and alarm status.  I can access one item in the cluster (working with Alarm) and when I make it visible/invisible it affects all elements in the array.

 

The next item I thought of would be to drop a tab inside the array, and one one tab put the indicators and leave the other one blank.  When the index is not used, switch it to the blank one.  That doesn't seem to work.  Any suggestions?

 

Mike

Mike
0 Kudos
Message 1 of 7
(3,153 Views)

Add a Boolean to your cluster. I like to use the Classic Flat Square Button. 

Size it the same size or larger than your cluster in the the array and place it on top of all the other controls in the cluster.

Set one of Boolean states color to transparent (T) the other to gray.

 

Now just set the T/F state of the Boolean to enable or disable the slots as needed.

Omar
0 Kudos
Message 2 of 7
(3,133 Views)

I can access one item in the cluster (working with Alarm) and when I make it visible/invisible it affects all elements in the array.


Yes.  Only the value property can vary between elements in an array.

 

So, the Cluster.Alarm.visable property must apply to every element in the array of clusters.  (You can't hide just some of them)

 

You will need a different data structure to do that.


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 7
(3,124 Views)

As an added note: Move the UUT# to the "front" "Move To Front" (Ctrl+Shift+K) in front of the boolean so that the UUT# is still visiable when everything else is hidden behine the boolean.

Omar
0 Kudos
Message 4 of 7
(3,112 Views)

Another way you can go is basically creating an "array" of subpanels, where each element can then be truly different. You can find examples of this in this thread and the thread it links to. This approach is more complex, but it allows for more freedom in the display.


___________________
Try to take over the world!
0 Kudos
Message 5 of 7
(3,093 Views)
Or just seperate your ui from your implementation properly. One is for your users the other is for your program logic. Forcing both to be the same makes problems like this appear.
0 Kudos
Message 6 of 7
(3,077 Views)

I did figure it out.  I went with a cluster data structure.  I wanted to use an array for ease of updating the data.  It was essential for the design to make the unused items either grayed out or not visible, I opted for not visible.  Let me bring up my design to see how I implemented it.

 

It would be easier if I just attach the code I developed.  The code may develop a little further, but it's a work in progress.

Mike
0 Kudos
Message 7 of 7
(3,050 Views)