static int32 daq_Status;
static TaskHandle daq_handle;
static float64 data[1024];
static int32 readsample;
long ErrorCode;
daq_Status = DAQmxCreateTask ("TEST_ai", &daq_handle);
daq_Status = DAQmxCreateAIVoltageChan (daq_handle, "Dev1/ai0", "ai0", DAQmx_Val_Cfg_Default, -5.0, 5.0, DAQmx_Val_Volts, "");
daq_Status = DAQmxStartTask (daq_handle);
daq_Status = DAQmxReadAnalogF64 (daq_handle, DAQmx_Val_Auto, 10.0, DAQmx_Val_GroupByChannel, data, 1024, &readsample, 0);
//daq_Status = DAQmxReadAnalogF64 (daq_handle, DAQmx_Val_Auto, 10.0, DAQmx_Val_GroupByChannel, data, 1024, &readsample, 0);
daq_Status = DAQmxStopTask (daq_handle);
Why my data array only position 0 has value and other position is zero.
And if the same code use in LabWindow the data array is correct