Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing acquired data in real-time while leaving the buffer untouched

Hi guys,

 

I'm new to programming DAQ boards, and I'm using the DAQmx C Library. Right now I'm trying to figure out if there's a way to do both real-time reads and keep the acquisition buffer untouched for later use. The idea is the following : I'd like to read the last acquired samples in real-time, at random intervals (and with shortest lag), in order to control my application. After the acquisition is terminated, I'd like to read the complete set of data acquired (including the data read in real time) and save it to disk for later analysis.

 

This sounds trivial but I couldn't find an answer in the FAQ or with a few googling attempts.

Do I have to read all the available samples in real time and store them in my application while using only the latest for control? This would be wasting time to read information that's unused online, wouldn't it?

 

Thanks for your help,

 

Pierre 

0 Kudos
Message 1 of 3
(3,145 Views)

Hi Pierre,

 

Can you tell me what hardware you are using ?

 

I'm not sure that this is possible, it depends on your hardware, but in the main cases, when you acquire data with an acquisition board, the samples are saved into the acquisition buffer of the board which is a FIFO memory and when you want to retrieve these samples, they are transfered into the RAM memory of the PC via DMA.

 

Have a nice day !

 

Regards,

0 Kudos
Message 2 of 3
(3,110 Views)

I'm using a PCI 6221 DAQ board. 

At the end of a real time control episode, when I try to read all the samples from the first onwards, I only get the latest samples since the last 'real time' read. This is consistent with your explanation. 

Thanks for making it clear that I'll have to manage the buffering in my application. 

 

Cordialement, 

Pierre 

0 Kudos
Message 3 of 3
(3,105 Views)