From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

DASYlab analog I/O programming: buffer configuration to copy an analog input on an analog output

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

0 Kudos
Message 1 of 2
(5,765 Views)

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.

M.Sc. Holger Wons | measX GmbH&Co. KG, Mönchengladbach, Germany | DASYLab, DIAdem, LabView --- Support, Projects, Training | Platinum NI Alliance Partner | www.measx.com
Message 2 of 2
(5,719 Views)