I understand that you want to get all of the data out of the FIFO after a DMA operation. During a DMA operation, 32-bytes of data is transferred from the FIFO to system memory; however, No data should remain in the FIFO after a DMA operation. During a continuous data acquisition, the FIFO may have 0-31 bytes of data stored, but once the computer performs a DMA operation no data remains in the FIFO. This information is detailed on page 2-22 of the 653x User Manual: http://www.ni.com/pdf/manuals/321464c.pdf
Thanks for contacting NI, Marcus G. Applications Engineer National Instruments
I understand that somehow the FIFO must be flushed after a DMA transfer since DMA transfers are not always multiples of 32 bytes.
However, in our application, the 6534 is transferring data continuously while we manually monitor the progress. When we determine that all the data has been sent, we then make the calls to find out how much data has been transferred to the double buffers, then move that data to memory.
The 6534 does not know that no further data is comming, so that data that remains in the FIFO is apparently not being sent.
What is the proper method to tell the 6534 that no more data is expected so that the FIFO is flushed?
I have the exact same question as Kevin. We are using Labview with the 6534 board to collect data in bursts of 1000 packets, each packet is 12 bytes, and the data is clocked externally. Is there a way to programmatically flush a partially full DMA buffer after each burst?
You should have a look at the Traditional NI-DAQ Function Reference Help, and in particular the DIG_DB_Config and DIG_DB_Transfer functions.
At the bottom of teh DIG_DB_Transfer function help it reads,
Using This Function If you have set partialTransfer for an output group, the ptsTfr field allows Traditional NI-DAQ to make transfers of less than half the buffer size to an output buffer. This is useful when Traditional NI-DAQ must output a long stream of data and the amount of data is not evenly divisible by half the buffer size. If ptsTfr is equal to half the buffer size, the transfer is identical to a transfer without partialTransfer set. If ptsTfr is less than half the buffer size, however, Traditional NI-DAQ makes the transfer to the circular output buffer and alters the DMA reprogramming information so the digital output operation halts after the new data is output.
Refer to Chapter 5, NI-DAQ Double Buffering , of the Traditional NI-DAQ User Manual for PC Compatibles for an explanation of double buffering and possible error and warning conditions.