Spectrum analyzer gui example

I am trying to construct a GUI to control and display an Agilent E4408B spectrum analyzer.
I have created a serial connection to the spectrum analyzer and have managed to control it and query for frequency and power using SCPI commands
sent across the serial link, so I know the serial connection works.
However I am getting nowhere in trying to make a GUI using Labview. I have downloaded the drivers and there seem to be bits of the functionality I need
but I do not know how to "hook up" the serial connection to these bits.
Does anyone have an example of a similar applcation in Labview? It does not need to be an agilent specan, any instrument that has driver supprot and uses serial communication would be a good example.
Many thanks!

Hi NIer,
I am new to Labview and trying to build a GUI controlling Agilent E4408B using GPIB-USB-HS. I have downloaded the driver (plug and play) from NI website however the downloaded document makes me confused where to start. Would you mind sending me a proper tutorial document please? Any suggestion will be highly appreciated!
I need this to be done urgently and hope you can help!
Thanks a lot!
Yang 

Similar Messages

  • HP Spectrum Analyzer LabVIEW Driver/Example

     I'm trying to use LabVIEW to control an HP E4403B spectrum analyzer. The LabVIEW I installed is 2009, the drive/example I downloaded is from the link below:
    http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=309EBE8FF8BC0E76E0440003BA7CCD...
    I tried all the example program but none of them worked. Some commands like *IDN workes okay, but if I run the example programs, it will cause the spectrum analyzer "Undefined header" error. 
    Any one with experience of using HP spectrum analyzer  can give me some clue about what's wrong? 
    Best regards,
    Guangde

    Hi Dennis,
    Thank you for responding to my message.
    I deleted some of the commands from two of the subVIs, the error is gone. But the program is still not working right. The following is some details:
    The program I used is: Agilent ESA PSA Series Acquire Trace which is an example of Agilent ESA PSA Series.
    In the subVI: Configure Sweep Coupling.vi, I deleted WE:TIME:AUTO ON; and :BWID:VID:RAT:AUTO ON; from the following commands:
    WE:TIME:AUTO ON;
    :BWID:AUTO ON;
    :BWID:VID:AUTO ON;
    :BWID:VID:RAT:AUTO ON;
    In the subVI: Configure Acquisition.vi, I deleted ET:AUTO ON;
    :INIT:CONT OFF;ET:AUTO ON;ISP:WIND:TRAC:YPAC LIN;ISP:WIND:TRAC:YDIV 10.000000;
    So I can run the program through without an error message. But it doesn't seem it's measuring. Another problem is that it runs very slow, about 2 to 3 seconds per cycle. 
    Please let me know what I need to do after I deleted the three commands.
    Thanks,
    Guangde

  • 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

  • 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

  • "agesani Initialize With Options" timeout error on HP E4401B spectrum analyzer

    System: Windows XP Pro, LabVIEW 7.1, IVI Compliance Package 3.0, NI-VISA 4.1
    I have an HP E4401B Spectrum Analyzer.  I'm trying to write some LabVIEW code for it, using the agesani.llb library.
    When I try using the agesani Initialize With Options VI, I get the following error:
    Error code: BFFF0015
    Source: agesani Initialize WIth Options.vi<ERR>Driver Status: (Hex 0xBFFF0015) Primary Error: (Hex 0xBFFF0015) Timeout expired before operation completed.
    I've searched the NI Knowlege Base, and haven't found anything that seems useful.  What I _have_ found are the following items.
    Knowlege Base article "Time-Out Error with the Agesa Instrument Driver Example".  This refers to the agesa drivers, not the agesani drivers.  It also references an E4440A spectrum analyzer, not an E4401B.  The article says one cause could be that a compatibility mode other that SCPI is in use.  While the articles says how to fix this on an E4440A, the fix does not appear to apply to the E4401B.  In fact, if it is even _possible_ to have a mode other than SCPI on an E4401B, I can't figure out how to do it.  A second possibility the article suggests is that the spectrum analyzer is in Phase Noise mode rather than Spectrum Analyzer mode.  My E4401B is in SA (spectrum analyzer) mode.  I don't even see a way to put it in any other mode - I don't think the required options are installed.  Finally, my VI is configured as the article states - ID Query YES, Reset Device YES, etc.  I should note that the instrument's GPIB address is 18, and that this matches the resource name GPIO0::18::INSTR.
    Some additional information: The spectrum analyzer's screen is indicating the instrument is in Remote (R) mode as a Talker (T).  A "Query UNTERMINATED" error message appears at the bottom of the instrument screen.
    I've attached the results of a NI Spy capture to this message. (At least, I think I have. I've never tried doing this before, so if it doesn't show up, would some kind soul tell me how to include an attachment to my post?)
    Oh, yes.  The agesani version is driver version 1.1, updated 17 Aug 2007.  (The version that's currently on the NI download site.)
    Attachments:
    Capture4.spy ‏9 KB

    Hi MXI Master,
    If there's an instrument timeout, I haven't been able to find it yet.  Seems like there should be, so maybe I just haven't looked in the right place yet.  As for the timeout value on the computer, I'm not sure what you mean by this - could you elaborate, and maybe tell me where to find it?
    As far as SCPI mode, if it's possible to put the E4401B in something _other_ than SCPI mode, I haven't figured out how.  I can't find any support in the programming manual for anything other than SCPI.
    That kind of seques into my next couple points.  The NI Spy output indicates that one of the commands that is being sent is "*SRE 32".
    The "User's & Programmer's Reference" for the E4401B says (on page 206) "Send the *SRE <number> command (where <number> is the sum of the decimal values of the bits you want to enable plus the decimal value of bit 6).  [Bit 6 is the Request Service (RQS) Summary Bit.  BP]  For example, assume that you want to enable bit 7 so that whenever the operation status summary bit is set to 1, it will trigger a service request.  Send the *SRE 192 (128 + 64) command."
    This statement would seem to imply that the "*SRE 32" command that is being sent by the agesani "Initialize With Options" command is an illegal command, or at best an ineffective command.  In light of that, it is interesting to me that the NI Spy output indicates that the next line , viQuery(GPIB::18::INSTR (0x246E9C8), "%s?","%ld"), is generating an 0xBFFF0015 error.  In addition, I can find neither the "%s?" nor the "%ld" commands listed in the Programmer's Reference.  I wonder if these could be for a firmware revision later than mine (A.01.03), or for instrument options I don't have (A4H, A4J).  Alternatively, I wonder if these are simply mistakes.
    The next line in the NI Spy output, Formatted viWrite(CPIB0::18::INSTR (0x0246E9C89),"INST:NSEL?",11,11), also puzzles me.  The Programmer's Reference indicates that this is a supported command, to see what instrument application is currently selected.  (e.g. spectrum analyzer, GSM, Bluetooth, EDGE, noise figure, etc.)  However, when I try to issue this command to my instrument, by using the Instrument I/O Assistant Express VI, I get an "Undefined header" error on the instrument's front panel.  The instrument's error history shows the same "Undefined header" error.  Since my instrument only has the basic spectrum analyzer option installed, I wonder if this command is not valid?  (Personally, I wouldn't write instrument firmware code this way, but who knows?)  Alternatively, I wonder if this command requires a firmware revision more recent than mine.  (The Programmer's Reference is silent about this possibility.)
    The next line in the NI Spy output, Formatted viRead(GPIB::18::INSTR (0x0246E9C8),"",4000,0), has another 0XBFFF0015 error associated with it.
    Does this information shed any more light on the situation?

  • ADVANTEST 3131A SPECTRUM ANALYZER AND labVIEW

     Hello, 
     Trying to control R3131A spectrum analyzer connected through GPIB-USB-B and my laptop using Labview8.5. 
     I want to read frequency(Hz) from R3131A,and i want to send my measurments to an exel file ... 
     I have install the labview 8.5,the Measurment and Automation for finding my instrument and i have download the Advantest R3131A Drivers-libraries  from  that page  ....                    http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=82   and then i install it in  Instrument I/O>Instrument Drivers palette.    I have read the examples code who coming with the drivers but i don't know which example  can help me...                                                                                                                                                                                                                                                                                                                                                                                      If someone knows something,or have an example code who doing that or other help,please send a message..                                                                                          thanks!..

    The typical way to make a measurement on any instrument is as follows:
    1.  setup the instrument for the measurement. 
    2.  carry out the measurement.
    3.  store result in a file
    1. In this case, you want to setup the instrument to carry out a frequency measurement.  Although I am not familiar with the Advantest SA, I'm sure it should be similar to the Agilent or Rohde & Schwarz SA.  So you first need to set the span wide enough to find the Center Frequency that you want to measure.  Then place a peak marker and set the center to the peak value.  You then narrow the span in order to improve your measurement.  Most likely adjust your resolution (BW) and place a peak marker.  You have now setup the instrument for the measurement.  The example should contain what you need to accomplish this.  Otherwise the user manual should give you the instructions on how to create the commands.
    2. You can read the values associated with the marker which will give you the frequency and amplitude.  There should be seperate instructions for these.  So you can read the frequency by itself.  There should be an example of this as it is a very basic measurement.
    3.  Storing the results... to Excel..  -sigh-  Most people refer to Excel, but end up needing to use a different function.  In any case, are you writing to an existing Excel Spreadsheet which already has information in it?  If not, you can use the "Write to Spreadsheet File.vi".
    R

  • 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

  • Spectrum analyzer with sim and DAQ IV File

    Hello..
    i have a project that i need to design a Spectrum analyzer with simulation mode and DAQ option. ( so you can generate input signal from LabView and DAQ.
    all i look for is a modern Spectrum anlyzer VI file for reference and education purposes
    i know there are examples out there in LabView but, i need a modern one with a lot of options and features ( like Impulse respond, marker... filters.....)
    there is something i found here on the website, it happen long time ago, and some proffessor from Vietnam created such project. its not with DAQ, but its great for me.
    here is the link:
    http://digital.ni.com/worldwide/singapore.nsf/web/all/42B390E4624228D486257249001A5349
    this kind of Spectrum anlyzer looks great
    most appreciate for any help

    Hi Eldad,
    Thanks for posting and welcome to the NI forums!
    The
    application you have linked uses LabVIEW to control a Tektronix TDS220
    over RS232 (a.k.a. serial port).  The TDS220 has a 1GHz sample rate
    with a 100 MHz bandwidth--the specs on our DAQ devices don't go nearly
    this high, our High Speed Digitizers
    would be a better option if you need something comparable.  Also, the
    programming of the two devices (TDS220 vs. DAQ) is going to be quite
    different, so I am not sure how helpful the code from the link would be
    for your application.  I don't have access to the code or permission to
    post it here, but you could always try contacting the original author
    (his contact info is in the link you provided, not sure if it's up to
    date or not).  Again, I'm not really sure how helpful the code would be
    for you.
    You might want to take a look at the following example to see if it does what you need:
    NI-DAQmx: Benchtop Spectrum Analyzer
    There
    are also numerous examples that are installed with the DAQmx Driver to
    help you get started with the API.  You can access them from LabVIEW by
    going to:
    Help >> Find Examples... >>  Hardware Input and Output >> DAQmx
    There
    may not be a ready-made example that will do everything that you
    require, but the above should give you a good starting point for
    implementing the necessary features yourself.  If you run into any
    specific issues while trying to program, please don't hesitate to post
    to the forum and we'll be more than happy to help out.
    -John
    John Passiak

  • Communications between LabVIEW and spectrum analyzer

    hi, im a beginner in LabVIEW and spectrum analyzer, and im now trying to let LabVIEW captures signal coming from spectrum analyzer. i have all the required components needed but i have totally no idea how to get started, is there any exercises or labs available here?

    It will depend on your method of communication with the device.  If it is RS232 you can go to the example finder (Help > Find Examples) and search for RS232 or however you plan on communicating with the device.  Or you can browse the catagories for examples on various topics. 
    Depending on the device the manufacturer may have LabVIEW drivers on their web site.  But anybody will need more information on the analyzer and the signals before you can be helped. 

  • Signal processing tools: spectrum analyzer, equalizer available?

    Are there any plug-ins or scripts to perform spectrum analyzing (shows the distribution of frequencies), and an equalizer (multiple band pass filter)?
    Why is there a high-pass filter, but no low pass filter?
    (using cs4)

    Math abstraction notwithstanding, the results are not the same.  For one thing I get problems with using blur around the edges of an image.
    But even beyond the edge issues...
    In the case of my example - preparing for a luminance flattening operation - the blur combines the data from all the background sky glow with that from the stars, and so the result contains pixel values derived from both.  A high pass operation then subtraction leaves me with the background sky glow alone and only eliminates the stars (light spots) and dead pixels (dark spots).  If I choose to combine so as to allow only darkening then I keep the dark spots and eliminate only the stars.
    Am I missing something here?  Are you saying the sky glow somehow influences the result from the high pass filter operation as well, so that the resultant sky glow after subtraction is affected?
    I guess what you're saying is that High Pass is based on blur under the covers then?
    -Noel

  • Viewing spectrum analyzer on LabView

    I am using LabView 7.0 with agilent(HP) E4403B spectrum analyzer.
    I have no problem controling and getting measurements.
    How can I get on LabView the screen of the spectrum analyzer? I mean to see the screen just like if I was looking at the device itself?
    Tzviel

    Hi Tzviel,
    I don't have any experience with this device in LabVIEW, but are you using the instrument driver? You can find that here. There are several example VI's with this driver and there might be one here for what you are wanting to do. Please repost if you have questions with the driver. Thanks!
    JenK

  • Spectrum Analyzer with NI-6111

    I am trying to build a two channel (simultaneous) spectrum analyzer using Labview 7.0 and the PCI-6111 DAQ. I can make one channel work but it is very slow, but cannot find a method to acquire the second channel while the first is running. Are there any samples that might be useful? Attached is what I have so far. Is there anything I can do to speed it up? Any suggestions are GREATLY appreciated.
    Attachments:
    Acquiring_a_Signal_with_FFT_&_DAQ_&_THD_&_OCTAVE_&_TAB_&_CASE.vi ‏452 KB

    I've attached an example that I've thrown together that acquires from two channels and performs an FFT of one or both channels (selectable). I didn't have a problem performing frequency analysis on multiple channels simultaneously. One thing to keep in mind though -- the more analysis you do while performing buffered acquisition, the more likely your CPU will run into trouble with transferring data. I hope my example helps.
    Regards,
    Todd D.
    Attachments:
    Example.vi ‏201 KB

  • Optical Spectrum Analyzer

    Dear all,
    I am encountering troubles relating to controlling optical spectrum
    analyzer.. I follow exactly the commands in programming user guide but
    it turns out many errors. So, is there anyone here having some
    experiences with OSA controller? Could you help me?
    Thank all
    Solved!
    Go to Solution.

    Yes, I tried to appen both termination characters: carriage return and linefeed.
    For example:
    This is the original command for instruments: " CENTERWL 950NM; SP 20NM;" and when I wrote it to VISA write, it does not work.
    When I append \n, or \r at the end of each command above, it still does not work
    I enclosed the manual for your consideration.
    Attachments:
    70950-90050-HP 71450B-Optical Spectrum Analyser-Programmer Guide.pdf ‏3647 KB

  • How to capture a .gif file from a spectrum analyzer and save the file in PC

    I want to capture a .gif file from a spectrum analyzer and save the file in PC, but I've got a problem when read data from the instrument. I'm not sure how to format the string got from the instrument , When I use "%s" or "%t" as the read string format the data got from the instrument is truncated.
    my code are as follows, could anyone tell me where i am wrong?
    char resultsArray[5000];
    viPrintf(hSpectrumInstr, ":MMEMTORCR 'CICTURE.GIF'\n");
     viQueryf(hSpectrumInstr, ":MMEMATA? 'CICTURE.GIF'\n", "%t", resultsArray);
     printf("%s", resultsArray);
     getchar();       
    Solved!
    Go to Solution.
    Attachments:
    readResult.docx ‏50 KB

    char resultsArray[5000];
    viPrintf(hSpectrumInstr, ":MMEMTORCR 'CICTURE.GIF'\n");
    viQueryf(hSpectrumInstr, ":MMEMATA? 'CICTURE.GIF'\n", "%b", resultsArray);

Maybe you are looking for