I want to parallely execute 3 VIs simultaneously. I have used a global variable to trigger event in 3 VIs. But the input from 1st VI is used as the ouput for 2nd one. So the 2nd VI is waiting for 1st VI to complete. How to overcome this problem? The input is an array variable. I want ot execute the 2nd VI for each row updation of array from 1st VI.
Please give a solution
Solved! Go to Solution.
But the input from 1st VI is used as the ouput for 2nd one. So the 2nd VI is waiting for 1st VI to complete. How to overcome this problem? The input is an array variable. I want ot execute the 2nd VI for each row updation of array from 1st VI.
To let the 2nd VI execute AFTER the 1st VI you should use DATAFLOW by wires!
When you really want to execute them in parallel but still have 2nd wait for 1st you should use a queue (producer-consumer scheme)…
I want to run three VIs in parallel. One VI will generate a set of data (say 1 row of 2D array in each iteration). The 2nd VI will do some processing in the first row and calculate result and update the data structure.. The third VI has to display this and log to a text file. 3rd VI will then wait for 2nd row to update. The three VIs has to run parallel.
Please tell a solution for the above problem ?? . Also which data structure I have to use for sharing data between VIs?Thanks in advance
what's your reason to start a new thread for the same topic - after you got an answer?
Please tell a solution for the above problem ??
Use a producer-consumer scheme.
The three VIs has to run parallel.
Why do they need to run in parallel when they have to wait for each other???
Also which data structure I have to use for sharing data between VIs?
Data structure depends on your data…
How can I share data between two VIs other than global variable?.
Producer consumer means through queue message handler?
did you have a look at the link for the producer-consumer pattern?
did it answer your question?
have you tried to implement the pattern in your own VI?
do you have problems? do you have code to show your problem?
Thanks for the reply.Yes I have.
But the problem is I have to use two VIs. One will generate data in loop and another Vi has to get this data and do some processing and display to the main GUI. For the literature and NI template I got a single VI for production nad consumption. How to implement it in two VIs. Please help
implement a producer-consumer scheme.
LabVIEW comes with ready-to-use example projects, (atleast) one of them shows a typical producer-consumer setup!
What have you tried? Where are you stuck? What is your problem?