01-09-2009 04:32 AM
Hello,
I 'm migrating from traditional Daq to Daqmx, all is OK concerning the accuracy of the measurement but I have a serious problem of measurement time
Indeed, My Daqmx measurement is significiantly slower than trad Daq
For example, a acquisition of 100 samples à 100kHz (with a PCI-6052) :
Trad Daq = 3ms (via Daq_Op);
Daqmx = 16ms (via DaqmxReadAnalogF64);
Thanks by advance for response
Sincerely
01-09-2009 04:19 PM
Hi,
Do you need to reconfigure the hardware before each acquisition? Or are you repeating the acquisition with the same parameters?
You will be able to speed up DAQmx performance if you use the DAQmx Control VI with the "Commit" operation to pre-program your hardware outside the main loop.
01-12-2009 07:24 AM
Hi,
thanks for your response.
To respond to your question, I don't reconfigure the hardware each time, I make a loop of measurement as follow (I program in C ANSI):
Daqmx : for (i=0;i<1000;i++) DaqmxReadAnalogF64(TaskHandle,-1,10,0,TabMeasurement,100,&NbSamples,NULL); => 15000ms
Trad Daq : for (i=0;i<100;i++) Daq_Op(1,0,1,TabMeasurement,1000,100000); => 3000ms
But, I notice an important thing :
I 've launched the .exe on 2 different PC (with different software configuration):
- On the first one with Daqmx 8.6.0f5 and driver PCI-6052 2.1.0f1 : 15ms per measurement (traditional daq : 3ms/meas)
- On the second one with Daqmx 7.4.0f0 and driver PCI-6052 1.9.0f0 : 3ms per measurement (as traditional daq)
So the problem seems to come from Daqmx 8.6.0f5, Have you information about that ???
Thanks
Regards
Nicolas Carteron
01-12-2009 07:41 AM
Sorry for the mistake
Trad Daq : for (i=0;i<1000;i++) Daq_Op(1,0,1,TabMeasurement,1000,100000); => 3000ms
01-13-2009 09:19 AM
Hello,
I have few question about your configuration:
What is your OS? What is your version of CVI? What is your hardware configuration?
Why do you need to use daqmx if you application work with daq trad?
Best regards.
Aurélien J.
National Instruments France
01-13-2009 09:52 AM
Hi,
Here is my Hard/Software configuration :
OS : XP
CVI : 8.5.1
Hardware : PCI-6052
For information, I use a C ANSI Visual Studio project to make this validation (and not CVI).
I need to use Daqmx because, firstly our policy is to upgrade our soft following the new software release (so Daqmx) and, mainly we will have to use PCI-6251 cards (or equal) that only support Daqmx.
For information, my experimented collegue said to me that there was a same problem with the 6.x Daq (slower than ealier version)
Regards
01-14-2009 02:30 AM
Hi,
could you send your benchmark code?
Daqmx and daq trad have the same execution time, maybe you don't create the same task.
Regards.
Aurélien J.
National Instruments France
01-19-2009 03:57 AM
Hello,
sorry for my late.
Here is my complete benchmark :
Traditionnal Daq :
AI_Configure(0,0,RSE,20,0,1); //Input range
Timeout_Config(0,1800); //Timeout
iTimeRecord=GetTickCount();
for (i=0;i<1000;i++)
iStatus = DAQ_Op(0,0,1,iTab,100,100000); //loop of 100 acquisitions at 100kHz (iTab = Tab of 100 int)
iTime=GetTickCount()-iTimeRecord;
if (!iStatus)
iStatus = DAQ_VScale(0, 0,1, 1.0, 0.0,100,iTab,dTab); //(eTab = Tab of 100 double)
=> iTime=3000
Daqmx :
Init_DA_Brds(1,&deviceNumberCode); // reset traditional daq
DAQmxResetDevice("Dev1");
if (DAQmxCheck(NULL,DAQmxCreateTask(NULL,&TaskHandleDev1InCh0))) //task create
return NULL;
DAQmxCheck(NULL,DAQmxCreateAIVoltageChan(TaskHandleDev1InCh0,"Dev1/ai0",NULL,DAQmx_Val_RSE,-10,10,DAQmx_Val_Volts,NULL)); //channel create (with Input range)
DAQmxCheck(NULL,DAQmxCfgSampClkTiming(TaskHandleDev1InCh0,NULL,100000,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,100)); //Rate configuration
iTimeInit=GetTickCount();
for (i=0;i<1000;i++)
{
DAQmxCheck(NULL,DAQmxStartTask(TaskHandleDev1InCh0)); //start of task
DAQmxCheck(NULL,DAQmxReadAnalogF64(TaskHandleDev1InCh0,-1,10.0,0,dTab,100,&iNbSamples,NULL)); //timeout
DAQmxCheck(NULL,DAQmxStopTask(TaskHandleDev1In[iChannel])); //end of task
}
iTime=GetTickCount()-iTimeInit;
=> iTime=16000
Regards
Nicolas Carteron