Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

DIG_Block_Check does not return 0

Hello!
I have a problem with the NI-DAQ function DIG_Block_Check (deviceNumber, group, remaining).
I use the NI-6534-card, the NI-DAQ-version 6.4.3 and C++ Visual Studio 6.0.
I want to watch the output of the NI-card and when the remaining-parameter returns 0, I want to change the outputpattern on the card. The outputpattern is send out by the card with the onboard loop feature, but sometimes I want to change it, but only when it is send out completely. My problem is, that the remaining parameter does not return 0. It only returns odd numbers. So, the minimum number is 1 which doesn't help me.
I hope anyone can help me.
Thank you,

Andreas
0 Kudos
Message 1 of 2
(3,096 Views)
Andreas,

The NI 6534 always performs DMA transfers in 32-bit intervals. Therefore, if the data is not transfered in groups of 4 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.

It is recommended that you either make the sample count a multiple of 4 bytes, or change your source code to recognize the end of transfer when DIG_Block_Check returns 1 instead of 0.

At the end of the DMA transfers, the stranded data will be retrieved manually, and status should be updated to indicate that the tranfer is truly finished. There is an issue with the NI-DAQ driver where the status flag may fail to be updated, causing the return value of DIG_Blo
ck_Check to get stuck at 1, even though all data has been acquired. Hopefully, this issue will be resolved in a future release of the driver.

Regards,
Justin Britten

Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,096 Views)