LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can i generate only one period of sine wave

how can i generate only one period of sine wave ?

0 Kudos
Message 1 of 13
(8,776 Views)

You can use sine wave.vi or simulate signal vi

0 Kudos
Message 2 of 13
(8,764 Views)

18629i6A0F9ED56EBCCCFA

0 Kudos
Message 3 of 13
(8,751 Views)

Just specifying the frequency does not allow you to generate a single period. Just look what happens if you ask for a 2Hz signal. You need also specify the number of samples and sample rate.

0 Kudos
Message 4 of 13
(8,733 Views)

You can manipulate the sampling info with the desired frequency in several ways to keep just 1 period.  See pic for a simple example.

 

EDIT:  You have to have the sampling frequency (Fs) equal to the number of samples (#s)

 

...  Nevermind, tbob beat me to it.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 5 of 13
(8,721 Views)

Dennis is correct.  The reason Muks example seemed to work is because the default sample rate is 1000 and he used a frequency of 1Hz.  To get one cycle at any frequency, multiply the frequency by 1000 and set the sample rate to this number.  There is a cluster on the bottom of the Sine Wave funtion that allows one to set this parameter.

 

18643i8E25D4EC8FB26608

- tbob

Inventor of the WORM Global
Message 6 of 13
(8,718 Views)

Hi,

 

I'm using this method that you discribe for generating a sine wave with one cycle.

Then I send this sine pulse to my soundcard. Works perfectly for a low frequency.

But I need a frequency of 10kHz and then this VI doesn't work.

 

But normally my soundcard works till 30 a 35kHz (For example when I make a continous sine wave)

 

Does anyone has a solution for this?

 

Thanks!

 

jelle

 

0 Kudos
Message 7 of 13
(8,165 Views)

One cycle of a 10 kHz sine wave is only 100 us in duration.  I'm no biologist (or is it electrophysiologist?), nor do I work much with sound in general, but I did read wikipedia's Loudness article--I wouldn't expect the human ear to be able to pick this up.  

 

 

Best Regards,

John Passiak
0 Kudos
Message 8 of 13
(8,159 Views)

Hello,

 

That's no problem. I don't have to hear it.

 

I send it with my soundcard to a pc oscilloscope an i just want to see it on my pc oscilloscope.

 

Problem is that the VI blocks if I use high frequencies...

 

Any labview solutions?

 

kind regards

0 Kudos
Message 9 of 13
(8,125 Views)
If you generate the signal as an array you should be able to play it with play sound.
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 13
(8,113 Views)