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 15 of 24

A758 USB Thermal Receipt and Impact Slip Printer: Owner's Guide, pages 141 to 150

Pages 141 to 150 of 235

The original document is the PDF (3.8 MB). 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 A758

Page 141

Chapter 7: Programming Guide 133

Set Line Spacing to 1/6 Inch ASCII: ESC 2 Hexadecimal: 1B 32 Decimal: 27 50 Default:

0.13 Inch (3.33 mm)

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

Set Line Spacing ASCII: ESC 3 n Hexadecimal: 1B 33 n Decimal: 27 51 n Value of n:

n/406 inches on receipt n/144 inches on slip

Range of n:

0 – 255

Default:

Receipt .13 inch (3.37 mm or 7.52 lines per inch, 3 extra dot rows.) Slip .14 inch (7.2 lines per inch, 3 extra dot rows.)

Sets the line spacing for the receipt and for the slip. For the receipt the spacing is set to n/406 inches. For the slip, the line spacing is set to n/144 inches. The line spacing 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 unit, the parameters of this command (Set Line Spacing) 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 Paper ASCII: ESC J n Hexadecimal: 1B 4A n Decimal: 27 74 n Value of n:

n/203 inches receipt n/144 inches slip

Range of n:

0 - 255

Prints one line from the buffer and feeds the paper. On the receipt station, the line height equals the character height when n is too small. This does not apply to the slip station. Use n = 0 to print a line without feeding the paper. This allows the printer to print on the last line of the slip (at .59 inches from the trailing edge) and still retain the slip in the feed rollers for reverse feeding the paper back out of the slip station. Related Information:

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide

189-9200399 Rev.A

A758-D100 12/04

Page 142

134 Chapter 7: Programming Guide For more information, see the description of the Set Horizontal and Vertical Minimum Motion Units command in this document.

Print and Reverse Feed Paper ASCII: ESC K n Hexadecimal: 1B 4B n Decimal: 27 75 n Value of n:

Slip = n/144 of an inch

Range of n:

0 - 255

Prints one line from the buffer and reverse feeds the paper n/144 of an inch on the slip station. Exceptions: The receipt station cannot be reverse fed.

Print and Feed n Lines ASCII: ESC d n Hexadecimal: 1B 64 n Decimal: 27 100 n Value of n:

Number of lines to be printed and fed.

Range of n:

1 – 255 (0 is interpreted as 1 on the receipt station)

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

Print and Reverse Feed n Lines ASCII: ESC e n Hexadecimal: 1B 65 n Decimal: 27 101 n Value of n:

The number of lines on the slip station to be reverse fed.

Range of n:

0 – 255

Prints one line from the buffer and reverse feeds the paper n lines on the slip station. The receipt station cannot be reverse fed.

Reverse Feed n Lines ASCII: GS DC4 n Hexadecimal: 1D 14 n Decimal: 29 20 n Range of n :

0 – 127 A756 Emulation Mode 0 – 255 A758 Native Mode

Reverses the paper feed in the slip station by n lines at the current spacing. The next character feed command returns the paper feed back to the normal feed direction. This command is ignored if slip is not the selected station. Current spacing is not a factor. A758-D100 12/04

189-9200399 Rev.A

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide

Page 143

Chapter 7: Programming Guide 135

Reverse Feed n Dots ASCII: GS NAK n Hexadecimal: 1D 15 n Decimal: 29 21 n Value of n:

n dots at 1/72 inch

Range of n :

0 – 127 A756 Emulation Mode 0 – 255 A758 Native Mode

Reverses the paper feed in the slip station by n dots at 1/72 inch (TPG, Inc. 7150™ command). This command is ignored if receipt station is selected.

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. The default horizontal motion is x = 203.

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide

189-9200399 Rev.A

A758-D100 12/04

Page 144

136 Chapter 7: Programming Guide

Horizontal Positioning Commands The horizontal positioning commands control the horizontal print positions of characters on the receipt and slip.

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. Tab treats the left margin as column one. Therefore changes to the left margin will move the tab positions. When there are no tabs defined to the right of the current position, or if the next tab is past the right margin, line feed is executed (both slip and receipt.) HT has no effect in page mode. Printer initialization sets 32 tabs at column 9, 17, 25, …

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

Receipt 1 - 44 (Standard) 1 - 56 (Compressed)

Default of n:

1

Slip 1 - 66 (Standard) 1 - 80 (Compressed)

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: The command cannot be used with Single- or Double-Density graphics.

A758-D100 12/04

189-9200399 Rev.A

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide

Page 145

Chapter 7: Programming Guide 137

Set Absolute Starting Position ASCII: ESC $ n1 n2 Hexadecimal: 1B 24 n1 n2 Decimal: 27 36 n1 n2 Value of n:

Number of dots to be moved from the beginning of the line.

Value of n1:

Remainder after dividing n by 256.

Value of n2:

Integer after dividing n by 256.

The values for n1 and n2 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: Determine the value of n by multiplying the column for the absolute starting position by 10 (slip, or receipt standard pitch) or 8 (receipt compressed pitch). The example shows how to calculate column 29 (10 dots per column) as the absolute starting position. 28 x 10 = 280 dots (beginning of column 29) 280/256 = 1, remainder of 24 n1 = 24 n2 = 1 Related Information: This command is also used in the graphics mode on the receipt. See Graphics Commands in this chapter for more information. 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 Absolute Print Position) will be interpreted accordingly. For more information, see the description of the Set Horizontal and Vertical Minimum Motion Units command (1D 50) in this document.

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide

