Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 6534 skips samples at the end of digital output

I am using a NI 6534 digital output board and Labview 8.0. I am updating 16 digital lines at a rate of 10kHz in a continuos update mode. For specific numbers of written samples a certain amount of samples get skipped at the end of the output.

To illustrate the problem I attached a vi. The total length of my output is approximately 3.1 seconds. This vi writes blocks of 1000 samples (corresponding to 100ms) to the output buffer until the buffer is filled to a certain level. After this the buffer gets refilled continuously to keep this level. At the end I write a final block of length L. If I choose L=200 or L=1000 everything is fine. But for example L=190 leads to 6 missing samples at the end of the digital output. The number of missing samples changes with L. To check this, the vi writes a pulse train as the final block. By monitoring this on an oscilloscope one can check that exactly 6 samples get skipped.

I would really like to know what causes this problem and how to fix it!

Regards,
Stephan

0 Kudos
Message 1 of 5
(3,291 Views)
Greetings Stephan,
 
That does seem to be a perplexing issue.  I've taken a look at your code, and one thing that jumps out at me is the wait functions inside the For Loop (10ms) and While Loop (50ms).  Try removing these waits altogether and let me know if that makes any difference...
 
Regards,
 
Nicholas B
National Instruments
0 Kudos
Message 2 of 5
(3,273 Views)

Hi Nicholas,

thanks for your quick reply! I removed the waits as you suggested but unfortunately this doesn’t change the odd behaviour.


In the example program I monitor the number of samples written to the digital output buffer in ‘TotalSampPerChannelWritten’. But this number is larger than ‘TotalSampPerChannelGenerated’ which the program reads from the corresponding property node.


Do you observe the same behaviour on your computer? Is it possible that the problem is caused by hardware/software that I am using? In addition to the NI 6534 I am running two analog output boards (NI 6713) and a multifunction board (6070E) which are all connected by a RTSI-bus cable.

Regards,
Stephan

0 Kudos
Message 3 of 5
(3,268 Views)
Hi Stephan,

According to the manual, http://www.ni.com/pdf/manuals/371518a.zip, go to the index and the keyword is DMA, data is transferred to the 6534 every 32 bytes, or in your case every 16 samples.

Jeff

@stephanw wrote:

I am using a NI 6534 digital output board and Labview 8.0. I am updating 16 digital lines at a rate of 10kHz in a continuos update mode. For specific numbers of written samples a certain amount of samples get skipped at the end of the output.

To illustrate the problem I attached a vi. The total length of my output is approximately 3.1 seconds. This vi writes blocks of 1000 samples (corresponding to 100ms) to the output buffer until the buffer is filled to a certain level. After this the buffer gets refilled continuously to keep this level. At the end I write a final block of length L. If I choose L=200 or L=1000 everything is fine. But for example L=190 leads to 6 missing samples at the end of the digital output. The number of missing samples changes with L. To check this, the vi writes a pulse train as the final block. By monitoring this on an oscilloscope one can check that exactly 6 samples get skipped.

I would really like to know what causes this problem and how to fix it!

Regards,
Stephan




Message 4 of 5
(3,260 Views)

Indeed, this explains my observation. Thanks for the help!

0 Kudos
Message 5 of 5
(3,223 Views)