首页 TEC B-SX600 指令集 EN 东芝条码打印机编程手册

TEC B-SX600 指令集 EN 东芝条码打印机编程手册

举报
开通vip

TEC B-SX600 指令集 EN 东芝条码打印机编程手册TOSHIBABarCodePrinterB-SX600SeriesCommandManualFirstEdition:August31,2009B-SX600CommandManual•Theallcompanyandproductnamesaretheregisteredtrademarksortrademarksoftheirrespectivecompanies.•Thismanualmaynotbecopied,duplicated,orchanged,inwholeorpartina...

TEC B-SX600 指令集 EN 东芝条码打印机编程手册
TOSHIBABarCodePrinterB-SX600SeriesCommandManualFirstEdition:August31,2009B-SX600CommandManual•Theallcompanyandproductnamesaretheregisteredtrademarksortrademarksoftheirrespectivecompanies.•Thismanualmaynotbecopied,duplicated,orchanged,inwholeorpartinanyform.•Thecontentsofthismanualmaybechangedwithoutnotificationforproductimprovement.B-SX600CommandManualCopyright©2009byTOSHIBATECCORPORATIONAllRightsReserved570Ohito,Izunokuni-shi,Shizuoka-ken,JAPANTABLEOFCONTENTSPage„COMMANDLIST・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・11.IMAGEDATASETCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・22.PRINTDATASENDCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・53.CALIBRATIONREQUEST/RESPONSECOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・84.PRINTEROPERATIONSETCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・95.PAGEINFORMATIONSETCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・116.HOMEPOSITIONSETCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・137.PRINTSTARTCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・148.STATUSREQUEST/RESPONSECOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・169.FINEADJUSTMENTCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・1810.FINEADJUSTMENTVALUEREQUEST/RESPONSECOMMAND・・・・・・・・・・・・・・・・・・・・1911.SENSORSTATUSREQUEST/RESPONSECOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・2012.ANALOGSENSORSTATUSREQUEST/RESPONSECOMMAND・・・・・・・・・・・・・・・・・・・・2213.PRINTERVERSIONREQUEST/RESPONSECOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・2414.SERVICEINFORMATIONREQUEST/RESPONSECOMMAND・・・・・・・・・・・・・・・・・・・・・・・2515.SERVICEINFORMATIONSETCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・2616.PRINTHEADTESTREQUEST/RESPONSECOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・2717.CUT/PEEL-OFFENABLEFLAGSETCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・2918.PAGENUMBERSETCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・3019.DRIVERINFORMATIONSETCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・3120.DOCUMENTINFORMATIONSETCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・3321.SPECIALDATAREQUEST/RESPONSECOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・34„STATUS・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・36ASYNCHRONOUSSTATUSCOMMAND・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・36B-SX600CommandManual-1-„COMMANDLISTThefollowingisthelistofthecommandsfortheB-SX600series.CommandResponseDescriptionEffectiverange/TIIImagedatasettingPrinterdriver–Printer/TIDImagedatasendPrinterdriver–Printer/TCB/RCBCalibrationrequest/responsePrinterdriver–Printer/TAIPrinteroperationinformationsetPrinterdriver–Printer/TPIPageinformationsettingPrinterdriver–Printer/TATHomepositionsettingPrinterdriver–Printer/TSPPrint/FeedPrinterdriver–Printer/TES/RESErrorinformationrequest/responsePrinterdriver–Printer/TSACorrectiondatasettingPrinterdriver–Printer/TGA/RGACorrectiondatarequest/responsePrinterdriver–Printer/TSB/RSBSensorstatusrequest/responsePrinterdriver–Printer/TSL/RSLAnalogsensorstatusrequest/responseTool–Printer/TVR/RVRVersioninformationrequest/responsePrinterdriver–Printer/TGS/RGSServicinginformationrequest/responsePrinterdriver–Printer/TSSServicinginformationsettingPrinterdriver–Printer/TTH/RTHHeadtestrequest/responsePrinterdriver–Printer/TECCut/Pee-offenableflagsettingPrinterdriver–Printer/TPNPagenumbersetPrinterdriver–Languagemonitor/TDIDriverinformationsettingPrinterdriver–Languagemonitor/TJIDocumentinformationsettingLanguagemonitor–Printer/TSD/RSDSpecialdatarequest/responsePrinterNOTE:Theeffectiverangeistherangewherethecommandisused.B-SX600CommandManual-2-1.IMAGEDATASETCOMMANDFormatByte/bit76543210Remarks0‘/’1Header‘T’2‘I’3Commandidentifier‘I’400hto00h7Reserved00himage.buf89Imagelength[line]image.length1011Imagewidth[word]image.width1213X-directionoffset[dot]image.xoffset1415Y-directionoffset[dot]image.yoffset1617Imagemodeimage.mode1800hto00h21Reserved(Ribbonsaveinformation)00himage.rsp2200hto00h25Reserved(Verificationinformation)00himage.vsp2600h27Reserved(Printlengthatportraitorientation)00himage.total_lengthFunctionSetstheimagebufferinformationusedforprintingandre-organizestheimagebuffer.Explanation•Thedataintheimagebufferisnotcleared.•Settheprintlengthinunitsoflines,anditmustbeequaltoorlessthantheimagebufferlength.•Settheprintwidthinunitsofwords(16dots),anditmustbeequaltoorlessthantheone-sixteenth(1/16)oftheimagebufferwidth.•SettheX-directionoffsetinunitsofdots,anditmustbewithintherangefrom0to‘imagebufferwidthminus1’.Whenanyvalueotherthan0issetfortheX-directionoffset,theprintpositionofanimagewillshifttotherightbythespecifieddots,asviewedfromtheprinterback.IfperforminganX-directionoffsetcausedapartoftheimagetobepositionedoutsideoftheprintheadwidth,suchpartwillnotbeprinted.B-SX600CommandManual-3-Example)•SettheY-directionoffsetinunitsoflines,anditmustbewithintherangefrom‘–max.pagelength’tothemax.pagelength.WhenapositivevalueissetfortheY-directionoffset,theprintpositionofanimagewillshiftbackward,andwhenanegativevalueisset,animagewillshiftforward,asviewedfromthemediaoutlet.IfperformingaY-directionoffsetcausedapartoftheimagetobepositionedoutsideoftherangeofapage,suchpartwillnotbeprinted.Example)•Theimagemodeisspecifiedbythefollowingbitpattern.15141312111098765432100ReservedBSBWWRBRUD0001TheBS,BW,WR,BR,andUDspecifythedataarrangementintheimagebuffer.Printdataisstoredintheimagebufferintheorderoftransmissionfromthelowestaddress,sothisisalsospecifytheprintdatatransmissionorder.BitValueImagebufferstructureTransmissionorder0LoweraddressrepresentsupperaddressFromthehighestbyteBS1LoweraddressrepresentsupperaddressFromthelowestbyte0ReverseprintinvalidFromthehighestbyteBW1ReverseprintvalidFromthelowestbyte0LoweraddressrepresentsleftwordFromtheleft-mostword,asviewedfromtheprinterback.WR1LoweraddressrepresentsrightwordFromtheright-mostword,asviewedfromtheprinterback.0Loweraddressrepresentstheleft(asviewedfromtheprinterback)TheLSBisleftbitasviewedfromtheprinterback.BR1Loweraddressrepresentsright(asviewedfromtheprinterback)TheMSBisrightbit,asviewedfromtheprinterback.0Loweraddressrepresentsbackward(Mediarollside)Fromthelineclosertothemediaroll.UD1Loweraddressrepresentsforward.(Mediaoutletside)Fromthelineclosertothemediaoutlet.PrintdirectionPrintdirection+5-50+50B-SX600CommandManual-4-•RelationbetweentheprintimagerotationandimagemodeflagNormalMirror00-degreerotation,0x0001|IMG_LRB|IMG_LRW0-degreerotation,0x00019090-degreerotation,0x0001|IMG_LRB|IMG_LRW90-degreerotation,0x00011800-degreerotation,0x0001|IMG_UD0-degreerotation,0x0001|IMG_UD|IMG_LRB|IMG_LRW27090-degreerotation,0x0001|IMG_UD90-degreerotation,0x0001|IMG_UD|IMG_LRB|IMG_LRWB-SX600CommandManual-5-2.PRINTDATASENDCOMMANDFormatByte/bit76543210Remarks0‘/’1Header‘T’2‘I’3Commandidentifier‘D’4to7OffsetbeforecompressionEquivalenttotheargument“offset”8to11Datasizebeforecompression(n)Equivalenttotheargument“size”1213Compressionmode14to17Compressionparameter1(Offsetaftercompression)18to21Compressionparameter2(Datasizeaftercompression)2223Bitmap(Firstword)tonx2+20nx2+21Bitmap(Lastword)FunctionSendsimagedata.ExplanationThecompressionmodeisspecifiedbythefollowingbitpattern.1514131211109876543210CMReservedCompressionmethodTheCMbitspecifiestheotherfields,asfollows.CMCompressionCompressionmethodCompressionparameters1and20NoInvalidInvalid1YesValidValidB-SX600CommandManual-6-Themeaningofthecompressionmodefield0Undefined1PackBits(Notapplicable)2to7Undefined8GrPDKAdaptiveCompress(Notapplicable)9to15Undefined„Specificationnotaffectedbyenabling/disablingthecompression•DatatobetransmittedmustcomplywiththearrangementspecifiedbytheImageDataSetCommand.•Fortheoffsetbeforecompression,settheoffsetforthewritestartpositionintheimagebufferinunitsofwords.Therefore,theoffsetbeforecompressionmustbeamultipleof2•Datasizebeforecompressionmustbespecifiedinunitsofwords.•Themaximumdatasizebeforecompressionequalstothemaximumimagebuffersize(inunitsofwords).„Specificationinthecasedataisnotcompressed.•Compressionparameters1and2areignored.NOTE:Withoutcompression,dataisrawrasterizeddata,notequalto“nocompression”ofGrPDK.„Specificationinthecasedataiscompressed.•Thevaluesandmeaningsofthecompressionmethodareseparatelydefined.•Themeaningofthecompressionparameters1and2aredifferentdependingonthecompressionmethods,andtheyareseparatelydefined.Forexample,insomecompressionmethod,compressionparameters1and2canbeusedasthedatasizeaftercompressionandtheoffsetaftercompression,respectively.Fortheoffsetaftercompression,theoffsetforthewritestartpositioninthevirtualimagebuffer,whereacompressedimageisstored,issetinunitsofbytes.Forthedatasizeaftercompression,setthedatasizeofthecompressedimageinunitsofbytes.Compresseddatamustbeequaltoorsmallerthanthemax.imagebuffersizewhendecompressed.Inthecasecompresseddataissenttotheprinterwithoutdecompression,itmustbeequaltoorsmallerthanthemax.imagebuffersizeafterdecompressed.Thiscommandissupposedtobepassedtotheprinterbywayofseveralcomponentsintheprintsub-system.Therefore,itispossibletosendcompresseddatatoacertainstage,decompressitontheway,andsendthedecompresseddatatotheprinterafterthat.Itisalsopossibletosendcompresseddatatotheprinteriftheprintercandecompressit.Ifanyofthecomponentsintheprintsub-systemthatreceivesthiscommandcandecompressreceiveddata,thatcomponentisallowedtodoitandsendthedecompresseddatatothenextcomponent.Inthatcase,theCMbitofthecompressionmodeinthiscommandneedstobecleared.Acomponentthatcannotdecompressthereceiveddatapassesittothenextcomponent.Ifthedatacannotbesenttothenextcomponentforsomereason,an“Unsupportedcompressionmethod”errorresults.Inthecasetheuppercomponentthatreceivesthiserrorissupportingthecompressionmethod,theuppercomponentisallowedtodecompressthedataandsenditagain.B-SX600CommandManual-7-BitmapformatWhenimagedataissenttotheprinterwithoutbeingcompressed,thefollowingimagewillbecomprisedofthebitmapstructurebelow.FFFFFFFFF0000000CC000000C3000000COCO0000CO300000CO0C0000CO030000CO00C000CO003000CO000C00CO000300CO0000C0CO000030CO00000CCO00000387654321876543218765432187654321FFFFFFFFF0000000CC000000C3000000C0C00000C0300000C00C00000C0300000C00C000C0003000C0000C00C0000300C00000C0C0000030C000000CC0000003NOTE:Unless“0”issetfortheoffsetbeforecompressionandtheimagesizeissetforthedatasizebeforecompression,therestoftheimagewillremainbecauseitisnotrewritten.B-SX600CommandManual-8-3.CALIBRATIONREQUEST/RESPONSECOMMANDFormat●RequestcommandByte/bit765432100‘/’1Header‘T’2‘C’3Commandidentifier‘B’●ResponsecommandByte/bit76543210Remarks0to3SMONIDReferto/TJI.4to7DOCIDReferto/TJI.8‘/’9Header‘R’10‘C’11Commandidentifier‘B’1213Sensormarkdetectionmethodmeasured.sensor_typeReferto/TPI.1415Actuallymeasuredmediapitch[line]measured.measured_length1617Actuallymeasuredmediapitchexcludingsensormark[line]measured.lead_cnt18Thresholdforleadingenddetection(unitofA/Dconversion)measured.vtl19Thresholdfortrailingenddetection(unitofA/Dconversion)measured.vthFunctionMeasuresthemediapitchinaccordancewiththeprogrammedpageinformation,andreturnstheresult.Explanation•Forthesensormarkdetectionmethod,thevaluesetinthePageInformationSetCommandisreturned.•Unlikethe/TPIcommand,thethresholdvalueisalwaysexpressedinunitsofA/Dconversion.•When8thto11thbytes(countedfrom“0”)readfromtheprinterare“/RCB”,thisisjudgedasaresponsetotherequest.B-SX600CommandManual-9-4.PRINTEROPERATIONSETCOMMANDFormatByte/bit76543210Remarks0‘/’1Header‘T’2‘A’3Commandidentifier‘I’45Pageoffset[line]action.page_offset6TableDuty7HCReserved00MPHEReservedDTPaction.print_method8Printspeedaction.print_speed9Feedspeedaction.feed_speed1000h11Printtoneaction.print_density1200h13Reserved(sortfeed/printlength)00haction.sep_length1415Tear-offdelaytimeaction.ondemand_time1600h17Cutmethod00haction.cut_method1800h19Reserved(verificationmethod)00haction.vfy_method2000h21Reserved(verificationposition)00haction.vfy_position2223Optionusage00haction.option_usageFunctionSetstheprinteroperationparameters.Explanation•WhenMP(MultiPulse)bitis“1”,theupper8bitsrepresent“Table”and“Duty”.•WhenMP(MultiPulse)bitis“0”,theupper8bitsrepresent“MaterialTable”.•WhentheMPis“1”,theHCmustbesetto“0”.HC:HeatHistoryControlMaterialTable:Mediamaterialnumberregisteredtotheprinter1514131211109876543210TableDutyH=0Reserved00MP=1HEReservedDTPMaterialTableHCReserved00MP=0HEReservedDTP•DTP:Whenthebit0issetto“1”,DTP(DirectThermalPrint)isspecified,andwhen“0”,TTP(ThermalTransferPrint)isspecified,respectively.B-SX600CommandManual-10-•MP(MultiPulse)andHE(HighEnergy)specifythemethodtoapplytheenergytotheprinthead.FortheMultiPulsemethod,theenergytableisspecifiedby“Table”,andstrobedutyisspecifiedby“Duty”,respectively.MPHEPrintenergyapplymethod00Singlepulse,Normalenergy01Singlepulse,Highenergy1XMultipulse•Setthetear-offdelaytimeinunitsofmsec.•Optionusage1514131211109876543210ReservedTAPRsvSTKReserved•ConversionfrommetrictoinchfortheprintspeedandfeedspeedIps=(n+1)x0.25•The“TAP”and“STK”arenotapplicabletotheB-SX600.B-SX600CommandManual-11-5.PAGEINFORMATIONSETCOMMANDFormatByte/bit76543210Remarks0‘/’1Header‘T’2‘P’3Commandidentifier‘I’45Sensormarkdetectionmethodmeasured.sensor_type67Mediapitch[line]measured.measured_length89Pagelength[line]measured.lead_cnt10SensorlevelLmeasured.vtl11SensorLevelHmeasured.vthMediapitch:Lengthofmediafromasensormarktothenextsensormark.Sensormarkincludesgap,blackmark,notch,andcenterhole.Pagelength:Lengthequalstothemediapitchminusthesensormarklength.FunctionSetspageinformation.Explanation•Sensormarkdetectionmethodisspecifiedbythefollowingbits:1514131211109876543210ReservedPRP0001CNEA0MATLRsvSensorB-SX600CommandManual-12-•PRP(Pre-print),CN(Count),MA(Manual),TL(Threshold/Level)bitsspecifyasensormarkdetectionmethodwhichisappropriateforthepurposeofuse.SensormarkdetectionmethodPRPCNEAMATLMediafeedmodeUsageXX1XXXFixedlengthfeedmodeContinuouspaperXX01XXEasyfeedmodeDie-cutlabelsXX00XXStrictfeedmodeDie-cutlabels,notchedlabels•Sensorbitsspecifythesensortypetobeused.SensorSensorMedia00TransmissivesensorDie-cutlabel,Notchedtagpaper01ReflectivesensorMediawithblackmarks10TransmissivemediacentersensorDie-cutlabel,Tagpaperwithcenterholes•Setthemediapitchandpagelengthinunitsoflines,anditmustfallwithintherangefromtheminimummediapitchtothemaximum.•SensorlevelsLandHshouldbespecifiedinaccordancewithmediafeedmode.MediafeedmodeSensorlevelLSensorlevelHFixedlengthfeedmode(Countmode)InvalidEasyfeedmodeandStrictfeedmode(Levelmode)Thresholdfortheleadingedgedetection[UnitofA/Dconversion]Thresholdforthetrailingedgedetection[unitofA/Dconversion]B-SX600CommandManual-13-6.HOMEPOSITIONSETCOMMANDFormatByte/bit76543210Remarks0‘/’1Header‘T’2‘A’3Commandidentifier‘T’45ThenumberofpagestofeedEquivalenttotheargument“pages”67OperationmodeEquivalenttotheargument“mode”FunctionFeedsthemediatotheprintstartpositionbasedontheparametersettingsinthePageInformationSetCommandandPrinterOperationSetCommand.Explanation•Operationmodeisspecifiedbythefollowingbits:1514131211109876543210NF00Reserved0PBReservedOndmndBKCT•Eachbithasthefollowingmeaning.BitValueOperation0FeedNF1Nofeed0NoreversefeedtothehomepositionbeforeprintingPB1Reversefeedfromthepeel-offpositiontothehomepositionbeforeprinting0,0Notear-offoperation0,1Feedtothetear-offposition1,0FeedtothecutpositionOndmnd1,1Feedtothepeel-offposition0NoreversefeedBK1Reversefeed0NocutoperationCT1CutoperationAfterfeedingthemediatothehomeposition,acommandtocutoffthepreviouspageiscleared.B-SX600CommandManual-14-7.PRINTSTARTCOMMANDFormatByte/bit76543210Remarks0‘/’1Header‘T’2‘S’3Commandidentifier‘P’45OperationmodeEquivalenttotheargument“mode”600hto00h9Reserved00h1000h11OperationafterprintingEquivalenttotheargument“more”Explanation•Operationmodeisspecifiedbythefollowingbits:1514131211109876543210ActionReservedReservedABCT0000•TheprinteroperatesaccordingtotheActionbits.WhentheCTbitis“1”,thetrailingendoftheprintedmediaiscut.ActionOperation1Print2Feedorcut3Reversefeed6Changeofcutinstruction7JobcompletionactionOthersUndefined•Ifacutoperationhasbeenspecified,theboundaryoftheapplicablepagewillbecutwhenitreachesthecutterposition.•Sincetheimagebufferisnotclearedafteraprintingiscompleted,itispossibletoreprintthesameprintdatawithoutsendingthedataagain.•WhentheABbitis“1”,theprinterfeedsthepagetobeprintedinthereversedirectionfromthetear-offpositionsothatthesensorcandetectthesensormarkagain,thenfeedsittothehomeposition.Tousethisfunction,“Nocutoperation”and“Notear-offoperation”mustbespecified.•Theoperationafterprintingdiffersdependingonthemodels.B-SX600CommandManual-15-•Theoperationafterprintingisspecifiedbythefollowingbits:15141312111098765432100ReservedReservedNPOndmndBK0•TheoperationafterprintingisdeterminedbytheOndemandandBKbits.BitValueOperation0,0Stopatthenormalposition0,1Feedtothetear-offposition1,0FeedtothecutpositionOndmnd1,1Feedtothepeel-offposition0CutwhileprintingNP1Nocutwhileprinting0NoreversefeedBK1ReversefeedB-SX600CommandManual-16-8.STATUSREQUEST/RESPONSECOMMANDFormat●RequestcommandByte/bit765432100‘/’1Header‘T’2‘E’3Commandidentifier‘S’●ResponsecommandByte/bit76543210Remarks0to3SMONIDReferto/TJI.4to7DOCIDReferto/TJI.8‘/’9Header‘R’10‘E’11Commandidentifier‘S’1213ErrorEquivalenttothereturnvalue“get_pe_errno”1415EndofprintEquivalenttothereturnvalue“chk_print_completed”FunctionSendstheprinterstatusandprintjobstatustothehost.Explanation•Errorsandprintjobstatusestobedetectedbytheprinterareasfollows:•When8thto11thbytes(countedfrom“0”)readfromtheprinterare“/RES”,thisisjudgedasaresponsetotherequest.ErrorcodeMeaningRemarks0Normal1Paperjam2Paperend3Ribbonend4Printheadisoverheating.5Sidecoverisopened.6Printheadunitisopened.7Calibrationfailed.8Printheadbrokenelementisdetected.B-SX600CommandManual-17-ErrorcodeMeaningRemarks9Ribbonhasbeenloadedwhilethedirectthermalprintingmethodisselected.11Printheaduninstalled/improperlyinstalled12Medianearend13Frontcoverisopened14Ribbonbreak15Ribbonnearend16Ribbonfeederror33Paperjaminthepeel-offunit41Paperjaminthecutterunit71Printerisinoperation73Pageinformationunspecified74Operationinformationunspecified75Imageinformationunspecified77Thecoverisopened.79Pause82Printtablenotsupported85SendbufferoverflowUsedbytheprintersideonly.87Checkingtheprinthead129Removethelabel.180Waitingforacommandfromanexternaldevice.EndofprintMeaning0Notcompleted.1Completed.B-SX600CommandManual-18-9.FINEADJUSTMENTCOMMANDFormatByte/bit76543210Remarks0‘/’1Header‘T’2‘S’3Commandidentifier‘A’45FineadjustmentidentifierEquivalenttotheargument“id”67FineadjustmentvalueEquivalenttotheargument“value”FunctionSetsafineadjustmentvalue.Explanation•Fineadjustmentidentifierandthevaluearespecifiedbythefollowingbits:ValueFineadjustment1Distancebetweenthereflectivesensorandtheprinthead2Distancebetweenthetransmissivesensorandtheprinthead3Distancebetweentheprintheadandthecutter5Distancebetweentheprintheadandthetear-offposition6Distancebetweentheprintheadandthepeel-offposition7Printstartposition8Distancebetweenthetransmissivemediacentersensorandtheprinthead•Theidentifiermustbequotedfromthe“moduleif.h”oftheprinterfirmware.#defineADJ_RS2HD1#defineADJ_TS2HD2#defineADJ_HD2CT3#defineADJ_CS2CT4#defineADJ_HD2OD5#defineADJ_HD2PL6#defineADJ_1STDOT7#defineADJ_CH2HD8#defineADJ_HD2VFY9#defineADJ_VFRHPOS10#defineADJ_RATIO211#defineADJ_RATIO312#defineADJ_APPC13#defineADJ_JAMERR21#defineADJ_RSTEPS22#defineIGN_PPREND23#defineADJ_HDMOVE24#defineADJ_VFYTHRESH25#defineADJ_AQL26B-SX600CommandManual-19-10.FINEADJUSTMENTVALUEREQUEST/RESPONSECOMMANDFormat●RequestcommandByte/bit76543210Remarks0‘/’1Header‘T’2‘G’3Commandidentifier‘A’4Equivalenttotheargument“id”5Fineadjustmentidentifier●ResponsecommandByte/bit76543210Remarks0To3SMONIDReferto/TJI.4To7DOCIDReferto/TJI.8‘/’9Header‘R’10‘G’11Commandidentifier‘A’1213FineadjustmentidentifierEquivalenttotheargument“id”1415FineadjustmentvalueEquivalenttothereturnvalueFunctionObtainsthefineadjustmentvaluescurrentlysettotheprinter.Forthefineadjustmentidentifierandthevalue,refertotheFineAdjustmentCommand.Explanation•When8thto11thbytes(countedfrom“0”)readfromtheprinterare“/RGA”,thisisjudgedasaresponsetotherequest.B-SX600CommandManual-20-11.SENSORSTATUSREQUEST/RESPONSECOMMANDFormat●RequestcommandByte/bit765432100‘/’1Header‘T’2‘S’3Commandidentifier‘B’●ResponsecommandByte/bit76543210Remarks0to3SMONIDReferto/TJI.4to7DOCIDReferto/TJI.8‘/’9Header‘R’10‘S’11Commandidentifier‘B’1213ResultEquivalenttothereturnvalue.FunctionObtainsthestatusofeachsensor.Explanation•Theresultisspecifiedbythefollowingbits.1514131211109876543210ReservedFCSCHUHLCOCLCRReservedPNPLREPE•Theresponseindicatesthereal-timeA/D-convertedstatusofthesensorsatthetimethiscommandissenttotheprinter.•TheCObitindicatesanORvalueofthestatusoftheallcovers(FC,SC,HU,andHL).B-SX600CommandManual-21-•The“leftend”and“rightend”indicatedbytheCLandCRbitsarethepositionsasviewedfromtheprinterbackside.BitValueOperation1Thefrontcoverisopened.FC0Thefrontcoverisclosed.1Thesidecoverisopened.SC0Thesidecoverisclosed.1Theprintheadunitisopened.HU0Theprintheadunitisclosed.1Theprintheadunitisunlocked.HL0Theprintheadunitislocked.1AnyoftheFC,SC,HU,andHLisopened.CO0AlloftheFC,SC,HU,andHLareclosed.1Thedisccutterispositionedattheleftend,asviewedfromtheprinterback.CL0Thedisccutterisnotpositionedattheleftend,asviewedfromtheprinterback.1Thedisccutterispositionedattherightend,asviewedfromtheprinterback.CR0Thedisccutterisnotpositionedattherightend,asviewedfromtheprinterback.1PapernearendPN0Sufficientpaper1Printedlabelhasbeenremoved.PL0Printedlabelhasnotbeenremoved.1NoribbonRE0Ribbonhasbeenloaded.1MediaendPE0Mediahasbeenloaded.•When8thto11thbytes(countedfrom“0”)readfromtheprinterare“/RSB”,thisisjudgedasaresponsetotherequest.NOTE:Whentheopenedcoverisclosed,thispossiblymeansareplacementofthepaperorribbonhasbeendone.Whenthehostdetectsacoverclose,itisdesiredthattheprinterfeedsthepapertothehomeposition.B-SX600CommandManual-22-12.ANALOGSENSORSTATUSREQUEST/RESPONSECOMMANDFormat●RequestcommandByte/bit765432100‘/’1Header‘T’2‘S’3Commandidentifier‘L’45Sensoridentifier●ResponsecommandByte/bit76543210Remarks0To3SMONIDReferto/TJI.4To7DOCIDReferto/TJI.8‘/’9Header‘R’10‘S’11Commandidentifier‘L’1213Sensoridentifier1415ResultEquivalenttothereturnvalue.FunctionObtainsthestatusofeachanalogsensor.Explanation•Theresponseindicatesthereal-timeA/D-convertedstatusofthesensorspecifiedbythesensoridentifieratthetimethiscommandissenttotheprinter.•Thesensoridentifierisspecifiedbythefollowingbits.SensoridentifierDescriptionUnitofmeasure0PrintheadthermistorºC(±)1TransmissivemediaedgesensormV2ReflectivesensormV3AmbienttemperaturethermistorºC(±)4Reserved5Reserved6TransmissivemediacentersensormV7Reserved8ReservedB-SX600CommandManual-23-•When8thto11thbytes(countedfrom“0”)readfromtheprinterare“/RSL”,thisisjudgedasaresponsetotherequest.B-SX600CommandManual-24-13.PRINTERVERSIONREQUEST/RESPONSECOMMANDFormat●RequestcommandByte/bit765432100‘/’1Header‘T’2‘V’3Commandidentifier‘R’●ResponsecommandByte/bit76543210Remarks0to3SMONIDReferto/TJI.4to7DOCIDReferto/TJI.8‘/’9Header‘R’10‘V’11Commandidentifier‘R’1213VersionEquivalenttothereturnvalue.FunctionObtainstheprinterversion.Explanation•Theprinterversiontobereturnedis2-bytebinarydata,so“0x1234”means“V12.34.•When8thto11thbytes(countedfrom“0”)readfromtheprinterare“/RVR”,thisisjudgedasaresponsetotherequest.B-SX600CommandManual-25-14.SERVICEINFORMATIONREQUEST/RESPONSECOMMANDFormat●RequestcommandByte/bit765432100‘/’1Header‘T’2‘G’3Commandidentifier‘S’●ResponsecommandByte/bit76543210Remarks0To3SMONIDReferto/TJI.4To7DOCIDReferto/TJI.8‘/’9Header‘R’10‘G’11Commandidentifier‘S’12To15Operatingtime(sec.)Service_total.pwon_time16to19Feedamount(mm)Service_total.feed_length20to23TotalprintdistanceService_total.print_lines24To27Cutcount(times)Service_total.num_of_cutFunctionObtainsthecurrentserviceinformation.Explanation•When8thto11thbytes(countedfrom“0”)readfromtheprinterare“/RGS”,thisisjudgedasaresponsetotherequest.B-SX600CommandManual-26-15.SERVICEINFORMATIONSETCOMMANDFormatByte/bit76543210Remarks0‘/’1Header‘T’2‘S’3Commandidentifier‘S’4to7Operatingtime(sec.)Service_total.pwon_time8to11Feedamount(mm)Service_total.feed_length12to15TotalprintingdistanceService_total.print_lines16to19Cutcount(times)Service_total.num_of_cutFunctionSetstheserviceinformation.B-SX600CommandManual-27-16.PRINTHEADTESTREQUEST/RESPONSECOMMANDFormat●RequestcommandByte/bit765432100‘/’1Header‘T’2‘T’3Commandidentifier‘H’45Thenumberofprintabledots(n)67BlockdesignationEquivalenttotheargument“block”.8to11Testresultsize●ResponsecommandByte/bit76543210Remarks0To3SMONIDReferto/TJI.4to7DOCIDReferto/TJI.8‘/’9Header‘R’10‘T’11Commandidentifier‘H’1213TestedblockEquivalenttothevaluereturnedtotheargument“resultp”.1415Averagedotresistance(ohm)Equivalentto“TRIC_HR_HEADER.avg”.1617Max.dotresistance(ohm)Equivalentto“TRIC_HR_HEADER.max”.1819Min.dotresistance(ohm)Equivalentto“TRIC_HR_HEADER.min”.2021Leakcurrent(µA)Equivalentto“TRIC_HR_HEADER.leak”.22to2xn+21Resistance/dot(ohm)Equivalentto“TRIC_HR_HEADER.dot_res[]”.2xn+22toTestresultbydotsEquivalentto“TRIC_HR_HEADER.(dodt_map[]).FunctionConductsaprintheadtestaccordingtothepageinformation.B-SX600CommandManual-28-Explanation•Forthenumberofprintabledots,thenumberofprintabledotsamongtheprintheadisset.(Note2)•Theprintheadisdividedinto16blocks,andtheblockstobetestedarespecifieddotbydot.TheMSBiscorrespondingtotheleftblock,andtheLSBiscorrespondingtotherightblock,respectively.Thedotoftheblocktobetestedissetto1.•Forthetestresultsize,setthesize(byte)oftestresultdatatobereceived.Thismustbeamultipleof2.•Thedatasizerequiredtoreceivetheallprintheadtestresultsisobtainedby:sizeof(TRIC_TH_ANS)//fixedlengthpart(14bytes)+sizeof(UWORD)*n//Resistanceperdot+sizeof(UWORD)*WORDS_FROM_DOTS(n)//Testresultbydots•Thetestedblockinaresponseisalsorepresentedbydots,too.•Theresistanceofeachdotisreturnedinunitsof2bytes,fromtheleft-mostdot.•Fortheresultbitmapforeachdot,theMSBoftheleadbyterepresentstheleftendoftheprinthead.Thebitcorrespondingtoanormaldotissetto1.•When8thto11thbytes(countedfrom“0”)readfromtheprinterare“/RTH”,thisisjudgedasaresponsetotherequest.NOTES:1.Thenumberofprintabledotsoftheprinterneedstobereturnedinresponsetoaprintheadtestrequestcommandsothattheprintsubsystemcomponents(languagemonitor,portmonitor,etc.)otherthantheprinterdriverdonotdependontheprinter.2.Thisdoesnotmeanthatunusabledotsareuncounted.Forexample,whentheprinterisprovidedwitha4-inchwideprintheadofwhichmax.printwidthis3.5inches,thenumberofprintabledotswillbethevalueequivalentto3.5-inchwideprinthead.B-SX600CommandManual-29-17.CUT/PEEL-OFFENABLEFLAGSETCOMMANDFormatByte/bit765432100‘/’1Header‘T’2‘E’3Commandidentifier‘C’45Option67Flag189Flag2FunctionObtainstheinformationwhetherthecutterorpeel-offunitisenabledornot.Explanation•TheOptionisspecifiedbythefollowingvalue0:Nooption1:Peel-offunit2:Cutterunit•Flag1iseffectiveonlyfortheprinterwithacutterorpeel-offunit.Thevalueandthemeaningareasfollows.FlagPeel-offmodelCuttermodel0Disabled.Disabled.1Enabled.Enabled.•Flag2iseffectiveonlywhenFlag1issetto1.Thefollowingtableshowsthevalueandthemeaning.FlagPeel-offmodelCuttermodel0Theprinterdoesnotfeedanextlabeltotheprintstartpositionafterapeel-offoperation.Notused.1Theprinterfeedsanextlabeltotheprintstartpositionafterapeel-offoperation.Notused.B-SX600CommandManual-30-18.PAGENUMBERSETCOMMANDFormatByte/bit765432100‘/’1Header‘T’2‘P’3Commandidentifier‘N’45PagenumberFunctionSetsthepagenumbers.Thiscommandisusedonlybetweentheprinterdriverandthelanguagemonitor,andnotsenttotheportmonitor.B-SX600CommandManual-31-19.DRIVERINFORMATIONSETCOMMANDFormatByte/bit765432100‘/’1Header‘T’2‘D’3Commandidentifier‘I’45Datasize(n)67Datatype8ton+7Data(nbytes)FunctionThiscommandisissuedbytheprinterdrivertonotifythelanguagemonitoroftheprinterdriverinformationincludingthewindowhandle.Explanation•Thiscommandisusedonlybetweentheprinterdriverandthelanguagemonitor,andnotsenttotheportmonitor.•Tomeetthefutureincreaseofthedatavolume,thedatasizeanddatatypeareprovided.DatasizeDatasizeDataRemarks04Theupperwordis0.Thelowerwordisthewindowhandleoftheprinterdriver(orapplicationprogram)Thelanguagemonitorchecksthiscommandforeverydocument.Whenthiscommandisnotissued,thelanguagemonitorsendsaresponseviatheReadPort,notviathestatusmonitor.12Model(installedoption)ID0:Standard(B-SX600-HS11/HS12-QM-R)1:Peel-off(B-SX600-HH11/HH12-QM-R)2:Cutter(B-SX600-HC11/HC12-QM-R)224Timeoutvalue(msec.)4byteeachx61.ReadIntervalTimeout2.ReadTotalTimeoutMultiplier3.ReadTotalTimeoutConstant4.WriteTotalTimeoutMultiplier5.WriteTotalTimeoutContant6.WriteTimeOutIftheportmonitordoesnotrespondtothiscommandwithinthespecifiedtimeout,thelanguagemonitorstopsobtainingthestatusandproceedstothenexttask.B-SX600CommandManual-32-DatasizeDatasizeDataRemarks34Statusgettingcycle(msec.)Whenthisvalueis0,thelanguagemonitordoesnotobtainastatus.Whenthisvalueisotherthan0,thelanguagemonitorobtainsastatusataspecifiedcycle.48SMONID,DOCIDThefirst4bytes:UniquenumberissuedbytheSMONIDstatusmonitorThelast4bytes:UniquenumbertheDOCIDdriverissuesforeverydocument54Whetherthelanguagemonitormessageboxisdisplayedornot.1:Displayed.0:Notdisplayed.6VariableComputernamewhichsentaprintinstructionUsedtodisplayanerrormessageboxontheclient.Thesizeisvariable.74Whetherthesessionmanagementcommandissentornot.1:Sent.0:Notsent.84Whetherasynchronousprintingisperformedornot.1:Yes0:No9VariableUsernamethatsentaprintinstructionUsedtodisplayanerrormessageboxontheclientsession.Thesizeisvariable.B-SX600CommandManual-33-20.DOCUMENTINFORMATIONSETCOMMANDFormatByte/bit765432100‘/’1Header‘T’2‘J’3Commandidentifier‘I’45Datasize(n)67Datatype8ton+7Data(nbytes)FunctionThiscommandisissuedbythelanguagemonitortonotifytheprinteroftheprintjob(document)information.Explanation•Tomeetthefutureincreaseofthedatavolume,thedatasizeanddatatypeareprovided.DatatypeDatasizeDataRemarks34WhethertoobtainastatusandaresponseOtherthan0:Yes0:No48SMONID,DOCIDThefirst4bytes:UniquenumberissuedbytheSMONIDstatusmonitor.Thelast4bytes:UniquenumbertheDOCIDdriverissuesforeverydocument•Whenthedatatypereceivedfromthe/TJIis4,theprinterclearsthepagecounterintheprinter.•MorethanoneType4dataofthe/TJImustnotbesentinasamedocument.B-SX600CommandManual-34-21.SPECIALDATAREQUEST/RESPONSECOMMANDFormat●RequestcommandByte/bit765432100‘/’1Header‘T’2‘S’3Commandidentifier‘D’4to7DataID8to11Max.sizeofaresponse12to15Datasize(n)1616+n-1Data●ResponsecommandByte/bit76543210Remarks0to3SMONIDReferto/TJI.4to7DOCIDReferto/TJI.8‘/’9Header‘R’10‘S’11Commandidentifier‘D’12to15DataID16to19Transmissionresult20to23Datasize(n)2424+n-1DataFunctionObtainsanyspecificinformation.B-SX600CommandManual-35-Explanation•Thecontentsofspecialdatacanbedeterminedbetweenthesenderandreceiver,andbasicallythedataisnotdisclosed.•Ifthedatadoesnotmeetthespecification,itisdiscarded.•Topreventchangesofdatabymalicioususers,anysecurityfeatures,suchasauthenticationshouldbeincludedinthedata.(Becausetheprinterfirmwareistransmitted.)•DataIDIDDatacontents0Printerfirmwareimage**:Theambiguousexpression,“printerfirmware”,enablestheprintertousethedatahoweveritlikes.•Max.sizeofaresponseIfthesizeis0,theprintermustnotreturnaresponse.Ifotherthan0,theprintermustreturnaresponsewithinthespecifiednumberofbytes,includingatleasttheheader.•Eveniftheprinterhasaresponseexceedingthemax.sizeofaresponse,itmustsendtheresponsewithinthespecifiedsizeanddoesnotneedtonotifythehost.Thisisbecausethesizeofaresponseisspecifiedasaformatandthehostshouldknowthat.Inthecaseofavariablelengthresponse,itcanincludetheinformationthatindicatesthedatasize.NOTE:DonotincreasedataIDwithoutcarefulconsideration.B-SX600CommandManual-36-„STATUSInadditiontoaresponsetoacommand,theprintersendsastatusorinformationtothehostinthecaseaneventoccursintheprinter.ASYNCHRONOUSSTATUSCOMMANDFormatByte/bitRemarks0123SMONID4567DOCIDReferto/TJI.89Error/PrintcompletionError:Lower15bitsPrintcompletion:Highest1bitThevalueisequalto“/RES”.10111213TotalnumberofpagesExplanation•Statusisqueuedeachtimeaneventoccurs.•Statuswillchangeaccordingtotheeventsoccurringasynchronously.•Astatussizeisfixedto14bytes.•Astatusindicatestheprintjobprogress(thenumberofprintedpages)aswellasanerror.•Thelengthofaresponseisvariable,butitcanbefoundbyanalyzingthepartthatfollowstheheader.•Aresponseisqueued.•Itiseasytojudgewhetherastatusoraresponse.•Astatusisgeneratedeachtimeanerroroccursortheprintercompletesprintingapage.•Whennostatusorresponseremainsinthesendbuffer,nodatawillbereturnedinresponsetothestatusread.Inthiscase,ReadPortoftheportmonitorseemstoreturnasuccessfulreading,notanerror.•When8thand9thbytes(countedfrom“0”)readfromtheprinterarenot“/R”,thisisjudgedasastatus,notaresponse. COMMANDLIST 1.IMAGEDATASETCOMMAND 2.PRINTDATASENDCOMMAND 3.CALIBRATIONREQUEST/RESPONSECOMMAND 4.PRINTEROPERATIONSETCOMMAND 5.PAGEINFORMATIONSETCOMMAND 6.HOMEPOSITIONSETCOMMAND 7.PRINTSTARTCOMMAND 8.STATUSREQUEST/RESPONSECOMMAND 9.FINEADJUSTMENTCOMMAND 10.FINEADJUSTMENTVALUEREQUEST/RESPONSECOMMAND 11.SENSORSTATUSREQUEST/RESPONSECOMMAND 12.ANALOGSENSORSTATUSREQUEST/RESPONSECOMMAND 13.PRINTERVERSIONREQUEST/RESPONSECOMMAND 14.SERVICEINFORMATIONREQUEST/RESPONSECOMMAND 15.SERVICEINFORMATIONSETCOMMAND 16.PRINTHEADTESTREQUEST/RESPONSECOMMAND 17.CUT/PEEL-OFFENABLEFLAGSETCOMMAND 18.PAGENUMBERSETCOMMAND 19.DRIVERINFORMATIONSETCOMMAND 20.DOCUMENTINFORMATIONSETCOMMAND 21.SPECIALDATAREQUEST/RESPONSECOMMAND STATUS ASYNCHRONOUSSTATUSCOMMAND
本文档为【TEC B-SX600 指令集 EN 东芝条码打印机编程手册】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: 免费 已有0 人下载
最新资料
资料动态
专题动态
个人认证用户
xxj7584
暂无简介~
格式:pdf
大小:242KB
软件:PDF阅读器
页数:0
分类:
上传时间:2020-07-08
浏览量:32