Codesoft TP-290XIII Operating and maintenance manual

CODE SOFT
Programmer Manual
www.code-soft.com
TP-290XIII

Manual Description
Command Notation
[Name]Command inASCII format and generaldescription.
[Format] The code sequence, including ASCII, HEXand DECIMAL.
[Range]Givesthe allowablerangesforthe arguments.
[Description]Describesthe command sfunction.
[Details]Describesthe usage ofthe command indetail.
[Notes]Providesimportant information on setting and using the printercommand.
[Reference] Listsrelated commands.
[Example] Givesexamplesofhowtousethe command.
1HTHorizontal tab
[Format] ASCII HT
Hex09
Decimal9
[Description]Movesthe print position tothe next horizontaltabposition.
[Details] § Thiscommand isignored unless the next horizontaltabposition hasbeen set.
§ Ifthe next horizontaltabposition exceedsthe printingarea, the printersetsthe
printingposition to[Printingarea width+1].
§ Horizontaltabpositionsareset with ESCD.
§ Ifthiscommand isreceived when theprintingposition isat[printingarea
width+1], the printerexecutesprint buffer-full printingofthe current line and
horizontaltabprocessingfromthe beginningofthe next line.
§ The default settingofthe horizontaltabposition forthe paperroll isfont A(12
24)every8character(column9, 17, 25, ...).
§ When the bufferisfull on current line, the printerwill do the following:
InStandardMode, print the current line and set the print position tonext line.
InPageMode, printerentersnewline and set the print position tonext line.
[Reference]ESCD
2LF Printand linefeed
[Format] ASCII LF
Hex0A
Decimal10
[Description] Printsthedataintheprintbufferandfeedsonelinebasedonthecurrentlinespacing.
[Note]Thiscommand setsthe print position tothe beginningofthe line.
[Reference]ESC2, ESC3
THERMALRECEIPTPRINTER

THERMALRECEIPTPRINTER 2
3ESCSP n Setright-sidecharacterspacing
[Format] ASCII ESC SP n
Hex1B20 n
Decimal27 32 n
[Range] 0 n 255
[Description]Setsthe characterspacingforthe right side ofthe charactertoinches[ nx
horizontalmotion units].
[Details] § When charactersareenlarged ntimes, the right-side characterspacingisn
timesnormalvalue.
§ The maximumright-side spacingis255/203 inches. Anysettingexceedingthe
maximumisconverted tothe maximumautomatically.
[Default] n=0
[Reference]GSP
4ESC!nSetprintmode
[Format] ASCII ESC! n
Hex1B21 n
Decimal27 33 n
[Range]0 ≤n ≤255
[Description]Selectsprint mode(s)usingnasfollows:
Bit 1/0 HEX DECIMAL FUNCTION
0 00 0 Characterfont A(12 14)selected.
0 1 01 1 Characterfont B(12 12)selected.
1,2 --- --- Undefined.
0 00 0 Emphasized mode not selected.
3 1 08 8 Emphasized mode selected.
0 00 0 Double-height mode not selected.
4 1 10 16 Double-height mode selected.
0 00 0 Double-widthmode not selected.5 1 20 32 Double-widthmode selected.
6 --- --- Undefined.
0 00 0 Underline mode not selected.
7 1 80 128 Underline mode selected.
[Note]§ When bothdouble-height and double-widthmodesareselected, quadruple
sizecharactersareprinted.
§ Underliningisadded tothe entirewidthofeachcharacter, includingthe
spacetothe right ofacharacter, but isnot addedtoportionsoflinesthat
wereskipped bymeansofan HT.
[Default] n=0
[Reference]ESC- ESCE, GS!

