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?
cDAQ-9174 with NI 9239 & NI 9265 modules
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.