Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

USB-6212 Analog Output Rate Inaccurate

Hi all,

 

I'm trying to use the matlab NI daq toolbox to send a predefined vector of TTL pulses (350 hz, 50% duty cycle) out of a USB-6212 DAQ analog out port. I am able to set the output rate accurately at 1khz, 10khz, etc.; however, these sampling rates can't accommodate accurate 350 hz signals at my specifications. I tried changing the rate to 35khz, it seems like system can't sample at that exact frequency, rather at 35026.2697 scans/second. Is there any way to work around this in with the daq and matlab?

 

Thanks!

Charles

0 Kudos
Message 1 of 2
(2,119 Views)

At a hardware level, you can only generate frequencies that are an integer divisor of the timebase.  The fastest timebase on an M-series board is 80 MHz.  When aiming for 350 Hz, the theoretical divisor would *want* to be 228571.43   But what it'll *have* to be is either 228571 or 228572.  (I'm not certain whether the rounding algorithm rounds up, down, or nearest).   Nominally, you'll be able to produce either 350.00066 Hz or 349.99913 Hz

 

The (mostly) good news is that you're getting a rounding error that's in the order of less than 5 parts per million.  That's pretty small, especially considering that the absolute accuracy specs on many MIO boards' timebases is more like 50 parts per million.

 

I don't know whether the Matlab toolbox induces any further restrictions.  The quantization in your attempt to produce 35 kHz suggests it might restrict you to the 20 MHz timebase.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 2
(2,080 Views)