THERMALRECEIPTPRINTER 3
5ESC$nL nHSetabsoluteprintposition
[Format] ASCII ESC$nL nH
Hex1B24 nL nH
Decimal 27 36 nL nH
[Range]0 n255
[Description]§ Setsthe distancefromthe beginningofthe line tothe position at which
subsequent charactersaretobeprinted.
§ The distancefromthe beginningofthe line tothe print position is[( nL +nH x
256) x (verticalorhorizontalmotion unit)] inches.
§ Settingsoutside the specified printablearea areignored.
6ESC%nSelect/cancel user-definedcharacterset
[Format] ASCII ESC%n
Hex1B25 n
Decimal27 37 n
[Range] 0 nL 255
[Description]Selectsorcancelsthe user-defined characterset.
§ When the LSB of nis0, the user-defined characterset iscanceled.
§ When the LSB of nis1, the user-defined characterset isselected.
[Details]§ When the user-defined characterset iscanceled, the internalcharacterset is
automaticallyselected.
§ nisavailableonlyforthe least significant bit.
[Default] n=0
[Reference]ESC&,ESC?
7ESC&yc1 c2 [x1 d1...d(y x1)]...[xk d1...d(y xk)] Defineuser-definedcharacters
[Format]ASCII ESC&yc1c2[x1d1...d(y ×x1)]...[xk d1...d(y ×xk)]
Hex1B26 yc1c2[x1d1...d(y ×x1)]...[xk d1...d(y ×xk)]
Decimal27 38 yc1c2[x1d1...d(y ×x1)]...[xk d1...d(y ×xk)]
[Range]y=3
32 ≤c1 ≤c2 ≤127
0 ≤x ≤12 Font A(12 ×24)
0 ≤x ≤9Font B(9 ×17)
0 ≤d1 ... d(y ×xk) ≤255
[Description]Definesuser-defined characters.
§ yspecifiesthe numberofbytesinthe verticaldirection.
§ c1specifiesthe beginningcharactercode forthe definition, and c2specifies

THERMALRECEIPTPRINTER 4
the finalcode.
§ xspecifiesthe numberofdotsinthe horizontaldirection.
[Note]§ The availablerangeofcharacterisfromASCII <20>H to<7F>H (96
characters).
§ Consecutivecharactercodesformultiplecharacterscan bedefined inone
definition. When specifyingonlyone character, specifyc1=c2。
§ disdefinition datathat indicatesthe patternfor"x"dotsinthe horizontal
direction startingfromthe left edge.
§ The datatodefine auser-defined characteris(y ×x)bytes.
§ Inthe definition data, a"1"representsadot that istobeprinted, and a"0"
representsadot that isnot tobeprinted.
§ The defined downloaded charactersarecleared inthe following
circumstances:
1)When "ESC@" isexecuted
2)When deleted by"ESC?"
3)When “FSq”isexecuted
4)When “GS*”isexecuted
5)When the printerisreset orturned off
[Default] The internalcharacterset
[Reference]ESC%, ESC?
[Example]§ When Font A(12 ×24)isselected
最高位
最低位
D1
d1d4 d7-----------------------d34
d2d5---------------------------- d35
d3d6---------------------------- d36
24点
12
点
§ When Font B(9 ×17)isselected

THERMALRECEIPTPRINTER 5
最高位
最低位
D1d1d4 d7-----------------------d25
d2d5----------------------------d26
d3d6---------------------------- d27
17点
9点
8ESC*mnL nHd1... dk Selectbit-imagemode
[Format] ASCII ESC*mnL nHd1...dk
Hex1B2AmnL nHd1...dk
Decimal27 42 mnL nHd1...dk
[Range]m=0, 1, 32, 33
0 ≤nL ≤255
0 ≤nH ≤3
0 ≤d ≤255
[Description]Selectsabit-imagemode usingmforthe numberofdotsspecified bynL and nH

