Page 1
A798II 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.
Contents Contents Chapter 1: About this Guide ..............10 How to use this guide ...............10 Where to find the basics ..............10 Where to find advanced technical information ......10 Support ....................10 Chapter 2: Diagnostics and Configuration ........11 Start-up Diagnostics .................11 Runtime diagnostics .................12 Remote diagnostics ................12 Indicators ...................14 Printer configuration ................15...
Page 4
Contents Status ....................30 Batch mode ......................30 Real time ....................... 31 Automatic status back / Unsolicited status mode ......... 31 Bar codes ....................31 Page mode ..................32 Macros ....................32 User data storage ................32 Flash download .................32 Settings commands ................33 Miscellaneous configuration commands ........33 Command conventions ..............34 Command descriptions ..............34 Printer actions ...................34...
Page 5
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 ....................50 Select or cancel user-defined character set ..........
Page 6
Contents Logo print with knife cut ................70 Set temporary max target speed ..............71 Convert 6-dots/mm bitmap to 8-dots/mm bitmap ......71 Enable constant speed logos ................ 71 Status ....................72 Status command introduction ..............72 Batch mode ..................72 Transmit peripheral device status (RS-232C printers only) ....72 Transmit paper sensor status ................
Page 7
Contents Print DataMatrix symbol data in the symbol storage area ....105 Page mode ..................106 Print and return to standard mode ............106 Cancel print data in page mode..............106 Print data in page mode ................106 Select page mode ...................107 Select standard mode ..................108 Select print direction in page mode ............108 Set print area in page mode ................109 Set absolute vertical print position in page mode ......110...
Page 8
Contents Enable or disable barcode string terminator.........121 Enable or disable USM canned status ............122 Send diagnostic pages to comm port .............122 Enable or disable EJ action via operator control ........122 Set fine adjustment of partial cut steps ..........123 Set printer ID mode ..................123 Set default code page at power on ............123 Set Asian ASCII characters to narrow ............123 Set vertical white space.................124...
This guide contains the most complete information available on programming the printer. If you cannot find what you need here or would like further guidance on how to program the printer, contact a CognitiveTPG representative for assistance. If you are having problems with the physical operation of the printer, the Service Guide provides in-depth information on diagnostics and service.
Chapter 2: Diagnostics and Configuration Chapter 2: Diagnostics and Configuration The 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. •...
Chapter 2: Diagnostics and Configuration Runtime diagnostics Runtime diagnostics (sometimes called level 2 diagnostics) run during normal printer operation. When the following conditions occur, the printer automatically turns off the appropriate motors and disables printing to prevent damage to the printer: •...
Page 13
Chapter 2: Diagnostics and Configuration A798II Diagnostics Form *** A798II - Diagnostics Form *** Model number : A798-780X-TD00 Serial number : 0000000000 Loader Firmware : PN#: 189-799L111 Date : Nov 10 2015 Flash Firmware Revision : V1.46 : 9701 - Set Firmware Features - >...
Chapter 2: Diagnostics and Configuration Indicators The printer communicates various conditions both visually, with the green LED or audibly, with a series of tones or beeps. The following table lists these indicators. Indicator Sequence Condition Continuous, flashing quickly Paper out Cover open Knife unable to home Continuous, flashing slowly...
Chapter 2: Diagnostics and Configuration Printer configuration Printers are shipped with all the functions and parameters preset at the factory. Settings for various printer parameters can be changed. This menu is printed on the receipt and scrolls through instructions for selecting and changing any of the functions or parameters.
Chapter 4: Programming Commands Configuring the printer The configuration menu allows you to select functions or change various settings for the printer. Instructions printed on the receipt guide you through the processes. Caution: Be extremely careful changing any of the printer settings to avoid changing other settings that might affect the performance of the printer.
Chapter 2: Diagnostics and Configuration Communication interface settings To change the communication interface settings, enter the configuration menu, select “Set Communication Interface” from the main menu. Caution: Be extremely careful changing any of the printer settings to avoid inadvertently changing other settings that might affect the performance of the printer.
Chapter 2: Diagnostics and Configuration Diagnostics modes To change the diagnostic modes enter the configuration menu, select “Set Diagnostics Modes” from the main menu and select one of the following modes: • Normal: normal operating mode of the printer. • Datascope: the receipt printer prints incoming commands and data in hexadecimal format to help troubleshoot communication problems.
Chapter 2: Diagnostics and Configuration Enable or disable receipt test mode The receipt test mode verifies proper receipt printing. Receipt test is enabled and disabled by selecting the “Diagnostics Modes” sub-menu of the configuration menu. See “Configuring the printer”, page 16 for instructions on how to enter the configuration menu.
This function is used to determine what printer ID value is returned in response to a Transmit printer ID command (1D 49 n) when the printer is in A794 emulation mode. The printer can be configured to send back the ID of the A798II, A794, A793 or Application Compatible Escape Command systems.
Adjusts printhead energy level to darken printout or adjust for paper variations. When printer prints high-density print lines (text or graphics), it automatically slows down. Factory setting for the A798II is 100%. WARNING: Choose a print density setting no higher than necessary to achieve acceptable print density. Failure to observe this rule may result in a printer service call and may void the printer warranty.
Chapter 2: Diagnostics and Configuration Select the firmware features sub-menu to set: • Paper selection lockout • Beep after knife cut • Cash drawer open after knife cut • Energy-savings timeout value Allows the user to enable and set the time-out value to 15, 30, 60, 120, or 240 minutes, or to disable the feature. A798-2PG0001B 8/2017...
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 A798II because of the physical differences of a 6 dots/mm head (A793) versus an 8 dots/mm head (A794 and A798II).
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 A798II has a fundamental step of 1/203 inch, the actual line spacing will not exactly match the requested spacing.
The A798II Series adds a 27 dot high font, so standard print spacing is 30 dots. The A798II Series paper-saving feature adds a 18 dot high font and reduces extra dot rows to 2, so standard print spacing is 20 dots.
Chapter 3: Programming the Printer Print zones for 82.5mm paper Specifications of print zone for 82.5 mm paper: • 640 dots (addressable) @ 8 dots/mm, centered on 82.5mm • Standard mode: minimum margins: 1.0mm (0.040 inches) • Top margin to manual tear-off: 17.8mm (0.70 inches) •...
Chapter 3: Programming the Printer Emulation modes The CognitiveTPG A798II Series printer may be operated in a number of different emulation modes. However, printing characteristics and defaults may differ, depending on the desired mode. Print setup in emulation modes Refer to the chart below for defaults and allowed printing options in each emulation mode.
Chapter 4: Programming Commands Vertical and horizontal positioning Code (hexadecimal) Command Page Horizontal tab 1B 14 n Set column 1B 24 nL nH Set absolute starting position 1B 32 Set vertical line spacing to 1/6 inch 1B 33 n Set vertical line spacing 1B 44 n1...nk 00 Set horizontal tab positions 1B 5C n1 n2...
Chapter 4: Programming Commands 1D F0 03 Save font ID number as default font at power up 1D F0 80 Download font 1D F0 C0 02 Download font list 1F 03 45 FSID Configure use of font set over power cycles 1F 03 46 n Configure line spacing 1F 05 n...
Chapter 4: Programming Commands Real time Code (hexadecimal) Command Page 10 04 n Real time status transmission (DLE sequence) 10 05 n Real time request to printer (DLE sequence) 1D 03 n Real time request to printer (GS sequence) 1D 04 n Real time status transmission (GS sequence) 1D 05 Real time printer status transmission...
Chapter 4: Programming Commands Page mode Code (hexadecimal) Command Page Print and return to standard mode Cancel print data in page mode 1B 0C Print data in page mode 1B 4C Select page mode 1B 53 Select standard mode 1B 54 n Select print direction in page mode 1B 57 n1, n2…n8 Set print area in page mode...
Chapter 4: Programming Commands Command conventions The following information describes how each command is organized: Name: Name of command. ASCII: The ASCII control code. Hexadecimal: The hexadecimal control code. Decimal: The decimal control code. Value: A description of the command operands. Range: The upper and lower limits of the command operand.
Chapter 4: Programming Commands Perform partial knife cut ASCII ESC m Hexadecimal 1B 6D Decimal 27 109 Partially cuts the receipt. The default setting leaves 5mm (0.20 inch) of paper on the left edge. (See setting partial cut distance in diagnostics.) There are two codes (Hex 1A or 1B 6D) for this command and both codes perform the same function.
Chapter 4: Programming Commands Initialize printer ASCII ESC @ Hexadecimal 1B 40 Decimal 27 64 Default: Character pitch: 15.6 CPI Column width: 44 characters Extra dot rows: Character set: Code Page 437 Printing position: Column One Clears the print line buffer and resets the printer to the default settings for the start-up configuration (refer to Default settings above).
Chapter 4: Programming Commands Generate pulse to open cash drawer ASCII ESC p n p1 p2 Hexadecimal 1B 70 n p1 p2 Decimal 27 112 n p1 p2 Value of n: 00, 48 (Decimal) = Drawer 1; 01, 49 (Decimal) = Drawer 2 Value of p1: 0–255 Value of p2:...
Chapter 4: Programming Commands Set timeout value for low-power idle state ASCII US ETX ‘ ll hh Hexadecimal 1F 03 3C ll hh Decimal 31 03 60 ll hh Value of ll: low byte of time in seconds Value of hh: high byte of time in seconds This command sets the timeout value in seconds.
Chapter 4: Programming Commands Print and paper feed 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.
Chapter 4: Programming Commands Feed n dot rows ASCII NAK n Hexadecimal 15 n Decimal 21 n Value of n: n/203 inch Range of n: 0–255 in Native mode 0–127 in A793 emulation Feeds the paper n dot rows (n/8 mm, n/203 inch), without printing. Receipt moves n rows if the print buffer is empty. Related information This is ignored in LEGACY emulation and the parameter byte goes into the print buffer.
Chapter 4: Programming Commands Print ASCII Hexadecimal Decimal Prints one line from the buffer and feeds paper one line. Executes LF on receipt. Related information This command is ignored in LEGACY emulation. Print and feed paper ASCII ESC J n Hexadecimal 1B 4A n Decimal...
Chapter 4: Programming Commands Vertical and horizontal positioning The horizontal positioning commands control the horizontal print positions of characters on the receipt. The commands describe operation for 80mm paper. If the printer supports 82.5mm paper, the dot spacing is the same but there are 640 printable dots rather than 576 printable dots on the 80mm paper.
In order to improve the speed of printing, the A798II 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.
Chapter 4: Programming Commands Set vertical line spacing ASCII ESC 3 n Hexadecimal 1B 33 n Decimal 27 51 n Value of n: n/406 inch in Native mode n/360 inch in A793 emulation mode n/203 inch in Application Compatible Escape Commands emulation mode Range of n: 0-255 Default:...
In order to improve the speed of printing, the A798II 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 Continued...
Chapter 4: Programming Commands previous data. This behavior can be used to an application’s advantage to provide the ability to create compound characters on the receipt station. This command also functions differently in the A793 emulation when used in graphics: n x 2 = Number of dots to be moved from the beginning of the line when this command is followed by a graphic command.
Chapter 4: Programming Commands Set printing area width ASCII GS W nL nH Printable Area 576 Dots Hexadecimal 1D 57 nL nH Decimal 29 87 nL nH Range of nL: 0–255 Left Printing Area Margin Width Range of nH: 0–255 Default: 576 dots (the maximum printable area) Sets the width of the printing area until the printer is initialized, reset, or powered off.
Chapter 4: Programming Commands Text characteristics commands These commands control what the printed information looks like, selection of character sets, definition of custom-defined characters, and setting of margins. The commands are described in order of their hexadecimal codes. The commands describe operation for 80mm paper. If the printer supports 82.5mm paper, the dot spacing is the same but there are 640 printable dots rather than 576 printable dots on 80mm paper.
Chapter 4: Programming Commands Select pitch (column width) ASCII ESC SYN n Hexadecimal 1B 16 n Decimal 27 22 n Value of n: 0 = Standard pitch 1 = Compressed pitch Default: 0 (Standard pitch) Selects the character pitch for a print line. Formulas The following table provides the print characteristics for both pitches on the receipt station.
Chapter 4: Programming Commands Select print mode ASCII ESC ! n Hexadecimal 1B 21 n Decimal 27 33 n Value of n: Pitch selection (standard, compressed, double high, or double wide.) Value of n Function Bit 0 Pitch Standard Compressed (See chart below) pitch pitch...
Chapter 4: Programming Commands Select or cancel user-defined character set ASCII ESC % n Hexadecimal 1B 25 n Decimal 27 37 n Value of n: 0 = Code Page 437 1 = User Defined (RAM) 2 = Code Page 850 Range of n: 0–2 Default:...
Chapter 4: Programming Commands Define extended user-defined character set ASCII US & s c1 c2 [character 1 data] ... [character k data] Hexadecimal 1F 26 s c1 c2 [character 1 data] ... [character k data] Decimal 31 38 s c1 c2 [character 1 data] ... [character k data] Values and ranges: s = the number of dot rows in the character cell (maximum 64) c = the ASCII codes of the first (c1) and last (c2) characters respectively...
Chapter 4: Programming Commands Copy character set from ROM to RAM ASCII ESC : 0 0 0 Hexadecimal 1B 3A 30 30 30 Decimal 27 58 0 0 0 Default: Current active ROM code page Copies characters in the active ROM set to RAM. Use this command to re-initialize the user-defined character set. Code page 437 is copied by default at initialization.
Chapter 4: Programming Commands Select or cancel double-strike ASCII ESC G n Hexadecimal 1B 47 n Decimal 27 71 n Value of n: 0 = Off 1 = On (When 0 and 1 are the least significant bit, LSB) Default: 0 (Off ) Turns double-strike mode on or off until the printer is initialized, reset, or powered off.
Chapter 4: Programming Commands Selects the character set to be used until the printer is initialized, reset, or powered off. Look in “Appendix B: Resident Character Sets” in this programming guide for the character sets. The alphanumeric characters (0x20-0x7F) are the same for each set.
Chapter 4: Programming Commands Select character size ASCII GS ! n Hexadecimal 1D 21 n Decimal 29 33 n Value of n: 1–8 = vertical number of times active font 1–8 = horizontal number of times active font Range of n: 00–07, 10–17, ...70–77 Default of n: 11 hexadecimal...
Chapter 4: Programming Commands Select or cancel white/black reverse print mode ASCII GS B n Hexadecimal 1D 42 n Decimal 29 66 n Value of n: 0 = Off 1 = On (When 0 and 1 are the least significant bit, LSB) Range of n: 0–255 Default:...
Chapter 4: Programming Commands Select superscript or subscript modes ASCII US ENQ n Hexadecimal 1F 05 n Decimal 31 05 n Value of n: 0 = Normal character size 1 = Select subscript size 2 = Select superscript size Default: 0 (normal size) Turns superscript or subscript modes on or off.
Chapter 4: Programming Commands Download font list ASCII GS 0xF0 0xC0 Hexadecimal 1D F0 C0 Decimal 29 240 192 Print downloaded font information. Configure use of font set ASCII US ETX 0x45 FSID Hexadecimal 1F 03 45 FSID Decimal 31 03 69 FSID Value of FSID: font ID 00 = 24 high...
Chapter 4: Programming Commands Double-byte fonts Five double-byte fonts are available for use on the A798II Series printer: Simplified Chinese, Traditional Chinese, Kanji, Korean and Thai. The Thai font (Code Page 874) is already available as a resident code page.
Chapter 4: Programming Commands Select font ID number ASCII GS 0xF0 0x01 n Hexadecimal 1D F0 01 n Decimal 29 240 1 n Value of n: 128 - 255 Select font ID number for downloaded font. This command is sent before downloading the map file for a specific font. Each font ID has one map file to download. This command is also sent to select a downloaded font at run time.
Chapter 4: Programming Commands Download font ASCII GS 0xF0 0x80 followed by file Hexadecimal 1D F0 80 Decimal 29 240 128 This command is the sequence introducer for downloading existing files. The downloaded font is always stored in the permanent font area of flash. If there is not enough memory in the permanent font area to store the file the printer returns NACK.
Chapter 4: Programming Commands Select bit image mode ASCII ESC * m n1 n2 d1 ... dn Hexadecimal 1B 2A m n1 n2 d1 ... dn Decimal 27 42 m n1 n2 d1 ... dn Value of m: Value of m Mode No.
Chapter 4: Programming Commands Print advanced raster graphics ASCII ESC . m n rL rH d1 … dn Hexadecimal 1B 2E m n rL rH d1 … dn Decimal 27 46 m n rL rH d1 … dn Value of m: horizontal offset from left margin = 8 x m dots Value of n: number of data bytes that compose the raster...
Chapter 4: Programming Commands Select the current logo ASCII GS # n Hexadecimal 1D 23 n Decimal 29 35 n Range of n: 0 – 255 Default: Selects a monochrome logo to be defined or printed. The active logo n remains in use until this command is sent again with a different logo n.
Chapter 4: Programming Commands Define downloaded bit image ASCII GS * n1 n2 d1 ... dn] Hexadecimal 1D 2A n1 n2 d1 ... dn] Decimal 29 42 n1 n2 d1 ... dn] Value of n: Value of n1 Value of n2 Value of d 1–72 (8 x n1 = number of 1–64 (number of vertical bytes)
Chapter 4: Programming Commands Print downloaded bit image ASCII GS / m Hexadecimal 1D 2F m Decimal 29 47 m Value and range of m: This command is used to print a previously stored monochrome logo (defined by 1D 2A) from printer memory on the receipt station.
Chapter 4: Programming Commands Print Flash Logo ASCII FS p n m Hexadecimal 1C 70 n m Decimal 28 112 n m Print flash logo ID n using mode m. See command 1D 2F m for description of mode m. See command 1C 71 for description of n.
Chapter 4: Programming Commands receipt past the knife should be removed. The command is available only in Native mode. Related information See “Print downloaded bit image” command. Set temporary max target speed ASCII GS 0xA0 nl nh Hexadecimal 1D A0 nl nh Decimal Values: 15 00 - 5E 01 monochrome...
Exceptions Unlike the A793, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A798II 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.
4, 52 = Logo Definition Transmits the printer ID specified by n as follows: Printer ID Specification ID (Hexadecimal) 1, 49 Printer model ID A798II 0x24 2, 50 Type ID Installed options Refer to below 3, 51 ROM version ID...
Page 74
Chapter 4: Programming Commands Knife installed. – – – Undefined. – – – Undefined. Not used. Fixed to Off. – – – Undefined – – – Undefined Not used. Fixed to Off. n = 4 or 52: Logo Definition Off/On Decimal Function No logo downloaded (SRAM or Flash)
Chapter 4: Programming Commands Transmit printer ID, remote diagnostics extension ASCII GS I @ n Hexadecimal 1D 49 40 n Decimal 29 73 64 n Values of n: Refer to table Range of n: 32–255 (not all defined, but reserved) Twenty-five remote diagnostic items are defined in the following table: five printer ID items and twenty printer tally items.
Page 76
Chapter 4: Programming Commands Hours on tally, 8 digit ASCII numeric, Write to NVRAM max 99,999,999 Hours on tally Write to NVRAM, and print on receipt to verify Hours on tally Clear Hours on tally to 0 Hours on tally Return hours on tally, returns 10 bytes Flash firmware version Return flash firmware version, returns 6 bytes...
Page 77
Chapter 4: Programming Commands Printhead Changes Write to NVRAM Printhead Changes Write to NVRAM, and print on receipt to verify Printhead Changes Clear Printhead Changes tally to 0 Printhead Changes Return Printhead Changes tally, returns 10 bytes Receipt Mechanism Changes Write to NVRAM Receipt Mechanism Changes Write to NVRAM, and print on receipt to verify...
Exceptions Unlike the A793, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A798II 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.
Chapter 4: Programming Commands Flash memory user sector status (n = 4 or n = 52) Bit Off/On Hex Decimal Status for transmit status – – – Undefined. Fixed to off. – – – Undefined. Fixed to off. User data storage write successful User data storage write failed, specified area not erased.
Chapter 4: Programming Commands Preferred implementation For a new application the GS (1D) sequences are recommended to avoid possible misinterpretation of a DLE (0x10) sequence as a clear printer (0x10 0, ASCII DLE NUL) command. An application using these GS (1D) sequences, does not need to distinguish for the printer between the new real time commands and the clear printer command.
10 04 n. Unlike the A793, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A798II 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 82
Chapter 4: Programming Commands 2 = Transmit RS-232C Busy Status Bit Status Hex Decimal Function Fixed to off. Fixed to on. Cover closed. Cover open. Paper feed button is not pressed. Paper feed button is pressed. Fixed to on. Printing not stopped due to paper condition. Printing stopped due to paper condition.
Chapter 4: Programming Commands Real time request to printer GS sequence DLE sequence ASCII GS ETX n DLE ENQ n Hexadecimal 1D 03 n 10 05 n 29 3 n 16 5 n Value of n: 1 = recover and restart 2 = recover and clear buffers The printer responds to a request from the host specified by n.
Exceptions Unlike the A793, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A798II 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.
Chapter 4: Programming Commands Automatic Status Back Enable/disable Automatic Status Back (ASB) ASCII: GS a n Hexadecimal: 1D 61 n Decimal: 29 97 n Range of n: 0 - 255 Default: 0 (ASB disabled) Enables or disables automatic status back (ASB) and specifies the status items. This command is a batch mode command; that is, it is processed after all prior data in the input buffer has been processed.
Page 86
Chapter 4: Programming Commands Byte 1 = printer information Byte 2 = error information Byte 3 = paper sensor information Byte 4 = paper sensor information First Byte (Printer Information) Bit Off/On Hex Decimal Status for ASB Not used. Fixed to off. Not used.
Page 87
Chapter 4: Programming Commands Receipt paper exhausted. Not used. Fixed to off. – – – Undefined – – – Undefined Not used. Fixed to off. Fourth byte (paper sensor information) Bit Off/On Hex Decimal Status for ASB – – – Undefined –...
Chapter 4: Programming Commands Unsolicited status mode Select or cancel unsolicited status mode (USM) ASCII: GS a n Hexadecimal: 1D 61 n Decimal: 29 97 n Value of n: 0 turns mode off; any non-zero value turns mode on Default: 0 (USM disabled) Enables or disables automatic return of 4 status bytes whenever one or more of the listed changes occurs.
Page 89
Chapter 4: Programming Commands Not busy at the RS232C interface. Printer is busy at the RS232C interface. Not used. Fixed to on. Receipt cover closed. Receipt cover open. Paper feed button is not pressed. Paper feed button is pressed. Not used. Fixed to off. Second byte (error information) Bit Off/On Hex Decimal Status for USM –...
Chapter 4: Programming Commands Bar codes These commands format and print bar codes and are described in order of their hexadecimal codes, with the exception of the QR code overview, which is described in the order of use in creating two- dimensional QR codes.
Chapter 4: Programming Commands Set data parsing mode for QR Code ASCII GS ( k ETX NUL 1 D m Hexadecimal 1D 28 6B 03 00 31 44 m Decimal 29 40 107 3 49 68 m Value of m: 30h = Manual Mode 31h = Auto Mode (default) This command specifies which method of data parsing to use.
Chapter 4: Programming Commands Transmit QR code print size ASCII GS ( k ETX NUL 1 R 0 Hexadecimal 1D 28 6B 03 00 31 52 30 Decimal 29 40 107 03 00 49 82 48 Transmits the size information for printing the QR symbol data stored by the store data command in the symbol storage area.
Page 95
Chapter 4: Programming Commands “2001”. (0x32 30 30 31) No barcode data in the symbol storage area. Put data in the print buffer. “2002”. (0x32 30 30 32) The symbol size is bigger than the current printing area. “3001”. (0x33 30 30 31) Too much data.
Chapter 4: Programming Commands Select printing position of HRI characters ASCII GS H n Hexadecimal 1D 48 n Decimal 29 72 n Value of n: Printing position 0 = Not printed 1 = Above the bar code 2 = Below the bar code 3 = Both above and below the bar code Default: 0 (Not printed)
Page 97
Chapter 4: Programming Commands 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. Exceptions The command is only valid at the beginning of a line. Illegal data cancels the command.
Chapter 4: Programming Commands PDF 417 0–255 Variable length 00–FF 0 < n < 2800 data length specified via integer n = nH:nL 1D 6B m nL nH d1 . . . dn The value of m selects the bar code system as described in the table. The variable d indicates the character code to be encoded into the specified bar code system.
Chapter 4: Programming Commands Set GS1 DataBar parameters Setting of parameters for GS! DataBar ASCII GS q a b c d e fL fH Hexadecimal 1D 71 a b c d e fL fH Decimal 29 113 a b c d e fL fH pixels per minimum unit, default 3, minimum 2, maximum 6 (value a applies byte to parameters b, c, d)
Chapter 4: Programming Commands There are three mutually exclusive sets of symbol patterns, or clusters, each having 929 distinct patterns. Because different clusters are used for adjacent rows, it is possible for the decoder to tell if the scanning path is crossing row boundaries without the use of separator bars.
Chapter 4: Programming Commands Print DataMatrix symbol data in the symbol storage area ASCII GS ( k pL pH cn fn m Hexadecimal 1D 28 6B 03 00 36 51 30 Decimal 29 40 107 3 0 54 81 48 Value and Ranges: Value: Ranges:...
Page mode Page mode is one of two modes that the A798II 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”...
Chapter 4: Programming Commands Select page mode ASCII ESC L Hexadecimal 1B 4C Decimal 27 76 Switches from standard mode to page mode. After printing has been completed either by the print and return to standard mode (FF) command or select standard mode (1B 53) the printer returns to standard mode. The developed data is deleted after being printed.
Chapter 4: Programming Commands Select standard mode ASCII ESC S Hexadecimal 1B 53 Decimal 27 83 Switches from page mode to standard mode. In switching from page mode to standard mode, data buffered in page mode are cleared, the printing area set by set print area in page mode (1B 57) is initialized and the print position is set to the beginning of the line.
Chapter 4: Programming Commands Set absolute vertical print position in page mode ASCII GS $ nL nH Hexadecimal 1D 24 nL nH Decimal 29 36 nL nH Sets the absolute vertical print starting position for buffer character data in page mode. The absolute print position is set to [(nL + nH X 256) x (vertical or horizontal motion unit)] inches.
Chapter 4: Programming Commands Macros These commands are used to select and perform a user-defined sequence of printer operations. Select or cancel macro definition ASCII GS : Hexadecimal 1D 3A Decimal 29 58 Starts or ends macro definition. Macro definition begins when this command is received during normal operation and ends when this command is received during macro definition.
Chapter 4: Programming Commands User data storage Write to user data storage ASCII ESC ‘ m a0 a1 a2 d1 ... dm Hexadecimal 1B 27 m a0 a1 a2 d1 ... dm Decimal 27 39 m a0 a1 a2 d1 ... dm Value of m: 0 –...
Chapter 4: Programming Commands Flash memory user sectors allocation ASCII GS “ U n1 n Hexadecimal 1D 22 55 n1 n2 Decimal 29 34 85 n1 n2 Default Value of n1: 1 (see below) Default Value of n2: 1 (see below) n1 is the number of 64k sectors used for logos and user-defined characters.
Chapter 4: Programming Commands Expanded flash memory allocation ASCII GS “ 0x80 Hexadecimal 1D 22 80 Decimal 29 34 128 This sequence of commands is used to specify the number of flash sectors to be used for different applications. The begin and end sequence commands must be sent.
Chapter 4: Programming Commands Erase user flash sector ASCII GS @ n Hexadecimal 1D 40 n Decimal 29 64 n Value of n: 49 – 51 n = 49 (ASCII n = 1) HEX 31 This command erases all 64K flash memory sectors allocated to user-defined character and logos storage. Those sectors should be erased in two situations: when the logo definition area is full and an application is attempting to define new logos, and when an application wants to replace one user-defined character set with another.
Chapter 4: Programming Commands When each flash download command is received, the printer returns either ACK or NAK to the host computer when each command is received: • ACK (hexadecimal 06) Sent when the printer has received a host transmission and has completed the request successfully. •...
Chapter 4: Programming Commands Download application ASCII GS DC1 NUL NUL NUL NUL d1… dn Hexadecimal 1D 11 00 00 00 00 d1… dn Decimal 29 17 0 0 0 0 d1… dn Value of d: data bytes, 0–255 Sending this command followed by an application will download the application to the printer. This will reprogram the flash.
Chapter 4: Programming Commands Settings commands The following commands enable the user to save and restore printer settings. Save current settings ASCII US HT SOH ACK Hexadecimal 1F 09 01 06 Decimal 31 09 01 06 Saves all current settings as factory settings. Restore factory settings ASCII US HT SOH BEL...
Chapter 4: Programming Commands Set font size ASCII US EXT DLE n Hexadecimal 1F 03 10 n Decimal 31 03 16 n Value of n: 0 = Standard 24 high 1 = Tall font 3 = Paper-Savings font Sets font size for the emulation being used. Enable or disable Code 128 check digit calculation ASCII US EXT ESC n...
Chapter 4: Programming Commands Enable or disable USM canned status ASCII US EXT 0x28 n Hexadecimal 1F 03 28 n Decimal 31 03 40 n Value of n: 0 = Disable 1 = Enable Default: 0 (Disable) Enables or disables the USM canned status feature. Send diagnostic pages to comm port ASCII US EXT 0x2C n...
If n > 0, the printer ID will transmit whaver value of n is selected. If n = 0, the printer can be configured to send back the ID of the A798II, A794, A793 or Application Compatible Escape Command systems using the confiuration menu.
Chapter 4: Programming Commands Set vertical white space ASCII US EXT 0x47 n Hexadecimal 1F 03 47 n Decimal 31 03 71 n Value of n: number of dot rows 0 = Reduced white space on FF = Normal spacing When this command is sent, the amount of white space on the printed receipt is n dot rows.
Appendix A: Commands by Hexadecimal Code Appendix A: Commands listed by hexadecimal code Code (hexadecimal) Command Page Horizontal tab Print and feed paper one line Print and return to standard mode Print and carriage return Clear printer 10 04 n Real time status transmission (DLE sequence) 10 05 n Real time request to printer (DLE sequence)
Page 126
Appendix A: Commands by Hexadecimal Code Code (hexadecimal) Command Page 1B 33 n Set vertical line spacing 1B 34 m a0 a1 a2 Read from user data storage 1B 3A 30 30 30 Copy character set from ROM to RAM 1B 3D n Select peripheral device (for multi-drop) 1B 3F n...
Page 127
Appendix A: Commands by Hexadecimal Code Code (hexadecimal) Command Page 1D 0E Erase all flash contents except boot sector 1D 0F Return main program flash CRC 1D 11 00 00 00 00 d1…dn Download Application 1D 21 n Select character size 1D 22 n Select memory type (SRAM/Flash) where to save logos or user-defined fonts 1D 22 55 n1 n2...
Page 128
Appendix A: Commands by Hexadecimal Code Code (hexadecimal) Command Page 1D 57 nL nH Set printing area width 1D 5C nL nH Set relative vertical print position in page mode 1D 5E r t m Execute macro 1D 61 n Enable/disable Automatic Status Back (ASB) 1D 61 n Select or cancel unsolicited status mode...
Page 129
Appendix A: Commands by Hexadecimal Code Code (hexadecimal) Command Page 1F 03 1B n Enable or disable Code 128 check digit calculation 1F 03 1D n Enable or disable barcode ITF leading zero 1F 03 1E n Enable or disable barcode string terminator 1F 03 28 n Enable or disable USM canned status 1F 03 2C n...
Appendix B: Resident Character Sets Appendix B: Resident Character Sets Character sets Character code table Page 0 (PC437: USA, Standard Europe): " & < > ⌂ Ç ü é â ä à å ç ê ë è ï î ì Ä...
Appendix B: Resident Character Sets Character code table Page 1 (PC850: Multilingual Latin I): " & < > ⌂ Ç ü é â ä à å ç ê ë è ï î ì Ä Å É æ Æ ô ö ò...
Appendix B: Resident Character Sets Character code table Page 23 (PC720: Arabic): " & < > ⌂ é â à ç ê ë è ï î _ّ _ْ ô ¤ ـ û ù ء آ أ ؤ £ إ ئ ا...
Need help?
Do you have a question about the A798II and is the answer not in the manual?
Questions and answers