08-19-2013 03:35 PM
Hello,
I am trying to output data from subVI to the main program in real time. But I found the the value can be only trasferred when the subVI is finished.
I make some research and I think using queue is the best, but global variable.Can you any give me some tip on using queue to transfer data from subVI to the main program in real time?
Thank you!
08-19-2013 07:13 PM
Look at the Simple Queue.vi example that is installed with LabVIEW. If Loop 1 were in a subVI it would generate data that the main VI could consume in a parallel loop (either in another subVI or on the main VI block diagram). And yes, a queue is the way to do it if you want to make sure all the data gets transferred, and in order. If all you care about is the current value (and are ok with lossy communication), then look at using a notifier.
08-19-2013 10:59 PM
You might also want to checkout the two producer/consumer design patterns. One uses queues and the other event. They might give you some ideas also.
Mike...
08-19-2013 11:09 PM
08-20-2013 10:53 AM
Yes,sorry I cliked the post twice.