KERN YKN-01 User manual

KERN & Sohn GmbH
Ziegelei 1
D-72336 Balingen
E-Mail: info@kern-
sohn.com
Tel: +49-[0]7433- 9933-0
Fax: +49-[0]7433-9933-149
Internet: www.kern-
sohn.com
Operating Instructions
Dot matrix printer
KERN YKN-01
Version 1.0
11/2013
GB
The KERN Printer YKN-01 corresponds
to the model SPRT 16S.
YKN-01-BA-e-1310

SPRT
Content
Introduction 2
Chapter1FeatureandPerformance 3
1.1ModelDefinition 3
1.2Interface 3
1.3Printer Codes 3
1.4PrintCommands 4
1.5WorkingMode 4
1.6OfflineWorking 4
1.7PerformanceIndex 4
Chapter2SystemInstallation 5
2.1CheckingModel 5
2.2CheckingAccessories 6
2.3RibbonCassetteInstallation 6
2.4PaperRoll Installation 8
2.5PowerSupply 9
Chapter3Operation 10
3.1ParallelInterfaceConnection 10
3.2SerialInterface Connection 11
3.3ButtonsandIndicators 14
3.4Self-test 15
3.5Printer Initialization 15
3.6CommandSetSelection 16
Chapter4PrintCommands 16
4.1Summary 16
4.2PaperFeedCommands 17
4.3FormatSettingCommands 18
4.4Character SettingCommands 23
4.5User-definedCharacterSettingCommands 27
4.6GraphicsPrintCommands 29
4.7InitializationCommand 31
4.8DataControl Commands 31
4.9HexadecimalPrintCommands 32
4.10 ChinesePrintControl Commands 32
Chapter5PrintExamples 37
Chapter6Printer Usingunder Windows 40
Chapter7Printer ModelAlterationandProtection 40
7.1Printer ModelAlteration 40
7.2PrintHeadProtection 41
7.3Other 41
Appendix 42

SPRT
2
Introduction
SP-Tseriesprintersareaseriesofdesk-topmicroprinterwhichare
with updateddesign.Theyarewith theseremarkablefeaturesofdelicate
dimension,perfectperformance,elegantappearance,simpleoperation,
convenient connection.
ThespecificationofSP-Tprintersiscomplete,youcanchoose
differentprintspeed,differentprint linewidth,differentprintfont,
different printbuffer,and differentinterface ofserialand parallel.So,these
printerscanbeasprintoutputdevicesofall kindsofintelligentinstruments,
metersand microcomputers.
SP-Tprinterscanbewidelyusedin manyapplicationareas.Theycan
print reportforms,payslip and recordpathologiccurvesofall kindsof
medicalinstrumentsandmeters.Theyalsocanprint15kindsofdifferent
font Chinesecharactersifconnectedto Chinalearningmachine.Under
CCDOSand WindowsofIBM PC,theycanreplace2024etc.24-pin
printersthatare withexpensivepriceto printChinesecharactersdirectly,
and needn’taltertheprintingdriverprogram oforiginalsystem.Moreover,
owingtoadoptqualifiedESC standardcontrol codecommands,SP-Talso
canreplace 9-pin printers.
SP-Tprintershavefivemodels;two kinds ofinterface:serial,parallel;
three levelsofprint buffer:2Kbytes,8Kbytes,32Kbytes;52control
commands;448 kindsofinternalcharacters,includingEnglish,Greek,
German, French,JapanesekatakanaandGBChinesecharacter librarylevel
I,II,alargenumberofmathematicssymbols,special-purposesymbolsand
various kindsofgraphicandcurvingsymbols.Besides,SP-Tprintersare
compatiblewith SP-16, SP-40 microprinters.

