CognitiveTPG A798 Programming Manual

CognitiveTPG A798 Programming Manual

Thermal receipt printer
Hide thumbs Also See for A798:
Table of Contents

Advertisement

A798 Thermal Receipt Printer
Programming Guide
Made under one or more of the following U.S. patents:
4886381, 5579043, 5613787, 5651624, 5713678, 5752779, 5789916, 5800080,
5879090, 5887999, 5975776, 6027266, 6085973, 6089450, 6129465, 6155483,
6404452, 6486902, 6504331, 5749277, 6722754, 6739773, 6784909.

Advertisement

Table of Contents
loading

Summary of Contents for CognitiveTPG A798

  • Page 1 A798 Thermal Receipt Printer Programming Guide Made under one or more of the following U.S. patents: 4886381, 5579043, 5613787, 5651624, 5713678, 5752779, 5789916, 5800080, 5879090, 5887999, 5975776, 6027266, 6085973, 6089450, 6129465, 6155483, 6404452, 6486902, 6504331, 5749277, 6722754, 6739773, 6784909.
  • Page 2 100-240 Vac, 1.6 A, 50/60 Hz, output rated 24 Vdc, 2.5 A for 60 watt unit. Use of this product with a power supply other than the CognitiveTPG power supply will require you to test the power supply and CognitiveTPG printer for FCC and CE mark certification.
  • Page 3: Table Of Contents

    A798 Programming Guide Revision D 10/13 Contents Contents Chapter 1: About this Guide ..............9 How to use this guide .................9 Where to find the basics ..............9 Where to find advanced technical information ........9 Support ....................9 Chapter 2: Diagnostics and Configuration ........11 Start-up Diagnostics .................11...
  • Page 4 A798 Programming Guide Revision D 10/13 Contents Vertical and horizontal positioning ..........30 Text characteristics ................30 Graphics ....................31 Status ....................31 Batch mode ......................31 Real time ....................... 31 Unsolicited status mode ................. 31 Bar codes ....................32 Page mode ..................32 Macros ....................32 User data storage ................33...
  • Page 5 A798 Programming Guide Revision D 10/13 Contents Text characteristics commands ............48 Select double-wide characters ..............48 Select single-wide characters ............... 48 Select 90 degree counter-clockwise rotated print ........ 48 Select pitch (column width) ................49 Set right-side character spacing ..............49 Select print mode ....................
  • Page 6 A798 Programming Guide Revision D 10/13 Contents Real time commands .................71 Preferred implementation ................71 Alternate implementation ................71 Rules for using real time commands ............71 Moving data through the buffer ..............72 Busy line and fault conditions ............... 72 Real time status transmission ...............
  • Page 7 A798 Programming Guide Revision D 10/13 Contents User data storage ................94 Write to user data storage ................94 Read from user data storage ................. 94 Read from non-volatile memory (NVRAM) ..........94 Write to non-volatile memory (NVRAM) ........... 94 Select memory type (SRAM/flash) where to save logos or user-defined fonts ..........
  • Page 8 A798 Programming Guide Revision D 10/13 Contents This page intentionally left blank. A798-PG00001D...
  • Page 9: Chapter 1: About This Guide

    Where to find the basics If you are looking for information on setup or basic operation, refer to the A798 User Guide. The programming guide assumes that you have the A798 User Guide handy for reference or are already familiar with the printer.
  • Page 10: Revision D 10/13 A798 Programming Guide

    Revision D 10/13 A798 Programming Guide Chapter 1: About this Guide This page intentionally left blank. A798-PG00001D...
  • Page 11: Chapter 2: Diagnostics And Configuration

    Revision D 10/13 Chapter 2: Diagnostics and Configuration Chapter 2: Diagnostics and Configuration The A798 printer performs a number of diagnostics that provide useful information about the operating status of the printer. The following diagnostic tests are available. • Start-up diagnostics Performed during the printer’s start-up cycle.
  • Page 12: Runtime Diagnostics

    • Number of flash cycles • CRC number • Number of cutter jams • Number of lines printed • Number of times the cover is opened • Number of knife cuts • Maximum temperature reached (See tallies note on the following page.) A798-PG00001D...
  • Page 13 Revision D 10/13 Chapter 2: Diagnostics and Configuration *** A799 - Diagnostics Form *** *** A798 – Diagnostics Form *** *** A795 - Diagnostics Form *** ********* ********** MAIN MENU ******************************* Model number : A795-2119 Model number : A799-120D-TD00 Serial number...
  • Page 14: Indicators

    For more information about See this section Error conditions and correcting them “ Troubleshooting the printer” in Chapter 4: Using the Printer in the A798 User Guide Communication of printer status to the host application “Command descriptions” in Chapter 4: Programming commands.
  • Page 15: Printer Configuration

    Paper width Normal Printhead setting Datascope Receipt test For more information about See this section • Printer Emulations Using the configuration menu “Configuring the printer” to configure the printer on page 16 Native mode A794 emulation A793 emulation LEGACY emulation A798-PG00001D...
  • Page 16: Configuring The Printer

    4 Make sure receipt paper is loaded in the printer before Flow Control : DTR/DSR Reception Errors : Ignore proceeding. (For loading instructions, see the A798 Press and hold the paper feed button while closing Alternate DTR/DSR : Disabled User Guide) Make sure cover is closed. the receipt cover.
  • Page 17: Communication Interface

    • Parity (can not be changed) • Hardware flow control Software (XON/XOFF) Hardware (DTR/DSR) • Data reception errors Ignore errors Print “?” • Alternate DTR/DSR Enabled Disabled Note: Press the paper feed button for at least one second to validate the selection. A798-PG00001D...
  • Page 18: Diagnostic Modes

    2 Disable the data scope mode. 3 Exit the configuration menu. The printer is on-line and can communicate normally with the host computer. For more information about See this section Enabling the data scope mode “Configuring the printer” on page 16 A798-PG00001D...
  • Page 19: Enable Or Disable Receipt Test Mode

    The A793, A794 and Legacy Command emulations do not recognize the ColorPOS commands. ® Note: Press the paper feed button for at least one second to validate the selection. For more information about See this section Setting the printer emulation “Configuring the Printer” on page 16 A798-PG00001D...
  • Page 20: Printer Settings And Functions

    Some applications expect the command to be ignored while others use the command as a print command. • Default font Sets the default for monochrome and LEGACY emulations. • Font size Allows user to set font size for the emulation being used. A798-PG00001D...
  • Page 21 This setting is the printhead energy rating and must match the rating marked on the front right of the thermal mechanism in the printer. Whenever a new thermal mechanism is installed, this setting must match the indicated energy rating on the mechanism. (See A798 Service manual for replacing the thermal mechanism.) • Print density Adjusts printhead energy level to darken printout or adjust for paper variations.
  • Page 22 Revision D 10/13 Chapter 2: Diagnostics and Configuration This page intentionally left blank. A798-PG00001D...
  • Page 23: Chapter 3: Programming The Printer

    Any nonlegal commands have their parameter sent to the print buffer as data. Comparison to A793 The following table details the list of commands whose behavior differs between the A793, A794, and A798 because of the physical differences of a 6 dots/mm head (A793) versus an 8 dots/mm head (A794 and A798).
  • Page 24 Print and feed paper This command uses n in terms of n/360 inches. Since the A793 had a fundamental step of 1/152 inch and the A798 has a fundamental step of 1/203 inch, the actual line spacing will not exactly match the requested spacing.
  • Page 25: Character Appearance

    576 addressable bits of graphics across an 80mm wide receipt. Minimum print line height is 24 dots for text or graphics. Standard print line spacing is 27 dots (i.e., 3 extra row dots). The A798 adds a 27 dot high font, so standard print spacing is 30 dots. A798-PG00001D...
  • Page 26: Print Zones For 82.5Mm Paper

    Resulting output (1B 7B n) (1B 56 n) (1B 12) A B C Canceled Canceled Cleared Canceled Canceled Note: The following print modes cannot be mixed on the same line: • Right-side up and upside-down • Single-high (normal) and double-high A798-PG00001D...
  • Page 27: Emulation Modes

    • If only the font is changed, the default LPI will automatically be changed as in the table above. • If emulation is switched from any emulation to A798 native, the font and LPI will remain unchanged because the A798 native mode supports all font and LPI options offered in the emulation modes.
  • Page 28 Chapter 3: Programming the Printer Revision D 10/13 This page intentionally left blank. A798-PG00001D...
  • Page 29: Chapter 4: Programming Commands

    Print and carriage return 14 n Feed n print lines 15 n Feed n dot rows 16 n Add n extra dot rows Print 1B 4A n Print and feed paper 1B 64 n Print and feed n lines A798-PG00001D...
  • Page 30: Vertical And Horizontal Positioning

    Select character size 1D 42 n Select or cancel white/black reverse print mode 1F 05 n Select supersctipt or subscript modes 1F 26 s c1 c2 Define extended user-defined character set 1F 69 n Select active user-defined character set A798-PG00001D...
  • Page 31: Graphics

    Real time request to printer (GS sequence) 1D 04 n Real time status transmission (GS sequence) 1D 05 Real time printer status transmission 1F 7A Real time commands disabled Unsolicited status mode Code (hexadecimal) Command Page 1D 61 n Select or cancel unsolicited status mode A798-PG00001D...
  • Page 32: Bar Codes

    Set absolute vertical print position in page mode 1D 5C nL nH Set relative vertical print position in page mode Macros Code (hexadecimal) Command Page 1D 3A Select or cancel macro definition 1D 5E r t m Execute macro A798-PG00001D...
  • Page 33: User Data Storage

    1D 0E Erase all flash contents except boot sector 1D 0F Return main program flash CRC 1D 10 n Erase selected flash sector 1D 11 aL aH cL cH d1…dn Download to active flash sector 1D FF Reset firmware A798-PG00001D...
  • Page 34: Command Conventions

    • Line spacing, pitch, and user-defined character sets are maintained at current selections (RAM is not affected) • Single-wide, single-high, non-rotated, and left-aligned characters are set • Printing position is set to column one Related Information This command is recognized in A793 emulation and A798 native mode, ignored in LEGACY emulation. A798-PG00001D...
  • Page 35: Perform Full Knife Cut

    Selects the device to which the host computer sends data. Related information Other bits of n (1–7) are undefined and ignored. When the printer is disabled by this command, it ignores transmitted data until the printer is re-enabled by the same command. A798-PG00001D...
  • Page 36: Initialize Printer

    When multiple sensors have been selected, anytime one of the sensors detects a paper-end, the paper end signal is output. When this command is executed a sensor is switched. The paper-end signal switching is delayed depending on the receive buffer state. Exceptions The command is ignored, except in parallel communications. A798-PG00001D...
  • Page 37: Select Sensors To Stop Printing

    • On-time = p1 (Hex) x 2 msec • Off-time = p2 (Hex) x 2 msec Related information Off-time is the delay before the printer performs the next operation. Refer to cash drawer specifications for required on and off-time. A798-PG00001D...
  • Page 38: Select Cut Mode And Cut Paper

    The print and feed commands control printing on the receipt and paper feed by the printer. Print and feed paper one line ASCII Hexadecimal Decimal Prints one line from the buffer and feeds paper one line. Carriage return/line feed pair prints and feeds only one line. A798-PG00001D...
  • Page 39: Print And Carriage Return

    The number of lines to feed at current line height setting. Range of n: 0–255 in A798 native mode 0–127 in A793 emulation Feeds the paper n lines at the current line height without printing. Ignored on receipt if current line is not empty.
  • Page 40: Add N Extra Dot Rows

    The following table shows the relationship between the number of lines per inch and each extra dot row added: Extra rows Lines per inch Dot rows 6.77 Related information This is ignored in LEGACY emulation and the parameter byte goes into the print buffer. A798-PG00001D...
  • Page 41: Print

    1B 4A n Decimal 27 74 n Value of n: n/203 inch in A798 native mode, A794 emulation and Application Compatible Escape Commands emulation mode; n/360 inch in A793 emulation mode Range of n: 0–255 Prints one line from the buffer and feeds the paper n/8 mm (n/203 inch). The line height equals the character height when n is too small.
  • Page 42: Vertical And Horizontal Positioning

    The values for nL and nH are two bytes in low byte, high byte word orientation. Sets the print starting position to the specified number of dots (up to the right margin) from the beginning of the line. The print starting position is reset to the first column after each line. Continued ... A798-PG00001D...
  • Page 43: Set Vertical Line Spacing To 1/6 Inch

    In order to improve the speed of printing, the A798 moves the data into a buffer for the printhead when it receives it. When the “Set relative print position” command contains a move to the left, this causes the new data to overstrike the previous data.
  • Page 44: Set Horizontal Tab Positions

    Moves the print starting position the specified number of dots either right (up to the right margin) or left (up to the left margin) of the current position. The print starting position is reset to the first column after each line. Continued ... A798-PG00001D...
  • Page 45 Continued... In order to improve the speed of printing, the A798 moves the data into a buffer for the printhead when it receives it. When the “Set relative print position” command contains a move to the left, this causes the new data to overstrike the previous data.
  • Page 46: Select Justification

    GS L 150 1 Where 2 inches = 406/203, and 406 = (1 X 256) + 150. Exceptions: The command is effective only at the beginning of a line. This command is ignored if the line buffer is not empty. A798-PG00001D...
  • Page 47: Set Horizontal And Vertical Minimum Motion Units

    This command is effective only at the beginning of a line. If the setting exceeds the printable area, the maximum value of the printable area is used. The maximum printable area is 576 dots. See the illustration. Printable Area 576 Dots Left Printing Area Margin Width A798-PG00001D...
  • Page 48: Text Characteristics Commands

    This command is valid only at the beginning of a line. Rotated print and non-rotated print characters cannot be used together in the same line. Related information See “Summary of rotated printing” in this document. This command is ignored in LEGACY emulation. A798-PG00001D...
  • Page 49: Select Pitch (Column Width)

    (set by select print direction in page mode, 1B 54 n) the vertical motion unit (y) is used. Related information This is ignored in LEGACY emulation and the parameter byte goes into the print buffer. In the A793 emulation, the command and parameter byte are ignored. A798-PG00001D...
  • Page 50: Select Print Mode

    Look in Chapter 3: Programming the Printer, “Character appearance” for a description of standard and compressed character pitches. The bits in this command perform the same function as the stand-alone functions: 1B 16 n Select pitch 1B 45 n Emphasized 1B 47 n Double-strike Double-wide Single-wide 1B 2D n Underline A798-PG00001D...
  • Page 51: Select Or Cancel User-Defined Character Set

    (1B 40) is received. Any invalid byte (s, c1, c2, n1) aborts the command. Related information See 1D 22 n (select memory type) to save user-defined characters. A798-PG00001D...
  • Page 52: Define Extended User-Defined Character Set

    This command and the Select Print Mode(s) command (1B 21) turn underline on and off in the same way. Exceptions This command is ignored if n is out of the specified range. Related information In A793 emulation, this command is unrecognized and the parameter n is put into the print buffer. A798-PG00001D...
  • Page 53: Copy Character Set From Rom To Ram

    Related information This command and the select print mode(s) command (1B 21) function identically. They should have the same setting when used together. In A793 emulation, this command is unrecognized and the parameter byte is put into the print buffer. A798-PG00001D...
  • Page 54: Select Or Cancel Double-Strike

    Turns italic print mode on or off. The printer is reset to the standard print mode after a clear printer (0x10) command is received. Exceptions Only the lowest bit of n is valid. Related information This command is recognized in A798 native mode and A794 emulation. In A793 and LEGACY emulations, the parameter byte is put into the buffer. A798-PG00001D...
  • Page 55: Select International Character Code

    Default: 0 (Code Page 437) Selects the character set to be used. Look in “Appendix B: Resident Character Sets” in the A798 User Guide for the character sets. There are two codes for this command (see select international character set, 1B 74 n). Both codes perform the same function.
  • Page 56: Select International Character Set

    Default: 0 (Code Page 437) Selects the character set to be used. Look in “Appendix B: Resident Character Sets” in the A798 User Guide Programming Supplement for the character sets. There are two codes for this command (See “Select international character code, 1B 52 n.) Both codes perform the same function.
  • Page 57: Select Character Size

    In native mode, the vertical direction is limited to 7 (seven times height) when Tall or ColorPOS font is selected. If 8 ® (eight times height) is selected, the results are unspecified. Related information In A793 emulation, this command is discarded and not put into print buffer. A798-PG00001D...
  • Page 58: Select Or Cancel White/Black Reverse Print Mode

    = 0 - 127 Set high order bit of n to configure user-defined character set number as the default. To configure the printer to print from the user-defined character set at power, send 1F 03 0F 01 and reset the printer. Information will print on the first diagnositic page. A798-PG00001D...
  • Page 59: Graphics

    BMP file images that are not monochrome are put into the print buffer. Related information Microsoft BMP bitmap file format. This command is recognized in A798 native mode and in A794 emulation. In A793 and LEGACY emulations, the BMP file bytes are put into the print buffer. A798-PG00001D...
  • Page 60: Select Bit Image Mode

    Sets the print resolution and enters one line of graphics data into the print buffer. Excess data is accepted but ignored. Any print command is required to print the data, after which the printer returns to normal processing mode. See the illustration for graphic representations of the bit image below. A798-PG00001D...
  • Page 61: Print Advanced Raster Graphics

    Each bit corresponds to one horizontal dot. Compare to set bit image mode (1B 2A, m=1) earlier in this document. Related information In LEGACY emulation, this command is unrecognized and the parameters are put into the print buffer. A798-PG00001D...
  • Page 62: Print Flash Logo

    0 definitions, the firmware erases the old definitions at the next power cycle. This is the only case in which the printer erases flash memory without an application command. Continued . . . A798-PG00001D...
  • Page 63: Define Downloaded Bit Image

    Related information This command is recognized in A798 native mode and A794 emulation. In A793 and LEGACY emulations, the parameters are put into the print buffer. Define downloaded bit image ASCII GS * n1 n2 d1 ...
  • Page 64: Print Downloaded Bit Image

    Selects or cancels 6-dot/mm emulation mode. When the 6-dot/mm emulation is selected, logos and graphics are expanded horizontally and vertically during download to emulate their size on a 6-dot/mm printer. The horizontal positioning commands also emulate positioning on a 6-dot/mm printer. A798-PG00001D...
  • Page 65: Status

    Status command introduction The A798 has three methods of providing status to the application. These methods are through batch status commands, real time status commands and unsolicited status mode. An application may use one or more of these methods to understand the current status of the printer.
  • Page 66: Request Alternate Status (A793 Emulation Only)

    In DTS/DSR protocol, the printer waits for DSR = SPACE. Related information See busy line and fault conditions in the real time commands section of this document for details about fault condition reporting. In LEGACY emulation, this command is ignored. A798-PG00001D...
  • Page 67: Transmit Printer Id

    4, 52 = Logo Definition Transmits the printer ID specified by n as follows: Printer ID Specification ID (Hexadecimal) 1, 49 Printer model ID A798 0x24 2, 50 Type ID Installed options Refer to below 3, 51 ROM version ID...
  • Page 68: Transmit Printer Id, Remote Diagnostics Extension

    Return receipt lines tally, preceded by n to identify Printer returns 10 bytes in above example: â00010000<CR> ä Knife cut tally, 8 digit ASCII numeric, Write to NVRAM max 99,999,999 à Knife cut tally Write to NVRAM, and print on receipt to verify A798-PG00001D...
  • Page 69: Transmit Status

    DSR indicates it is ready to receive data. When XON/XOFF RS232C communications handshaking control is selected, the printer transmits the one byte response regardless of the host signal DSR. The status bytes to be transmitted are described in the three tables on the next page. A798-PG00001D...
  • Page 70: Send Printer Software Version

    Exceptions Unlike the A793, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A798 has a single connector that shares data reporting from either cash drawer. When either cash drawer is open, an open status is reported by the printer.
  • Page 71: Real Time Commands

    In this case the printer will use the real time command sequence bytes instead of the other command’s parameter bytes when finally executing that other command from the buffer; the other command will NOT be executed correctly. These three situations generally preclude use of standard DOS drivers for the serial communication ports when using real time commands. A798-PG00001D...
  • Page 72: Moving Data Through The Buffer

    Transmits the selected one byte printer status specified by n in real time according to the following parameters. This command includes two sequences: GS (1D) and DLE (0x10). Exceptions The command is ignored if n is out of range. Continued... A798-PG00001D...
  • Page 73 10 04 n. Unlike the A793, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A798 has a single connector that shares data reporting from either cash drawer. When either cash drawer is open, an open status is reported by the printer.
  • Page 74: Real Time Request To Printer

    An application using DLE (0x10) sequence must send ENQ within 100 milliseconds of DLE or the printer will misinterpret the DLE and execute a clear printer command. Avoid this possibility by using the ID 03 n sequence, that is handled exactly the same as 10 05 n. A798-PG00001D...
  • Page 75: Real Time Printer Status Transmission

    Exceptions Unlike the A793, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A798 has a single connector that shares data reporting from either cash drawer. When either cash drawer is open, an open status is reported by the printer.
  • Page 76: Unsolicited Status Mode

    Recognizing Data from the printer, which follows the USM return description. The status bytes to be transmitted are described in the following four tables. Byte 1 = printer information Byte 2 = error information Byte 3 = paper sensor information Byte 4 = paper sensor information Continued... A798-PG00001D...
  • Page 77 Receipt paper present Receipt paper low (if paper low sensor enabled) Receipt paper present. Receipt paper exhausted. Receipt paper present. Receipt paper exhausted. Not used. Fixed to off. – – – Undefined – – – Undefined Not used. Fixed to off. A798-PG00001D...
  • Page 78: Recognizing Data From The Printer

    Response recognized by: ASCII GS EOT n 1D 04 n Binary DLE EOT n 10 04 n Binary GS ENQ 1D 05 Binary Binary XOFF Binary Unsolicited status mode (USM) Response recognized by: USM Byte 1 Binary USM Byte 2-4 Binary A798-PG00001D...
  • Page 79: Bar Codes

    1D 28 6B 03 00 31 43 n Decimal 29 40 107 3 49 67 n Value of n: 01h ≤ n ≤ 10h Default: This command sets the number of encoded data bytes, including carriage returns and line feeds. A798-PG00001D...
  • Page 80: Select Error Correction Level For Qr Code

    Characters it is possible to specify Numerical Mode data “0” ~ “9” Alphanumeric Mode data “0”~“9”, “A”~ “Z”, SP, $, %, *, +, -, ., /, : Kanji Mode data Shift JIS value (Shift value from JISX0208) 8-bit Byte Mode data 00h ~ FFh A798-PG00001D...
  • Page 81: Print Symbol Data For Qr Code

    A quiet zone of four times the size of one module is required on all sides of the QR code symbol, but it is not included in the printing data. Be sure to add a quiet zone when using this function. A798-PG00001D...
  • Page 82: Select Printing Position Of Hri Characters

    UPC-E rules. Start/stop characters are added for code 39 if they are not included. Rotated barcodes set with small modules (select bar code width command 1D 77 n , with n=1 or 2) and PDF 417 barcodes in any orientation are printed at low speed, for better readability. Continued ... A798-PG00001D...
  • Page 83 0–255 Variable 00–FF Code EAN 128 auto compress 0–255 Variable 00–FF PDF 417 0–255 Variable 00–FF 0 < n < 2800 data length specified via integer n = nH:nL 1D 6B m nL nH d1. . .dn Continued ... A798-PG00001D...
  • Page 84: Print Multiple Barcodes

    See the table. If character code d cannot be encoded, the printer prints the bar code data processed so far, and the following data is treated as normal data. Exceptions Code 93 and PDF 417 are only available in A798 native mode. Print multiple barcodes ASCII...
  • Page 85: Print Gs1 Databar, Null Terminated

    GS1 databar stacked GS1 databar stacked omni-directional GS1 databar limited GS1 databar expanded and expanded stacked UPC-A UPC-E EAN-13 EAN-8 UCC/EAN-128 with CC-A or CC-B UCC/EAN-128 with CC-C Note: Data length specified 1 to 2436 via integer nH : nL. A798-PG00001D...
  • Page 86: Set Gs1 Databar Parameters

    There are no separator bars between rows. Each character has four bars and four spaces within 17 modules, and is assigned a value between 0 and 928. For this symbology, it is common to refer to these character values as “code words.” Continued ... A798-PG00001D...
  • Page 87: Select Bar Code Width

    Select bar code width ASCII GS w n Hexadecimal 1D 77 n Decimal 29 119 n Value of n: 2, 3, 4, 5, 6 Default: Sets the bar code width to n dots. Formulas n/8mm (n/203 inch) A798-PG00001D...
  • Page 88: Page Mode

    Page mode Page mode is one of two modes that the A798 printer uses to operate. Standard mode is typical of how most printers operate by printing data as it is received and feeding paper as the various paper feed commands are received. Page mode is different in that it processes or prepares the data as a “page”...
  • Page 89: Select Page Mode

    • Select 1/6 inch line spacing (1B 32) • Set line spacing (1B 33) Standard mode is automatically selected when power is turned on, the printer is reset, or the initialize printer command (1B 40) is used. Exceptions This command is effective only in page mode. A798-PG00001D...
  • Page 90: Select Print Direction In Page Mode

    (0C or 1B 0C). Exceptions The command is valid only in page mode. The command is ignored if the value of n is out of the specified range. A798-PG00001D...
  • Page 91: Set Print Area In Page Mode

    Maximizing the possible area in page mode consumes almost all of the free RAM. Without any free RAM, bitmap rotations and enlargements cannot be performed. Use the User Storage Status command (1D 97 m n) to determine the amount of free memory. Exceptions The command is effective only in page mode. A798-PG00001D...
  • Page 92: Set Absolute Vertical Print Position In Page Mode

    When pitch n is specified to the movement upward: nL + nH x 256 – 65536 – N Exceptions This command is used only in page mode, otherwise it is ignored. Any setting that exceeds the specified printing area is ignored. A798-PG00001D...
  • Page 93: Macros

    The macro executes r times continuously at the interval specified by t when the LSB (least significant bit) of m = 1. Exceptions If this command is received while a macro is being defined, the macro definition is aborted and the definition is cleared. If the macro is not defined or if r is 0, nothing is executed. A798-PG00001D...
  • Page 94: User Data Storage

    Value of n2: Byte Range of k: 20 – 63 (decimal locations) Writes the two-byte word, n1 n2, to location k in history EEROM. Related information: This is ignored in LEGACY emulation and the parameter bytes go into the print buffer. A798-PG00001D...
  • Page 95: Select Memory Type (Sram/Flash) Where To Save Logos Or User-Defined Fonts

    To specify permanent font flash are, also send 1D22 81 01. Related information This command is recognized in A798 native mode. In A793 and LEGACY emulations, parameter bytes go into the print buffer. Flash memory user sectors allocation ASCII GS “...
  • Page 96: Expanded Flash Memory Allocation

    Select flash area for storing logos and fonts ASCII GS” 0x81 Hexadecimal 1D 22 81 n Decimal 29 34 129 n Value of n: n specifies n = 0 select logo/font area n = 1 select permanent font flash area n > 1 reserved A798-PG00001D...
  • Page 97: Erase User Flash Sector

    (1D 40 n) command, an application should wait for the response from the printer before sending data. Otherwise, data will be lost. If an application is unable to receive data, it should wait a minimum of ten seconds after sending the erase user flash sector (1D 40 n) command before sending data. A798-PG00001D...
  • Page 98: Flash Download

    Return boot sector firmware part number ASCII GS NULL Hexadecimal 1D 00 Decimal 29 0 Returns ACK (Hex 06) + 12 bytes ASCII string describing the flash memory boot sector firmware part number. Ex : 189-1234567A Exceptions Available only in download mode. A798-PG00001D...
  • Page 99: Return Segment Number Status Of Flash Memory

    Erase all flash contents except boot sector ASCII GS SO Hexadecimal 1D 0E Decimal 29 14 Causes the entire flash memory to be erased. The printer returns ACK if the command is successful; NAK if it is unsuccessful. Exceptions Available only in download mode. A798-PG00001D...
  • Page 100: Return Main Program Flash Crc

    Application software for downloading should prompt the user to set the external switches and confirm before sending this command. If the downloading was started from a diagnostic, the reboot will cause the printer to re-enter download state unless the external switches are changed. A798-PG00001D...
  • Page 101: Commands Listed By Hexadecimal Code

    1B 2A m n1 n2 d1...dn Select bit image mode 1B 2D n Select or cancel underline mode 1B 2E m n rL rH d1 … dn Print advanced raster graphics 1B 32 Set vertical line spacing to 1/6 inch A798-PG00001D...
  • Page 102 1B 75 n Request alternate status (A793 emulation only) 1B 76 Transmit paper sensor status 1B 7B n Select or cancel upside-down print mode 1C 70 m n Print Flash Logo 1C 71 n . . . Define Flash Logos A798-PG00001D...
  • Page 103 Set horizontal and vertical minimum motion units 1D 56 m Select cut mode and cut paper (or code 1D 56 m n) 1D 56 m n Select cut mode and cut paper (or code 1D 56 m) 1D 57 nL nH Set printing area width A798-PG00001D...
  • Page 104 Select superscript or subscript modes 1F 26 s c1 c2 Define extended user-defined character set 1F 56 Send printer software version 1F 69 n Select active user-defined character set 1F 74 Print test form 1F 7A Real time commands disable A798-PG00001D...
  • Page 105: Resident Character Sets

    Revision D 10/13 Appendix B: Resident Character Sets Appendix B: Resident Character Sets Character sets Code page 437 (US) A798-PG00001D...
  • Page 106: Code Page 737 (Greek)

    Appendix B: Resident Character Sets Revision D 10/13 Code page 737 (Greek) A798-PG00001D...
  • Page 107: Code Page 850 (Multilingual)

    Revision D 10/13 Appendix B: Resident Character Sets Code page 850 (Multilingual) A798-PG00001D...
  • Page 108: Code Page 852 (Slavic)

    Appendix B: Resident Character Sets Revision D 10/13 Code page 852 (Slavic) A798-PG00001D...
  • Page 109: Code Page 857 (Turkish)

    Revision D 10/13 Appendix B: Resident Character Sets Code page 857 (Turkish) A798-PG00001D...
  • Page 110: Code Page 858 (With Eurosymbol)

    Appendix B: Resident Character Sets Revision D 10/13 Code page 858 (with Eurosymbol) A798-PG00001D...
  • Page 111: Code Page 860 (Portuguese)

    Revision D 10/13 Appendix B: Resident Character Sets Code page 860 (Portuguese) A798-PG00001D...
  • Page 112: Code Page 862 (Hebrew)

    Appendix B: Resident Character Sets Revision D 10/13 Code page 862 (Hebrew) A798-PG00001D...
  • Page 113: Code Page 863 (French Canadian)

    Revision D 10/13 Appendix B: Resident Character Sets Code page 863 (French Canadian) A798-PG00001D...
  • Page 114: Code Page 865 (Nordic)

    Appendix B: Resident Character Sets Revision D 10/13 Code page 865 (Nordic) A798-PG00001D...
  • Page 115: Code Page 866 (Cyrillic)

    Revision D 10/13 Appendix B: Resident Character Sets Code page 866 (Cyrillic) A798-PG00001D...
  • Page 116: Code Page 1251 (Cyrillic)

    Appendix B: Resident Character Sets Revision D 10/13 Code page 1251 (Cyrillic) A798-PG00001D...
  • Page 117: Code Page 1252 (Windows Latin 1)

    Revision D 10/13 Appendix B: Resident Character Sets Code page 1252 (Windows Latin 1) A798-PG00001D...
  • Page 118: Code Page 1255 (Hebrew)

    Appendix B: Resident Character Sets Revision D 10/13 Code page 1255 (Hebrew) A798-PG00001D...
  • Page 119: Code Page Kz_1048 (Kazakh)

    Revision D 10/13 Appendix B: Resident Character Sets Code page KZ_1048 (Kazakh) Code Page KZ_1048 (Kazakh) A798-PG00001D...
  • Page 120 A798 Thermal Receipt Printer: Programmer Guide A798-PG00001 Rev. D 10/2013...

Table of Contents