NI DAQ External Clock different to Sample Rate

3 visualizaciones (últimos 30 días)
Matt
Matt el 8 de Ag. de 2014
Hi,
I have NI DAQ 6341 connected to a desktop. I would like to clock the DAQ with a 10MHz square wave (on input PFI0) and then sample from an analogue input (ai0) at a rate of 1k samples per sec. Hence the clock rate and sample rate are very different.
Sampling normally works:
d = daq.getDevices
s = daq.createSession('ni');
s.addAnalogInputChannel('Dev2','ai0','Voltage');
s.Rate = 1000;
s.DurationInSeconds = 1;
data = s.startForeground();
But Adding a clock then seems to cause problems:
d = daq.getDevices
s = daq.createSession('ni');
s.addAnalogInputChannel('Dev2','ai0','Voltage');
addClockConnection(s,'External','Dev2/PFI0','ScanClock')
s.Rate = 1000;
s.DurationInSeconds = 1;
data = s.startForeground();
The errors that I get are either:
With rate of 1000
"Timeout expired before operation could complete."
Or with rate of 10e6 (equal to the external reference clock)
"Rate cannot exceed 500000 in the current configuration."
I understand this error as the NI DAQ can't sample that high.
So the basic problem is that I can't sample with an external reference clock using a sample rate below the external clock rate.
Many thanks for any advice on this issue.
Matt

Respuestas (0)

Categorías

Más información sobre Data Acquisition Toolbox en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by