LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't set sample rate < 1609

Solved!
Go to solution

Hi,

 

we've recently upgraded to LV 8.6 and DAQmx 8.7 and then got problem with the data aquisition that uses the DAQmx API. For example, we have a cDAQ-9172 and 9239 AI module. The device could be user configured and a typical configuration could be a continous acq, single sample in 10 Hz. After upgrading the error -200279 "Attempting to read samples that are no longer available ... has been overwritten" has come up soon after the task was started. It turned out that the property SampleClkRate is not affected by the value that is put into the DAQmx Timing.vi, unless it was set > 1612,9, if you set 10,100 or 1000 or whatever the sample rate will still be 1612,9 when you read from the timing property.

 

So the buffer then of course becomes overflown, but the question is why there is a minimum sample rate like this? Earlier it was fine to set it an arbitray value and the acquistion would be in that rate.

 

There are many solution to get around this (read faster etc.), but it strange that the behaviour of the code can change like this from a version to another...

 

/Henrik

0 Kudos
Message 1 of 4
(3,051 Views)

Hi Henrik,

 

could you show your code?

I can assume there is a lower limit for sampling rate, but 10 Hz should be doable.

I assume no error is generated in the DAQmx timing VI.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 4
(3,034 Views)

No errors are generated until the read buffer gets full. I attach a simple code example that generates the problem I've described.

 

/Henrik

0 Kudos
Message 3 of 4
(3,007 Views)
Solution
Accepted by hunkel

I see one flaw in your program, you have hardware timing and software timing in one loop. The loop is limited by the software wait. (I think this is on purpose for demonstration).

 

I have looked at the manual for the 9239 and page 18 notices that hte minimum input rate is 1613kS/s

So that is explained, the only problem is that the DAQmx timing VI does not return an error or warning when setting a too low rate.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 4 of 4
(2,996 Views)