Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Data Dropout / Flatlining during Analog Output Waveform Generation.

Hardware: Legacy DAQ Devices>>Multifunction DAQ>>AT-MIO-16F-5

Problem: I am doing analog waveform generation using an AT-MIO-16F-5. My output data buffer is smaller than 64 KB (or 32,768 data points), but when I start generating the waveform, I see periodic flat lines on the output and I get a NI-DAQ warning code 15 (given buffer requires DMA reprogramming at run time). How can I get around this problem?

Solution: Even if your buffer may fit within a 64 KB page in memory, your compiler may have allocated the buffer so that a page boundary happened to fall somewhere in the middle. When a page boundary is encountered while doing analog outputs with DMA, the DMA controller needs to be reprogrammed to begin transfers on the next 64 KB page. What you need to do is re-align the buffer using the Align_DMA_Buffer function in NI-DAQ. Simply provide the buffer name (pointer) to this function, and the buffer will be re-aligned to begin at a page boundary, ensuring a continuous transfer from the computer memory without DMA reprogramming interruptions.
Another way to circumvent this problem is to allocate 2 DMA channels for analog inputs using the NI-DAQ function Set_DAQ_Device_Info (in older versions of NI-DAQ, this is called Set_DAQ_Mode). When a page boundary is encountered, the NI-DAQ driver will automatically hand-off the data transfer operation from one DMA channel to the other while the original one is given time to be reprogrammed.

Related Links:

Attachments:





Report Date: 01/23/1996
Last Updated: 06/18/2004
Document ID: 0HMIHR8Z

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit