Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

FIFO flush after DMA

We are using the NI 6534 for digital I/O. According to the documentation, DMA is done 32 bytes at a time. Therefore, 0 to 31 bytes remain in the internal FIFO after a DMA operation.

Can someone point the the correct driver API to get the remaining data out of the FIFO after the DMA operation?

Thanks.

Kevin Randolph
krandolph@cdg.hitachimed.com
0 Kudos
Message 1 of 6
(2,853 Views)
Hi Kevin,

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
0 Kudos
Message 2 of 6
(2,850 Views)
Thank you Marcus,

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?

Thank you.

Kevin Randolph
krandolph@cdg.hitachimed.com
0 Kudos
Message 3 of 6
(2,850 Views)
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?

Thanks.
0 Kudos
Message 4 of 6
(2,833 Views)
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.

Best of Luck,

Jared A
0 Kudos
Message 5 of 6
(2,822 Views)

Hi,

 

Sorry for bringing up a very old and very dead post.  But I was wondering if anybody has an idea whether this problem can be solved now using LabVIEW 2010 with Daqmx 9.0.

 

Thanks,

 

Lester

0 Kudos
Message 6 of 6
(2,056 Views)