189-9200399 Rev.A

A758-D100 12/04

Page 146

138 Chapter 7: Programming Guide

Set Horizontal Tabs ASCII: ESC D [n] k NUL Hexadecimal: 1B 44 [n] k 00 Decimal: 27 68 [n] k 0 Value of n:

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

Value of k:

0 - 32

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 (09) command. The tab positions remain unchanged if the character widths are changed after the tabs are set. This 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.

Set Relative Print Position ASCII: ESC \ n1 n2 Hexadecimal: 1B 5C n1 n2 Decimal: 27 92 n1 n2 Value of n: To Move the Relative Starting Position Right of the Current Position by n dots: n1 = Remainder after dividing n by 256. n2 = Integer after dividing n by 256. The values for n1 and n2 are two bytes in low byte, high byte word orientation. To Move the Relative Starting Position Left of the Current Position by n dots: n1 = Remainder after dividing (65,536-n) by 256 n2 = Integer after dividing (65,536-n) by 256 The values for n1 and n2 are two bytes in low byte, high byte word orientation. Moves the print starting position the specified number of dots either right (up to the right margin) or left (up to the left margin) of the current position. The print starting position is reset to the first column after each line. (Set Relative Print Position - continued on the next page)

A758-D100 12/04

189-9200399 Rev.A

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide

Page 147

Chapter 7: Programming Guide 139 Formulas: To move to the left: Determine the value of n by multiplying the number of columns to move left of the current position by 10 (slip or receipt standard pitch) or 8 (receipt compressed pitch). The example shows how to set the relative position two columns in standard pitch (10 dots per column) to the left of the current position. 2 x 10 = 20 dots (two columns to be moved left of the current position) 65,536-20 = 65516 65,516/256 = 255, remainder of 236 n1 = 236 n2 = 255 To move to the right: Determine the value of n by multiplying the number of columns to move right of the current position by 10 (slip or receipt standard pitch) or 8 (receipt compressed pitch). The example shows how to set the relative position two columns in standard pitch (10 dots per column) to the right of the current position. 2 x 10 = 20 dots (two columns to be moved right of the current position) 20/256 = 0, remainder of 20 n1 = 20 n2 = 0 Related Information: 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 Relative Print Position) will be interpreted accordingly. For more information, see the description of the Set Horizontal and Vertical Minimum Motion Units command (1D 50) in this document. Compatibility Information (A758 receipt vs. A756 receipt) There is a difference in the normal behavior of this command in A758 Native Mode as compared to the original A756. The difference exists when the command is used to move to the left. The A756 processes the whole print string prior to putting it in the buffer for the print head. This method of processing allows the A756 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 A758 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.

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide

189-9200399 Rev.A

A758-D100 12/04

Page 148

140 Chapter 7: Programming Guide

Select Justification ASCII: ESC a n Hexadecimal: 1B 61 n Decimal: 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 the characters, graphics, logos, and bar codes on the receipt station. Exceptions: The command is valid only when input at the beginning of a line.

A758-D100 12/04

189-9200399 Rev.A

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide

Page 149

Chapter 7: Programming Guide 141

Set Left Margin ASCII: GS L nL nH Hexadecimal: 1D 4C nL nH Decimal: 29 76 nL nH Range of nL:

0 - 255

Range of nH:

0 - 255

Default :

576 dots (the maximum printable area)

Sets the left margin of the printing area. The left margin is set to (((nH X 256) + nL) times horizontal motion unit) inches. The horizontal motion units are set by the Set Horizontal and Vertical Minimum Motion Units command (1D 50), described in this manual. The width of the printing area is set by the Set Printing Area Width command (1D 57), which follows this command. See the Set Printing Area Width command (1D 57) in this document for a description of that command. If the setting exceeds the printable area, the maximum value of the printable area is used. The maximum printable area is 576 dots. See the illustration. Formulas: To set the left margin to one inch at the default horizontal motion unit of 1/203 inches, send the four-byte string: GS

L

203

0

Or, to set the left margin to two inches at the default horizontal motion unit of 1/203 units per inch, send the four-byte string: GS

L

150

1

Where 2 inches = 406/203, and 406 = (1 X 256) + 150. ←

Printable area 576 dots→

←Left margin→

←Printing area width→

Exceptions: The command is effective only at the beginning of a line. This command is ignored if the line buffer is not empty, and only effects the Receipt interface.

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide

189-9200399 Rev.A

A758-D100 12/04

Page 150

142 Chapter 7: Programming Guide

Set Printing Area Width ASCII: GS W nL nH Hexadecimal: 1D 57 nL nH Decimal: 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. The horizontal motion units are set by the Set Horizontal and Vertical Minimum Motion Units command (1D 50). The width of the printing area follows the Set Left Margin command (1D 4C). See the Set Left Margin command (1D 4C…) earlier in this document for a description. Formulas: To set the width of the printing area to one inch at the default horizontal motion unit of 1/203 inches, send the four-byte string: GS

W

203

0

Or, to set the width of the printing area to two inches at the default horizontal motion unit of 1/203 units per inch, send the four-byte string: GS

W

150

1

Where 2 inches = 406/203, and 406 = (1 X 256) + 150.

←

Printable area 576 dots→

←Left margin→

←Printing area width→

Exceptions: This command is effective only at the beginning of a line. If the setting exceeds the printable area, the maximum value of the printable area is used. The maximum printable area is 576 dots. See the illustration.

A758-D100 12/04

189-9200399 Rev.A

A758 USB Thermal Receipt and Impact Slip Printer: Owner’s Guide