Sound Input Read Spectrum Analyzer

I am working on a project with Arduino to do a spectrum analyzer. The LVIFA part of it is working fine.
The part that I am struggling with is the audio input.
I am using the Sound Input Pallet.
My troubles are two-fold.
1. A single read takes quite some time and I need to have a pretty quick response. I decreased the samples per read and came up with problem #2.
2. I can get one read out of the Sound Read In and then the VI locks up. I have my timeout set to 1 Sec and it never times out. I have to restart LabVIEW.
While it would be nice to have this VI working, I'm not even sure that I am using the correct tool. If I am going to be running an audio spectrum analyzer display off of the data input, I need to response to be within a few mS (ie. <200) so that it looks visually correct.
If this library will not achieve this, then I need to look into a different tool.

Hi,
I have a similar project, actually I am using a Audio frequency range as input to the Arduino and do an FFT to receive the spectrum out of it.
See the YOUTUBE video I did and the code in *.jpg. I took actually the Continous Input example and modified it.
Hope that helps.
Keep me posted, since we might work on a same project.
http://youtu.be/aqzyofQHXDM
Y3G
Attachments:
Uno Blockpanel.JPG ‏104 KB
Uno FRONTpanel.JPG ‏99 KB

Similar Messages

  • Sound Input Read VI hangs

    I'm using the SI Read VI to sample from the Soundblaster card in my Dell PC. I've configured the device for 16-bit mono input, sample rate 44.1 kHz, and the buffer size is 1024 samples. The SI Read VI is in a Timed Loop whose period I've set to 23 ms (1024 / 44.1kHz). Following each acquisition, I do some filtering, frequency analysis, and plotting inside the loop.
    The acquisition works well for the first 10 minutes or so that it is running. But sometime after about 10 or 15 minutes, the VI hangs. I've traced the hang back to the SI Read VI, but have not yet figured out how to avoid the hang or recover from it (I have to abort and restart the program).
    Has anyone had similar problems with the SI Read VI? Could there be a problem with the DLL that the SI Read VI calls? Are there any upgrades or fixes for this? Can someone suggest a way to recover from the hang?
    Thanks for any help,
    Mark

    This message is a reply to "Sound Input Read VI hangs" (National Instrument) NI Discussion Forums posting found at: http://forums.ni.com/ni/board/message?board.id=170&message.id=137258 and http://forums.ni.com/ni/board/message?board.id=170&message.id=110656&requireLogin=False
    Hi everybody,
    From the large count of how many of you guys read the above thread of messages, including myself, and who are dealing with the same problem of SI Read VI hanging found National Instrument (NI) LabVIEW (LV), I decided to share my (not so perfect) solution with you guys to save you time and frustration. Here is the story of 3 days (18 hrs/day) of my life, fighting a bug in SI Read VI (SI: Sound Input) (I am currently using LabVIEW Pro v 7.1.1):
    For the reason that "A Message cannot exceed 10,000 characters" on this Forum I included my message in the attached Word doc. Hopefully, there is no such limitation on uploaded files!
    Samir Berjawi
    Research Assistant and Lab Instructor
    American University of Beirut
    [email protected]
    [email protected]
    Attachments:
    LabVIEW SI Read freezes - Report.doc ‏39 KB
    Sound Acquisition Test.zip ‏995 KB

  • Wrong sampling rate from Sound Input Read VI on Dell Latitude E6510

    Hi,
    When I
    receive data from the sound card with the Sound Input Read VI, the actual
    sampling rate is not equal to the sampling rate set in the Sound Input
    Configure VI. I estimate the sampling ratio by dividing the number of samples received
    by the difference between the first and the last t0 from Sound Input Read. For
    example, if the sampling rate is set to 7000 S/s, the actual sampling rate is
    around 6900 S/s. If the sampling rate is set to 7050 S/s, the actual sampling
    rate is around 7200.
    This problem appears when the
    code is run on my Dell Latitude E6510 machine. When I run the
    same code on my Lenovo ThinkPad, the sampling rate is correct.
    The Labview application I
    am developing is to be used to acquire data synchronously from several sources,
    including the sound card input. It is therefore important that the sampling rate
    is correct.
    If anybody has any idea
    about what may cause this problem, and a way to fix it, I would be grateful.
    Ole

    It has been a trend the last years that sound card only support some sampling rates, not a range. You should refer to your sound card manual for this kind of information.  You should also be aware of that the NI sound interface is junk, and they do care about it either. Use the WaveIO interface instead See the link. But I am quite sure your problem is related to the sound card hardware not some NI driver issue
    http://www.zeitnitz.de/Christian/waveio
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Time mismatch with Sound Input Read VI

    Hi Folk,
    I am acquiring the signal of the PC
    sound card with the "Sound Input Read VI" and I have
    noticed that between subsequent waveform data packets there are time
    mismatch, both overlap and gap.
    To point out the observed behavior, I
    have posted a modified example, the "Continuous Sound Input.vi". In the example, I have computed the
    time difference between the t0 of the actual waveform packet and t0
    expected on the basis of the previous waveform packet.
    Consistently, in the indicator "Time
    series" (Waveform Charts), each time there is a time overlap or
    gap the Charts resets it self or presents a gap.
    By reading 1 second of data the time
    mismatch is about 0.015625 or 0.03125 sec. (both positive and
    negative).
    The repetition frequency of the time
    mismatch decreases as the acquisition sample rate increases.
    The amount of the time mismatch seems
    to be sample rate invariant.
    Do you have any idea from where this
    problem is coming out and how to solve it?
    Thanks for your help,
    Asper
    Attachments:
    Time mismatch with Sound Input Read VI.png ‏51 KB

    Pre made Labview functions are not some holly grails that is newer to be touched and modified. In fact many included functions in Labview has what I will name as "high flimflam factor" That will say a lot of functions you do not really need. Express VIs are grim examples of this.
    Anyway I have made some modifications and removed some babyfat in the sound input VI. Take a look at it. The top level VI is the "time fixed sound.vi" It could be that you will get an error because Labview will not find a DLL. If a DLL is reported missing you will find it in C:\Program files\National Instruments\LabVIEW 2010\resource\lvsound2.dll
    Remember to save the modified VIs in a separate folder, and not in the vi.lib folder at all. Be careful so you do not overwrite any Labview function
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    Sound Input Read (DBL)_time_fixed.vi ‏30 KB
    time fixed sound.vi ‏19 KB

  • Sound input read multiple soundcards

    Heey everybody,
    I have a problem. I want to read two different signals at the same time from 2 different soundcards. 1 internal soundcard from my laptop, and 1 usb soundcard. 
    So i used the Acquire Sound VI.
    Reading both signals at the same time is not a problem until i set the measuring time to about more that 30 seconds. It gets a buffer overflow.
    So i tried to do the following:
    I first made this with 1 signal first, and it worked perfectly, every second it got updated.
    But, when i added the second signal it only wanted to read the first second of the first signal and then it got stuck, and i had to stop the software by closing it. And then killing labview with the taskmanagement thingey from windows.
    Anyone have any idea what the problem is?
    Greetings,
    Jory 
    Solved!
    Go to Solution.

    Ok, never mind, i've solved it. I made the buffers larger (at the sound input configure block) and now it works like a charm

  • PLEASE can a AE from NI take a look at my problem. Sound input read behave in strange manner then the buffer size is larger than 2X number of samples to read.

    On my computer I have discovered some strange behavior then reading data from the sound card. Then the buffer size is 2x samples to read everything is as expected. But since I read the sound card 10 times pr second I feel a .2 second buffer is to small. I am using XP, and XP is not a RTOS so with a buffer set to 0.2 seconds I may lose data. Therefore I set the buffer size (number samples/ch on Sound Input Configure.vi) to be in range of 2 seconds. The result then is that then reading from Sound input.vi, a reading often take more than 0.1 second. On my computer it is often 500mSec. Then the next 5 read follows with almost zero interval. I do not loose data. But on my front panel the graphs looks like an very early silent movie. This error was introduced in Labview 8.x. To be honest I think the labview 7.x sound system was much better in many ways.
    But before I point any finger NI. Other people has to verify the behavior I experience. I have made an example showing this error. It is a modified version  of the "Continuous Sound Input.vi" example. Then the "buffer in seconds" control is set to 0.2 every thing works OK. Changer this to a larger number will produce the mentioned above hiccup. The larger number in this control the larger hiccup. Is it any way to fix this? My solution up to now has to use a free 3. part software(http://www.zeitnitz.de/Christian/index.php?sel=wav​eio) But I guess it soon will be outdated. It may not work with newer windows versions.
    Any help at all will be appreciated 
    And yes I have the most updated version fo DirectX. Also I se this in Labview 2009 which I have trail version of. The VI I have made is in 8.6
    Message Edited by Coq Rouge on 09-07-2009 10:54 AM
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    Continuous Sound Input with timing.vi ‏23 KB

    macaba wrote:
    If you take a moving average of the 0.2s buffer vs. 3s buffer at an update rate of 10, then they are the same (just under 100ms), so the average refresh rate is the same. I agree that is odd behaviour that the time between sound reads go to zero quite a lot then take a long time once in a while (presumably to fill the buffer
    I guess it goes to zero because it is reading data from the buffer it do not has to wait for data from the sound card. The mysterious thing is the periodic delay. You are also correct then saying that average timing is correct. And in my application I have no data loss.
    If you search for sound in this forum you will find out that many people has reported trouble with the sound system.
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • G5 sound input reads drums but no sound coming out

    i'm not sure what the deal is, the input is reading my drums fine but i hear no sound not through headphones or surround sound or computers speakers. All my sound works for anyhting else. please help me

    My present computer has no sound input capabilities but there may be a setting in sound control panels or whatever software you are using for selecting sound output, including passthrough. There's also a midi application in your applications that controls sound features.

  • How to have Sound Input Read VI read .wav in sections

    Hi,
    I'm trying to read audio data from my laptop's soundcard, and it's really slowing down my VI's processing power. I read on the NI website to read the .wav file in sections instead of as a whole, but I have no idea how to do that. Any suggestions? My VI is attached.
    Thanks!
    Attachments:
    signalgen.vi ‏56 KB

    You have set the sample rate for the sound card to 100000 samples pr second. That is a sample rate your sound card will not be able to handle. Hence a error will occur. And you will not get any data from the sound card. Some sound cards may support samplerates in 1 Hz step but most sound cards do only support some rates. The latter is most typical. All sound cards do support 44100 Hz sample rates but typical sample rates are 44100,22050,11025, and 8000. Some sound card do also support higher sample rates than 44100. Refer to your sound card documentation for this. Your way of using the Daq card by reading 1 sample on each iteration, using software timing is also a Daq NO-NO. Read data in chunks and do not do to many updates pr second, and always use HW timing. If you need the waveform to appear "live", or "real-time" 10 updates pr second is more than enough.  
    I have included a sample vi. I suggest that you use that as your workhorse from this point. At least if you want more help from me
    Tip Labview is shiped with many very useful examples. Then you are stuck. Go to toolbar->help->fFind examples. As one example the Daq setup is from the "Cont Acq&Chart Samples-Int Clk.vi" vi example
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    workhorse.vi ‏37 KB

  • Difficulty getting Sound input configure and sound input to read more than 2 channels

    I need multichannel audio input for my project. I can't seem to read more than 2 channels of my audio interface.
    The interface Im using is an Alesis Multimix8 USB 2 mixer and and audio interface. This supports 10 channels in and 2 out. With other software I can read all input channels simultaneously without any difficulty. When I specify the sound input configure and sound input read, to read more than 2 channels any extra channel is a blank signal. Im using Labview 8.5 here.
    Solved!
    Go to Solution.

    Take a look here
    http://forums.ni.com/t5/LabVIEW/Play-waveform-express-vi-list-devices-on-front-panel/td-p/1559336
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • How to read the data in spectrum analyzer (Anritsu MS2661C) and put it in Excel using Labview

    Hi all, I'm new to using the labview, and I have some trouble doing my project using the labview software.
    I have been trying to use the spectrum analyzer (Anritsu MS2661C) which connect to computer using the GPIB connection.
    I have got the instrument driver which can write and control the instrument using Labview 2010.
    and my Question is how do read the data or result from the spectrum analyzer and send it to the microsoft excel?
    Do I need to use other software or programming to do this step?
    If anyone know how is this done, please let me know.
    Regards,
    Ery

    Hi ery,
    In order to send data that you have read in from an instrument to Excel, the most convenient way to do this would be to use our Report Generation Toolkit.  The Report Generation Toolkit is a very useful tool that allows you to interface to Microsoft Office software from LabVIEW, including Word and Excel.  I am not sure if you are familiar with this, but I have attached a link that explains more about the Report Generation Toolkit below.  
    Another way would be to use the Write To Spreadsheet File VI.  While this will store your data to a spreadsheet data file, it will not allow you to programmatically perform any Excel formatting like the Report Generation Toolkit offers.  I have also attached a link to some information on the Write To Spreadsheet VI below.  
    Also, be sure to check out the Example Finder in LabVIEW for a number of examples on how to write data to a spreadsheet file.  From LabVIEW, you can go to Help»Find Examples to launch the Example Finder.  From there, you can search for "spreadsheet," which should populate examples for use in different applications.  I hope this helps, ery.  Please let me know if you have any further questions about these!
    NI LabVIEW Report Generation Toolkit for Microsoft Office
    Write To Spreadsheet File VI 
    Taylor G.
    Product Support Engineer
    National Instruments
    www.ni.com/support

  • Digits truncated in GPIB read with HP 8593 spectrum analyzer

    When I read the information from the HP spectrum analyzer, only the first digit is read .
    It works fine with other instruments

    Can you provide some sample code of what you are doing?
    What instruments does it work for?
    By digit do you mean one bit, one byte, or one reading?
    Were you expecting one reading or an array of readings?
    [email protected]

  • Using NI PCI-5640R as Real-Time Spectrum Analyzer

    Hi,
    The code for NI PXIe-5641R Real-Time Spectrum Analyzer demo is posted HERE  for LV 2009. I want to use the same code for NI PCI-5640R instead of NI PXIe-5641R. Since I am using a 5640R, I have changed the device in the project.
    Can any one guide me what else changes I have to make in this Demo code so that I can use the same code for NI PCI-5640R
    instead of NI PXIe-5641R?
    Thanks and Regards,
    Rashid
    Solved!
    Go to Solution.

    Hi Eug,
    It sounds to me like you need to go back and re-install support for LabVIEW 2009 and 2010 through the NI-RFSA driver. You can do this through Add/Remove Programs. Select National Instruments "Change/Remove" and when the pop up window comes up select NI-RFSA and select "Modify." This will re-load the installer for NI-RFSA and through there you can add/remove support for versions of LabVIEW. Make sure that LV 2009 and 2010(if you're using it) are selected.
    As for your application, if I understand you correctly your setup goes something like PXI-5600»PXIe-5641R»PXI-5610 (»PXI-5690?). If you're just trying to acquire a signal on the 5641R and amplify it digitally before replaying it on the AO port, then you could try to use the example code "ni5640R Analog Input and Output" that is found here:
    C:\Program Files\National Instruments\LabVIEW 2009\examples\instr\ni5640R\FPGA\PXIe-5641R\ni5640R Analog Input and Output\
    as a base to follow, but you'll need to modify the code so that you're not providing the AO data from the host, instead you'll re-route the AI data on the FPGA through some amplification block and then feed that to the AO port. If you're including the 5600 and 5610 in this process, then that modified example will just need to include some code on the host to setup the 5600 for downconverter only mode and the 5610 for upconverter only mode. There are examples of this that you can find in their respective driver examples:
    C:\Program Files\National Instruments\LabVIEW 2009\examples\instr\niRFSA\RFSA Downconverter with External Digitizer.vi
    C:\Program Files\National Instruments\LabVIEW 2009\examples\instr\niRFSG\RFSG External AWG (5610).vi
    The addition of these last two pieces of code will make this modified example look a lot like the code that NAyer linked above without the FFT processing.
    I hope this helps.
    Chris W

  • Spectrum Analyzer using Swept Frequency

    Using the AWESOM example foundhere:
    http://zone.ni.com/devzone/explprog.nsf/6c163603265406328625682a006ed37d/433c2cbc5a1c4a49862569500035f715?OpenDocument
    Give the person who wrote that an A+. I want to replace the FIR filter with a REAL device. I want to send a swept sin wave (just like the original) and then read the response from the Analog Input channel. I put a vi in place of the vi called :IIR Filter for 1 Chan.vi. Go to the NI ftp site to ge t the file named ZZDMKSin.zip (I could not get the file attachment to work within this post) The symptom is the Frequency Response does not get any data that can be seen...
    In the end I simply want to put a REAL UUT in place of the FIR filter. This would turn the VI into an equi
    v of a $30,000 spectrum analyzer! Sooooo cool!
    Any help would be greatly appreciated. My e-mail is [email protected]
    Thanks,
    Dave

    Dave;
    I'm not quite sure if I understood your application, but by my understanding you want to replace one of the Filter VIs by a VI that does data acquisition from a real external device.
    The first thing you might want to double check is the data acquisition VI by itself. Set up the system with the external device and with the data acquisition VI only. Make sure the VI is acquiring data as expected.
    After that done, make sure that the data acquisition VI output is outputing the same data type that is expected at the output of the IIR Filter.vi.
    I believe that either one of the previous issues might be the answer.
    Hope this helps.
    Filipe A.
    Applications Engineer
    National Instruments

  • Agilent E440x Spectrum Analyzer screen capture?

    Does anyone have a LabView VI to do a screen capture of an Agilent E440x Spectrum Analyzer.  I would like to capture a .gif or .jpg of the exact SA screen image.  I did not see a command in Agilent's manual to do this directly - I can save to the SA hard drive but want to save to the PC.

    jm-sc wrote:
     did not have any luck wiring the byte count output of the VISA write to the VISA read byte count input.
    Thanks Dennis,
    I think old age is catching up to me!!     I missed that part of the sentence earlier...  sorry about the confusion.  I agree that wiring the output of the VISA Write to input of VISA read would not worked.. 
    My interest with this thread is the fact that we were unsuccessful (~2001) to achieve this.  I'm curious in a solution that works.  From what I recall, it was possible to control the instrument to get a screen capture, but was not possible to transfer it over GPIB.
    It's always good to learn new tricks. 
    JLV

  • Interfacing labview 8.5 with spectrum analyzer

    can anyone tell me how to interface labview 8.5 with spectrum analyzer.............i am beginner ...i don't know much about labview
    Solved!
    Go to Solution.

    Why don't you tell us what you do know so we can better help you out?  Do you know how to hook up the spectrum analyzer?  Make/model of the spectrum analyzer?  Do you know how to use it manually?  Do you know what a spectrum analyzer is for?
    I know some of these questions might sound almost insulting, but we have to establish a baseline so we know how much help you need, and how much detail to include. 
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

Maybe you are looking for

  • Business Partners Landlord : Error Message when saving.

    Hi all. I create a business partner roles 0036(General Real Estate Contract) and role assignment 0602 (Landlord with Vendors accounts) and linked it with vendor accounts. During saving, it give the following error message. "Error when posting <custom

  • Indesign CS6 just started crashing when exporting to pdf - help?

    I just got Indesign CS6 a few weeks ago and I'm using it on a new macbook pro. I had exported to pdf a few times with no problem. Today, I tried the same thing and Indesign began quitting for no apparent reason. I already tried restarting my computer

  • Database control in a two node oracle fail safe cluster

    os windows server 2003 r2 db 10.2.0.4 ofs 3.4.1 i've configured db control in the following D:\oracle\product\10.2.0\db_1\BIN>emca -config dbcontrol db -repos recreate -cluster_name name_of_the_cluster is this right? next question the -cluster flag a

  • How to remove content lock in MyEE account?

    thats a shame, but thanks. perhaps, in the future, they'll include an option for PAYG customers - who've provided age evidence - to manage the content lock... A

  • Extremely slow performance transferring data over USB with Time Capsule

    I have the 2TB wireless Time Capsule. I have it setup as an extension to my current WiFi at home, since I already had a WLAN router. I have an external harddrive (500gig) that I connected to my Time Capsule because I wanted to transfer data from the