LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ_DB_Half_Ready problem while double buffered AI

Hi guys,
I really hope you can help me here because I'm stumped. I'm trying to continuously aquire data from my Lab-pc card within Lab Windows 5 using double buffering. I'm using the 'DAQ_DB_Half_Ready' function to check for ready half-buffers. The very first time a half buffer is ready, the function returns the required output, and I can read my half buffer with the transfer function. The DAQ_DB_Half_Ready function never signals a ready half buffer again, no matter how many times the aquisition loops around the buffer.
Even the NI-DAQ example program fails with the same symptoms!!

Anyone get any ideas??

cheers

Ed
0 Kudos
Message 1 of 2
(2,823 Views)
Hi Ed,
I am using DAQ_DB_HalfReady in my code. It is running perfectly fine. here is sample of what I am doing:

short halfReady=0, daqStopped;

while(1)
{
DAQ_DB_HalfReady(Device, &halfReady, &daqStopped);
if(halfReady)
{
DAQ_DB_Transfer(Device, HalfBuffer,
&PtsTfr,&daqStopped);
// do whatever u want to do with the data.
// break the while loop only when desired
// boundry conition occurs.
} // end of if half ready.
} // end of while

Note: i have not shown definition of all the variables used above.

This is what I am doing. Let me know if it is working for you. If it is not working, can you post those lines of code.

cheeers
Niranjan
0 Kudos
Message 2 of 2
(2,823 Views)