Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop generating analog output at the end of DMA buffer? (PCI 6711 with ActiveX CWAO and Delphi 6)

- I use PCI 6711 Card with Delphi and CWAO ActiveX and continues analog output in DMA mode.
- I've tried to stop generating analog output in a CWAOProgress event using CWAO.Reset. The problem is that the signal is stopped during the buffer output.
- I just would stop at the end of the buffer (Half Buffer in continues mode) to be sure my signal is completely sent and the next one as not began.

How can I do that ?
Many thanks
0 Kudos
Message 1 of 2
(3,369 Views)
Hi Alain,

There is no way to directly align the reset with the DMA transfer buffer. How data transfer works for analog output applications is that in your application environment you create a buffer that you write data to. Every so often you are updating that buffer with another "half buffer" of data for continuous output. What the PCI 6711 does is that it has an on-board FIFO that uses DMA to transfer smaller blocks from the buffer you declared in memory to the FIFO. Therefore you have 2 memory locations: your buffer and the on-board FIFO.

I assume when you want to stop at a half buffer, you are referring to the data you just transferred from your application to PC Memory (buffer). However, this block isn't the same size (usually) as the block th
e DMA transfers from this memory to the on-board FIFO. So stopping on the DMA block isn't necessarily helpful in this event.

What I suggest as a workaround is when you receive your progress event that you want to stop at, immediately transfer a half-buffer of data that corresponds to the last point (or zero) of your previous buffer. This will then give the impression you ended right on the end of that half-buffer. Hope that helps.

Ron
Applications Engineering
National Instruments
Message 2 of 2
(3,369 Views)