LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I call the SubVI like a child window one or more times in the front panel of my main VI ? See the example atached...

I would like to create a aplication where I call dynamically the same SubVi many times in the front panel of my main VI ... I saw this kind of programmation in other languages like Delphi, C++ Builder and Visual Basic.
For explanation: I have 10 channels to read in the list, but I would like to see only 3 channels ... Then I will click in the channels choosed of my list and will open the same SubVI 3 times, where each one will show the individual channel.
 
Thanks for attention...
 
Cleber
Message 1 of 5
(3,463 Views)
One possible solution (maybe not the only one) is to use VITs, see the attached example. I do apologize not to have more time to discuss about it.

hope this will help you


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 2 of 5
(3,451 Views)

TiTou certainly pointed you down the right path... For a few more details, refer to my post to this thread:

http://forums.ni.com/ni/board/message?board.id=170&message.id=141811

You could use the same technique, except instead of opening the clone's front panel, use the VI reference you have to it to poke it into a subpanel. Please note: I have never actually tried building a VI with more than one subpanel on its front panel, but it should work. Also you will not want to close the VI references because you will need them to stop the clones when you shutdown your application.

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 3 of 5
(3,429 Views)
Mike,
 
You can only put one sub-panel per front panel.  It won't even work in debug if you try more than one.  Also, if you are using an event structure in the main program and also in the sub-paneled program sometimes the events generated in the subpaneled vi will lock up the event structure in the main vi and vice versa.  Subpanels are really not a useful way to go for this type of problem.  They are only useful if you want to view one basic vi's front panel (with no state event-driven machine) at a time.
-Devin
I got 99 problems but 8.6 ain't one.
0 Kudos
Message 4 of 5
(3,364 Views)
The problem seems to be fixed in LV 8.0. LV 8 automatically clones a subvi when it is placed on multiple subpanels. There are some problems however as I state in my post:

 http://forums.ni.com/ni/board/message?board.id=170&message.id=149269

Tomi
--
Tomi Maila
0 Kudos
Message 5 of 5
(3,323 Views)