• Please review our updated Terms and Rules here

Tektronix 4662 plotter is Working!

Pen length (and weight) might be a contributor in pen skipping, but I don't believe I had any pen skipping when I made a youtube video on my Tek-Vectors channel six years ago:
Tektronix 4662 Plotter - drawing Snoopy the Red Baron

I have almost completed assembly of my Buffered GPIB Flash Drive v2 - and waiting for my order of the Pololu MicroSD adapter.

Trying to plot with the Buffered GPIB Flash Drive will be one of my first tests of the new design!
 
I found I needed to change my 4662 GPIB settings in green on these to pages in the User Guide:

4662 GPIB switch settings and parameters.jpg

I wonder if @RolexTM is using GPIB or RS-232 from his 4052 to the 4662 Plotter.

I have attached my latest BASIC program that works on my V2 Buffered GPIB Flash Drive connected to the 4662 optional GPIB port:

This program works with 4662 AND is likely compatible with the RS-232 port - but you need to test RS-232 Option 1. Enter the 4662 GPIB primary address or for RS-232 enter 40 at the first prompt.

After entering the plotter address you get a list of Flash Drive PICTURE files that can be plotted with this program.
However - some of these files are quite large and will take a huge amount of time to plot.


I recommend starting with Dragon, Mickey Mouse, Snoopy or Cheshire Cat files.

Since the 4662 can scale the input images - I decided to SET LOWER LEFT and SET UPPER RIGHT corners to 1/4 the size of the A or B size paper, plot a PICTURE, change the corner settings and repeat and got the following plot today:

Wizard Dragon Mickey Teapot Plot.JPEG

The text scales with the picture but I think I can use 4662 alpha-scale to increase the text size on the plot. Also - the first character is blurred or missing - so I will see what I can do about that. My program currently adds a space in front of the text - maybe removing the space will help.

Also - if you are using this program with GPIB - the plotter sometimes hangs the program while it is displaying the file menu - bizarre! Just press the BREAK key twice, then press the UDK 6 and press the BREAK key twice, then press the UDK 7 and the file display will start again. Hopefully I can figure out what is happening with the plotter - it is hanging the program when there is a FIND @5:filenumber command - very weird. I am consulting with my Flash Drive firmware designer @WaveyDipole about this issue - but I suspect it is a plotter firmware issue.

I believe this issue is limited to GPIB interface to the plotter - so RS-232 should not be affected.

My latest GPIB settings have configured the plotter for Low Speed - which the description in the user guide indicates may help with custom pen skipping. My plots above used a Faber Castell PITT Artist size F pen (0.5mm) but there was still a bit of skipping in these plots. I haven't 3D printed my redesigned pen adapter yet - and have wrapped my current 3D printed pen adapter in one level of painters tape to try to get a tighter fit in the plotter multi-pen holder.
 

Attachments

Last edited:
RS-232 will require different commands than GPIB DAB commands. The 4662 Users Manual does NOT summarize the plotter commands - but the Service Manual does. RS-232 commands have ESC characters and single ASCII character commands - but are different than 4010 series terminal PLOT 10 commands. GPIB MSA commands are shown as 4050 BASIC statements and MSA commands - which are the same thing using GPIB secondary addresses for the command. GPIB DAB commands do not use secondary addresses - they use single ASCII characters for the commands without ESC characters, but the commands are DIFFERENT characters than RS-232 commands. The Users manual even includes an appendix for 4662 Option 31 (an internal plotter option board to communicate with the Tektronix 4081 computer) using DIFFERENT RS-232 commands than any of the commands above! I will add the RS-232 commands to my BASIC program and even add the RS-232 Printer Interface address for those computers that do NOT have the Option 1 RS-232 in their ROM Backpack.
 
Hey,

At the museum right now, today is open door. This are the switch settings how the machine came. Who ever spots why the computer is temporarily housed where it is gets a free virtual beer.

IMG_7574.jpegIMG_7573.jpeg

IMG_7572.jpeg
 
So,

