10-12-2010 05:06 AM
Hello,
I have a hardware/software problem (still don't know what it is) with the PCIe-card 6321 in assocaiation with an photodiode array (PDA) OMA-V detector from Roper Scientific. The PDA is controlled over USB 2.0 with a ST-133 controller. I use the NI DAQmx device-driver 9.2.1 and PVCam 2.7.6 for PDA and ST-133 controller and the libraries come along with them on a unpatched Windows XP SP3 system using Microsofts Visual C++ 6 Pro.
Before every measurement I make a check of the speed of the PDA and the 6321-card. Therefore I use for the digital i/o ports this code:
for(i=0;i<1000;i++) { DAQmxReadDigitalLines (m_MIOtaskHandleRead,1,10.0,DAQmx_Val_GroupByChannel,Rdata,1,&read,&bytesPerSamp,NULL); }
for the analog input ports:
DAQmxCreateTask("",&taskHandleSE); DAQmxCreateAIVoltageChan(taskHandleSE,"Dev1/ai0","",DAQmx_Val_Diff,0.0,10.0,DAQmx_Val_Volts,NULL); DAQmxCfgSampClkTiming(taskHandleSE,"",250000.0,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,80); QueryPerformanceCounter((LARGE_INTEGER*)&g_FirstCount); //Counter to get Time for (ix=0;ix<100;ix++) { DAQmxStartTask(taskHandleSE); DAQmxReadAnalogF64(taskHandleSE,Interval,10.0,DAQmx_Val_GroupByChannel,SEdata,Interval,&rrread,NULL); DAQmxStopTask(taskHandleSE); temp=0; for (i=0;i<Interval;i++) temp=temp+SEdata[i]; //Interval=40 // stuff to temp=(float64)(temp/float64(Interval)); } QueryPerformanceCounter((LARGE_INTEGER*)&g_LastCount); //Counter to get Time DAQmxClearTask(taskHandleSE);
and for the PDA I take 100 spectra. The programm then gives me the average times for each test. Most of all I got too slow times for the analog input and the PDA test.
But after making a self-calibration with the Measurement & Automation Explorer from NI for the 6321 card I got 3-4 times faster/better values for the analog input and good values for the PDA. But it's not the only thing which is strange. Making the time check only for the PDA (6321-card is unplugged) I got zigzag-patterns in measurement durations. When then 6321-card is plugged in the zigzag-patterns disappear, but the single measurement times can vary considerably. The measurement durations for the PDA drop below the value of the presetted exposure time and stay stable at this level --> this simply makes no sense.
So, my questions are:
I'm still searching for the origin on the problems, and will be thankful for any hint.
10-13-2010 08:52 AM
Hi torsten.schwarz,
it seems like a problem with both devices and it's helpful separate the problems.
Remove the PCIe Card or the Camera and first make sure the single problem can separate and solved. any problems with your PDA please contact Roper Scientific.
If you worry about your programming please read following links:
"Programming NI-DAQ in Text-Based Languages"
<http://digital.ni.com/public.nsf/websearch/8715FD7608B79AFC86256ECA004B87F1?OpenDocument>
"Programming NI-DAQ in Visual C++ 6.0!
<http://digital.ni.com/public.nsf/websearch/0087C1E20920F7B986256D9B0061DEE2?OpenDocument>
In my Opinion the Code looks workable. Now to your Questions: