Skip to content

marcj71/utilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

utilities

tools and scripts to make measurements easier

An oscilloscope is an indispensible piece of equipment. It really proves its value if you can easily capture screenshots and put them in reports or on the web. Modern digitizing oscilloscopes often have one or more interfaces to do this. This repository has several scripts you can use to automate the process, so you don't have to press any buttons, mess with USB thumb drives. In addition, the scripts will put a timestamp on the PNG images and allow you to add a name.

The scripts all work the same: call the script from the command line, optionally followed by a description (without spaces). Upon success, they will print the name of the resulting PNG image to stdout, ready for cutting and pasting. Example:

> tekscreen serial-port
tek_2019-02-04_14-48-30_4.1-serial-port.png

You will have modify each to work with your oscilloscope, as mentioned below.

rigolscreen

This Bash script works with Ethernet-connected Rigol oscilloscopes. Modify the IP address in the script. The oscilloscope usually reports its IP address after powerup.

Uses netcat, tail, and ImageMagick convert.

Note that this script works with Rigol spectrum analyzers as well.

tekscreen

This Bash script works with Ethernet-connected Tektronix oscilloscopes. Modify the IP address in the script. The oscilloscope usually reports its IP address after powerup.

Uses wget to download the screen image from the built-in web server. Again, the advantage w.r.t. to the click-and-save method is that the file is timestamped and named immediately.

tekusbscreen

This Python 3 script downloads a screen capture from a USB-connected Tektronix oscilloscope, such as a member of the MDO3000 family. Setting it up can be a bit more tricky than the other utilities. These are the dependencies for Linux:

  1. Install PyVISA (sudo apt install python3-pyvisa)
  2. Install PyVISA-py (sudo apt install python3-pyvisa-py or pip3 install pyvisa-py). Note that you don't need the NI VISA libraries if you use this package.
  3. Install PyUSB (pip3 install pyusb)
  4. Uncomment the line rm.listresources() to find out how your device should be addressed. If you get an error saying that the serial number cannot be read ('Found a device whose serial number cannot be read. The partial VISA resource name is...'), look at this instruction. Here's what I did, since I was already in the adm group and figured that's rooty enough:
    1. Created /etc/udev/rules.d/50-usbgroup.rules with only this line in it: SUBSYSTEM=="usb", MODE="0666", GROUP="adm"
    2. sudo udevadm control --reload
    3. sudo udevadm trigger
    4. No need to log out, this will pick up the changes immediately.
  5. Re-comment out the line and change the ID string.

About

tools and scripts to make measurements easier

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published