SPRT
3
Chapter1 Featureand Performance
1.1Modeldefinition
SP-Tprintershavefivekindsofprintheadmodelandtwo kindsof
interface.Theyare definedas:
SP-T()
ProductSerialNumber:A, B,………..
Interface Mode:P(Parallel),S(Serial)
Speed:H(High), L(Low)
Character numberofeachline:16,24,
40, 42
Structure Mode:T
Trademark
YoucancompareyourSP-Tmicroprinter withtheabovedefinition,soas
tocorrectlyreadand understand thecontents in this manual.
1.2Interface
SP-Tserieshaveserialand paralleltwo kindsofinterface,parallel
interfaceiscompatiblewith CENTRONICS andserialinterface is
compatiblewith RS-232C.Thetwokindsofinterfaceareconnectedtothe
host both byusingstandard25-pin Dmodelsocketand 25-pin cable.
Theparallelinterface socketis Dmodel25-pinmalesocket;theserialisD
model25-pinfemalesocket.ThehostthathasDmodel25-pin standard
outputsocketsuchasIBM PCandits compatiblecomputer and LAPTOP
portablecomputer etc,canuse25-pinstandardcabletoconnectwith
directly.Thehost thathasn’tstandardoutputsocketsuchasChinalearning
machineetc,canusespecialcable(seeAppendix5)toconnectwith.The
detailspleaseseetheprintercableconnection inChapter3and Appendix
5.
1.3PrinterCodes
SP-Tprintersoffer 448kindsofinternalcharacters,includingEnglish,
Greek,German,French,JapanesekatakanaandGBChinesecharacter
librarylevelI,II,alargenumberofmathematicssymbols,special-purpose
symbolsand various kindsofgraphicandcurvingsymbols.All the
charactersare composedbytwo character sets(seeAppendix 1), chosenby
thehost’sprogramsthrough control commands.Character size is5 ×7
dots,graphiccharactersize is6×8dots,throughcertainprograms,also

SPRT
4
candefine32 kinds ofcharacter, soastosatisfyyourparticular needs.
SP-Tprintersalsooffer graphicsprintmode,charactersand graphicscan
beprintedtogether.
1.4Print Commands
SP-Tprintersoffer 52 kindsofprint command.Mostofthem are
compatiblewiththecommandstandardofIBM andEPSONprinter.
Combiningmicroprinter’sfeaturesandapplication situation,SP-Tadd
somecommandsthatareconvenient forusing,suchasprintcurve
commandetc.Therefore,SP-Tcanreplace most9-pinor24-pinprintersto
beuseddirectly,onlybydoingalittleadjustmenttotheoriginalprint
driver programsorsuchadjustmentisneedless.Whenprogrammingfor
printinggraphicsand curves, youmayfeelit is more convenient.
Ifyouhaveever usedSP-40orSP-16 microprinter,youwill find SP-T
printersarefullycompatiblewith theprintcommands ofSP-40orSP-16,
and charactersare more abundant, pleasesee 3.6ofChapter3fordetails.
1.5WorkingMode
SP-Tprintershavesixkindsofworkingmode,theyare:hexadecimalprint
mode,characterprint mode,graphicsprint mode,self-testmode,on/off
linemodeandpaper feedingmode.Amongthem theanteriorthree kindsof
modecanbechangedbycontrol commands,theposteriorthreeonescanbe
realizedbybuttonoperation. Pleaserefer toChapter 3and Chapter 4.
1.6Offline Print
Forsome printersinSP-TseriessuchasSP-T40,theprint speedisabit
slow.However,SP-Tprintersadoptadvanceddesign method,provide
ratherbigprintbuffer, sothatthehostcanfinishthedataexchangewiththe
printer quickly,and realizeassumedofflineprint.TheinternalRAMof
SP-Tis 2Kbytes, 8Kbytesor32Kbytesthesethree levels,theyhavebeen
setatex-factory,youcanselectaccordingtoyourownrequirements,but
after youhaveselected, generallyit can’tbealteredbyyourself.
1.7Performance Index
Thecommand performance indexofSP-Tis asbelow:
1. Parallelinterface:adoptD-25parallelstandardwhichiscompatiblewith
CENTRONICS,singledirectionalreceivingdatalineDB0-DB7;
providesynchronoussignalSTBbyexternalhost;sendprinter’sstatus
tothehostbyACK,BUSYandSEL. Thelogicsignallevelofall control
signaland datasignalare TTL.

