LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I am loosing data with productor/consumer data adquisition of two signals

Hi, my problem is that I'm using a USB 6009 DAQ, and a productor/consumer where the productor adquire two signals with 120º degres gap and the consumer process the signal and with a tone measurements  to measure the gap between them. but every certain time the value of the gap throw thrash data, and I think that the adquire it is more fast than the processing, so my questions are:

how can I measure the time it takes to process the signal in a while consumer loop?

What loop it is recomended to use?

what is the rate of adquire by default for the DAQ Vi express? 

How can I control it using the channel more propertly?

I am measuring two 60Hz signals with 1 Vpp, adquiring N samples with 1k samples and a rate of 600, when I am using two generating signals works perfectly

 

0 Kudos
Message 1 of 2
(2,156 Views)

@Franbastardo wrote:

I am measuring two 60Hz signals with 1 Vpp, adquiring N samples with 1k samples and a rate of 600, when I am using two generating signals works perfectly

 


I think I see your problem.  You say you are acquiring 2 (continuous) signals using (presumably a 2-Channel) AI system set to acquire N samples, with a sampling rate of 600 Hz and a number of samples = 1000.

 

Instead of Acquire N Samples, set your 6009 to acquire continuous samples.  Look at the Producer Loop -- it does a DAQmx Read, and 1000/600 seconds later, the function finishes and presents a 2x1000 array of samples to be further processed (by being sent to the Consumer).  Meanwhile, acquisition continues without a break and the loop finishes, starts the next loop, and 1.666 seconds after the first Read finished, the second one finishes and sends its data to the Consumer, without missing any data points.  Continuous sampling should give you continuous data ...

 

Bob Schor

0 Kudos
Message 2 of 2
(2,129 Views)