Keithley 2000 & 2700 Data Logging in Python

This is a simple, braindead, python script to get measurements from a Keithley 2000 & 2700 DMMs using VXI-11 and store them in a simple timestamped SQLlite database.

It’s not a general tool, but it should be easy enough to tweak it to dump to a text file, take different measurements, use different ranges, different intervals, different communications transports.

It doesn’t have enough error checking, and bug fixing, but it mostly works well enough. It recovers from (some) malformed readings. It doesn’t recover from other errors (mostly communication related)


  • OS X or Linux
    • It may work with Windows, but I haven’t tested it.
  • Python 2.7.x 
    • It may work with others, I haven’t tested it.
  • python-vxi11

How to use

The script takes voltage readings at ~10s intervals, on the 100v range, and stores them in a SQLlite3 DB called readings.sqlite3 in the current working directory. If you want different behavior, look through the source code and make the necessary changes.

You MUST edit the file to configure the name of your VXI-11 gateway and GPIB address(s) of the devices you want to poll.

Finally, run the script, ie:



Since this script doesn’t do much error checking, it occasionally dies. In my experience, when it dies, it is because of a communcations timeout. In such situations, restarting the script is often enough for hours more logging.

I usually run it in a shell loop, so it restart automatically after a delay:

while true; do python; sleep 150; done

If you modify this script to communicate with your Keithley 2000 DMM over RS-232 serial, be aware that a problems with hardware/firmware before ~2007 can result in frequent communication failures.

The simple workaround is to modify the RS-232 cable, or the DMM’s own RS-232 port, to ensure that the RTS pin (#7) is not connected.

Continue reading

Upgrading ICS 8065 Firmware from 64-bit Windows 7

I got a pretty good deal on eBay for an ICS 8065 Ethernet GPIB Controller. When it arrived, I reset the network configuration by holding down the reset button on the back panel while turning on the unit and waiting 10 seconds. This set the unit to its factory default IP address of, so I could connect to it from a web browser on my laptop.


Once in, I found that the installed firmware was years out of date, and set out to update it. Unfortunately, the firmware can’t be updated from a web interface. It is necessary to use a Windows utility. I’m not really a Windows user, though I have a Windows machine in the house. Using it would require more fussing around with network connections than on my laptop, which I plugged directly into the 8065 while using WiFi to communicate with the rest of my network, and browse the web.

I didn’t even consider running the software in WINE, opting instead to use a 64-bit Windows 7 virtual machine on my laptop. Unfortunately, when I tried to run the updater program in the firmware update ZIP file I downloaded from the ICS Website I was met with an error that comdlg32.ocx wasn’t registered.

After a bit of googling, I found a solution, which I’m sharing here for anyone else who runs into this. Comdlg32.ocx is somewhat dated software. I don’t know if it was part of earlier versions of Windows, or whether it was the responsibility of applications to distribute it as part of their installer package. What I do know is that the ICS Firmware updater doesn’t have a Windows Installer, that comdlg32.ocx wasn’t included the zip file with the firmware, that it wasn’t anywhere on my system, and that I haven’t installed many other applications.

From there:

  1. I found a place to download a zipfile with comdlg32.ocx it that didn’t seem too dicey.
  2. I scanned the downloaded zip file with Windows Security Essentials to check for known malware.
  3. Unzipped the file, and saved it to C:\Windows\SysWOW64. The SysWOW64 directory is only present on 64-bit versions of windows, on 32-bit windows, you’d save it to System32. Oh, also, your Windows system folder might be something other than c:\Windows, which either means you knew what you were doing and where to find it, or that something horrible happened during your windows installation that you may have to relive a bit of now, on your own, without my help.
  4. Ran “cmd” as administrator to open a command line. You can click the windows/start menu, search for “cmd” then right click on it in the results and choose “Run as Administrator”
  5. In the command window, I issued the following command: “regsvr32.exe C:\Windows\SysWOW64\Comdlg32.ocx”

Once I did this, I could double click and run the “M805_update.exe” program without error and update the firmware.