07-24-2008 01:00 AM
07-24-2008 01:12 AM
Hi Clement,
you can load your subvi dynamically, use the "Open VI Reference" function for it.
Mike
07-24-2008 03:11 AM
07-24-2008 03:42 AM
07-24-2008 03:48 AM
Hi Henrik,
afaik, it´s in LV7.1 the same.
Mike
07-24-2008 03:49 AM
07-24-2008 03:56 AM
Hi Clement,
why is this only possible it the sub vi is reentrant? If it is not reentrant, then you can load it only ones. If you need it more than ones, change your sub vi to a vi template.
Mike
07-24-2008 11:18 AM
Your screenshot is right in the neighborhood of what I'd suggest. A couple comments:
1. The notion of re-entrancy ought to match. If re-entrancy is desired, both the subvi's "VI Properties" should include it *and* the call to Open the vi reference should also use the correct mode designation in one of the inputs. I *think* the magic number for dynamic re-entrant open is 8. If re-entrancy isn't desired, then I'm puzzled about the need to have the re-entrant execution property set in the subvi. I'm also a little surprised that attempting a non-reentrant Open on a reentrant subvi didn't generate an error.
2. Dunno if it's *wrong*, but I never have wired in a type descriptor when opening a reference to a vi that I intend to run using the "Run VI" method. I've only done such wiring when using an invoke node. For what you are wanting to do, the "Run VI" method is the right way to go. I'm left wondering if perhaps somehow the wired type descriptor is at fault for requiring that the subvi be set up as reentrant.
-Kevin P.