LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronizing serial and daq data

Solved!
Go to solution

Hi,

 

I'm attempting to acquire simultaneous data from a serial port and a NI USB-6211 board.

I wish to write the data simultaneously and at every second.

At first the I couldn´t acquire the data as i wanted because there were delays in the acquisition, but then I separeted both serial and daq in two loops and it was solved. However now I can´t manage to write the data simultaneously into the file.

 

 

Any Ideas?

 

Thank you.

0 Kudos
Message 1 of 3
(2,570 Views)
Solution
Accepted by topic author ritaraujo

Would it be possible to post your code?

 

You could sync your loops with a "wait until next ms tick with a value of 1000.  This would cause both loops to execute once ever second at at the same time.

 

It sounds like you now have a problem of writing the data to a file at the same time.  You could put for file write in a third loop and transfer your data from the other two via queues or functional globals and then write to the file when both peices of data are ready.

Gregory Osenbach, CLA
Fluke
0 Kudos
Message 2 of 3
(2,557 Views)

I used the global variables and it worked!

 

Thanks!:)

0 Kudos
Message 3 of 3
(2,527 Views)