Good Morning,
I am running the following code on a windows 7 machine and trying to get the maximum number of read/write combinations per second on my 6229 card. In the full code, I take the variable iDataIn and modify it before writing it back out but for my tests I just use what is below.
Has anyone here compared speed for a linux system verses a windows system using identical hardware? I am hoping to avoid building up a linux harddrive just to test it.
Tom
Code starts below:
-------------------------
TaskHandle fbIn=0, fbOut=0;
int16 iDataIn;
DAQmxCreateTask("",&fbIn); //Create interface to board for AI.
DAQmxCreateAIVoltageChan(fbIn,"Dev1/ai0","",DAQmx_Val_Diff,-10.0,10.0,DAQmx_Val_Volts,NULL);
DAQmxCreateTask("",&fbOut);
DAQmxCreateAOVoltageChan(fbOut, "Dev1/ao1,"",-10,10,DAQmx_Val_Volts,"");
for (int i = 0; i < 1000; i++)
{
DAQmxReadBinaryI16(fbIn, 1, 10.0, DAQmx_Val_GroupByChannel, &iDataIn, 1, NULL, NULL);
DAQmxWriteBinaryI16(fbOut, 1, TRUE, 10.0, DAQmx_Val_GroupByChannel, &iDataIn, NULL, NULL);
}
DAQmxClearTask(fbIn);
DAQmxClearTask(fbOut);