I’m creating a python based interface for my new HP 3457A using a GPIB to USB interface. I’ll upload updates here.

It has pretty much all the features of the Agilent/Keysight 34461A including large readout, trend plot, histogram, and statistics.
I also included all the HP’s specifications so that it can show the range of possible values from the nominal reading.

If anyone is experienced in Python, then I would really appreciate help with the code.

With Python 3.6 installed, double click on the dmm_control script and then make sure that all the dependencies are installed.

You can find the code at github


  1. Thanks Michael

    I’m making progress, on the Mac setting the connection port to:
    /dev/cu.usbserial-PX1HPSAX. doesn’t work but
    /dev/tty.usbserial-PX1HPSAX does and send readings to the application

    however the application freezes after about 60 readings

    On a windows 7 machine its the same but it freezes after 10 readings

    as you suggested I think it must be something in the configuration of the GPIB adaptor.

    I will update here if I make progress.


  2. Hello Michael

    Appreciate the code,

    when trying to run it an iMac Im getting the following

    (base) Harrys-iMac:desktop harry$ pythonw dmm_control.py
    dmm_control.py:197: DeprecationWarning: NewId() is deprecated
    EVT_RESULT_ID = wx.NewId()
    check connections and settings

    the GUI open up but I never get any data readings, it remains blank.
    Im using a prologic usb-glib

    any ideas?

    1. Make sure that the correct serial port is selected, on Mac it should be something like /dev/cusbserial. Other than that, you may need to modify the commands used in startup because I only tested on a single GPIB USB board and I don’t know if the prologic works the same. Additionally, make sure that your device is set to GPIB address 22.

  3. when I run this on Python 3.6 i get :
    C:\Users\Marcelo\AppData\Local\Programs\Python\Python36>python dmm_control.py
    Traceback (most recent call last):
    File “dmm_control.py”, line 813, in
    app.frame = GraphFrame()
    File “dmm_control.py”, line 237, in init
    File “dmm_control.py”, line 705, in set_com
    IndexError: list index out of range


    1. That’s just loading a default serial port. Maybe that library changed it’s api. You can just set the value to be an empty string and then manually enter your serial port when you start the program.

  4. Thanks Nick – appreciate you sharing the python code.
    Im getting an error when it tries to open the com port, “access denied”, have you seen this error before ?

  5. Hello Michael
    Your program looks very nice. Good job! Do your code run under linux?

    I’ve run usb-gpib interface under linux and tried to run your code but it looks for COM while I had /dev/gpio0. Also there is some wrapper python module Gpib that handles communication, which differ from windows version.


    1. Hi Nick,
      Thanks for your comment. I haven’t tested under linux, but I believe it will work if you enter in the correct dev path instead of COM. If you want, please fork the project on github and I’d be happy to accept pull requests if you make it run on linux.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.