LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reduce the Control Reference clutter on my Block Diagram...

Solved!
Go to solution

Is there any way to reduce the ammount of clutter on my Block Diagram when needing to Enable and Disable controls while tests are running? I know that I can place the case statement in a SubVI, but am looking for the best recommended method for reducing the clutter by listing all of the references. Using LabVIEW 2015.

 

Below is a small example of what I am talking about, there will be only more references to add as the VI devlops.

 

clutter.png

 

 

Thanks,

 

Kellen

 

0 Kudos
Message 1 of 7
(4,962 Views)

You can programmatically generate an array of references to controls/indicators on the front panel if you'd like and filter through them in some way. This is a lot of back-end work though just to save some block diagram room.

 

The easiest way is just to use clusters on your front panel as much as possible. You can easily cluster your panel in a smart way so that you can disable sections of controls with ease.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 7
(4,951 Views)

Here are are couple of VIs I wrote (last saved in 2014) to get a reference to every control and indicator in a VI.  If needed, you could add more filtering by using the Label property and comparing it to an inclusion or exclusion list.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 7
(4,949 Views)

When you say that I can clustor FP items, say that I did, and that I have a group of controls such as the ones below in a clustor. I still have to generate reference constants, that are then placed into clustors. And if I want to disable them I would then have to bundle each reference into the clustor, and then unbundle and disable each control individually. I am betting that I am really missing the point here and would love further explanation. 

 

Thanks,

 

Kellen

 

My main problem is not being able to place actual refrences in a Clustor. 

 

 

 

0 Kudos
Message 4 of 7
(4,923 Views)
Solution
Accepted by topic author rkmadse

@rkmadse wrote:

When you say that I can clustor FP items, say that I did, and that I have a group of controls such as the ones below in a clustor. I still have to generate reference constants, that are then placed into clustors. And if I want to disable them I would then have to bundle each reference into the clustor, and then unbundle and disable each control individually. I am betting that I am really missing the point here and would love further explanation. 

 

Thanks,

 

Kellen

 

My main problem is not being able to place actual refrences in a Clustor.  


You're thinking about the carriage, when I'm talking about the horse. Your front panel items can be in a cluster and then you can use the cluster's reference to disable the whole thing. See:

Disabled.PNG

 

You will get a slightly different looking front panel between the two options if you use Disabled and Grayed Out because when you gray out the whole cluster, the edges gray. When you gray out single items in the cluster, the edges of the cluster remain normal.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Message 5 of 7
(4,913 Views)
Solution
Accepted by topic author rkmadse

I basically store my control references in a cluster and when I need to disable/enable them, I unbundle the references I need and build them into an array.  Then I pass the array to a subVI that does the enabling / disabling. 

 

Capture.PNG

 

There are some other suggestions here:

http://forums.ni.com/t5/LabVIEW/Faster-way-to-enable-disable-front-panel-objects/td-p/3141728/highli...

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
Message 6 of 7
(4,911 Views)

If I have a lot of controls I put them into a cluster. Then I just wire the cluster into the SubVI such as "Enable during test" "Enable during setup" and so on. The cluster will have to start with constants, which you fill in with the actual references at the initialization of your program.

 

Change Property.png

Message 7 of 7
(4,905 Views)