04-02-2009 12:42 PM
Hi
I have a VI which i want to call a number of times defined by the user. so i can simply put the vi in a for loop and call it accordingly.
now each time the vi is called, it executes data independently of the previous call. Hence i want to run them in parallel using reenterant subvi property.
However the no of times a vi needs to be called can be determined only during run time..
How do i do this?.. hope i have made my question clear
thanks in advance |
Solved! Go to Solution.
04-02-2009 01:12 PM
What does the subVI do? Is it supposed to run continuously? Does it have a loop? If so, then you should launch the VI using the VI Server functions. This allows you to launch the VI and then go to the next iteration of the loop to launch a new instance.
Check the examples that ship with LabVIEW on using the VI Server to launch VIs dynamically. You will also find numerous examples in this forum.
05-03-2009 12:49 AM
Hi smercurio_fc,
Thanks for your reply.
I tried using VI server reference.
The subVI has a for loop inside it
However i am not getting the desired result. According to what you said, using the vi server reference in a loop should launch the subVI and move on to the next iteration and then call another clone of the subVI- correct me if i misunderstood-.
and if i understood correctly then this is not happening cause LabVIEW is waiting for this called subVI to execute completely and then only it moves on to the next iteration. I want multiple instances of the same VI to run in parallel
initially i thought it might be a problem of the subVI being non-reeenterant, but even after making it reenterant, i am having the same problem.
pls share your thoughts and help me.
Thanks
05-03-2009 04:29 AM
ok, i just figured it out.
the example of multiple pop ups came into handy.
Thanks!
problem solved