LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

generating sine wave

Solved!
Go to solution

Hello,

 

I have a small labview problem.

I want to generate a sine wave pulse with labview and send this to a pc oscilloscope by using my soundcard.

 

First VI I made creates a sine wave and sends it to the pc oscilloscope. Works perfectly.

 

But now i want to create a sine wave with only one period (second VI). Problem is then that the VI blocks if i want a high frequency (I need 10kHz)

So the VI works on low frequencies but gives this error with higher frequency:

"the sound driver or card does not support the desired operation."

 

Can somebody give a solution for my second VI (creating sine with one period on 10kHz).?

 

Thanks in advance!

 

Jelle

 

Download All
0 Kudos
Message 1 of 4
(2,331 Views)

It could be down to the acceptable frequency range of your sound card. i know of sound cards that have frequency range upto 40kHz. Is there anyway you can confirm this?

0 Kudos
Message 2 of 4
(2,323 Views)

Hello,

 

But i don't have the problem with my first VI. Then i can go up to 30kHz with my frequency...

 

So the problem is not my soundcard i think?

0 Kudos
Message 3 of 4
(2,320 Views)
Solution
Accepted by topic author Benje

Hello Benje,

 

The problem/difference you're seeing is indeed in the coding and also in the sound card.

In the "working" example you're using the Simulate Signal VI with the following settings:

- 44100 samples per second (sample rate)

- Number of samples 10000 (samples per generation cycle)

 

In the non working example you specify:

- sample rate = 1000*"Frequency Control value". This sampling info should be fixed to (for example) 441000 Hz.

- Number of samples 1000 (samples per generation cycle)

 

As a sidenote:

Is there any reason why you used different functions to generate similar signals in the 2 VI's?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 4
(2,287 Views)