LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sine wave generation

Hi

I have been using the Sine Wave Generator .vi for just a basic application to generate a sine wave with adjustable amplitude, freq (100Hz+) etc etc

Recently I started using the same vi but for an application using much lower frequencies in the rage of sub 1Hz, eg 1e-3Hz.

But I have noticed a problem with this, on the graph display the whole sine wave is not produced, only the start of it (just the first second).
I have tried changing the graph properties and scale, and the sampling but I only get the output for the first second, which just appears like a straight line. Can this be fixed? or is there some other kind of problem?


I think the simplest way to describe what I am trying to achieve is a sine wave, which completes one cycle in say 10 min or 1 hour.


Any suggestions

Thanks
0 Kudos
Message 1 of 5
(2,873 Views)
How many samples are you generating and what is the sample rate? It sounds as though you may only be generating enough samples for the first second. The first second of a 1 mHz sine wave would look like a straight line.

Lynn
Message 2 of 5
(2,865 Views)
Thanks, it was a problem with sampling. I have increased the number of samples to get the whole waveform.

Is there anyway to have the number of samples change dynamically or somehow with the frequency??


Jeff
0 Kudos
Message 3 of 5
(2,859 Views)
Jeff,

I am not sure which sine generation VI you are using. Several variations have been developed over the years.

Most likely you will need to do the calculations yourself. Decide which parameters are most important to your application and then write your own VI which takes those parameters as input and have it calculate the values required by the Sine Generator, which becomes a subVI to your VI.

Lynn
0 Kudos
Message 4 of 5
(2,857 Views)
Asuming that the sample rate is constant, you can just divide that by the frequency to get 1 complete cycle.
 

Message Edited by Dennis Knutson on 06-26-2007 02:30 PM

Message 5 of 5
(2,841 Views)