sorry, the images I post from the phone are always sooooo big, they do not look this way on my phone.

Anyways, my settings are
A - 1
B - 2
C - 0
D - 1

Which looks to be your default (at least that is what the tick off symbols suggest :D. Our plotter is using GPIB and is happily working together with our floppy drive and the multicart.

Now I am tempted to try the slow mode, we have a tiny bit of skipping too. It gets WAY worse with recycled paper, works okay with "normal" laser paper and best
results were achieved with some random sheets I ripped off a promotional gift HP notepad that were very smooth and almost a bit glossy.

Although the "speed" of the machine is one feature to show off. We had great fun today on the open house, explaining the
more technically versatile guests how the machine has no display buffer, what nice resolution the screen has etc etc. And we plotted some of the biorythm plots.
We need to install some fake reading device that scans your hand or something :D

Then, the museum hive brain is now set to find some rapidograph or isograph pens too.


Alex
 
I had great success changing from a Faber Castell F pen to an S 0.3mm pen today. Seemed like less skipping.

Laser Cannon Columbia, Tek Wizard and Sin X over X.JPEG
Tek Wizard and Sin X/X were done at low speed. Then I turned off the printer, changed the speed to high for Laser Cannon and Columbia. I think I will stay with high speed and this pen!

But I didn't cap the F pen yesterday and it appeared to dry out today before I changed to the S pen. I will now remove the S pen and cap it!

I also added an Alpha Scale command to double the print width and height of the PICTURE file name.
 
Last edited:
Thank you!

I am still working on my plotter program - it was not too hard to change from MSA commands to DAB commands. Right now I am working on RS-232 commands, which are based on PLOT 10 format graphics. I plan to have a single program that includes all three command sets be able to plot from the PICTURES directory and a couple of others like the PLOT-10 and SVG directories.

One of the exhibitors at VCF Southwest has an HP Plotter connected to a PC. He plots a photo that he has converted to vectors of visitors - I don't know what software he is using. He offered to bring an extra HP plotter to my 4054A exhibit last summer, but I knew I couldn't connect to an HP plotter with my original Flash Drive, but I could connect with RS-232. Now that my Buffered GPIB Flash Drive is working (other than the occasional hang that needs investigation) I plan to test more of my GPIB equipment, including a Tektronix TM5000 crate with three Tek plug-in modules.
 
I am still working on my single BASIC program to plot R12 vector pictures to 4662 and hopefully 4663 (but I don't have one of these to test) plotters using RS-232 or GPIB.
I already have 4662 GPIB DAB mode working in my program.

I have also been researching what causes a random hang in my BASIC program while listing the R12 picture files and using GPIB to connect to the Flash Drive and 4662 plotter.

I do see that the 4662 GPIB MSA command to the plotter for CALL DIGITIZE uses the secondary address of 27 - which is the same secondary address as the FIND command to my Flash Drive - but this is why I switched the 4662 GPIB from MSA command mode to DAB command mode.

Here are the 4662 programming manual http://www.bitsavers.org/pdf/tektronix/466x/070-4164-00_4662_Pgmg_Apr82.pdf pages for the 4662 Serial and GPIB MSA and DAB commands:

4662 RS-232 Serial command summary.jpg4662 GPIB MSA and DAB command summary.jpg




Notice the 4662 GPIB MSA command for CALL DIGITIZE is PRINT @pa,27: for the command followed by INPUT @pa,32:X,Y,Z (where Z=pen status up or down). The FIND @5:filenumber command to my Flash Drive is the same as the PRINT @pa,27: but has the additional filenumber variable which may be confusing to the 4662?

However - in 4662 GPIB DAB mode - there is no secondary address on ANY DAB command to the plotter, which is why all the DAB commands have @pa,32: where 32 is required to suppress the GPIB secondary address when that command is issued by BASIC to the GPIB bus.

I have tried various GPIB commands when my BASIC plotter program hangs - and my BASIC TLIST program which has no plotter commands also hangs randomly with the GPIB Plotter connected and powered on - but I think I will next try a PLOTTER OFF command before I start listing each of the picture files (FIND @5:# followed by INPUT @5,19:A$ to read the FAT32 file name and then extract and display the comment field for the name of the picture), followed by PLOTTER ON after loading the picture into RAM and before beginning PLOT commands. If that prevents the random hangs while displaying the file list - it should work with GPIB MSA and DAB commands - but I will stick with DAB commands anyway.

The 4662 RS-232 Serial commands other than MOVE and DRAW are slightly different than the PLOT 10 commands as they include a plotter ID: A, B, C, or D after ESC since the 4662 can be hooked in a chain of RS-232 devices including other plotters, 4010 terminals and a modem using RS-232 female and male connectors. In fact the 4662 default is the two RS-232 connectors - one labeled TERMINAL and one labeled MODEM. If the 4662 plotter is powered off - relays connected the TERMINAL and MODEM connectors so the chain is maintained to the other devices from the host computer. In addition the 4662 Programming manual indicates you must send serial commands to the switch selected plotter ID before it will respond to any MOVE or DRAW commands.

I am currently reading the 4662 Programming manual section on RS-232 input rate control to prevent overrunning the 4662 data buffer. I will need to design my program to work with the standard 4662 that only had a 2KB buffer that could only hold 1400 characters.

There are only three modes for host to 4662 plotter rate control:
  1. Continuous (BAUD RATE only) - the manual indicates 1200 baud can be used for plots with less than 250 commands :(
  2. XON/OFF - only included on 4662 with multiple pen Option 31 :(
  3. Block Mode - provides both rate control and error detection but requires host partition the graphics MOVE and DRAW commands into blocks with checksums and wait for plotter to send an acknowledge before sending the next block. The manual says room for two blocks in the 4662 buffer RAM is needed and the maximum block size is 125 characters allowing a maximum of 113 data characters.
I will be working on 4662 RS-232 Serial Block Mode support for ALL 4662 plotters in my BASIC program and therefore will have to support the maximum block size for the Standard 4662 plotter.

The 4662 programmers manual has a 4051 BASIC program that converts X,Y,Z to 12-bit PLOT10 format for RS-232 serial interface!
This page also recommends setting the 4662 for Copy mode to have the same aspect ratio as the 401x terminals - and for the 4050 series.

GPIB interface does not use 12-PLOT10 format data - it uses GDU's (X=0-130, Y=0-100) and does not have a Copy mode.

The 4662 plotter has a joystick used for digitizing points and setting the paper size with two front panel buttons "LOWER LEFT CORNER" and "UPPER RIGHT CORNER.

I think line 221 in the conversion program should read X=X/130*4095.


4662 RS-232 BASIC convert XYZ to PLOT10.jpg
 
Last edited:
My new 4050 BASIC program for the plotter could also be used to display R12 vector images on any 401x terminal using RS-232 interface with minor changes to the commands to remove the plotter ID byte.

There is also a 4662 pen speed command in both RS-232 and GPIB modes - I may experiment with this command and see if it eliminates the pen skipping using the Faber Castell Pitt Artist pens.
 
Last edited:
The 4662 Programming Manual code for converting X,Y,Z to PLOT10 may have worked, but I could not get the Option 01 RS-232 COMM to communicate with my 4662.

I searched the web for Tekniques articles on 4662 and none of them included programs.

I then searched my Tektronix 4051 directory on my computer and found the 4051 DIAGNOSTIC programs I had posted back in July of this year included a 4662 Plotter RS-232 Test and a 4662 GPIB Mfg Test BASIC programs. All these diagnostic programs were written by J.B. Matthews in 1979. There were a couple of these programs that included 4051 CALL "EXEC" assembly code - but not for the 4662 programs.

I examined and made notes of how his 4662 RS-232 program commands to the 4662 worked.

One of the tests involved changing the plotter four switches on the rear panel - and not having to cycle plotter power!

I decided to try the 4662 Plotter RS-232 Test - the program prints the following on the CRT:

Code:
4662 RS-232 TEST PROGRAM.

Set back switches to 1221.
Reset the 4662.
Type a RETURN when switches are set.

I set the switches in the back of the plotter to 1221.

I like the way each switch makes a slightly different click when it reaches 0.
This makes it easy to change the settings when it is difficult (dark) to read the switches.

There is no reset switch on the 4662 so I turned off the power and then turned it back on.
I then pressed RETURN on the 4054A keyboard and nothing happened.

I pressed a couple of the function keys and nothing happened.

I tried typing an RS-232 plotter command:

PRINT @40:"<ESC><FF>"

This should HOME the pen to the top left corner and nothing happened.

I typed the command to see the Option 1 RS-232 COMM port settings:

CALL "PRLIST"

and saw that the baud rate was set to 300 7N2 - and the four switches set the plotter for the same rate.

At this point I wondered if the Tektronix 25-pin cable was working.

I found one of my old posts that indicated I used a red Laplink (vintage PC to PC program and cable to copy files between PCs) - the cable provides a TX to RX crossover connection. Both ends of the Laplink cable are female with a 25-pin and 9-pin DB connector on both ends. I plugged a one end of the Laplink cable into the 4662 modem RS-232 25-pin male port and the other end into the Tektronix 25-pin cable. The other end of the Tektronix cable was plugged into the female RS-232 connector in the ROM Backpack of the 4052A.

I ran the 4662 RS-232 TEST PROGRAM again - and now it worked! Here are my photos of various screens of this program (yellow box around function key code, blue around status word results):

IMG_3058.JPEG

IMG_3055.JPEG

IMG_3057.JPEG

The RS-232 plotter tests also print text and draw - but I was having some Faber Castell pen issues - but got this RS-232 plot of function keys 1 (draws a frame) and 2 (alphascale, rotate and font)

IMG_3068.JPEG

Since I had both RS-232 and GPIB cables connected I decided to run the DIAG 4662 GPIB MFG TEST program which had even more function key tests:

IMG_3062.JPEG

Resulting in this plot
IMG_3065.JPEG

Armed with many examples of 4050 BASIC code for the 4662 plotter using both RS-232 and GPIB MSA, these two MFG Test programs were very informative.

The 4662 RS-232 does NOT support hardware or software handshake - so the manual indicates you could lower the baud rate, but still overrun the tiny buffer in the original 4662 plotter. The manual indicated a BLOCK based protocol would work at all baud rates, and outlined what the host program would need to do but gave no example program. Now I have a working example of using the BLOCK protocol in the 4662 RS-232 Test BASIC program.

The 4662 GPIB interface is the easiest to use in MSA mode - but I am still encountering issues with the program hanging while simply accessing the Flash Drive to fetch and display file names. I need to try my program using my original Flash Drive - to make sure it is not something in the Buffered Flash Drive hardware or firmware. My 4662 program currently works better with GPIB DAB mode - much fewer hangs.
 
The 4662 RS-232 Plotter Test program had a short 30 character block that did not overflow the plotter 12-bit checksum calculation - so this example did NOT illustrate the full checksum code.

I created a short 4050 BASIC program to try to duplicate the checksum value for BLOCK MODE.

The 4662 User Manual page 2-24 had this explanation for the checksum in BLOCK MODE - indicating when the 12-bit accumulator exceeds 4095 - subtract 4094:

1765478319215.png

This does NOT agree with the 4662 Programmers Reference (April 1982) page 2-13:

1765478612663.png

My experimentation with changing the data in the BLOCK in the 4662 RS-232 Plotter test from:
"ABCDEFGHIJKLMNOPQRSTUVWXYZ" to "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ"
which increased the total block size from 30 characters to 56 characters due to the BLOCK START "(" and BLOCK END "<ESC>A)" characters that are also part of the checksum, according to Figure 2-8.

I edited the 4662 RS-232 Plotter Test program and my experiment determined the 4662 Programmers Reference was correct: on a character by character accumulate - if the value is >4095, subtract 4095 from the total and continue the character accumulation until done.

Since the 4662 RS-232 Plotter Test program used a pre-calculated checksum - I wrote a simple BASIC subroutine to compute the checksum of the data string D$ which included the BLOCK START, plotter commands and BLOCK END as shown in Figure 2-8 above:

Code:
410 REM BLOCK checksum calculator subroutine
420 C=0
430 FOR I=1 TO LEN(D$)
440 A$=SEG(D$,I,1)
450 A=ASC(A$)
460 C=C+A
465 C=C-4095*(C>4095)
470 NEXT I
520 REM convert C to ASCII characters
530 C$=STR(C)
540 RETURN

Here is my 4054A running the entire calculator program - listed after the results of checking the Figure 2-8 example and my double text 4662 Plotter Test example (input BLOCK was printed above the checksum result with the R12 CALL "PRINTS" which prints control characters as an underlined character so <ESC> is Ctrl-[

4662 Checksum calculator.JPEG
When I ran my modified 4662 RS-232 Plotter program with the double alphabet data in the block and 108 as the checksum, the plotter drew the double alphabet!

I was also able to verify that the BLOCK SIZE is a maximum value and shorter blocks do NOT need to be padded to that block size - as shown in my next photo where I REMarked the original BLOCK commands in lines 1240 and 1250 and added my double alphabet block with a BLOCK SIZE maximum of 125 bytes and sent a checksum after the BLOCK END of 108 bytes.

When you run this 4662 Plotter Test - it clears any plotter errors, then reads and prints the buffer size and firmware version and then prints "Press a key to select a test."

I then pressed UDK (function key) 3 and after the 56 characters were received by the plotter at 300 baud - the plotter began printing the double alphabet and sent the acknowledge character A back to the host 4054A

4662 Plotter Test with double alphabet.JPEG

I will now add this BLOCK MODE code to my 4662 Plotter program that will support GPIB and RS-232 interfaces.

The Option 1 RS-232 COMM port is bi-directional, but I also want to support the 4051 and 4051 Printer Interface ROM Pack and @jdreesen's 4054 MFM hardware option to add the 4052 Printer Interface. Since the Printer Interface is send only with no handshake, I may have to reduce the baud rate from 1200 if the Printer Interface is used. I will be testing my program on my 4054A and 4052 - so if it works on both Option 1 and Printer Interface and GPIB it will be a truly universal 4050 BASIC program to plot any of the R12 graphics images!
 
Here are the handwritten EPROM labels on the one 4662 plotter. That one also has a small ATN/DAV HOLDOFF board wired to the main PCB.

View attachment 1032658

View attachment 1032659

View attachment 1032660

Interesting little board labeled ATN/DAV Holdoff.

I looked this up in the 4662 service manual 070-1933-01_Tektronix_4662_Interactive_Digital_Plotter_Service_Manual_Jul83.pdf and I see a schematic for this board on sheet A1-2 of the 1983 manual and it indicates the schematic is for main board 670-4102-02 and up. My main board looks like yours but without the bodge board and wiring.
My 4662 plotter board doesn't have the DAV-ATN bodge board.JPEG


Reason I am interested in this ATN/DAV board is the description in the service manual for this circuit:

1770735967307.png

This may be the reason my GPIB Plotter program hangs when my Flash Drive is quickly being accessed to read file headers.

The Flash Drive ATMEGA 1284 CPU is faster than the 800KHz Motorola 6800 CPU in the plotter, and my 4054A uses the TI 9914 GPIB which is blazing fast, so the plotter code doesn't have enough time to process the ATN sequence to determine whether it should respond.

Looks like I may need to breadboard the ATN/DAV circuit and modify my 4662 main board to add a hardware delay after every ATN sequence :( so the plotter CPU has enough time to process the primary and secondary address.

Here is the schematic page - too bad they don't show the circuit before this mod, but it appears this board is wire-ORed to NFRD to keep it asserted low for 3 msec when ATN is asserted and reset when the A/DENABLE-0 signal is asserted by the GPIB REAR PANEL SWITCH A is high.

1770737181559.png
 
I am ordering the parts to build a breadboard of the ATN/DAV HOLDOFF circuit, but I cannot identify the 0.47uF C2 type of capacitor.

1770851482804.png

Although this HOLDOFF board is in the schematic, I don't see the parts list in the service manual.

Anyone hazard a guess as to what kind of capacitor I am looking for? @daver2

I am ordering an 0.47uF 5% tolerance 50V metallized film capacitor and a 23.2K 1% metal film resistor along with the 7438, 74123 (although I see 74LS123 on @glitch's PCB) and an 0.1uF ceramic cap for the HOLDOFF board.
 
Last edited:
I am ready to wire up a breadboard of the ATN/DAV circuit - but wondered how the board was connected to the main Plotter board.

Here is the Plotter board layout diagram in the corner by the GPIB connector:

1778780623022.png

I yellow highlighted a screw that must be used for ATN/DAV board mounting.

The ATN/DAV schematic in the lower right corner of page A1-2 shows the board is connected to (based on @gslick ATN/DAV board photo)

ATN/DAV Board signal connector P1 Pin / IC and IC pinPlotter Board IC & Pin / signal name
P1-1 / GND
P1-2 / U3 pin 3U205-7 / NFRD-0
P1-3 / +5V
P1-4 /U101-10 / ATN after debounce buffer
P1-5 /A/DENABLE-0

incomplete post - will finish later
 
Last edited:
Table 4-6 in the 4662 Service Manual contains the following information for the ATN/DAV Holdoff connections to the 4662 plotter main board.

I highlighted the A/DENABLE-0 text in GREEN.

P1 Wire color in @gslick photosATN/DAV Board signal connector P1 Pin / IC and IC pinPlotter Board IC & Pin / signal name
BROWNP1-1 / GNDU205-8 / GND
REDP1-2 / U3 pin 3U205-7 / NFRD-0
ORANGEP1-3 / +5VU205-16 / +5V
YELLOWP1-4 / ATNU101-10 / ATN after debounce buffer
GREENP1-5 / ATN/DAV board ENABLE-0U201-9 / A/DENABLE-0

REAR PANEL ROTARY HEX SWITCH A bit 4 schematic pg A1-1
(this bit previously unused for GPIB)

SWITCH A Bit 4 MUST be ZERO to ENABLE the ATN/DAV mod.


Set SWITCH A bit 4 = 1 to DISABLE the ATN/DAV mod.

The service manual page 5-16 describes the circuit and says when SWITCH A bit 4 is set high (true) - this ATN/DAV Holdoff board is enabled.

This means I MUST CHANGE MY SWITCH A setting from 0 (High Plotting Speed) to 4 (High Plotting Speed + ATN/DAV Holdoff ENABLE) or 5 (set bit 1 to change the CR Effect to CR-LF).
In my previous post in this thread on my GPIB SWITCH settings were 8-4-0-2 : https://forum.vcfed.org/index.php?threads/tektronix-4662-plotter-is-working.73491/post-1478020

I had set the plotter speed to low and disabled MSA addressing thinking they might help solve my 4054A hang problem.

Now I believe I need the ATN/DAV board and want the plotter to run at High Speed and ENABLE MSA, so my new switch settings will be 5-2-0-1.

The only difference in my new GPIB settings and @RolexTM a setting of 1-2-0-1 is the SWITCH A setting of 5 to ENABLE the ATN/DAV board in addition to setting the GPIB CR Effect to CR+LF (bit 1).

I don't believe @RolexTM needs to add the ATN/DAV mod to the museum 4662 since his 4052 computer has the identical GPIB discrete circuitry to the 4051 - so unless he sees a GPIB communication issue or 4052 hang while accessing the 4907 or Flash Drive or other fast GPIB device.

I plan to assemble the ATN/DAV board on a small breadboard tomorrow and test the ATN/DAV Holdoff board with the board ENABLED and DISABLED to verify that the ATN/DAV Holdoff board solves my 4054A hang issues while accessing the Flash Drive.
 
Back
Top