16. Using pen plotters              
16.0 Overview                   
It is possible to draw picture files saved using PC-PLOT-IV on a pen plotter. Use of the HPPLOT pen plotter driver is discussed in this section. 
16.10 Hewlett-Packard plotters             
HPPLOT is a program which converts Tektronix 4010/4014 format picture files into Hewlett-Packard Graphics Language (HPGL). The output of HPPLOT can be directed to a plotter connected to the serial channel of your computer (COMI or COM2), the line printer port (LPT1 or LPT2) or to a disk file. 
HPPLOT converts the Tektronix move and draw commands into the appropriate pen up/pen down and move absolute commands. The program also uses the built-in character set of the H-P plotter to draw ASCII characters. 
HPPLOT will run on an IBM PC or compatible with a CGA, MDA, EGA, VGA, or MCGA display board. It regiores approximately 22k bytes of memory and creates a 54 byte setup file the first time the program is run. 
Since the input file is operated on sequentially, there is no upper limit as far as picture size in HPPLOT. 
HPPLOT supports a serial interface (RS-232) Hewlett-Packard plotter directly. A serial plotter can also be driven from the parallel printer port if you install a parallel to serial converter on the printer port (Microfazer). HPPLOT does not support IEEE bus optput cards but HPPLOT can be used to create an HP-GL file which can be sent to the plotter by software supplied with an IEEE interface card. 
16.11 Hewlett-Packard plotter set"           
HPPLOT is an intelligent program. Even if you enter incorrect data in the setup menu, HPPLOT will attempt to find a serial baud rate that will allow it to 'talk' to the plotter. A standard plotter cable will work or even a simple 4 wire cable. 
  PC pin 
  Signal name 
  protective ground 
  Plotter pin 
    transmitted data 
  received data 
  signal ground 
Each model of Hewlett-Packard plotter has a setup switch on the rear. Refer to your plotter's installation manual for the correct configuration. The settings for a H-P 7470A plotter are shown below for reference. 
    Sl                   0 
S2                  0 
D/Y               Y 
A4/US           US 
Bl, B2, B3, B4 baud rate set (0001=2400 baud) 
  HPPLOT will operate the plotter correctly at the following baud selections:   
    110                 150                 300                 600 
1200               2400               4800               9600 
  16.12 Use of HPPLOT                          
  To run HPPLOT, enter one of the following 3 command forms at a PC-DOS prompt.   
C>HPPLOT <infile><cr> 
C>HPPLOT <infile><outfile><cr> 
  The HPPLOT main menu which is shown below will appear. The first time you run HPPLOT, select the following items by placing the wide cursor on the line for that item and depressing <cr> until the correct selection appears.   
      Output device 
Comm. rate 
HpPlot Release 2.0 (C) MicroPlot Systems Co.   
Input picture file 
  Output file 
  Lower left (P1) x [2503] 
  Lower left (Pl) y [2793] 
  Upper right (P2) x [102501] 
  Upper right (P2) y [74793] 
  Plotter scale x [40953] 
  Plotter scale y [31193] 
  Plotting speed 
  Output device (port) 
  Comm. rate if serial port 
  Number pens 
  File type 
  Tek 4010/4014 
      Ignore <cr><lf> in picture file 
ALT-P start plotting   
ALT-8 to stop plotting

   ALT-X exit to DOS 
  ALT -S save setup values 
When the setup items have been selected properly, depress ALT-S to save them in setup file so that they will be preset every time your run HPPLOT.     
      Input picture file     a file containing either Tek 4010             
                  or HP-GL commands. Always terminate a filename entry with a <cr>.         
      Output file         if you are writing the converted picture file to a file rather than to the plotter, enter a filename here and select FILE as output device. Terminate with <cr>.           
   Plx, Ply, P2x, Pty-  The coordinates of the lower left and upper right of the plotting region. The default setting is shown in square brackets. Using these settings, you can move and scale the plotted picture         
  Plotter scale- A Tektronix data file has a resolution of 4096 x 3119. The default scale for the plotter is set to this value. If you make the scale larger, the plot will get smaller.          
   Plotting speed-  The default 38 cm/sec is a good setting for new pens on paper. For older pens and plotting on transparent film, use a slower plotting speed.           
   Output device-  COM1, COM2, LPT1, LPT2, FILE. The actual output device where the plot will be sent to.           
   Comm. rate-  Select the comm. rate to match the one selected on your plotter.           
   Number pens-   Always 1 for this version since a Tektronix 4010/4014 does not have a color select command.           
   File type-  Tek 4010 or HP-GL. In the Tek 4010 mode, HPPLOT converts Tek 4010 commands to HP-GL. If you have a disk file with HP-GL commands in it already, HPPLOT will send it directly to the plotter without modification if you select HPGL mode.           
   Ignore <cr><lf>-  Some computer systems insert the command string <cr><lf> inside a graphic record which causes the plot to have extra dots or stray lines on it. Selecting YES may eliminate this problem.           

