LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XNET Sync'ed w\ DAQmx Loop Latency

When I take data using this program, it always takes additional samples.  Some of those I believe are from latency and some may be from being out of sync?  If I program a 1000hz sample rate for 2 seconds of elapsed time, I sometime receive as many as 2011 samples in the TDMS file.  The XNET always takes more samples than the DAQmx and is reflected in the timestamp in the TDMS file.  Does anyone have any insight as to why this happens?  

 

Thanks!

 

-Nick

 

DAQ0.JPG

 

 

 

 

 

 

 

DAQ1.JPG

0 Kudos
Message 1 of 3
(2,978 Views)

It looks like you are not specifying a timeout or a samples to read. The default setting for the timeout is 0, which means that the XNET Read (Signal Waveform) will immediately return all available samples up the limit number to read specifies. And since we do not have anything set for the number to read input (the default is -1), the maximum number of samples is returned. So basically whenever we call the XNET Read VI, we will receive as many samples that are available, and this may be more than just one sample. I would make sure that we are specifying a certain number of samples for both the XNET Read as well as the DAQmx Read.

dK
0 Kudos
Message 2 of 3
(2,943 Views)

And one more tip.

 

Right now you are only reserving the DAQ before you start.

But to speedup the start of the DAQ, you can also commit your task to the DAQ before starting it.

Replace your reserve with a commit.

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