SPRT
5
2.Serialinterface:adoptRS-232Ccompatiblestandard.Thebaudratein
serialinterface modeisselectedintherangeof150,300,1200,2400,
4800,9600 and19200bpsand itissetbyDIPswitchonthecontrol
panel; asynchronoustransmission mode.Handshakingmodeismark
control orX-ON/X-OFFprotocol.Threekindsofparitycheckingmodes
are odd, evenornoparity. Logicsignallevelofall signalsis EIA.
3.Indictorsandbuttons:power Pindicator,on/offlineselectionSEL
indicator, SELbuttonswitchand LFpaper feedingbuttonswitch.
4.DC5Vpowersupply:astoSP-T16,SP-T24(L)andSP-T40,1.5A
currentisdemanded,astoSP-T24(H)and SP-T42,3Acurrentis
demanded.
5. Ribbonlife:1×100000 lines.
6.Printpaper:common whitepaper,width:44.5±0.5mmor57.5±0.5mm,
thickness:0.07mm, ifinstalledinside,thediameter ofpaper roll shouldnot
belarger than30mm;ifinstalledoutside, shouldnotbelarger than80mm.
Other Indexof5ModelsofSP-TSeries:
SP Character/line
Font (mm ×mm) Dot/line Speed
(line/sec.)
16 16 1.8×2.5(W×H) 96 1
24L
24 1.7×2.4(W×H) 144 0.7
40 40 1.1×2.4(W×H) 240 0.4
24H
24 1.7×2.6(W×H) 144 1.7
42 42 1.1×2.6(W×H) 252 1
Chapter2SystemInstallation
2.1ModelChecking
SP-Tprintersappear theoutlineasFigure2-1below. Pleasecheckup the
modelnumber atthebottomoftheprinter, seeingifornotit accords with
whatyouneed.And payattentiontothedetailedusingspecifications about
yourmodelin this user manual.

SPRT
6
Fig. 2-1SP-TPrinter Outline
SP-Tprintersallow youtomakeproper alterationtotheprintermodel,
detailedmethodpleasesee Chapter 7.
2.2CheckingAccessories
There is alreadyapaper roll and ribbonis installedin theprinter at
ex-factory, and a User sManual aswell. Youcanalsochooseother
accessoriesaccordingtoyourrequirements. (see Appendix 5)
2.3RibbonCassette Installation
Theribbon cassettehasalreadybeeninstalledwell atex-factory,but after
usingforaperiodoftime,it needstochangetheribbon cassette,theways
forchangingribboncassettemayaccordtothefollowingsteps:
(1)Takedownthemovablecover paneloftheprinter asFig.2-2shows;
whatFig2-3showsis wrong.
Fig.2-2TakingdowntheMovableCover PanelCorrectly
Fig.2-3TakingdowntheMovableCover PanelIncorrectly
(2)Takedowntheoldribboncassettewhichis ontheheadofprinter,(see
Fig.2-5).Pleasenote:liftuptheright endoftheribboncassettefirst,
thenliftup theleftone, takedowntheribboncassette.

SPRT
7
Fig.2-4TakingDowntheRibbonCassette
(3)Installingthenewribbon cassette:firstly putdown gentlytheleftendof
ribboncassetteonthegear wheelwhichisontheleftendoftheprint
head,liftuptherightendalittle,don'tputdown,asFig2-5shows.At
thistime ifyoufind theleftendofribboncassettehasnot beenput
down tothebottom,pleasehold down theknobofribbon cassettewith
finger,rotateslightlyaccordingtothearrow direction,asFig.2-6shows,
untiltheribbon cassettehasbeenputdowntothebottomthenputdown
therightend,asFig.2-7shows.Sotheribboncassettehasbeen
installed.
Fig. 2-5PuttingdowntheLeftEnd
Fig2-6RotatingtheKnobAccordingtotheArrow Direction
Fig2-7PuttingdowntheRight End
(4)Closethemovablecover paneloftheprinter asFig2-8shows.

