09-08-2009 05:46 PM
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
09-14-2009 03:02 AM
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,
09-14-2009 05:13 AM
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