Using basic to send commands, Rs-232c interface, Rs-232c interface protocols – Unisys E-@CTION EFP9800 User Manual

Page 82: Using basic to send commands –2, Rs-232c interface –2, Rs-232c interface protocols –2

Advertising
background image

Communication

5–2

3255

4073–002

Exit the COPY mode by typing:

CTRL Z

[Enter]

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
PRINT command. For example,

PRINT#1, CHR$(&H0A)

(where #1 is the file number of a communication line opened by the

OPEN

“COM1:”

command. For more information, see your BASIC documentation.)

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,

PRINT#1, CHR$(&H1b)+CHR$(&H21)+CHR$(&H021); “ABC”;
CHR$(&H0A)

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

RS-232C Interface

The following sections explain the interface protocols and connectors for the
RS-232C interface. For information on the parallel interface and connectors, see
“Parallel Interface” later in this section.

RS-232C Interface Protocols

The RS-232C interface has a protocol associated with it that the host computer
must understand and adhere to.

Only when the interface parameters are matched and the proper protocol is
used will the host computer and the printer be able to communicate.

The RS-232C interface uses either XON/XOFF or DTR/DSR protocol.

Advertising