THERMALRECEIPTPRINTER 6
Vertical Horizontalm Mode
Dot Density Density Data(k)
08dotsSingleDensity 867 DPI 100 DPI nL +nH ×256
1 8 dotsDoubleDensity 8 67 DPI 200 DPI nL +nH ×256
32 24 dotsSingleDensity 24 200 DPI 100 DPI (nL +nH ×256) ×3
33 24 dotsDoubleDensity 24 200 DPI 200 DPI (nL +nH ×256) ×3
[dpi: dot/25.4mm{1”}]
[Notes]§ Ifthe valuesofmand nHareout ofthe specified range, the followingdatais
processed asnormaldata.
§ The nL and nHindicatethe numberofdotsofthe bit imageinthe horizontal
direction. The numberofdotsiscalculated bynL +nH 256.
§ Ifthe bit-imagedatainputexceedsthenumberofdotstobeprinted on aline,
the excess dataisignored.
§ dindicatesthebit-imagedata.Setacorrespondingbitto1toprintadotorto
0tonot print adot.
§ Afterprintingabit image, the printerreturnstonormaldataprocessing
mode.
§ Exceptconvertmode,thiscommand doesn t affectotherprintmode,suchas
emphasized, doubleprint, underline, characterenlarged, contrary.
§ The relationshipbetween the imagedataand the dotstobeprinted isas
follows.
8-dot densityselected:
单密度
打印数据
1点
双密度
Dd1 d2 d3
位图数据
最高位
位图数据
最低位
打印数据
D d1d2d3
24-dot densityselected:

THERMALRECEIPTPRINTER 7
单密度
打印数据
1点
双密度
Dd1d2 d3 d4d5 d6
d7 d8
d9
位图数据
最高位
位图数据
最低位
打印数据
D d1d4 d7
d2d5d8
d3d6d9
9ESC –nTurnunderlinemodeon/off
[Format] ASCII ESC-n
Hex1B2Dn
Decimal27 45 n
[Range]0 ≤n ≤2, 48 ≤n ≤50
[Description]Turnsunderline mode on oroff,
n Function
0, 48 underline mode isturned off.
1, 49 underline mode isturned on. (1dots)
2, 50 underline mode isturned on. (2dots)
[Notes]§ Underlinescan beprinted forall characters, but not forthe spaceset byHT.
§ Underline isnot enabled when 90°rotation orcharactercontraryisset.
§ When underline mode isturned off, the followingcharactersarewithout
underline. The underline widthisnot changed. Default widthis1dot width.
§ Underline mode isstill enabled even charactersizeischanged.
§ Underline mode can alsobeturned on oroff byusingESC!.
§ Thiscommand doesnot affect the setting ofKanji characters.
[Default] n=0
[Reference]ESC!

THERMALRECEIPTPRINTER 8
10 ESC2Selectdefaultlinespacing
[Format] ASCII ESC2
Hex1B32
Decimal27 50
[Description]Selectsdefault (3.75mm, 1/6-inch)line spacing.
[Notes] § Default line spacingisabsoluteinstandardmode and pagemode.
[Reference]ESC3
11 ESC3nSetlinespacing
[Format] ASCII ESC3n
Hex1B33 n
Decimal27 51 n
[Range]0 ≤n ≤255
[Description]Setsthe line spacingto[ n(1/192)] inches.
[Notes] § Line spacingisabsoluteinstandardmode and pagemode.
[Default] n=3.75mm
[Reference]ESC2, GSP
12 ESC?nCancel user-definedcharacters
[Format] ASCII ESC?n
Hex1B3Fn
Decimal27 63 n
[Range]32 ≤n ≤127
[Description]Canceluser-defined characters
[Notes] § Thiscommand cancelsthe patterndefined forthe charactercode specified
byn. Afterthe user-defined charactersarecanceled, the corresponding
patternofthe internalcharacterisprinted.
§ Ifauser-defined characterhasnot been defined forthe specified character
code, the printerignoresthiscommand.
[Reference]ESC&, ESC%
13 ESC@Initializeprinter
[Format] ASCII ESC@
Hex1B40
Decimal27 64
[Description] Clearsthe datainthe print bufferand resetsthe printermode tothe mode that is
ineffect when the poweristurned on.

