LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Does DAQ_Check return only even numbers for samples retrieved?

I am using the function DAQ_Check to monitor the progress of my data acquistion. I noticed in my program that the number of samples retrieved is always an even number. Here is some code that is similar to what I am using:

short gain[1] = {1};
short channel[1] = {1};
short double_buffer[8000];
unsigned long points=0,check[2000]={0};
int loopcounter=0;
short code,stopped;

Init_DA_Brds (1, &code);
AI_Configure (1,-1,0,10,0,0);
DAQ_DB_Config (1,1);
SCAN_Setup (1,1,channel,gain);
SCAN_Start (1,double_buffer,8000,3,10,-1,0);
while (points < 250) {
DAQ_Check (1,&stopped,&points);
check[loopcounter++]=points;
}

The array check will hold the values 0,0,0,0,2,2,2,2,4,4,4,4, etc
.

Do I have a mistake in my code or does DAQ_Check only return even numbers? Is my program actually acquiring two points at a time? I want to acquire one point at a time at even intervals.
0 Kudos
Message 1 of 2
(2,721 Views)
Hello,

I would suggest you to take a look at one of the examples on double buffered analog input operation to see the proper flow of commands. I do not think DAQ_Check returns just the even values. Here in this case it might be because it might be loosing the odd ones.

So I think it is a good idea to take a look at example program is a good idea. They are available at C:\Program Files\National Instruments\NI-DAQ\Examples.

Also check out the flowcharts available in NIDAQ User Manual .

NIDAQ User Manual

Also, you can take a look at examples that use DAQ_Check functions by going to C:\Program Files\National Instruments\NI-DAQ\Docs\nida
ex.hlp

and selecting examples by "NIDAQ functions used".

Please do let me know if you have any further questions.

Sincerely,
Sastry V
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,721 Views)