SNBC BTP-R580II Owner's manual

Receipt Printer
BTP-R580II
Programming Manual
Shandong New Beiyang Information Technology Co., Ltd.

BTP-R580II Programming Manual
- 1 -
REVISION HISTORY
Date Version Description Author
2011-9-6 V100 Initial draft Sun Chuanliang

BTP-R580II Programming Manual
- 2 -
Declaration
If you need this manual, please comply with the clause below.
If you disagree with it, please return this manual immediately.
This manual contains the private confidential information belonging to Shandong New Beiyang
Information Technology Co., Ltd. (hereinafter referred to as SNBC). You must keep its relative content
as the confidential information. If the users are commercial customers or entities, you should be aware
to disclose it to those people with the confidential responsibility including your employees, agencies and
partners. When you terminate the cooperation with SNBC or SNBC puts forward a request, you have to
stop using this manual and return it to SNBC, or destroy the confidential information.
If any relative organ such as court, arbitrator or government authority requests you to disclose any
confidential information of this manual, you must inform SNBC quickly and also agree that you shall
cooperate or assist with SNBC reasonably during the negotiation.
SNBC has the right to disclose its confidential information and is not responsible for the loss or
damages caused from the wrong usage or reference of this manual by users.
Information in this document is subject to change without notice, which is only used for product
maintenance or service relative to this manual. SNBC reserves the right to modify the manual. If users
need further data about the products, please feel free to contact SNBC or your local dealer.
No part of this document may be reproduced or transmitted in any form or by any means, electronic or
mechanical, for any purpose without the express written permission of SNBC.
Copyright
Copyright © 2011 by SNBC
Printed in China
Trademarks
Registered trademarks of SNBC:
Contact us
Address: No.169 Huoju Rd, Weihai, Shandong, China.
Order Tel: +86—631—5671111
Technical support: +86—631—5675888 800861368
Fax: +86—631—5680499 5675111
PC: 264209
Website: www.newbeiyang.com

BTP-R580II Programming Manual
- 3 -
Contents
1 Overview.............................................................................................................................................1
1.1 Command classification................................................................................................................1
1.2 Key terms .....................................................................................................................................1
1.3 Command format ..........................................................................................................................2
2 Command description .........................................................................................................................3
2.1 Print commands............................................................................................................................3
LF Print and feed one line...............................................................................................................3
FF Print and feed paper..................................................................................................................3
CR Print and carriage return...........................................................................................................3
ESC FF Print in page mode............................................................................................................3
ESC J n Print and feed paper .........................................................................................................4
ESC d n Print and feed n lines........................................................................................................4
2.2 Location commands......................................................................................................................5
HT Horizontal tab............................................................................................................................5
ESC $ nL nH Set absolute horizontal print position ........................................................................6
ESC D n1...nk NUL Set horizontal tab positions .............................................................................6
ESC T n Select print area direction in page mode ..........................................................................7
ESC W xL xH yL yH dxL dxH dyL dyH Set print area in page mode .................................................8
ESC \ nL nH Set relative horizontal printing position.....................................................................10
ESC a n Select character align mode ...........................................................................................11
GS $ nL nH Set the absolute vertical position in page mode ........................................................12
GS L nL nH Set left margin ...........................................................................................................12
GS P x y Set the horizontal and vertical motion units ...................................................................13
GS W nL nH Set print area width..................................................................................................14
GS \ nL nH Set relative vertical position in page mode .................................................................15
2.3 Character commands .................................................................................................................15
CAN Delete data in print buffer in page mode ..............................................................................15
ESC SP n Set right-side character spacing ..................................................................................16
ESC ! n Select print mode ............................................................................................................17

