PP7X Printer Command Manual-20

Add to my manuals
37 Pages

advertisement

PP7X Printer Command Manual-20 | Manualzz
PP7X PRINTER
COMMAND MANUAL
Pinnacle Technology Corp.
CONTENTS
1
2
COMMANDS.................................................................................................................................................... 1
COMMAND SAMPLE (hex command) ......................................................................................................... 31
1 COMMANDS
The command explanations include the following parts:
1
Name and the general description of the command’s function---This is the first part for the command
description; it presents the command’s ASCII code format and general description of its function.
2
3
Format---This part used ASCII coding form, decimal code, and hex code to describe the command.
(Parameter) Range---This part gives the range of the variable. If there is special explanation, it should be the
decimal value. E.g. 1 ≤ n ≤ 4 in which the number ‘1’ is the decimal value, but the ASCII coding form.
4
Description---This part is to explain the command in detail.
5
Note---This part gives the attention items of the command. As the commands may interfere with each other
when they are used in different modes or when they co-work with different commands, yet this part gives the
details for these attention items.
Command
Decimal
Hex
Function
1
HT
9
9
Horizontal tab
2
LF
10
0A
Print and line feed
3
FF
12
0C
Print and recover to page mode
4
CR
13
0D
Print and carriage return
5
DLE EOT
6
CAN
16
4
24
10
04
Transmit real-time state
18
Cancel print data in page mode
7
ESC
FF
27
12
1B 0C
Print data in page mode
8
ESC
SP
27
32
1B 20
Set right-side character spacing
9
ESC
!
27
33
1B 21
Select print mode(s)
10
ESC
$
27
36
1B 24
Set absolute print position
11
ESC
*
27
42
1B 2A
Select bit-image mode
12
ESC
-
27
45
1B 2D
Turn underline mode on/off
13
ESC
2
27
50
1B 32
Select default line spacing
14
ESC
3
27
51
1B 33
Set line spacing
15
ESC
=
27
61
1B 3D
Select printer or VFD
16
ESC
@
27
64
1B 40
Initialize printer
17
ESC
D
27
68
1B 44
Set horizontal tab positions
18
ESC
J
27
74
1B 4A
Print bitmap lattice data, and feed n lines
19
ESC
L
27
76
1B 4C
Select page mode
20
ESC
S
27
83
1B 53
Select standard mode
21
ESC
T
27
84
1B 54
Select character print direction in page mode
1
22
ESC
W
27
87
1B 57
Set printing area in page mode
23
ESC
\
27
92
1B 5C
Specify relative position
24
ESC
a
27
97
1B 61
Position alignment
25
ESC
d
27
100
1B 64
Print and feed paper n lines
Hex
Function
Command
Decimal
26
ESC
i
27
105
1B 69
Execute partial-cut
27
ESC
p
27
112
1B 70
Specify cash drawer pulse
28
ESC
t
27
116
1B 74
Select character code table
29
ESC
v
27
118
1B 76
Transmit paper sensor status
30
ESC
{
27
123
1B 7B
Turn upside-down printing mode on/off
31
FS
!
28
33
1C 21
Set Chinese characters mode
32
FS
S
28
83
1C 53
Set Chinese character space amount
33
FS
p
28
112
1C 70
Print bit image that download to flash
34
FS
q
28
113
1C 71
Define NV bit image
35
GS
!
29
33
1D 21
Select character size
36
GS
$
29
36
1D 24
Specify absolute position for character vertical
direction in page mode
37
GS
H
29
72
1D 48
Select printing position of HRI characters
38
GS
L
29
76
1D 4C
Set left margin
39
GS
P
29
80
1D 50
Set basic calculated pitch
40
GS
V
29
86
1D 56
Select paper-cut mode and cut paper
41
GS
\
29
92
1D 5C
Specify relative position for character vertical
direction in page mode
42
GS
h
29
104
1D 68
Set bar code height
43
GS
k
29
107
1D 6B
Print bar code
44
GS
v
29
118
1D 76
Print raster bitmap
45
GS
w
29
119
1D 77
Set bar code width
(1)
HT
Horizontal tab
Format:
ASCII
HT:
Decimal
9
Hex
09
Description: Moves the print position to the next horizontal tab position.
Notes:
● This command is ignored unless the next horizontal tab position has been set.
● If the next horizontal tab position exceeds the printing area, the printer sets the printing position to [printing
2
area width + 1].
● Horizontal tab positions are set with ESC D.
● If this command is received when the printing position is at [printing area width + 1], the printer executes
print bufferfull printing of the current line and horizontal tab processing from the beginning of the next line.
Reference : ESC D
(2)
LF
Format:
Print and line feed
ASCII
LF
Decimal
10
Hex
0A
Note:
● LF prints the data in the print buffer and fed per line based on the current line space.
● Print characters with CR command.
(3)
FF
Format:
Print and recover to page mode
ASCII
FF
Decimal
12
Hex
0C
Description: Prints all buffered data to the print region collectively, then recovers to the standard mode.
Note:
● All buffer data is deleted after printing.
● The print area set by ESC W (Set print region in page mode) is reset to the default setting.
● No paper cut is executed.
● Sets the print position to the beginning of the next line after execution.
● This command is enabled only in page mode.
Reference: ESC FF, ESC L, ESC S
(4)
CR
Format:
Print and carriage return
ASCII
CR
Decimal
13
Hex
0D
Note:
● Set the print position to the beginning of the line.
● Print characters with LF command.
(5)
DLE EOT n
Format:
Range:
Transmit real-time state
ASCII
DLE
EOT
Decimal
16
4
Hex
10
04
n
n
n
1≤n≤4
Note:
3
● This command is only suitable for the printer model of serial port.
● Transmit the real-time state parameter n of the printer, in order to designate the deferent printer state, define
as follows:
n=1: transmit printer state;
Bit
Off/On
Hex
Decimal
Function
0
Off
00
0
Fixed to Off
1
On
02
2
Fixed to On
Off
00
0
Cash drawer open
On
04
4
Cash drawer closed
Off
00
0
Online
On
08
8
Offline
On
10
16
Fixed to On
Off
00
00
Not wait for online resume
On
20
32
Wait for online resume
2
3
4
5
6
7
Undefined
Off
00
00
Fixed to Off
n=2: transmit offline state;
Bit
Off/On
Hex
Decimal
Function
0
Off
00
0
Fixed to Off
1
On
02
2
Fixed to On
Off
00
0
Upper cover closed
On
04
4
Upper cover open
Off
00
0
Not press paper feed key
On
08
8
Press paper feed key
On
10
16
Fixed to On
Off
00
00
Paper adequate
On
20
32
Printer no paper
Off
00
0
No error
On
40
64
Error
Off
00
0
Fixed to Off
2
3
4
5
6
7
n=3: transmit error state;
Bit
Off/On
Hex
Decimal
Function
0
Off
00
0
Fixed to Off
1
On
02
2
Fixed to On
2
3
Undefined
Off
00
0
Cut no error
On
08
8
Cut error
4
4
5
On
10
16
Fixed to On
Off
00
0
No beyond retrieve error
On
20
32
Beyond retrieve error
Off
00
0
Printer temperature and voltage
normal
On
40
64
Printer temperature or voltage over
range
Off
00
0
Fixed to Off
6
7
n=4: transmit paper roll sensor state;
Bit
Off/On
Hex
Decimal
Function
0
Off
00
0
Fixed to Off
1
On
02
2
Fixed to On
Off
00
0
Paper adequate
On
0C
12
Paper near end
On
10
16
Fixed to On
Off
00
00
Paper adequate
On
60
96
Paper end
Off
00
0
Fixed to Off
2, 3
4
5,6
7
(6)
CAN
Format:
Cancel
ASCII
CAN
Decimal
24
Hex
18
Description: Deletes all print data in the currently set print region in page mode.
Note: .
● This command is enabled only in page mode.
● Portions included in the currently set print region are also deleted, even if previously set print region data.
Reference: ESC L, ESC W
(7)
ESC FF
Format:
print data in page mode
ASCⅡ
ESC
FF
Decimal
27
12
Hex
1B
0C
Description: Prints all buffered data in the print area collectively in page mode.
Note:
● This command is enabled only in page mode.
● Holds the following information after printing.
a. Expanded data
b. Character print direction selection in page mode (ESCT)
c. Set print region (ESCW) in the page mode.
d. Character expansion position
Reference: FF, ESCL, ESCS
5
(8)
ESC SP n
Format:
Range:
Set right-side character spacing
ASCII
ESC SP n
Decimal
27 32 n
Hex
1B 20 n
0 ≤ n ≤ 255
Initial Value: n=0
Set the right space amount for the character to [n × basic calculated pitch].
Function:
●
●
●
●
●
●
●
●
Details:
If the character horizontal direction magnification ratio is more than 2, the right space amount is also
enlarged accordingly.
This command does not affect Chinese characters.
Right space amounts can be set independently for both the standard and page modes.
The basic calculated pitch is set by GSP (Set basic calculated pitch). Also, after setting the right space
amount, it is not affected even if the basic calculated pitch is changed.
If the calculation results in fractions, the pitch is corrected to a minimal mechanical pitch and the rest is
discarded.
In standard mode, the basic calculated pitch (x) for the horizontal direction is used.
In page mode, the basic calculated pitch that is used according to the starting point varies.
a. When the starting point is specified to be upper left or lower right by the ESC T command (Character print
direction selection in page mode), the basic calculated pitch (x) for the horizontal direction is used.
b. When the starting point is specified to be upper right or lower left by the ESC T command (Character print
direction selection in page mode), the basic calculated pitch (y) for the horizontal direction is used.
The maximum value that can be set for the right space amount is approximately 35.983 mm (or 255/180
inch). Specifications that exceed the maximum value are rounded off to that value.
(9)
ESC
Select print modes
Format:
ASCⅡ
ESC
!
n
Decimal
Hex
27
1B
33
21
n
n
Range
0≤n≤255
Initial Value n=0
Function
Select print mode(s) using n as follows.
Bit
Off
0
1
Off/On
2
Off
1/0
Hex
Decimal
Functions
0
00
0
Character font A(12×24) selected
---
---
Reserved
6
3
4
5
6
7
Off
0
00
0
Emphasized mode not selected.
On
1
08
8
Emphasized mode selected.
Off
0
00
0
Double-height mode not selected.
On
1
10
16
Double-height mode selected.
Off
0
00
0
Double-width mode not selected.
On
1
20
32
Double-width mode selected.
---
---
Reserved
Off
Off
0
00
0
Underline mode not selected.
On
1
80
128
Underline mode selected.
Details:
● Quadruple-size characters are printed by specifying both double-tall (bit4=1) and double-wide (bit 5=1)
modes.
● An underline is applied to the entire character width, including the ESC SP (character right space amount).
However, underlines are not applied to portions that have been skipped using HT (horizontal tab) or ESC V
(character 90 degree rotation).
● The thickness of the underline is set by ESC - (specify/cancel underlines) regardless of the character.
● The base line for characters is the same when there are characters having different vertical direction ratios in
the same line.
● The setting of the last received command is effective even when emphasized printing is executed by the ESC
E (specify/cancel emphasized printing) command.
● The setting of the last received command is effective even when underlines are executed by the (ESC -)
Specify/cancel underline command.
● The setting of the last received command is effective even when character size is executed by the GS!
command.
● Emphasized printing (bit 3) is effective for ANK and Chinese characters. Other printing modes are effective
only on ANK characters. Specifications using this command are ignored in HRI characters.
The following are the font configurations on printers.
Reference: ESC-, ESC E, GS!
(10)
ESC
$
Format:
Range:
Set absolute print position
ASC
ESC
$
nL
nH
Decimal
Hex
27
1B
36
24
nL
nL
nH
nH
0≤nL≤255
0≤nH≤255
Description:
Specifies the next printing starting position using an absolute position based on the left margin position.
The next printing starting position is the position specified by [(nL+nH×256) × basic calculated pitch] from
the left margin position.
Note:
● Specifications exceeding the print range are ignored.
7
● The basic calculated pitch is set by GSP (Set basic calculated pitch).
● If the calculation results in fractions, the pitch is corrected to a minimal mechanical pitch and the rest is
discarded.
● In standard mode, the basic calculated pitch (x) for the horizontal direction is used.
● In page mode, the basic calculated pitch that is used according to the starting point varies.
a. When the starting point is specified to be upper left or lower right by the ESC T command (Character print
direction selection in page mode), the basic calculated pitch (x) for the horizontal direction is used.
b. When the starting point is specified to be upper right or lower left by the ESC T command (Character print
direction selection in page mode), the basic calculated pitch (y) for the horizontal direction is used.
Reference: ESC \ , GS $, GS \ , GS P
(11)
ESC *
Format:
Range:
Select bit-image mode
ASCII
ESC
*
m nL nH d1 ... dk
Decimal
27
42
m nL nH d1 ... dk
Hex
1B
2A
m nL nH d1 ... dk
m=0, 1, 32, 33
0≤nL≤255
0≤nH≤3
0≤d≤255
ESC * m nL nH d1 ... dk selects a bit-image mode using m for the number of dots specified by (nL +
nH×256). Set a bit to 1 to print a dot, or set a bit to 0 to not print a dot. d indicates the bit image data. The
modes selectable by m are as follows:
Vertical direction
Horizontal direction
m
Mode
Number of bits for
vertical data
Dot density
(DPI)
Dot density
(DPI)
Amount of data
(k)
0
8-dot single-density
8
68
101
192
1
8-dot double-density
8
68
203
384
2
24-dot single-density
24
203
101
192
33
24-dot double-density
24
203
203
384
39
24-dot double-density
24
203DPI
203DPI
384
(12)
ESC Format:
Range:
Turn underline mode on/off
ASCⅡ
ESC
-
n
Decimal
Hex
27
1B
45
2D
n
n
0≤n≤1:
0: turn underline mode off
1: turn underline mode on
8
(13)
ESC 2
Format:
Select default line spacing
ASCⅡ
ESC
2
Decimal
27
50
Hex
1B
32
Description: Sets line feed amount per one line to approximately 4.23 mm (1/6 inch).
Note:
Line spacing can be set independently for both the standard and page modes.
Reference: ESC 3
(14)
ESC 3
Format:
Range:
Set line spacing
ASCⅡ
ESC
3
n
Decimal
Hex
27
1B
51
33
n
n
0≤n≤255
Description: Sets the line space for one line to [n x basic calculated pitch].
Note:
● ESC 3 n sets the line spacing to n×(vertical or horizontal motion unit). The default setting of the paper feed
amount is 1/6 inch (n=60). The maximum line spacing amount is 40 inches. When standard mode is selected,
the vertical motion unit set by GS P is used. When page mode is selected, the vertical or horizontal motion
unit set by GS P is used for the print direction set by ESC T.
● The line spacing can be set independently in standard mode and in page mode.
● The basic calculated pitch is set by GSP (Set basic calculated pitch). Also, after setting the line space, it is not
affected even if the basic calculated pitch is changed.
● If the calculation results in fractions, the pitch is corrected to a minimal mechanical pitch and the rest is
discarded.
● In standard mode, the basic calculated pitch (y) for the vertical direction is used.
● In page mode, the basic calculated pitch that is used according to the starting point varies.
a. When the starting point is specified to be upper left or lower right by the ESC T command (Character print
direction selection in page mode), the basic calculated pitch (x) for the horizontal direction is used.
b. When the starting point is specified to be upper right or lower left by the ESC T command (Character print
direction selection in page mode), the basic calculated pitch (y) for the horizontal direction is used.
● The maximum value that can be set for the line space is approximately 1,016mm (or 40 inches).
Specifications that exceed the maximum value are rounded off to that value.
Reference: ESC 2, GS P
(15)
ESC = n
Format:
Select printer or VFD
ASCII
ESC
Decimal
27
Hex
1B
=
61
3D
n
n
n
9
Range:
1≤n≤2
Function: Selects the printer or VFD for which the data is effective from the host computer.
Bit
1/0
0
Hex
Decimal
Function
-
-
Undefined
1
1
01
1
Printer valid
2
2
02
2
VFD valid
-
-
Undefined
3-7
The function of bit 0 and bit 3~7 are undefined.
Details: If the printer is selected to be invalid, the printer discards all data from the next data until the
printer is made valid again by this command. (This excludes DLEEOT, DLEENQ, DLEDC4.)
Even when the printer is not invalid, the printer specification of this command (n = 1) is processed.
(16)
ESC
@
Format:
Initialize printer
ASCⅡ
ESC
@
Decimal
27
64
Hex
1B
40
ESC @ initializes the printer. All settings, including character font and line spacing settings, are canceled.
The data in the print buffer is cleared and the printer mode is reset to the mode that was in effect when the
power was turned on. The DIP switch settings are not checked again, the data in the receive buffer is not cleared,
and any macro definitions are not cleared.
(17)
ESC D
Format:
Range:
Set horizontal tab positions
ASCⅡ
ESC
D
n1 … nk NUL
Decimal
Hex
27
1B
68
44
n1 … nk 00
n1 … nk 0
1≤n≤255
0≤k≤32
Description:
ESC D n1 … nk NUL sets a horizontal tab position to n columns from the beginning of a line, with k
indication the total number of horizontal tab positions to be set. When a left margin is set in standard mode,
the position of the left margin is the beginning of the line. A maximum of 32 tab positions can be set. This
command cancels any previous horizontal tab settings. The default tab positions are every eight characters for
the font A (12×24).
Note: The character width is stored for standard and page modes.
Reference: HT
(18)
ESC
J
Print and feed paper
10
Format:
Range:
ASCⅡ
ESC
J
n
Decimal
Hex
27
1B
74
4A
n
n
0≤n≤255
Description:
ESC J n prints the data in the print buffer and feeds the paper n×(vertical or horizontal motion unit).
This command is used to temporarily feed a specific length without changing the line spacing set by other
commands. The maximum paper feed amount is 40 inches. When standard mode is selected, the vertical
motion unit set by GS P is used. When page mode is selected, the vertical or horizontal motion unit set by
GS P is used fro the print direction set by ESC T.
Note:
● In standard mode, the basic calculated pitch (y) for the vertical direction is used.
● In page mode, the basic calculated pitch that is used according to the starting point varies.
a. When the starting point is specified to be upper left or lower right by the ESC T command (Character print
direction selection in page mode), the basic calculated pitch (x) for the horizontal direction is used.
b. When the starting point is specified to be upper right or lower left by the ESC T command (Character print
direction selection in page mode), the basic calculated pitch (y) for the horizontal direction is used.
● Paper is fed approximately 1016 mm if the [n x basic calculated pitch] exceeds approximately 1016mm (40
inches).
Reference: GS P
(19)
ESC
Format:
L
Select page mode
ASCⅡ
ESC
L
Decimal
27
76
Hex
1B
4C
Description: Switches from standard mode to page mode.
Note:
● Enabled only when input with the top of line.
● Invalid when input by page mode.
● Returns to standard mode after the following commands are issued.
a. FF (Print and recover to page mode)
b. ESC S (Select standard mode)
● Character expansion position has the starting point specified by ESC T (Character print direction selection in
page mode) in the printing region designated by the ESC W (Set print region in the page mode) command.
● This command switches the settings for the following commands the values of which can be set
independently in standard mode and page mode to those for page mode.
a. Set space amount: ESC SP, FS S
b. Set line feed amount: ESC 2, ESC 3
● The following commands are enabled only when in page mode.
a. ESC V :Specify/cancel character 90 degree clockwise rotation
b. ESC a :Position alignment
11
c. ESC { :Specify/cancel upside-down printing
d. GS L :Set left margin
e. GS W :Set print region width
● The following command is ignored in page mode.
a. GS (A :Test print
● The following commands are invalid in page mode.
a. FSp :Print NV bit image
b. FSq :Define NV bit image
c. FSg1 :Write data to user NV memory
d. GSv0 :Print raster bit images
● Recover to standard mode using ESC@ (initialize printer).
Reference: FF, CAN, ESC FF, ESC S, ESC T, ESC W, GS $, GS \
(20)
ESC
S
Format:
Select standard mode
ASCⅡ
ESC
FF
Decimal
27
83
Hex
1B
53
Description: Switches from page mode to standard mode.
Note:
● Valid only when input by page mode.
● All buffer data in page mode is deleted.
● Sets the print position to the beginning of the next line after execution.
● The print area set by ESCW (Set print region in page mode) is reset to the default setting.
● This command switches the settings for the following commands the values of which can be set
independently in standard mode and page mode to those for standard mode
a. ESC SP :Set character right space amount
b. FS S :Set Chinese character space amount
c. ESC 2 :Set default line spacing
d. ESC 3 :Set line feed amount
● The following commands are effective only when in standard mode.
a. ESC W :Set print region in page mode
b. ESC T :Select character print direction in page mode
● The following commands are ignored in standard mode.
a. GS S :Specify absolute position for character vertical direction in page mode
b. GS \: :Specify relative position for character vertical direction in page mode
● Standard mode is selected when the power is turned on, the printer is reset or initialized (ESC @).
Reference: FF, ESC FF, ESC L
(21)
ESC T
Format:
Select character print direction in page mode
ASCⅡ
ESC
FF
12
Decimal
27
84
Hex
1B
54
Range:
0 ≤ n ≤ 3, 48 ≤ n ≤ 51
Initial Value: n = 0
Description: Selects the character printing direction and starting point in page mode.
n
Print Direction
Starting Point
0, 48
Left to Right
Upper Left (A in the figure below)
1,49
Bottom to Top
Lower Left (B in the figure below)
2,50
Right to Left
Lower Right (C in the figure below)
3,51
Top to Bottom
Upper Right (D in the figure below)
Note:
● Executes only a printer internal flag operation when this command is input in standard mode. The command
does not affect printing in standard mode.
● The character expansion starting point is in the print region specified by ESC W (Set print region in page
mode).
● The basic calculated pitch (x or y) used with the following commands differs according to the starting point.
a. If the starting point is upper left or lower right (feeds paper and expands characters in the vertical direction)
Commands using x : ESC SP, ESC $, ESC \, FS S
Commands using y : ESC 3, ESC J, GS $, GS \
b. If the starting point is upper right or lower left
Commands using x : ESC 3, ESC J, GS $, GS \
Commands using y : ESC SP, ESC $, ESC \, FS S
Reference: ESC $, ESC L, ESC W, ESC \, GS $, GS P, GS\
(22)
ESC W
Set printing area in page mode
Format: ASC
Decimal
Hex
ESC W
27
1B
87
57
xL xH yL yH dxL dxH dyL dyH
xL xH yL yH dxL dxH dyL dyH
xL xH yL yH dxL dxH dyL dyH
Range: 0 xL, xH, yL, yH, dxL, dxH, dyL, dyH
Description:
ESC W xL xH yL yH
page mode as follows:
255 (except for dxL = dxH = 0 or dyL= dyH =0)
dxL dxH dyL dyH sets the size and position of the printing area in
13
∗ Horizontal starting position = (xL + xH×256) (horizontal motion unit)
∗ Vertical starting position = (yL + yH×256) (vertical motion unit)
∗ Printing area width = (dxL + dxH×256) (horizontal motion unit)
∗ Printing area height = (dyL + dyH×256) (vertical motion unit)
The default settings are as follows:
∗ xL = 0, xH = 0, yL = 0, yH = 0
∗ dxL = 0, dxH = 2, dyL = 126, dyH = 6
This command is enabled only in page mode. If this command is processed in standard mode, an
internal flag is activated and this command is enabled when the printer selects page mode.
The horizontal and vertical motion units use the horizontal and vertical values set by the GS P command.
The default settings of the horizontal and vertical motion units are 1/180 and 1/360 inches, respectively.
Note:
● In standard mode, the printer executes only internal flag operations with this command is input.
● If the horizontal direction starting point or vertical direction starting point is outside of the printable region,
the command is stopped and normal printing commences from subsequent data.
● If the horizontal direction length or vertical direction length is 0, the command is stopped and normal
printing commences from subsequent data.
● The character expansion starting point is the point specified by selecting the character printing direction
(ESC T) in page mode in the print region.
● If (horizontal direction starting position + horizontal direction length) exceeds the printable region in the
horizontal direction, the horizontal direction length is set to (horizontal direction printable region - horizontal
direction starting point).
● If (vertical direction starting position + vertical direction length) exceeds the printable region in the vertical
direction, the vertical direction length is set to (vertical direction printable region – vertical direction starting
point).
● The basic calculated pitch is set by GSP (Set basic calculated pitch). Also, the set printing region is not
changed even if the basic calculated pitch is changed after setting the print region.
● If the calculation results in fractions, the pitch is corrected to a minimal mechanical pitch and the rest is
discarded.
● The basic calculated pitch (x) is used in the calculated pitch for the horizontal direction starting point and the
length in the horizontal direction; and the basic calculated pitch (y) is used in the calculated pitch for the
vertical direction starting point and the length in the vertical direction.
● The print region shown in the figure below when the horizontal direction starting is X; the vertical direction
starting point is Y; the horizontal direction length is Dx; and the vertical direction length is Dy.
14
Reference: CAN, ESC L, ESC T, GSP
(23)
ESC \ nL nH
Format:
ASCⅡ
Specify relative position
ESC
FF
Decimal
27
92
Hex
1B
5C
Range:
0 ≤ nL ≤ 255, 0 ≤ nH ≤ 255
Description:
Specifies the next print starting position with a relative position based on the current position. This sets the
position from the current position to [(nL + nH x 256) x basic calculated pitch] for the next print starting
position.
Note:
● Specifications exceeding the print range are ignored.
● If the right direction of the current position is specified for the character direction, specify a positive number;
if the left direction is specified, a negative number is used.
● Negative numbers is represented by the complement of 65536. For example, when moving in the left
direction n pitches, use: nL + nH × 256 = 65536-N
● The basic calculated pitch is set by GSP (basic calculated pitch setting).
● If there are fractions in the result, correct to the minimum mechanical pitch and discard.
● Use the basic calculated pitch (x) for the horizontal direction in standard mode.
● The following operations occur according to the starting point in page mode.
a. If the starting point is set to upper left or lower right by the ESC T (Select character print direction in page
mode) command, specify the relative position of the vertical direction in the paper feed. Use the basic
calculated pitch (x) for the horizontal direction at this time.
b. If the starting point is set to upper right or lower left by the ESC T (Select character print direction in page
mode) command, move the print position in the paper feed direction. Use the basic calculated pitch (y) for
the horizontal direction at this time.
Reference: ESC $, GS P
(24)
ESC a
Format:
Position alignment
ASCII
ESC a n
Hex.
1B
61 n
Decimal
27
97 n
Range:
0 ≤ n ≤ 2, 48 ≤ n ≤ 50
Default Value: n = 0
Description: Aligns all print data in one line to a specified position.
N
Position
0, 48
Left alignment
1, 49
Center
2, 50
Right alignment
15
●
●
●
●
Notes:
This command is effective only when input at the top of the line when standard mode is being used.
This command has no affect in page mode. In page mode, this command is only effective for the setting.
Specifies the alignment position in the printing region that has been set.
Portions skipped using command HT, ESC $ and ESC \ are also targeted for position alignment.
E.g.
Left alignment
ABC
ABCD
ABCDE
(25)
ESC d
Format:
Range:
Center
Right alignment
ABC
ABC
ABCD
ABCD
ABCDE
ABCDE
Print and feed paper n lines
ASCII
ESC d
n
Hex.
1B
64 n
Decimal
27
100 n
0 ≤ n ≤ 255
Description: Prints the data in the print buffer and performs a paper feed of n lines.
Notes:
● Sets the print position to the beginning of the next line after printing.
● Line feeds set by command ESC 2 and ESC 3 are not affected.
● Paper is fed approximately 1016 mm (40 inc hes) if the [n x line feed amount] exceeds approximately 1016
mm (40 inches) .
Reference: ESC 2, ESC 3
(26)
ESC i
Format:
Execute partial-cut (one point left uncut)
ASCII
ESC i
n
Decimal
27
105 n
Hex.
1B
69 n
Description: Execute a partial cut of the paper.
(27)
ESC p m t1 t2
Specify cash drawer impulse
Format:
ASCII
ESC p
m t1
Hex
1B
70
m t1
Decimal
27
112
m t1
Range:
m=0
t2
t2
t2
48 1 49
0 ≤t1 ≤255
0≤t2 ≤255
● Drawer kick on time is set to [t1*2] millisecond; off time is set to [t2*2] millisecond.
● When t2 < t1, the value of t2 is processed as t2=t1..
● If t2 <50, its value is supposed to be 50.
16
(28)
ESC t n
Format:
Range:
Select character code table
ASCII
ESC t
n
Hex
1B 74 n
Decimal 27 116 n
0≤n≤5
n = 255
Initial Value: n=0
Function: Select page n of the character code table.
n
Character Type
0
PC347(U.S.A)
3
PC860(Portuguese)
7*
(Spanish)
10
(Iran)
18
PC852 (Latin2)
22
(Arabic)
27
Vietnam
32
WPC1255(Israel)
59
PC866 (Russian)
61
PC857(Turkey)
68*
(Armenia)
Items that mark with ‘*’ are only supported by PP71MX/PP71HX currently.
(29)
ESC v
Format:
Transmit paper sensor status
ASCII
ESC
v
Decimal
27
118
Hex
1B
76
ESC v transmits the status of a paper sensor as 1 byte of data. This command allows the host to obtain the
near-end or paper-out status for each line. GS r 1 can also be used to check the status. GS r is recommended for
transmitting the paper sensor status. The status to be transmitted is shown in the table below.
Bit
Off/On
Hex
Decimal
Off
00
0
Paper roll near-end sensor: paper adequate.
On
03
3
Paper roll near-end sensor: paper near end.
Off
00
0
Paper roll end sensor: paper present.
On
(0C)
(12)
4
Off
00
0
Not used.
5,6
-
-
-
Undefined.
7
Off
00
0
Not used.
0,1
(30)
ESC {
Format:
Status
Paper roll end sensor: paper not present.
Turn upside-down printing mode on/off
ASCⅡ
ESC
{
n
17
Fixed to Off.
Fixed to Off.
Decimal
Hex
Range:
27
1B
123
7B
n
n
0≤n≤255
ESC { n turns upside-down printing mode on or off. When the LSB (least significant bit) of n is 1,
upside-down printing mode is turned on; when it is 0, upside-down printing mode is turned off. The default
setting is n=0. When upside-down mode is turned on, the printer prints 180°-rotated characters from right to left.
The line printing order is not reversed; therefore, be careful of the order of the data transmitted. In standard
mode, this command is enabled only when processed at the beginning of a line. In page mode, an internal flag is
activated and this command is enabled when the printer returns to standard mode.
(31)
FS ! n
Format:
Range:
Set Chinese characters printing mode compages
ASCII
FS
!
n
Decimal
28
33
n
Hex
1C
21
n
0≤n≤255
Set the parameter n of Chinese characters printing mode as follows:
Digit
0/1
Hex
Decimal
Function
0, 1
2
3
Undefined.
0
00
0
Double-width mode not selected.
1
04
4
Double-width mode selected.
0
00
0
Double-height mode not selected.
1
08
8
Double-height mode selected.
--
--
Undefined.
0
00
0
Underline not selected.
1
128
80
Underline selected.
4-6
7
(32)
FS S n1 n2
Set Chinese character space amount
Format:
ASCII
FS
S
n1 n2
Decimal 28
83
n1 n2
Hex
1C
53
n1 n2
Range:
0≤n1≤255, 0≤n2≤255
Initial value: n1=0, n2=0
Description: 1. Sets the Chinese character space amount and right space amount.
2. Left space amount: n1 x (basic calculated pitch)
3. Right space amount: n2 x (basic calculated pitch)
Note:
● The space amount set by this command is the amount when using standard sized characters. When expanding
characters more than double in the horizontal direction, the space amount is [set amount x horizontal
direction magnification].
18
● Space amount can be set independently for both the standard and page modes.
● The basic calculated pitch is set by GSP (Set basic calculated pitch). Also, after setting the Chinese character
space amount, it is not affected even if the basic calculated pitch is changed.
● If there are fractions in the result, correct to the minimum mechanical pitch and discard.
● Use the basic calculated pitch (x) for the horizontal direction in standard mode.
● In page mode, the basic calculated pitch that is used according to the starting point is shown below.
a. When the starting point is specified to be upper left or lower right by the ESC T command (Character print
direction selection in page mode), the basic calculated pitch (x) for the horizontal direction is used.
b. When the starting point is specified to be upper right or lower left by the ESC T command, the basic
calculated pitch (y) for the vertical direction is used.
c. The maximum value for the left or right space for Chinese characters is approximately 35.893 mm
(255/180 inches). Specifications that exceed the maximum value are rounded off to that value.
Reference: GSP
(33)
FS p n m
Format
Print the bit image that download to flash
ASCII
FS
p
n m
Hex
1C 70
n m
Decimal 28 112
n m
Range:
1≤ n ≤ 255, 0 ≤ m ≤ 3, 48 ≤ m ≤ 51
Description: Using mode m to print bit image that download to flash.
m
Mode
Density of Vertical Direction Dots
Density of Horizontal Direction Dots
0, 48
Normal Mode
180DPI
180 DPI
1, 49
Double-wide Mode
180DPI
90 DPI
2, 50
Double-tall Mode
90 DPI
180 DPI
3, 51
Quadruple Mode
90 DPI
90 DPI
n specifies the bit image(defined by command FS q) number.
m specifies the bit-image mode.
Details:
Flash bit image is a bit image defined in flash memory by FS q and printed by this command.
This command is ignored when the bit image is undefined.
This command is effective only when no data exists in the print buffer in standard mode.
Excluding upside-down printing, print modes (emphasized printing, double printing, double wide, double
tall, underlines, character sizes, black/white inverted printing and 90 degree clockwise rotation) are
unaffected.
If bit image specification is of a size that exceeds the print region, the data in the print region is targeted for
printing, but the excessive data is not printed.
This command feeds dots (for the height n of the NV bit image) in normal and double-width modes,
and (for the height of the NV bit image n x 2) in double-height and quadruple modes, regardless of
the line spacing specified by ESC 2 or ESC 3.
After printing the bit image, this command sets the print line feed and processes the subsequent data as
normal data.
Reference: ESC *, FS q, GS /, GS v 0
(34)
FS q n [xL xH yL yH d1...dk] 1... [xL xH yL yH d1...dk] n
19
Define NV bit image
Format
ASCII FS
q
Hex
1C 71
Decimal 28 113
n
n
n
[xLxHyLyHd1...dk]1 ... [xLxHyLyHd1...dk] n
[xLxHyLyHd1...dk]1 ... [xLxHyLyHd1...dk] n
[xLxHyLyHd1...dk]1 ... [xLxHyLyHd1...dk] n
Range:
1 ≤ n ≤ 255
0 ≤ xL ≤ 255
1 ≤ (xL+xH×256) ≤ 1023
1 ≤ (yL+yH×256) ≤ 288
0 ≤ d ≤ 255
k = (xL+xH×256) × (yL+yH×256) ×8
The maximum capacity that downloads to NV is 8096 bytes.
Descriptions: Defines the specified flash bit image.
n specifies the number of NV bit images to define.
xL and xH specify the horizontal direction for one NV bit image (xL + xH x 256) x 8 dots.
yL and yH specify the vertical direction for one NV bit image (yL + yH x 256) x 8 dots.
Notes:
● There is the potential of damaging the non-volatile memory by overusing the command, so only use this
command once a day to write to the non-volatile memory.
● This command erases all previously defined NV bit images. The printer cannot redefine only one of several
data definitions that had been defined before. Therefore, all data must be resent.
● The printer may enter a BUSY state while writing data to the non-volatile memory when using this command.
While the printer is BUSY, the printer will stop receptions so data will not be received from the host
(including real-time commands).
● NV bit image is a bit image defined by this command in non-volatile memory and is printed by the FS p
(Print NV bit image) command.
● This command is effective only when processed at the top of the line when standard mode is being used.
● This command is effective when 7 bytes of FS to yH of the command are processed normally.
● When the amount of data exceeds the capacity left in the range defined by xL, xH, yL, yH, the printer only
processes the data in the defined range.
● This command is invalid when processing an argument that is out of the defined range with the initial NV bit
image data.
● The printer terminates processing of this command and starts writing data to the non-volatile memory if an
argument out of the defined range is processed on the second and subsequent NV bit image data. This
invalidates the NV bit image being defined (making it undefined), but the NV bit images prior to that are
valid.
● d specifies defined data. Bits that correspond to the dots to print are 1, and the bits that correspond to the dots
that are not printed are 0.
● An n number of NV bit images are defined in ascending order from 01H. Therefore, The first data of
[xLxHyLyHd1.dk] is an NV bit image of the number 01H. The final data of [xLxHyLyHd1.dk] is the NV bit
image of the number n. This matches with the NV bit image number that is specified for NV bit image
printing (by FS p).
● One NV bit image definition data is configured by [xL xH yL yH d1.dk]. Therefore, if defining only one NV
bit image data, n = 1. The data of [xL xH yL yH d1.dk] is processed only once. This uses ([data: (xL + xH x
256) x (yL + yH x 256) x 8] + [Data: 4]) of non-volatile memory.
● The printer is in a BUSY state just prior to writing to the non-volatile memory.
● The sending of ASB status and detection of status are not possible while processing this command even when
20
the ASB function is specified.
● When processing this command while defining a macro, the macro definition is terminated and the command
commences with processing.
● NV bit images that have been defined are not initialized by the ESC @ (Initialize printer), a reset or by
turning off the printer’s power.
● This command only defines the NV bit image, but it does not print it. To print an NV bit image, use FS p
(Print NV bit image).
Reference: FS p
Ex.: For xL=64, xH=0, yL=96, yH=0
(xL + xH × 256) ×8 dots =512 dots
d97
MSB
(yL + yH × 256) ×8 dots =768 dots
LSB
(35)
GS ! n
Select character size
Format: ASCII GS ! n
Hex
1D 21 n
Decimal 29 33 n
Range: 0≤ n ≤ 255
GS ! n selects the character height using bits 0 to 3, and selects the character width using bits 4 to 7.
Character width selection is as follows:
Hex
Decimal
Width
00
0
1 (normal)
10
16
2 (double-width)
Character height selection is as follows:
21
Hex
Decimal
Height
00
0
1 (normal)
01
1
2 (double-width)
02
2
3
03
3
4
04
4
5
05
5
6
06
6
7
07
7
8
Note:
● This command is effective for all characters (ANK and Chinese characters), excluding HRI characters.
● If the vertical and horizontal magnification ratios are outside the defined range, this command is ignored.
● In standard mode, the vertical direction is the paper feed direction; the horizontal direction traverses the
paper feed direction. Therefore, when character orientation changes in 90 degree clockwise rotation mode,
the relationship between vertical and horizontal directions is reversed.
● In page mode, vertical and horizontal directions are based on the character orientation.
● The base line for characters is the same when there are characters having different vertical direction ratios in
the same line.
● The ESC ! (Batch specify print mode) command can also turn double-width and double-height modes on or
off, but the setting of the last received command is effective.
Reference: ESC !
(36)
GS $ nL nH Specify absolute position for character vertical direction in page mode
Format: ASCII GS !
nL nH
Hex
1D 24 nL nH
Decimal 29 36 nL nH
Range:
0≤ nL ≤ 255, 0≤ nH ≤ 255
Description:
Specifies the character vertical direction position for the data expansion starting position using the absolute
position based on the starting point in page mode. The position of the character vertical direction for the next
data expansion starting position is the position specified by [(nL + nH x 256) x basic calculated pitch] from the
starting point.
Note:
● When not in page mode, this command is ignored.
● Specifications for absolute positions that exceed the specified print range are ignored.
● The position of the character horizontal direction of the data expansion starting position does not move.
● The starting point that is used as a reference is specified by ESC T.
● The following operations occur depending on the starting point of (Selecting the character printing direction
in page mode) ESC T.
a. If the starting point is upper left or lower right, specify the absolution position for the paper feed direction
(character vertical direction). Use the basic calculated pitch (y) for the horizontal direction at this time.
b. If the starting point is upper right or lower left, specify the absolution position for the paper feed in the
vertical direction (character vertical direction). Use the basic calculated pitch (x) for the horizontal direction
at this time.
22
● The basic calculated pitch is set by GSP (Set basic calculated pitch).
● If the calculation results in fractions, the pitch is corrected to a minimal mechanical pitch and the rest is
discarded.
Reference: ESC $, ESC T, ESC W, ESC \, GS P, GS\
(37)
GS H n Select printing position of HRI characters
Format:
ASCII
GS
H
n
Hex
1D
48
n
Decimal
29
72
n
Range:
0≤n≤3
48≤n≤51
GS H n selects the printing position for HRI characters when printing a bar code. n selects the printing
position as follows:
The default setting is n=0. HRI characters are printed at the position specified by GS H.
(38)
GS L nL nH
Set left margin
Format: ASCII GS L
nL
Hex
1D 4C nL
Decimal 29 76 nL
Range:
nH
nH
nH
0≤ nL ≤ 255, 0≤ nH ≤ 255
Description:
1. nL and nH set the specified left margin.
2. The left margin is [(nL + nH x 256) x basic calculated pitch]
23
Note:
● This command is effective only when input at the top of the line when standard mode is being used.
● This command has no affect in page mode. This command is only effective for the setting.
● The maximum setting for the left margin is the same size as the printable region for the horizontal direction.
Specifications that exceed the maximum value are rounded off to that value.
● The basic calculated pitch is set by GSP (Set basic calculated pitch). Also, after setting the left margin, it is
not affected even if the basic calculated pitch is changed.
● Use the basic calculated pitch (x) for the horizontal direction of GS P (Set basic calculated pitch) to calculate
the left margin. If the calculation results in fractions, the pitch is corrected to a minimal mechanical pitch and
the rest is discarded.
Reference: GS P, GS W
(39)
GS P x y
Set basic calculated pitch
Format: ASCII
GS P
x
y
Hex
1D 50 x
y
Decimal 29 80 x
y
Range:
0≤x≤255, 0≤y≤255
Initial value:
x = 180, y = 360: EPSON targeted model print head 180 DPI
x = 203, y = 203: EPSON targeted model print head 203 DPI
Description:
Sets the horizontal basic calculated pitch to approximately 25.4/xmm [(1/x) inch], and the vertical basic
calculated pitch to approximately 25.4/ymm [(1/y) inch].
x = 0: Returns the horizontal basic calculated pitch to its default value.
y = 0: Returns the vertical basic calculated pitch to its default value.
Note:
● Horizontal direction refers to the vertical direction in reference to paper feed; Vertical direction refers to the
direction of paper feed.
● With standard mode, use the parameters shown below regardless of the direction of the characters (upside
down, or rotated 90 degrees).
a. Commands using x: ESC SP, ESC $, ESC \, FSS, GSL, GSW
b. Commands using y: ESC 3, ESC J, GSV
● With page mode, use the parameters shown below according to the direction of the characters.
a. If the starting point is upper left or lower right using ESC T (Character print direction selection in page
mode) (feeds paper and expands characters in the vertical direction):
Commands using x: ESC SP, ESC $, ESCW, ESC \, FSS
Commands using y: ESC3, ESCJ, ESCW, GS$, GS\, GSV
b. If the starting point is upper right or lower left using ESC T (Character print direction selection in page
mode) (expands characters in the paper feed direction):
Commands using x: ESC 3, ESC J, ESCW, GS $, GS \
24
Commands using y: ESC SP, ESC $, ESCW, ESC \, FSS, GSV
● This command has no affect on any previously set setting values.
● If the calculation combining other commands results in fractions, the pitch is corrected to a minimal
mechanical pitch and the rest is discarded.
Reference: ESC SP, ESC $, ESC 3, ESC J, ESC W, ESC \, GS $, GS L, GS V, GS W, GS \
(40)
GS V m
Format:
GS V m n
Select paper-cut mode and cutting paper
①ASCII
Hex
Decimal
②ASCII
Hex
Decimal
Range:
GS
V
m
1D
29
56
86
m
m
GS
V
m n
1D
56
m n
m n
29
86
m=0
48 1 49
m =65
66
0 ≤n ≤255
Paper-cut
M
Paper-cut mode
0, 48
Full-cut
1, 49
Partial-cut
65,66
Feed paper ([n* (lengthways moving unit ) inch]) and partial-cut
● m = 0, 48, 1, 49, cutting paper directly.
● m= 65, 66, feeding paper [the distance between printing position and the paper cutter + n*(lengthways
moving unit)], and then cutting paper.
● Measuring the formfeed distance by lengthways moving unit
(41)
GS \ nL nH Specify relative position for character vertical direction in page mode
Format: ASCII GS \
nL nH
Hex
1D 5C
nL nH
Decimal 29 92
nL nH
Range: 0≤ nL ≤ 255, 0≤ nH ≤ 255
Description:
Specifies the character vertical direction position for the data expansion starting position using the relative
position based on the current point in page mode. This sets the position moved from the current position to [(nL
+ nH x 256) x basic calculated pitch] for the next data expanding starting position.
Note:
● When not in page mode, this command is ignored.
● If the direction below the current position is specified for the characters, specify a positive number; if the
25
direction above is specified, a negative number is used.
● Negative numbers are represented by the complement of 65536. For example, when moving in the upward
direction N pitches, use: nL + nH × 256 = 65536-N
● Specifications for relative positions that exceed the specified print region are ignored.
● The following operations occur depending on ESC T (Selecting the character printing direction in page
mode).
a. If the starting point is upper left or lower right, specify the relative position for the paper feed direction.
Use the basic calculated pitch (y) for the horizontal direction at this time.
b. If the starting point is upper right or lower left, specify the relative position for the paper feed in the
vertical direction. Use the basic calculated pitch (x) for the horizontal direction at this time.
● The basic calculated pitch is set by GSP (Set basic calculated pitch).
● If the calculation results in fractions, the pitch is corrected to a minimal mechanical pitch and the rest is
discarded.
Reference: ESC $, ESC T, ESC W, ESC \, GS $, GS P
(42)
GS h n
Format:
Range:
Set bar code height
ASCII
GS
Hex
1D
Decimal
29
h
68
104
n
n
n
1≤n≤255
GS h n selects the height of a bar code. n specifies the number of dots in the vertical direction. One dot
corresponds to 1/180 inch. The default setting is n=162.
Program Example
PRINT #1,CHR$(&H1D);"h";CHR$(50);Set height to 50
PRINT #1,CHR$(&H1D);"k";CHR$(2);Print bar code
PRINT #1,"496595707379";CHR$(0);
PRINT #1,CHR$(&HA);
PRINT #1,CHR$(&H1D);"h";CHR$(100);Set height to 100
PRINT #1,CHR$(&H1D);"k";CHR$(2);Print bar code
PRINT #1,"496595707379";CHR$(0);
PRINT #1,CHR$(&HA);
Print Sample
Height: 50 dots
Height: 100 dots
26
(43)
GS k m d1 ... dk NUL GS k m n d1 ... dn
Format:
①ASCII
Hex
Decimal
②ASCII
Hex
Decimal
Range:
Print bar code
GS
k
m d1 ... dk NUL
1D
29
6B
107
m d1 ... dk 00
m d1 ... dk 0
GS
k
m n d1 ... dn
1D
29
6B
107
m n d1 ... dn
m n d1 ... dn
①0≤m≤6 (k and d depend on the bar code system used)
②65≤m≤73 (n and d depend on the bar code system used)
①GS k m d1 ... dk NUL and ②GS k m n d1 ... dn select a bar code system and print the bar code.
m specifies a bar code system as follows:
27
Note:
For ①
● This command is quit by the NULL code.
● For UPC-A and UPC-E, a bar code is printed when 12 bytes of bar code data are input. Subsequent data is
processed as normal data.
● For JAN13 (EAN13), a bar code is printed when 13 bytes of bar code data are input. Subsequent data is
processed as normal data.
● For JAN8 (EAN8), a bar code is printed when 8 bytes of bar code data are input. Subsequent data is
processed as normal data.
● The data count for ITF bar codes is always even numbered. If the data count is odd numbered, the last data is
ignored.
For ②:
● n specifies the data count. n bytes from the next data is processed as bar code data.
● If n is outside of the defined region, the command is stopped and normal printing commences from
subsequent data.
When in standard mode:
● If d is outside of the defined region, only a paper feed is executed and normal printing commences from
subsequent data.
● If the horizontal width of the bar code exceeds the print region of one line, the paper is fed without printing
the bar code.
● Executes a paper feed for the height of the bar code (including HRI characters when HRI character printing is
specified) regardless of the line feed amount using the following commands.
a. ESC 2: Set default line spacing
b. ESC 3: Set line feed amount
● This command is effective only when no data exists in the print buffer. If there is data in the print buffer, data
after m is printed as normal data. Sets the next print position to the beginning of the next line after printing
the bar code.
● Excluding upside-down printing, print modes (emphasized printing, double printing, underlines character
sizes) are unaffected.
When in page mode:
● Executes only a bar code expansion but does not print it. After expanding the bar code, the next dot after the
last data of the bar code is the starting position for the expansion of subsequent data.
● If d is outside of the defined region, the command is stopped and normal printing commences from
subsequent data. The position for starting data expansion does not move.
● If the horizontal width of the bar code exceeds the print region of one line, the data expansion starting
position is moved to the left side outside the printing region without printing the bar code.
Program Example
PRINT #1,CHR$(&H1D);"k";CHR$(2);Print bar code
PRINT #1,"496595707379";CHR$(0);
PRINT #1, CHR$(&HA);
PRINT #1, CHR$(&H1D); "k";CHR$(67); CHR$(12);
PRINT #1,"496595707379"; Print bar code
28
Print Sample
Reference: GS H, GS f, GS h, GS w
(44)
GS v 0 m xL xH yL yH d1...dk Print raster graphic
Format: ASCII
GS v 0 m xL xH yL yH d1...dk
Hex
1D 76 30 m xL xH yL yH d1...dk
Decimal 29 118 48 m xL xH yL yH d1...dk
Range: m=0
0≤xL≤27
xH=0
yL=24
yH=0
0≤d≤5
k = ( xL + xH × 256) × ( yL + yH × 256) ( k ≠ 0)
xL and xH specify the horizontal direction data count for one bit image (xL + xH x 256) in bytes.
yL and yH specify the vertical direction data count for one bit image (yL + yH x 256) in bytes.
E.g. when xL + xH×256=64
1
2
65
66
(xL +xH ×256)×8dot =512 dot
3
63
… … 62
67
……
126
127
64
128
(yL +yH ×256) dot
……
……
7 6 5 4
most significant bit
(45)
GS w n
Format:
3
2
Set bar code width
ASCII
Hex
Decimal
1
K–2
K–1
0
least significant bit
GS
1D
29
w
77
119
n
n
n
29
K
Range:
2≤n≤6
GS w n selects the horizontal size of a bar code. n specifies the bar code width as shown below. The
multilevel bar codes are UPC-A, UPC-E, JAN13 (EAN13), JAN8 (EAN8), CODE93, and CODE128. The
binary level bar codes are CODE39, ITF, and CODABAR. The default setting is n=3.
Program Example
PRINT #1,CHR$(&H1D);"w";CHR$(3);Set width size to 3
PRINT #1,CHR$(&H1D);"k";CHR$(2);Print bar code
PRINT #1,"496595707379";CHR$(0);
PRINT #1,CHR$(&HA);
PRINT #1,CHR$(&H1D);"w";CHR$(4);Set width size to 4
PRINT #1,CHR$(&H1D);"k";CHR$(2);Print bar code
PRINT #1,"496595707379";CHR$(0);
PRINT #1,CHR$(&HA);
PRINT #1,CHR$(&H1D);"w";CHR$(5);Set width size to 5
PRINT #1,CHR$(&H1D);"k";CHR$(2);Print bar code
PRINT #1,"496595707379";CHR$(0);
PRINT #1,CHR$(&HA);
Print Sample
Width size 3
Width size 4
Width size 5
30
2 COMMAND SAMPLE (hex command)
1d 68 64 1d 6b 02 34 39 36 35 39 35 37 30 37 33 37 39 00 0a
//print a barcode width 1, height 100
1d 77 02 1d 6b 02 34 39 36 35 39 35 37 30 37 33 37 39 00 0a
// print a barcode width 2, height 100
1d 77 02 1d 6b 02 32 32 30 30 30 30 32 30 30 30 35 30 35 00 0a
// print EAN-13 barcode
1d 6b 00 30 30 30 30 30 30 30 30 30 30 30 00 0a
//print UPC-A barcode
1d 6b 03 30 30 30 30 30 30 30 30 00 0a
//print EAN-8 barcode
1d 6b 04 30 30 30 30 30 30 30 30 30 30 30 30 30 00 0a
// CODE39
1d 68 64 1d 48 03 1d 6b 04 30 30 30 30 30 30 30 30 30 30 30 30 30 00 0a
//set the position of digits on the barcode
31
Revision
20

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement