LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

accuracy of USB 6210

Hi all,

I have a question here. I'm using CVI 8.1.1 with USB 6210.
I have found a problem when i used the command DAQmxGetTimingAttribute after DAQmxCreateAIVoltageChan. I planned to use 30KSample/Sec/Channel for the sampling rate.

        SamplesPerChan = 30000;
        DAQmxCfgSampClkTiming (taskHandle, "", rate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, SamplesPerChan);
        DAQmxGetTimingAttribute (taskHandle, DAQmx_SampClk_Rate, &actualRate, 0);

Theoretically, the actual rate of the USB 6210 should return 30000, but the actual rate returned from USB6210 was 30030.03003003003000.
I also tried to acquired data with 6 channels by used the same sampling rate.(30kSample/Sec/Channel)

       From         DAQmxGetTimingAttribute (taskHandle, DAQmx_SampClk_Rate, &actualRate, 0);

i obtained 5000.000000 for actual rate (1 channel) and the actual rate equals to 5000.0000x6=30000.0000 for 6 channels.
My question : Is the actual rate return by the USB6210 when using 6 channels accurate??? or it shouldn't return exactly 30000 for 6 channels?? How's                       about using other combination of channels(2/3/4 channels)??

Your help would be appreciated a lot. Thanks.
 
Regards,
Chew
 




0 Kudos
Message 1 of 6
(4,174 Views)

Sorry, some minor mistakes were in the question.

It should be "I also tried to acquired data with 6 channels by used the same sampling rate.(30kSample/Sec for all channels).
5KSample/Sec for 1 channel. ".

Thanks.

Regards,
Chew
0 Kudos
Message 2 of 6
(4,154 Views)
Hi all,

Sorry, some minor mistakes were in the question.

It should be "I also tried to acquired data with 6 channels by used the same sampling rate.(30kSample/Sec for all channels).
5KSample/Sec for 1 channel. ".

Thanks.

Regards,
Chew
0 Kudos
Message 3 of 6
(4,155 Views)

I'm not sure I understand all of your question, but I'll take a stab:

The USB-6210 derives its internal sample timing from a 20MHz clock (note 'Sampling Rate Timing Resolution' in spec sheet is 50nsec). Lower sampling rates are derived by dividing this clock. Now, to get an exact 30kHz sampling rate you would need a divisor of (20000000/30000)=666.66666.... The hardware can't do this (only integer divisors allowed), so DAQmx chooses a divisor of 666 to give you a sampling rate of (20000000/666) = 30030.03003...

For a sampling rate over 6 channels of 5kHz (=30kHz aggregate), the sample clock divisor required is (20000000/5000)=4000, so that can be achieved exactly.

Note that the USB-6210, as an interval scanning device, has both a sample clock (which controls the interval between scans) and a convert clock (which controls the interval between samples within a scan).

Hope that helps.

--
Martin
Certified CVI Developer
0 Kudos
Message 4 of 6
(4,133 Views)
Thanks for your helps, Mr Martin.

I have some further question about the convert rate and the sampling rate of USB device.

1)     i) Using 6 channels with SamplePerChan = 5000 (30000SamplePerChan for 6 channels)
        SamplePerChan = 5000
        DAQmxErrChk (DAQmxCfgSampClkTiming (taskScan, "", rate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, SamplerPerChan));
        DAQmxGetTimingAttribute (taskScan, DAQmx_AIConv_Rate, &convertRate);
        DAQmxGetTimingAttribute (taskScan, DAQmx_AIConv_MaxRate, &maxConvertRate);
        DAQmxGetTimingAttribute (taskScan, DAQmx_AIConv_TimebaseDiv, &timebase);
        
       returned convertRate = 71428.571428571435000
                      maxConvertRate = 250000.000000000000000
                      timebase = 280

        ii) Using 6 channels with SamplePerChan = 5000 (30000SamplePerChan for 6 channels)
        SamplePerChan = 5000
        DAQmxErrChk (DAQmxCfgSampClkTiming (taskScan, "", rate, DAQmx_Val_Rising, DAQmx_Val_ContSamps, SamplerPerChan));
        DAQmxSetTimingAttribute (taskScan, DAQmx_AIConv_Rate, 50000.00);
        DAQmxGetTimingAttribute (taskScan, DAQmx_AIConv_Rate, &convertRate);
        DAQmxGetTimingAttribute (taskScan, DAQmx_AIConv_MaxRate, &maxConvertRate);
        DAQmxGetTimingAttribute (taskScan, DAQmx_AIConv_TimebaseDiv, &timebase);
        
       returned convertRate = 50000.000000000000000
                      maxConvertRate = 250000.000000000000000
                      timebase = 400

My question : What does it means if i use different value of convert rate in data acquisition??? Does different value of convert rate influence or cause any data dritfing/skipping/missing when i read data into a specified buffer(not an internal buffer)???

Thanks.

Regards,
Chew




0 Kudos
Message 5 of 6
(4,115 Views)

Hi Chew,

The convert clock on your card is used to time channel switching with the analog-to-digital converter (ADC). It makes it possible to sample multiple channels with one ADC. The linked KBs should answer your question.

KnowledgeBase 2XPE1QCW: How is the Convert (Channel) Clock Rate Determined in NI-DAQmx and Tradition...
KnowledgeBase 30LDURMV: Difference Between the Sample Clock (Scan Clock) and the Convert Clock (Chan...

Please post back if you have any questions. Have a great day!

Ryan D.
District Sales Manager for Boston & Northern New England
National Instruments
0 Kudos
Message 6 of 6
(4,072 Views)