SPRT
8
Fig.2-8ClosingtheMovableCover Panel
2.4PaperRoll Installation
ForSP-Tprinters, paper roll canbeput insidethecase, installingpaper as
follows:
(1)Push theremovablecover plateforwardtill it off theprinter like
Fig.2-2,
(2)Cut thepaper end likeFig.2-10 below.
Forpaper roll placedinsidethecase:Insertthepaper end downwards into
paper-in slotonrear ofprinter mechanismlikeFig. 2-11, Fig.2-12 paper
upwardis notcorrect.
Forpaper roll holdoutsidethecase:firstlyput paper throughthenarrow
orifice thatis atthebackofprinter shell, asshownin Fig2-12, thenmake
paper face thepaper-in slot.
Fig2-9SampleofPaper End
Fig.2-10 Paper End Downwards
Fig. 2-11 Paper End Upwards IsWrong

SPRT
9
Fig.2-12 Face thePaper-in Slot
(3)Turnon+5Vpower supply.
(4)Press thebutton<SEL>and theSELindicatorwill beturnedoff. Press
thebutton<LF>torun theprint head, and theninsertthepaper intothe
paper-in slot,and thepaper will beloadedintotheprint headand come out
fromthefront foracertain seemlylength.
(5)Press LForSELbuttonagain orturnthepower off.
(6)Put paper end throughthepaper-out slotthatonthemovablecover
panel, and closethemovablecover panel.
2.5PowerSupply
SP-TprintersadoptDC+5Vpowersupply.Itisrecommendedtousethe
power connectorthatmatcheswell totheprinter,sothatyoucandirectly
connecttheplugofconnecter tothesocketofprinter.If useother power
supply,itsvoltageishigherthan5.5Vorlower than4.5V,andcurrentis
lower than3A,wewon’tguaranteetheprinterworks normally,evenmay
damagetheprint head.
Pleasenotethatthepolarityofthepowershouldn'tbeconnected
incorrectly.
ForSP-Tprinters, thecolumnendispositivepole(+),andtheboardendis
negativepole(–), asshownin Fig.2-13:
Fig.2-13 Power PolaritySketchMap
Caution:Don’tconnectAC220Vwith thepowersocketoftheprinter
directly!
Thewholesystem connectionis asFig.2-14 shows:

SPRT
0
Fig.2-14 System Connection
Chapter3PrinterOperation
3.1ParallelInterface Connection
SP-TprintersadoptD-25parallelinterface,whichis compatiblewith
CENTRONICS standard,andtheinterfacesocketmatcheswell theprint
interfaceofIBM PC.So,ifyouconnecttheprintertoIBM PC,LAPTOP
portablecomputeretc.hostsbyusingthecablesaid in Appendix 5directly,
youneedn’ttoworrytheplugandsocketconnectedincorrectly.Thereare
severalkindsofcableaccessoriesshowninAppendix5ofthismanualfor
selection,youcanselecttouseaccordingtoyourprinter’sinterface.If
there isnosuitablecableinAppendix5,youmayspeciallyorder thecables
accordingtothesignalsofSP-Tprinters’parallelinterface andhost
interface.
Thepin order ofparallelportis asFig. 3-1shows:
Fig.3-1Pin Order ofParallelPort
Thepin assignmentofparallelinterfaceisshown in Fig.3-2,signallevelis
TTLstandard:
Pin No. Signal Direction Description
1 STBIn Strobepulsetolatchdata,
readingoccursatfallingedge.
2
3
4
5
6
7
8
9
DATA1
DATA2
DATA3
DATA4
DATA5
DATA6
DATA7
DATA8
In
In
In
In
In
In
In
In
Thesesignals representthe1
st
bit to8th bit oftheparalleldata
representatively,eachsignalis
atHIGHlevelwhendatais logic
1,andLOW whendataislogic
0.

