11-26-2009 09:20 PM
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?
11-27-2009 07:32 AM
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.
11-27-2009 04:02 PM
11-28-2009 04:10 AM
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
11-29-2009 12:15 AM
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.