Cognitive Solutions A776, B780 manual Select justification, Set left margin, Continued

Models: B780 A776

1 192
Download 192 pages 23.55 Kb
Page 63
Image 63
Select justification

Chapter 5: Programming commands  51

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 characters, graphics, logos, and bar codes.

The command can be enabled or disabled for the slip. Default is disabled for the slip on A776, and enabled on B780.

Exception

This command is valid only when input at the beginning of a line.

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)

Values of n:

 

nL = low byte = Remainder after dividing n by 256

nH = high byte = Integer after dividing n by 256

The command can be enabled or disabled for the slip. Default is disabled for the slip on A776, and enabled on B780.

Formulas

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.

If the setting exceeds the printable area, the maximum value of the printable area is used. The maximum printable receipt area is 576 dots on the receipt and 420 addressable dots on the slip. See the illustration on the next page.

To set the Receipt 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, derived from decimal to hexadecimal conversion:

406/256 = 1 (nH) with remainder 150 (nL)

Continued . . .

A776-PG00001 C 12/09

A776 (B780) Programming Guide

Page 63
Image 63
Cognitive Solutions A776, B780 manual Select justification, Set left margin, Continued