M-S Cash Drawer 7193 RS-232C Interface, Using DOS to Send Commands, Using Basic to Send Commands

Page 50

Communication

7193 Owner’s Guide

Using DOS to Send Commands

One way of getting commands to the printer is to send them directly from DOS. For example, the command

COPY CON: COM1:

sets the computer up such that the Hex code corresponding to any key that was pressed would be sent to the communication port COM1 when the COPY mode is exited. If the printer is connected to COM1, then the data will go to the printer.

Exit the COPY mode by typing

CTRL Z

and then pressing the ENTER key. Once the computer knows to direct data from any print command to the proper port, commands can be sent from any software program.

Using BASIC to Send Commands

In BASIC, printer commands are sent as a string of characters preceded by the LPRINT command. For example,

LPRINT CHR$(&H0A)

sends the hexadecimal number 0A to the printer, which causes the printer to print the contents of its print buffer. Previously sent commands tell the printer exactly how this data should appear on the paper. For example,

LPRINT CHR$(&H12); "ABC"; CHR$(&H0A)

sends the Hex numbers 12 41 42 43 0A to the printer. This causes the printer to set itself to double wide mode (12), load the print buffer with “ABC” (41 42 43), and finally, print (0A). Again, the communication link that the BASIC program outputs to must be matched to that of the printer.

RS-232C Interface

The RS-232C interface uses either XON/XOFF or DTR/DSR protocol. For XON/XOFF, a particular character is sent back and forth between the host and the printer to regulate the communication. For DTR/DSR, changes in the DTR/DSR signal coordinate the information flow.

The RS-232C version of the 7193 offers the standard options which are selected with the DIP switches. The switch settings are shown on page 50.

46

May 1996

Image 50
Contents Owners Guide Information to User Quick Reference Who Should Use this Book? How to Use This BookHow to Obtain More Information Contents Solving Problems Appendix B Print Characteristics 107 About the 7193 Printer Communication Interfaces FeaturesModels OptionsThermal Printhead Recommended Suppliers Ordering Paper and SuppliesOrdering Thermal Paper Other Qualified Suppliers Kanzaki Specialty PapersOrdering Cash Drawers Ordering the Power Supply and CablesOrdering the Printer Wall-Mount Kit Cleaning the Printer What Is in the Box? Removing the Packing MaterialRepacking the Printer Choosing a Location Setting Switches Owner’s Guide Attaching the Feet Connecting Cash Drawer Cables Connecting Communication and Power Cables RS-232C ModelsParallel Models Turning On the Printer When to Change the Paper Loading and Changing PaperRemoving the Paper Roll Putting In the Paper Roll Advancing Paper Testing the Printer 3cx39pi Mounting the Printer on a Wall Bracket Mounting the Power Supply on a Wall Holder Solving Problems Operator Panel LightsOperator-Correctable Conditions Correcting ProblemsService-Related Problems Print is Light or Spotty Contacting a Service RepresentativeNo Power to Printer or Power Voltages Incorrect Diagnostics Level 0 DiagnosticsLevel 1 Diagnostics EeromSetting Data Error and Data Buffer options Setting Printhead Resistance Setting Default Lines per Inch Setting Partial Cut Distance Ignoring/Using the Carriage Return Running the Data Scope Mode Enter the Data Scope ModeExit the Data Scope Mode 1BHTesting Receipt Printing Level 2 Diagnostics Level 3 DiagnosticsInterfaces Sending CommandsCommunication Overview RS-232C Interface Using DOS to Send CommandsUsing Basic to Send Commands XON/XOFF Protocol DTR/DSR ProtocolRS-232C Technical Specifications ConnectorsCash Drawer Connectors Switch Settings OFF Parallel Interface Parallel ProtocolParallel Technical Specifications Parallel ConnectorsParallel Printers Parallel Switch Settings Commands Command ListPrinter Function Commands Owner’s Guide Print Characteristics Commands Graphics Commands Printer Status CommandsReal Time Commands Bar Code CommandsLine Feed Command DescriptionsHorizontal Tab Feed n Print Lines Carriage ReturnClear Printer Print Feed n Dot RowsAdd n Extra Dot Rows Generate Tone Full Knife CutPartial Knife Cut Set ColumnSet Character Right-Side Spacing Set Absolute Starting PositionSelect Printer Set Line Spacing to 1/6 InchSet Line Spacing to n Minimum Units Initialize PrinterSet Horizontal Tab Positions Print and Feed n Minimum UnitsSet Relative Starting Position Select Sensors to Stop Printing Enable or Disable Panel SwitchAlign Character Positions Print and Feed n LinesWrite to Non-Volatile Memory Read from Non-Volatile MemoryGenerate Pulse to Open Cash Drawer Rotate Characters Counter-Clockwise Select Double-Wide CharactersSelect Single-Wide Characters Set Print Mode Select Pitch Column WidthSelect Character Set Define User-Defined Character SetCopy Character Set from ROM to RAM Select Character Code TableSet or Cancel Rotated Characters Clockwise Set or Cancel Upside-Down CharactersSummary of Rotated Printing Set Bit Image Mode N1 + 256 x n2 N1 + 256 x n2 Number of Bytes of Data Single-Density Graphics Double-Density GraphicsDefine Downloaded Bit Image Print Downloaded Bit Image Transmit Cash Drawer Status Request Alternate Status Transmit Printer Status First Implementation Rules for Using Real Time Commands Alternate ImplementationMoving Data Through the Buffer Busy Line and Fault Conditions Real Time Status Transmission GS Sequence= Transmit Printer Status = Transmit RS-232C Busy Status Real Time Request to Printer = Transmit Receipt Paper StatusDLE Sequence Clear Printer Command Real Time Printer Status TransmissionRecognizing Data from the Printer Select Height of Bar Code Select Printing Position of HRI CharactersSelect Pitch of HRI Characters Print Bar Code JAN8 EANPrint Code 128 Bar Code Select Width of Bar CodeAppendix a Specifications ReliabilityPower Requirements Environmental ConditionsDimensions and Weight Printing SpecificationsPrint Zones Density of Receipt Print Lines Duty Cycle Restrictions Printing Solid BlocksAppendix B Print Characteristics Appendix B Print Characteristics Owner’s Guide 110 May Index May Index112 Owner’s Guide Owner’s Guide 114 Owner’s Guide Owner’s Guide Axiohm IPB