From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I have an array of controls without having them in the array front panel holder?

I would like to link a number of boolean control buttons in an array without grouping them on the front panel the way it does when you make an array and then put in a boolean control.

 

Here's the background:

 

I have 8 linear motors controlled by CANbus, and so each button type (Move, Stop, Home, etc) is duplicated 8 fold.  I have an event structure that is currently triggered with a separate case for EVERY button with only a very small difference in the code inside each case.  Ideally I could have the buttons in arrays and then check the new array value against the old value on a value change event.  The alternative for me is to have each case handle the 8 buttons (with a Mouse Down? filter event) and then use the Boolean.Text value from the CtlRef and search an array of all Boolean.Text Values for the 8 buttons to see which name matches and process accordingly.  I have something like 200 buttons, so making the arrays of Boolean.Text values from the reference nodes is WAY too time consuming as I have to go through like 5 levels of right click menus.  Any suggestions?  

0 Kudos
Message 1 of 5
(2,543 Views)

Mark,

 

You might consider using clusters on the front panel.  Create a type def'd cluster that has all the boolean controls for 1 channel.  You can drop 8 of these on the front panel and the event structure can detect a change in a cluster.  Easy to convert cluster to array behind the scenes.  Remember that order of cluster determines index of value in array.

Message Edited by Wayne.C on 04-09-2010 05:19 PM
0 Kudos
Message 2 of 5
(2,534 Views)

No.  You could create an array of references to all of those controls.

 

Unless someone has some clever ideas, I think you are going to need to use the method you are doing now.

 

But to assist in creating these arrays, there a number of scripting tools you can use to get rid of the tedium of creating these arrays.  Check out the JKI Right Click Framework.

Message 3 of 5
(2,531 Views)

Hmm.  Is it possible to hide the cluster shell so that the items will be considered clustered on the block diagram but be separable and distinct on the front panel?  That could work.

 

 

Message 4 of 5
(2,521 Views)
Use a cluster container out of the classic pallette, and you'll be able to paint all elements of it transparent.
0 Kudos
Message 5 of 5
(2,518 Views)