HPlogo HP3000 Application Notes

HP3000 Application Note #10

SERIAL PRINTERS

  • CONFIGURATION
  • CABLING
  • MULTIPLEXERS

APP Notes

Complete PDF


Application Note #9

Application Note #11

HP Part Number: 5958-5824-2629

Published: July 15 1986

Notice
This application note is intended as a guide for configuring serial printers, for cabling serial printers, and for using multiplexers with serial printers.

CONFIGURING SERIAL PRINTERS

There are a variety of ways to configure a serial printer and it is often up to you to determine which configuration is best for a particular application. Some of the information below was included in the HP3000 Application Note Printer Configuration Guide (P/N 5958-5824/2616). The information is repeated here for ease of use.

MPE I/O Configuration

To configure a serial printer into MPE, the following information is needed:

DRT NUMBER. The DRT number is the hardware address of the controller. All ports on an ATP subsystem (a single SIB) have the same DRT number, that of the SIB For the ATP, the DRT number is calculated as follows:
    DRT# = (IMB# * 128) + (SIB channel# * 8)
Each ADCC port has its own DRT number. The DRT number is calculated as follows:
    DRT# = (ADCC main channel# * 8) + (port# on the main or extend)
The port number starts at 0 for the first port on the ADCC main and continues to 7 for the last port on the ADCC extend.

UNIT NUMBER. Each ATP port has its own unit number. The unit number is calculated as follows:
    UNIT# = (AIB# * 12) + (port# on the AIB)

The AIB number is found on a thumbwheel on the AIB itself. The port number starts at 0 for the first port on the AIB and continues to 11 for the last port on the AIB, The unit number for ADCC ports is always 0.

SOFTWARE CHANNEL. The software channel is always 0.

TYPE. The type for printers is 32. Type 32 printers can be spooled, they will print headers and trailers, and they will go to top of form upon an FCLOSE. Serial printers may also be configured as type 16, but they cannot be spooled, will not print headers or trailers, and they will do a carriage return, line feed upon an FCLOSE.

SUB-TYPE. A serial printer can use either sub-type 14 or 15. Sub-type 14 is intended for a hard wired environment. If an ATP or ADCC is configured with sub-type 14, the ATP/ADCC will not control any modem signals, nor will it require any.

Sub-type 15 is intended for a modem connection. Sub~type 15 will control Data Terminal Ready (DTR) and leave Clear To Send (CTS) high. Sub-type 15 will also require Carrier Detect (CD) and Data Set Ready (DSR). If these signals are not present, the spooler will stop with a "SPOOLEE I/O ERROR %53".

Sub-type 15 will drop DTR when the device is closed. This will cause the modems to hang up. The next spool file will probably get a "SPOOLEE I/O ERROR".

For printers connected over a leased line, sub-type 14 will work best. Since no modem signals will be supplied by the ATP/ADCC, the modem must be strapped to ignore DTR.

TERMINAL TYPE. The terminal type defines how the ATP/ADCC will interact with the serial device. Protocols such as ENQ/ACK, XON/XOFF, and parity are all defined in the term-type file. See the section, "A Selection of Term-Types" for a description of various term-types.

SPEED. The speed in the I/O configuration is in characters per second. For printers this must match the speed of the device connected to the ATP/ADCC port.

RECORD WIDTH. The record width is in words. Common values for printers are 66 for 132 column printouts, and 40 for 80 columns.

OUTPUT DEVICE. The output device is not used for printers. By convention it is set to 0.

MODES. The only mode that should be used for printers is "INITIALLY SPOOLED?". A device that is intially spooled will have the spooler start automatically when the system is brought up.

DRIVER NAME. The driver name depends on the type and whether you are on an ATP or ADCC port.

For ATP:
    Type 32: Driver HIOASLP0 Type 16: Driver HIOTERM1

If you use any driver other than the above for an ATP port, the system will not come up.

For ADCC, MPE V/E or later:
    Type 32: Driver HIOASLP2 Type 16: Driver HIOTERM2

For ADCC, MPE IV and V/P:
    Type 16 and 32: Driver HIOTERM0

DEVICE CLASSES. The device class allows a user to specify a name rather than an LDEV number in MPE. The device classes are up to eight characters long. By convention, the system printer has device class "LP". The 2680A and 2688A are in device class "PP". Some HP software packages also have requirements for device classes.

