Screenshots over USB from Agilent DSO-X 3014A

The Agilent (now known as Keysight) oscilloscopes of the 2000X and 3000X series have a built-in USB device interface which allows them to be controlled from a USB host capable PC. It is implemented as a USB Test & Measurement Class Device (USBTMC) and is usually used by National Instruments implementation of the Virtual Instrument Software Architecture (VISA).

However there exists free alternatives such as pyvisa/pyvisa-py for Python. These allow Python to communicate with SCPI (Standard Commands for Programmable Instruments) compatible devices over RS232/TCP-IP/USB. The Agilent 2000X/3000X series oscilloscopes provide the :DISPlay:DATA? to retrieve the currently view display data as a screenshot. So I wrote a small Python script to get the data and write it to a PNG file. You can download it here: screendump.py.

The make a screenshot ask the script to show all connected devices by

./screendump.py --list                                                                      
ASRL/dev/cu.Bluetooth-Incoming-Port::INSTR
ASRL/dev/cu.Bluetooth-Modem::INSTR
ASRL/dev/cu.usbserial-FTGNVWEW::INSTR
USB0::2391::6054::Unknown::0::INSTR

Select the appropriate device out of the list and ask it for a screenshot by

./screendump.py --device USB0::2391::6054::Unknown::0::INSTR screenshot.png

You will receive something like

Screenshot Example

Screenshot Example

. I'm using this scripts under Linux and OS X, but they should work on Windows as well.

Leave a Reply

Your email address will not be published. Required fields are marked *

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