Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Building scope with Ni-6229

Hi dimani4,

 

Hmmm, I noticed that you are sampling at 1000 Hz for 1000 samples. I would recommend sampling at least 2x the highest frequency. We recommend sampling 10x the frequency. 

 

What we might be seeing here is aliasing - when a signal is not sampled fast enough, it could look like a different signal. Here's a document that explains the Nyquist Theorem.

 

Also this document (pages 7-9) that goes more in detail about what is happening.

Acquiring Analog Signal

http://download.ni.com/evaluation/pxi/Acquiring_Analog_Signal.pdf

 

Cici Z.

Applications Engineer

National Instruments

0 Kudos
Message 11 of 12
(335 Views)

Dear Cici,

Thank you very much.

Yes... You are absolutely right... totally forgot about Nyquist. Another question. Now I'm sampling at 100k (rate=100k and samples per channel is 10k) and it gives me the right results. But there are still questions: Here the example of the 100k sampling (rate) and samples per channel is 10k (finite samples) while delivering 1kHz signal:

100k_10k_finite sample.jpg

There is some strange distorted part in the end of the graph (red). what is that?

The continuous mode for the same parameters (rate and sample per channel) gave me an error:

100k_10k_cont sample.jpg

I did another try with the same rate but with the different samples to read (samples per channel) to track the distortion part.

So here it is:

Rate=100k, samples per channel is 1k (finite samples). Again I get this distortion.

100k_1000_finite.jpg

The same for continuous I get again an error when I hit the STOP button:

100k_1000_cont.jpg

The same graph I get from the MAX measurement for continuous mode (without any errors and distortions):

100k_1000_MAX.jpg

 

So here the questions:

1. Why I get error? I tried to increase the buffer size (samples per channel to 5000 instead of 1000, rate is 100k as it was before) and here the graph:100k_5000_cont.jpg

 

Again an error and distortion (red).

 

The same with finite samples:

100k_5000_finite.jpg

Not error but with distortion.

2. Why the graphs in the finite mode are distorted? It shouldn't be because the same graphs I get from MAX without any distortions.

I want describe very quick what I did in program: My program reads every (1/rate) millisecond a sample and it reads (samples per channel) times. For example: if there is 100k rate and 1000 samples per channel; the program will read every (1/100k)*1000 millisecond a sample and it will do it 1000 times. So in the graph I will get time range from 0 to [samples per channel/rate]= 1000/100k=1*10^(-2) sec. I guess this is the process of samples reading as I saw it from the MAX. Here the picture for the prove as amplitude vs number of samples:

100k_1000_cont_MAX.jpg

And finally:

If I'll have the frequencies more than MHz, can I measure it? Here I deliver 1Mhz and here what I got:

5MHz_rate 10k_samples.jpg

 

 

Anyway I guess maximum rate is 6.666MHz as written here:

10MHz_10k_samples per channel.jpg

 

Sorry for such a long post.

 

Thank you.

 

 

0 Kudos
Message 12 of 12
(329 Views)