LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real Time Signal Acquisition without Loss of Data

Hello,

 

We are trying to acquire analog signal thorugh 5122 digitizer. We are constantly using it in full speed: 100 MS/s. that is because the signals that we want to acquire are at very high frequencies. 

 

The problem is that, when we digitize the signal, during the "fetching" process from the memory of board to computer, there occurs a "dead" time in which acquisition stops so we lose some of analog data. We are implementing acquisition code with signle while loop. 

 

My question is that, how can we implement without any loss? Is there any way? Parallel loops, timed loops can be solution? 

 

Thanks.

0 Kudos
Message 1 of 4
(2,629 Views)

In general, yes, you can use parallel loops. This program architecture is called a producer/consumer design pattern. In the producer loop, the data is acquired. Then the consumer loop processes that data. The advantage of this is that the two loops can run at different rates. That way if you are doing real time data processing in the consumer loop, the producer loop can continue running while the consumer loop processes. You can create a new VI from a template using the "Producer/Consumer Design Pattern (data)" template. This uses queuing to create a buffer between the producer and consumer loops.

 

Here is a link to a description of the producer/consumer architecture.

 

However, be aware that you are taking in a large amount of data so your computer may have a hard time handling the data processing fast enough to keep up with the acquisition, depending on how complicated the processing is. If this continues to be a problem, you may have to resort to processing the data post-acquisition.

 

Chris G

Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(2,600 Views)

I have tried this today. I observed that I should acquire large amount of data(like 8-10 ms with 100 MHz sampling frequency) since fetching is very time consuming in consumer loop.  

In producer loop I constantly call the "niScope Initiate Acquisiton" function and triggering becomes a problem. At the end I saw that we cannot really do "real time" signal processing. We always lose some amount of data. 

I personally believe that real time signal processing should be done using FPGA and point-by-point acquisition and analysis.

 

Thank you for your interest.

0 Kudos
Message 3 of 4
(2,593 Views)

Hey hawfeyn,

 

That might be a good option. If FPGA is what you're going for, the NI cRIO (Compact Reconfigurable I/O) is probably what you would want to look in to. You can include an embedded controller that runs NI's real time OS. The other option would be to use stream to disk technology. This immediately writes acquired data to disk with minimal computer processing required. This may be a good option if post-acquistition data processing is acceptable for your application.

 

cRIO product page:

 

https://www.ni.com/en/shop/compactrio.html

 

 

Hopefully this helps. Good luck!

 

Chris G

Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,581 Views)