I would like to use this pattern for launching an asynchronous VI:
The specific use case here is to run a specific subVI, but not have to wait for the subVI to complete (i.e. to launch a daemon-like VI).
There are a few advantages to this method:
1) The Static VI reference makes it very easy to open the VI that is being "launched" and make changes.
2) If I change the connector pane of the Asynch VI, the Asynchronous Call By Reference Node updates or indicates that I broke something (like a regular subVI would).
3) The Asynch VI is automatically included in deployed code (exe's, TestStand deployments), because of the Static VI Ref.
The main problem I have is that I can't determine at run time if the VI is already running or not. That's because the Static VI Reference causes the Asych VI to be "Reserved for Execution" when my launcher VI runs, and always report "Running" for the Execution State. In the case structure above, I can't take meaningful action based on the ExecState (like don't run if already running), because the returned value is always running.
This idea proposes that the Execution State property (or some new similar property) be expanded to truly tell us whether a VI is actually running or not (regardless of whether it is a subVI, or reserved for execution somewhere). Since the "Run" button is capable of showing this difference, there ought to be a way to programmatically access that state information.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.