LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate Sound.vi while taking readings

Hello all, this problem has been stumping me for a few days so I figure its time to ask. I'm using the Generate Sound vi to output a sinewave of increasing frequency until it stops at 20Khz. This part works fine. Whats giving me trouble is how to tell my HP 54200A scope to read every time the frequency incriments. So the order goes like this:

 

1. Generate Sound runs and scope takes a reading

2. frequency is stepped

3. Generate Sound runs and scope takes a reading

 

The hard part is the Generate Sound vi has to be running while the scope reading takes place. It almost sounds like the step frequency should be a shared variable created after the scope reading takes place, so the Generate Sound vi is then updated accordingly.

 

Any ideas?

0 Kudos
Message 1 of 5
(4,215 Views)

There is nothing that I saw in your code that communicates with the scope..

(my vision is not what it used to be, but I didn't see anything..)

 

The code you posted works and I checked my hearing...  up to 16kHz  🙂 Using a very cheap earbud...  😉

 

What you could do is have a main VI that calls both this VI and another which is the scope.  You would need to prepare the scope (configure) ready to take the readings.  What you need to do is to provide controls so that you can set the output frequency and run it, take the scope reading, then either stop the Generate Sound or change the frequency and repeat the steps.

 

A While loop in some main VI would do the trick.  You may need to change the Generate Sound.vi for your purpose.  Using a State Machine comes to mind, but I'm not sure if it is really needed as it depends on how you want the Generate Sound to behave.

 

 

Message 2 of 5
(4,191 Views)
You're right about the scope part being left out. This solution looks close but you can't pass information between the while loops. The idea is to use the scope to get the RMS value and plot the frequency response of amplifiers.
0 Kudos
Message 3 of 5
(4,173 Views)

You may do all this in Labview with your sound card. You do not need the scope ;). That is if you do not use the Labview base version. As the base version is almost stripped for signal processing VIs



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 5
(4,155 Views)

Coq Rouge wrote:

You may do all this in Labview with your sound card. You do not need the scope ;). That is if you do not use the Labview base version. As the base version is almost stripped for signal processing VIs


 

Yeah I know but I trust the bandwidth and accuracy of the scope way more than a PC sound card. 

0 Kudos
Message 5 of 5
(4,138 Views)