A Selection of Terminal Types

The terminal type defines how the ATP/ADCC will interact with the serial device. The terminal types commonly used for serial printers are 18, 19, 20, 21, 22, TTPCL18, TTPCL19, and TTPCL22.

Term-Type 18. Term-type 18 is used for non-HP devices. It does XON/XOFF flow control, 7 data bits, with the parity bit forced to 0 (MPE V/E and later). If the ATP/ADCC receives and XON or an XOFF with the parity bit set, that character will be discarded. Term-type 18 does not send an initialization string to the printer.

TTPCL18. TTPCL18 is used for HP printers in situations where the printer cannot respond to status, or status checking is not desired. It does XON/XOFF flow control, 7 data bits, with the parity bit forced to 0 (MPE V/E and later). As with term-type 18, the parity bit on an XON or XOFF must be 0.

TTPCL18 has an XON timer. When the device sends an XOFF, the ATP/ADCC software will start a 60 second timer. If that timer expires before an XON is received, an "UNIT NOT READY" message will be sent to the console.

TTPCL18 also has an initialization string. TTPCL18 uses the VFC file VFCPCL.PUB.SYS which will turn display function off, reset the printer, and enable perforation skip.

Term-Type 19. Term-type 19 is used for HP printers such as the 2631B that respond to the "ESC ? DC1" request for status. For details on status checking, see "All About Status Checking" later in this application note. Term-type 19 does XON/XOFF flow control, 7 data bits, with ODD parity.

Term-type 19 uses the initialization string contained in the VFC file VFC31B7. This turns off display functions, sets the printer to 6 lines per inch, 10 characters per inch, enables perforation skip, and starts printing in column 1.

Users commonly complain about not being able to set 8 lines per inch, compressed print, or that their 2563A printer only prints 131 columns. For these reasons TTPCL19 was developed.

TTPCL19. TTPCL19 has the exact same behavior as term-type 19 except for the initialization string. TTPCL19 uses the VFC file VFCPCL, which turns off display functions, resets the printer, and enables perforation skip. The printer reset causes the printer to set all programmable features to their default values. The default values are whatever the operator set from the printer panel. Thus the user can choose 8 lines per inch, compressed print, and their 2563A printer will print 132 columns.

Term-Type 20. Terminal-type 20 is the same as term-type 19 except that term~type 20 uses 8 data bits with no parity bit. Extended character sets need 8 bit data.

Term-Type 21. Terminal-type 21 is the same as term-type 19 except for the manner in which the ATP/ADCC software does status checking. See "All About Status Checking" for a description of the differences. Term-type 21 has an XON timer. When the device sends an XOFF, the ATP/ADCC software will start a 60 second timer. If that timer expires before an XON is received, a "UNIT NOT READY" message will be sent to the console.

TermType 22. Terminal-Type 22 has the same initialization string as term-type 19. It uses 8 data bits with no parity. Its status checking behavior is the same as term-type 21. Graphics and extended character sets need 8 bit data. Term-type 22 has an XON timer like term-type 21.

TTPCL22. TIPCL22 has the exact same behavior as term-type 22 except for the initialization string. It uses the VFC file VFCPCL just like TTPCL19 and will fix the same problems that TTPCL 19 will fix (8 lines per inch, compressed print, 132 columns on a 2563A). TIPCL22 has an XON timer like term-type 21.

ALL ABOUT STATUS CHECKING

The HP status checking handshake ensures that no data will be lost of corrupted when printing to a serial printer. The printer driver will send a status request to the printer periodically, and then the printer will respond with a single byte indicating its status.

The terminal type determines whether or not we do status checking. Term-types 19, 20, and TTPCL19 will check status at the beginning of a print file, at the end of every line, and when the printer sends an XOFF. Term-types 21, 22 and TTPCL22 check status at the beginning of the print file and at the end of every line. When the 3000 issues a status request, it starts a 10 second timer. If we have not received a reply with the correct parity before the timer pops, we will get a "SPOOLEE I/O ERROR, I/O STATUS %53, UNIT NOT ON LINE", if the printer is spooled. If the printer is not spooled, we will get an FSERR 70, "I/O ERROR WHILE PRINTING HEADER/TRAILER".

