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
. I'm using this scripts under Linux and OS X, but they should work on Windows as well.
Is there a special driver neccessary? I connected a DSOX2024A, no driver installed for USB\VID_0957&PID_1796\MY59125509 and the script says:
C:\temp>python screendump.py --list
no devices found
I'm having some issues with assignment of the save location could you give any tips? i am just getting
'filename must be specified'
Did you pass a filename to the script?
no im realy new to python so im not aware of how to do that and thanks for the tip
You need to run the script on the terminal, like described in the article. The desired filename is the last argument.