LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Very basic error, dont know its reason

Solved!
Go to solution

Hello,

I am using Tone Measurement Express  to calculate the amplitude and frequency of the simulate signal for basic checking.

Here if i connect the frequency control to the simulate signal, the vi works correctly while when i disconnect the frequency from the simulate signal, the tone measurement Express doesnt give correct reading for Amplitude and frequecny. While the graph shows correctly.

Is it a bug or error at programing.

Pls help it out.

Thanks

0 Kudos
Message 1 of 11
(3,059 Views)

Strange, this works fine for me (LV 2010 SP1).

When not connecting the frequency I get a 10Hz signal (that's how the express VI is configured) and a 10Hz reading from Tone Measurements. The same as with frequency connected and using 10Hz as value.

 

I get a wrong amplitude when using a 10Hz signal, but that's probably because 10Hz is at the limit of what can be detected in a time range of 0.1s.

When going to 11Hz the amplitude reading is correct as well.

 

0 Kudos
Message 2 of 11
(3,045 Views)

here are the pics. See how the amplitude varies. Also if you keep the freqency of the simulate signal block at 10.1Hz, it will work correctly.

without Frequecy control.PNGwith freq control.PNG

0 Kudos
Message 3 of 11
(3,038 Views)

That's what I meant in my post. When not connecting the frequency it uses the express VI configuration, which is 10Hz. It seems the 10Hz wave can't be estimated correctly in the timebase of 0.1s since you only have 1 sine wave (which is not even "closed" yet, the last point is not 0 like the first) in that time window.

Configure the express VI to 20Hz or 40Hz and you're good.

 

So the issue is not about wiring the frequency or not, it's about the frequency value.

 

0 Kudos
Message 4 of 11
(3,034 Views)

Yes you are correct. It don't completes one cycle for a frequency less than 10Hz, but what the reason. When I simulate a signal whose frequency is less than 10Hz the signal is not shown completely.

 

less than 10 Hz.PNG

0 Kudos
Message 5 of 11
(3,001 Views)

Do you even look at the VIs you're using?

The sampling rate is 1kHz and the Express VI generates 100 samples. Change these settings if required.

 

0 Kudos
Message 6 of 11
(2,987 Views)

i changed these settings but no change in the ouptut

0 Kudos
Message 7 of 11
(2,931 Views)

Then you must be doing something wrong. Works perfectly fine here.

 

0 Kudos
Message 8 of 11
(2,929 Views)

at what frequency and sampling rate you run it.

0 Kudos
Message 9 of 11
(2,925 Views)
Solution
Accepted by topic author Getwonder

All I did was to change the number of samples to 400:

ConfigureSimulateSignal.PNG

and then I get for the values you used (frq 8 Hz, amp 21) this signal and the correct estimates:

ToneMeas.PNG

0 Kudos
Message 10 of 11
(2,923 Views)