LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

threads

I have noticed it is possible to run two labview vi concurrently if they are
separate. I would like to run these two programs from one vi. If I were using
another language I would implement each as a thread. Speed is critical. One
program acquires data from a ADC, the other uses the serial port.
Any ideas?
0 Kudos
Message 1 of 2
(885 Views)
The best way to multithread your two programs is to make each into a subvi. Then place both subvi's on a new main vi. You will want both subvi's to be inside of loop (while loops are generally used) Then put the inputs of those subvi's outside of the loop and wire them into the subvi's. This will cause both subvi's to run at the same time. A good link to look at is http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&75C636329327A87B862568690074800A&cat=8ABEC12D4C0AA4A3862567AC00583899
this has a screen shot of what the diagram of a multithreaded vi will look like.
0 Kudos
Message 2 of 2
(885 Views)