I’m trying to run two programs simultaneously in the same Labview window. One of the program is measuring the airflow through a USB device connected to the computer. The other program is acquiring sound through audio jack. I have inserted the sound acquisition program into the original or main program which measures the airflow. After insertion, only the sound acquisition program runs and displays sound signals. But the airflow program is not working and even not displaying in the graph. Here also I have attached the screen shot of the front panel and block diagram.
Could anyone help me to fix this problem?
You've put one loop that runs forever in another loop. The outer loop won't loop, it will execute one iteration (i=0) and then wait for the inner loop to finish. That won't happen until you press stop.
Use execution highlighting to see this happening...
You need two parallel loop, not two nested loops.
Then you need some data communication mechanism. Queues, or the like.
You might invest in doing some courses first.
Why did you send a Microsoft Word Document to a LabVIEW Forum? Why didn't you attach the LabVIEW VIs that are giving you trouble, so we could (a) see them clearly, (b) edit them, (c) try to execute them, and (d) be able to better help you? We all have LabVIEW -- not all of us have Word (and we couldn't execute your code from Word even if we did have Word ...).
LabVIEW code in a Word document. That is a new one. LOL
Thank you for your suggestions and willingness to assist me. I really appreciate it.
Here I have attached the LabVIEW VI's of the two programs. The flow_VI is for airflow measurement through a USB device connected to the computer. The sound_VI is for the sound acquisition through audio jack. So I have to combine these two programs under one VI's for it to work simultaneously at the same time.
Hope you could help me on this issue.
Thank you very much.
You have two VIs, each of which has a Front Panel with elements you want to use. What you really want is One VI to Rule Them Both, One VI to Find Them, One VI to Show Them All, and with LabVIEW Bind Them. From Austin, where NI Dwells.
This can be done (believe it or not!). Here's the Idea:
And I'm going to stop here. If you've been following this so far, you are in a position to create a Sauron for yourself, get Flow and Sound running "within" it, and leaving (for now) the three Stop buttons. [Suggestion -- make "Dummy Flow" and "Dummy Sound" that do some very simple things, like counting once/second for one, twice/second for the other, and try this out. LabVIEW is great for creating simple Test routines to test out complex code -- once you get the idea, you can substitute your real Flow and Sound]. Once you have the Demo working, you can substitute your real Flow and Sound and be off and running ...