home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / reference / amiga_mail_vol1 / printer / troubleps < prev    next >
Text File  |  1990-01-26  |  9KB  |  236 lines

  1. (c)  Copyright 1989 Commodore-Amiga, Inc.   All rights reserved.
  2. The information contained herein is subject to change without notice, and 
  3. is provided "as is" without warranty of any kind, either expressed or implied.  
  4. The entire risk as to the use of this information is assumed by the user.
  5.  
  6.  
  7.  
  8.                    Troubleshooting PostScript Printers
  9.  
  10.                            by Bryce Nesbitt
  11.  
  12.  
  13.  
  14. Using a PostScript printer with the Amiga for the first time is a straight
  15. forward affair but there are some difficulties that you may run into.
  16. Some laser printers use a default handshake which won't work with the Amiga.
  17. Several companies have reported customer support headaches caused by mismatched 
  18. handshakes.  This article discusses how to set handshaking and baud rate
  19. configurations on PostScript printers for the best results with the Amiga.  
  20. If you have a PostScript application, you may want to reproduce the information
  21. given here in your user's manual.  The PostScript examples in this article
  22. have been tested on laser printers made by Apple, NEC and A.S.T.
  23.  
  24. Interface
  25.  
  26. We recommend that you use the serial (RS-232) interface with your PostScript 
  27. printer.   PostScript is bi-directional - that is, the printer can send error 
  28. messages and other information back to the host.  While the Amiga's parallel 
  29. port is also bi-directional, the parallel port on a typical laser printer will
  30. not be.  So use the serial port if possible.  The required cable is simple.  
  31. Wire the two serial interface connectors as follows:
  32.  
  33.  
  34.                Lauren, put artwork here.
  35.  
  36.  
  37.  
  38.  
  39. Preferences
  40.  
  41. Some problems occur because the user has set Preferences incorrectly.  The 
  42. Preferences serial port parameters should be set to 8 data bits, 1 stop bit, 
  43. Xon/Xoff handshake, no parity and either 1200 or 9600 baud depending on the 
  44. setup of your printer.  On most printers, the 1200 baud setting is not 
  45. adjustable while the 9600 baud setting is fully programmable.  Set the 
  46. printer and Amiga to 1200 baud if you are having communication difficulties.
  47. There is less to go wrong this way.
  48.  
  49.  
  50. Handshake
  51.  
  52. Another common problem is the inability to print complex documents.  Often,
  53. when a simple document is printed it works fine but when a complex document 
  54. is printed, the printer produces no output.  In most cases, this is due to a 
  55. handshaking problem and can be corrected by matching the handshake between the
  56. Amiga and the printer.
  57.  
  58. To find out what kind of handshaking your printer uses run the PostScript
  59. program shown below.  Use a text editor like emacs, ed or notepad to type 
  60. in the program:
  61.  
  62. -------------------------  Lauren this is code ----------------------------
  63.  
  64. /Helvetica findfont 20 scalefont setfont
  65.  
  66. 40 200 moveto
  67.  
  68. statusdict begin
  69. 25 sccbatch
  70. (The Options number is ) show
  71. 10 string cvs show
  72. (.  The baud rate is ) show
  73. 10 string cvs show
  74. (.) show
  75. end
  76. showpage
  77.  
  78. ------------------------- End of code ---- ----------------------------
  79.  
  80. Save the file as "shake" and exit the text editor.  From the CLI, copy the 
  81. shake file to the serial port with a command such as "copy shake ser:".  
  82. This will send the PostScript program to the printer where it will be run.
  83. The printer should print a sheet of paper.  If nothing seems to happen, cycle 
  84. the power on the printer, wait a moment, and try again.  The output should
  85. look like this:
  86.  
  87.  
  88. The Options number is 0.  The baud rate is 9600.
  89.                     ^
  90.                    [Lauren, use the artwork here...] 
  91.  
  92. If your options number is in the range of 0-3, the handshake is properly set
  93. to Xon/Xoff.  If your options number is in the range of 4-7 there is a problem.
  94. The printer is set to DTR handshake (DTR goes low when the printer's buffer is 
  95. full).  This won't work well with the Amiga.
  96.   
  97. The options number is interpreted as follows:
  98.  
  99.   0 or 4    Ignore parity 
  100.   1 or 5    Check for Odd parity
  101.   2 or 6    Check for Even parity
  102.   3 or 7    No parity
  103.  
  104. For the Amiga, options should be set to 0.
  105.  
  106. Some printers have switches or front panel controls for the options and baud
  107. rate.  If you have one of these, look in your manual for the correct settings.
  108. Other printers require a PostScript program like the one given below.  Replace
  109. BAUD and OPTIONS with the numbers you wish to set.  To start with, use 0 for
  110. options and 1200 for the baud rate.
  111.  
  112. ----------------------Lauren, code begins here -------------------
  113. serverdict begin 0000 exitserver
  114. statusdict begin
  115. 25 BAUD OPTIONS setsccbatch
  116. end
  117. ----------------------Lauren, code ends here ----------------------
  118.  
  119. Type the program in using your text editor and run it by copying it to the
  120. ser: device as described above.  This will change the internal baud and options
  121. settings.  The settings will stay in effect even if you turn off the power.
  122. You should not change settings more often than necessary, though.  The 
  123. EEPROM device that stores the settings wears out after about 10,000 uses.
  124.  
  125. After running the program, either send a CTRL-D to the printer or wait 30 
  126. seconds for the changes to take effect.
  127.  
  128. More Speed
  129.  
  130. The 9600 baud default of most laser printers is not very fast.  Printers with 
  131. PostScript 38.0 and above can be set to higher baud rates.  See your printer 
  132. manual for the exact list of baud rates supported.  Typical legal values are: 
  133. 1200, 9600, 10473, 11520, 12800, 14400, 16457, 19200, 23040, 38400 and 56700.
  134.  
  135. 19,200 baud is the recommended speed for use with the Amiga.  This speed can 
  136. be set with the same PostScript program that sets the Options number.
  137.  
  138. PostScript Programming
  139.  
  140. Copying files to ser: is not the best way to run your PostScript programs.
  141. If you want to experiment with PostScript, it is much better to use 
  142. PostScript's interactive mode.  Any terminal emulator or modem program should 
  143. work.  Set the baud rate, parity and stop bit settings to match those of the
  144. printer, then follow these steps.
  145.  
  146. First, type one CTRL-D to the printer (hold "CTRL" and press "D").  This will 
  147. end any current job the printer is working on.  If the printer is an Apple 
  148. LaserWriter, the flashing activity light should stop.
  149.  
  150. Next type the word "executive" followed by a return.  If all works well, you 
  151. will be in PostScript's interactive mode.  You should see a copyright message.
  152. To read out the current settings, type in the following.   What you type will 
  153. be shown in courier-boldface, what postscript types back is in courier.
  154.  
  155. ------------------------------Lauren, code starts here-----------------
  156. ^D
  157. executive
  158. PostScript(r) Version 47.0
  159. Copyright (c) 1984, '85, '86, '87 Adobe Systems Inc.
  160. Copyright (c) 1981 Linotype     All Rights Reserved.
  161. PS>
  162. PS>statusdict begin
  163. PS>
  164. PS>25 sccbatch
  165. PS>=
  166. 0                    ;<- mode byte
  167. PS>=
  168. 9600                     ;<- baud rate
  169. PS>
  170. PS>end
  171. PS>quit
  172. ^D
  173. ---------------------Lauren, code ends here -------------------------
  174.  
  175. This sequence prints out the options and baud rate just like the
  176. previous program.  Don't forget the CTRL-D at the end.
  177.  
  178. Here is a brief description of the code.  The "statusdict begin" tells
  179. PostScript you wish to access functions from the special status dictionary.  
  180. The "25 sccbatch" line first pushes the number 25 on the stack, then executes 
  181. "sccbatch".  The 25 is a parameter to sccbatch indicating you want information
  182. about the 25 pin RS-232 port. The sccbatch operator leaves two numbers on the 
  183. stack.  The topmost will be the serial mode byte, the next will be the baud 
  184. rate.  The "=" command reads the top number from the stack and prints it to 
  185. your terminal.  In this case, the printer was configured for mode 0 and a baud
  186. rate of 9600.
  187.  
  188. You can multitask your favorite editor with the terminal program.  Prepare the 
  189. PostScript file in the editor.  Then to test your program, send the file to 
  190. the printer with the "send ASCII" option of the terminal program. 
  191.  
  192. In interactive mode, typing CTRL-T will produce a status report from the 
  193. printer.  CTRL-C will abort any currently executing job.  CTRL-D will end 
  194. the current job.
  195.  
  196.  
  197. A Sample Progam
  198.  
  199. No article about PostScript is complete without a typesetting example. 
  200. Here's mine:
  201.  
  202. --------------------------Lauren, code begins here------------------------
  203. /showit %stack: (string)
  204. {0 0 moveto show} def
  205. /oshowit %stack: (string)
  206. {true charpath stroke} def
  207.  
  208. /Helvetica findfont 100 scalefont setfont
  209. 150 150 translate
  210.  
  211. .90 -.10 0 {setgray (Amiga) showit 10 rotate} for
  212.  
  213. 1 setgray (Amiga) showit
  214. 0 setgray 0 0 moveto (Amiga!) oshowit
  215.  
  216. showpage
  217. ------------------------Lauren, code ends here-------------------------
  218.  
  219. [Lauren, insert artwork here]
  220.  
  221.  
  222. Remember, to get the best results with PostScript you have to set Preferences 
  223. to the correct values.  You must also make sure the printer uses the right 
  224. kind of handshake and the right baud rate.  We recommend that you connect 
  225. PostScript printers to the Amiga's serial port.  If you need to make a serial 
  226. cable follow the wiring diagram shown above.  By following these steps your 
  227. PostScript print outs will be trouble-free.
  228.  
  229.  
  230. References
  231.  
  232. Adobe Systems, Inc.  PostScript Language Reference Manual.
  233. Addison-Wesley, Reading, Mass., 1985.
  234. Adobe Systems, Inc.  PostScript Language Tutorial and Cookbook.
  235. Addison-Wesley, Reading, Mass., 1985.
  236.