05-20-2010 11:55 AM
Hi,
I have a useful VI dealing with the IO operations.To save some time I'd like to call the VI as a second instance to do some work paralelly. I created a sub sequence with the execution option 'Use new thread' and I called the Vi (one step in the sequence only). Time of execution of the VI is about 20sec. Durin the execution I called the sub-sequence and I carried on executing my main (parent) sequence. Since 10 seconds from launching the subsequence (in the sepatate thread I called the same VI as in the sub-sequence thinking the secon instance will be created. However, instead of paralell work of the two instances of the same VI I had to wait when mt sub-sequence will finish th efirst call of the VI.
So my question is as in the subject:How to call a second instance of the same VI in 'the same time'?
Could you please advise me about the best approach to solve the problem?
Solved! Go to Solution.
05-20-2010 11:57 AM
05-20-2010 11:59 AM
Your VI needs to be Reentrant. You'll find that option in the VI Properties dialog. Search the LabVIEW help for more information.
Keep in mind though, that most IO devices only allow one active connection at a time, so even if your VI is running asynchronously, you may not be able to have two independent sessions open to your device at the same time, and one VI instance may have to wait.
05-21-2010 08:01 AM
Thanks a lot.
Does it imply that all my subVIs should be in this mode as well or only I should set this option for parent VI only?
05-21-2010 08:03 AM