LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange delay between data acquisition runs

When recording data I have two separate DAQ systems each recording data in synchronization. Everything is functioning well, except for the fact that one data output will skip about 50ms worth of data every thousand samples. When operating at 1000 Hz, this makes data correlation impossible. Is there something easy I'm missing that's causing the delay?

 

Below, example of data time jump and Code.

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

How often do the file paths change. Reading them with a value property nodes at every iteration is not right. (A local variable, or the control terminal itself would be more efficient). If they never change, place the data source before the loop.

 

I don't quite see anything that enforces much synchronization. What are the required specifications? What is the daq hardware? Is this running on a RT system or plain windows?

 

Having file IO in the DAQ loop is bad. Use queues and write to the files asynchronously in a parallel loop.

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

The file path is set before the program begins running. I use the file create or overwrite VI with that initially.

 

Essentially, I have two inputs that I need to read in and write to an excel file at 1000 Hz. To accomplish this, I had both of the DAQ systems acquire 1000 data points for each cycle, where each cycle is a second long. I have Access to 2 myDAQ systems and one NI 9205 CompactDAQ, and I'm running LabVIEW 2015 on Windows 10.

 

Even when I try running it with a Producer-Consumer loop, I still run into the same problem.

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

@StandardIssue wrote:

 

Even when I try running it with a Producer-Consumer loop, I still run into the same problem.


Unless you show us what you are doing and how you are doing it, we cannot help. Please attach your VI.

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

You will need to sync your two DAQs. Both run with different clocks.

on the long run one will be faster and one slower. after the slow one has finished, the faster one lags some ms of data??

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


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

Forgive me, this is my first time working with multiple DAQs. What would be a good way of synchronizing the systems? I've been looking at the synchronization stuff offered by LabVIEW, but nothing stuck out as particularly useful.

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

have you checked the examples on this one

Timing and Synchronization Features of NI-DAQmx
http://www.ni.com/product-documentation/4322/en/ ?

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