03-12-2010 11:29 PM
This should be quite trivial... I've used VISA a while ago for reading/writing to spectrum analyzers. This is quite a step down:
I have three mics (2 Genius - MIC-01A and the one in my laptop). The two external ones are connected via Sound->USB adapters (Sabrent USB-SBCV). So I have 1 input from my built-in mic and 2 USB inputs.
I wish to read these into MATLAB (simultaneously).
Should I work with VISA? The trouble is I doubt the manufacturer will give me a list of proper commands.
It seems like if the Windows Sound Recorder can do it, Labview shouldn't really have any difficulty.
Thanks,
Alex
Solved! Go to Solution.
03-13-2010 10:34 AM
03-13-2010 12:24 PM
Thanks very much. I didn't realize that labview too would recognize it as a sound device, so I never even considered trying. So simple!
Here's the current question: I think the buffer is overflowing with my settings. At the moment I'm collecting at about 0.6 duration at the max sample rate of 48000Hz. I'm getting the following error after a few seconds of running:
"LabVIEW: (Hex 0x12D7) You cannot perform this operation without an active task. Ensure that a task is active and try again. An input task might stop running if the input buffer overflows. Overflow occurs when the data is not read fast enough."
03-13-2010 12:55 PM
03-13-2010 04:14 PM
Thanks.
What I want to do is calculate the inverse fourier transform of the cross-spectrum of 2 signals.
How do I go about doing this? I've attached the current file.
Any help greatly appreciated.
03-13-2010 04:29 PM
Here is another attempt.
I attempted to do: iFFT(FFT(x)*conjugate(FFT(y)))
03-13-2010 07:28 PM
Hmm.. It seems I can't find a way to connect anything to the FFT or iFFT vi's.
This is the error I keep getting:
"The type of the source is 1-D array of
double [64-bit real (~15 digit precision)].
The type of the sink is double complex [~15 digit precision]."
Any ideas?
03-13-2010 08:18 PM
Here is an image of the problem:
03-14-2010 05:56 AM
You have been deluded by the Express VI concept and the dynamic data type. This is a quite common mistake for Labview beginners, they only see a blue wire. But do not reflect any about the real data embedded and hidden in the dynamic data type . If you want to be a good Labview programmer you should avoid the Express VI concept. The whole Express VI concept is just some flimflams that NI has glued onto Labview using very cheap glue.
The output from the sound card is a data array with consecutive samples from the sound card. And this is the correct data to feed to the filter and spectrum functions. But the PtbyPt VIs want single data points and not arrays. So your programming strategy will not work as it is now. I see you have the context help enabled and that is good. But do not be afraid to use the detailed help option. Here you will all the info you need, and quite often a link to examples.