Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Obtain data without using DAQ_DB_Transfer in double-buffered method

Hi, Everyone

I want to use samples immediately when they are obtained by DAQ. An extreme example is that I use every sample in my program when DAQ (PCI-6034E) obtain the sample. Now I am using double-buffered method to continuously do sampling. For double-buffered method, we have to call DAQ_DB_Transfer to obtain the samples in the unit of half buffer size. Since I can't reduce this half buffer size to a very small value, DAQ_DB_Transfer always get a chunk of data at the same time. Hence, I decide to obtain samples from the buffer by directly accessing the buffer. It worked but DAQ always reported 10846 warning because DAQ_DB_Transfer was not called. It seems that DAQ_DB_Transfer not only transfe
rs buffered data and also sets some flag to let DAQ know the data (in half) has been taken. I just wonder if I can avoid 10846 warning even when I don't call DAQ_DB_Transfer. Any suggestions are welcome! Thank you in advance.

Best,

Le Cai
0 Kudos
Message 1 of 2
(2,556 Views)
Le Cai,

You may want to consider using the DAQ_Monitor function. This function allows you to specify the number of data points to retrieve from the acquisition buffer. With regards to your current method, you will be unable to keep the 10846 warning from occurring, but you can ignore it. The acquisition will continue without issue. However, if you use this technique, it is important to realize that you need to read the current data from the acquisition buffer faster than new data is being written to it.

Good luck with your application.

Spencer S.
0 Kudos
Message 2 of 2
(2,556 Views)