PP7MX Printer Command Manual-12
PP7MX Printer Command Manual-12
COMMAND MANUAL
1 COMMANDS .................................................................................................................................................... 1
2 COMMAND SAMPLE (hex command) ......................................................................................................... 42
3 APPENDIX: CODE128 BAR CODE.............................................................................................................. 42
3.1 Description of the CODE128 Bar Code........................................................................................... 42
3.2 Code Tables ..................................................................................................................................... 43
1 COMMANDS
1
25 ESC W 27 87 1B 57 Set printing area in page mode
(1)
HT Horizontal tab
Format: ASCII HT
Decimal 9
Hex 09
Description: Moves the print position to the next horizontal tab position.
Notes:
2
● 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
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 Print and line feed
Format: 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 Print and recover to page mode
Format: 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 Print and carriage return
Format: ASCII CR
Decimal 13
Hex 0D
Note:
● Set the print position to the beginning of the line.
● Print characters with LF command.
(5)
DLE DC4 n m t Real-time output of drawer pulse
Format: ASCII DLE EOT n m t
Decimal 16 20 n m t
Hex 10 14 n m t
Range: n=1
3
m = 0, 1
1 ≤ t≤ 8
Description: This outputs a signal specified by t to the connector pin specified by m.
m Pin #
0 #2 Pin of the drawer kick connector
1 #5 Pin of the drawer kick connector
On time is set to t x 100 msec; Off time is set to t x 100 msec.
Note:
● This command is ignored while outputting the pulse (while executing either ESC p or DEL DC4) to the
connector pin while processing this command.
● This command is executed as long as printer receivers this command in serial mode.
● This command cannot be executed when the printer is busy in parallel mode.
● If printing data string is the same as this command, then the printing data string will be executed as this
command. Users should pay attention to this case.
● Do not use this command to interrupt code strings of other commands that consist of 2 or more codes.
● This command is enabled even when the printer specification is disable by ESC= (select peripheral
devices).
(6)
DLE EOT n Transmit real-time state
Format: ASCII DLE EOT n
Decimal 16 4 n
Hex 10 04 n
Range: 1≤n≤4
Note:
● 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:
4
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
2
On 04 4 Upper cover open
Off 00 0 Not press paper feed key
3
On 08 8 Press paper feed key
4 On 10 16 Fixed to On
Off 00 00 Paper adequate
5
On 20 32 Printer no paper
Off 00 0 No error
6
On 40 64 Error
7 Off 00 0 Fixed to Off
5
(7)
CAN Cancel
Format: 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
(8)
ESC FF print data in page mode
Format: 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
(9)
ESC SP n Set right-side character spacing
Format: ASCII ESC SP n
Decimal 27 32 n
Hex 1B 20 n
Range: 0 ≤ n ≤ 255
Initial Value: n=0
Function: Set the right space amount for the character to [n × basic calculated pitch].
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.
6
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.
(10)
ESC ! Select print modes
Format: ASCⅡ ESC ! n
Decimal 27 33 n
Hex 1B 21 n
Range 0≤n≤255
Initial Value n=0
Function Select print mode(s) using n as follows.
Bit Off/On 1/0 Hex Decimal Functions
0 Off 0 00 0 Character font A(12×24) selected
1,2 Off --- --- Reserved
Off 0 00 0 Emphasized mode not selected.
3
On 1 08 8 Emphasized mode selected.
Off 0 00 0 Double-height mode not selected.
4
On 1 10 16 Double-height mode selected.
Off 0 00 0 Double-width mode not selected.
5
On 1 20 32 Double-width mode selected.
6 Off --- --- Reserved
Off 0 00 0 Underline mode not selected.
7
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!
7
(11)
ESC $ Set absolute print position
Format: ASCⅡ ESC $ nL nH
Decimal 27 36 nL nH
Hex 1B 24 nL nH
Range: 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.
● 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
(12)
ESC * Select bit-image mode
Format: ASCII ESC * m nL nH d1 ... dk
Decimal 27 42 m nL nH d1 ... dk
Hex 1B 2A m nL nH d1 ... dk
Range: 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 Dot density Dot density Amount of data
vertical data (DPI) (DPI) (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
8
(13)
ESC - Turn underline mode on/off
Format: ASCⅡ ESC - n
Decimal 27 45 n
Hex 1B 2D n
Range: 0≤n≤1
0: turn underline mode off
1: turn underline mode on
(14)
ESC 2 Select default line spacing
Format: 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
(15)
ESC 3 Set line spacing
Format: ASCⅡ ESC 3 n
Decimal 27 51 n
Hex 1B 33 n
Range: 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
9
(16)
ESC = n Select printer or VFD
Format: ASCII ESC = n
Decimal 27 61 n
Hex 1B 3D n
Range: 1≤n≤2
Function: Selects the printer or VFD for which the data is effective from the host computer.
Bit 1/0 Hex Decimal Function
0 0 00 0 Printer invalid
1 1 01 1 Printer valid
2 2 02 2 VFD valid
3-7 - - Undefined
The function of 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.
(17)
ESC @ Initialize printer
Format: 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.
(18)
ESC D Set horizontal tab positions
Format: ASCⅡ ESC D n1 … nk NUL
Decimal 27 68 n1 … nk 00
Hex 1B 44 n1 … nk 0
Range: 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
(19)
ESC J Print and feed paper
Format: ASCⅡ ESC J n
10
Decimal 27 74 n
Hex 1B 4A n
Range: 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
(20)
ESC L Select page mode
Format: 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
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.
11
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 \
(21)
ESC M n Select character font
Format: ASCⅡ ESC M n
Decimal 27 77 n
Hex 1B 4D n
Description: Select character font.
n Function
0,48 Selects Font A (12 x 24).
1,49 Selects Font B (9 x 17).
Note:
● Currently only support Font A (12 x 24).
(22)
ESC S Select standard mode
Format: 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
12
(23)
ESC T Select character print direction in page mode
Format: ASCⅡ ESC FF
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\
(24)
ESC V Specify/cancel character 90 degree clockwise rotation
Format: ASCⅡ ESC V n
Decimal 27 86 n
Hex 1B 56 n
Range: 0 ≤ n ≤ 1, 48 ≤ n ≤ 49
Initial Value: n = 0
13
Description: Specifies or cancels character 90 degree clockwise rotation
n Function
0,48 Cancels 90 degree clockwise rotation.
1,49 Specifies 90 degree clockwise rotation.
Note:
Underlines are not applied to characters rotated 90 degrees clockwise even when ESC !, ESC . or
FS . commands are given.
If 90 degree clockwise rotation is specified, double-wide and double-tall commands in the 90
rotation mode enlarges characters in the opposite directions to double-wide and double-tall
commands.
This command only affects printing in standard mode.
In page mode, this command is only effective for the setting.
This command is effective for ANK and Chinese characters.
Reference: ESC !, ESC -
(25)
ESC W Set printing area in page mode
Format: ASCⅡ ESC W xL xH yL yH dxL dxH dyL dyH
Decimal 27 87 xL xH yL yH dxL dxH dyL dyH
Hex 1B 57 xL xH yL yH dxL dxH dyL dyH
Range: 0≤xL, xH, yL, yH, dxL, dxH, dyL, dyH≤255 (except for dxL = dxH = 0 or dyL= dyH =0)
Description:
ESC W xL xH yL yH dxL dxH dyL dyH sets the size and position of the printing area in
page mode as follows:
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).
14
● 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.
(26)
ESC \ nL nH Specify relative position
Format: ASCⅡ 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.
15
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
(27)
ESC a Position alignment
Format: 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
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 Center Right alignment
(28)
ESC d Print and feed paper n lines
Format: ASCII ESC d n
Hex. 1B 64 n
Decimal 27 100 n
Range: 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
16
(29)
ESC i Execute partial-cut (one point left uncut)
Format: ASCII ESC i n
Decimal 27 105 n
Hex. 1B 69 n
Description: Execute a partial cut of the paper.
(30)
ESC m Execute partial-cut (three point left uncut)
Format: ASCII ESC m
Decimal 27 109
Hex. 1B 6D
Range: None
Default: None
Description: Execute a partial cut of the paper.
Notes: This command is supported by some printer models but will not be supported by future printermodels.
GS V is recommended for cutting paper. GS V <Function A> gives the same result as this command.
See GS V <Function A> for details.
The cutting shape depends on the specification of the mounted autocutter.
(31)
ESC p m t1 t2 Specify cash drawer impulse
Format: ASCII ESC p m t1 t2
Hex 1B 70 m t1 t2
Decimal 27 112 m t1 t2
Range: m = 0,48,1,49
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.
(32)
ESC t n Select character code table
Format: ASCII ESC t n
Hex 1B 74 n
Decimal 27 116 n
Range: 0≤n≤255
Initial Value: n=0
Function: Select page n of the character code table.
n character
0 PC347(U.S.A)
2 PC850(Multilingual)
3 PC860(Portuguese)
4 PC863(Canada-French)
5 PC865(Nordic)
17
7 (Spanish)
8 PC857(Turkey)
10 (Farsi)
14 PC864(Arabic)
18 PC852 (Latin2)
20 PC737(Greek)
25 WPC1254(Turkey)
27 (Vietnam)
32 WPC1255(Israel)
33 Rumania
59 PC866 (Cyrillic #2)
68 (Armenia)
(33)
ESC { Turn upside-down printing mode on/off
Format: ASCⅡ ESC { n
Decimal 27 123 n
Hex 1B 7B n
Range: 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.
(34)
FS ! n Set Chinese characters printing mode compages
Format: ASCII FS ! n
Decimal 28 33 n
Hex 1C 21 n
Range: 0≤n≤255
Set the parameter n of Chinese characters printing mode as follows:
Digit 0/1 Hex Decimal Function
0, 1 - - Undefined.
0 00 0 Double-width mode not selected.
2
1 04 4 Double-width mode selected.
0 00 0 Double-height mode not selected.
3
1 08 8 Double-height mode selected.
4-6 -- -- Undefined.
0 00 0 Underline not selected.
7
1 128 80 Underline selected.
18
(35)
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].
● 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
(36)
FS p n m Print the bit image that download to flash
Format 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.
19
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
(37)
FS q n [xL xH yL yH d1...dk] 1... [xL xH yL yH d1...dk] n Define NV bit image
Format ASCII FS q n [xLxHyLyHd1...dk]1 ... [xLxHyLyHd1...dk] n
Hex 1C 71 n [xLxHyLyHd1...dk]1 ... [xLxHyLyHd1...dk] n
Decimal 28 113 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
20
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
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
MSB
LSB
21
(38)
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)
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 !
(39)
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
22
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.
● 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\
(40)
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.
23
(41)
GS L nL nH Set left margin
Format: ASCII GS L nL nH
Hex 1D 4C nL nH
Decimal 29 76 nL nH
Range: 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]
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
(42)
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
24
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 \
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 \
(43)
①GS V m (Function A) ②GS V m n (Function B) End of printing and cut paper
Format: ①ASCII GS V m (Function A)
Hex 1D 56 m
Decimal 29 86 m
②ASCII GS V m n (Function B)
Hex 1D 56 m n
Decimal 29 86 m n
Range: 0 ≤ n ≤ 255
(Function A) m = 0,1,48,49
(Function B m =65,66
Description: Cuts paper in the specified mode.
m Function
Function A 0, 48 Executes a full cut (cuts the paper completely).
1,49 Executes a partial cut (one point left uncut).
Function B 65 Feeds paper to paper tearing position/cutting position + n×
vertical motion unit and executes a paper tearing/ a full cut
(cuts the paper completely).
66 Feeds paper to paper tearing position/cutting position + n×
vertical motion unit) and executes a paper tearing/a partial cut
(one point left uncut).
•The paper is completely or partially (with one point left uncut) cut depending on the printer model.
(44)
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:
25
● 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
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
(45)
GS h n Set bar code height
Format: ASCII GS h n
Hex 1D 68 n
Decimal 29 104 n
Range: 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
26
(46)
GS k m d1 ... dk NUL GS k m n d1 ... dn Print bar code
Format: ①ASCII GS k m d1 ... dk NUL
Hex 1D 6B m d1 ... dk 00
Decimal 29 107 m d1 ... dk 0
②ASCII GS k m n d1 ... dn
Hex 1D 6B m n d1 ... dn
Decimal 29 107 m n d1 ... dn
Range: ①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:
Note:
For ①
● This command ends with a NUL code.
● When the bar code system used is UPC-A or UPC-E, the printer prints the bar code data after receiving 12
bytes bar code data and processes the following data as normal data.
● When the bar code system used is JAN13 (EAN13), the printer prints the bar code after receiving 13 bytes
bar code data and processes the following data as normal data.
27
● When the bar code system used is JAN8 (EAN8), the printer prints the bar code after receiving 8 bytes bar
code data and processes the following data as normal data.
● The number of data for ITF bar code must be even numbers. When an odd number of data is input, the
printer ignores the last received data.
For ②:
● n indicates the number of bar code data, and the printer processes n bytes from the next character data as bar
code data.
● If n is outside of the specified range, the printer stops command processing and processes the following data
as normal data.
28
[Example] Printing GS k 72 7 67 111 100 101 13 57 51
29
[Example] Example data for printing "No. 123456"
In this example, the printer first prints "No." using CODE B, then prints the following numbers using CODE C.
GS k 73 10 123 66 78 111 46 123 67 12 34 56
● If the top of the bar code data is not the code set selection character, the printer stops command processing
and processes the following data as normal data.
● If combination of "{" and the following character does not apply any special character, the printer stops
command processing and processes the following data as normal data.
● If the printer receives characters that cannot be used in the special code set, the printer stops command
processing and processes the following data as normal data.
● The printer does not print HRI characters that correspond to the shift characters or code set selection
characters.
● HRI character for the function character is space.
● HRI characters for the control character (<00>H to <1F>H and <7F>H) are space.
<Others> Be sure to keep spaces on both right and left sides of a bar code. (Spaces are different depending on the
types of the bar code.)
[Reference] GS H, GS f, GS h, GS w, Appendix
(47) GS ( k Set up and print the symbol
● Symbol type is specified by cn
● Function code fn specifies the function
cn fn Function NO. Function name
49 65 Function 1 QR Code: Select the model
67 Function 2 QR Code: Set the size of module
69 Function 3 QR Code: Select the error correction level
80 Function 4 QR Code: Store the data in the symbol storage area
81 Function 5 QR Code: Print the symbol data in the symbol storage data
82 Function 6 QR Code: Transmit the size information of the symbol data in the
symbol storage area
30
1) GS ( k <Function 1> Select the model
[Format] ASCII GS ( k pL pH cn fn n1 n2
Hex 1D 28 6B 04 00 31 41 n1 n2
Decimal 29 40 107 4 0 49 65 n1 n2
[Range] (pL + pH *256) = 4 (pL = 4, pH = 0)
cn = 49
fn = 65
n1 = 49, 50
n2 = 0
[Default] n1 = 50, n2 = 0
[Description] Selects the model for QR Code.
31
[Notes] 5 and 6.
-Solomon error correction to generate a series of error correction
codewords.
ESC @ is executed, the printer is reset, or the power
is turned off.
• ESC @ is executed
• The printer is reset or the power is turned off
5) GS ( k <Function 5> Print the symbol data in the symbol storage area
[Format] ASCII GS ( k pL pH cn fn m
Hex 1D 28 6B 03 00 31 51 m
Decimal 29 40 107 3 0 49 81 m
[Range] (pL + pH* pL = 3, pH = 0)
cn = 49
fn = 81
m = 48
[Description] Encodes and prints the QR Code symbol data in the symbol storage area using the process of
<Function 4>.
32
[Notes] e,” or “there is no
data in the print buffer.”
printing. The printer moves print position to the next dot of the last data of the symbol.
lude the quiet zone when
using this function.
6) GS ( k <Function 6> Transmit the size information of the symbol data in the symbol storage
area
[Format] ASCII GS ( k pL pH cn fn m
Hex 1D 28 6B 03 00 31 52 m
Decimal 29 40 107 3 0 49 82 m
[Range] (pL + pH *256) = 3 (pL = 3, pH =0 )
cn = 49
33
fn = 82
m = 48
[Description] Transmits the size information for the encoded QR Code symbol data in the symbol storage area
using the process of <Function 4>.
[Notes] line,” or “there is
no data in the print buffer.”
(*1)”Horizontal size” and “vertical size” indicate the number of dots of the symbol. The decimal
value of the vertical size and horizontal size is converted to text data and sent starting from the high
order end.
(ex: When horizontal size is 120 dots, horizontal size is “120” (in hexadecimal: 31H, 32H, and 30H
/ in decimal: 49, 50, and 48 ), which is 3 bytes of data.)
(*2)”Other information” indicates whether printing of the data in the symbol storage area is
possible or impossible. The “Other information“ is the following.
Other information
5.
shown below.
34
us [Notes for transmission process] for process sending data group.
For instance:
Send “1d 28 6b 03 00 31 43 03 1d 28 6b 1a 00 31 50 30 31 32 33 61 62 63 34 35 36 37 38 39 41 42 43 39 38 37
36 35 6f 6b 21 1D 28 6b 03 00 31 51 30” to the printer. Then QR code will be printed that shows
123abc456789ABC98765ok!.
1d 28 6b 03 00 31 43 03: set the size of QR code. Modify last one 03 to change size.
1d 28 6b 1a 00 31 50 30: set the content of QR code.
31 32 33 61 62 63 34 35 36 37 38 39 41 42 43 39 38 37 36 35 6f 6b 21: 123abc456789ABC98765ok!
1D 28 6b 03 00 31 51 30: print QR code.
(48)
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
7 6 5 4 3 2 1 0
most significant bit least significant bit
35
(49)
GS w n Set bar code width
Format: ASCII GS w n
Hex 1D 77 n
Decimal 29 119 n
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
36
(50) QR code command
37
38
39
40
(51) Black mark detection parameter setting
[Range] fn = 49
1 <= K <= 6
0x30 <= d <= 0x39 or d=0x3B
[Default] D = d1 ... dk
[Description] d1 ... dk = 0x31 0x32 0x33 0x34 0x35 0x36 then D = 123456;
d1 ... dk = 0x31 0x32 0x33 0x3B then D = 123
[Notes]
D1 = d11...d1k D1=0x31 allow black mark detection, otherwise black mark detection is prohibited
D2 = d21...d2k the height between the two black marks (the top is aligned)
D3 = d21...d2k the height of black mark
D4 = d31...d3k top of the black mark to print starting position
D5 = d41...d4k top of the black mark to cutter position
D6 = d51...d5k print starting position to print finishing position
D7 = d61...d6k horizontal left unprinted margin
D8 = d71...d7k horizontal printable range
41
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
42
3.2 Code Tables
Printable characters in code set A.
43
Printable characters in code set B.
44
Printable characters in code set C.
45
Revision:12