LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to load same vi in several subpanel ??

You can just make N copies of your subpanel VI, either ahead of time (if you want to take care of recopying them when you make changes) or else programmatically, depending on what N value the user selects. Programmatically is probably better, because then you can truly deal with an arbitrary number of copies, and you can also programmatically delete them when you're done.

Instead of trying to load the master VI into each subpanel, just load a copy. You can do all of this in a For Loop, at which point you can instruct the subpanel VIs to run, pass them arguments, etc.

Hope that helps,
John
0 Kudos
Message 11 of 15
(1,025 Views)
I found a solution by renaming my sub-vis (which will be loaded and executed in subpanels) with the extension .vit.

CAN ANYONE TELL ME IF IT IS CORRECT AND IF THERE ARE PBS/LIMITATIONS BY USING THIS METHOD ??

Please find attached an example : the master vi testsubpanel.vi has two subpanels in which we load and execute the vi Display Disque Space (ss vi Alone).vit
Eddy DUCHENE
12 F Chemin de Boutary
69300 CALUIRE ET CUIRE

educhene@laposte.net
Message 12 of 15
(1,016 Views)
Right, of course, that is much more elegant. You jogged my memory about a shipping example that demonstrates this approach (it's "templates.vi" and comes up if you choose Help >> Find Examples and search for subpanel).

Under the hood, LabVIEW is loading multiple instances of the VI into memory and giving them unique names by appending numbers to the end of the template VI's name. So, they are definitely independent VIs from LabVIEW's perspective, and there shouldn't be any limitations.

Definitely the way to go.

--John
0 Kudos
Message 13 of 15
(1,007 Views)
Yes - that's the way.

One sometimes should have a look at the examples ;).

I often wanted to do something like that and thought it was not possible - now I became wiser :D.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 14 of 15
(999 Views)
Ok, thanks to everyone.

I will use this method of template vi as there are no problems to use it.

Bye.

Eddy
Eddy DUCHENE
12 F Chemin de Boutary
69300 CALUIRE ET CUIRE

educhene@laposte.net
0 Kudos
Message 15 of 15
(997 Views)