We are trying to read data from the A/D channels of a DAQpad6020. We wrote this simple sample code to test our board but we
realized that the rate for printing data on screen is exteremly slow. Could you advise us of any possible error in code or any other solution that can fasten up this process?
In our application, we basically would like to read 12 channels of A/D at the rate of 100 Hz. We tested our code in both release and debug mode and made sure enough USB bandwidth is available.
Regards,
void main(void)
{
shyort input[12];
int num_of_chan=12;
Init_DA_Brds (1, &init);
SCAN_Setup (1, num_of_chan, channel_list, gain);
while (1)
{
AI_Read_Scan (1, input);
printf("%f %f %f %f %f %f %f %f %f %f %f %f\n",
input[0], input[1], input[2], input[3],
input[4], input[5], input[6], input[7],
input[8], input[9], input[10], input[11]);
}
}