LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sine wave frequency error

Hi! I'm pretty new to labview so any help will be appreciated!

 

I'm trying to generate a 6-sine wave pulse using the attached generating and detecting vi. It all looks good, however, the frequency which I want the pulse to be generated ain't quite right no matter how I tweek it. For example, I keyed in the rate of generating pulse to be 1MHz in this case, but the detected signal is only 1 kHz (period = 0.001s). There should be no loss in this case. Other frequencies keyed in are also reduce by a thousand times. I think it is due to my Fs=1000 and #s=1000, because if i change my Fs to be 100 and #s=100, the detected frequency will be reduced by 100 times only. But if I reduce it, the resolution of my signal will be poor and I cant reduce it below 50 for a clear signal. Is there any way I can get the signal generated to be that which I typed in? Help!

 

Thanks!

Download All
0 Kudos
Message 1 of 5
(3,265 Views)

Hi... Anyone...?

0 Kudos
Message 2 of 5
(3,245 Views)

It would be best to post your actual VI rather than just some screenshots.  It is hard to debug a screenshot because we don't see the values of all the controls such as the sampling info cluster in Generate.jpg, nor do we know what the settings are inside the Express VI's.

 

What is your hardware setup?  Do you have an analog output connected to an analog input?

 

You say you are generating a 1 MHz signal but are trying to read it at 1 kHz or 100 Hz?  I am wondering if you are having problems with the Nyquist theorem which states that you have to acquire a signal at a rate of at least twice its frequency to be able to measure the frequency accurately.  And reality you need to acquire the signal at an even higher rate than that.

0 Kudos
Message 3 of 5
(3,227 Views)

Hi, I am using PXI-8331 with analog output PXI-6733 and analog input PXI-6133. I am generating voltage signals and collecting voltage signals as well.

 

The problem I have is that when I intend to generate a 100kHz, 4 sine wave in a hanning window pulse, the received signal tells me that the signal generated was actually only 100Hz (reduced by 1000 times) for Fs and #s of 1000, and it will be 1000Hz (reduced by 100 times)  for Fs and #s of 100. What I hope to achieve is for the detected signal to show me that the actuated signal is indeed that which is keyed in. I am currently using DAQ assistant to control the frequency of my windowed sine wave. Is there any other way to go around doing it?

 

On a side note, yes, I understand Nyquist theorem. I tried using 10kHz generating signal and 1MHz sampling frequency (100 times difference) for signal detection, but the results is exactly the same as that received using 10kHz sampling frequency and thus I believe there should be something I am not getting quite right about my signal generation since the frequency is always reduced by Fs times and I can't change its period.

 

I have attached the vi I am using. Thanks a lot for your reply.
0 Kudos
Message 4 of 5
(3,207 Views)
any help on this topic?
0 Kudos
Message 5 of 5
(3,173 Views)