LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple use of subpanels?

I've almost given up on finding a simple way to use subpanels.  What I want is very simple--to have the FPs of a few VIs on tabs within a single main FP in order to reduce the clutter.  But what I'm finding is that apparently I'm not supposed to use the VI icons and their connector panes on the BD if I use subpanels.  The necessary overhead is fairly intimidating:

 

1. This entire thread

2. Message 18 of this thread

3. This entire thread (brace yourself)

 

I tried in a simple example (attached) to just use the connector panes, but I'm guessing it's incorrect (at least theoretically), because nobody seems to do it.  Moreover, if I try the same thing with my real VIs, the entire thing hangs when I press buttons in VIs that are not running.  Should I abandon this approach or can it work?

 

Am I missing something, or is it really non-trivial to use subpanels?  It would be a shame if such a simple need can only be met with advanced concepts. 

 

Thanks!

Download All
Message 1 of 19
(14,762 Views)

Hi Bracker,

 

I've not used Sub Panels before, but I just had a play around with building an application reference and wiring that into the Sub Panel and this seems to produce a working Sub Panel. My VI will work if you reference an application within the same folder directory. Is this what you wanted?

 

undefined

 

Please download the attached VI to see the implementation (The snippet above is a little unclear). Hope this helps.

 


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Message 2 of 19
(14,745 Views)

The three treads you are linking to is not general treads about sub panels. They discuss advanced architecture and using sub panels.

The first tread is the one that fits you best.

 

When using sub panels, remember that the vi's are free running vi's, just like if you had them open side by side.

If the main vi stops, the vi's in the sub panel might not, they can still run.

 

I have made some changes to your main vi. Hope that you can follow me.

When using sub panels you can't run the vi in a normal way. You need to use the reference to run the vi.

 

 

Message 3 of 19
(14,731 Views)

Guys, thanks a lot. Sorry about the late reply. I'm just now getting back to it.  I now understand the examples, and it certainly looks like a lot of low-level overhead for using subpanels.  I've gotten to the point in my Labview use where I can handle it, but it sure would be nice to have some high level mechanisms for doing the same thing.  I'm surprised this isn't already available, so that I can make very minor adjustments to a main or high level VI in order to consolidate subVIs into subpanels (trivial programming for a trivial concept).  I can only guess that the subpanels are somehow at odds with the Labview paradigm.

0 Kudos
Message 4 of 19
(14,688 Views)
Didn't you see Alex's example above? All you have to do is get a reference to a VI and send that to the insert VI method for the panel. If you can create a mockup of what you think is an easier method you should post it on the idea exchange.
=====================
LabVIEW 2012


0 Kudos
Message 5 of 19
(14,674 Views)

@bracker wrote:

 I'm surprised this isn't already available, so that I can make very minor adjustments to a main or high level VI in order to consolidate subVIs into subpanels (trivial programming for a trivial concept).  I can only guess that the subpanels are somehow at odds with the Labview paradigm.


I think you are making an assumption that subpanels are trivial, but in reality they are not. They are essentially like a parallel VIs running, they just happen to show up within your "main" screen. So, you have to manage them as such. That means passing data between multiple parallel loops using some sort of buffering technique, shutting down cleanly, handshaking, etc, all concepts that can continue to prove to be difficult even to advanced programmers.

Message 6 of 19
(14,665 Views)

Some times the simple examples are too simple and a more robust example can give some more context and turn on a light.

 

To that end I offer this link to an example where I use sub-panels to implement a crude "docking" implementation. I hope that example helps more than it hurts.

 

It covers most of the issues and concerns involved in sub-panels.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 19
(14,639 Views)

Ben: I think link number 2 in the question from OP is the same link to the docking example.

 

( And I have gone though it, looks nice. But never used it. )

Message 8 of 19
(14,618 Views)

@dkfire wrote:

Ben: I think link number 2 in the question from OP is the same link to the docking example.

 

( And I have gone though it, looks nice. But never used it. )


 

Well that is a nice suprise.

 

Kudos to you for pointing it out and Kudos to the OP for linking it.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 9 of 19
(14,612 Views)

Hi all,

 

I have a question concerning subpanels: how is it possible to use the "Insert VI" invoke node in a loop ? When I do this, using a table of references to my subpanels as an input, only the last panel stays on display.

 

Thanks in advance !

T

____________________
JB
0 Kudos
Message 10 of 19
(13,983 Views)