LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to deal with many variable initializations

Hello, I am new to LV and I am trying to recreate one of our old VIs. The original creator was also novice with LV and did not create sub-VIs and it overall took up a lot of screen real-estate. There are about 50 indicators and controls for this test program. Right now, it takes up the whole screen even with "clean up selection". I would like it to take up very little screen space. I thought that I could just put it into a cluster... it just goes behind the cluster instead of inside of it. I thought that maybe I could create a sub-VI and do something with globals, but LV said that 28 connections is the maximum.

 

I have attached a sample VI showing a 256 indicators. Also, "clean up selection" seems to fail around 155 items (just learned that). Soon I will need to create a VI with ~100 indicators once I figure out LV more, so I would really like to condense all of this.

0 Kudos
Message 1 of 4
(1,008 Views)

Hi john,

 


@johndeet wrote:

I have attached a sample VI showing a 256 indicators.


No, you did not.

 


@johndeet wrote:

 I thought that I could just put it into a cluster... it just goes behind the cluster instead of inside of it.


Then you did something wrong…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(988 Views)

If you want certain Controls and Indicators should show a "fixed" value when the program starts, simply create the Controls and Indicators, set them to the desired Initial Value, then left-click to select it, and in the Edit menu, "Make Selected Values Default".  Now when you load the program, the variable will have your chosen Default value.  If you want to run it again (without reloading it), you can use an Invoke Node for the VI and select Default Values/Reinitialize All to Default.

 

Bob Schor

0 Kudos
Message 3 of 4
(943 Views)

Front Panels with dozens, scores, hundreds or more objects are usually used to annoy users.  They become overloaded with information and frustrated when using your code.  Worse, it is nearly impossible to train the user to operate the program without accidentally triggering a state you forgot to test for sanity.

 

I have had use cases where massive amounts of information are required (e.g. memory map current value tables) but, those are extremely rare.

 

Talk to the user!  Get them to tell you a "Story" about how they will use the program.  Likely, most of the settings can be hidden in a configuration settings file and ignored while the program is doing business.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 4
(937 Views)