08-15-2013 11:26 AM
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
08-16-2013 01:42 PM
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.
08-16-2013 03:05 PM
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.