7197 Owner’s Manual Chapter 5: CommunicationMarch 200261Using BASIC to Send CommandsIn BASIC, printer commands are sent as a string of characters preceded by the LPRINTcommand. For example,LPRINT CHR$(&H0A)sends the hexadecimal number 0A to the printer, which causes the printer to print thecontents of its print buffer. Previously sent commands tell the printer exactly how this datashould 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 todouble 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 tothat of the printer.RS-232C InterfaceThe RS-232C interface uses either XON/XOFF or DTR/DSR protocol. For XON/XOFF, aparticular character is sent back and forth between the host and the printer to regulate thecommunication. For DTR/DSR, changes in the DTR/DSR signal coordinate the data flow.The RS-232C version of the 7197 offers the standard options which are selectable in theDiagnostic mode. See “Diagnostics: Communications Interface Settings” later in this book.Print Speed and TimingThe fast speed of the printer requires the application to send data to the printer at least asfast as it is printed. This application must also allow receipt lines to be buffered ahead atthe printer, so the printer can print each line immediately after the preceding line, withoutstopping to wait for more data. Ideally, the application will send all the data for an entirereceipt without pausing between characters or lines transmitted.If the application sends data at 9600 baud and pauses between lines for as little as 50milliseconds, the printer will never be able to print at full speed. But, if the applicationsends data at 19.2 K baud and does not pause between lines, the printer will be able toprint at its full speed of 1020 lines/minute.The table shows that with a pause of 50 milliseconds after each line, the transmit timeequals or exceeds the print time, slowing down the printer, regardless of the baud rate.Char./Line Lines/Receipt Transmit Time: (9600 Baud) Transmit Time: (19.2 K Baud) Print Time20 20 1.4 Seconds 1.2 Seconds 1.2 Seconds20 40 2.8 Seconds 2.4 Seconds 2.4 Seconds44 20 1.88 Seconds 1.44 Seconds 1.2 Seconds44 40 3.76 Seconds 2.88 Seconds 2.4 SecondsThe next table shows that with no delay between lines, the transmit time is much less thanthe print time, allowing the printer to print at full speed.Char./Line Lines/Receipt Transmit Time: (9600 Baud) Transmit Time: (19.2 K Baud) Print Time20 20 0.4 Seconds 0.2 Seconds 1.2 Seconds20 40 0.8 Seconds 0.4 Seconds 2.4 Seconds44 20 0.88 Seconds 0.44 Seconds 1.2 Seconds44 40 1.76 Seconds 0.88 Seconds 2.4 Seconds