
Chapter 3: Programming Commands68
Status
Status command introduction
TheA798IIhasthreemethodsofprovidingstatustotheapplication.Thesemethodsarethroughbatchstatuscommands,
realtimestatuscommandsandunsolicitedstatusmode.Anapplicationmayuseoneormoreofthesemethodsto
understand the current status of the printer. A brief description of each of these methods follows.
Batch status commands–Thesecommandsaresenttotheprinterandstoredintheprinter’sbuffer.Oncetheprinterhas
processedallthepreviouscommandsthesecommandsareprocessedandtheproperstatusisreturnedtotheapplication.In
theeventaconditioncausestheprintertogoBUSY,itstopsprocessingcommandsfromtheprinterbuffer.Ifabatchstatus
commandremainedinthebufferduringthisbusycondition,itwouldnotbeprocessed.Infact,nobatchcommandsare
processed while the printer is in this state.
Real-time commands–Thesecommandsaresenttotheprinterbuffer.Periodically,whentheprinterhastime,itscans
theinputbufferlookingforthesecommands.Whenfoundbytheprinter,thesecommandsareprocessedimmediately.
Thisgivestheapplicationtheabilitytoquerytheprinterwhenitisinabusystateinordertocorrectwhateverfaulthas
occurred.
Automatic status back or Unsolicited status mode–Thismechanismallowstheapplicationdevelopertoprogramthe
printertoautomaticallyrespondwithafourbytestatuswhencertainconditionsintheprinterchange.
Pleaseseethesubsequentsectionsforamoredetaileddescriptionofthesestatuscommands.Attheendofthisstatus
commandssectionisapageentitled“Recognizingdatafromtheprinter”.Thisdescribeshowtointerpretwhatcommand
orsetting(inthecaseofunsolicitedstatusmode)triggeredaresponsefromtheprinter.
Batch mode
ForRS-232Cprinters,thesecommandsenabletheprintertocommunicatewiththehostcomputerfollowingtheselected
handshakingprotocol,eitherDTR/DSRorXON/XOFF.Theyarestoredintheprinter’sdatabufferastheyarereceived,
andarehandledbythermwareintheorderinwhichtheyarereceived.
Whenafaultoccurs,theprinterwillgobusyattheRS-232Cinterfaceandnotrespondtoanyofthebatchmodeprinter
statuscommands.Ifthefaultcausingthebusyconditioncanbecleared,suchasbyloadingpaper,orlettingthethermal
printheadcooldown,theprinterwillresumeprocessingthedatainitsreceivebuffer.
Transmit peripheral device status (RS-232C printers only)
ASCII ESC u 0
Hexadecimal 1B 75 0
Decimal 27 117 0
Value of returned byte:
Bit 0 Bit 1
1 = Drawer 1 Closed 1 = Drawer 2 Closed
0 = Drawer 1 Open 0 = Drawer 2 Open
Bits 2–7 are not used.
Transmitscurrentstatusofthecashdrawers.Onebyteissenttothehostcomputer.InDTR/DSRprotocol,theprinterwaits
forDSR=SPACE.Ifadrawerisnotconnected,thestatuswillindicateitisclosed.
Exceptions
UnliketheA793,thathadadedicatedconnectorandresultantdedicatedstatusreportingforeachcashdrawer,theA798II
hasasingleconnectorthatsharesdatareportingfromeithercashdrawer.Wheneithercashdrawerisopen,anopenstatus
isreportedbytheprinter.
Related information
InLEGACYemulation,thiscommandisignored.
Comentarios a estos manuales