02-06-2007 08:34 AM
02-08-2007 02:41 PM
02-12-2007 06:48 AM
Hello,
Thank a lot for your answer. I will try the IRQ transfer, but it might not be fast enough for me. I will see.
But I would still like to try to make it work with DMA transfer. So up to now I figured a way to find out how many samples have been acquired (I make change detection and use NI PCI-6602 to measure the interval between changes and the counter board puts all the samples in the buffer as I would expect it to do.)
My problem is now how to access the "stranded" data. I have found the following in the Support section of the NI site (with blue):
DIG_Block_Check Always Returns 1 When Using NI 6534
Hardware: Digital I/O (DIO)>>High-Speed>>PCI-6534
Problem: I am using the NI 6534 and the NI-DAQ API. DIG_Block_Check is supposed to return the number of items remaining to be transferred after a DIG_Block_In or DIG_Block_Out call; however, it always returns 1. Why does the call think I always have one more sample remaining to be transfered?
Solution: The NI 6534 always performs DMA transfers in 32-byte intervals. Therefore, if the data is not transferred in groups of 32 bytes there will be "stranded" data. This different behavior (compared to the NI 6533) is due to the addition of onboard memory to support high speed transfers.
At the end of the DMA transfers, the stranded data will be retrieved manually, and status should be updated to indicate that the transfer is truly finished.
It is recommended that you either make the sample count a multiple of 32 bytes, or change your source code to recognize the end of transfer when DIG_Block_Check returns 1 instead of 0.
It seems that there is a way to get the samples but I do not know how to "retreive them manually".
Thanks for your help.
Adrian.
03-13-2007 03:02 PM
03-15-2007 01:48 PM