SPRT
10
ACK Out
Answeringpulse, LOWlevel
signalindicatesthatdatahave
alreadybeenreceivedand the
printer gets readytoreceivethe
next data.
11 BUSY Out HIGHlevelsignalindicatesthat
theprinter is BUSYand cannot
receivedata.
12 PE--- Grounding
13 SEL--- Pullingup toHIGHlevelsignal
byaresistor
15
ERR Out Pullingup toHIGHlevelsignal
byaresistor
14-17 NCOut No connection
18-25 GND --- Groundinglogical0level
Fig.3-2Pin Assignment ofParallelInterface
Notice: (1)“In”denotesinputtotheprinter,“Out”denotesoutputfrom
theprinter.
Thetimingchartforinterface signalofparallelinterface is asFig.3-3
shows:
T1>20 NSEC,T2>30NSEC,T3<5NSEC
Fig.3-3SignalTimingChartofParallelInterface
3.2Serial Interface Connection
TheserialinterfaceofSP-Tprintersis compatiblewithRS-232Cstandard,
the25-pininterface socketmatchesRS-232CinterfaceofIBM PC,soyou
canconnecttheprinterwithIBM PC directlybyusingthecorresponding
cableswhosedetailsare in Appendix 5.
Thepin order ofserialportis asFig. 3-4shows:

SPRT
2
Fig.3-4Pin Order ofSerialInterface
Thepin assignmentofserialinterface isshown inFig.3-5,logicalsignal
levelis EIA:
Pin No. Signal
Name Source Description
2 RXD Host Printer receivesdatafromhost
3 TXD Printer Printer transmitscontrol code
X-ON/X-OFFtohostwhen
usingX-ON/X-OFF
handshakingprotocol
5 CTS Printer Signal “MARK”indicatesthat
theprinteris “BUSY”and
unabletoreceivedata;
“SPACE”indicatesthatthe
printeris “READY”for
receivingdata.
6 DSR Printer Signal “SPACE”indicatesthat
theprinter is “ONLINE”
7 GND —SignalGround
8 DCD Printer Same tosignalCTS
Fig. 3-5Pin Assignment ofSerialInterface
Note:The “Printer”and “Host”in “Source”denotethesource thatsignal
come from;
Thebaudrateinserialinterface modeisselectedintherangeof150,300,
1200,2400,4800,9600and 19200bps and it is setbyDIPswitchon the
control panel.Youcandosome adjustmentsaccordingtoyourdemands.
Thedetailedmethodis:openingthemovablecover panel,thenopeningthe
printer’suppercover.DIPswitchison therightcorner oftheprinter,the
sidemarkedwithwhitedotisOFF status;another sideis ON status.Also
youcanselectsuitablebaudrateaccordingtoFig.3-6,thewhite-dotplace
is K1. Ithassetthebaud rateto9600bps atex-factory.
TheDIPswitchsettingsofSP-Tseriesprinters, pleasesee Appendix 8.
13
1
25
14

SPRT
3
Fig.3-6DIPSwitchSetting
Thedatastructure ofserialinterface is asFig.3-7shows:
StartBit DataBit ParityBit StopBit
1bit 7or8bits 1bit 1bit
Fig.3-7DataStructure ofSerialInterface
Whenselecting7databits,onlyallowedadopting1startbit,7databits,1
evenbitand1stopbit.Thereofthestartbitandstopbitare both1bit. Data
bit is 8bits,paritybitis1bit.Thecheckingmodecanbeselectedthrough
DIPswitchK5andK6,asFig.3-6shows.Ithassetnoparityatex-factory,
thatis, K5, K6=ON, ON
ThepolarityofRS-232 signalin serialinterface modeis:
MARK=logic “1”(EIA-3Vto-27Vlow signallevel)
SPACE=logic “0”(ELA+3Vto+27Vhighsignallevel)
There are two kindsofhandshakingmodeforselection,oneismark
control mode, anotherisX-ON/X-OFFprotocol mode, theycanbeselected
byDIPswitchK4,asFig.3-6shows.Itis K4=OFF atex-factory,the
descriptionforthetwo kinds ofhandshakingmodeis asFig.3-8shows.

