04-22-2009 04:42 PM
Hello,
I'm wondering if, in LV, there is an easy way to exit a subVI at some point in its execution and return to a top-level VI ('easy' being by using a simple function, similiar in idea to 'break' or 'goto' from other languages). I have a state machine for a top-level, and each state executes one or more subvi's to perform specific functions. The subvi's that are in while loops are easy enough to stop when I want, but i'm wondering about the ones in flat sequences or the like.I tried 'stop' in application control, but that stops my top-level VI too.
 
04-22-2009 05:55 PM
-SK- wrote:
The subvi's that are in while loops are easy enough to stop when I want, but i'm wondering about the ones in flat sequences or the like.I tried 'stop' in application control, but that stops my top-level VI too.
How exactly have you designed the interaction between the top-level VI and the subVI? Is it possible to post sample code that explains this?
04-22-2009 06:00 PM
04-22-2009 06:43 PM
Adnan: the interaction is pretty simple; the subvi's receive their inputs from, and pass their outputs to, the top-level VI in the standard way. I'm not using global variables or references or anything.
smercurio: I've tried a few things since posting, and looked around a bit more, and I'm getting the impression that you are right, and I must do it the long way.