LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog input to the myrio is not showing properly.

Hi,

 

I am trying to measure analog input using NI myRIO.

here input AI0 in signal and simulated output signal AO0 wired loop.

but the problem I observe is

when

1) freq is 1,11,21,31 Hz then the graph shows a proper sine wave.

2) freq 10,20,30 Hz its show single line.

3) freq is between 31 to 40 i.g 32,33,35 Hz its shows something like a triangular wave.

suggest to me how can I program change for the proper measurement of sine wale from external fun gen.

during 30hz to change 40hzduring 30hz to change 40hzduring low freqduring low freq

0 Kudos
Message 1 of 4
(3,146 Views)

Hi Govinda,

 

have you heard about Mr. Shannon and Mr. Nyquist before?

 

(You loop runs at just 20Hz!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(3,123 Views)

Hi Govinda,

 

What this means is that you're looking at the effects of undersampling.

 

The Nyquist Frequency is half of your sampling rate, and is the highest frequency you can sample without experiencing "aliasing", in which the result you see doesn't agree with what you expect.

You can read in more detail about the Nyquist–Shannon sampling theorem that Gerd referred to.

 

Here is an image (from wikipedia's Aliasing page) that shows the effect:

Aliasing_between_a_positive_and_a_negative_frequency

Here the low sampling rate results in you observing the yellow rather than cyan curve.

 

The suggestion is to sample more quickly (at least twice as fast as the frequencies of interest), and ideally to use an analog filter to remove/reduce higher-frequency inputs.


GCentral
0 Kudos
Message 3 of 4
(3,090 Views)

As has been mentioned, all you are measuring are alias frequencies.

 

From a forum perspective, your pictures of front panel and diagram are useless, because a diagram containing mostly express VIs and dynamic data that hide all important information behind a facade. Fortunately, you are only sampling a single point, so we can guess from the 50ms wait that you are only taking 20 samples per second (not really accurate because it is software timed!), but which is of course nowhere near sufficient for anything above 10Hz.

 

I would recommend to use lowerlevel hardware timed continuous input/output and maybe even isolate the AI and AI into independent loops. Have a look at the shipping examples.

0 Kudos
Message 4 of 4
(3,085 Views)