THERMALRECEIPTPRINTER 9
[Notes] § The DIPswitchsettingsarenot checked again.
§ The datainthe receivebufferisnot cleared.
§ Macrodefined isreserved.
§ NVbitmapdataisnot cleared.
14 ESCDn1...nkNULSethorizontal tabpositions
[Format] ASCII ESCDn1...nkNUL
Hex1B44 n1...nk00
Decimal27 68 n1...nk0
[Range]1 ≤n ≤255
0 ≤k ≤32
[Description]Set horizontaltabpositions
§ nspecifiesthe columnnumberforsettingahorizontaltabposition fromthe
beginningofthe line.
§ kindicatesthe totalnumberofhorizontaltabpositionstobeset.
[Notes]§ The horizontaltabposition isstored asavalue of[characterwidthxn]
measured fromthe beginningofthe line. The characterwidthincludesthe
right-side characterspacing, and double-widthcharactersareset withtwice
the widthofnormalcharacters.
§ Thiscommand cancelsthe previoushorizontaltabsettings.
§ When setting n=8, the print position ismoved tocolumn9bysending HT.
§ Upto32 tabpositions(k=32)can beset. Dataexceeding32 tabpositions
isprocessed asnormaldata.
§ Transmit [n] k inascendingorderand placeaNULcode 0at the end. When
[n]k isless than orequaltotheprecedingvalue [n]k-1,tabsettingisfinished
and the followingdataisprocessed asnormaldata.
§ ESCDNUL cancelsall horizontaltabpositions.
§ The previouslyspecified horizontaltabpositionsdo not change, even ifthe
characterwidthchanges.
§ Characterwidthisabsoluteinstandardmode and pagemode.
[Default] The default tabpositionsareat intervalsof8characters(columns9, 17, 25, ...)
forthe font B(12 14).
[Reference]HT
15 ESCEnTurnemphasizedmodeon/off
[Format] ASCII ESCEn
Hex1B45 n
Decimal27 69 n
[Range]0 ≤n ≤255
[Description]Turnemphasized mode on/off

THERMALRECEIPTPRINTER 10
§ When the LSB ofnis0, emphasized mode isturned off.
§ When the LSB ofnis1, emphasized mode isturned on.
[Notes] § Onlythe lowest bit ofnisenabled.
§ Thiscommand and ESC!turnon andoff emphasized mode inthe sameway.
The last proceeded command becomeseffective.
[Default] n=0
[Reference]ESC!
16 ESCG nTurndouble-strike modeon/off
[Format] ASCII ESCGn
Hex1B47 n
Decimal27 71 n
[Range]0 ≤n ≤255
[Description]Turndouble-strikemode on/off
§ When the LSB ofnis0, double-strikemode isturned off.
§ When the LSB ofnis1, double-strikemode isturned on.
[Notes] § Onlythe lowest bit ofnisenabled.
§ Printeroutput isthe sameindouble-strikeand inemphasized (ESCE).
[Default] n=0
[Reference]ESCE
17 ESCJnPrintand feedpaper
[Format] ASCII ESCJn
Hex1B4An
Decimal27 74 n
[Range]0 ≤n ≤255
[Description]Print the datainthe print bufferand feedsthe paper[nx 0.176mm (1/44inches)].
[Notes] § Afterprintingiscompleted, thiscommand setsthe print startingposition to
the beginningofaline.
§ The paperfeed amount set bythiscommand doesnot affect the valuesset
byESC2orESC3.
[Reference]GSP
18 ESCMn Selectfont
[Format] ASCII ESCMn
Hex1B4Dn
Decimal27 77 n
[Range]n=0, 1, 48, 49

