Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 5 of 14

A795 Two-Color Thermal Receipt Printer User Guide: Programming Supplement, pages 41 to 50

Pages 41 to 50 of 136

The original document is the PDF (980 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Axiohm A795

Page 41

Revision E May 2005

A795 User Guide: Programming Supplement

41

Chapter 4: Programming commands

Enable or disable panel button ASCII ESC c 5 n Hexadecimal 1B 63 35 n Decimal 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.

Exceptions

Functions that require the paper feed button (except for the execute macro [1D 5E] command) cannot be used when it has been disabled with this command.

Generate pulse to open cash drawer ASCII ESC p n p1 p2 Hexadecimal 1B 70 n p1 p2 Decimal 27 112 n p1 p2 Formulas

Value of n:

00, 48 (Decimal) = Drawer 1; 01, 49 (Decimal) = Drawer 2

Value of p1:

0–255

The value for either p1 or p2 is the hexadecimal number multiplied by 2 msec to equal the total time.

Value of p2:

0–255

• On-time = p1 (Hex) x 2 msec

Sends a pulse to open the cash drawer.

• 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.

Page 42

42

A795 User Guide: Programming Supplement

Revision E May 2005

Chapter 4: Programming commands

Set current color ASCII ESC r m Hexadecimal 1B 72 m Decimal 27 114 m Default of m:

Description

0 (monochrome)

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 two-color.

When the monochrome paper type command (0 0) is set, this command is recognized and retained, but has no effect. The monochrome paper selection (usually black) controls the output.

m= 0 (monochrome) is the initial value m= 1 (two-color paper “primary color”, usually black) m= 2 (second color available from two-color paper)

When two-color paper is loaded and the two-colors paper type command set, this command will designate which of the two colors will be used for everything not specified as having an explicit color parameter(s), such as color logos, side bars, surround graphics, background watermarks or color raster graphics. The effect mimics shifting a two-color ribbon in a printer or typewriter to type the color of the lower half of the ribbon.

The m values 0 and 1 will not have a distinguishable effect; 0 is the initial value and provides parameter value consistency with other commands.

Exceptions

After a power loss or reset the default value m=0 is reset

Select cut mode and cut paper ASCII GS V m Hexadecimal 1D 56 m Decimal 29 86 m

GS V m n 1D 56 m n 29 86 m n

Value of m: table.

Selects the mode as shown in the

Value of n:

Determines cutting position only if m is 65 or 66.

m

Feed and cut mode

0, 48

Full cut (no extra feed).

1, 49 Partial cut (no extra feed). 65 66

Feeds paper to cutting position+(n times vertical motion unit), and cuts the paper completely. Feeds paper to cutting position + (n times vertical motion unit), and performs a partial cut.

Range of m: 0, 48; 1, 49 65, 66 (when used with n) Range of n:

0 – 255

Default of m, n:

0

Selects a mode for cutting paper and cuts the paper. There are two formats for this command, one requiring one parameter m, the other requiring two parameters m and n. The format is indicated by the parameter m. Formulas n times the vertical motion unit is used to determine the cutting position to which the paper is fed.

Page 43

Revision E May 2005

A795 User Guide: Programming Supplement

43

Chapter 4: Programming commands

Set paper type (ColorPOS®) ASCII GS Ox81 m n Hexadecimal 1D 81 m n Decimal 29 129 m n Value of m:

Default:

0 = monochrome (black) paper (Kanzaki P310) 1 = two-color (red/black) papers (Kanzaki P310RB) 4 = two-color (blue/black) papers (Kanzaki P320BB) 5 = two-color (red/black) papers (Kanzaki P320RB) 0 (monochrome paper)

The last set paper type choice is stored in non-volatile memory and is retained after a power loss and across reset commands. The initial value at first boot after firmware load (or reload) is m n =0 0. Related information

An incorrect setting of n for a two-color paper or failure to set n when a two-color paper is loaded will result in poor output quality.

This command will set the optimum parameter values in the thermal print engine control hardware for defined monochrome or two-color paper chemistry. The m n parameters select paper category and formulation version, respectively.

The following list clarifies how the A795 printer will behave in each emulation mode:

(m n = 0 0) defines the default monochrome (black category, initial version) paper, out-of-box printers will also have factory preset descriptions for customer selected color types; initial release consists of two defined color types: (m n = 1 0) Kanzaki P-310RB red/black paper and (m n = 5 0) Kanzaki P-320RB red/black paper, or (m n= 4 0) Kanzaki P-320BB blue/black paper. Other valid values of m n may be present if the download paper type description command has been executed defining additional types.

• If the paper type is changed using the 0x1D 0x81 command, the font and default lines per inch (LPI) will be setup as in the table below.

When issuing this command a value of n = OxFF can always be used; that is interpreted as requesting the setting of the highest version defined in the printer of that category. This is a safe way for an application to always select the latest of a manufacturer’s paper category, thus choosing “ latest standard red/black”. An incorrect setting of m n for a two-color paper or non-standard monochrome paper, or failure to set m n when a color paper is inserted will result in poor print quality.

Two-color paper and ColorPOS® commands and features are supported only in A795 native mode.

• If only the font is changed, the default LPI will automatically be changed as in the table below. • If emulation is switched to LEGACY, A794 or A793 emulation(s), the paper type will automatically be changed to monochrome paper, and the font and LPI will be changed as in the table on next page. • If emulation is switched from any emulation to A795 native, the font and LPI will remain unchanged because the A795 native mode supports all font and LPI options offered in the emulation modes. • The “Set Default LPI” option in the configuration menu is not offered in LEGACY emulation mode. The LPI is set at 6.00. continued...

Page 44

44

A795 User Guide: Programming Supplement

Revision E May 2005

Chapter 4: Programming commands

Font and lines per inch (LPI) setup for different emulations Emulation Mode

LPI Options

Font(s) Options

Font Size

Default LPI

Default EDR

Comments

A795 native

6.00, 6.77, 7.52, 8.13

Standard

13x24

7.52

3

Default setup for monochrome paper

Tall

13x27

6.77

3

ColorPOS® 13x27

6.77

3

A794, A793 emulation

6.00, 7.52, 8.13

Standard

13x24

7.52

3

LEGACY emulation

6.00

Tall

13x27

6.00

7

Standard 13x24

6.00

10

Default setup for two-color paper

Default setup for LEGACY emulation

Set interpretation of “Set current color” command ASCII US ETX SYN ENQ n Hexadecimal 1F 03 16 05 n Decimal 31 03 22 05 n Value of n:

and black.

0-FF (Hex) n = 01 will cause 1B 72 01 to print red. Any other value for 1B 72 will print black. n = 00 will cause 1B 72 00 to print red all other values to print

This command defines how to interpret the 1B 72 command for legacy environments. It provides a method to resolve any differences in the definition of command 1B72 between the A795 native mode and earlier implementations in other printers.

Related information

The 1F 03 16 00 command disables this and all other LogoEZ® features. To disable one LogoEZ® feature when multiple LogoEZ® features are set, first disable all LogoEZ® features and then re-enable only those you desire.

In A795 native mode, the standard “Set current color” command should be used.

Print test form ASCII AX t Hexadecimal 1F 74 Decimal 31 116

Prints the current printer configuration settings on the receipt.

Disabled in page mode.

Page 45

Revision E May 2005

A795 User Guide: Programming Supplement

45

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 LF Hexadecimal 0A Decimal 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 CR Hexadecimal 0D Decimal 13

Prints one line from the buffer and feeds paper one line. The printer can be set through the configuration menu to ignore or use this command. Some applications expect the command to be ignored while others use it as print command.

Related information

See ignoring/using the carriage return in Diagnostics for more information. This command is ignored in LEGACY emulation. Carriage return/line feed pair prints and feeds only one line.

Feed n print lines ASCII DC4 n Hexadecimal 14 n Decimal 20 n Value of n:

The number of lines to feed at current line height setting.

Range of n:

0–255 in A795 native mode 0–127 in A793 emulation

Related information

This is ignored in LEGACY emulation and the parameter byte goes into the print buffer.

Feeds the paper n lines at the current line height without printing. Ignored on receipt if current line is not empty.

Feed n dot rows ASCII NAK n Hexadecimal 15 n Decimal 21 n Value of n:

n/203 inch

Related information

Range of n:

0–255 in A795 native mode 0–127 in A793 emulation

This is ignored in LEGACY emulation and the parameter byte goes into the print buffer.

Feeds the paper n dot rows (n/8 mm, n/203 inch), without printing. Receipt moves n rows if the print buffer is empty.

Page 46

46

A795 User Guide: Programming Supplement

Revision E May 2005

Chapter 4: Programming commands

Add n extra dot rows ASCII SYN n Hexadecimal 16 n Decimal 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.6

36

The following table shows the relationship between the number of lines per inch and each extra dot row added:

13

5.5

37

14

5.3

38

Extra rows

Lines per inch

Dot rows

0

8.5

24

15

5.2

39

1

8.1

25

16

5.1

40

2

7.8

26

3

7.5

27

4

7.2

28

5

7.0

29

6

6.77

30

7

6.5

31

8

6.3

32

Related information

This is ignored in LEGACY emulation and the parameter byte goes into the print buffer.

Print ASCII ETB Hexadecimal 17 Decimal 23

Prints one line from the buffer and feeds paper one line. Executes LF on receipt.

Related information

This command is ignored in LEGACY emulation.

Page 47

Revision E May 2005

A795 User Guide: Programming Supplement

47

Chapter 4: Programming commands

Print and feed paper ASCII ESC J n Hexadecimal 1B 4A n Decimal 27 74 n Value of n:

n/203 inch in A795 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.

If the set horizontal and vertical minimum motion units command (1D 50) is used to change the horizontal and vertical minimum motion units, the parameters of this command (print and feed paper) will be interpreted accordingly. Related information

For more information, see the description of the set horizontal and vertical minimum motion units command in this document.

Print and feed n lines ASCII ESC d n Hexadecimal 1B 64 n Decimal 27 100 n Range of n:

1–255 (0 is interpreted as 1)

Prints one line from the buffer and feeds paper n lines at the current line height.

Page 48

48

A795 User Guide: Programming Supplement

Revision E May 2005

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.

Horizontal tab ASCII HT Hexadecimal 09 Decimal 9

Moves the print position to the next tab position set by the set horizontal tab positions (1B 44 n1 n2 ... 00) command. The print position is reset to column one after each line.

When no tabs are defined to the right of the current position, or if the next tab is past the right margin, line feed is executed. HT has no effect in page mode. Print initialization sets 32 tabs at column 9, 17, 25…

Tab treats the left margin as column one, therefore changes to the left margin will move the tab positions.

Set horizontal and vertical minimum motion units ASCII GS P x y Hexadecimal 1D 50 x y Decimal 29 80 x y Value of x:

Horizontal

Value of y:

Vertical

Range of x:

0 – 255

Range of y:

0 – 255

Default of x:

203

Default of y:

203

Sets the horizontal and vertical motion units to 1/x inch and 1/y inch respectively. When x or y is set to 0, the default setting for that motion unit is used.

Set column ASCII ESC DC4 n Hexadecimal 1B 14 n Decimal 27 20 n Value of n:

1–44= Standard pitch 1–56= Compressed pitch

Default of n:

1

Prints the first character of the next print line in column n. It must be sent for each line not printed at column one. The value of n is set to one after each line.

Exceptions

This command cannot be used with single- or doubledensity graphics. Related information

This is ignored in LEGACY emulation and the parameter byte goes into the print buffer.

Page 49

Revision E May 2005

A795 User Guide: Programming Supplement

49

Chapter 4: Programming commands

Set absolute starting position ASCII ESC $ nL nH Hexadecimal 1B 24 nL nH Decimal 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. 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. Formulas

The example shows how to calculate 280 dots as the absolute starting position. 28 x 10 = 280/256 = nL = 24 nH =

280 dots (beginning of column 29) 1, remainder of 24 1

Related information

If the set horizontal and vertical motion units command (1D 50) is used to change the horizontal and vertical minimum motion unit, the parameters of the set relative print position command will be interpreted accordingly. For more information, see the description of the command set horizontal and vertical minimum motion units command (1D 50) in this document.

Compatibility information (A795 receipt vs. A793 receipt)

There is a difference in the normal behavior of this command in A793 emulation mode as compared to the original A793. The difference exists when the command is used to move to the left. The A793 processes the whole print string prior to putting it in the buffer for the print head. This method of processing allows the A793 to backup in the print string and replace characters and their associated attributes when a “Set relative print position” command instructs the printer to move the print position to the left. In order to improve the speed of printing, the A795 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. 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 graphics command.

Set vertical line spacing to 1/6 inch ASCII ESC 2 Hexadecimal 1B 32 Decimal 27 50 Default:

3.33 mm (0.13 inch)

Sets the default line spacing to 4.25 mm (1/6 of an inch).

Page 50

50

A795 User Guide: Programming Supplement

Revision E May 2005

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 A795 native mode, A794 emulation n/360 inch in A793 emulation mode n/203 inch in Application Compatible Escape Commands emulation

If the set horizontal and vertical minimum motion units command (1D 50) is used to change the horizontal and vertical minimum motion unit, the parameters of this command (set line spacing) will be interpreted accordingly.

Range of n:

0-255

Related information

Default:

3.37 mm (0.13 inch)

For more information, see the description of the set horizontal and vertical minimum motion units command in this document.

mode

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.

Set horizontal tab positions ASCII ESC D [n]…k NUL Hexadecimal 1B 44 [n]…k 00 Decimal 27 68 [n]…k 0 Value of n:

Column number for tab minus one. (n is always less than or equal to the current selected column width)

Value of k:

0-32 (decimal)

Default:

Every 8 characters from column 1 (9, 17, 25, etc.) for normal print.

Sets up to 32 horizontal tab positions n columns from column one, but does not move the print position. See the horizontal tab command (09). The tab positions remain unchanged if the character widths are changed after the tabs are set. The command ends with hexadecimal 00; hexadecimal 1B 44 00 clears all tabs.

Tabs assumed to be in strictly ascending order. A tab out of order terminates the command string as if it were 00, and remaining tab values are taken as normal data. Formulas

Set the tab positions in ascending order and put Hex 00 at the end. Hex 1B 44 00 (number of tabs not specified) clears all tab positions. Exceptions

The tabs cannot be set higher than the column width of the current pitch: Standard pitch = 44 columns Compressed pitch = 56 columns