HP4195A interface software for Prologix GPIB/USB Adapter

NOTE: this entry has been superseded by a project page ! Click here for the new location.

Download program here (DL4195A_1.0.zip, Win32 binary + sources)

While I was doing my Analog Filter Design (ELE430) class at Ecole de technologie supérieure, we had to use the Agilent/HP 4195A Network/Spectrum Analyzer in the lab to plot filter frequency responses. One problem I encountered was that the GPIB slave on it was a Centronics (parallel-port printer) adapter connected to a LaserJet printer, which meant we could not directly access the data internal to the instrument. We could only plot it on paper.

To solve this problem and get access to the full 400 points of data memory for each HP4195A channel, I wrote the DL4195A utility (which stands “DownLoad 4195A”). The program requires a Prologix GPIB-USB Controller to connect to the instrument. This GPIB-USB adapter appears as a virtual COM Port and supports all GPIB bus operations. I strongly recommend it. The program is written in Python and uses the PySerial library.

The program has the following features:

  • Downloads both internal registers (A and B) from the HP4195A
  • Supports all HP4195A Network and Spectrum modes
  • Outputs data as a TSV (tab-separated text file) compatible with Excel
    • Output file uses same headings as a HP4195A Hardcopy
    • Data is available with full instrument precision
  • Auto-detects available serial ports (COM1-COM128)
  • Does NOT affect measurement setup
Below are some screenshots, including some Excel graphs made with captured data from a live HP4195A. A sample file (DL4195A_output_sample.tsv) shows the format of the data.
If you find any bugs or have any suggestions, please do not hesitate to contact me. I give NO WARRANTY on the fitness of this program for any purpose, but it has worked well for me and some of my colleagues. Sources are included in the archive.

Download program here (DL4195A_1.0.zip, Win32 binary + sources)

5 thoughts on “HP4195A interface software for Prologix GPIB/USB Adapter

  1. I have just started using the Agilent/HP 4195A Network/Spectrum Analyzer to test some filter responses. My problem is that I couldn’t print the filter responses on paper. The printer is directly connected to the HP 4195A at the “8-Bit input/output”. Should I write a program to communicate with the printer? I hope you can help.

    Thanks!

  2. @A. Chaffai
    You will indeed have to write a program to communicate with the printer if it is on the 8-bit I/O port. Maybe someone at your institution has already written a program to do so.

    I suggest that you look into the possibility of getting a GPIB-to-Centronix (PC Printer) adapter. These can print to LaserJet printers directly from the Hard Copy options of the HP 4195A. Alternatively, you could use a GPIB equipped PC to run an HP 4195A tool that can gather the hardcopy in a PC image or get the data tables into Excel.

    Several GPIB-enabled programs support the HP 4195A. My program is one of those, but it is meant for use with a Prologix GPIB/USB adapter. Some programs are meant to support the VISA library, which allows the use of National Instruments or Agilent GPIB adapters. Hope this helps !

  3. After getting a GPIB/IEEE488 to USB Hardcopy-interface I tried to acquire the data directly with the pc (plots as images) using the HP 7470 Plotter Emulator of John Miles but with no success. Also with your program a had the problem what I can’t describe cause of computer crash. May be I’m doing something wrong?!

    If you have any other programs that support the HP 4195A tell me.

    Best Regards!

  4. Hello,

    I’m currently using an HP4195A, and the way I used to recover data was through the 3.5floppy drive. Although I couldn’t read out the information on a DOS based system, I used an HP16603 Logic analysis system to access the disk. It runs an HP-Ux OS that can read LIF disks, I copied the files to it’s hard disk, and with another DOS formatted disk I copied to my Windos OS PC… You can also try an FTP connection…
    Although you need another device with HP-Ux OS, the extracting of data is quite simple, a little matlab program or even C, and you can decode the files… you just need to know where the information is…
    Took some time to figure out… but it was easy to solve… Now I make all my measurements, store them to a floppy, and in the end with the matlab routine I get all the data 🙂

    PS: this solution seems very good, but my lab wouldn’t give me the funds for the GPIB-USB…

  5. Hello.
    I am currently working on a HP4195a network analyzer with a HP41951a impedance analyzer .
    It is impossible to read the floppy disk containing the data.
    I try with a Prologix GPIB USB controller.
    I tested it with a HP7470A printer emulator and it works fine but I do not have the desired data.
    I tested your DL4195A_1.2 software but it does not generate any .Tsv file.
    I use a PC with windows 7 64bits
    Have you any idea on why it does not work ?
    Thanks.
    Noel

Leave a Reply