The status request the 3000 sends is "ESC ? DC1". The printer responds according to Figure 1. An ASCII %60, the zero character, indicates that everything is OK.

How do we define our own term-type to do status checking?. The Workstation Configurator does not allow us to define a status checking protocol. You-must FCOPY a term-type with the status checking behavior you desire to a new term-type file. Then you can modify the term-type with the Workstation Configurator.

What to Check for with 'SPOOLEE I/O ERROR, I/O STATUS %53'

Remember that the I/O STATUS %53 means that the 3000 sent a status request and did not receive a proper reply within 10 seconds. There are numerous reasons for this. Make sure you get the following information:
  1. Does the printer print anything? If the printer stops in the middle of a printout with a SPOOLER error, the cabling, baud rate, parity, printer model are all OK. Skip to number 8.
  2. What model printer is on that port? For term-types 19-22, TTPCL19 and TTPCL22 the only supported printers are: 2631B, 293X, 256X. The 2686 is supported on term-types 18, 22 and TTPCL22.
  3. What cable is being used between the printer and the 3000? See Figure 3.
  4. Is there anything between the printer and the 3000? Any modems, multiplexers, data switches, LAN networks, etc? Do these devices require modem signals from the 3000? If the 3000 is configured with sub-type 14, it will not put out DTR (Data Terminal Ready) on pin 6.
  5. Is the printer configured with sub-type 15? If so, is the 3000 receiving DSR (Data Set Ready) on-pin 20 and CD (Carrier Detect) on pin 4? Both signals are required with sub-type 15.
  6. Do the baud rates match on the printer, 3000 and everything in between?
  7. Is the parity on the printer set correctly? For term-types 19, 21, and TTPCL19, the printer parity must be ODD. For term-types 20, 22, and TTPCL22, the parity must be NONE with 8 data bits.
  8. Is the port broken? Run TERMDSM.PUB.SYS. At the "->" type "B" for broken. If the port is listed as broken, use the "RESET" command. Have there been any ADCC or ATP failure messages on the console? If so, get the failure number. If you "DUMP" the port in TERMDSM, a datacomm specialist can find the failure number from the formatted dump.
  9. If there is a multiplexer between the 3000 and the printer, and the SPOOLEE error occurs in the middle of a printout, use term-types 18, 21, 22, or TTPCL22. The same applies if a SPOOLEE I/O ERROR occurs shortly after taking the printer off line (multiplexer again).
  10. If the spool file contains many escape sequences and the SPOOLEE I/O ERROR occurs in the middle of a printout, try term-types 21, 22, or TTPCL22.
  11. If you have exhausted all of the above, there is one bug in ATP/ADCC code on MPE V/E that can cause a SPOOLEE I/O ERROR. Sometimes when the printer sends a lot of XOFF's, the 3000 forgets to send the "DC1" read trigger character with a status check. This happens only with term-types 19, 20, and TTPCL19 in some versions of MPE V/E. ATP software version G.50.57 and ADCC software version G.50.68 fix this problem.

CABLING FOR RS-232 PRINTERS

The RS-232 standard is defined in terms of Data Terminal Equipment (DTE) and Data Communications Equipment (DCE). A DTE is a consumer or producer of data. A DCE transfers the data. Examples of DTE include computers, terminals and printers. Examples of DCE include modems, multiplexers and data switches.

RS-232 is defined in such a way that a cable between a DCE and a DTE will have all 25 wires go straight through (the 13242N cable is a good example). A cable between two DTE's or two DCE's will cross many of the wires in the cable (the 30062B or 13242G cables). This is also referred to as a modem eliminator cable.

The HP 3000 is an exception to the above standard. The 3000 is a DTE, however it is wired to look like a DCE. This means we can use a straight through cable to connect a DTE to the 3000. To connect a DCE to the 3000 we must use a modem eliminator cable.

With a direct connect sub-type 14, the 3000 only requires pins 2, 3 and 7 of the RS-232 connector. All HP printers, with the exception of the 2601A and 2602A, can be set up to only require pins 2, 3 and 7. ATP ports will not put out any modem signals on the other RS-232 pins with direct connect sub-types. ADCC's on MPE V/E behave the same. Prior to V/E, ADCC ports always put out DTR and RTS.

