JP 1000 (260-2960) Printer Control by the Computer Faxback Doc. # 3322 THE COMMUNICATION PROTOCOL One of the most crucial things which affects the correct working of your printer and computer is the setting of the communication protocol. If the protocols do not match, you will not obtain satisfactory results or even none at all. It is not difficult to set the protocols correctly, but it is absolutely necessary that the communication parameters in the printer and in the computer be compatible. NOTE: The information given in this chapter refers to MS-DOS and MS- WINDOWS environments as they are the most widely-used. For other environments the same logic remains true, but see the related documentation for details. The indication given here are sufficient for MS-DOS up to release 6.0, and for MS-WINDOWS up to released 3.1. Parallel Interface With the resident parallel interface, you do not have to do anything, as the only variable parameter is the data format "word length", which, in the PC, is always set to 8. This is the printer's default setting. The parallel communication protocol can be activated using the following MS-DOS command (consult your MS-DOS manual for the complete syntax): MODE LPT1: (characters per line), (line spacing), P To address the parallel printer interface as a logical output device, you can use one of the following names: LPT1 or PRN. It is also possible to redirect output prepared for the parallel interface to a serial interface, using the command: MODE LPT1:=COMn: Serial Interface If you install the optional serial interface in your printer, to use it you must pair up the printer's protocol with the one in your host system or computer. The protocol can either be programmed in the printer or you can adapt your computer to the printer setting using the command: MODE COMn: (baud), (parity), (word length), (stop bits), p where "n" is the number (usually 1) of the addressed interface board, and baud requires only a two digit number. PRINTING METHODS Once your printer and computer are connected correctly and the logical link established, you can use the printer to its full extent. If you ran the print test when you installed the printer, you saw the printer execute an internally-commanded operation. You can now have the printer print something on your command. The following section contains some basic operation, which do not require the processing of an application. NOTE: For all following operation, make sure the printer is switched on, with paper and print head loaded, and that it is ON-LINE. Printing a Text Screen The easiest way to obtain a print-out is a screen dump. Let us presume you are in your operating system and have made a Directory Listing with the command DIR. If you want this list printed out for future reference, simply press SCR PRT on your PC keyboard (on some PCs, SHIFT is also required simultaneously). The printer will start to print everything you see on the screen exactly as you see it. You regain the control of your keyboard when the necessary data transmission to the printer is finished. This method works from all applications which handle the screen in the text mode (certain types of graphics may not be printed). Printing Text Files The most common printer operation is the printing of a complete text or data file. When you have printable files, prepared by your editor, word processor, database etc., you can send them to print using one of the following methods. A printable file is one which contains only the data to print and probably appropriate printer control commands and is basically line oriented (closes each printable line with CR/LF). When you have the system prompt, type one of the following commands: print (filename) - This invokes the print utility of your operating system. The first time you call it, it will ask you to confirm or change the output port. For details about file spooling etc., see in your DOS manual. NOTE: This command executes a Form Feed automatically after each document is printed. type (filename)>prn - This utility normally lists the contents of a file on your screen, but in this case redirects it to the printer, allowing you to interrupt printing with CTRL-C, as you would for the screen. This command will execute an automatic Form Feed at the end of a document only if it is included in the document itself. copy (filename)/B prn - this command also sends the file to the printer. If you send graphic or DLL (i.e. fonts) files to the printer, remember use the optional "/B" parameter in the command to override any End Of File (=EOF=26D) command, which otherwise would cause DOS to discontinue the data transfer. NOTE: For more detailed information about these commands, consult your MS-DOS manual. SOFTWARE APPLICATIONS The printer performance can be controlled using software programmers developed for a wide variety of applications, such as word processor, spread sheet, data base, graphics, etc. The software transmits the operating information to the printer in two different ways, with: the driver: the part of the program which controls the selected printer. incorporated commands: inserted directly in the text to be printed. INCORPORATED COMMANDS A printer command code is usually a series of otherwise normally printable characters inserted in the data string sent to the printer. To make the printer understand which characters are to be interpreted as a command and which as printable characters, there is a simple convention: all "characters" that have according to the character table, a decimal value less than 32 are interpreted received, others do not. There is also a special command ESCAPE (decimal code 27, names ESC) which is used by most printer emulations to open a command sequence (also known as ESCAPE sequences). It is followed by one or more additional characters, which serve as identifiers and parameters, belonging to the range of printable characters or control codes available. SENDING FILES TO THE PRINTER When you want to print from a word processor, spread sheet, database, graphic package or other application, always use the built-in print function they offer. Do not attempt to send one of the package's work files directly to the printer, as they rarely have a format which can be executed directly by the printer. They only exception are line oriented editors. If you need to print documents independent of the application package, use the function "print to a file", which some (but not all!) packages offer. The data written to this file is then exactly like the output otherwise sent to the printer. You can now send these files to print from the operating system level with the commands described already in the section "Printing Text Files". When using an application package, the package itself usually takes care of the correct setting of the page layout parameters, overriding those defined in SET-UP. Some packages, however, do not; when using them, check that all the selectable parameters are compatible, and bear in ind the following: If your printer has a physical TOF and BOF margin, make sure your form length definition falls WITHIN these pre-set margins. If not, you may encounter the situation where the printer executes an automatic form feed another one just after the start of the next page. When defining the line length for your print output, make sure the left margin plus the line of text do not exceed physical line length. The amount of printable character per line varies, as it depends on the letter size and spacing, but when the print carriage reaches its rightmost position and there are some characters left, the printer may either ignore the excess characters or automatically print them on the following line. This can destroy your text layout. (ALL-12/05/94)