Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB 6009 and DAQmx read module procures unequal number of samples

Hello,

 

NI USB 6009 with DAQmx read module procures unequal number of samples when used in N samples acquisition mode!!

Only single channel AI channel read operation is done.The channel is configured to run continously in MAX settings. In the labview appplication, DAQmx read module is wired to read 40 samples on each run.

 

Problem is very less when the DAQmx read is done for 40 samples at 250 Hz. However, when the acquisition frequency is increased to 500 Hz. number of samples returned is sometimes 39 or 40 or 41. The figure is random. This happens for 375 Hz, 400Hz and 450 Hz also.

 

Each reading loop is carried out multiple times, and each reading loop is expected to procure 40 samples in synchronous fashion.

 

In between each read loop there are other processings for AO also. The program is written such that after one single AO operation, 40 samples of AI is procured without interruption and then saved in array so as to keep the sampling time as correct as possible. So, 10 loops of 40 samples shall give a vector of 400 data points WHICH IT GIVES!! HOWEVER, within each read operation, number of input samples is changed and adjusted may be somewhere in one of the next read cycles. I am more concerned with an intact set of 40 samples from each time of read operation as each acquisition of 40 samples is due to different process dynamics.

 

Any help will be appreciated.

 

Thanks,

 

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

On emore question,  Is there any way to clear the read buffer? it may so happen that each time a read operation is done one or more samples from previous read cycle is returned by the DAQmx Read module.

 

Any help will be appreciated and urgent...Smiley Sad

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