Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure PXIe 6124 (ADC) to use PXIe chassis 10MHz reference

Problem Description :
I get the ADC to work, ie, getting the correct time domain signal from both
channels (ch0 and ch1). But the period of the signal (or the frequency) is
always slightly off. I am programming it to use the PXIe chassis 10MHz signal
which is locked to other RF siggen in my setup, so the signal period/frequency
should be dead on, but it is not, it is off by few kHz such as reading peak
signal at 1.58MHz when I do the fft of the time domain signal, when it should
be dead on 1.6MHz. The RF signal is supplied by RF signal generator locked to
the PXIe chassis 10MHz reference. Example: ADC captures time domain signal, then code does fft to the time domain array, I am expecting to get an exactly 1.6MHz peak signal, but I get instead 1.58MHz. If I vary the Fs (sample freq) by a little bit, sometimes I can get exactly 1.6MHz from fft. The problem is not with the fft code, as I have checked the same ADC using two different programs written by two different engineers and they both give the same erroneous frequency. The two programs have been vetted many times prior on other ADC systems, and report correct frequency. 

I am suspecting the ADC sampling clock is not set correctly, or the actual sampling frequency is not achievable because of the fixed or limited divider ratio in the counter/divider inside the ADC card. But, I would expect the API to throw an error if the hardware cannot support the Fs with the given reference 10MHz clock, and not be mum about it. The NI Manual for the ADC is super hard to read, since it encompasses hundreds of ADC cards that NI makes.


Here are my c# code ...


myTask = new NationalInstruments.DAQmx.Task();
AIChannel myChannel;
myChannel = myTask.AIChannels.CreateVoltageChannel("PXI2Slot11/ai0:1", "",
NationalInstruments.DAQmx.AITerminalConfiguration.Differential, -10, 10,
AIVoltageUnits.Volts);
myTask.Timing.SampleClockTimebaseSource = "PXI_CLK10";
myTask.Timing.SampleClockTimebaseRate = 10e6;
sampleFreq);
myTask.Timing.ConfigureSampleClock("ai/SampleClockTimebase", sampleFreq,
SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, numSamples);
myTask.Start();
AnalogMultiChannelReader reader = new AnalogMultiChannelReader(myTask.Stream);
data = reader.ReadMultiSample(numSamples);
myTask.Stop();
myTask.Dispose();

NI Software :  How to properly set the sampling clock on PXIe-6124 to use PXI
chassis 10MHz Ref 
NI Hardware :  PXIe-6124 device
Driver Version :  
OS :  Windows 7
Customer Information :

Juswanto Wardojo
Peregrine Semiconductor Corp
US
jwardojo@psemi.com
Ph: (760) 795-0146

0 Kudos
Message 1 of 1
(1,875 Views)