THERMALRECEIPTPRINTER 11
[Description]SelectsFont AorFont Bfromthe followingtable:
n Function
0,48 Font A(12 ×24)isselected
1,49 Font B(9 ×17)isselected
19 ESCRn Selectaninternational characterset
[Format] ASCII ESCRn
Hex1B52 n
Decimal27 82 n
[Range]0 ≤n ≤15
[Description]Selectsan internationalcharacterset nfromthe followingtable:
n CharacterSet
0 U.S.A.
1 France
2 Germany
3 U.K.
4 Denmark
5 Sweden
6 Italy
7 SpainI
8 Japan
9 Norway
10 DenmarkII
11 SpainII
12 LatinAmerica
13 Korea
14 Slovenia/Croatia
15 China
[Default] n=0
20 ESCVnSelect/Cancel 90-degree rotation
[Format] ASCII ESCVn
Hex1B56 n
Decimal27 86 n
[Range]0 ≤n ≤1, 48 ≤n ≤49
[Description]Select/Cancel90-degree rotation
n Function
0,48 90-degree rotation iscanceled
1,49 90-degree rotation isselected
[Notes]

THERMALRECEIPTPRINTER 12
§ Thiscommand isonlyeffected instandardmode.
§ When 90-degree rotation isselected, printerdoen st print the underline.
§ Twice-height and twice-widthisopposited in90-degree rotation mode.
[Default] n=0
[Reference]ESC!,ESC-
21 ESC\ nL nHSetrelativehorizontal position
[Format] ASCII ESC \ nL nH
Hex1B5CnL nH
Decimal27 92 nL nH
[Range]0 ≤nl ≤255 0 ≤nH ≤255
[Description] Thiscommand setsthe print startingposition towherethat [(nL +nH ×256) ×
horizontal/verticalmoveunit] away.
[Notes] § The printerignoresthe settingsthat out ofthe printablearea.
§ When the print position ismovingright, nL+nH ×256 =N
§ When the print position ismovingleft, nL+nH ×256 =65536 –N
§ The beginningprint position ismoved fromcurrent position to[n ×
horizontal/verticalmoveunit]
§ Horizontaland Verticalmoveunit isset bycommand GSP.
§ Instandardmode, horizontalmoveunit isused.
§ Inpagemode, print area direction and the beginningprintposition determine
the useofhorizontalmoveunit orverticalmoveunit, asfollow,
1. When the beginningprint position isset by ESCT totopleft corneror
bottomright corner, horizontalmoveunit isused;
2.When the beginningprint position isset by ESCT tobottomleft corneror
topright corner, verticalmoveunit isused;
[Reference]ESC$, GSP
22 ESCanSelectjustification
[Format] ASCII ESCan
Hex1B61 n
Decimal27 97 n
[Range]0 ≤n ≤2, 48 ≤n ≤50
[Description]Alignsall datainone line tothe specified position.
nselectsthe justification asfollows:
n Justification
0,48 Left justification
1, 49 Center
2, 50 Right justification
[Notes] § The command isenabled onlywhen processed at the beginningofaline.

THERMALRECEIPTPRINTER 13
§ Thiscommand justifiesthe spacearea ofthe dataskipped bycommand HT,
ESC$ and ESC\.
[Default] n=0
[Example]
左对齐 居中 右对齐
ABC
ABCD
ABCDE
ABC
ABCD
ABCDE
ABC
ABCD
ABCDE
23 ESCc5n Enable/disablepanel buttons
[Format] ASCII ESCc5n
Hex1B63 35 n
Decimal27 99 53 n
[Range]0 ≤n ≤255
[Description]Enablesordisablesthe panelbuttons.
§ When the LSB ofnis0, the panelbuttonsareenabled.
§ When the LSB ofnis1, the panelbuttonsaredisabled.
[Notes] § Onlythe least significant bit of"n"isvalid.
§ When the panelbuttonsaredisabled, no buttonson the panelareusable.
[Default] n=0
24 ESCdnPrintand feednlines
[Format] ASCII ESCdn
Hex1B64 n
Decimal27 100 n
[Range]0 ≤n ≤255
[Description]Printsthe datainthe print bufferand feedsnlines.
[Notes]§ Thiscommand setsthe print startingposition tothe beginningofthe line.
§ The amount ofpaperfed perline isbased on the value set usingthe line
spacingcommand (ESC2orESC3)
§ The maximumpaperfeed distanceisnot morethan 1016mm.
[Reference]ESC2, ESC3
25 ESCpmt1t2Generatepulse
[Format] ASCII ESCpm t1t2
Hex1B70 mt1t2
Decimal27 112 mt1t2

