Printronix ANSI Printer manual Escape Control Codes Overview, Format For Control Code Descriptions

Page 29

Format For Control Code Descriptions

Escape Control Codes Overview

Printer capability is greatly increased by the use of escape control code sequences. Escape sequences always begin with the ASCII escape sequence introducer, ESC (hex 1B). Many of the ASCII control codes described in this chapter are escape sequences.

IMPORTANT An Escape code can occur anywhere in the data stream and is acted

upon immediately if it precedes a valid command.

An ESC sequence introducer in the data stream signals the printer to wait for special instructions, even if it is ready and printing. The character codes following the ESC character tell the printer what to do.

NOTE: For readability, code sequences appear in this manual with spaces inserted between command elements. Do not insert spaces between code characters when you are programming unless the ASCII space character (SP) is part of a code sequence. For example, a code sequence printed in this manual as ESC [ 1 is programmed as ESC[1.

An escape sequence uses two or more bytes to define a specific printer control function. The format for an escape sequence is

ASCII

ESC

X

p

Hex

1B

00 - 5F

0 - FF

 

Escape

Character(s)

Numerical

 

Sequence

 

parameter(s)

 

Introducer

 

 

After the ESC character are one or more characters which indicate the action of the control code. One or more numerical parameters may in turn follow these characters. For example, the sequence ESC [ p g tells the printer to clear all horizontal tabs if p is a 3, or to clear all vertical tabs if p is a 4.

If the characters following the ESC code are not within the defined ranges, or if they are within the defined ranges but are not recognized as a function of this printer, the entire sequence is ignored.

29

Image 29
Contents Programmer’s Reference Manual Page Ansi Printers Copyright  1998, 2002 Printronix, Inc Trademark AcknowledgementsTrademark Acknowledgements Table of Contents Vertical Page Formatting Table of ContentsConversion Tables Glossary Table of Contents About This Manual Software FeaturesRelated Product Information AudienceInstalling Printer Emulations Installing Printer EmulationsDebug Downloading Software Through the Serial or Parallel PortDownloading Software Through the Serial or Parallel Port This is the file you will download into the printer Navigating to the Appropriate Emulation File on the CDCd \downloadEnter Downloading Software Through Network Interface Card NIC This is the file you will download into the NIC Downloading Software Through the Network Interface Card NICPut filename.prgEnter Downloading Optional Font Files to Flash MemoryCopy /b filename.dwn LPT2Enter Downloading Optional Font Files to Flash MemoryCopy /b filename1.dwn+filename2.dwn+...LPT1Enter Message Explanation Required Action Flash Memory Message GuideFlash Memory Message Guide Error Security PAL Error Program notError Short AT Error Writing toFlash Memory Message Guide Explanation Required Action Installing Printer Emulations Overview Ansi Emulation Default SettingsCR = CR CPILPI CPI Control Codes Configuring The Ansi EmulationConfiguring The Ansi Emulation Control Codes DC3 Device Control-3 13HFormat For Control Code Descriptions Format For Control Code Descriptions Escape Control Codes OverviewControl Codes Index Graphics CommandsVertical Formatting Commands Character Sets, International Character Sets, InternationalAscii Code ESC p1 Hex Code 1B 5B p1 Dec Code 27 91 p1 Ansi International Character SetsISO Italian Ascii Code ESC p1p2 SP B Expanded ModeExpanded Mode Ascii Code ESC p1p2p3 r Forms Length, Top Margin, Bottom MarginGraphic Rendition Graphic RenditionAscii Code ESC p1p2...pn m Character Types and Enhancements ParameterLine Spacing Ascii Code ESC p1p2 s Margins, Left and RightMargins, Left and Right Proportional Print Mode Private Mode, DisablePrivate Mode, Enable Resetting ResettingHardcoded Reset Values Ascii Code ESC c Hex Code Dec CodeTab, Clear SubscriptSuperscript Tab Set, Multiple Horizontal Vertical Position Relative Terminate Loading of DataVertical Position Absolute Dot Patterns And Densities GraphicsDot Patterns And Densities 0X0X0X0 LSB LSB Msbx MSB654321 Graphics Ascii Character Dot Patterns Hex DotsVertical Format Horizontal FormatHorizontal Format Ascii Character Dot Patterns Hex Dots Horizontal Format Byte → Byte n Row ↓Repeat Graphics Character Other Graphics ConsiderationsDot Graphics Select Graphics Mode Default Bar Code Parameters Setting Bar Code ParametersBar Codes Entering And Exiting Bar CodesP1 Values Setting Bar Code ParametersIf p1 = Style UPC aPostnet Bar Codes P1 ValuesRotation/Font P9 ValuesSpacing Between Bar Codes Human Readable Line HRLBar Code Readers Bar Code ReadersVertical Bar Codes Test ProgramVertical Bar Codes Oversize Character Font Option Oversize Character Font OptionEntering And Exiting Oversize Selecting Size Selecting SizeOversize Character Font Option Planning a Vertical Page Format Vertical Page FormattingProprinter And Epson Vertical Tab Table VFU CharacteristicsExecuting Vertical Tabs Vertical Tab PositionsForm Data Form Line Number Vertical Tabs Vertical Tab PositionsStart Load Code 1E or 6E Hex Series EvfuChannel Assignment End Load 1F or 6F HexUsing The Evfu Using The EvfuSeries Evfu Codes PI Line Enabled Data Bits Hex Dec Code ChannelSeries Evfu Codes PI Line Disabled or Not Used Series Evfu Series Evfu Codes PI Line EnabledDLE DC1 DC2 DC3 DC4 NAK SYN ETB Can SUB ESCData Bits Hex Dec Code Channel End Load Clearing The Evfu MemoryRelative Line Slewing DLE DC1 DC2 DC3 DC4 NAK SYN ETB Can SUB ESC Ansi Evfu Series Evfu Line SlewingData Bits Lines Hex Dec Code Loading the Table Loading the TableAscii Code ESC Hex Code 1B 5D Dec Code 27 93 Two Byte Channel Control Code FormatChannel Control Codes Decimal Value Binary Value Ansi EvfuRemarks CharacterDescription DefaultDefault Evfu Table Ansi Evfu Default Evfu Table Channel Description Skip to Channel CommandSkip To Channel Example Program Instruction Remarks Output Downloading The Evfu Using The PI LineDownloading The Evfu Using The PI Line Ansi Evfu Two Byte Channel Control Code Format Skip to Channel Command Ansi Evfu Standard Ascii Character Set Appendix a 13.3 16.7 Equivalent Columns Conversion Table InchesDecipoints for Column vs. CPI Values Appendix BMargin CPI Column 111 Margin CPI Column Appendix B Margin Column CPI Appendix B Ascii AciaFor example Bold refers to a heavy or thick Character weight, as shown in this sentenceCTA CPUCT+ Cvfu CTSDavfu DCDDTR DSRDvfu EbcdicFifo IGP HGSIeee LCD LACLED MPLNLQ NackNvfu NvramPCB PALPcba PGLPSA PORRAM ROMSCS RTSSAA SLD SfccSNA SOHTTL TOFUPC UsetOFF 100 Ansi Diagnostics PassedError Occurred / Flushing QUEUES*, 20 ESC Sequence Security Code Violation Please WAIT... Reset in ProgressLoading Program from Port XX% 104 Page 164305-001D