PCL®-II Programmer’s Reference Manual 5525B/31/32 Line Matrix Printer
5525B/31/32 Line Matrix Printer PCL®-II Programmer’s Reference Manual P/N 422932-001
Compaq® makes no representations or warranties of any kind regarding this material, including, but not limited to, implied warranties of merchantability and fitness for a particular purpose. Compaq shall not be held responsible for errors contained herein or any omissions from this material or for any damages, whether direct, indirect, incidental or consequential, in connection with the furnishing, distribution, performance or use of this material.
Trademark Acknowledgements IBM and Proprinter are registered trademarks, and PC-DOS is a trademark of International Business Machines Corporation. Compaq is a registered trademark of Compaq Computer Corporation. Epson is a registered trademark of Seiko Epson Corporation. Hewlett-Packard, HP and PCL are registered trademarks of Hewlett-Packard Company. IGP, PGL, LinePrinter Plus, and Printronix are registered trademarks of Printronix, Inc.
Table of Contents 1 Introduction............................................................. 9 About This Guide ................................................................................. 9 Warnings and Special Information ................................................ 9 Related Product Information ......................................................... 9 Software Features ............................................................................... 10 2 HP PCL-II ............................
Table of Contents Character Overstrike ..................................................................... 43 Bar Codes ..................................................................................... 43 US Postnet Barcodes .................................................................... 52 4.0 CPI (20 Bars per inch) US POSTNET Bar Code .................... 55 A Standard ASCII Character Set .............................
1 Introduction About This Guide Your printer comes equipped with the standard Hewlett-Packard® Printer Control Language (PCL®-II) emulation. This manual explains the emulation in detail. The Programmer’s Reference Manual is designed so that you can quickly find the information you need to use and configure your Compaq® 5525B/31/32 Series printer.
Chapter 1 Software Features Software Features The PCL-II emulation software provides the following features: 10 • Graphics and a selection of print densities. You can enable graphics mode and specify a density mode (dots per inch). • Print Attributes. Characters can be bold, italic, double high, double wide, etc. • Page Formatting. PCL-II commands allow you to set line spacing, page length, and vertical forms control. • Font Typefaces. Also referred to as print modes.
2 HP PCL-II Introduction This chapter describes the HP® PCL-II emulation host control codes that are supported for your 5525B/31/32 Series printer. Emulation refers to the ability of a printer to execute the commands of a particular printer control language. A printer control language is the coding system used to convey, manipulate, and print data. It contains character codes and command sequences that configure the emulation.
Chapter 2 Introduction HP PCL-II Emulation Default Settings The factory settings for the PCL-II emulation menu options are shown in Table 1. Host control codes can override the settings for these menu options. Table 1. PCL-II Menu Option Factory Settings Parameter Default Setting Primary/Secondary Character Set ID 0 Symbol Set Roman-8(8U) Pitch 10.
Printer Feature Set Compatibility NOTE: The SFCC is the Special Function Control Code. From the P-Series protocol, this code is selectable from the front panel. The default value is hex 01. For the Proprinter and Epson emulations, the SFCC is always the ESC (hex 1B) character. Configuring the PCL-II Emulation with Control Codes The remainder of this chapter describes the PCL-II printer control language codes that may be sent from a host computer attached to the printer.
Chapter 2 Configuring the PCL-II Emulation with Control Codes General Information Programmatic Printer Control Control codes and multi-character escape sequences are used to control the printers. The printers execute command parameters in the order they are received. Therefore, the order of the parameters is significant. Unrecognized escape sequences are ignored in their entirety and may cause erroneous printing since the printer may be unable to perform the requested operation.
Escape Sequences Escape Sequences An escape sequence consists of the ESC control code followed by one or more characters in succession. Both two-character and structured escape sequences control the printer. Two-character escape sequences take the form ESCX, where X is a character from the ASCII table (0 through ~). Structured escape sequences take the following form: ESCXy[parameter]Z This sequence is explained below: ESCXy Prefix.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Table 3 lists the escape sequences you can use with the printer. Note that the brackets [ ] used in these escape sequences are for clarification purposes only (the brackets are not actually part of the commands). Table 3. Line Printer Escape Sequences Escape Sequence Explanation Page No.
Escape Sequences Table 3. Line Printer Escape Sequences (continued) Escape Sequence Explanation Page No.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Programmable Reset The programmable reset escape sequence (ESCE) causes the printer to eject paper to the top-of-form (position 0,0) if not already at top-of-form. This command resets all current printer configuration values to the following states. The printer remains on-line after a programmable reset.
Character Font Selection Character Font Selection The printer can print several different character sets (fonts). By performing a printer self-test, you can see which fonts are installed in your printer. You may specify any of these fonts from an application. On the self-test printout, each available character font is printed along with a parameter number to the left of the printed font.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Symbol Set Selection The printer allows you to select a symbol set. A symbol set is a set of characters that are mapped to certain locations in the printer’s memory. Symbol sets differ from one another in the characters contained in the set and in their locations within memory. The default symbol set is that of the default font specified from the control panel.
Character Font Selection Table 4.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Printing in the Hex 80 through Hex FF Region The printer exhibits different behaviors as it processes characters in the hex 80 through FF range. Behavior is based upon the symbol set of the active font. If the symbol set of the active font is 7-bit, characters in the hex 80 through FF range will be ignored. If the symbol set is 8-bit, the printer will attempt to process the characters. There are two different types of 8-bit sets.
Character Density Selection Character Density Selection (PCL Level III) Standard-density print, high-density print, and high-speed draft printing can be specified using the following escape sequences: Primary Selection ESC(s0Q Select Standard-Density (12 x 9 dot matrix, 120 x 72 dpi) for the primary font ESC(s1Q Select High-Density (18 x 12 dot matrix, 180 x 96 dpi) for the primary font ESC(s-1Q Select High-speed Draft Printing (12 x 6 dot matrix, 120 x 48 dpi) for the primary font Secondary Selectio
Chapter 2 Configuring the PCL-II Emulation with Control Codes Table 5.
Switching Character Fonts Table 5. Available Symbol Sets (continued) Name Code Density (Pitches) PC-852 Latin2 17U HS DP NLQ PC Turkish 9T HS DP NLQ PC Hebrew 15H HS DP NLQ PC Lat/Ara 10V HS(5,10) DP NLQ PC Cyrillic 3R HS DP NLQ Win3.1 Lat1 19U HS DP NLQ Win3.1 Lat-2 9E HS DP NLQ Win3.1 Lat-5 5T HS DP NLQ Math-8 8M DP NLQ PS Math 5M DP NLQ Greek 7 12N HS DP NLQ Postnet 4 15Y NLQ(4) Postnet 11.3 1K NLQ(11.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Display Functions Mode (PCL Level I) The display functions mode can be entered using the ESCY sequence. In the display functions mode, the printer prints representative character symbols for the control code characters instead of actually executing the control characters. In this mode, the carriage return (CR) control character will cause a CR symbol to be printed and an actual carriage return and line feed to be performed.
Line Spacing Line Spacing Vertical line spacing of 6 or 8 LPI (lines per inch) can be selected either from the control panel or remotely using the ESC&l[6 or 8]D sequence. When the printer is reset, the vertical line spacing is as set from the control panel. If a parameter other than 6 or 8 is entered, the command is ignored and no line spacing change is made. NOTE: Changing the line spacing causes the standard VFC table to be recalculated.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Table 7.
Programmable VFC Programmable VFC Programmable VFC allows the user to specify paper movement information other than the standard VFC definitions shown in Table 7.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Programmable VFC Using PCL Programmable VFC’s using PCL seem to cause a lot of problems and misunderstandings. Most of the misunderstanding concerns the use of the escape sequence used to set the VFC file. This escape sequence is used to override the default VFC of the printer. This escape sequence can be hardcoded into a program or ASCII file. VFC’s are best understood by reviewing an actual example of how to implement them.
Programmable VFC A second method involves only providing a “1” in CH3 where print will occur. The programmer then simply calls CH3 and the blank lines are skipped. There still is no flexibility for adding or deleting lines without VFC modification, but line counting is minimized. A third method involves assigning VFC channels to each section of the letter and performing a call to CH3 within each section.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Notice that for each line channel 3 is selected, this would select a single space advance. A 1 could be placed in any or all other channels and the VFC would still be valid since the printer will only look at the channel selected and advance to the next line that contained a 1 in that channel.
Programmable VFC • As an OCTAL number (one byte at a time) by preceding the number with the % sign. • As a two or three character mnemonic such as BS or DC1 (see Appendix B of the Workstation Configuration manual). • By entering the control characters with the up-arrow or circumflex character preceding the character, i.e. a backspace would be an ^H. • By entering the actual ASCII character within single quotes, i.e. ’A’ would equate to an OCTAL %101.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Table 8.
Programmable VFC Example VFC Data Entry Methods The example escape sequence may be created while the DISPLAY FUNCTIONS key has been enabled as shown below.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Another method using a text editor would be to do a CHANGE command replacement to convert the characters to ASCII characters. This is shown as: \ADD 1 1 ESC&142WabcdefghijklmnopqrstuvwxyzABCDEFGHIJ 2 // \CHANGEQ 7/7 TO ’00 \CHANGEQ 8/8 TO ’05 \CHANGEQ 9/9 TO ’00 . . . \CHANGEQ 48/48 TO ’06 This could also be input by not entering the letters, but simply changing the specific column to the desired ASCII character. In the above example the “abc.
Logical Page Length Selection 6. This escape sequence must be sent to the printer before the data by embedding in the application or as part of an initialization string. A programmable or hardware RESET will clear the VFC RAM causing the printer to return to the default VFC. NOTE: If either the RS-232E or the RS-422B interface is installed in the printer, the interface can be configured to have such things as STRIP NULLS AND DELETES.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Before changing the page length, it is recommended that a VFC select of channel 0 be performed. This will bring the printer to the top of the next physical page (unless the printer is already at the top of the physical page). Changing the logical page length changes the standard VFC table.
Horizontal Margin Selection Horizontal Margin Selection Absolute left and right margin selection is accomplished using the following escape sequences: ESC&a[print position]L Set left margin ESC&a[print position]M Set right margin The print position specified indicates a decimal number in the range 0 through 131 @ 10cpi (0 - 65 for Double-size, 5 cpi, 0-219 for compressed, 16.67 cpi). The print position represents the column using the print pitch active when the margin is set.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Cursor Control Absolute and relative cursor control are provided for the printer. Cursor moves are made in the current active pitch and current active vertical spacing.
Raster Graphics Raster Graphics Graphics are sent to the printer using the following escape sequences: ESC*t[70, 140]R Raster graphics resolution ESC*r#L Horizontal raster graphics resolution ESC*r#V Vertical raster graphics resolution The ESC*r#L and ESC*r#V escape sequences allow you to set the horizontal and vertical raster graphics resolutions independently. Valid raster graphics resolutions are 70 DPI by 72 DPI, 140 DPI by 72 DPI, 70 DPI by 144 DPI, and 140 DPI by 144 DPI.
Chapter 2 Configuring the PCL-II Emulation with Control Codes The ESC*b#Y escape sequence allows you to skip multiple adjacent blank lines. The # of raster lines parameter is the decimal number of blank raster lines to skip. The size of the blank raster line to be skipped is equivalent to the currently set vertical raster graphics resolution.
Character Overstrike Character Overstrike To create special symbols and underline selected portions of your output, one character (maximum) may be printed over another on a character-bycharacter or line-by-line basis. A character overstrike is accomplished using either the backspace control code or a carriage return with no line feed. The overstrike print line will be held in the print buffer and will be merged with the next line to form a single printed line with superimposed characters.
Chapter 2 Configuring the PCL-II Emulation with Control Codes NOTE: The Postnet Barcode types 13 & 14 print 24 bars per inch. See the section on 256x Postal Barcodes for information on the 20 bars per inch and 22.5 bars per inch Postal Barcodes. ESC*z#H Bar Code Height This escape sequence defines the height of the bar code label in tenths of an inch as specified in the value field (#). To specify a bar code height of .8 inches, the ESC*z8H escape sequence would be sent to the printer.
Bar Codes Printing Bar Codes Generally, sending bar code information to the printer is performed in two steps: Step 1: Selecting the bar code printing specifications; bar code type, height, and header control information. Step 2: Moving the cursor to the desired label location and sending the bar code data. Step 1. Before positioning and printing the bar code data, the type of code, height of the label, and header placement may be specified.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Printing Multiple Labels On The Same Line Printing more than one label on the same line involves no more than positioning the cursor and sending the data for each label to be printed. Since the termination of the bar code data sequence (signalled by an upper-case Z) causes the bar code to be printed and a carriage return to be executed, all of the label information must be sent in the same escape sequence.
Bar Codes NOTE: When a header is enabled, sending one line of information causes the printer to print two lines; one line containing the header along with any text you may have sent in that line, and one line containing the bar code label. When a header is enabled, no information can be printed on the same line as the bar code label. However, if the header is disabled, text can be placed next to the bar code label.
Chapter 2 Configuring the PCL-II Emulation with Control Codes CODE 3 OF 9 A variable-length data string of up to 32 ASCII characters may be printed using the Code 3 of 9 bar code. The string may be an odd or even length and may use any of the standard characters (specified in MIL-STD-1189). If a non-valid character is used in the string, a blank non-readable bar code will be printed; non-valid characters are not substituted or deleted.
Bar Codes EAN8 A fixed-length data string of 7 ASCII characters may be printed using the EAN 8 bar code. The string length must be 7 and may use any of the standard characters 0 through 9. If a non-valid character or string length is used, a blank non-readable bar code will be printed; non-valid characters are not substituted or deleted. The width of the printed bar code is not variable and is 1.25 inches. EAN13 A fixed-length data string of 12 ASCII characters may be printed using the EAN 13 bar code.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Table 12. UCC/EAN-128 Application Identifiers (continued) Application Identifier (AI) Format 20 Product Variant n2+n2 21 Serial Number n2+an..20 22 HIBCC = Quantity, Date, Batch and Link n2+an..29 Lot Number (Transitional Use) n3+n..19 240 Additional Product ID Assigned By Manufacturer n3+an..30 250 Secondary Serial Number n3+an..30 30 Quantity n2+n..
Bar Codes Table 12.
Chapter 2 Configuring the PCL-II Emulation with Control Codes Table 12. UCC/EAN-128 Application Identifiers (continued) Application Identifier (AI) Content Format 8003 UPC/EAN Number and Serial Number or Returnable Asset n4+n14+an..16 8004 UCC/EAN Serial Identification n4+an..
US Postnet Barcodes 256X US POSTNET BAR CODE The US POSTNET Bar Code is a Compaq character set which meets the US Postal Office specifications for Postnet bar coding, including the latest Delivery Point Bar Code, or DPBC. US POSTNET Bar Codes print at 4.0 cpi (20 bars per inch) and 11.3 cpi (22.5 bars per inch).Both bar codes are printed by replacing normal printable characters with vertical bars.
Chapter 2 Configuring the PCL-II Emulation with Control Codes The printer does not calculate the check digit, or automatically generate frame bars. They must be generated by the computer resident software, and sent to the printer. To do this, it is necessary to design a program that will convert a pair of digits into ten vertical bars. NOTE: Each digit is five bars, with each printable character being two bars. Thus, 2 1/2 characters are needed to print one digit.
4.0 CPI (20 Bars per inch) US POSTNET Bar Code Frame Bar & “4”: Characters “58”: Characters “34”: Characters “88”: Characters “44”: Characters “79”: “9” & Frame Bar: Text sent to Printer: Method 2: {{} (1 01001) }}}~{ (01010 10010) ~`~{} (00110 01001) {}}~{ (10010 10010) }~{{} (01001 01001) {~`{~ (10001 11000) {{} (10100 1) SO{{}}}}~{~`~{}{}}~{}~{{}{~`{~{{}SI For both examples, SO = Shift Out (hex 0E), and SI = Shift In (hex 0F). 4.
Chapter 56 2 Configuring the PCL-II Emulation with Control Codes
A Standard ASCII Character Set B7 B6 BITS KEY 0 B5 0 1 B4 B3 B2 B1 1 0 1 ESC 1 OCTAL DECIMAL HEX 33 27 1B ASCII CHARACTER B7 B6 0 B5 BITS 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 0 1 1 1 1 1 0 1 COLUMN 0 B4 B3 B2 B1 ROW 1 0 0 0 0 0 NUL 0 0 0 0 0 0 1 1 SOH 1 1 1 0 0 1 0 2 STX 2 2 2 0 0 1 1 3 ETX 3 3 3 0 1 0 0 4 EOT 0 1 0 1 5 0 1 1 0 DLE DC1 (XON) 2 20 16 10 21 17 11 SP ! 3 40 32 20 41 33 21 4 0 60 48 30 1 61 49 31 5 6 @ 100 64 40 P 120 80 50
Appendix A 58
Index A Table, 14 Cursor control ASCII Character Set, 57 PCL-II, 40 Available symbol sets D Table, 24 B Default values PCL-II, 12 Bar Code Types Diskette storage of emulation configuration, 13 Table, 43 Display functions mode Bar codes PCL-II, 26 PCL-II, 43 E Bar Code, US POSTNET, 256X US POSTNET Bar Code, 53 EAN13 Bar Code, width, 49 Binary data, printing EAN8 PCL-II, 39 C Bar Code, width, 49 Escape sequences Character density selection PCL-II, 23 PCL-II, 15 Table, 16 Character f
I Programmable reset PCL-II, 18 Industrial 2 of 5 Programmable VFC Bar Code, width, 48 PCL-II, 29 Interleaved 2 of 5 P-Series emulation Bar Code, width, 48 configuring via control codes and menus, 11 Italic, character selection factory settings, 12 PCL-II, 22 R L Raster graphics Labels, multiple PCL-II, 41 Printing, 46 reseting, PCL-II, 18 Levels, compatible, PCL-II, 13 Royal Mail barcode, 49 Line spacing S PCL-II, 27 M Save Custom Sets menu option, 13 selecting fonts, attributes, 19
UPCA 4.0 cpi, 55 V Bar Code, width, 48 UPCE Bar Code, width, 48 Upright, character selection PCL-II, 22 US Postnet printing check digits, 52 US Postnet bar code Vertical forms control PCL-II, 27 VFC Channel Definitions Table, 28 Z 11.
5525B/31/32 Line Matrix Printer Compaq Computer Corporation P/N 422932-001 170117-001A