01-14-2015 04:42 PM
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!
01-14-2015 05:00 PM
Merge the code. Put them side by side.
01-14-2015 06:14 PM - edited 01-14-2015 06:36 PM
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:
01-14-2015 07:44 PM
A smarter way is just to put all your code in the same VI.
Two parallel loops if rates are different.
01-15-2015 11:08 AM
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.
01-15-2015 11:41 AM
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.
01-15-2015 02:06 PM
Thank you! I will try to merge two VIs together!