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: 

Dynamically change number of subpanels

Solved!
Go to solution

Hi,

I have a computer where typically 4 testplaces of production are connected to.

I want to have a main VI showing the status of this 4 different testplaces, which I can do with 4 separate subpanels - no problem.

 

The topic is, that I would like to be flexibel in how many testplaces I show in one program (as this hole thing is quite fresh and I expect, that some changes will come). Is there a way to dynamically change the number of subpanels displayed (other than making twenty of them and then disabling the ones you do not need)?

My first idea was to place the subpanel in an array, but unfurtunately this is not possible.

 

Best regards,

Frank

0 Kudos
Message 1 of 10
(3,790 Views)
Hi Frank,

It is not possible to dynamically change the number of subpanels or create them at run-time.

Depending on how you want them to be laid out you can either:
- Have one subpanel, and just change which VI is loaded into it
- Create a simulated 'array' of subpanels. Put however many subpanels you want to display at once on the VI, but then create a method to switch between them (e.g. a scrollbar, tab, selector etc.)

I also had some luck with creating a 'dynamic' tab interface with a single subpanel - I wrote about it here: https://decibel.ni.com/content/docs/DOC-42925

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 10
(3,780 Views)

Frank,

 

LV does not support dynamic control creation, so you have to pre-create them and use visibility to hide the unused ones (as you already know).

However, scalability N for UIs require a sophisticated way to display information. I recommend to use a tree control to display the selection options for these processes/testplaces. Once the user selects a testplace, it will display in one of (up to four) subpanel controls.

In order to maintain high level information for each testplace, you should maintain a single element giving the high level overview. That could for instance be a custom symbol in the tree (green/yellow/red LED prepending the stations) or an status bar which essentially is an array of LED/numeric element/cluster (depending of the data type of course).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 10
(3,779 Views)

Well, that's not allowed.  But so what?

Here's how you can do it (but it only works in the development environment).

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 10
(3,721 Views)

Hi,

 

thanks for your reply. Would it be possible to upload the example as Labview 2013 (or 2014) - I do not have Labview 2015 (because it is so much cheaper if you are not having to pay for the yearly update...).

 

Thanks in advance,

 

Frank

0 Kudos
Message 5 of 10
(3,678 Views)

Pop them out as separate windows and you can have as many as you want. 🙂

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 10
(3,672 Views)

Here is it.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 10
(3,651 Views)
Solution
Accepted by topic author Frank74

@Yamaeda wrote:

Pop them out as separate windows and you can have as many as you want. 🙂 


Or make them seperate windows, then implement a child parent relationship in Windows so it appears as if it was all on one UI.

 

http://screencast.com/t/P9SJ1anR

 

It's pretty beta like software but works enough for the demo.

 

https://lavag.org/topic/17046-multi-panel-interface/

0 Kudos
Message 8 of 10
(3,640 Views)

Hi,

 

thanks a lot...

That is realy helping me!

 

Frank

0 Kudos
Message 9 of 10
(3,626 Views)

Hi,

 

that is a really cool solution...

Will need some time, to work this through, and implement it - but that is really giving a lot of opportunities.

 

Thanks,

 

Frank

0 Kudos
Message 10 of 10
(3,624 Views)