beautypg.com

Rs-485 serial communications interface 58, Communication format 58, Sending commands and data 58 – Red Lion TSC User Manual

Page 60: Rs-485 serial communications interface

background image

RS-485 SERIAL COMMUNICATIONS INTERFACE

RS-485 communications allows for transmitting and receiving of data over

a single pair of wires. This optional feature can be used for monitoring various

values, resetting output(s), and changing values, all from a remote location.

Typical devices that are connected to a TSC unit are a printer, a terminal, a

programmable controller, or a host computer.

The RS-485 differential (balanced) design has good noise immunity and

allows for communication distances of up to 4000 feet. Up to 32 units can be

connected on a pair of wires and a common. The RS-485 common is isolated

from the controller input signal common to eliminate ground loop problems

associated with the input probe. The unit’s address can be programmed from 0

to 99. An Optional RLC Serial Converter Module (RS-422 to 20 mA current

loop) can be installed to expand the unit’s flexibility.

COMMUNICATION FORMAT

The half-duplex communication operation sends data by switching voltage

levels on the common pair of wires. Data is received by monitoring the levels

and interpreting the codes that were transmitted.

In order for data to be interpreted correctly, there must be identical formats

and baud rates between the communicating devices. The formats available for

the TSC unit are 1 start bit, 7 data bits, No parity or 1 parity bit (odd or even)

and 1 stop bit. The programmable baud rates are; 300, 600, 1200, 2400, 4800,

or 9600 baud.

Before serial communication can take place, the unit must be programmed

to the same baud rate and parity as the connected equipment. In addition, the

loop address number and print options should be known. When used with a

terminal or host computer and only one unit is employed, an address of zero

(0) may be used to eliminate the requirement for the address specifier when

sending a command. If more than one unit is on the line, each unit should be

assigned a different address number.

SENDING COMMANDS AND DATA

When sending commands to a TSC unit, a command string must be

constructed. The command string may consist of command codes, value

identifiers, and numerical data. Below is a list of commands and value

identifiers that are used when communicating with the TSC unit.

COMMAND DESCRIPTION

N (4EH)

Address command; Followed by a one or two digit address number 0-99.

P (50H)

Transmit print options command; Transmits the options selected in the

Program Options (PoPt) section

R (52H)

Reset command; Followed by one of the Value Identifiers (G or H)

T (54H)

Transmit value command; Followed by one of the Value Identifiers (A-M, O, Q).

C (43H)

Control action command; Followed by the Value Identifier (S or U) and number.

V (56H)

Change value command; Followed by one Value Identifier (B-H & J-M, O),

then the proper numerical data.

-58-

10 BIT DATA FORMAT

9 BIT DATA FORMAT