The enclosed Firmware (Software) resident in the EPROM’s is owned by Licensor or its suppliers and is licensed for used
only on a single printer in the user’s Trade or Business.
other person or party to, duplicate or copy the EPROM’s or the information contained in the EPROM’s.
firmware (Software) is protected by applicable copyright laws and Licensor retains all rights not expressly granted. In no
event will Licensor or its suppliers be liable for any damages or loss, including direct, incidental, economic, special, or
consequential damages, arising out of the use or inability to use the Firmware (Software).
Information in this document is subject to change without notice and does not represent a commitment on the part of
Datamax Barcode Products Corporation. No part of this manual may be reproduced or transmitted in any form or by any
means, for any purpose other than the purchaser's personal use, without the expressed written permission of Datamax
Corporation.
All rights reserved. Printed in the United States of America.
If you wish to use BASIC, use CH R$ to send ASCI I codes to the printer.
Put the Decimal into brackets after CHR$.
For example to send ASCII code FF, send CHR$ (12).
The printer will execute the set of commands shown in the chart below:
COMMAND
ASCII
HTHorizontal tabPrint position0997
LFPrint and fine feedPrint0A103
FFPrint and return to standard mode (in page mode)Print0C123
CRPrint and carriage returnPrint0D133
CANCancel print data in page modeCharacter18246
DLE EOT+Real-time status transmissionStatus10 0416 412
DLE ENQReal-time request to printerMiscellaneous function10 0516 5--
ESC c 3Select paper sensor(s) to output paper-end signalsPaper sensor1B 63 3327 99 51-ESC c 4Select paper sensor(s) to stop printingPaper sensor1B 63 3427 99 52-ESC c 5Enable/disable panel buttonsPanel button1B 63 3527 99 53--
ESC dPrint and feed n finesPrint1B 6427 1003
ESC i*Partial cut (one point left uncut)Mechanism control1B 6927 10519
ESC pGenerate pulseMiscellaneous function1B 7027 11221
ESC tSelect character code tableCharacter1B 7427 1165
NoteNameFunction type HEX.DEC.Page
E-3202 Programmer’s Manual1
COMMAND
ASCII
ESC uTransmit peripheral device statusStatus1B 7527 11714
ESC vTransmit paper sensor statusStatus1B 7627 11814
ESC
Fs GSelect fontSpecific commands1C 4728 7122
Fs BDownload with a BMP fileSpecific commands1C 4228 6622
Fs kPrint a 2 D barcodeBarcode1C 6B28 10722
Fs HXY scale for a 2D barcodeBarcode1C 4828 7222
Fs APaper forced feedSpecific commands1C 4128 6522
Fs RPaper forced returnSpecific commands1C 5228 8222
Fs CPDF 417 Aspect definitionSpecific commands1C 4328 6722
Fs DPDF417 ECC level definitionSpecific commands1C 4428 6822
Fs EHorizontal and vertical bars in page mode
GS !Select character sizeCharacter1D 2129 336
GS $Set absolute vertical print position in page modePrint position1D 2429 368
GS *Define downloaded bit imageBit image1D 2A29 429
GS /Print downloaded bit imageBit image1D 2F29 479
GS:Start/end macro definitionMacro function1D 3A29 5819
GS BTurn white/black reverse printing mode on/offCharacter1D 4229 666
GS HSelect printing position of human readable charactersBar code1D 4829 7216
GS ITransmit printer IDMiscellaneous function1D 4929 7321
GS LSet left marginPrint position1D 4C29 767
GS PSet horizontal and vertical motion unitsMiscellaneous function1D 50 29 8021
GS V*Select cut mode and cut paperMechanism control1D 5629 8619
GS WSet printing area widthPrint position1D 5729 877
GS \Set relative vertical print position in page modePrint position1D 5C29 928
GS ^Execute macroMacro function1D 2A29 4219
GS aEnable/disable Automatic Status Back (ASB)Status1D 6129 9711
GS bTurn smoothing mode on/offCharacter1D 6229 98-GS fSelect font for human readable charactersBar code1D 6629 10217
GS hSet bar code heightBar code1D 6829 10415
GS kPrint bar codeBar code1D 6B29 10715
GS r+Transmit statusStatus1D 7229 11412
GS wSet bar code widthBar code1D 7729 11915
Italic : Functions decoded by the printer but are not interpreted.
* :Standard ESCPOS command (The E-3202 is not available with a cutter).
2E-3202 Programmer’s Manual
Print and Line Spacing Commands
Print Commands:
LF : Print and line feed
ASCII: LF
Hexadecimal: 0A
Decimal: 10
LF prints the data in the print buffer and feeds one line.
CR : Print and carriage return
ASCII: CR
Hexadecimal: 0D
Decimal: 13
This command sets the print position to the beginning of the line.
ESC J n : Print and feed paper
ASCII: ESC J n
Hexadecimal: 1B 4A n
Decimal: 27 74 n
ESC J prints the data in the print buffer and feeds n x motion defined in
GS P
ESC d n : Print and feed n lines
ASCII: ESC d n
Hexadecimal: 1B 64 n
Decimal: 27 100 n
ESC d prints the data in the print buffer and feeds n lines.
FF : Print and return to standard mode
ASCII: FF
Hexadecimal: 0C
Decimal: 12
When in page mode FF prints all data in the print buffer in one time and
return to standard mode. The buffer data is deleted after being printed.
ESC FF : Print data in mode page
ASCII: ESC FF
Hexadecimal: 1B 0C
Decimal: 27 12
When in page mode ESC FF prints all data in the print buffer in one time.
The buffer data is not deleted after being printed.
Line Spacing Commands:
ESC 2 : Select default line spacing
ASCII: ESC 2
Hexadecimal: 1B 32
Decimal: 27 50
ESC2 sets the line spacing to 1/6 inch = 30 dots.
Warning:
The E-3202 is not designed to accommodate continuous, unbuffered data streams while in PAPER
mode. Application programs or data streams that prohibit the E-3202 from processing interrupts
correctly may produce unexpected or unreliable results. If it is necessary to send a continuous
stream of data to the E-3202, the application program must provide a pause of 250ms (duration)
after every LINE of characters to allow the processor time to check for any possible error or fault
conditions.
ESC 3 n : Set line spacing
ASCII: ESC 3 n
Hexadecimal: 1B 33 n
Decimal: 27 51 n
ESC 3 n sets the line spacing to n x motion defined in GSP.
E-3202 Programmer’s Manual3
4E-3202 Programmer’s Manual
Characters Commands
ESC SP n : Set right side character spacing
ASCII: ESC SP n
Hexadecimal: 1B 20 n
Decimal: 27 32 n
ESC SP n sets the right side character spacing to n x motion defined in
GSP.
ESC % n : Select / cancel user - defined character set
ASCII: ESC % n
Hexadecimal: 1B 25 n
Decimal: 27 37 n
0 ≤ n ≤ 255. When the LSB of n = 0 the internal character set is selected.
When the LSB of n = 1 the user defined character set is selected. n = 0 is
the default setting.-
ASCII: ESC & y c1 c2 [ x1 d1 ... d(y * x1)]...[xk d1 ... d(y*xk)]
Hexadecimal: 1B 26 n y c1 c2 [ x1 d1 ... d(y * x1)]...[xk d1 ... d(y*xk)]
Decimal: 27 38 n y c1 c2 [ x1 d1 ... d(y * x1)]...[xk d1 ... d(y*xk)]
y = 3
32 ≤ c1 ≤ c2 ≤ 126
0 ≤ x ≤ 12 (font A (12 x 24 ))
0 ≤ x ≤ 9 ( font B (9 x 24))
0 ≤ d1 ... d(y x xk) ≤ 255
k = c2 - c1 + 1
ESC & y c1 c2 [ x1 d1 ... d(y * x1)]...[xk d1 ... d(y*xk)]
defines user-defined characters from characte r code c1 to c2. Y and x are
the configuration of a user-defined character.
y defines the number of bytes in the vertical direction.
x defines the number of bytes in the horizontal direction
Character codes from the alphanumeric characters can be defined by c1
and c2. Data (d) specifies a bit printed to 1 and not printed to 0. Once the
user-defined characters have been defined, they are available until:
ESC ?, ESC @, or GS * is executed
the user-defined characters are redefined
the power is turned off
the printer is reset
ESC ? n : Cancel user-defined characters
ASCII: ESC ? n
Hexadecimal: 1B 3F n
Decimal: 27 63 n
32 ≤ n ≤ 126
This command cancels the user-defined characters defined for the
character code n. After the user defined characters are cancelled, the
internal character set is printed.
ESC R n : Select an international character set
ASCII: ESC R n
Hexadecimal: 1B 52 n
Decimal: 27 82 n
Selects an int ernational character set n as follows :
0 USA4 Denmark 18 Japan
1 France5 Sweden9 Norway
2 Germany6 Italy10 Denmark II
3 England7 Spain 111 Spain II
12 Latin America
ESC t n : Select character code table
ASCII: ESC t n
Hexadecimal: 1B 74 n
Decimal: 27 116 n
Selects a page n from the character code table as follows
0 4374 860
1 8505861
2 8526863
3 8577858
8862
ESC ! n : Select print mode
ASCII: ESC ! n
Hexadecimal: 1B 21 n
Decimal: 27 33 n
0 ≤ n ≤ 255
The default setting is n=0. This command is effectiv e for all characters.
When underline mode is turned on, 90° clockwise rotated characters and white/black
reverse characters cannot be underlined.
Bit Off/OnHex DecFunction
0Off000Character font 12 x 24 selected
On011Character font 9 x 24 selected
1,2 ---Undefi ned
3Off000Emphasized mode not selected
On088Emphasized mode sel ected
4Off000Double Height mode not selected
On1016Double Height mode selected
5Off000Double Width mode not selected
On2032Double Width mode not selected
6---Undefi ned
7Off000Underline mode not s elected
On80128Underline mode sel ected
ESC - n : Turn underline mode on / off
ASCII: ESC - n
Hexadecimal: 1B 2D n
Decimal: 27 45 n
0 ≤ n ≤ 2
48 ≤ n ≤ 50
This command turns underline mode on or off.
When the LSB of n = 1 : on
When the LSB of n = 0 : off
The default setting is n=0
E-3202 Programmer’s Manual5
ESC E n : Turn em phasized mode on / off
The line printing order is not reversed, therefore be careful of the order of the data
CAN deletes all the print data for the current print job in page mode. This command is
GS ! n : Select ch aracter size
ASCII: ESC E n
Hexadecimal: 1B 45 n
Decimal: 27 69 n
0 ≤ n ≤ 255
This command turns emphasized mode on or off.
On : LSB n =1
Off : LSB n = 0
The default setting is n=0
ESC G n : Turn double-strike mo de on / off
ASCII: ESC G n
Hexadecimal: 1B 47 n
Decimal: 27 71 n
0 ≤ n ≤ 255
This command turns double-strike mode on or off.
On : LSB n =1
Off : LSB n = 0
The default setting is n=0
Double-strike and emphas ized printing appear the same
ESC { n : Turn upside-down printing mode on / of f
ASCII: ESC { n
Hexadecimal: 1B 7B n
Decimal: 27 123 n
0 ≤ n ≤ 255
This command turns upside-down printi ng mode on or off.
On: LSB n =1
Off: LSB n = 0
The default setting is n=0
transmitted.
In standard mode this comm and is enabled only when processed at th e beginning of a line.
In page mode, an internal flag is activated and this command is enabled when the printer
returns to standard mode.
ASCII: GS ! n
Hexadecimal: 1D 21 n
Decimal: 29 33 n
0 ≤ n ≤ 255
This command selects the character
height = 0 to 3 bits (vertical number of ti mes normal font size)
width = 4 to 7 bits (horizontal number of ti mes normal font size)
0 ≤ k ≤ 32
This command sets a horizontal tab position to n columns from the beginning of a line, with
set. The default tab posit ions are ever y eight charac ters for the fo nt 12 x 24.
GS L nL nH : Set left margin
ASCII: GS L nL nH
Hexadecimal: 1D 4C nL nH
Decimal: 29 76 nL nH
0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
This command sets the left margin to (nL + nH * 256) ( horizontal GS P) from the beginning
of a line.
The default setting is nL=0 and nH=0
In standard mode this comm and is enabled only when processed at th e beginning of a line.
In page mode, an internal flag is activated and this command is enabled when the printer
returns to standard mode.
ASCII: ESC a n
Hexadecimal: 1B 61 n
Decimal: 27 97 n
0 ≤ n ≤ 2
48 ≤ n ≤ 50
This command aligns all the data in one line to a specified position.
Left : n = 0 or 48
center : n = 1 or 49
right : n = 2 or 50
The default setting is left : n=0
In standard mode this comm and is enabled only when processed at th e beginning of a line.
0 ≤ nH ≤ 255
This command sets the printing area width to (nL + nH * 256) ( horizontal GS P).
The default setting is nL=0 and nH=0
In standard mode this comm and is enabled only when processed at th e beginning of a line.
In page mode, an internal flag is activated and this command is enabled when the printer
returns to standard mode.
E-3202 Programmer’s Manual7
ESC W xL xH yL yH dxL dxH dyL dyH : Set printing area in page mode
This command is enabled in page mode only. In standard mode, an internal flag is
in the chart. The de fault setting is n=0. T his command is enab led only in page mode. In
or vertical GS P) from the starting point by ESC T. This command is effective only in page
GS $ nL nH : Set Absolute vertical print position in page mode
This command sets the size and position of the printing area in page mode as follows :
Horizontal s tarting posit ion = (xL+xH * 256) (horizontal GS P)
Vertical starting positi on = (yL+yH * 256) (vertic al GS P)
Printing area width = (dxL + dxH * 256 ) (horizo ntal GS P)
Printing area height = (dyL + dyH * 256 ) (vertical GS P)
The default setting are : xL=0, xH=0, yL=0, yH=0,
60 mm mechanism :
Dxl=80, DxH=1,
dyL=9A, DyH=2.
80 mm mechanism :
Dxl=80, DxH=2,
dyL=90, DyH=1.
activated and this comma nd is enabled wh en the printer selects page mode.
ESC T n : Select print direction in page mode
ASCII: ESC T n
Hexadecimal: 1B 54 n
Decimal: 27 84 n
0 ≤ n ≤ 3
48 ≤ n ≤ 51
ASCII: GS $ nL nH
Hexadecimal: 1D 24 nL nH
Decimal: 29 36 nL nH
0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
ESC $ nL nH sets the vertical print starting positio n fo r buffe r chara cter da ta in pa ge mo de
to (nL + nH * 256) ( horizontal or vertical GS P) from the starting position by ESC T. This
command is eff ective only in page mode.
GS \ nL nH : Set Relative print position
ASCII: GS \ nL nH
Hexadecimal: 1D 5C nL nH
Decimal: 29 92 nL nH
0 ≤ nL ≤ 255
0 ≤ nH ≤ 255
GS \ nL nH moves the print starting position in page mode to (nL + nH * 256) ( horizontal
mode.
ESC T n sets the print direct ion and starting position in page mode specified by n as shown
standard mode, an internal flag is activated and this command is enabled when the printer
selects page mode.
nPrint directionStarting positionMotion units
0 Left to right Upper left horizontal: ESC SP, ESC $, ESC \
48vertical: ESC 3, ESC J, GS $, GS \
1 Bottom to top Lower left horizontal: ESC 3, ESC J, GS $, GS\
49vertical: ESC SP, ESC$, ESC \
2 Right to left Lower right Horizontal: ESC SP, ESC $, ESC \
50vertical: ESC 3, ESC J, GS $, GS \
3 Top to bottom Upper right horizontal: ESC 3, ESC J, GS $, GS \
51vertical: ESC SP, ESC $, ESC \
8E-3202 Programmer’s Manual
Bit image commands:
This command prints a downloaded bit image using the mode specified by m as specified
ESC * m nL nH d1 ... dk : Select bit-image mode
ASCII: ESC * m n1 nH d1 … dk
Hexadecimal: 1B 2A m n1 nH d1 … dk
Decimal: 27 42 m n1 nH d1 … dk
This command 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
Set a bit to 0 to not print a dot
d indicates t he bit image data
The modes selectable by m are as follows:
Vertical DirectionHorizontal direction
mModeNumber of bits Dot Dot Amount
for vertical datadensitydensityof data
08 dot
single
density86090nL+nH*256
18 dot
double
density860180nL+nH*256
3224 dot
single
density2418090(nL+nH*256) * 3
3324 dots
double
density24180180(nL+nH*256) * 3
GS * x y d1...d (x * y * 8) : Define downloaded bit image
ASCII: GS * x y d1...d (x * y * 8)
Hexadecimal: 1D 2A x y d1...d (x * y * 8)
Decimal: 29 42 x y d1...d (x * y * 8)
1 ≤ x ≤ 255
1 ≤ y ≤ 48
x * y ≤ 1536
0 ≤ d ≤ 255
This command defines a downloaded bit image by using x * 8 dots in the horizontal
direction an d y * 8 dots in the vertical dir ection. Once a downloaded bit image has been
define, it is available until:
another definition is made.
ESC & or E SC @ is executed
the power is turned off
the printer is reset
When this comm and is execut ed, the user-defined char acters are cleared.
GS / m : Print downloaded bit image
ASCII: GS / m
Hexadecimal: 1D 2F m
Decimal: 29 47 m
0 ≤ m ≤ 3
48 ≤ m ≤ 51
in the chart. In standard mode, this command is effective only when there is no data in
the print buffer. This com m and is ignored if a downloa ded bit image has not been defined.
GS a n : Enable / Disable automatic status Back (ASB)
ASCII: GS a n
Hexadecimal: 1 D 61 n
Decimal: 29 97 n
0 ≤ n ≤ 255
Selects a status for ASB tra nsmission. The printer automatically transmits a 4- byte status message whenever the status changes. Multiple status items can be selected. When n=0 ASB is
disabled. If ASB is enabled when the printer is disabled by ESC =, the printer transmit a byte status message whenever the status changes. The status items are selected using n as
follows.
BitOn/OffHexDecimalFunction
0Off000Drawer kick out connector pin 3
0On011Drawer kick out connector pin 3
1Off000On-line/ Off-line s tatus disabled
1On022On-lin e/ Off-line st atus enabled
2Off000Error status disa bled
2On044Error status enabled
3Off000Paper r oll sensor status disabled
3On088Paper roll sensor status enabled
First byte - printer information
Bit On/Off Hex DecimalFunction
0Off000Not used, Fixed to off
1Off000Not used, Fixed to off
2Off000Drawer kick out connector pin 3 is low
2On044Drawer kick out connector pin 3 is high
3Off000On line
3On088Off line
4On1016Not used. Fixed to on
5Off000Cover closed
5On2032Cover Open
6Off000Paper is not being fed by the paper
6On4064Paper is being fed by the paper feed
7Off000Not used. Fixed to off
status disabled
status enabled
feed button
button
Second byte - printer information
Bit On/Off Hex DecimalFunction
0-2---Undefined
3Off000No auto-cutter error
3On088Auto cutter error
4Off000Not used. Fixed to off
5Off000Not unrecoverable error
5On2032Unrecoverabl e err or
6Off000Not automatically recoverable error
6On4064Automatically recoverable error
7Off000Not used. Fixed to off
E-3202 Programmer’s Manual11
Third byte – paper sensor information
Bit On/Off Hex DecimalFunction
0-1Off000Paper roll near-end sensor : paper
0-1On033Paper roll near-end sensor : near end
2-3Off000Paper roll end sensor : paper present
2-3On0C12Paper roll end sensor : paper not
4Off000Not used . Fixed to off
5-6---Not defined
7Off000Not used. Fixed to off
Fourth byte – paper sensor information
BitOn/OffHexDecimalFunction
0-3---Undefined
4Off000Not used – fixed to Off
5-6---Undefined
7Off000Not used – Fixed to Off
GS r n : transmit status
ASCII: GS r n
Hexadecimal: 1 D 72 n
Decimal: 29 114 n
n = 1,2,49,50
Transmits 1 byte of status data specified by n as follows
n = 1 or 49 paper sensor status
n = 2 or 50 drawer kick out connector status
adequate
present
When the paper roll end sensor detects a p aper-end, the printer goes off-line and does not exec ute this comm and. Therefore, bits 2 and 4 do not transmit paper-end status.
Paper sensor status
BitOn/OffHexDecimalFunction
0-1Off000Paper roll near end sensor : paper
0-1On033Paper roll near end sensor : paper
2-3Off000Paper roll end sensor : paper
2-3On0C12Paper roll end sensor : paper not
4Off000Not used – Fixed to Off
5-6---Undefined
7Off000Not used – Fixed to Off
Drawer kick out connector status
BitOn/OffHexDecimalFunction
0Off000Drawer kick out connector pin 3 is
0On011Drawer kick out connector pin 3 is
1-3---Undefined
4Off000Not used. Fixed to off
5-6---Undefined
7Off000Not used. Fixed to off
DLE EOT n : Real time status tr ansmission
ASCII: DLE EOT n
Hexadecimal: 10 04 n
Decimal: 16 4 n
adequate
near end
present
present
low
high
1 ≤ n ≤ 4
Transmits the specified status in real time.
n = 1 transmit printer status
n = 2 transmit off-line status
n = 3 transmit error status
n = 4 transmit paper roll sensor status
12E-3202 Programmer’s Manual
Printer status
Bit On/Off Hex DecimalFunction
0Off000Not used, Fixed to off
1Off000Not used, Fixed to off
2Off000Drawer kick out connector pin 3 is low
2On044Drawer kick out connector pin 3 is high
3Off000On line
3On088Off line
4On1016Not used. Fixed to on
5-6---Not defined
7Off000Not used. Fixed to off
Off line status
Bit On/Off Hex DecimalFunction
0Off000Not used, Fixed to off
1On022Not used, fixed to on
2Off000Cover closed
2On04 4 Cover Open
3Off000Paper is not being fed by the paper
3On088Paper is being fed by the paper feed
4On1016Not used. Fixed to on
5Off000No paper end stop
5On2032Printing stops due to paper end
6Off000No error
6On4064Error
7Off000Not used, Fixed to off
Error status
Bit On/Off Hex DecimalFunction
0Off000Not used, Fixed to off
1On022Not used, fixed to on
2---Undefined
3Off000No auto-cutter error
3On088Auto cutter error
4On1016Not used. Fixed to on
5Off000Not unrecoverable error
5On2032Unrecoverabl e err or
6Off000Not automatically recoverable error
6On4064Automatically recoverable error
7Off000Not used. Fixed to off
The E-3202 is not available wi th an “auto-cutter”.
Note:
feed button
button
Paper roll se nsor status
Bit On/Off Hex DecimalFunction
0Off000Not used, Fixed to off
1On022Not used, fixed to on
2-3Off000Paper roll near-end sensor : paper
2-3On0C12Paper roll near-end sensor : near end
4On1016Not used. Fixed to on
5-6Off000Paper roll end sensor : paper present
5-6On6096Paper roll end sensor : paper not
7Off000Not used. Fixed to off
adequate
present
E-3202 Programmer’s Manual13
Esc u n : transm it peripheral device status
ASCII: ESC u n
Hexadecimal: 1B 75 n
Decimal: 27 117 n
n = 0,48
Transmits the status of the drawer kick-out connector pin 3 as 1 by te of data when n= 0 or 48. This allows the host to determine the status of a peripheral device.
Bit On/Off Hex DecimalFunction
0Off000Drawer kick out connector pin 3 is low
0On011Drawer kick out connector pin 3 is high
1-3---Undefined
4Off000Not used. Fixed to off
5-6---Not defined
7Off000Not used. Fixed to off
Esc v n : transmit paper sensor status
ASCII: ESC v n
Hexadecimal: 1B 76 n
Decimal: 27 118 n
n = 0,48
Transmits the status of the paper sens or as 1 byte of data.
Bit On/Off Hex DecimalFunction
0-1Off000Paper roll near-end sensor : paper
0-1On033Paper roll near-end sensor : near end
2-3Off000Paper roll end sensor : paper present
2-3OnOC12Paper roll end sensor : paper not
4Off000Not used. Fixed to off
5-6---Undefined
7Off000Not used . fixed to off
adequate
present
14E-3202 Programmer’s Manual
Bar Code Commands
The following barcode symbologies are avai lable with ESC POS:
ASCII: GS h n
Hexadecimal: 1 D 68 n
Decimal: 29 104 n
1 ≤ n ≤ 255
This command selects the height of a bar code. N specifies the number of dots in the vertical direction. One dot = 1/200 inch. The default setting i s n = 162.
GS w n : Set bar code width
ASCII: GS w n
Hexadecimal: 1 D 77 n
Decimal: 29 119 n
2 ≤ n ≤ 6
This command selects the horizontal size of a bar code. N specifies the bar code width as specified in the chart. The default setting is n = 3
The multilevel bar codes are : UPC-A, UPC-E, EAN 13, EAN 8, CODE128
The binary level bar codes are : CODE39, ITF, CODABAR
48 ≤ d ≤ 57
48 ≤ d ≤ 57
48 ≤ d ≤ 57
48 ≤ d ≤ 57
48 ≤ d ≤ 57
48 ≤ d ≤ 57
48 ≤ d ≤ 57
0 ≤ d ≤ 127
0 ≤ d ≤ 127
0 ≤ d ≤ 127
GS H n : Select printing position of human readable characters
ASCII: GS H n
Hexadecimal: 1D 48 n
Decimal: 29 72 n
0 ≤ n ≤ 3
48 ≤ n ≤ 51
This command selects the pr inting position for human readable characters when printing a bar code. The default setti ng is n=0. Human readabl e characters are printed using the font
specified by GS f n. Select t he printing position as follows:
nPrinting position
0, 48Not printed
1, 49Above the bar code
2, 50Below the bar code
3, 51both above and below the bar code
16E-3202 Programmer’s Manual
GS f n : Select printing position of human readable characters
ASCII: GS f n
Hexadecimal: 1D 66 n
Decimal: 29 102 n
n = 0, 1 ,48, 49
This command selects a font for human readable characters used wh en printing a bar code.
12 x 24 : n = 0 or 48
9 x 24 : N = 1 or 49
The default setting is n=0. Human readabl e character s are printed at the position specified by GS H.
E-3202 Programmer’s Manual17
18E-3202 Programmer’s Manual
Macro Function and
Mechanism Control Commands
Macro Function Commands:
GS ^ r t m : execute macro
ASCII: GS ^ r 00
Hexadecimal: 1 D 5E r 00
Decimal: 29 94 r 00
This command executes a m acro r times.
Mechanism Control Command:
GS V m , GS V m n, ESC i : Select cut mode and cut paper total or partial *
ASCII: GS V m
Hexadecimal: 1D 56 m
Decimal: 29 86 m
m = 0,1, 48,49
ASCII: GS V m n
Hexadecimal: 1D 56 m n
Decimal: 29 86 m n
m = 65,66
n = number of vertical motions unit before cutting
ASCII: ESC i
Hexadecimal: 1B 69
Decimal: 27 105
GS : start / end macro definition
ASCII: GS :
Hexadecimal: 1 D 3A
Decimal: 29 58
This command starts or end macro definition. Macro definition starts when this command is
received during normal operation and ends when it is received during macro definition. If the
printer receives this command again immediately after previous ly receiving i t, the printer remains
in the macro undefined state. The macro d efinition can contain up to 2048 bytes. The excess
data is not st ored.
GS V m ,GS V m n and ESC i select a paper cutting m ode and then cut the paper.
The vertical motion unit is specified by GS P
*A partial cut is available with the same command after changing manually the
configuration on the cutt er.
The E-3202 is not available with a cutter.
Note:
E-3202 Programmer’s Manual19
20E-3202 Programmer’s Manual
Miscellaneous Function and
Initializes the printer. The print buffer is cleared and the printer mode is reset to the mode
Specific Commands
Miscellaneous Function Commands:
GS P x y : Set horizontal and vertical motion unit
ASCII: GS P x y
Hexadecimal: 1D 50 x y
Decimal: 29 80 x y
0 ≤ x ≤ 255
0 ≤ y ≤ 255
This command sets the hori zontal and ver tical motion unit to 1 / x and 1 / y inches,
respectivel y. The default value are x = 200 and y = 400. When x and y are set to 0, the
default sett ing of each value is used.
ESC @ : initialize the printer
ASCII: ESC @
Hexadecimal: 1B 40
Decimal: 27 64
that was in effect when the power was turned on.
GS I n : Transmit printer ID
ASCII: GS I n
Hexadecimal: 1D 49 n
Decimal: 29 73 n
1 ≤n ≤3
n = 1 Name of the company + Printer model
n = 2 if bit =1 Auto cutter equipped
n = 3 software v ersion
ESC p m t1 t2 : Generate pulse
ASCII: ESC p m
Hexadecimal: 1B 70 n
Decimal: 27 112 n
m = 0,1,48,49
0 ≤ t1 ≤255
0 ≤ t2 ≤255
ESC = n : Select peripheral device
ASCII: ESC = n
Hexadecimal: 1B 3D n
Decimal: 27 61 n
0 ≤ n ≤ 255
This command selects the device to which the host computer sends data, based on the
value of n as fol lows :
BitOff/OnHexDecFunction
0Off000Printer disabled
On011Printer enabled
1 -7---Undefined
n = 1 : printer enabled
n = 0 : printer disabled
When the printer is disabl ed, it ignores al l received data. The defa ult setting is n = 1.
ESC L : Select page mode
ASCII: ESC L
Hexadecimal: 1B 4C
Decimal: 27 76
This command switches from s tandard mode to page mode. This command is enabled
only when processed at the beginning of a l ine in stan dard mode ; it has no effect in page
mode. Standar d mode is select ed as the default.
ESC S : Select st andard mode
ASCII: ESC S
Hexadecimal: 1B 53
Decimal: 27 83
This command switches from page mode to standard mode. This command is effective
only in page mode. Data buff ered in page mode is cleared. Standard mode is selected as
the default.
Sends a pulse to the specified connector pin.
On time = t1 x 2 millisecond
Off time = t2 x 2 millisecond
m = 0 or 48 the pul se is sent to drawer kick out connector pin 2
m = 1 or 49 the pul se is sent to drawer kick out connector pin 5
E-3202 Programmer’s Manual21
Specific commands:
BMP Monochrome file download. Only " Microsoft pa int gene rated" file s can be used. Fs B
Fs G n
ASCII: Fs G n
Hexadecimal: 1C 47 n
Decimal: 28 71 n
n = 0 font 12*24
n = 1 font 9 * 24
n = 2 font 16 * 24
This command selects the f ont. 16 * 24 cannot be used with ESC POS
Fs B
ASCII: Fs B
Hexadecimal: 42
Decimal: 66
is followed by t he BMP file. FsB must be followed by the sending of the BMP fil e.
Fs A n : Paper forced feed
ASCII: Fs A n
Hexadecimal: 1C 41 n
Decimal: 28 65 n
Used for paper feed during parameter settings.
Fs k m nL nH d0 … dn : print 2D bar code
ASCII: Fs k m nL nh d0 … dn
Hexadecimal: 1C 6B m nL nh d0 … dn
Decimal: 28 107 m nL nh d0 … dn
m = 65, QRCODE , 0 ≤ d ≤ 255
m = 68, PDF 417, 0 ≤ d ≤ 255
nl: Rest in elementary unit after calculation of number of codes / 256.
Fs R n : Paper forced Return
ASCII: Fs R n
Hexadecimal: 1C 52 n
Decimal: 28 82 n
Used for paper return during parameter settings.
Fs C n : Column / lines ratio definition for PDF 417
ASCII: Fs C n
Hexadecimal: 1C 43 n
Decimal: 28 67 n
PDF 417 Column line ratio definition. n>1 , n is the ratio. This function is used to
define the aspect of the barcode.
Fs D n : PDF 417 EC C level
ASCII: Fs D n
Hexadecimal: 1C 44 n
Decimal: 28 68 n
Set the ECC (error correction indicium) level in percentage for the PDF 417
0<n<200 (as n = 2%, percentage variati on = 0 to 400%)
Fs E o ll lh e : Vertical and horizontal bars construction
ASCII: Fs E o ll lh e
Hexadecimal: 1C 45 o ll lh e
Decimal: 28 69 o ll lh e
Vertical and horizontal bars construction in page m ode
o = 0 left to right bar
o = 1 bottom to top bar
o = 2 right to left bar
o = 3 top to bottom bar.
(from the current orientation selected with Esc T)
For example for a number of c odes of 200 : 200/256 =0 Rest 200, nl = 200. For a
number of codes of 300 : 300/ 256 = 1 rest 44 , nl = 44, for a number of codes of 600,
600/256 = 2 rest 88, nl =88
nh: Result in elementary unit of number of codes / 256.
For example for a number of codes pf 200 : 200/256 = 0 nh = 0, For a number of
codes of 300 : 300/256 = 1, nh = 1, For a num ber pof codes of 600, 600/256 = 2, nh =
2
d0 … dn = data
Fs H n : scale of 2D barcode
ASCII: Fs H n
Hexadecimal: 1C 48 n
Decimal: 28 7
n = multiplying factor
E
n
ll: Rest in elementary unit after calcul ation of bar length / 256.
For example for a bar length of 200 : 200/2 56 =0 Rest 200, ll = 200. For a bar length of 300
: 300/256 = 1 res t 44 , ll = 44, for a bar length of 600, 600/2 56 = 2 rest 88, ll =88
lh: Result in elementary unit of bar length / 256.
For example for a bar length pf 200 : 200/2 56 = 0 lh = 0, For a bar length of 300 : 300/256
= 1, lh = 1, For a bar length of 600, 600/256 = 2, lh = 2
e = bar thickn ess in elementary unit
22E-3202 Programmer’s Manual
Sample Programming
Programming the E-3202
When programming the E-3203 using EDIT in DOS you need to first make sure that your keyboard is set to United States
style. This can be done by using the Keyboard Properties window located in the Windows Control Panel. Add a keyboard
by selecting the Add key on the panel, then add the English (United States) keyboard.
Before starting to program make sure that the Baud rate in the printer is set the same as the COM port on the PC. Next we
need to set the Emulation on the printer to ESC/POS.
In the Configuration Label there's a division called Character sets. In this set we see that the character size is 12 * 24 for
this label. Therefore the default value of n=0 (NUL). Make note of this for later reference. Command GS ! n
You are now ready to start with programming a label for this printer.
E-3202 Programmer’s Manual23
Below is a sample program and the printout it will create:
←@↔!←a-Datamax Corporation
Matt & Derek
European Tech Support
Feb 2000
DMX-E-3202
POS/Label Printer
ESC/POS Print Examples↔!2↔B-←a
Reverse Text
↔B↔LD ↔H2↔kCE750224523908
*Commands in this sample with a character in it, is actually a NUL value.
Please note that there is no carriage return after each command. The reason being that when we program this printer,
every time you press the ENTER key the program will remember this as a carriage return. It will follow on to the next
line.
Initializing the printer.
The command ESC @ is used for this. To be able to access this command in EDIT we use the following procedure. Ctrl
P (at the bottom of the EDIT screen the following command will appear "Enter the control Key to insert"
Next we press Esc key, on the screen the character ← will appear. Follow this character with the @ (can be done by key
pad and Alt 64). The printer is now initialized.
*Ctrl P to be able to insert control key
24E-3202 Programmer’s Manual
Selecting character size.
GS ! n
The command is accessed by Ctrl ] (Alt029). This will give us the attention getter GS character is shown as ↔. Follow up
with the function character ! (on key pad Alt 033)
Explanation of the changeable character n for the width and height
DecWWidthDecHHeight
0101
16212
32323
48434
64545
80656
96767
112878
In the Configuration Label there's a division called Character sets. In this set we see that the character size is 12 * 24 for
this label. Therefore the default value of n=0 (NUL)
If we would like the size of the character to be default, the size will be 1*1. If you would like the width to be 2 by a
height of 1 the value will be 16+0 which will give you 16. We add the Dec value of the width, with the Dec value of the
height to get the value for n. This value is a Dec value which is entered into the program by Ctrl+P+Alt+Dec value.
i.e. ↔!(DecW+DecH)
↔!(16+1)
↔!(
Ctrl+P+Alt+17)
↔!
Examples:
WidthHeightDecW+DecHn value
3432+335
2216+117
88112+7119
110+00(NUL)
When you need to insert a 0 (NUL) value into your program we use the combination
☞
Shift-2.
For this reason we set the keyboard to United States style. The @ symbol on the
Ctrl-
United States Keyboard is found with the 2 button. Please see the ASCII Chart for values on
characters.
Please note that a NUL value will not be shown on the EDIT program but the cursor would
☞
have moved one character. If you were to do a Hex Dump the Hex value will be 00.
E-3202 Programmer’s Manual25
Selecting justification
ESC a n
Left:n=0 or 48
Center:n=1 or 49
Right:n=2 or 50
This command will justify the orientation of the printing. Accessing the command is the same as initializing the printer
command. Ctrl+P to enter the control key command, follow by ESC key.
This will give you the ESC character
use 1 or 49, in this program we will be using 1. Therefore n=1, insert this into the command by Ctrl+P and Ctrl A. The
character that should appear is -. For reference see the ASCII Chart.
In this command we will set the justification to center. For center justification we
i.e.←a n
←a (
Ctrl P+Ctrl A)
←a-
Up to this point we should have a program without any carriage returns as follows.
←@↔!←a-
The command is turned off by inserting a Nul value into the command. This will justify the printer to left.
Please note that if we were to press RETURN (ENTER) after this command, the printer will
☞
feed one line and then start printing. As the program is now it will start printing without
feeding one line. When pressing ENTER in a program the printer will see it as a CR
(carriage return) and a LF (Line Feed). This tip will apply to the next few lines of commands.
Inserting Text into the program
Following the previous command insert the Text we would like to print. At this point we use the RETURN (ENTER) key
to insert carriage returns into our program. This Text will all be printed center justified.
←@↔!←a-Datamax Corporation
Matt & Derek
European Tech Support
Feb 2000
DMX-E-3202
POS/Label Printer
ESC/POS Print Examples
<CR>
<CR>
<CR>
<CR>
<CR>
<CR>
<CR>
26E-3202 Programmer’s Manual
In the next command we will select a new font size using the GS !
For more information on this command refer back to Selecting character size. We set the size to a width of 4 and a height
3. That will give us a Dec W of 48 and a Dec H of 2.
↔!(Dec W+Dec H)
↔!(48+2)
↔!(n=Dec value of 50)
↔!(
Alt 50
)
The command should come out as:
is the ASCII Character for the Decimal value 50. Refer to ASCII Table for information on characters.
2
*NOTE: This command follows up on previous command is entered without any carriage returns. See below for
sample:
↔!2
←@↔!←a-Datamax Corporation
Matt & Derek
European Tech Support
Feb 2000
DMX-E-3202
POS/Label Printer
ESC/POS Print Examples↔!2
White/black reverse Printing
GS B n
On: n=1
Off:n=0
The default setting is 0. This mode is turned on before the text you would like to be reversed and the turned off after the
text.
↔B↔B
The command is turned on
The command is turned off
∗ This is only to show that there should be a NUL value in the command. In
order to create the NUL value we use
the keyboard and not the number pad)
. The cursor on the screen should move
Ctrl+Shift+2
, (using the ‘2’ from the top of
one character to the right without anything displayed on the screen. If you
were to do a Hex Dump you will see a 00 Value.
E-3202 Programmer’s Manual27
Selecting the left margin
GS L nL nH
If we would like to move the barcode to a position on the label we will use this command. Please note that nH will always
be a NUL value. Where nL is the value that moves the barcode to the right when increased.
Selecting position for HRI
GS H n
This command selects the printing position of the Human Readable characters for the barcode. The values are from 0 to 3
or 48 to 51.The selection for pint position is as follows:
nPrint position
0,48Not printed
1,49Above the barcode
2,50Below the barcode
3,51Both above and below the barcode