Chapter 4: CommunicationCommunication OverviewIn order for a receipt to be printed, a program must be in place that translates the datafrom the host computer into a language that the printer can understand. This programmust tell the printer exactly how to print each character. This chapter describes how tocreate such a program or modify an existing one.InterfaceFor the printer to communicate with the host, a communication link must be set up.The 7199 Model supports the industry standard USB communication interface. Thisinterface has a protocol associated with it that the host computer must understand andadhere. The printer also supports RS–232C communications.Only when the interface parameters are matched and the proper protocol is used willthe host and the printer be able to communicate.The 7199 Ethernet Model supports the Ethernet communication interface.Sending CommandsOnce the communication link is established, commands can be sent to the printer. Thissection describes how to send commands to the printer using DOS and BASIC. Thissection does not take into account the necessary protocol, but is meant as a generalintroduction to how the printer functions.Using BASIC to Send CommandsIn BASIC, printer commands are sent as a string of characters preceded by the LPRINTcommand.Example: LPRINT CHR$(&H0A)This sends the hexadecimal number 0A to the printer, which causes the printer to printthe contents of its print buffer. Previously sent commands tell the printer exactly howthis data should appear on the paper.Example: LPRINT CHR$(&H12); "ABC"; CHR$(&H0A)This sends the Hex numbers 12 41 42 43 0A to the printer. This causes the printer to setitself to double wide mode (12), load the print buffer with “ABC” (41 42 43), andfinally, print (0A). The communication link that the BASIC program outputs to must bematched to that of the printer.