11-25-2008 07:06 PM
Hello all,
I have an VI (let's call this VI1) looking something like the one below. How do I get it to call/run another VI (let's call it VI2) when i = 2. I can't put VI2 in the loop because VI2 shall be run independently, and VI1 loop should not be waiting for VI2. Thanks.
Solved! Go to Solution.
11-25-2008 11:09 PM - edited 11-25-2008 11:14 PM
Well, in this example, the loop spins millions of times/second and you won't be able to tell if the other VI starts right away or ant the third iteration. You might as well start both at the same time. In addition, your loop just repeats the same calculations over and over again for no reason. Isn't once enough??? 😮
OK, seriously now, you have may possibilities:
For all these cases, place a case structure on your loop, wire the selector to [i], and make one case "2" and the other the default. Leave the default case empty and place your VI start code on the "2" case.
See how far you get. 🙂
11-25-2008 11:11 PM - edited 11-25-2008 11:11 PM
You'll have to call the SubVI dynamically. I think these two VI's will illustrate what you want.


11-25-2008 11:23 PM - edited 11-25-2008 11:24 PM
Using the integer for the case selector is slightly more lightweight. 😉

11-25-2008 11:29 PM

11-26-2008 10:48 AM
Thanks. It works now.
For all those questions you had: the real VI isn't exactly like what I posted (it was a bit too big). The VI actually only loops every 10 sec, and in each loop the values are different.
Thanks again for the help.