From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can collect the data from laptop sound card and serial port at the same time?

I'm working on a project, I need to collect the data from laptop sound card, and also from serial port at the same time.

 

The attachments are my VIs for sound card and serial port communication, I'm wondering that can I combine these two VIs together? Or can I run these two VI at the same time?

 

Thank you!

 

Download All
0 Kudos
Message 1 of 7
(2,948 Views)

Merge the code.  Put them side by side.

 

 

George Zou
0 Kudos
Message 2 of 7
(2,940 Views)

You could use a couple of sub-panel containers and invoke nodes. You pass in a reference to the vi's that you want to run. Here's a simple example:

sub-panel.jpg

0 Kudos
Message 3 of 7
(2,919 Views)

A smarter way is just to put all your code in the same VI.

 

Two parallel loops if rates are different.

0 Kudos
Message 4 of 7
(2,897 Views)

What if you want to reuse one of the vi's in another project? I think keeping them seperate is more reusable, maintainable and more modular.

0 Kudos
Message 5 of 7
(2,847 Views)

Of course but as the actual VIs are not designed to be reusable (no connector pane, they both have an inside while loop,...), we would have to explain some common design rules to Mr yatang.

 

In the present case I think it's easier for him to merge both in the same VI and then learn from experience.

0 Kudos
Message 6 of 7
(2,835 Views)

Thank you! I will try to merge two VIs together!

0 Kudos
Message 7 of 7
(2,821 Views)