Once HPPLOT is set up, enter a filename on the first line. The file CHAPLIN is provided as a sample Tek 4010 picture and can be plotted. 
Depress ALT-P to actually plot the picture file. The start plotting block at the bottom of the screen will be highlighted during plotting. 
As soon as HPPLOT is started, it attempts to request the status of the plotter at the baud rate selected in the menu. If it is unable to receive the correct status message, the program 'beeps' and prints a message indicating that either the plotter is not connected or the baud rate is wrong. HPPLOT then resets the baud rate to 9600 and attempts to communicate with the plotter. It tries all of the other 7 settings in sequence. If the program finds a baud setting that will allow it to communicate with the plotter, that setting is used for the balance of the plotting session. 
  If the program is unable to communicate with the plotter, it is either off line, not turned on, connected to the other serial port, or the cable is incorrect. Recheck your installation manual for the plotter and the hardware in your computer to be certain that the port and plotter settings are correct. 
  As soon as communication is established with the plotter, it is initialized which will clear the error lamp, select pen 0, and move out to x=0, y=ymax. Picture files sometimes contain more than one page which are separated by page breaks entered when the file was created and HPPLOT will ask the operator if the first page is to be plotted. Depress Y or N. 
  If the plot is long or complex, a small message <XON > and <XOFF> may appear at the bottom right of the screen. This message simply tells you that the handshake between the plotter and HPPLOT is operating correctly. If the handshake were not operating properly, the input buffer on the plotter would be filled and plotting commands would be lost. When the buffer is overflowed, the error lamp also blinks. 
  As soon as the plot is complete, the cursor bar will be on item 1, input file. At this point you can enter a new filename to plot or exit to PC-DOS with an ALT-X. You can break out of the plotting mode before the plot is complete by depressing ALT-B. The 
  ALT-B message will be highlighted until the current plotting command is complete. Depending upon the command executed, an error may be created by quitting prematurely. The error wil be cleared before starting the next plot. 
16.13 Plotter pass-through mode 
  Certain mainframe-based software will support a pen plotter connected to one of its ports using a 'Y' cable. In this mode, the mainframe will send a unique command to the plotter which causes it to stop sending data on down the second half of the Y cable and interpret all of the data as plotting commands. 
  PC-PLOT-IV has a mode which simulates the 'Y' cable connection. If the remote host is connected to COMI, a Hewlett-Packard plotter can be connected to COM2 for the 'pass through mode'. 
  Plotter pass-through mode in PC-PLOT-IV automatically uses the channel which is NOT selected for communications in the ALT-S setup menu. If the plotter pass through mode is turned ON in the MISC Setup menu and the plotter baud rate has been selected correctly, reception of the correct command will cause all data coming into COM1 to be routed to COM2. This bypass mode will remain in effect until the escape sequence for exiting is received. 
    Enter pass through mode-plotter on             
    ESC . ( or ESC. Y                   
    Exit pass through mode-plotter off             
    ESC . ) or ESC . Z                     
  16.14 Pen plotter problems                 
Many plotters claim HP-GL compatibility but few actually deliver it. The following commands are used by HPPLOT and must be included in the commands emulated by a HP 'clone'.
 <esc> . E   Request status, returns plotter status and <cr> at end. HPPLOT looks for the trailing <cr> to determine if a plotter is connected.       
  The IN command initializes the plotter to its power on state. The 2 escape commands set it for XON/XOFF handshake mode.
SP n 
  Select pen. SP 0 puts the pen away and SP 1 selects pen #1.
  Lifts the pen off the paper 
  Puts the pen down on the paper 
PA x,y 
  Moves the pen from the current position to x,y. 
  Format used to send an ASCII label to the plotter. 
SC xmin,xmax 
 Sets the virtual scale of the plotting surface HPPLOT uses 4096 x 3119 virtual scale.    
IP plx,ply 
 Sets the position of the plotting area on the paper.     
SR .75,1.5; 
  Sets the default character size for 80 x 34 lines of characters. 
VS xx 
  Sets the plotting velocity 

If the plotter is a REAL HP and you get the message "Plotter not Connected", the problem is usually the switch settings, cable, or selection of the COM port number. 
If the plotter is a 'clone' HP and the no plotter message appears and you know the switches are set correctly and the cable and port are correct, usually the clone plotter either does not recognize the <esc> . E command or the IN; command. 
If the plotter operates but you get strange plots, try selecting <cr><lf> strip mode to YES. Since we cannot see a picture that does not plot correctly over the phone, we will need to have you send us a picture file that will not plot correctly on a floppy disk so that we can analyze the data. 
PC-PLOT-IV     Chapter 16    Pen Plotters  

Contents | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Appendix