Rs485 serial communications interface 48, Communication format 48, Sending commands and data 48 – Red Lion TCU User Manual

Page 56: Rs485 serial communications interface

Advertising
background image

RS485 SERIAL COMMUNICATIONS INTERFACE

RS485 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 TCU unit are a printer, a
terminal, a programmable controller, or a host computer.

The RS485 differential (balanced) design has good noise immunity and

allows for communication distances up to 4,000 feet. Up to thirty-two units
can be connected on a pair of wires and a common. The RS485 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
GCM422 (RS422 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 are 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 TCU unit are 1 start
bit, 7 data bits, No parity (parity equals extra stop bit) 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
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 TCU 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 TCU 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, W-Z, AA, BB, or HC).

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, Q, or X-Z), then the proper numerical data.

48

Figure 21, 10 Bit Data Format

Advertising