With a modem sub-type 15, the 3000 will put out DTR and RTS. In addition ATP and MPE V/E ADCC will require DSR and CD. ADCC's on MPE IV only require DSR. The 3000 will drop DTR when the device is closed on a printer configured with sub-type 15. This will cause a modem to hang up the phone line after each spool file.

Figure 3 contains a list of cables to be used to connect a printer to a 3000. Pin-out diagrams for the 13242N, 13242P, and 13242X can be found in the Roseville Terminals Cabling Manual. The pin-out diagram for the 30062B cable may be found in the HP3000 Computer System Communications Handbook (P/N 5957-4634). One common cable that is not usable for connecting a HP 3000 with an RS-232 printer is the 13242G cable.

Connect Method CableCable
Direct connect to a 25 pin port (ATP/ADCC/ATC).

13242N, 92218A, 92219G
Direct connect to a 5 pin port (RS-422 ATP).

13242P, 40242P*
Direct connect to a 3 pin port (ATP).

13242X, 40242X*
Modem connect to 25 pin port (ATP/ADCC/ATC). 30062B between 3000 and modem. A DCE to an ADCC port. A DTE to DTE.
*These cables have RFI shielding

Figure 3 - Printer Cabling

PRINTERS AND MULTIPLEXERS

Multiplexers (or MUXes) are devices that combine several signals into one and decode that one signal back into many at the other end. In the HP3000 world this usually means that several serial RS-232 lines are fed into one end of the multiplexer and a single line comes out. This single output line is somehow transmitted to another multiplexer who breaks it down into the original constituent parts. The diagram below shows a typical multiplexer setup:

What this means to the HP3000 customer is that he can have a number of ports on the 3000, say eight, and he only has to have one cable or one modem to the remote site. This can save a considerable amount of money on cabling and modem costs.

Theoretically, the multiplexer is transparent to both the CPU and the remote devices. In practice the multiplexer throws in another layer of complication. Debugging a multiplexer problem can be a difficult venture.

First of all, if you suspect that the multiplexer is somewhat to blame for a problem, connect the remote device directly to the 3000. If the problem magically disappears, then the multiplexer is doing something wrong. Before you automatically blame the multiplexer for all the problems, you must do a little more digging.

Are any other devices already working on the multiplexer? If so, you must hunt for something different about the device that doesn't work. Most commonly this is a printer. Now what makes a printer different from, say a terminal? It is usually a slower device. A more subtle difference is that printers on the 3000 use odd parity and terminals use even or 0's parity.

What difference does a slow device make to the multiplexer? If we assume that the printer is printing slower than its buffer is filling, then eventually the buffer will fill up. At this point the printer will send an XOFF character to the 3000. Note that a terminal using ENQ/ACK protocol will probably never send an XOFF. Now the multiplexer might see the XOFF going down the line and stop sending data to the printer. When the 3000 receives the XOFF, it will send a status request to the printer (term types 19, 20, and TTPCL19). The mux, which is buffering data on behalf of the printer, will not send the status to the printer. The status request will time out in ten seconds and we'll get a "SPOOLEE I/O ERROR" on the console. The safest bet is to disable XON, XOFF flow control on the multiplexer and/or use term types 18, 21, 22, TTPCL18, or TTPCL22.

Why would parity make any difference to the multiplexer? If terminals use even or 0's parity and printers use odd parity, which should the multiplexer use? If there are terminals already running on the multiplexer, you can bet the MUX is not using odd parity. If the CPU sends out a status request with odd parity, the multiplexer may reject the status request or it could convert the status request to a different parity. If it converts to even parity, the printer is expecting odd parity and will not respond. In either case, no status gets sent back to the 3000. The 3000 will respond with a "SPOOLEE I/O ERROR."

How then do you get around parity? Set the multiplexer to recognize 8 bit data with no parity. When the multiplexer gets that eighth parity bit, it will treat it as valid data, do no parity checking, and pass it down the line. It's left up to the device at the other end to check the parity.

In summary, if you have a problem with a multiplexer, take these steps:

1. Connect the printer directly to the 3000. If it doesn't work, don't blame the multiplexer.

2. Disable XON/XOFF flow control on the multiplexer.

3. Set the multiplexer to recognize 8-bit data with no parity checking.

4, Use term types 18, 22, TTPCL18, or TTPCL22.



Application Note #9

Application Note #11