Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Double Buffered Digital output on a DIO-32HS and gets occational 10803, 10843 & 10608 errors and data corruption - why?

"Using Double Buffered Digital output on a DIO-32HS and I get occational 10803, 10843 & 10608 errors. Also the data is corrupted when observed at the other end of the outputs.
I have upgraded to the lastest 6.9.1 driver for NT4.
oldDataStop is set (=1) via Dig_DB_Config.
Dig_DB_HalfReady reports these occational errors and I'm not sure what action I need to take in each case. Nor why I get data corruption.
I'd be happier for the output to stop if my code fails to fill the buffer in time, but it is unaccaptable for the data to be out of sequence or repeated in any way.
I only require 314Kwords/sec output rate.
Ths is a re-post from the V
isual C forum - thanks to Chris Matthews."
0 Kudos
Message 1 of 4
(3,587 Views)
Aaron

Are you getting bad data when oldDataStop = 1? Keep in mind that when using Handshaking, you may not have consistent intervals of data being transfered. (i.e. it is possible that you will not get data for every clock pulse.) Make sure your external device is using the correct handshaking mode. If you device expects data at constant intervals, you might want to look into using Pattern I/O.

With oldDataStop = 1, you should recieve a 10803 error from the DIG_DB_Transfer function when it is trying to output old data. A 10608 error will come from the DIG_DB_HalfReady function if there is no transfer in progress. This will stop the program before old data is transfered.

Brian
0 Kudos
Message 2 of 4
(3,587 Views)
Brian,
Sorry to mislead, but I am calling DIG_Block_PG_Config (Dev, Grp, 1, 1, 0, 0, 0) - so I am using Pattern Generation mode. The Req line clock is supplied from a fixed square wave at 314KHz.
I get data loss (old data being resent) with oldDataStop=1.
with oldDataStop=0 I get no spurious errors and as long an NT schedules everything OK, I get a few periods of data loss - aprox 3x10Kword half-buffers in 5minutes.
Also setting oldDataStop=1 increases the CPU usage by 50%, ie with oldDataStop=0 my application runs at about 15% CPU, but with oldDataStop=1 my application runs at 75% CPU!
So, I am running with oldDataStop=0 for lower CPU usage & no spurious errors.
What I think I need is to be able to pre-load the DIO with the next data I have rea
dy and for the driver to use its interrupt to move the next half-buffer when it has sent the previous half buffer, ie I can always provide the next buffer before the DIO is ready 99% of the time.
Occationally, I do get a data underflow situation where I have not got data available, when I need to ensure that the DIO cards sends the two half-buffers it has got and then to stop sending until I have data available.
Thanks,
Aaron
0 Kudos
Message 3 of 4
(3,587 Views)
After months of hard working and hot phone calls with NI we discovered that OldDataStop bit DOESN'T WORK.
After that we avoided to use it.
Infact if the bit is at 1 level the NIDAQ returned 10803 error very often aborting the transfer also if we managed the transfer correctly.
My suggestion is to DON'T USE THE BIT and write some code that can understand if the data is old.
Our data rate now is 2MWord/sec (without errors)
0 Kudos
Message 4 of 4
(3,587 Views)