A795 Two-Color Thermal Receipt Printer User Guide Programming Supplement TM A795-D100 PS
Federal Communications Commission (FCC) Radio Frequency Interference Statement Warning Changes or modifications to this unit not expressly approved by the party responsible for compliance could void the user’s authority to operate the equipment. Note This equipment has been tested and found to comply with the limits for a Class A digital device, pursuant to Part 15 of the FCC Rules.
A795 User Guide: Programming Supplement Contents Contents Chapter 1: About this Supplement ..................................................................... 9 How to use this supplement ............................................................................... 9 Where to find the basics ....................................................................................... 9 Where to find advanced technical information ........................................ 9 Support ............................
A795 User Guide: Programming Supplement Contents Chapter 4: Programming Commands ............................................................ 27 Commands listed by function ......................................................................... 27 Printer actions ........................................................................................................... 27 Print and paper feed ..............................................................................................
A795 User Guide: Programming Supplement Contents Vertical and horizontal positioning .................................................................. 46 Horizontal tab ..................................................................................................... 46 Set horizontal and vertical minimum motion units ............................. 46 Set column ........................................................................................................... 46 Set absolute starting position .
A795 User Guide: Programming Supplement Contents Graphics ...................................................................................................................... 63 Download BMP logo ........................................................................................ 63 Select bit image mode .................................................................................... 64 Print advanced raster graphics .....................................................................
A795 User Guide: Programming Supplement Contents Bar codes .................................................................................................................... 90 Select printing position of HRI characters ............................................... 90 Select pitch of HRI characters ....................................................................... 90 Select bar code height .................................................................................... 90 Print bar code ......
A795 User Guide: Programming Supplement Contents Appendix A: Commands listed by hexadecimal code ..................................................... 111 By command code .............................................................................................. 111 Appendix B: Resident Character Sets ...................................................................................... 117 Character sets ................................................................................................
A795 User Guide: Programming Supplement Chapter 1: About this Supplement Chapter 1: About this Supplement How to use this supplement This is a supplemental guide providing programming information on Axiohm’s A795 printer. It is written for tech-savvy users who are interested in customizing or adjusting printer functionality and is meant to be used in conjunction with the A795 ColorPOS™ Two-Color Thermal Receipt Printer: User Guide.
A795 User Guide: Programming Supplement Chapter 1: About this Supplement
A795 User Guide: Programming Supplement 11 Chapter 2: Diagnostics and Configuration Chapter 2: Diagnostics and Configuration The A795 printer performs a number of diagnostics which provide useful information about the operating status of the printer. The following diagnostic tests are available. See the sections that follow for more information. • Startup diagnostics Performed during the printer’s startup cycle. • Runtime diagnostics Performed during normal printer operation.
A795 User Guide: Programming Supplement Chapter 2: Diagnostics and Configuration Runtime diagnostics Runtime diagnostics (sometimes called level 2 diagnostics) run during normal printer operation.
A795 User Guide: Programming Supplement Chapter 2: Diagnostics and Configuration ********* MAIN MENU ********** ******************************* *** A795 - Diagnostics Form *** Model number Serial number Boot Firmware Revision CRC P/N Flash Firmware Revision CRC P/N H/W parameters Flash Memory Size Flash Logos/Fonts Flash User Storage SRAM Head Setting Paper Type Paper Type Header Print Density (Mono) Max Speed Paper Width Max Power Knife Partial Cut Paper Low Sensor Comm.
A795 User Guide: Programming Supplement 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.
A795 User Guide: Programming Supplement Chapter 2: Diagnostics and Configuration Printer configuration Printers are shipped with all the functions and parameters pre-set 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.
A795 User Guide: Programming Supplement Chapter 2: Diagnostics and Configuration 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.
A795 User Guide: Programming Supplement 17 Chapter 2: Diagnostics and Configuration Communication interface To change the communication interface settings, enter the configuration menu, select “Set Communication Interface” from the main menu and answer “Yes” to “SET INTERFACE TYPE?” printed on the receipt. Caution: Be extremely careful changing any of the printer settings to avoid inadvertently changing other settings that might affect the performance of the printer.
A795 User Guide: Programming Supplement Chapter 2: Diagnostics and Configuration Printer emulations To change the printer emulations settings, enter the configuration menu, select “Emulation/ Software Options” from the main menu and answer “Yes” to “SET THE PRINTER EMULATIONS?” printed on the receipt. This will take you to the instructions for setting the printer emulation.
A795 User Guide: Programming Supplement 19 Chapter 2: Diagnostics and Configuration Printer settings and functions To change the printer settings and functions, enter the configuration menu, select the sub-menu from the main menu and answer the questions printed on the receipt until you come to the instructions for selecting the printer settings.
A795 User Guide: Programming Supplement Chapter 2: Diagnostics and Configuration Enable or disable data scope mode The data scope mode test prints a hexadecimal dump of all data sent to the printer: “1” prints as hexadecimal 31, “A” as hexadecimal 41 and so on. This helps troubleshoot communication problems and runs during a normal application (after being enabled through printer configuration). Note: Data scope mode is usually considered a level 1 diagnostic test.
A795 User Guide: Programming Supplement 21 Chapter 3: Programming the Printer Chapter 3: Programming the Printer Overview of commands Commands control all operations and functions of the printer. This includes selecting the size and placement of characters and graphics on the receipt to feeding and cutting the paper. The programming commands have been organized, in order of hexadecimal code within functional groups. For this reason, “related” commands may not be listed adjacent to one another.
A795 User Guide: Programming Supplement Chapter 3: Programming the Printer 1B 4A n 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 A795 has a fundamental step of 1/203 inch, the actual line spacing will not exactly match the requested spacing. 1B 59 n1 n2 d1...dn Select double-density graphics In A793 emulation mode, the printer scales the graphics to provide the best match.
A795 User Guide: Programming Supplement Chapter 3: Programming the Printer Axiohm ColorPOS™ 2-color and color interpreted commands continued 1D 87 m GS 0x87 m Color shade mode 1D 89 n m GS 0x89 n m Logo print with color plane swap 1D 8B n m o GS 0x8B n m o Apply shading to logo 1D 8C n m GS 0x8C n m Merge watermark mode 1D 8D n m GS 0x8D n m Text strike through mode 1D 8E m nL nH d1...dn GS 0x8E m nL nH d1...
A795 User Guide: Programming Supplement Chapter 3: Programming the Printer Print zones Print zones for 80-mm paper Specifications of print zone for 80 mm paper: • 576 dots (addressable) @ 8 dots/mm, centered on 80 mm • Top margin to manual tear-off: 17.8 mm (0.70 inches) • Standard mode: minimum margins: 2.0 mm (.079 inches) • Top margin to knife cut: 19.0 mm (0.75 inches) Paper Width = 80 mm (3.15 in.) Printable Zone, 576 Dots = 72 mm (2.835 in.) Nominal Margins, 4 mm (0.157 in.
A795 User Guide: Programming Supplement Chapter 3: Programming the Printer Print zones for 82.5-mm paper Specifications of print zone for 82.5 mm paper: • 640 dots (addressable) @ 8 dots/mm, centered on 82.5 mm • Top margin to manual tearoff: 17.8 mm (0.70 inches) • Standard mode: minimum margins: 1.0 mm (0.040 inches) • Top margin to knife cut: 19.0 mm (0.75 inches) Paper Width = 82.5 mm (3.25 in.) Printable Zone, 640 Dots = 80 mm (3.15 in.) Nominal Margins (2) = 1.25 mm (0.05 in.
A795 User Guide: Programming Supplement Chapter 3: Programming the Printer Emulation modes The Axiohm A795 printer may be operated in a number of different emulation modes. However, printing characteristics and defaults may differ, depending on the desired mode. For instance, twocolor paper and ColorPOS™ commands and features are available only in A795 native mode. Print setup in emulation modes Refer to the chart below for defaults and allowed printing options in each emulation mode.
A795 User Guide: Programming Supplement 27 Chapter 4: Programming commands Chapter 4: Programming Commands Commands listed by function Commands in bold are ColorPOS™ commands.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Print and paper feed Code (hexadecimal) Command Page 0A Print and feed paper one line 43 0D Print and carriage return 43 14 n Feed n print lines 43 15 n Feed n dot rows 43 16 n Add n extra dot rows 44 17 Print 44 1B 4A n Print and feed paper 45 1B 64 n Print and feed n lines 45 Vertical and horizontal positioning Code (hexadecimal) Command Page 09 Horizontal tab 46 1B 14 n Set column 46 1B 24 nL
A795 User Guide: Programming Supplement 29 Chapter 4: Programming commands Text characteristics Code (hexadecimal) Command Page 12 Select double-wide characters 52 13 Select single-wide characters 52 1B 12 Select 90-degree counter-clockwise rotated print 52 1B 16 n Select pitch (column width) 53 1B 20 n Set right-side character spacing 53 1B 21 n Select print mode 54 1B 25 n Select or cancel user-defined character set 54 1B 26 s c1 c2 n1 d1…nn dn Define user-defined character set
A795 User Guide: Programming Supplement Chapter 4: Programming commands Graphics Code (hexadecimal) Command Page 1B (+*.
A795 User Guide: Programming Supplement 31 Chapter 4: Programming commands Status Batch mode Code (hexadecimal) Command Page 1B 75 0 Transmit peripheral device status (RS-232C printers only) 75 1B 75 n Request alternate status (A793 emulation only) 75 1B 76 Transmit paper sensor status 76 1D 49 n Transmit printer ID 77 1D 49 40 n Transmit printer ID, remote diagnostics extension 78 1D 72 n Transmit status 80 1F 56 Send printer software version 82 Real time Code (hexadecimal) Comm
A795 User Guide: Programming Supplement Chapter 4: Programming commands Bar codes Code (hexadecimal) Command Page 1D 48 n Select printing position for HRI characters 90 1D 66 n Select pitch for HRI characters 90 1D 68 n Select bar code height 90 1D 6B m d1…dk 00 or 1D 6B m n d1…dn Print bar code 91 1D 70 a b c d e f Select PDF 417 parameters 93 1D 77 n Select bar code width 94
A795 User Guide: Programming Supplement 33 Chapter 4: Programming commands Page mode Code (hexadecimal) Command Page 0C Print and return to standard mode 95 18 Cancel print data in page mode 95 1B 0C Print data in page mode 95 1B 4C Select page mode 96 1B 53 Select standard mode 96 1B 54 n Select print direction in page mode 97 1B 57 n1, n2…n8 Set print area in page mode 98 1D 24 nL nH Set absolute vertical print position in page mode 99 1D 5C nL nH Set relative vertical print
A795 User Guide: Programming Supplement Chapter 4: Programming commands User data storage Code (hexadecimal) Command Page 1B 27 m a0 a1 a2 d1…dm Write to user data storage 101 1B 34 m a0 a1 a2 Read from user data storage 101 1B 6A k Read from non-volatile memory (NVRAM) 101 1B 73 n1 n2 k Write to non-volatile memory (NVRAM) 101 1D 22 n Select memory type (SRAM/flash) where to save logos or user-defined fonts 102 1D 22 55 n1 n2 Flash memory user sectors allocation 102 1D 40 n Erase
A795 User Guide: Programming Supplement 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. Default: The command operand default after printer reset.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Command descriptions Printer actions The printer function commands control the following basic printer functions and are described in order of their hexadecimal codes: • Resetting the printer • Opening the cash drawers • Cutting the paper Clear printer ASCII Hexadecimal Decimal DLE 10 16 Clears the print line buffer without printing and sets the printer to the following condition: • Double-wide command (0x12) is canceled • Lin
A795 User Guide: Programming Supplement 37 Chapter 4: Programming commands Perform partial knife cut ASCII Hexadecimal Decimal SUB 1A 26 ESC m 1B 6D 27 109 Partially cuts the receipt. The default setting leaves 5 mm. (0.20 inch) of paper on the left edge. (See setting partial cut distance in diagnostics.) Formulas There are two codes (Hex 1A or 1B 6D) for this command and both codes perform the same function. Exceptions The cut edge is 144 dot rows or 18 mm (0.71 inch) above the print station.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Select paper sensors to output paper end signals ASCII Hexadecimal Decimal ESC c 3 n 1B 63 33 n 27 99 51 n Vaue of n: Range of n: 1-255 If either bit 0 or bit 1 is on, the paper roll near-end sensor is selected as the paper sensor outputting paper-end signals. Default of n: 12 If either bit 2 or bit 3 is on, the paper roll end sensor is selected as the paper sensor outputting paper-end signals.
A795 User Guide: Programming Supplement 39 Chapter 4: Programming commands Enable or disable panel button ASCII Hexadecimal Decimal ESC c 5 n 1B 63 35 n 27 99 53 n Value of n: 0 = Enable 1 = Disable Default: 0 (Enable) Enables or disables the paper feed button. If the last bit is 0, the paper feed button is enabled. If the last bit is 1, the paper feed button is disabled.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Set current color ASCII Hexadecimal Decimal ESC r m 1B 72 m 27 114 m Default of m: 0 (monochrome) Description This command will set the current color to the color m for all character data that may follow this command and all graphic objects (bit images) that have not been explicitly loaded as 2-color.
A795 User Guide: Programming Supplement 41 Chapter 4: Programming commands Set paper type (ColorPOS™) ASCII Hexadecimal Decimal GS Ox81 m n 1D 81 m n 29 129 m n Value of m: 0 = monochrome (black) paper 1 = Kansaki KIP-371 RB red/black paper commands. The initial value at first boot after firmware load (or reload) is m n =0 0.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Print test form ASCII Hexadecimal Decimal AX t 1F 74 31 116 Prints the current printer configuration settings on the receipt. Disabled in page mode.
A795 User Guide: Programming Supplement 43 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 LF 0A 10 Prints one line from the buffer and feeds paper one line. Carriage return/line feed pair prints and feeds only one line. Print and carriage return ASCII Hexadecimal Decimal CR 0D 13 Prints one line from the buffer and feeds paper one line.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Add n extra dot rows ASCII Hexadecimal Decimal SYN n 16 n 22 n Value of n: Number of extra dot rows Extra rows Lines per inch Dot rows Range of n: 0-16 9 6.1 33 Default: 3 extra dot rows 10 6.0 34 Adds n extra dot rows (n/8 mm, n/203 inch) to the character height to increase space between print lines or decrease the number of lines per inch. 11 5.8 35 Formulas 12 5.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Print and feed paper ASCII Hexadecimal Decimal ESC J n 1B 4A n 27 74 n Value of n: n/203 inch in A795 native mode and TM-T88 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.
A795 User Guide: Programming Supplement 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 80 mm paper. If the printer supports 82.5 mm paper, the dot spacing is the same but there are 640 printable dots rather than 576 printable dots on the 80 mm paper.
A795 User Guide: Programming Supplement 47 Chapter 4: Programming commands Set absolute starting position ASCII Hexadecimal Decimal ESC $ nL nH 1B 24 nL nH 27 36 nL nH Value of n: n = Number of dots to be moved from the beginning of the line. nL = Remainder after dividing n by 256. nH = Integer after dividing n by 256. The values for nL and nH are two bytes in low byte, high byte word orientation.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Set vertical line spacing ASCII Hexadecimal Decimal ESC 3 n 1B 33 n 27 51 n Value of n: n/406 inch in A795 native mode n/360 inch in A793 emulation mode n/203 inch in TM-T88 emulation mode Range of n: 0-255 Default: 3.37 mm (0.13 inch) Sets the line spacing to n/16 mm (n/406 inch). The minimum line spacing is 8.5 lines per inch. The line spacing equals the character height when n is too small.
A795 User Guide: Programming Supplement 49 Chapter 4: Programming commands Set relative print position ASCII Hexadecimal Decimal ESC \ n1 n2 1B 5C n1 n2 27 92 n1 n2 Value of n: To move to the right: To move the relative starting position right of the current position: Determine the value of n by multiplying the number of columns to move right of the current position by 10 (standard) or 8 (compressed) pitch.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Select justification ASCII Hexadecimal Decimal ESC a n 1B 61 n 27 97 n Value of n: 0, 48 = Left aligned 1, 49 = Center aligned 2, 50 = Right aligned Range of n: 0-2, 48-50 Default: 0 (Left aligned) Specifies the alignment of characters, graphics, logos, and bar codes on the receipt station according to the above table. Related information On the Epson TM-T88, this command is valid only at the beginning of a line.
A795 User Guide: Programming Supplement 51 Chapter 4: Programming commands Set printing area width ASCII Hexadecimal Decimal GS W nL nH 1D 57 nL nH 29 87 nL nH Range of nL: 0-255 Range of nH: 0-255 Default: 576 dots (the maximum printable area) Sets the width of the printing area. If the setting exceeds the printable area, the maximum value of the printable area is used. The width of the printing area is set to ((nH X 256) + nL) times horizontal motion unit) inches.
A795 User Guide: Programming Supplement 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 80 mm paper. If the printer supports 82.
A795 User Guide: Programming Supplement 53 Chapter 4: Programming commands Select pitch (column width) ASCII Hexadecimal Decimal ESC SYN n 1B 16 n 27 22 n Value of n: 0 = Standard pitch 1 = Compressed pitch Default: 0 (Standard pitch) Related information Look in Chapter 3: Programming the Printer, “Character appearance” for a description of both pitches. Selects the character pitch for a print line. Formulas This command and the select print modes command (1B 21 n) affect pitch selection.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Select print mode ASCII Hexadecimal Decimal ESC ! n 1B 21 n 27 33 n Value of n: Pitch selection (standard, compressed, double high, or double wide.) Valu e of n Exceptions Refer to the table in other column for exceptions.
A795 User Guide: Programming Supplement 55 Chapter 4: Programming commands Define user-defined character set ASCII Hexadecimal Decimal ESC & s c1 c2 n1 d1 ... nn dn] 1B 26 s c1 c2 n1 d1 ... nn dn] 27 38 s c1 c2 n1 d1 ...
A795 User Guide: Programming Supplement Chapter 4: Programming commands Copy character set from ROM to RAM ASCII Hexadecimal Decimal ESC : 0 0 0 1B 3A 30 30 30 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. This command is ignored if current font is the user font.
A795 User Guide: Programming Supplement 57 Chapter 4: Programming commands Select or cancel double strike ASCII Hexadecimal Decimal ESC G n 1B 47 n 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. Identical to emphasized mode. 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 effective.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Select international character code ASCII Hexadecimal Decimal ESC R n 1B 52 n 27 82 n Value of n: A795 native mode A793 emulation TM-T88 emulation (1B 52 n only) 0 = Code Page 437 0 = Code Page 437 0 = U.S.A. 1 = Code Page 850 Not 0 = Code Page 850 1 = France 2 = Code Page 852 2 = Germany 3 = Code Page 860 3 =-U.K.
A795 User Guide: Programming Supplement 59 Chapter 4: Programming commands Select international character set ASCII: ESC t n Hexadecimal: 1B 74 n Decimal: 27 116 n Value of n: A795 native mode A793 emulation TM-T88 emulation (1B 52 n only) 0 = Code Page 437 0 = Code Page 437 0 = U.S.A. 1 = Code Page 850 Not 0 = Code Page 850 1 = France 2 = Code Page 852 2 = Germany 3 = Code Page 860 3 =-U.K.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Select character size ASCII Hexadecimal Decimal GS ! n 1D 21 n 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 Selects the character height using bits 0 to 2 and selects the character width using bits 4 to 6, as follows: With smoothing enabled, maximum value of 0+n is 66.
A795 User Guide: Programming Supplement 61 Chapter 4: Programming commands Select or cancel white/black reverse print mode ASCII Hexadecimal Decimal GS B n 1D 42 n 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: 0 (Off ) White/black reverse print mode has a higher priority than underline mode. When underline mode is on and white/ black reverse print mode is selected, underline mode is disabled, but not canceled.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Text strike-through mode (ColorPOS™) ASCII Hexadecimal Decimal GS 0x85 m n 1D 8D n m 29 141 n m Value of m: 0 = retain same color as the character itself 1 = black 2 = paper color Value of n: standard cell height Default: n = 0 (off ) When characters are greater than normal size, such as double-high, the number of character rows claimed by n also increases proportionally, such as doubling for doublehigh cells.
A795 User Guide: Programming Supplement 63 Chapter 4: Programming commands Graphics These commands are used to enter and print graphics data and are described in order of their hexadecimal codes. These commands describe operation for 80 mm paper. If the printer supports 82.5 mm paper, the dot spacing is the same but there are 640 printable dots rather than 576 printable dots on 80 mm paper. Download BMP logo ASCII: ESC (+*.BMP file) Hexadecimal: 1B (+*.BMP file) Decimal: 27 66 77(+*.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Select bit image mode ASCII Hexadecimal Decimal ESC * m n1 n2 d1 ... dn 1B 2A m n1 n2 d1 ... dn 27 42 m n1 n2 d1 ... dn Value of m: Value of m Mode No. of dots (vertical) No. of dots (horizontal) No.
A795 User Guide: Programming Supplement 65 Chapter 4: Programming commands Print advanced raster graphics ASCII Hexadecimal Decimal ESC .
A795 User Guide: Programming Supplement Chapter 4: Programming commands Select double-density graphics ASCII Hexadecimal Decimal ESC Y n1 n2 d1 ... dn 1B 59 n1 n2 d1 ... dn 27 89 n1 n2 d1 ... dn Value of n: Value of n (8-dot single density mode) Value of d n1 + (256 x n2) Number of bytes of data (printed down, then across) Enters one line of 8-dot double-density graphics into the print buffer.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Define downloaded bit image ASCII Hexadecimal Decimal GS * n1 n2 d1 ... dn] 1D 2A n1 n2 d1 ... dn] 29 42 n1 n2 d1 ... dn] Value of n: Value of n1 1-72 (8 x n1 = number of horizontal dot columns) Value of n2 1-64 (number of vertical bytes) Value of d 1 Bytes of data (printed down, then across) 1 The number of bytes sent is represented by the following formula: n = 8 x n1 x n2 (n1 x n2 must be less than or equal to 4608).
A795 User Guide: Programming Supplement Chapter 4: Programming commands Print downloaded bit image ASCII Hexadecimal Decimal GS / m 1D 2F m 29 47 m Value and range of m: This command is used to print a previously stored monochrome or color logo from printer memory on the receipt station. The logo is identified as the one indicated by the most recent select current logo command or 0 if a select current logo command has not yet been given.
A795 User Guide: Programming Supplement 69 Chapter 4: Commands listed by hexadecimal code Print raster color graphics (ColorPOS™) ASCII Hexadecimal Decimal GS 0x83 n1…..n144 (576 dots 80 mm paper) / n160 (640 dots, 82.5 mm paper) 1D 83 n1…..n144 (576 dots 80 mm paper) / n160 (640 dots, 82.5 mm paper) 29 13 n1…..n144 (576 dots 80 mm paper) / n160 (640 dots, 82.5 mm paper) Value and range of n: n1 to n144 / n160 corresponds to one dot row data.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Apply shading to logo (ColorPOS™) ASCII Hexadecimal Decimal GS Ox8B n m o 1D 8B n m o 29 139 n m o This command will apply shading effect m to logo n and store it at index o, also extending width to full horizontal size if logo n is not at full paper width. An application might use a high value of m to shade out the logo if the original image has a significant number of “on” dots to allow for future foreground print readability.
A795 User Guide: Programming Supplement 71 Chapter 4: Programming commands Monochrome shade mode (ColorPOS™) ASCII Hexadecimal Decimal GS 0x86 m 1D 86 m 29 134 m This applies a selected shade density to all monochrome objects such as text and monochrome logos. The parameter m specifies the shading effect and has an initial value of 0 which signifies no effect. m specifies the percentage of shading, 0 <= m <= 100. If > 0 then color shade mode is turned off as well.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Form and merge real time surround graphic (ColorPOS™) ASCII Hexadecimal Decimal GS 0x90 m x y o p q 1D 90 m x y o p q 29 144 m x y o p q This command will print a real-time graphic style designated by m.
A795 User Guide: Programming Supplement 73 Chapter 4: Programming commands Background logo print mode (ColorPOS™) ASCII Hexadecimal Decimal GS 0x92 n 1D 92 n 29 146 n This command will place into the graphics buffer the logo designated by n. As soon as there is a print action command (such as text output) the graphics buffer will be merged (logical OR process) with print output.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Status Status command introduction The A795 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. A brief description of each of these methods follows.
A795 User Guide: Programming Supplement 75 Chapter 4: Programming commands Transmit peripheral device status (RS-232C printers only) ASCII Hexadecimal Decimal ESC u 0 1B 75 0 27 117 0 Value of returned byte: Exceptions Bit 0 Bit 1 1 = Drawer 1 Closed 1 = Drawer 2 Closed 0 = Drawer 1 Open 0 = Drawer 2 Open Unlike the A793, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A795 has a single connector that shares data reporting from either cash drawe
A795 User Guide: Programming Supplement Chapter 4: Programming commands Transmit paper sensor status ASCII Hexadecimal Decimal ESC v 1B 76 27 118 Values: Status Byte (RS-232) Bit Function 0 Signifies 1 Signifies 0 Present Low (only if paper low sensor is enabled) Receipt paper 1 Receipt cover Closed Open 2 Receipt paper Present Out 3 Knife position Home position Not home position 4 Not used Fixed to zero Fixed to zero 5 Temperature In valid range Too hot or too cold 6 Volt
A795 User Guide: Programming Supplement 77 Chapter 4: Programming commands Transmit printer ID ASCII Hexadecimal Decimal GS I n 1D 49 n 29 73 n Value of n: 1, 49 = Printer model ID 2, 50 = Type ID 3, 51 = ROM version ID 4, 52 = Logo Definition Bit Off/On Hex Decimal Function 0 Off 00 0 No logo downloaded (SRAM or Flash) On 01 1 Logo downloaded (SRAM or Flash) Off 00 0 Not Used. Fixed to Off.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Transmit printer ID, remote diagnostics extension ASCII Hexadecimal Decimal GS I @ n 1D 49 40 n 29 73 64 n Values of n: Refer to table The command performs the remote diagnostic function specified by n as described in the following table.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Value of n ASCII Hex Dec Remote diagnostic item Function å 86 134 Knife cut tally Clear knife cut tally to 0 ç 87 135 Knife cut tally Return knife cut tally, returns 10 bytes É 90 144 Hours on tally, 8 digit ASCII numeric, max 99,999,999 Write to NVRAM æ 91 145 Hours on tally Write to NVRAM, and print on receipt to verify Æ 92 146 Hours on tally Clear Hours on tally to 0 ô 93 147 Hours on tally Return
A795 User Guide: Programming Supplement Chapter 4: Programming commands Performs the remote diagnostic function specified by n. Eighteen remote diagnostic items are defined: eight printer ID items and ten printer tally items. A group of four remote diagnostic functions is assigned to each diagnostic item. Most of the diagnostic items are maintained in nonvolatile memory (NVRAM), but some are maintained in read-only memory (ROM). The table that follows describes the variables.
A795 User Guide: Programming Supplement 81 Chapter 4: Programming commands Printer status (n = 1 or n = 49) Flash memory user sector status (n = 4 or n = 52) Bit Off/On Hex Decimal Status for transmit status Bit Off/On Hex Decimal Status for transmit status 0 Off On 00 01 0 1 Paper present. Paper exhausted. 0 - - - Undefined. Fixed to off. 1 - - - Undefined. Fixed to off. 1 Off On 00 02 0 2 Cover closed. Cover open.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Send printer software version ASCII Hexadecimal Decimal AX V 1F 56 31 86 The printer returns 8 bytes containing the boot and flash software version. The first 4 bytes returned are an ASCII string for the boot version. The second 4 bytes are an ASCII string for the flash version. Example: For 1.234.56 (8 bytes), the boot version is 1.23 and the flash version is 4.56.
A795 User Guide: Programming Supplement 83 Chapter 4: Programming commands Rules for using real time commands Three situations must be understood when using real time commands. First, the printer executes the real time command upon receiving it and will transmit status regardless of the condition of the DSR signal.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Real time status transmission GS sequence DLE sequence ASCII Hexadecimal Decimal GS EOT n 1D 04 n 29 4 n DLE EOT n 10 04 n 16 4 n Value of n: GS/DLE sequence Exceptions 1 = Transmit printer status 2 = Transmit RS-232C busy status 3 = Transmit error status 4 = Transmit receipt paper status The command is ignored if n is out of range.
A795 User Guide: Programming Supplement 85 Chapter 4: Programming commands 3 = Transmit error status 4 = Transmit receipt paper status Bit Status Hex Decimal Function Bit Status Hex Decimal Function 0 Off 00 0 Fixed to off. 0 Off 00 0 Fixed to off 1 On 02 2 Fixed to on. 1 On 02 2 Fixed to on 2 Off 00 0 Fixed to off. 2 Off On 00 04 0 4 3 Off On 00 08 0 8 No knife error. Knife error occurred.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Real time printer status transmission ASCII Hexadecimal Decimal GS ENQ 1D 05 29 5 Transmits one byte status of the printer in real time. Exceptions Value of byte: Unlike the A793, that had a dedicated connector and resultant dedicated status reporting for each cash drawer, the A795 has a single connector that shares data reporting from either cash drawer.
A795 User Guide: Programming Supplement 87 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 A change in any of the following conditions will trigger the USM response: Default: 0 (USM disabled) • Cash Drawer Enables or disables automatic return of 4 status bytes whenever one or more of the listed changes occurs.
A795 User Guide: Programming Supplement Chapter 4: Programming commands First Byte (Printer Information) Third byte (paper sensor information) Bit Off/On Hex Decimal Status for USM Bit Off/On Hex Decimal Status for USM 0 Off 00 0 Not used. Fixed to off. 0 Off On 00 01 0 1 1 Off 00 0 Not used. Fixed to off. Receipt paper adequate Receipt paper low (if paper low sensor enabled) 2 Off 00 0 1 Off On 00 02 0 2 On 04 4 One or both cash drawers open. Both cash drawers closed.
A795 User Guide: Programming Supplement 89 Chapter 4: Programming commands Recognizing data from the printer An application sending various real time and non-real time commands to which the printer responds can determine which command a response belongs to by the table below. Batch mode response Responses to transmit peripheral device status (1B 75) and transmit paper sensor status (1B 76) are non-real time responses and will arrive in the order in which they were solicited.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Bar codes These commands format and print bar codes and are described in order of their hexadecimal codes. These commands describe operation for 80 mm paper. If the printer supports 82.5 mm paper, the dot spacing is the same but there are 640 printable dots rather than the 576 printable dots on 80 mm paper.
A795 User Guide: Programming Supplement 91 Chapter 4: Programming commands Print bar code First Variation ASCII Hexadecimal Decimal Second Variation GS k m d1…dk NUL GS k m n d1…dn 1D 6B m d1…dk 00 1D 6B m n d1…dn 29 107 m d1 dk 0 29 107 m n d1…dn (0 = End of command) Selects the bar code type and prints a bar code for the ASCII characters entered. If the width of the bar code exceeds one line, the bar code is not printed. There are two variations to this command.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Second variation length of byte specified at beginning of string. The value of m selects the bar code system as described in the table. When details present in the print buffer, the printer processes the data following m as normal data. The variable d indicates the character code to be encoded into the specified bar code system. See the table.
A795 User Guide: Programming Supplement 93 Chapter 4: Programming commands Select PDF 417 parameters ASCII Hexadecimal Decimal GS p a b c d e f 1D 70 a b c d e f 29 112 a b c d e f Value and Ranges: Value: Ranges: a, b = Description: The ratio of bar height to symbol length. a = height limit 1 to 10 b = width limit 1 to 100 c= rows limit 3 to 90 Number of rows in the matrix of code words. d= columns limit 7 to 30 Number of columns in the matrix of code words.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Sample symbol description: Each PDF 417 symbol consists of 3 to 90 stacked rows surrounded on all four sides by a quiet zone.
A795 User Guide: Programming Supplement 95 Chapter 4: Programming commands Page mode Page mode is one of two modes that the A795 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” in memory before it prints it. Think of this as a virtual page.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Select page mode ASCII Hexadecimal Decimal ESC L 1B 4C 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. For more information see page mode in this document.
A795 User Guide: Programming Supplement 97 Chapter 4: Programming commands Select print direction in page mode ASCII Hexadecimal Decimal ESC T n 1B 54 n 27 84 n Value of n: Start position Default: 0 = Upper left corner proceeding across page to the right (A) 1 = Lower left corner proceeding up the page (B) 2 = Lower right corner proceeding across page to the left (upside down) (C) 3 = Upper right corner proceeding down page (D) Selects the printing direction and start position in page mode.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Set print area in page mode ASCII Hexadecimal Decimal ESC W n1, n2 ...n8 1B 57 n1, n2 ...n8 27 87 n1, n2 ...n8 Range of n: 0-255 Default: n1-4 = n5 = n6 = n7 = n8 = 0 64 2 64 2 Sets the position and size of the printing area in page mode.
A795 User Guide: Programming Supplement 99 Chapter 4: Programming commands Set absolute vertical print position in page mode ASCII Hexadecimal Decimal GS $ nL nH 1D 24 nL nH 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. The vertical or horizontal motion unit for the paper roll is used and the horizontal starting buffer position does not move.
A795 User Guide: Programming Supplement 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 Hexadecimal Decimal GS : 1D 3A 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.
A795 User Guide: Programming Supplement 101 Chapter 4: Programming commands User data storage Write to user data storage ASCII Hexadecimal Decimal ESC ‘ m a0 a1 a2 d1 ... dm 1B 27 m a0 a1 a2 d1 ... dm 27 39 m a0 a1 a2 d1 ... dm Value of m: 0 – 255 Writes m bytes of data to the user data storage flash page at the address specified. The printer waits for m bytes of data following the 3-byte address, addr.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Select memory type (SRAM/flash) where to save logos or user-defined fonts ASCII Hexadecimal Decimal GS “ n 1D 22 n 29 34 n Value of n: 48 - 51 n = 51 (ASCII n = 3) n = 48 (ASCII n = 0) Loads active logo to RAM only. This is used to print a special logo but not have it take up flash memory. A logo defined following this command is not preserved over a power cycle. The printer disables interrupts while writing to flash.
A795 User Guide: Programming Supplement 103 Chapter 4: Programming commands Erase user flash sector ASCII Hexadecimal Decimal GS @ n 1D 40 n 29 64 n Value of n: 49 - 50 n = 49 (ASCII n = 1) This command erases all 64K flash memory sectors allocated to user-defined character and logos storage.
A795 User Guide: Programming Supplement Chapter 4: Commands listed by hexadecimal code User storage status (ColorPOS™) ASCII Hexadecimal Decimal Value of m: GS 0x97 m n 1D 97 m n 29 151 m n m specifies the type of stored object to be reported: m=0 return the kilobytes (1024) of free user RAM, n = 0 gets largest free block size n = 1 gets the total size free m=1 return the kilobytes of free character & logo flash memory, n = 0 m=2 return the kilobytes of free user data flash memory, n = 0 m=3
A795 User Guide: Programming Supplement 105 Chapter 4: Programming commands Flash download These commands are used to load firmware into the printer. The commands are listed in numerical order according to their hexadecimal codes. Each command is described and the hexadecimal, decimal, and ASCII codes are listed. There are three ways to enter the download mode. 1. Powering the printer up with DIP Switch 1 down. 2.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Return boot sector firmware part number ASCII Hexadecimal Decimal GS NULL 1D 00 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. Return segment number status of flash memory ASCII Hexadecimal Decimal GS SOH 1D 01 29 1 Returns the size of the flash used.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Return microprocessor CRC ASCII Hexadecimal Decimal GS BEL 1D 07 29 7 Returns the CRC calculated over the boot sector code space. Formulas ACK Erase all flash contents except boot sector ASCII Hexadecimal Decimal GS SO 1D 0E 29 14 Causes the entire flash memory to be erased. Exceptions The printer returns ACK if the command is successful; NAK if it is unsuccessful. Available only in download mode.
A795 User Guide: Programming Supplement Chapter 4: Programming commands Download to active flash sector ASCII Hexadecimal Decimal GS DC1 aL aH cL cH d1… dn 1D 11 aL aH cL cH d1… dn 29 17 aL aH cL cH d1… dn Value of aL: low byte of the address Value of aH: high byte of the address Value of cL: low byte of the count Value of cH: high byte of the count Value of d: data bytes, 0-255 Value of n (for number of data bytes) Range of address (aL aH) Range of count (cL cH) ((cH * 256) + cL) 0000
A795 User Guide: Programming Supplement Chapter 4: Programming commands Return paper type description (ColorPOS™) ASCII Hexadecimal Decimal GS Ox8F m 1D 8F m 29 143 m Value and range of m: m is the paper type index, (0< = m< = 15) This command will return from flash memory a paper type description indexed by m, (0<=m<=15) sending back the data sequence used in the download paper type description command, i.e.
A795 User Guide: Programming Supplement Chapter 4: Programming commands
A795 User Guide: Programming Supplement 111 Appendix A: Commands by hexadecimal code Appendix A: Commands listed by hexadecimal code By command code Note: Bold commands are new two-color, (ColorPOS ™) commands.
A795 User Guide: Programming Supplement Appendix A: Commands by hexadecimal code Code (hexadecimal) Command Page 1B 20 n Set right-side character spacing 53 1B 21 n Select print mode 54 1B 24 nL nH Set absolute starting position 47 1B 25 n Select or cancel user-defined character set 54 1B 26 s c1 c2 n1 d1...nn dn Define user-defined character set 55 1B 27 m a0 a1 a2 d1 … dm Write to user data storage 1B 2A m n1 n2 d1...
A795 User Guide: Programming Supplement 113 Appendix A: Commands by hexadecimal code Code (hexadecimal) Command Page 1B 54 n Select print direction in page mode 97 1B 56 n Select or cancel 90 degree clockwise rotated print 58 1B 57 n1, n2...n8 Set print area in page mode 98 1B 59 n1 n2 d1...
A795 User Guide: Programming Supplement Appendix A: Commands by hexadecimal code Code (hexadecimal) Command Page 1D 03 n Real time request to printer (GS sequence) 85 1D 04 n Real time status transmission (GS sequence) 84 1D 05 Real time printer status transmission 86 1D 06 Get firmware CRC 106 1D 07 Return micro processor CRC 107 1D 0E Erase all flash contents except boot sector 107 1D 0F Return main program flash CRC 107 1D 10 n Erase selected flash sector 107 1D 11 aL aH
A795 User Guide: Programming Supplement 115 Appendix A: Commands by hexadecimal code Code (hexadecimal) Command Page 1D 56 m n Select cut mode and cut paper (or code 1D 56 m) 40 1D 57 nL nH Set printing area width 51 1D 5C nL nH Set relative vertical print position in page mode 99 1D 5E r t m Execute macro 1D 61 n Select or cancel unsolicited status mode 87 1D 62 n Select or cancel smoothing mode 61 1D 66 n Select pitch of HRI characters 90 1D 68 n Select bar code height 90 1D 6
A795 User Guide: Programming Supplement Appendix A: Commands by hexadecimal code Code (hexadecimal) Command 1D 91 n Save graghics buffer as logo 72 1D 92 n Background logo print mode 73 1D 97 m n User storage status 104 1D FF Reset firmware 109 1F 04 n Convert 6 dots/mm bitmap to 8 dots/mm bitmap 73 1F 05 n Select superscript or subscript modes 62 1F 56 Send printer software version 82 1F 74 Print test form 42
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Appendix B: Resident Character Sets Character sets Code page 437 (US) 117
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 737 (Greek)
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 850 (Multilingual) 119
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 852 (Slavic)
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 858 (with Eurosymbol) 121
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 860 (Portuguese)
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 862 (Hebrew) 123
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 863 (French Canadian)
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 865 (Nordic) 125
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 866 (Cyrillic)
A795 User Guide: Programming Supplement Appendix B: Resident Character Sets Code page 1252 (Windows Latin 1) 127
TM 189-9200281 E A795-D100 PS 05/01