Tektronix Oscilloscope Waveform Capturing For Linux ABOUT THIS PACKAGE: ------------------- This is a simple utility for capturing and plotting Tektronix TDS 2x0 curve data on a Linux (and other Unixs?) machine. You can find the home-page for this at: http://www.netroedge.com/~phil/tekscope This package consists of these files: README -- You're reading it! Makefile -- Type 'make' to use this file to create the serial port accessing binary executable from the 'dump_tek_curve.c' file. dump_tek_curve.c -- A simple serial program which is a hacked up version of someone elses serial port communication program. This is where the serial port is configured. Change "/dev/cua1" to your serial port (if different). plot_curve.sh -- The shell script which coordinates all the action. It uses the binary executable produced from the 'c' file above and the perl script 'plot_prep.pl' to produce some plot data and uses GnuPlot to plot the data. plot_prep.pl -- Adjusts the raw data to real time and voltage values, while at the same time producing a format favorable to GnuPlot. produced files: raw_tek.data -- 'raw' ascii output from dump_tek_curve. Essentially this is the serial transaction including the queries to the scope. tek.snapshot -- plot data prepared for GnuPlot produced from 'plot_prep.pl'. tek_screen.pbm -- GnuPlot's output graphic file. Use ImageMagick to convert/display this. TO USE: ------- * Type 'make' to produce the binary 'dump_tek_curve'. * Connect your communications expansion equipped scope up to your computer using a 'null-modem' type cable (not with a straight-through cable!). * Use the scope knobs to display the waveform (from channel 1) that you want to capture. * Type 'plot_curve.sh' to start the process of downloading, parsing, and plotting the waveform. (Takes about 10 seconds.) If you have the ImageMagick package installed, the plot will be displayed at the end of the process. SUGGESTIONS: ------------ * Scale the waveform vertically as much as you can on the scope screen before you capture the waveform. This will ensure good resolution. (Side note: scaling the waveform off the top and bottom doesn't seem to immediately clip the waveform... do some expirementing with this.) * Use the stop/run button on the scope to freeze the waveform. That way you will know what you will be getting. (The capture works fine while 'running', too.) * Use ImageMagick's 'convert' utility to make scale or save your captures to the format you want. For example, to save as a JPEG at 75% quality at 50% the size in a web-safe format, do this: convert -interlace none -quality 75 -geometry 50%x50% \ tek_screen.pbm tek_screen.jpg * Currently, only channel 1 will be captured. It is a simple matter of fudging around with the 'c' file to capture a math or other channel. Maybe I'll expand the capture ability in the next release... ADDITIONAL SOFTWARE: -------------------- These are some helpful software packages you will need to download if your machine doesn't already have them installed: GnuPlot -- As of when this was written, this is the current release: ftp://ftp.gnu.org/pub/gnu/gnuplot-3.5.tar.gz ImageMagick -- A very impressive array of image conversion and display utilities. (Kudos to the authors!) A couple flavors can be found here: http://www.sunsite.unc.edu/pub/Linux/apps/graphics/viewers/X/ FEEDBACK: --------- If you expand, patch, change, improve, make worse, or simply just find this very handy and cool -- email me! I can be reached at: phil@netroedge.com I'm interested in any difficulties or problems you may have, or confusion due to the way I've done something. Desired fetures is also good to know from people. Feedback is my only form of encouragement for projects like this, so if nothing else, let me know it worked OK for you. Thanks, and I hope you find this usefull! :') Phil ----------------------------------------------------------------------- Written (mostly) by Philip Edelbrock. For non-profit general use only. (C) Philip Edelbrock (Phil@netroedge.com), 1998.