Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1271

data acquisition: data was overwritten.

$
0
0

Dear Labview helpers,

 

I am searching through the discussion forum for a question/problem that I have. Although I read some suggestions, I would like to have something confirmed, since I also  have read things that contradicted with one another. I am simply not that confident with labview yet and I hope you folks can help me out with a (hopefully) straightforward question.

 

General remark:

I have a DAQ card (PCI-6024E) installed. Then I code the following:

1. I created a pulse train (using counter 1 on device).

2. A second counter (called 'counter 0') is configured to read the time stamps between incoming pulses (from the pulse train).

 

see attached VI.

 

Problem:

Up to 100 kHz the program can follow the amount of data coming in and there is no error.

However, at around 200 kHz I get error -200141: 'Data was overwritten before it could be read by the system.'

 

Their suggestion: 'If Data Transfer Mechanism is Interrupts, try using DMA or USB Bulk. Otherwise, divide the input signal before taking the measurement.'

 

My questions:

1. Labview suggests to make sure DMA is used when data is transferred. I know how this can be programmed, using the 'channel property node' under DAQmx subpallete. However,

I have read in several topics that the driver takes care of this and by default, DMA is used. So I do not need to program this explicitly, I would say.

 

2. In other topics I have read, people suggest 'producer-consumer loops'. This is what I would like to confirm. Is this the only solution for the error I get?

I was hoping that someone could check my VI to see if I could do something else to prevent the error. 

 

Further remarks:

1.When I choose the pulse train frequency to be a certain value, I always make sure that the sampling rate of the DAQmx Timing function is twice as high, to prevent undersampling. PCI-6024E has a max. sampling rate of 200 kS/s. I am aware of the fact that, choosing a pulse train frequency higher than the sampling rate, leads to undersampling. However, 

I would say that this does not create the error described above. 

 

2. I know that, by choosing a certain sampling rate, Labview automatically creates a pre-allocated buffer. However, one can also tell the size of the buffer explicitly in the DAQmx Timing function.

 

3. In the DAQmx read function is set 'Number of samples' to -1, meaning that whatever data is available in the buffer, it will read it. 

 

I hope my question is clear.

 

Thank you in advance, 

 

Monique

 

 

 

 

 

 


Viewing all articles
Browse latest Browse all 1271

Trending Articles