No part of this publication may be copied, reproduced, adapted or translated without the prior
written permission of Bematech S.A., except when allowed by patent rights.
Information in this publication is purely informative, subjected to change without notice and no
liability is assumed with respect to its use. However, as product improvements become
available, Bematech S.A. will make every effort to provide updated information for the
products described in this publication. The latest version of this manual can be obtained
through Bematech website:
www.bematech.com
Notwithstanding the other exceptions contained in this Manual, the consequences and
responsibility are assumed by the Purchaser of this product or third parties as a result of: (a)
intentional use for any improper, unintended or unauthorized applications of this product,
including any particular purpose; (b) unauthorized modifications, repairs, or alterations to this
product; (c) use of the product without complying with Bematech S.A. operating and
maintenance instructions; (d) use of the product as component in systems or other
applications in which the failure of this could create a situation where personal injury or
material damages may occur. In the events described above, Bematech S.A. and its officers,
administrators, employees, subsidiaries, affiliates and dealers shall not be held responsible or
respond by any claim, costs, damages, losses, expenses and any other direct or indirect injury,
as well as claims which alleges that Bematech S.A. was negligent regarding the design or
manufacture of the product.
Bematech S.A. shall not be liable against any damages or problems arising from the use of any
options or any consumable products other than those designated as original Bematech
products or approved products by Bematech S.A.
Any product names or its logotypes mentioned in this publication may be trademarks of its
respective owners and shall be here recognized.
Product warranties are only the ones expressly mentioned in the Quick Start. Bematech S.A.
disclaims any and all implied warranties for the product, including but not limited to implied
warranties of merchantability or fitness for a particular purpose. In addition, Bematech S.A.
shall not be responsible or liable for any special, incidental or consequential damages or lost
profits or savings arising from the use of the product by the Purchaser, the User or third
parties.
The objective of this manual is to give to programmers all necessary information to properly
program and integrate the MP-4000 TH printer into a system. The MP-4000 TH printer is able
to interpret ESC/Bema commands and ESC/POS
For further information refer to the documentation below available in our website:
® 1
commands.
www.bematech.com
User’s Manual – Contains information referring to operation, features and specifications of
the MP-4000 TH printer.
Service Manual – Contains information necessary to identify and resolve MP-4000 TH printer
problems.
Developers advice
Beside this manual, the drivers and API (and all their documentation) listed below are available
from our website (http://www.bematech.com
•Windows 2000/XP/Vista-32 – API dynamic-link library driver (mp2032.dll); recent
spooler drivers (BemaSetupXXxX.exe); parallel port driver and USB port driver;
software for testing purposes.
•Windows 9x/ME/NT4 - API dynamic-link library driver (mp2032.dll); old and
unsupported spooler drivers (BemaSetupXXxX.exe);
•Linux (x86) - CUPS
implementantion of mp2320 library as a shared object (mp2032.so);
1 ESC/POS® is registered trademark of Seiko Epson Corporation.
TM
spooler drivers compatible with Redhat 8.0; partial
The MP-4000 TH printer has a series of programming commands that may be used in the
remote mode. Two types of commands can be sent:
1.1 Direct command
In this mode, a simple ASCII code is enough to command the printer. For example:
ASCII CODE : LF
DECIMAL : 10
HEXADECIMAL : 0A
This command causes the printer to perform a line feed.
1.2 Control sequence
In this mode, more than one code may be sent to command or program the printer.
This “control sequence” always starts with the ASCII code “ESC”, “FS” or “GS”. For example:
The following section lists and describes all resident commands including command
parameters. The command syntax is as follows:
•ESC P is a command without parameters;
•ESC Q n is a command with one parameter only;
•ESC K n1 n2 is a command with two parameters;
•ESC D n1...nk is a command with a variable number of parameters.
A character ‘h’ following an alphanumeric string represents an hexadecimal number. A
number with no ‘h’ following it is in decimal mode. An italic item is a parameter to the escape
function.
Note: MP-4000 TH printer is capable of interpreting ESC/Bema commands and
ESC/POS commands.
2.1 ESC/Bema Command Table
Operation
Code Function Format hexadecimal Page
GS F9h 5 00hSelect ESC/Bema operation mode. Writes on flash.
GS F9h 1Fh 31h Return to previous set of commands configured
before temporary setting.
ESC @ Initializes the MP-4000 TH printer 1B 40 14
ESC b n n = 1 => PE signal reflects drawer sensor
n = 0 => PE signal reflects paper sensor
ESC v nActivate drawer for n milliseconds (-50ms < n <
200ms)
ESC w Performs a full paper cut 1B 77 15
ESC m Performs a partial paper cut 1B 6D 15
ESC y nEnable / disable panel keys 1B 79 n 15
ESC x Enable Dump Mode 1B 78 16
ESC z n Enable (n = 1) / disable (n = 0) automatic line feed 1B 7A n 16
ESC ( A pL pH fn n1 n2vol
GS F9h – nSet printer priority (high quality or high speed) 1D F9 2D n 17
GS F9h ! n Set paper width 1D F9 21 n 17
GS F9h , nEnable/Disable paper near end sensor 1D F9 2C n 18
GS F9h + nSet and save printing intensity 1D F9 2B n 18
GS FAh nSet printer language 1D FA n 18
ESC C nSet page size in lines 1B 43 n21
ESC c n1 n2Set page size in millimeters 1B 63 n1 n2 21
ESC J nPerforms a fine line feed 1B 4A n 21
FF Feeds one page 0C 21
LF Feeds one line 0A 22
ESC 2 Line feed of 1/6 inch 1B 32 22
ESC 3 nLine feed of n/144 inch 1B 33 n 23
ESC f 1 nVertical skipping 1B 66 31 n 23
ESC A nFeeding paper (n * 0,375mm) 1B 41 n 23
Horizontal positioning
Code Function Format hexadecimal Page
ESC f 0 nHorizontal skipping 1B 66 30 n 24
ESC Q nSet right margin 1B 51 n 24
ESC l nSet left margin 1B 6C n 24
ESC a n Centralize (n = 1) or left align (n = 0) characters 1B 61 n 25
ESC d nEnable / Disable double height print mode 1B 64 n 30
ESC H Set default column per line 1B 48 31
ESC P Set default column per line 1B 50 31
ESC SI Set condensed mode 1B 0F 31
ESC SO Set on-line expanded mode 1B 0E 32
ESC V Set on-line double height mode 1B 56 32
ESC W nEnable / Disable expanded mode 1B 57 n 32
SI Enable condensed mode 0F 33
SO Enable on-line expanded mode 0E 33
GS h nSets the height n of the barcode generated 1D 68 n 46
GS w nDetermines the width of the barcode 1D 77 n 46
GS H n Choose the position of the human readable
1D 48 n 46
information (HRI) of the barcode
GS f nSets the font used to print the human readable
1D 66 n 47
information (HRI)
GS k 0 d1…d11 NUL Prints an UPC-A barcode 1D 6B 00 d1…d
GS k 65 11 d1...d11 Prints an UPC-A barcode 1D 6B 41 0B d1…d
GS k 1 d1…d6 NUL Prints an UPC-E barcode 1D 6B 01 d1…d
GS k 66 6 d1…d6 Prints an UPC-E barcode 1D 6B 42 06 d1…d
GS k 2 d1…d12 NUL Prints an EAN-13 barcode 1D 6B 02 d1…d
GS k 67 12 d1…d12 Prints an EAN-13 barcode 1D 6B 43 0C d1…d
GS k 3 d1…d7 NUL Prints an EAN-8 barcode 1D 6B 03 d1…d
GS k 68 7 d1…d7 Prints an EAN-8 barcode 1D 6B 44 07 d1…d
GS k 4 d1…dn NUL Prints a CODE 39 barcode 1D 6B 04 d1…d
GS k 69 n d1…dn Prints a CODE 39 barcode 1D 6B 45 n d1…d
GS k 5 d1…dn NUL Prints an ITF barcode 1D 6B 05 d1…d
GS k 70 n d1...dn Prints an ITF barcode 1D 6B 46 n d1…d
GS k 6 d1…dn NUL Prints a CODABAR barcode 1D 6B 06 d1…d
GS k 71 n d1…dn Prints a CODABAR barcode 1D 6B 47 n d1…d
GS k 72 d1…dn Prints a CODE 93 barcode 1D 6B 48 n d1…d
GS k 73 n d1…dn Prints a CODE 128 barcode 1D 6B 49 n d1…d
GS k 128 n1 n2 n3 n4
n
5 n6
d1…d
n
Prints a PDF-417 barcode 1D 6B 80 n
n
d1…d
6
n
GS k 21 d1…d9 NUL Prints an ISBN barcode 1D 6B 15 d1…d
GS k 22 d1…dn NUL Prints a MSI barcode 1D 6B 16 d1…d
GS k 130 n d1…dn Prints a MSI barcode 1D 6B 82 n d1…d
GS k 23 d1…dn NUL Prints a PLESSEY barcode 1D 6B 17 d1…d
GS k 131 n d1…dn Prints a PLESSEY barcode 1D 6B 83 n d1…d
GS k 132 n1 n2 Programs barcode’s left margin 1D 6B 84 n1 n
GS F9h 5 01hSelect ESC/POS operation mode. Writes on flash.
Use with caution.
GS F9h 20h 31h Select ESC/POS temporary operation mode.
Doesn’t alters flash.
GS F9h 1Fh 31h Return to previous set of commands configured
before temporary setting.
ESC = n Select peripheral device 1B 3D n 57
ESC @ Initialize printer 1B 40 57
ESC c 3 n Select paper sensor(s) to output paper-end signals 1B 63 33 n 58
ESC c 4 n Select paper sensor(s) to stop printing 1B 63 34 n 58
ESC c 5 n Enable/disable panel buttons 1B 63 35 n 59
ESC p m t1 t2 General pulse 1B 70 m t1 t2 59
GS ( A pL pH n m Execute test print 1D 28 41 pL pH n m 60
DLE DC4 n m t Generate pulse at real-time 10 14 n m t 60
GS V m (n) Select cut mode and cut paper 1D 56 m (n) 61
ESC ( A pL pH fn n c t1 t2
Activate buzzer 1B 28 41 pL pH fn n c
Vertical positioning
Code Function Format hexadecimal Page
LF Print and line feed 0A 62
FF Print and return to standard mode 0C 62
CR Print and carriage return 0D 62
ESC $ nL nH Set absolute print position 1B 24 nL n
ESC 2 Select default line spacing 1B 32 63
ESC 3 n Set line spacing 1B 33 n 63
ESC \ nL nH Set relative print position 1B 5C nL n
ESC d n Print and feed n lines 1B 64 n 64
Horizontal positioning
Code Function Format hexadecimal Page
HT Horizontal tab 09 65
ESC SP n Set right-side character spacing 1B 20 n 65
ESC D n1…nK NUL Set horizontal tab positions 1B 44 n1…nk 00 65
ESC a n Select justification 1B 61 n 66
GS L nL nH Set left margin 1D 4C nL nH 66
Character types
Code Function Format hexadecimal Page
ESC – n Turn underline mode on/off 1B 2D n 67
ESC E n Turn emphasized mode on/off 1B 45 n 67
ESC M n Select character font 1B 4D n 67
GS B Activate/deactivate black/white reverse printing 1D 42 n 68
ESC R nSelect an international character set 1B 52 n 68
ESC t n Select character code table 1B 74 n 68
DLE EOT nReal-time status transmission 10 04 n 69
DLE ENQ n Real-time request to printer 10 05 n 70
GS I n Transmit printer ID 1D 49 n 71
GS a n Enable/disable Automatic Status Back (ASB) 1D 61 n 72
GS r n Transmit status 1D 72 n 73
Data Control
Code Function Format hexadecimal Page
CAN Cancel print data 18 75
Barcodes
Code Function Format hexadecimal Page
GS h n Set bar code height 1D 68 n 46
GS w n Set bar code width 1D 77 n 46
GS H n Select printing position of HRI characters 1D 48 n 46
GS f n Select font for HRI characters 1D 66 n 47
GS k 0 d1…d11 NUL Prints an UPC-A barcode 1D 6B 00 d1…d1
GS k 65 11 d1...d11 Prints an UPC-A barcode 1D 6B 41 0B d1…d1
GS k 1 d1…d6 NUL Prints an UPC-E barcode 1D 6B 01 d1…d
GS k 66 6 d1…d6 Prints an UPC-E barcode 1D 6B 42 06 d1…d
GS k 2 d1…d12 NUL Prints an EAN-13 barcode 1D 6B 02 d1…d1
GS k 67 12 d1…d12 Prints an EAN-13 barcode 1D 6B 43 0C d1…d1
GS k 3 d1…d7 NUL Prints an EAN-8 barcode 1D 6B 03 d1…d
GS k 68 7 d1…d7 Prints an EAN-8 barcode 1D 6B 44 07 d1…d
GS k 4 d1…dn NUL Prints a CODE 39 barcode 1D 6B 04 d1…d
GS k 69 n d1…dn Prints a CODE 39 barcode 1D 6B 45 n d1…d
GS k 5 d1…dn NUL Prints an ITF barcode 1D 6B 05 d1…d
GS k 70 n d1...dn Prints an ITF barcode 1D 6B 46 n d1…d
GS k 6 d1…dn NUL Prints a CODABAR barcode 1D 6B 06 d1…dn 00 51
GS k 71 n d1…dn Prints a CODABAR barcode 1D 6B 47 n d1…d
GS k 72 d1…dn Prints a CODE 93 barcode 1D 6B 48 n d1…d
GS k 73 n d1…dn Prints a CODE 128 barcode 1D 6B 49 n d1…d
GS k 128 n1 n2 n3 n4
n
5 n6
d1…d
n
Prints a PDF-417 barcode 1D 6B 80 n1 n2 n
d1…d
n
6
n
GS k 21 d1…d9 NUL Prints an ISBN barcode 1D 6B 15 d1…d9 00 53
GS k 22 d1…dn NUL Prints a MSI barcode 1D 6B 16 d1…d
GS k 130 n d1…dn Prints a MSI barcode 1D 6B 82 n d1…d
GS k 23 d1…dn NUL Prints a PLESSEY barcode 1D 6B 17 d1…dn 00 54
GS k 131 n d1…dn Prints a PLESSEY barcode 1D 6B 83 n d1…d
GS k 132 n1 n2Programs barcode’s left margin 1D 6B 84 n1 n2 55
[Format] ASCII ESC w
Hexadecimal 1B 77
Decimal 27 119
[Description] This command operates the auto cutter, performing a full cut in the
paper.
[Notes] When presenter is activated there is a minimum receipt size (roughly 3.3
inches) to avoid paper jam inside the presenter. If the receipt size is less
than the minimum, the full cut command will automatically add line feeds
to perform the cut.
ESC m
[Function] Performs a partial paper cut.
[Format] ASCII ESC m
Hexadecimal 1B 6D
Decimal 27 109
[Description] This command operates the auto cutter, performing a partial cut in the
paper.
[Notes] This command is available only if presenter is not activated.
ESC y n
[Function] Enable / disable panel keys.
[Format] ASCII ESC y n
Hexadecimal 1B 79 n
Decimal 27 121 n
[Range] n = 0,1
[Default] n = 1
[Description] Enables or disables the panel key.
9 When n is 0 (00h or 30h), the panel key is disabled.
9 When n is 1 (01h or 31h), the panel key is enabled.
9
[Notes] When the panel key is disabled, no button on the panel is usable.
[Note] This command doesn’t work with parallel port in SPP mode.
GS F9h ‘ n
[Function] Get printer information.
[Format] ASCII GS F9h ‘ n
Hexadecimal 1D F9 27 n
Decimal 29 249 39 n
[Description] Get printer information as shown on following table:
n Information
0, 30h Product code
1, 31h Serial number
2, 32h Manufacturing date
3, 33h Firmware version
4, 34h Reserved
5, 35h Manufacturing timestamp (dd/mm/yyyy hh:mm:ss format)
[Description] Set IP address and subnet mask on hexadecimal format without
points.
[Example] IP 10.1.1.250 and SUBNET 255.0.0.0 must be sent as 0Ah 01h 01h
FAh FFh 00h 00h 00h
GS F9h * n
[Function] Set USB address.
[Format] ASCII GS F9h * n
Hexadecimal 1D F9 2A n
Decimal 29 249 42 n
[Description] Set USB address to allow the use of more than one printer on same
[Function] Line feed of n/144 inch.
[Format] ASCII ESC 3 n
Hexadecimal 1B 33 n
Decimal 27 51 n
[Range] 16 ≤ n ≤ 255
[Description] The line feed rate per line is specified by n/144 inch.
[Notes] This command takes effect immediately.
ESC f 1 n
[Function] Vertical skipping
[Format] ASCII ESC f 1 n
Hexadecimal 1B 66 31 n
Decimal 27 102 49 n
[Range] 0 ≤ n ≤ 255
[Description] Performs a vertical skipping of n characters.
[Notes] The command 1Bh 66h 01h n has the same effect.
ESC A n
[Function] Feeding paper n * 0,375mm.
[Format] ASCII ESC A n
Hexadecimal 1B 41 n
Decimal 27 65 n
[Range] 0 < n < 256
[Description] Performs the feeding of n * 0,375mm.
[Notes] If n < 17, the line feed will be equal to zero. For n > 100, the line feed
will be equal to 32mm. For other values, the line feed is equal to
Decimal 27 102 48 n
[Range] 0 ≤ n ≤ 255
[Description] Performs a horizontal skipping of n characters.
[Notes] The command 1B 66 00 n has the same effect.
ESC Q n
[Function] Set right margin.
[Format] ASCII ESC Q n
Hexadecimal 1B 51 n
Decimal 27 81 n
[Range] 0 < n < 256
[Description] Sets right margin in characters from the default left margin.
[Notes] If the right margin is set to the left of the current horizontal position, the
new margin becomes valid in the next line.
ESC I n
[Function] Set left margin.
[Format] ASCII ESC I n
Hexadecimal 1B 6C n
Decimal 27 108 n
[Range] 0 < n < 256
[Description] Sets left margin in characters from the default left margin.
[Notes] If the left margin is set to the right of the current horizontal position, the
[Notes] Emphasized print is bolder than normal print. Emphasized print is
available in all print modes.
ESC F
[Function] Disable emphasized print mode
[Format] ASCII ESC F
Hexadecimal 1B 46
Decimal 27 70
[Description] Disables emphasized print mode.
ESC t n
[Function] Selects code page
[Format] ASCII ESC t n
Hexadecimal 1B 74 n
Decimal 27 116 n
[Range] n = 2, 3, 4, 5
[Default] n = 2
[Description] Selects character code page.
9 When n is 2 (02h or 32h), CODEPAGE 850 is selected.
9 When n is 3 (03h or 33h), CODEPAGE 437 is selected.
9 When n is 4 (04h or 34h), CODEPAGE 860 is selected.
9 When n is 5 (05h or 35h), CODEPAGE 858 is selected.
[Notes] CODEPAGE 850 is the default character code page.
9 When n is 2 (32h), the intensity selected is NORMAL.
9 When n is 3 (33h), the intensity selected is STRONG.
9 When n is 4 (34h), the intensity selected is VERY STRONG.
ESC ! n
[Function] Select print mode
[Format] ASCII ESC ! n
Hexadecimal 1B 21 n
Decimal 27 33 n
[Description] Selects the print mode depending on byte n as shown in the table
below:
Bit Function
0 Undefined
1 Undefined
2 Undefined
3 Emphasized Canceled Specified
4 Double height Canceled Specified
5 Double width Canceled Specified
6 Undefined
7 Underlined Canceled Specified
ESC } n
[Function] Enable / Disable Inverted mode
[Format] ASCII ESC } n
Hexadecimal 1B 7D n
Decimal 27 125 n
Value
0 1
[Range] n = 0, 1
[Default] n = 0
[Description] Enables or disables inverted mode.
9 When n is 1 (01h or 31h), the inverted mode is enabled.
9 When n is 0 (00h or 30h), the inverted mode is disabled.
For this 24-bit graphic pattern
we have eight bit-columns, each with
a height of 3 bytes (24 bits). The
printer must, after the command is
stated, receive the 1
st
, 2nd and 3rd
bytes of the first bit-column, than the
1st , 2nd and 3rd bytes of the second
bit-column and so on, until the last bit-
Where you have 8 + 0 * 256 = 8 bit-columns to be filled, each with 3 bytes that will
give us a total of 24 bytes to be sent (excluding the command sequence).
3.6.2 8-bit graphics
1 byte
{
s
1
bit-column
8th bit-column
MSB (bit 7)
LSB (bit 0)
we have eight bit-columns, each with
a height of 1 byte (8 bits). The printer
must, after the command is stated,
receive the byte for the first bitcolumn, than the byte for the second
bit-column and so on, until the last bitcolumn is filled. The resolution is
lower but needs less bytes to be sent
For this 8-bit graphic pattern
The command sequence to print this graphic pattern would be (numbers in
decimal):
ESC K 8 0 1 2 4 8 16 32 64 128
Where you have 8 + 0 * 256 = 8 bit-columns to be filled, each with 1 byte that will
give us a total of 8 bytes to be sent (excluding the command sequence).
[Description] Selects the “8 pin” bit image (compatible with matrix printers) where
you use n1+n2*256 columns, with 1 byte per column thus using a
lower resolution and up to ‘N’ columns. If the image you want to print
has less than ‘N’ graphic columns, a LF must be sent to complete line
printing. Text and graphic can be mixed in the same line. See ‘N’ value
in the Table 2.
FS p n m
[Function] Print NV bit image.
[Format] ASCII FS p n m
Hexadecimal 1C 70 n m
Decimal 28 112 n m
[Description] Prints a NV bit image n using the mode specified by m.
3.7.2 Serial / USB / EPP interface advanced status bytes
The serial/USB/EPP interface status bytes is composed of 8 bits – 7 through 0 – the
most significant bit is Bit 7 and the least significant bit is Bit 0.
1) Printer Status
7 6 5 4 3 2 1 0
1 Buffer
status
Bit 2: Overrun Error – indicates when data sent to printer will be losted.
0 - data received will be printed
1 - data received will be lost
Bit 3: On / Off line – indicates when printer is operational (on-line) or not.
0 - on-line
1 - off-line
Bit 4: Wait – indicates when printer is busy or not.
0 – printer is busy and printing
1 – printer has printed all buffer and is waiting for commands
Bit 6 & 5: Buffer status – details the status of the printer buffer.
00 - buffer empty
01 - buffer less 1/3 full
10 - buffer more 1/3 full
11 - buffer more 3/4 full
Wait On / Off
line
Overrun
Error
0 0
2) Off-line Status
7 6 5 4 3 2 1 0
Cover
status
Bit 1: Paper near end sensor – informs the status of the paper near end sensor.
0 – there’s paper for printing
1 - there’s few paper for printing
Bit 2: Paper sensor – informs the status of the paper sensor.
0 – there’s paper on sensor
1 – there’s no paper on sensor
Bit 4: Drawer status – indicates status for drawer sensor.
0 – drawer sensor is indicating low level (logical 0)
1 – drawer sensor is indicating high level (logical 1)
Bit 5: No paper – indicates if there is available paper for printing.
0 – there’s paper available
1 – no paper is available
Bit 6: Error Reported – informs if an error was reported on Error Status.
0 – no error reported
1 – there’s error reported
Bit 7: Cover status – tells about the printer paper cover.
0 – cover is open
1 – cover is closed
Error
Reported
No paper
Drawer
status
0
Paper
sensor
Paper
near end
sensor
1
3) Error Status
7 6 5 4 3 2 1 0
1
Bit 2: Cutter presence – indicates the presence of a cutter on printer.
[Description] Transmits the selected printer status specified by n in real-time,
according to the following table:
n
1 Transmit printer status
2 Transmit offline status
3 Transmit error status
4 Transmit paper roll sensor status
[Details] • The printer transmits the current status. Each status is represented
by one-byte data.
• The printer transmits the status without confirming whether the host
computer can receive data.
• The printer executes this command upon receiving it.
n = 1: Printer status
Bit Off/On Hex Decimal Function
0 Off 00 0 Not used. Fixed to Off.
1 On 02 2 Not used. Fixed to On.
2
3
4 On 10 16 Not used. Fixed to On.
5, 6 - - - Undefined.
7 Off 00 0 Not used. Fixed to Off.
Off 00 0 Drawer open/close signal is LOW (connector pin 3).
On 04 4 Drawer open/close signal is HIGH (connector pin 3).
Off 00 0 Online.
On 08 8 Offline.
n = 2: Offline status
Bit Off/On Hex Decimal Function
0 Off 00 0 Not used. Fixed to Off.
1 On 02 2 Not used. Fixed to On.
Off 00 0 Cover is closed. 2
4 On 10 16 Not used. Fixed to On.
5 Off 00 0 No paper-end stop.
On 20 32 Printing is being stopped.
6 Off 00 0 No error.
On 40 64 Error occurs.
7 Off 00 0 Not used. Fixed to Off.
Bit 5: Becomes on when the paper end sensor detects paper end and printing stops.
On 04 4 Cover is open.
Off 00 0 Paper is not being fed by using the FEED button. 3
On 08 8 Paper is being fed by the FEED button.
0 Off 00 0 Not used. Fixed to Off.
1 On 02 2 Not used. Fixed to On.
2 – – – Undefined
Off 00 0 No autocutter error. 3
4 On 10 16 Not used. Fixed to On.
5 Off 00 0 No unrecoverable error.
On 20 32 Unrecoverable error occurs.
6 Off 00 0 No auto-recoverable error.
On 40 64 Auto recoverable error occurs.
7 Off 00 0 Not used. Fixed to Off.
Bit 3: If these errors occur due to paper jams or the like, it is possible to recover by correcting the cause of
Bit 6: When printing is stopped due to high print head temperature until the print head temperature drops
On 08 8 Autocutter error occurs.
the error and executing DLE ENQ n (1 = n = 2). If an error due to a circuit failure (e.g. wire break)
occurs, it is impossible to recover.
sufficiently or when the paper roll cover is open during printing, bit 6 is On.
n = 4: Continuous paper sensor status
Bit Off/On Hex Decimal Function
0 Off 00 0 Not used. Fixed to Off.
1 On 02 2 Not used. Fixed to On.
2, 3 Off 00 0 Paper roll near-end sensor: paper adequate.
On 0C 12 Paper near-end is detected by the paper roll near-end
4 On 10 16 sensor.
5, 6 Off 00 0 Not used. Fixed to On.
On 60 96 Paper roll sensor: Paper present.
7 Off 00 0 Paper roll end detected by paper roll sensor.
DLE ENQ n
[Function] Real-time request to printer.
[Format] ASCII DLE EOT n
Hexadecimal 10 05 n
Decimal 16 5 n
[Description] Responds to a request from the host computer. n specifies the
requests as follows:
Request
n
1 Recover from an error and restart printing from the line where the
error occurred
2 Recover from an error aft clearing the receive and print buffers
[Details] • When the printer is disabled with ESC = (Select peripheral device),
this command is effective.
• This command is effective only when an autocutter error occurs.
• The printer starts processing data upon receiving this command.
• This command is executed even when the printer is offline, the
receive buffer is full, or there is an error status with a serial interface
model.
GS I n
[Function] Transmit printer ID.
[Format] ASCII GS I n
Hexadecimal 1D 49 n
Decimal 29 73 n
[Description] Transmits the printer ID specified by n as follows:
Printer ID Specification ID (hexadecimal)
n
1, 49 Printer model ID TM-T88II series 20
2, 50 Type ID See table below.
3, 51 ROM version ID Depends on ROM version.
65 Firmware version Depends on Firmware version.
66 Manufacturer BEMATECH
67 Printer name MP-4000
68 Serial number Depends on serial number.
69 Type of model INTERNATIONAL
n = 2, Type ID
Bit Off/On Hex Decimal Function
Off 00 0 Two-byte character code not supported. 0
On 01 1 Two-byte character code supported.
1 On 02 2 Autocutter equipped.
2 Off 00 0 Not used. Fixed to Off.
3 Off 00 0 Not used. Fixed to Off.
4 Off 00 0 Not used. Fixed to Off.
5 - - - Undefined.
6 - - - Undefined.
7 Off 00 0 Not used. Fixed to Off.
[Details] • The printer ID is transmitted when the data in the receive buffer is
developed. Therefore, there may be a time lag between receiving this
command and transmitting the status, depending on the receive buffer
status.
• When the printer ID transmission is specified with (1 = n = 3) or (49 = n =
51), one byte code is transmitted.
• When Auto Status Back (ASB) is enabled using GS a, the printer ID
transmitted by GS I and the ASB status must be differentiated using the table
in Appendix III.
[Function] Enable/Disable Automatic Status Back (ASB).
[Format] ASCII GS a n
Hexadecimal 1D 61 n
Decimal 29 97 n
[Description] Enables or disables ASB and specifies the status items to include,
using n as follows:
Bit Off/On Hex Decimal Status for ASB
Off 00 0 Drawer kick-out connector pin 3 status disabled. 0
On 01 1 Drawer kick-out connector pin 3 status enabled.
Off 00 0 Online/offline status disabled. 1
On 02 2 Online/offline status enabled.
Off 00 0 Error status disabled. 2
On 04 4 Error status enabled.
Off 00 0 Paper roll sensor status disabled. 3
On 08 8 Paper roll sensor status enabled.
4-7 - - - Undefined.
[Details] • If any of the status items in the table above are enabled, the printer
transmits the status when this command is executed. The printer
automatically transmits the status whenever the enabled status item
changes. The disabled status items may change, in this case, because each
status transmission represents the current status.
• If all status items are disabled, the ASB function is also disabled.
• Since this command is executed after the data is processed in the receive
buffer, there may be a time lag between data reception and status
transmission.
• When the printer is disabled by ESC = (Select peripheral device), the four
status bytes are transmitted whenever the status changes.
• When using DLE EOT, GS I, or GS r, the status transmitted by these
commands and ASB status must be differentiated, according to the
procedure in Appendix III, Transmission Status Identification.
• The status to be transmitted are as follows:
First byte - Printer Information
Bit Off/On Hex Decimal Status for ASB
0 Off 00 0 Not used. Fixed to Off.
1 Off 00 0 Not used. Fixed to Off.
Off 00 0 Drawer kick-out connector pin 3 is LOW. 2
On 04 4 Drawer kick-out connector pin 3 is HIGH.
Off 00 0 Online. 3
On 08 8 Offline.
4 On 10 16 Not used. Fixed to On.
Off 00 0 Cover is closed. 5
On 20 32 Cover is open.
Off 00 0 Paper is not being fed by using the PAPER FEED button. 6
On 40 64 Paper is being fed by using the PAPER FEED button.
On 08 8 Autocutter error occurred.
4 Off 00 0 Not used. Fixed to Off.
5 Off 00 0 No unrecoverable error.
On 20 32 Unrecoverable error occurred.
6 Off 00 0 No automatically recoverable error.
On 40 64 Automatically recoverable error occurred.
7 Off 00 0 Not used. Fixed to Off.
Bit 3: If these errors occur due to paper jams or the like, it is possible to recover by correcting the
cause of the error and executing DLE ENQ n (1 = n = 2). If an error due to a circuit failure (e.g.
wire break) occurs, it is impossible to recover.
Bit 6: When printing is stopped due to high print head temperature until the print head temperature
drops sufficiently or when the paper roll cover is open during printing, bit 6 is On.
Third byte - Paper Sensor Information
Bit Off/On Hex Decimal Status for ASB
Off 00 0 Paper roll near-end sensor: paper adequate. 0,1
On 03 3 Paper roll near-end sensor: paper near end.
Off 00 0 Paper roll end sensor: paper present. 2, 3
On 0C 12 Paper roll end sensor: paper not present.
4 Off 00 0 Not used. Fixed to Off.
5, 6 - - - Undefined.
7 Off 00 0 Not used. Fixed to Off.
Fourth byte - Paper Sensor Information
Bit Off/On Hex Decimal Status for ASB
0-3 - - - Undefined.
4 Off 00 0 Not used. Fixed to Off.
5, 6 - - - Undefined.
7 Off 00 0 Not used. Fixed to Off.
GS r n
[Function] Transmit status.
[Format] ASCII GS r n
Hexadecimal 1D 72 n
Decimal 29 114 n
[Description] Transmits the status specified by n as follows:
n
1, 49 Transmits paper sensor status
2, 50 Transmits drawer kick-out connector status
[Details] • This command is executed when the data in the receive buffer is
developed. Therefore, there may be a time lag between receiving
this command and transmitting the status, depending on the receive
buffer status.
• When Auto Status Back (ASB) is enabled using GS a, the status
transmitted by GS r and the ASB status must be differentiated using
the table in Appendix III.
• The status types to be transmitted are shown below:
Paper sensor status (n = 1, 49):
Bit Off/On Hex Decimal Status for ASB
0, 1 Off 00 0 Paper roll near-end sensor: paper adequate.
On 03 3 Paper roll near-end sensor: paper near end.
2, 3 Off 00 0 Paper roll end sensor: paper adequate.
4 On (0C)(12) Paper roll end sensor: paper near end.
5, 6 Off 00 0 Not used. Fixed to Off.
- - - Undefined.
7 Off 00 0 Not used. Fixed to Off.
Bits 2 and 3: When the paper end sensor detects a paper end, the printer goes offline and does not
execute this command. Therefore, bits 2 and 3 do not transmit the status of paper end.
Drawer kick-out connector status (n = 2, 50):
Bit Off/On Hex Decimal Function
Off 00 0 Drawer kick-out connector pin 3 is LOW. 0
On 01 1 Drawer kick-out connector pin 3 is HIGH.
1-3 - - - Undefined.
4 Off 00 0 Not used. Fixed to Off.
5, 6 - - - Undefined.
7 Off 00 0 Not used. Fixed to Off.
Code Page 850 character set is from 00h up to 7Fh and is the same characters as
the ASCII table. Characters between 80h and FFh are available for use for international
languages.
Code Page 866 character set is from 00h up to 7Fh and is the same characters as
the ASCII table. Characters between 80h and FFh are available for use for cyrillic
languages (Russian, Bulgarian, Serbian, etc.).
22-aug-2007
Firmware Release: 1.5
82
Appendix III - Transmission Status Identification
Because the specified status bits transmitted from the ESC/POS commands are
fixed, the user can confirm the command to which the status belongs, as shown in the
following table.
When using Auto Status Back (ASB), however, process the consecutive three-byte
code (except for XOFF) as ASB data after confirming the first byte of the ASB. Otherwise,
the status transmitted by using the GS r and the status of the second and following bytes
of the ASB cannot be differentiated.
Transmission Status Identification
Command & Function Status Reply
GS I <0**0****>B
GS r <0**0****>B
XON <00010001>B
XOFF <00010011>B
DLE EOT <0**1**10>B
ASB (1st byte) <0**1**00>B
ASB (2nd to 4th bytes) <0**0****>B
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.