09-05-2014 07:00 AM
Hi all,
I want to optimize one of my LabView procedures. Let's say that I've got 2 VIs that return the same values, but use differend data sources. I'd like to launch both of them and simply collect the result from the faster one.
I figured I could do this by running both VIs asynchronously and polling a global variable, but I was hoping that there is a better solution.
If I "Wait on asynchronous call" for both VI, I'll wait for the slowest one to finish. Is there a way to check if VI has finished its job without running into "wait on asynchronous call"?
Thanks in advance!
Tomasz
Solved! Go to Solution.
09-05-2014 07:10 AM - edited 09-05-2014 07:10 AM
09-05-2014 07:12 AM
In this case, I would probably go with the notifier. You could possibly also go with a User Event.
09-05-2014 07:15 AM - edited 09-05-2014 07:16 AM
It is a better idea than polling a global variable, but then again, after reading the queue I'll probably destroy it right away, invalidating its reference used by the slower VI. It should check if it's still valid then.
I was hoping for something else, but this will do as well. Thanks!
09-05-2014 07:20 AM - edited 09-05-2014 07:21 AM
Hi Tomasz,
each reference of the notifier/queue can be closed without destroying the notifier/queue! Infact this is standard behaviour as written in the help…
What "something else" are you looking for?
09-05-2014 07:27 AM
Indeed you are right! My bad! 🙂
Thanks again!