SPRT
4
Handshaking
Mode Data
Direction RS-232CInterface Signal
In 5th and 8th signallineare SPACEstatusMarkControl Out 5th and 8th signallineare MARKstatus
In Send X-ON code11Hon3rd signalline
X-ON/X-OFF
Control Out Send X-OFFcode13Hon3
rd signal
line
Fig.3-8Two Kinds ofHandshakingMode
Theoperationsteps forserialinterface modeare asbelow:
(1)Selectbaud ratewith DIPswitchK1-K3;
(2)Selectparitycheckingwith DIPswitchK5, K6;
(3)Selectmarkcontrol orX-ON/X-OFFcontrol handshakingmodewith
DIPswitchK4;
(4)Whenremaining32bytesinthedatabuffer,signallineDCD(8th signal
line)and CTS(5th signalline) will besettoBUSYstatusbythe
printer,namelyMARKstatus.OtherwisesettoREADYstatus,namely
SPACEstatus;
(5)Whenit is BUSYstatus underX-ON/X-OFF control,theprintersends
X-OFF (13H)code.WhenREADYstatus, it sends X-ON (11H)code;
(6)Whenit is undermarkcontrol,thehostsendsorstopssendingcode
stringaccordingtoDCDandCTS.DCDandCTSdenoteREADY
status orBUSYstatus representatively.
3.3Buttonsand Indicators
Therearetwo indicatorsandtwo buttons(SELandLF)onthecontrol
panelofSP-Tprinters.TheindicatormarkedwithPispowerindicator,
anotherindicatorismarkedwithSEL.Oneofthetwo buttonsisalso
markedwithSEL,anotheroneismarkedwith LF,asFig.3-9shows.SEL
indicatoronlypresentsthestatusofSELbuttonandisirrelevanttoLF.
SELandLFcanchangeprinter’sworkingmode,includingself-testmode,
on/offlinemodeorpaper feedingmode.
Fig. 3-9Indicatorsand buttons
(1)Self-test mode:
Therearetwo kindsofmethodtoselectself-testmode,onekindofmethod

SPRT
5
isholdingdown SELbutton whenpower on,thatmeanspressingSEL
button first,thenputtingthrough DC5Vpowersupply,atthismomentthe
printerprints outtheself-testreceipt,and SELindicatorgoesdark; another
kindofmethodisselectingself-testmodeatanytime after poweredon,the
detailis:ifSELindicatorlights,holddown SELbutton tomakethe
indicatorgo dark,otherwisecanomitthisstep:holddown LFbutton,then
holddownSELbuttonatonce, theprinter will begin theself-test.
Alsotherearetwo kinds ofmethod tocancelself-test mode.Oneisprinter
exits automaticallyafter it finishedprintingtheself-testreceipt;anotheris
printerexitsduringthecourseofprinting,atthistime onlyneedtopress
SELbutton.
(2)On/offlinemode:
After poweredonorexitedself-testmode,printer goesinonlinemode,
SELindicatorlights,hold down SELbutton,theSELindicatorgoesdark,
printer goesinofflinemode,holddownSELagain,printer re-goesin
onlineworkingmode.Whenprinter is offline,itdoesn’treceivethedata
fromhose.
Another functionofSELis realizingpauseduringthecourseofprinting.If
hold downSELwhenprintingisgoingon,thenreleaseit,theprinterwill
pauseafterfinishedprintingthecurrentline,atthistimepaperfeeding
modecanbeselected.Holddown SELbuttonagain andreleaseit,the
printer will continueprinting.
(3)Paper feedingmode:
Itis inoff-linestatuswhenSELindicatorisdark,atthismoment ifneedto
feedpaper,holddown LFbutton, thenreleaseit, theprinterwill feedpaper
emptily,but won’tprint.HolddownLFbuttonand releaseitagain,the
print will pause,hold down SELbuttonatthis moment,theprinterwill
restore toon-linestatus.Besides,itpaperfeedingmodecanbeswitchedto
on-linestatus directlybypressingSELbutton.
3.4Self-test
Theself-testwill checktheconditionofprinter,iftheprinterprints outthe
self-test receipt correctly,it means theprinterworksnormally.Otherwiseit
needstorepair.After self-test,theprinter isinon-linestatus andcan
receivethedatafromthehost.Sometimestheself-testmaybeincorrect,
but infact, there isnomatter withtheprinter,inthisinstance, pleasecheck
whether thepower supplyadoptedmeets thespecification.

