02-09-2012 12:45 PM
Hi everybody,
I have trouble to configure DASYLab environment and DAQmx tasks to read continuously samples from an analog input, and write them to an analog output (after applying them a gain).
I have attached a picture of the used DASYlab code.
The input task is configured for continuous sampling, Samples to Read number is 100, and Sample Rate is 1k(Hz). The output task is configured in the same way.
The problem is that after several seconds the classical DAQmx error appears :
TâcheTension >> DAQmxReadAnalogF64
Attempted to read samples that are no longer available.
I’d like to apply general DAQmx advices to avoid this error, and particularly increase the buffer size, but I don’t know how.
Moreover, the acquisition is not very fluent and very dependant of the computer activity.
Is there a way to configure DASYlab buffer or to add temporization in order to make the acquisition/generation more fluent and avoid the DAQmx error?
Thank you.
Best Regards.
Used configuration:
DASYlab12
cDAQ-9174 with NI 9239 & NI 9265 modules
02-15-2012 08:38 AM
Hi Audrey,
i've answered by email, too:
The NI-9239's minimum sample rate is greater than 1000 Hz (~1600Hz): http://sine.ni.com/ds/app/doc/p/id/ds-199/lang/de ).
So, data is generated faster as it is put out, because the input-task falls back to the hardware's valid 'higher minimum sample rate' of 1600Hz, with the output-task still working with 1000Hz.