Hi,
I am using 6534 Digital I/O board in loopback mode, using "burst mode" timing. I have tried and succeeded with a variety of loopback configurations operating at 2 MHz internal clock. The device under test (DUT), receives the digital data, manipulates it, and returns the data into the board. I am using 8 bits out (Port 0), and 16 bits in (Ports 2-3). Port 1 is unused. I have an output task, and and input task.
A problem has cropped up in the input task in that after the read, the sampsPerChanRead seems wrong, though the exact correct data, of the correct length, is in the input read buffer. It is alot of data, in excess of 1 MB, up to 16 MB
In the prototype, sampsPerChanRead is type int32. Looking at this in hex, we would have a representation:
ABCD EFGH, whree 'ABCD' is the upper 16-bit word, and 'EFGH' the lower word.
My DUT outputs 'pqrst' samples. But when I read the number of samples actually read, returned from the DAQmx Read Function, the data is correct, but the sampsPerChanRead,
--> instead of reading 0x000pqrst, reads 0xfffpqrst
Note the prepended 'fff' pattern.
Either my code is corrupting the value, or something else wierd and undetermined is going on. Any ideas anyone? I'd like to be able to use this variable to confirm the number of samples actually read, but it seem to have these prepended 'fff's.
Anybody else see this? Any thoughts/help would be appreciated.
Kip Leitner