|
|
Configuring Systems for Terminals, Printers, and Other Serial Devices: HP 3000 MPE/iX Computer Systems > Chapter 9 Describing Asynchronous DevicesHow to Control Printers |
|
Controlling printers is similar to controlling terminals, except for two differences:
Each of the methods for controlling printers is explained in the pages that follow. Refer to the Asynchronous Serial Communications Programmer's Reference Manual for more information on programmatic device control. Asynchronous data transmission speeds on MPE/iX computers range from 300 bps to 19200 bps. The following speeds are supported: 300, 1200, 2400, 4800, 9600, and 19200 bps. 38400 bps is also supported for direct connect devices on DTC 16iX/16MX and DTC 72MX. If host-based, transmission speed is configured through NMMGR. The speed chosen must be supported by the printer. A printer can be changed to any supported speed if it is directly connected to the DTC. The speed of a printer connected to a modem is set by the speed of the modem and the telephone line being used. Parity verifies that each character of data is transmitted between the system and the printer without error. It detects data transmission errors, but does not correct them. Printers using printer type file 21 use parity. Printer type file 21 generates odd parity. When a printer using printer type file 21 encounters a parity error, it remembers the error until the ASC software verifies the printer's status. When the error is returned to the ASC software, a message is printed on the system console. Printers using printer type files 18 or 22 cannot use parity. Additionally, the FCONTROL and the FDEVICECONTROL intrinsic cannot be used to change the parity settings for printers. For more information on parity, refer to "How to Control Terminals" earlier in this chapter. Printers using printer type files 21, 22, or 26 have a data protection mechanism that prevents the DTC from sending data to a printer when it is unable to print it. This mechanism is called status request or status checking. Printers respond to the request and return information on their status. A status request is sent after each file has printed. Some printers are unable to return status information to the ASC software or to the user program controlling it. These printers should use printer type file 18, which does not send status checks to printers. Since the ASC software has no way of knowing when something is wrong, data can be lost. Many printers use Vertical Format Control (VFC) to direct the placement of output. VFC instructs a printer to skip to predetermined lines or to a specific point on a page with typically one or two commands, instead of counting and outputting a number of blank lines and spaces. This capability is often referred to as "Skip to Channel x," where x is one of the predetermined points. When a printer is shared, each user can manipulate the printer in a different way. One user can change the printer's characteristics (such as margins, tabs, or print density) and affect another who does not want those characteristics. To prevent one user from affecting other users, the printer must be initialized to a known state before printing the next job. When a printer configured as printer type file 21, 22, or 26 is opened, the ASC software writes an initialization character string to the printer. Printers using printer type file 18 cannot use the initialization string. This means that if a user changes the printer's characteristics, the characteristics are not reset by the ASC software. The user's program must reset the printer when it is finished with it. |
|