THERMALRECEIPTPRINTER 14
[Range]m=0, 1, 48, 49
0 ≤t1 ≤255, 0 ≤t2 ≤255
[Description]Outputsthe pulsespecified byt1and t2toconnectorpinmasfollows:
M ConnectorPin
0, 48 Drawerkick-out connectorpin2
1, 49 Drawerkick-out connectorpin5
[Notes] § The pulseONtimeis[t1 ×2] msand the OFF timeis[t2 ×2] ms.
§ When t2<t1, the printerprocessest1 ×2ms.
[Reference]DLEDC4
26 ESCtnSelectcharactercodetable
[Format] ASCII ESCtn
Hex1B74 n
Decimal27 116 n
[Range]0 ≤n ≤10 , 16 ≤n ≤19
[Description]Selectsapagenfromthe charactercode table.
n Page
0 PC437 [U.S.A. &EuropeStandard]
1 Katakana
2 PC850 [Multilingual]
3 PC860 [Portuguese]
4 PC863 [Canadian &French]
5 PC865 [Nordic]
6 West Europe
7 Greek
8 Hebrew
9 PC755: East Europe
10 Iran
16 WPC1252
17 PC866: Cyrillice#2
18 PC852: Latin2
19 PC858
[Default] n=0
27 ESC{nTurnson/off upside-downprinting mode
[Format] ASCII ESC{n
Hex1B7Bn
Decimal27 123 n
[Range]0 ≤n ≤255
[Description]Turnsupside-downprintingmode on oroff.

THERMALRECEIPTPRINTER 15
§ When the LSB ofnis0, upside-downprintingmode isturned off.
§ When the LSB ofnis1, upside-downprintingmode isturned on.
[Notes] § Onlythe lowest bit ofniseffective.
§ Thiscommand isenabled onlywhen input at the beginningofaline.
§ Inupside-downprintingmode, the printerrotatesthe line tobeprinted by
180°and then printsit.
[Default] n=0
[Example]
A B C D E F
0 1 2 3 4 5
A B C D E F
0 1 2 3 4 5
进纸方向
28 FSpnm PrintNVbitmapimage
[Format] ASCII FSpnm
Hex1C70 nm
Decimal28 112 nm
[Range]1 ≤n ≤255 0 ≤m ≤3, 48 ≤m ≤51
[Description]mspecifiesthe print mode:
m Mode Vertical Density(DPI) Horizontal Density(DPI)
0, 48 Normal 200 200
1, 49 Double-width 200 100
2, 50 Double-height 100 200
3, 51 Quadruple 100 100
§ nisthe numberofthe NVbitmapimage(defined usingthe FSqcommand).
§ mspecifiesthe bit imagemode.
[Details]
§ NVbitmapimagemeansabitmapimage, whichisdefined inanon-volatile
memoryby FSq and printed by FSp.
§ Thiscommand isnot effectivewhen the specified NVbitimagehasnot been
defined.
§ Instandardmode, thiscommand iseffectiveonlywhen thereisno datain
the print buffer.
§ Inpagemode, thiscommand isnot effective.
§ Thiscommand isnot affected byprint modes(emphasized, double-strike,
underline,charactersize, white/black reverseprinting, or90° rotated

THERMALRECEIPTPRINTER 16
characters, etc.), except upside-downprintingmode.
§ Ifthe downloaded bit-imagetobeprinted exceedsone line, the excess data
isnot printed.
§ Thiscommand feedsdots(forthe height n ofthe NVbit-image)innormal
and double-widthmodes, and (forthe height n × 2ofthe NVbit-image)in
double-height and quadruplemodes,regardless ofthe line spacingspecified
by ESC2 or ESC3.
§ Afterprintingthe bit image, thiscommand setsthe print position tothe
beginningofthe lineand processesthe datathat followsasnormaldata.
[Reference]ESC*, FSq, GS/, GSv0
29 FSqn[xLxHyLyHd1...dk]1...[xLxHyLyHd1...dk]nDefineNVbitmapimage
[Format] ASCII FSqn[ xLxHyLyHd1...dk]...[ xLxHyLyHd1...dk]
Hex1C71 n[xLxHyLyHd1...dk]...[ xLxHyLyHd1...dk]
Decimal28 113 n[xLxHyLyHd1...dk]...[ xLxHyLyHd1...dk]
[Range]1 ≤n ≤255
0 ≤xL ≤255
1 ≤(xL+xH ×256) ≤1023
1 ≤(yL+yH ×256) ≤288
0 ≤d ≤255
k=(xL+xH ×256) ×(yL+yH ×256) ×8
Totaldefined dataarea =8096 bytes
[Description]Define the NVbit imagespecified by n.
§ n specifiesthe numberofthe defined NVbit image.
§ xL, xH specifies(xL xH ×256) ×8dotsinthe horizontaldirection forthe NV
bit imageyou aredefining.
§ yL, yH specifies(yL yH ×256) ×8dotsinthe verticaldirection forthe NVbit
imageyou aredefining.
[Notes]§ It snot recommended towriteflashromfrequenty. Nomorethan 10 timesa
day.
§ Thiscommand cancelsall NVbit imagesthat havealreadybeen defined by
thiscommand.The printercan not redefine onlyone ofseveraldata
definitionspreviouslydefined. Inthiscase, all dataneedstobesent again.
§ Duringprocessingthiscommand, the printerisinBUSYwhen writingthe
datatothe NVusermemoryand stopsreceivingdata. Thereforeit is
prohibitted totransmit the dataincludingthe real-timecommandsduringthe
execution ofthiscommand.
§ NVbitimagemeansabitimagewhichisdefined inanon-volatilememoryby
FSq and printed by FSp.
§ Instandardmode, thiscommand iseffectiveonlywhen processed at the
beginningofthe line.

THERMALRECEIPTPRINTER 17
§ Inpagemode, thiscommand isnot effective.
§ Thiscommand iseffectivewhen 7bytes<FSyH> isprocessed asanormal
value.
§ When the amount ofdataexceedsthe capacityleft inthe rangedefined by
xL, xH, yL, yH, the printerprocesses xL, xH, yL, yH out ofthedefined range.
§ Inthe first groupofNVbit images, when anyofthe parameters xL, xH, yL,
yH isout ofthe definition range, thiscommand isdisabled.
§ IngroupsofNVbit imagesotherthan the first one, when the printer
processes xL, xH, yL, yH out ofthe defined range, it stopsprocessingthis
command and startswritingintothe NVimages. At thistime, NVbit images
that haven¡¯t been defined aredisabled (undefined), but anyNVbit images
beforethat areenabled.
§ The d indicatesthe definition data. Indata(d)a1bit specifiesadot tobe
printed and a0bit specifiesadot not tobeprinted.
§ Thiscommand defines n asthe numberofaNVbit image. Numbersrisein
orderfromNVbit image01H. Therefore, the first datagroup [xLxHyLyH
d1...dk] isNVbit image01H, and the last datagroup [xLxHyLyHd1...dk] is
NVbit image n. The totalagreeswiththe numberofNVbit imagesspecified
bycommand FSp.
§ Adefinition dataofaNVbit imageconsistsof [xLxHyLyHd1...dk].
Therefore, when onlyoneNVbit imageisdefined n=1, the printerprocesses
adatagroup [xLxHyLyHd1...dk] once. The printeruses([data: (xL xH ×
256) × (yL yH × 256) × 8] [header:4])bytesofNVmemory.
§ The definition area inthisprinterisamaximumof64Kbits(8Kbytes). This
command can define severalNVbit images, but cannot define abit image
datawhosetotalcapacity[bit imagedata header] exceeds64Kbits.
§ The printerisbusyimmediatelybeforewritingintoNVmemory.
§ The printerdoesnottransmitASB statusand performstatusdetectionduring
processingofthiscommand even when ASB isspecified.
§ When thiscommand isreceived duringmacrodefinition, the printerends
macrodefinition,and beginsperformingthiscommand.
§ OnceaNVbitimageisdefined, it isnot erased byperforming ESC@,reset,
and poweroff.
§ Thiscommand performsonlydefinition ofaNVbit imageand doesnot
performprinting. Printingofthe NVbit imageisperformed bythe FSp
command.
[Reference]FSp
[Example]When xL=64, xH=0, yL=96, yH=0

THERMALRECEIPTPRINTER 18
30 GS!nSelectcharactersize
[Format] ASCII GS!n
Hex1D21 n
Decimal29 33 n
[Range]0 ≤n ≤255
(1 ≤verticalnumberoftimes ≤8, 1 ≤horizontalnumberoftimes ≤8)
[Description] Selectsthe characterheight usingbits0to2and selectsthe characterwidth
usingbits4to7, asfollows:
Bit 0/1 Hex Decimal Function
0-3 Characterheight selection. See Table2.
4-7 Characterheight selection. See Table1.
Table1Table2
Characterheight Characterheight
Hex Decimal Horizontal Hex Decimal Vertical
00 0 1 (Normal) 00 0 1 (Normal)
10 16 2 (Double
width) 01 1 2 (Double
width)

THERMALRECEIPTPRINTER 19
20 32 3 02 2 3
30 48 4 03 3 4
40 64 5 04 4 5
50 80 6 05 5 6
60 96 7 06 6 7
70 112 8 07 7 8
[Notes]§ Thiscommand isall characters(alphanumericand Kanji)effectiveexcept
forHRI characters.
§ Ifnisoutside ofthe defined range, thiscommand isignored.
§ Instandardmode, the verticaldirection isthe paperfeed direction, and the
horizontaldirection isperpendiculartothe paperfeed direction. However,
when characterorientation changesin90 clockwise-rotation mode, the
relationshipbetween verticaland horizontaldirectionsisreversed.
§ Inpagemode, verticaland horizontaldirectionsarebased on the character
orientation.
§ When charactersareenlarged withdifferent sizeson one line, all the
characterson the line arealigned at the baseline.
§ The ESC! command can alsoturndouble-widthand double-height modes
on oroff. However, the settingofthe last received command iseffective.
[Default] n=0
[Reference]ESC!
31 GS*xyd1...d(x y 8)Definedownloadedbitimage
[Format] ASCII GS*xyd1...d(x ×y ×8)
Hex1D2Axyd1...d(x ×y ×8)
Decimal29 42 xyd1...d(x ×y ×8)
[Range]1 ≤x ≤255, 1 ≤y ≤48
x ×y ≤912
0 ≤d ≤255
[Description]Definesadownloaded bit imageusingthe numberofdotsspecified by xand y.
§ xspecifiesthe numberofdotsinthe horizontaldirection.
§ yspecifiesthe numberofdotsinthe verticaldirection.
[Notes]Thenumberofdotsinthehorizontaldirectionis x ×8,andintheverticaldirectionitis
y ×8.
§ Ifx ×yisout ofthe specified range, thiscommand isdisabled.
§ The dindicatesbit-imagedata. Data(d)specifiesabit printed to1and not
printed to0.
§ The downloaded bit imagedefinition iscleared when:
①ESC@ isexecuted.
②ESC& isexecuted.
③FSq isexecuted.
Table of contents
Other Codesoft Printer manuals