01-29-2015 10:47 AM
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);
01-30-2015 01:39 PM
PhysicsGuy,
It makes sense that the Linux system would run faster than the Windows system because there are normally less processes running the background in the Linux system. However, it is very dependent on what processes you have running on the each system. Because it is so application dependent it's not something that we can accurately predict for every system.
Regards