Set Horizontal Tab Positions; Set Relative Print Position - CognitiveTPG A798 Programming Manual

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

Advertisement

44
Chapter 4: Programming Commands

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

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:
n = Number of dots to be moved right of the current position
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:
n = Number of dots to be moved left of the current position
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.
Continued ...
A798-PG00001D
Revision D 10/13

Advertisement

Table of Contents
loading

Table of Contents