Is it possible to pull RS232 HPGL data from my old Tektronix 2211 to Linux? - Page 1
Forum section: electronics / testgear

author: cdev
author_rank: Super Contributor
timestamp: March 23, 2015, 03:33:17 am
content: Maybe using Wine?I have an old 80s era Tek 2211 DSO which works well, however Ive been unsuccessful so far in being able to get data out of its screen print to plotter feature. Does anybody here have any experience with doing this?I'm trying to use Minicom , Putty etc. just to verify its working. I'm using a USB/Serial converter, which has always worked for me before, but perhaps that is the problem.There is very little on this particular unit on the net.Any pointers (probably experience with Tek scopes from around the same period would apply) Thank you!Edit:I've found what appears to be ancient "Grabber II" software on their site. How old? Windows 3.1 eraWe'll see.

author: georgd
author_rank: Regular Contributor
timestamp: March 23, 2015, 09:57:57 am
content: Try to push PLOT/PRINT button on side panel and then watch the activity (with scope) on serial port Tx (3) pin, if not see anything try to playing with hadshaking options.Simplest case is to set XON/XOFF handshaking protocoll.Georg

author: AudioplatinumService
author_rank: Contributor
timestamp: March 23, 2015, 11:21:27 am
content: HiI have similar problem and now I am in fight with screen capture from my Tektronix AM700 Audio measurement set. Almost same situation, Tek has serial interface for printer (com1) with max speed of 38400 8,n,1 and when I push print I am able to get data to serial interface. After this, I try software "PrintCapture" on Windows system, and I get nice image.xon/xoff must be switched on for serial, without I got garbage data and damaged image.Now, I wish all this on Linux with Raspberry Pi. I think we can solve this problem with virtual printer from CUPS.In nex few days I have to find some solution for this.Cheers,Damir

author: Fraser
author_rank: Super Contributor
timestamp: March 23, 2015, 12:21:30 pm
content: May not be of any help but IIRC you can use the KE5FX GPIB toolkit to plot the data that is in HPGL format.http://www.ke5fx.com/gpib/readme.htmIt isn't just limited to GPIB applications as it will operate with a HPGL format GPIB-RS2323 converter.Aurora

author: MarkL
author_rank: Unknown
timestamp: March 23, 2015, 05:32:03 pm
content: Quote from: Aurora on March 23, 2015, 12:21:30 pmKE5FX is windows only, unless the OP wants to port the source code to Linux.Assuming you can get the HPGL to your Linux box, there's two packages I've used:http://www.gnu.org/software/hp2xx/http://service-hpglview.web.cern.ch/service-hpglview/Of these I use hp2xx the most, and it's included in a lot of distro repositories. The CERN viewer does not work very well for me on HP spectrum analyzer output.It shouldn't be too hard to catch the HPGL characters as they spill out the back RS232 port of your equipment. It's readable ASCII. Even a simple "cat /dev/ttywhatever > hpgl.out" should work after you set up the port with stty.

author: AudioplatinumService
author_rank: Contributor
timestamp: March 24, 2015, 02:12:30 pm
content: I made some success with my Tek AM700.I can push "PostScript" file to print on Tek, and I can easy catch itwith simple commandcat /dev/ttyUSB0 > /file.psNow I have to make somekind of deamon who lisen on ttyUSB and catch file when I push print.Maybe someone of you have some idea how to make "deamon" or script in bash?Cheers,Damir

author: macboy
author_rank: Super Contributor
timestamp: March 24, 2015, 03:08:07 pm
content: Quote from: AudioplatinumService on March 24, 2015, 02:12:30 pmPostscript output should begin with#!PSand end withshowpage(check a sample of output from your instrument). So in bash, you would have a while loop reading every line from the tty waiting for "#!PS". When found, create a new file and start writing lines to it, until you see "showpage" then close the file. Save this as a script and launch it in the background using &.

author: MarkL
author_rank: Unknown
timestamp: March 24, 2015, 03:50:13 pm
content: Quote from: macboy on March 24, 2015, 03:08:07 pmPostscript should start with "%!PS-Adobe-3.0" (look for "%!PS-" since 3.0 is the version) and end with "%%EOF", but absolutely look at whatever the AM700 is producing and conform to that.You might also want to add a timeout so that the script is not waiting forever for the EOF in case something goes wrong with the transfer.

author: MarkL
author_rank: Unknown
timestamp: March 24, 2015, 04:31:42 pm
content: Here's a starter script you can try that looks for %PS- and %%EOF. The timeout is 30 seconds and it sits in a loop forever. Embellish as desired.Run like this: scriptname < /dev/ttywhatever &Code:#!/bin/shwhile true; doread[[ "$REPLY" != %!PS-* ]] && continueout="out_$(date +%F.%H%M%S).ps"echo "capturing postscript to $out..." 1>&2echo "$REPLY" > $outwhile true; doread -r -t30 || {echo "read failed." 1>&2break}echo "$REPLY" >> $out[[ "$REPLY" == %%EOF ]] && breakdoneecho "capture done." 1>&2done

author: AudioplatinumService
author_rank: Contributor
timestamp: March 24, 2015, 05:03:15 pm
content: Yes,Tek produce PS file with " %!PS-Adobe-1.0" on begin, and with " %%Trailer" on end. I will try now script from MarkL.Thanks!!!Damir