SPRT
6
3.5PrinterInitialization
Therearethreekinds ofmodesforprinterinitialization.Thefirstoneis
thatthehost sends command totheprinterwith control codeESC@,
realizinginitializationthroughsoftware.Thesecondoneisthatrealizing
initializationthroughself-test.Thethirdoneis thatpower oninitialization.
Thecontentsofinitialization include:selectdefault ofeachcontrol code,
namelythedot number oflinespacingis3,nobindinglength,verticaland
horizontaltabvalueareboth0,leftandrightmarginwidthareboth0,
enlargingmultipleis 1;cancelall theuser-definedcharactersorgraphics
characters;andselectnonreversewhiteprint etc.;selectcharactersetfixed
byshortcircuit blockW1.
3.6Command Set Selection
SP-T16 andSP-T40bothhavetwo commandsets,oneisESCcontrol
codes,another iscompatiblewiththecommands ofSP-16andSP-40micro
printers,canbeselectedbyinternalshortcircuitblockW1.WhenW1 is
shortconnected,selectthecommand setthatiscompatiblewiththe
commands ofSP-16andSP-40;whenW1is disconnectedthenselectESC
control codecommand set.ItissettoESC control codecommandsetat
ex-factory. Refer toappendix.
AsforSP-T24(L), SP-24(H),SP-T42,onlyESC control codecommand set
is available.
Chapter4Printcommand
4.1Summary
SP-Toffer more than52kindsofprintcommands,thesecommandsspecify
thefollowingfunction:
(1)Defineformat
(2)Enlargeordiminish characters
(3)Print bit mapgraphics
(4)Selectcharacter set
(5)Defineuser-definedcharacters
(6)Etc.
Thesecommands includeone-bytecontrol codesorESCcontrol code
sequences.ESCcontrol codesequencesare begunwith “ESC”codeand
followedbyother character codes.
Eachcommand is describedin followingformat:
Command name Function
Format:ASCII:thestandardASCII character sequence

