Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

sampling rate error with DAQmx NI PCI-6024E

Hi all!

 

I am presently working on a project using LabView daqmax vi as an interface with my experimental device (Piezoelectric resonator and test beaker) to perform FFT and Spectral analysis. My problem is that after finishing the final steps of design i am experiencing sampling rate error with the code. Not sure if it is with my code or with the daq setpu...

 

it says"Attempted to read samples that are no longer available. The requested sample was previously available, but has since been overwritten"

 

Would be gald if someone could suggest me the right way to solve it.....

 

Regards,

Vipul

 

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

Since you are using Continuous Samples, do NOT wire anything to the Samples Per Channel input on the DAQmx Timing.  All you are doing there is limiting the buffer.

 

Here is what is happening, you are setting your buffer size to 250 samples and then trying to read 16384 samples, which is a lot more than 250.  Therefore, buffer overflow.

 

By leaving the Samples Per Channel unwired, you are allowing the buffer size to be the default, which is usually as much memory as the card has.  Hopefully it will be more than the 16384 samples you need per read.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(3,863 Views)