Grab Your ‘Scope’s Screen From The Command Line

Many of us have oscilloscopes and other instruments with built-in digital interfaces, but how many of us use them? [Andrej Radović] has a Tektronix TDS2022 which can print its screen to any of its various interfaces, and he set about automating the process of acquisition with a Bash script.

The easiest interface to use was the trusty serial port — hardly the fastest but definitely the best supported. But how does one retrieve an image fired down a serial port? Most of the post is devoted to spotting file headers in a Bash script monitoring the serial port, and streaming the result to a local file. There’s a discussion of the various formats supported by the Tek, with an ancient PCX bitmap format being chosen over Postscript for speed. The result is a decent quality screen grab, making the ‘scope that little bit more useful and perhaps extending its life.

Perhaps your instrument isn’t a TEK, but the chances are you can still make it bend to your will from a PC. Try it, with the magic of VISA.

9 thoughts on “Grab Your ‘Scope’s Screen From The Command Line

  1. I’m gonna be that guy and say an ESP with a web interface is what this bad boy needs.

    I know the 555, or not everything needs a webui will pounce on me.

    But sorry not sorry, this guy accessible over WiFi would be awesome.

    1. CLACK-CLACK-CLACK. Swiiiish, zzzzzzz, zzz, zzzzzzzzzt, zzt, zt, swish, zzzzzzzzzzzzzzt, zzzzzzzzz, swiiiiiish. CLACK-CLACK-CLACK. goes the 7475A pen plotter. Ah, fond memories…

  2. I wrote something similar as a python script and it really is quite useful to be able to get screenshots and waveforms out of the scope as digital files, especially if you need the measurement parameters for another process.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

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