LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling main vi in sub vi

I have created the project  in Lab view.  Created main  Vi and calling sub vi to perform certain functionality . We have requirement at end of the last sub vi....it should return to main front panel. I have tried calling main vi in  the sub vi to get back to main front panel but it not allowing me to insert main vi as part of sub vi. Could you please help me with solution to get this working
 
Regards,
Sharanu
0 Kudos
Message 1 of 3
(2,332 Views)
There is no need to do anything. When you insert a subVI into a main, execution will automatically return to main when the subVI finishes. If it's not, then is the subVI in some infinite loop and you're stopping with the "Stop sign" on the toolbar? Or, in your main VI, do you have a while loop so that it keeps running? Posting your VI and subVI would go a long way in pinpointing your error. Please do a Save With Options and save into a distribution llb so that all of your code is in one place. Since this is a pretty basic task in LabVIEW, you might want to check into some of the learning resources here.
0 Kudos
Message 2 of 3
(2,324 Views)
From my experience so far, when you finish executing the sub vi that is called from main vi, it will return (the control) to main vi. You can consider sub vi just like a sub function. If required you set up the sub vi node by right clicking on the icon for the sub vi from main vi block diagram.
 
Regards
 
0 Kudos
Message 3 of 3
(2,319 Views)