05-05-2011 10:46 AM
Hello, Gurus!
In our application we need to do memory tests and download firmware to our test devices. These tasks may take several minutes to complete. I want to start a seperate VI running from a parent VI and allow the parent to go on with its execution. parallel loops is not an option because the parent task needs to end and return to the test executive.
The issue is calling the VI to start it but getting the calling VI to continue,
I can do this by compiling the independent task into an executable and starting it with the Command Execution VI, but I thinking there probably is a simpler way that I'm overlooking.
I'll appreciate all enlightenment.
Thanks!
Roger
Solved! Go to Solution.
05-05-2011 07:04 PM - edited 05-05-2011 07:06 PM
Hello,
A couple ideas come to mind which may help here.
Run a VI and don't "Wait Until Done"
You can do this using VI Server. In short you can get a reference to a VI (namely the one you want to spin off), and using a property + invoke nodes you can run the VI, optionally show it's front panel, and set a boolean to "Wait Until Done" - in your case, setting this to false will do the trick.
Run Multiple, Independent Instances of the Same VI
Also of potential interest is the ability to run "clones" of a VI. That is, opening multiple independent instances of a given VI. If you need more than one instance of your VI to be running, this may be of interest. There is a concept known as "reentrance" which causes a new activation record (ie. memory space) to be allocated for each call of a VI, when it's loaded (ie. reference opened) using the appropriate configuration. In this case, use the options input on the Open VI Reference function, passing it the value 0x08 to achieve this. Note that this input is not wired in the image above, but as you play with it on your block diagram, you'll see it 🙂
Give the documentation around these functions a solid read, and you should have a few new tools in your bag 🙂
Hope this helps!
05-09-2011 08:23 AM
Hi,
Thanks!
I wuz thinkin' that VI Server was only for comm to remote PCs (I'd never used it), but it works perfectly for what I want to do.
Thanks, Again!
Roger