BTP-R580II Programming Manual
- 4 -
ESC % n Select/Cancel user-defined characters .........................................................................19
ESC & y c1 c2 [x1 d1...d(y × x1)]...[xk d1...d(y × xk)] Define user-defined characters..................19
ESC – n Select/Cancel underline mode........................................................................................21
ESC ? n Cancel user-defined characters......................................................................................22
ESC E n Select/Cancel emphasized mode...................................................................................22
ESC G n Select/Cancel double-strike mode .................................................................................22
ESC M n Select character font .....................................................................................................23
ESC R n Select an international character set..............................................................................23
ESC V n Select/Cancel 90° clockwise rotation................................................................................24
ESC t n Set code page .................................................................................................................25
ESC { n Select/Cancel upside-down print mode...........................................................................26
GS ! n Select character size .........................................................................................................27
GS B n Select/Cancel white/black reverse print mode..................................................................28
FS ! n Set Chinese character mode..............................................................................................28
FS & Select Chinese mode .............................................................................................................29
FS – n Select/Cancel underline mode for Chinese characters .....................................................30
FS . Cancel Chinese mode...........................................................................................................30
FS 2 c1 c2 d1...dk Define user-defined Chinese characters.........................................................30
FS C n.............................................................................................................................................31
FS S n1 n2 Set left-side and right-side Chinese character spacing ..............................................32
FS W n Select/Cancel quadruple-size mode for Chinese characters ...........................................32
2.4 Bitmap Commands .....................................................................................................................33
ESC * m nL nH d1... dk Select bitmap mode..............................................................................33
GS # n Define current downloaded bitmap number ......................................................................34
GS * x y d1...d(x × y × 8) Define downloaded bitmap ...................................................................35
GS / m Print downloaded bitmap ..................................................................................................35
GS v 0 m xL xH yL yH d1....dk Print raster bitmap........................................................................36
FS p n m Print bitmap downloaded in FLASH ..............................................................................37
FS q n [xL xH yL yH d1...dk]1...[xL xH yL yH d1...dk]n Define NV bitmap.....................................38
2.5 Status commands .......................................................................................................................39
DLE EOT n Real-time status transmission....................................................................................39

BTP-R580II Programming Manual
- 5 -
GS a n Automatic Status Back (ASB) ...........................................................................................41
GS r n Return status .....................................................................................................................43
2.6 Barcode commands....................................................................................................................44
GS H n Select print position for HRI characters............................................................................44
GS f n Select font for HRI characters............................................................................................44
GS h n Select barcode height.......................................................................................................44
①GS k m d1...dk NUL②GS k m n d1...dn Print barcode..............................................................45
GS s n1 n2 n3 n4 n5 n6 n7 n8 Set parameters of GS1 barcode ..................................................50
GS o n Set parameters of barcode QRCODE ..............................................................................51
GS p n Set size of barcode PDF417.............................................................................................51
GS q n Set correction grade of barcode PDF417 .........................................................................52
GS w n Set barcode width ............................................................................................................52
2.7 Two-color commands .................................................................................................................53
ESC r n Enter/Exit two-color print mode .......................................................................................53
ESC C n Select print color ............................................................................................................53
2.8 Upside-down print command ......................................................................................................53
GS ( z nL nH 0 S Enter upside-down mode ..................................................................................53
GS ( z nL nH 0 E Print page data and exit upside-down mode.....................................................55
2.9 Watermark commands................................................................................................................55
GS { w f n1 n2 n3 n4 n5 Set parameters of watermark bitmap .....................................................55
GS { w n Enter\exit watermark mode ............................................................................................56
2.10 Gray scale print command..........................................................................................................57
FS r n xl xh yl yh zl zh d1 d2 d3...d(k) Download Flash gray scale bitmap ...................................57
ESC c 6 n yl yh zl zh d1 d2 d3 ...d(k) Download RAM gray scale bitmap........................................59
ESC c 7 n Print RAM gray scale bitmap .......................................................................................59
2.11 Page control commands .............................................................................................................60
ESC c : n Select paper saving mode ............................................................................................60
2.12 Other commands ........................................................................................................................60
DLE ENQ n Real-time request......................................................................................................60
DLE DC4 n m t Generate pulse at real time to open cash drawer ................................................61
ESC 2 Set default line spacing .....................................................................................................61

BTP-R580II Programming Manual
- 6 -
ESC 3 n Set line spacing ..............................................................................................................62
ESC = n Select printer ..................................................................................................................62
ESC @ Initialize the printer...........................................................................................................63
ESC L Select page mode..............................................................................................................63
ESC S Select standard mode .......................................................................................................63
ESC c 3 n Select paper sensor to output paper end signals.........................................................64
ESC c 4 n Select paper near end sensor to stop printing .............................................................65
ESC c 5 n Enable/disable button ..................................................................................................65
ESC p m t1 t2 Generate cash drawer control pulse......................................................................65
GS ( A pL pH n m Execute test printing ........................................................................................67
GS : Start/End macro definition ....................................................................................................67
①GS V m ②GS V m n Select paper cutting mode and cut paper ...............................................68
GS ^ r t m Execute macro command ............................................................................................68
3 Programming process guide .............................................................................................................70
Appendix ................................................................................................................................................71
Appendix A: CODE128 .......................................................................................................................71
A.1 Overview of CODE128............................................................................................................71
A.2 Code set .................................................................................................................................71
Appendix B: Print mode and its change..............................................................................................75
B.1 General Description ................................................................................................................75
B.2 Set values in standard and page modes.................................................................................75
B.3 Set print area ..........................................................................................................................75
Appendix C: Command index .............................................................................................................77

BTP-R580II Programming Manual
- 1 -
1 Overview
This manual classifies the printer commands into several kinds based on its functions, and also
describes the applications of relative commands in detail depending on its sorts. Hopefully, it can help
the programmers to get known of those commands.
1.1 Command classification
The commands of this receipt printer are classified as below:
Print commands: used for printing and feeding paper;
Position commands: to control the print position;
Character commands: to set character property;
Bitmap commands: to download and print bitmaps, including NV and RAM bitmap;
Status commands: used for printer status query;
Barcode commands: barcode print and property settings;
Other commands: used for periphery control, Macro-definition and initialization, etc.;
For command description, please refer to the detailed function of relative commands.
1.2 Key terms
Immediate commands: These commands are acted on immediately upon being received by the
printer;
Print buffers: used to store figure data to be printed;
Page mode: Under this mode, the printer stores all data in a specified memory and thinks
of this as a virtual page. The page is printed only when the printer receives
print command either FF or ESC FF;
Standard mode: Standard mode is the default mode of printer, namely line mode. Under this
mode, the printer prints and feeds paper upon printer line buffer full (data is
enough for one print line) or receiving print command like LF;
HRI character: Barcode note character.
NV memory: Non-volatile memory in which data stored does not lose when power-down.
NV: Non-volatile;
RAM: Random Access Memory;
DPI: Print dots per inch (one inch equals to 25.4mm). It is used to identify the
resolution of printer. Example, 203DPI means 203 print dots per inch. DPI:
Dot Per Inch
Baseline: The standard position where character data in print buffers are stored. The
figure below shows the position of ordinary characters in standard mode and
page mode:

BTP-R580II Programming Manual
- 2 -
1.3 Command format
[Function] The name and function summary of commands;
[Format] The format of command data, such as ASCII, Hex and Decimal;
[Range] The value range of parameter in the command;
[Note] Explain the main features and application notices of commands;
[Default] The initial value used after the printer initialized;
[Relative] Other commands related to current command;
[Example] Example used for current or relative commands.
All command data in programming Demo use HEX. All normal fonts/characters are data. There is no
explanation for the data of command such as 42 43, which is data. The font/character underlined and
bold is a command, such as 1B 40.All the data inside parentheses after all commands in Demo is used
to explain the meanings of this command. The parentheses and data inside it are not the command to
be transmitted to the printer.

BTP-R580II Programming Manual
- 3 -
2 Command description
2.1 Print commands
LF Print and feed one line
[Function] Print the data in buffer and feed one line
[Format] ASCII LF
Hex 0A
Decimal 10
[Note] This command sets the current position to the beginning of the line.
[Relative] ESC 2, ESC 3
FF Print and feed paper
[Function] Print all data in the buffer and return to the standard mode.
[Format] ASCII FF
Hex 0C
Decimal 12
[Notes] This command is valid only in page mode.
The buffer data is cleared after being printed.
The printer does not execute paper cutting.
This command sets the current position to the beginning of the line.
[Relative] ESC FF, ESC L, ESC S
CR Print and carriage return
[Function] When the command is enabled, it equals to LF; it is ignored when disabled.
[Format] ASCII CR
Hex 0D
Decimal 13
[Notes] • Set the print position to the beginning of the line.
• This command is set according to the printer configuration.
[Relative] LF
ESC FF Print in page mode
[Function] Print all the data in buffer in page mode
[Format] ASCII ESC FF
Hex 1B 0C
Decimal 27 12
[Notes] • This command is enabled only in page mode.
• After printing, the printer does not clear the buffered data, setting values for ESC T
and ESC W, and character position, etc..
[Relative] FF, ESC L, ESC S

BTP-R580II Programming Manual
- 4 -
ESC J n Print and feed paper
[Function] Print the data in buffer and feed paper [n × vertical/horizontal motion unit] inch.
[Format] ASCII ESC J n
Hex 1B 4A n
Decimal 27 74 n
[Range] 0 ≤n ≤255
[Notes] • After printing is completed, this command sets the current print position to the
beginning of the line.
• The paper feed amount set by this command is not affected by the values set by ESC
2or ESC 3.
• The horizontal and vertical motion unit is specified by GS P.
• In standard mode, the printer uses the vertical motion unit (y).
• In page mode, this command functions as follows, depending on the direction and
print starting position of the print area:
①When the print starting position is set to the upper left or lower right of the print
area by ESC T, the vertical motion unit (y) is used;
②When the starting position is set to the upper right or lower left of the print area by
ESC T, the horizontal motion unit (x) is used;
• The maximum paper feed amount is 1016mm (40 inches). When the setting value
exceeds the maximum, it is converted to the maximum automatically.
[Relative] GS P
[Example] 1B 40 (Initialize the printer)
1D 50 CB CB (set the resolution to 203×203)
41 41 41 41 41 41 41 (data to be printed)
1B 4A 50 (print and feed paper 80/203 inch)
42 42 42 42 42 42 42 0A (data to be printed)
Result:
ESC d n Print and feed n lines
[Function] Print the data in buffer and feed n lines (character line).
[Format] ASCII ESC d n
Hex 1B 64 n
Decimal 27 100 n
[Range] 0 ≤n ≤255
[Notes] • This command sets the print starting position to the beginning of the line.
• This command does not affect the line spacing set by ESC 2 or ESC 3.

BTP-R580II Programming Manual
- 5 -
• The maximum paper feed amount is 1016 mm. If the paper feed amount is more than
1016 mm, the printer feeds paper only 1016 mm.
[Relative] ESC 2, ESC 3
[Example] 1B 40 (Initialize the printer)
41 41 41 41 41 41 41 (data to be printed)
1B 64 02 (print and feed 2 character lines, 2/6 inch)
42 42 42 42 42 42 42 0A (data to be printed)
Result:
2.2 Location commands
HT Horizontal tab
[Function] Move the current position to the next tab position.
[Format] ASCII HT
Hex 09
Decimal 9
[Notes] • This command is ignored unless the next horizontal tab position has been set.
• If the next horizontal tab position exceeds the print area, the printer sets the current
position to [Print width + 1].
• Horizontal tab positions are set by ESC D.
• If this command is received when the current position is at [print width + 1], the
printer executes buffer-full action of the current line and move the print position to
the beginning of the next line.
• The default setting of the tab position is 8 ASCII characters (12×24).
• When buffer of current line is full, the printer executes the actions as below:
①In standard mode, the printer will print current line and set the print position to the
beginning of next line;
②In page mode, the printer will shift the line and set the print position to the
beginning of next line.
[Relative] ESC D
[Example] 0A (set print position to the beginning of the line)
1B 40 (initialize the printer)
1B 53 (enter standard mode)
33 33 33 33 33 33
1B 44 08 10 1C 00 (set the horizontal tab position)
09 (move the print position to the next tab)
33 33 33 33

BTP-R580II Programming Manual
- 6 -
09 (the same as above)
33 33 33 33
09 (the same as above)
33 33 33 33
0A (print)
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
33
0A (print)
Result:
ESC $ nL nH Set absolute horizontal print position
[Function] The distance from the beginning of the line to the current position is (nL +
nH×256)×(vertical or horizontal motion unit).
[Format] ASCII ESC $ nL nH
Hex 1B 24 nL nH
Decimal 27 36 nL nH
[Range] 0≤nL≤255
0≤nH≤255
[Notes] • Settings outside the specified print area are ignored.
• The horizontal and vertical motion units are specified by GS P.
• In standard mode, the horizontal motion unit (x) is used.
• In page mode, this command functions as follows, depending on the direction and
print starting position of the print area:
①When the starting position is set to the upper left or lower right of the print area by
ESC T, the horizontal motion unit (x) is used;
②When the starting position is set to the upper right or lower left of the print area by
ESC T, the vertical motion unit (y) is used.
[Relative] ESC \, GS $, GS \, GS P
[Example] Refer to ESC W.
ESC D n1...nk NUL Set horizontal tab positions
[Function] • Set horizontal tab positions.
• Set a tab position at the nth column from the beginning of the line.
• There are k tab positions in all.
[Format] ASCII ESC D n1 nk NUL
Hex 1B 44 n1 nk 00
Decimal 27 68 n1 nk 0

BTP-R580II Programming Manual
- 7 -
[Range] 1 ≤n ≤255
0 ≤k ≤32
[Notes] • The horizontal tab position is stored as a value of [character width × n]. The
character width includes the right-side character spacing, and the double-width
characters are set with twice the width of normal characters.
• This command cancels the previous tab settings.
• When n = 8, the current position is moved to column 9.
• Up to 32 tab positions (k = 32) can be set. Data exceeding 32 tab positions is
processed as normal data.
• Tab positions are in ascending order and place a NUL code at the end.
• When [n] k is less than or equal to the preceding value [n] k-1, tab setting is finished
and the following data is processed as normal data.
• ESC D NUL cancels all horizontal tab positions settings.
• The previously specified tab positions do not change, even if the character width
changes.
• The character width is independent in standard and page mode.
[Default] The default tab positions are at intervals of 8 standard ASCII characters (12 × 24).
[Relative] HT
[Example] Refer to HT
ESC T n Select print area direction in page mode
[Function] Select the direction and starting position of print area in page mode.
[Format] ASCII ESC T n
Hex 1B 54 n
Decimal 27 84 n
[Range] 0 ≤n ≤3 48 ≤n ≤51
n specifies print direction and starting position of print area:
[Notes] • When the command is input in standard mode, the printer executes only internal flag
operation. This command does not affect printing in standard mode.
• This command sets the starting position of the print data within the print area.
• Parameters for horizontal or vertical motion unit (x or y) differ as follows, depending
on the starting position of the print area:
①If the print starting position is the upper left or lower right of the print area, data is
buffered in the direction perpendicular to the paper feed direction:
n Print direction Starting position
0,48 Left to right Upper left (A in the figure)
1,49 Bottom to top Lower left (B in the figure)
2,50 Right to left Lower right (C in the figure)
3,51 Top to bottom Upper right (D in the figure)

BTP-R580II Programming Manual
- 8 -
Commands using horizontal motion unit: ESC SP, ESC $, ESC \
Commands using vertical motion unit: ESC 3, ESC J, GS $, GS \
②If the starting position is the upper right or lower left of the print area, data is
buffered in the paper feed direction:
Commands using horizontal motion unit: ESC 3, ESC J, GS $, GS \
Commands using vertical motion unit: ESC SP, ESC $, ESC \
[Default] n = 0
[Relative] ESC $, ESC L, ESC W, ESC \, GS $, GS P, GS \
[Example] 1B 4C (enter page mode)
1D 50 CB CB (set the resolution)
1B 57 20 00 00 00 40 02 90 02 (set print area in page mode)
1B 54 00 (select print direction in page mode)
30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 0A
(new line)
1B 54 01 (select print direction in page mode)
31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 0A
(new line)
1B 54 02 (select print direction in page mode)
32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 0A
(new line)
1B 54 03 (select print direction in page mode)
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 0A
(print)
50 72 69 6E 74 20 45 6E 64
0C (print)
Result:
ESC W xL xH yL yH dxL dxH dyL dyH Set print area in page mode
[Function] • Define the horizontal starting position, vertical starting position, print area width, and
print area height as follows:

BTP-R580II Programming Manual
- 9 -
Horizontal starting position: x0 = [( xL + xH × 256) × (horizontal motion unit)]
Vertical starting position: y0 = [( yL + yH × 256) × (vertical motion unit) ]
Print area width: dx = [ (dxL + dxH × 256) × (horizontal motion unit) ]
Print area height: dy = [ (dyL + dyH × 256) × (vertical motion unit) ]
[Format] ASCII ESC W xL xH yL yH dxL dxH dyL dyH
Hex 1B 57 xL xH yL yH dxL dxH dyL dyH
Decimal 27 87 xL xH yL yH dxL dxH dyL dyH
[Range] 0 ≤xL, xH, yL, yH, dxL, dxH, dyL, dyH ≤255 (except dxL= dxH=0 or dyL= dyH=0)
[Notes] • If this command is input in standard mode, the printer executes only internal flag
operation. This command does not affect printing in standard mode.
• If the horizontal or vertical starting position is set outside the print area, the printer
stops command processing and processes the following data as normal data.
• If the print area width or height is set to 0, the printer stops command processing and
processes the following data as normal data.
• This command and ESC T together set the current print position.
• If (horizontal starting position + print area width) exceeds the printable area, the
printable width is automatically set to (horizontal width -horizontal starting
position).
• If (vertical starting position + print area height) exceeds the printable area, the
printing height is automatically set to (vertical printable height – vertical starting
position).
• The horizontal and vertical motion units are specified by GS P. Changing horizontal
or vertical motion unit does not affect the current print area.
• Use the horizontal motion unit (x) to set the horizontal starting position and area width,
and use the vertical motion unit (y) to set the vertical starting position and area
height.
• When the horizontal starting position, vertical starting position, print area width, and
print area height are defined as X, Y, Dx, and Dy respectively, the print area is set as
shown in the figure below.
[Default] Decided by printer configuration
[Relative] CAN, ESC L, ESC T, GS P
[Example] 0A

BTP-R580II Programming Manual
- 10 -
1D 50 CB CB (set printer resolution to 203×203)
1B 4C (enter page mode)
1B 57 20 00 00 00 40 01 90 01 (set print area in page mode)
1B 24 00 00 (set absolute horizontal starting position to be starting point)
41
1B 24 32 00 (set absolute horizontal starting position to be 50/203 inch)
42
1B 24 64 00 (set absolute horizontal starting position to be 100/203 inch)
43
0A (new line)
1B 24 00 00 (set absolute horizontal starting position to be starting point)
41
1B 5C 32 00 (set relative horizontal starting position to be 50/203 inch)
42
1B 5C 64 00 (set relative horizontal starting position to be 100/203 inch)
43
0A (new line)
0C (print in page mode)
Result:
ESC \ nL nH Set relative horizontal printing position
[Function] Set the print starting position based on the current position by using the horizontal or
vertical motion unit.
• This command sets the distance from the current position to the print position to be
[ (nL + nH × 256) × horizontal or vertical motion unit].
[Format] ASCII ESC \ nL nH
Hex 1B 5C nL nH
Decimal 27 92 nL nH
[Range] 0 ≤nl ≤255
0 ≤nH ≤255
[Notes] • Any setting that exceeds the printable area is ignored.
• When pitch N is specified to the right: nL+ nH × 256 = N.
• When pitch N is specified to the left, use the complement code: nL+ nH × 256 =
65536 – N.
• The print starting position moves from the current position to [N × horizontal or
vertical motion unit].

BTP-R580II Programming Manual
- 11 -
• The horizontal and vertical motion units are specified by GS P.
• In standard mode, the horizontal motion unit is used.
• In page mode, the horizontal or vertical motion unit differs as follows, depending on
the direction and starting position of the print area:
①When the starting position is set to the upper left or lower right of the print area
using ESC T, the horizontal motion unit is used.
②When the starting position is set to the upper right or lower left of the print area
using ESC T, the vertical motion unit is used;
[Relative] ESC $, GS P
ESC a n Select character align mode
[Function] Align all the print data in some specified align mode.
[Format] ASCII ESC a n
Hex 1B 61 n
Decimal 27 97 n
[Range] 0 ≤n ≤2, 48 ≤n ≤50
Relationship between value of n and align mode:
n Justification
0, 48 Left justification
1, 49 Centering
2, 50 Right justification
[Notes] • This command is enabled only when processed at the beginning of the line in
standard mode.
• If this command is input in page mode, the printer performs only internal flag
operations.
• This command adjusts the space area according to commands HT, ESC $ or ESC\.
[Default] n = 0
[Example] 0A(Entering line mode)
1B 40(Initialization)
1B 61 00(Set left justification)
41 42 43 0A
41 42 43 44 0A
41 42 43 44 45 0A
1B 61 01(Setting centering)
41 42 43 0A
41 42 43 44 0A
41 42 43 44 45 0A
1B 61 02(Set right justification)
41 42 43 0A
41 42 43 44 0A
41 42 43 44 45 0A
Result:

BTP-R580II Programming Manual
- 12 -
GS $ nL nH Set the absolute vertical position in page mode
[Function] This command sets the absolute vertical position 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
[Notes] • This command is enabled only in page mode.
• If the [(nL + nH × 256) × (vertical or horizontal motion unit)] exceeds the specified
print area, this command is ignored.
• The horizontal position does not move after executing this command.
• The positions of relative commands are specified by ESC T
• Depending on the print area direction and starting position specified by ESC T, this
command operates as following:
①When the starting position is set to the upper left or lower right, this command sets
the absolute position in the direction which is parallel to the paper feed direction.
②When the starting position is set to the upper right or lower left, this command sets
the absolute position in the direction which is perpendicular to the paper feed
direction.
• The horizontal and vertical motion units are specified by GS P.
[Relative] ESC $, ESC T, ESC W, ESC \, GS P, GS \
[Example] Refer to ESC W.
GS L nL nH Set left margin
[Function] Set left margin to [ ( nL + nH × 256) × horizontal motion unit)] inches.
[Format] ASCII GS L nL nH
Hex 1D 4C nL nH
Decimal 29 76 nL nH
[Range] 0 ≤nL ≤255
0 ≤nH ≤255
[Notes] • In standard mode, this command is enabled only when processed at the beginning of
the line.
• If this command is input in page mode, it is disabled. The printer will process the
command as normal character.

BTP-R580II Programming Manual
- 13 -
• This command does not affect printing in page mode.
• If the setting exceeds the maximum printable width, the maximum printable width will
be used.
• The horizontal and vertical motion units are specified by GS P. Changing horizontal
and vertical motion unit does not affect the current left margin.
[Default] nL = 0, nH = 0
[Relative] GS P, GS W
[Example] 0A(Set printing position to the beginning of the line)
1B 40(Initialization)
30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36
37 38 39 0A
1D 4C 30 00(Set left margin to 48/203 inch)
30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36
37 38 39 0A
1D 57 C8 00(Set printing width to 200/203 inch)
30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36 37 38 39 30 31 32 33 34 35 36
37 38 39 0A
Result:
GS P x y Set the horizontal and vertical motion units
[Function] Set the horizontal and vertical motion units to approximately 25.4/ x mm (1/ x inches)
and approximately 25.4/ y mm {1/ y inches}, respectively.
[Format] ASCII GS P x y
Hex 1D 50 x y
Decimal 29 80 x y
[Range] 0 ≤x ≤255
0 ≤y ≤255
[Notes] • When x and y are 0, the x and y are set to be default settings.
• The horizontal direction is perpendicular to the paper feed direction and the vertical
direction is the paper feed direction.
• In standard mode, the following commands use x or y, regardless of character
rotation (upside-down or 90° clockwise rotation):
①Commands using x: ESC SP, ESC $, ESC \, FS S, GS L, GS W
②Commands using y: ESC 3, ESC J, GS V
• In page mode, the following commands use x or y, depending on the direction and
Table of contents
Other SNBC Printer manuals

SNBC
SNBC BTP-2002NP User manual

SNBC
SNBC BTP-R880NP User manual

SNBC
SNBC BTP-R990 User manual

SNBC
SNBC BTP-R580 User manual

SNBC
SNBC BTP-L580IIC User manual

SNBC
SNBC BTP-R880NPI User manual

SNBC
SNBC BTP-M300 User manual

SNBC
SNBC BTP-R180II User manual

SNBC
SNBC BTP-R180II User manual

SNBC
SNBC BTP-P33 User manual