SPRT
7
Decimal: theDecimalnumber sequence
Hexadecimal: theHexadecimalnumber sequence
Explanation:whatthecommand doesand how touseit.
Example:someexamplesarelistedtoillustratethecommandforbetter
understanding.
Thefollowingis thedescriptionofeachcommandaccordingtothe
functionofeachcommand.
4.2PaperFeedingCommands
LFFeedLine
Format:ASCII:LF
Decimal: 10
Hexadecimal: 0A
Explanation:
Theprinter feeds paper forwards oneline.
ESC JnDotLineFeed
Format:ASCII:ESC Jn
Decimal: 27 74 n
Hexadecimal: 1B4An
Explanation:
Theprinter feeds paper ndotlines. n=0~255.
This commandsendscarriagereturnand feedline.Itwon’tinfluencethe
latter feedlinecommand.
Ifyouneedtofeedpaperimmediatelybutnocarriagereturn,canuseESC
Jcommand.Linespacingwill beadjustedautomaticallywhenusing
commands ESC Vand ESC Wforenlargecharacters.
ESC 1SetnDot-lineSpacing
Format:ASCII:ESC 1n
Decimal: 27 49 n
Hexadecimal: 1B31 n
Explanation:
Thelinespacingissettondot-linesforfuture LineFeedcommand.
n=0~255,default settingn=3fortextprinting,n=0forbitmapprinting
whenusingESC Kcommand.
TheBASICprogramsforobservingtheeffectofthiscommand are as
below:
10 FORI=1TO11STEP2’ESC 1setlinespacing
20 LPRINTCHR$(27); “1”;CHR$(I)print character stringand feedline
30 LPRINT “LINESPACING”

SPRT
8
40 NEXTI
Theprint resultofthesaid programsin SP-T16 is asfollowing:
FF FeedPage
Format:ASCII:FF
Decimal: 12
Hexadecimal: 0C
Explanation:
Feedpaper tothebeginningofthenext page.
4.3 FormatSettingCommands
ESC CSetPageLength
Format:ASCII:ESC Cn
Decimal: 27 67 n
Hexadecimal: 1B43 n
Explanation:
Thepagelengthis settoncharacterlines.n=0~255,whenn=0,thepage
length is 256 lines. Defaultn=40.
ESC NSetBindingLength
Format:ASCII:ESC Nn
Decimal: 27 78 n
Hexadecimal: 1B4En
Explanation:
Thebindinglengthis settonlines.n=0~255,defaultn= 0.InSP-T,
bindinglengthdenotesthenumber ofblanklinebetweenonepageandthe
next page.
Example:setbindinglength to3lines,sendthefollowingsequencetothe
printer:
ASCII:ESC NETX
Decimal: 27 78 3
Hexadecimal: 1B4E03
TheBASICprogramsforsendingthesaid sequence are asbelow:
LPRINTCHR$(27);“ N ”;CHR$(3)

SPRT
9
ESC OCancelBindingLength
Format:ASCII:ESC O
Decimal: 27 79
Hexadecimal: 1B4F
Explanation:
Thebindinglengthis setto0line,it meanstheprinter will print
line-by-line, won’tvacateblanklinesbetweeneachpage.
ESC BSetVerticalTabValue
Format:ASCII:ESC Bn1 n2 n3…NUL
Decimal: 27 66 n1 n2 n3…0
Hexadecimal: 1B42 n1 n2 n3…00
Explanation:
Theverticaltabpositionsareenteredasn1,n2and soon,all ofthese
shouldbewithin thepagelength setbyESC Ccommand.
Command NULaddedattheend indicatesthecommand is over.
All verticaltabpositionsthatinputcanbedeletedbyusingthis command
in ESC BNULformat.
VTcommand istocarryout verticaltab,thepaperfedtothenextvertical
position.
Example:setthreeverticaltabvaluesat2nd line,5th line,8th lineinone
page, youcansend thefollowingcommands:
ASCII:ESC BSTX ENQ BS NUL
Decimal: 27 66 2580
Hexadecimal: 1B42 02 05 08 00
TheBASICprogramsforthis exampleare asbelow:
10LPRINTCHR$(27); “B”;CHR$(2);CHR$(5);CHR$(8);CHR$
(0);’ESC Bcommand
20 LPRINTCHR$(11);’VTcommand
30 LPRINT“VTAB1”;’Print character string
40 LPRINTCHR$(11);’VTcommand
50 LPRINT“VTAB2”;’Print character string
60 LPRINTCHR$(11);’VTcommand
70 LPRINT“VTAB3”;’Print character string
Theprint resultin SP-T16 is asfollowing:
Other manuals for YKN-01
1
Table of contents
Other KERN Printer manuals