Tektronics 200 Series Data Acquisition under Linux

Introduction

Using a TDS-200 series oscilloscope with the TDS-2MM communications/math module, you can download the waveform data through a RS-232 cable (a cross-over type cable [aka "null modem"?]).

When you buy a communications expansion module, you also get a book entitled "Programmer Manual: TDS 200-Series Two Channel Digital Oscilloscope" and (if like me) a corrupted floppy with a Windows acquisition program. ;') The book contains everything you need to communicate with the scope using a simple terminal program like "minicom".

What I've done is made a simple C program which queries the scope and outputs the data to standard output. Then a script parses the output (with help from Perl) and uses Gnuplot to plot the resulting data file.

Features:

  • Captures and plots waveforms directly off the scope in about 10 seconds. (Note: not in real-time! Unfortunately, the 9600 b/s interface is way too slow.)
  • Can save raw data in a portable format for import into other software packages (Matlab, MS Excel, etc.)
  • Save plotted graph for printing, web pages, etc.
  • TODO:

  • Better serial interface code. Works, but could be written better to handle cases when, for example, when no scope is connected or turned on. Also could use some more options/switches.
  • Nice GUI to easily set options for capturing data.
  • Make web page a little prettier. :')
  • Suggestions??? Please email them to me! phil@netroedge.com
  • News:

  • June 2nd, 1999 -- OK, I'm back at it, and I've been working with Rohan Tronson to produce a better tek-snapshot. Here's a working version w/o a working GUI tek_snapshot-1.5.0.tar.gz. You can now capture any channel, and we are testing to make sure it will work with other scopes (such as the TDS-320 and TDS-360).

  • April 14th, 1999 -- Version 1.5.0 is in the works. Currently, I've added much better command-line support for the communication app. Here's a peek:

    [phil@penn tek_snapshot-1.5.0]$ dump_tek_curve -h
    
            Usage:
                    ./dump_tek_curve [-h] [-channel <channel-name>] [-aq <mode>] [-ave <# samps>] [-stat]
    
                    Defaults: channel:CH1   Aquisition Mode: PEAK   Samples for Average: 16
    
    
    I also am working on a GUI tk/tcl interface to make the package a little more user friendly.
  • What's needed

  • TDS2xx scope with the communications or math module installed.

  • RS-232 cross-over (null-modem) cable.

  • Serial ports configured normally under Linux (dev file /dev/cuaX corresponding to the serial port)

  • GCC (or compatible C compiler), Gnuplot, Perl, Bash, etc.

  • More info

    Read the README file.

    Download:

    tek_snapshot-1.5.0.tar.gz

    tek_snapshot-1.0.0.tar.gz

    Samples:


    The familiar calibration waveform


    Typical television field scan line

    Feedback:

    Email me at phil@netroedge.com with any feedback you want.

    Related Projects:

  • Lm-sensors -- hardware health monitoring for Linux.


  • Copyright 1998 by Philip Edelbrock. Code for general non-profit use only.

    since October 7th, 1998.