LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 files running at the same time for adquiring data from different ways

I want to adquire from a serial port( using VISA) and from a DAQ at the same time. I want data form both devices at the same time.
My program is a while loop reading continuously from both devices until I stop the while loop with a control.  
I have noticed that I don't receive right data when I read from both devices in the same program.
 
So, I have tried to run 2 different programs, one for Visa adquisition and another for DAQ adquisition, at the same time. At this way i receive data ok.
 
So, i want to know how can i do execute 2 different .vi files at the same time and how can i get data from the another one.
 
Please, help me!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Smiley Sad. I don't know what to do!
Luz 
0 Kudos
Message 1 of 3
(2,852 Views)
Luz,

you can insert two seperate while loops in parallel into one VI. Please take a look into the template browser and the example finder of LV for some examples. You can find the template browser by selecting "new" (not new vi!) in the file-menu. The example finder is located in the help-menu.

hope this helps,
Norbert B.
NI Germany
Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(2,848 Views)

Norbert is right luz,

 

U can inster both while loops in parallel on the same vi and they will run in parallel mode. The only problem is if you want to share data between both loops, then u will need to use local variables.

 

If you want to start/share data between 2 vi's you will need to use functional global variables, global variables or shared variables.

 

Regards,

Jaime Cabrera

NI Applications Engineering Spain

Regards,

Jaime Cabrera

NI Applications Engineering Spain
0 Kudos
Message 3 of 3
(2,828 Views)