beautypg.com

Communication format 43, Sending commands and data 43 – Red Lion LEGEND User Manual

Page 45

background image

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. After the Legend Plus receives a
Transmit Command or Print Request, it waits the Serial Transmit Delay time
before it begins transmitting data. The serial transmit delay can be programmed for
0.002 or 0.100 second. For data to be interpreted correctly, there must be identical
formats and baud rates between the communicating devices. The formats available
for the Legend Plus unit are 1 start bit, 7 or 8 data bits, No parity or 1 parity bit (odd
or even) and 1 stop bit. The available baud rates are; 1200, 2400, 4800, or 9600
baud. If any extended characters are to be used or transmitted, the Legend Plus
communication port should be set-up for Parity of “NONE-8B”. This configures
the unit to accept and transmit 8 data bits with no parity.

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 (00) may be
used to eliminate the requirement for the address specifier when sending a
command. If more than one unit is on the line, assignment of unique non-zero
addresses is required.

SENDING COMMANDS AND DATA

When sending commands to the Legend Plus 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 LGPB unit.

COMMAND

DESCRIPTION

M (4DH)

Request message command; Followed by the message number 0 to 9.

MC (4DH, 43H) Clear message command.

N (4EH)

Address command; Followed by the address number 1 to 99.

P (50H)

Transmit print options command; Transmits the options selected in the
Program Options Module section.

R (52H)

Reset value command; Followed by one Value Identifier (E, F, G, I, J, O, or
1 to 4 [for outputs]).

T (54H)

Transmit value command; Followed by one Value Identifier (A-O, or Q).

V (56H)

Change value command; Followed by one Value Identifier (A-G, K, L, O, or Q),
then the proper numerical data.

-43-

DATA FORMAT

10 BIT FRAME

[Parity = ODD-7B, EVEN-7B]

DATA FORMAT
10 BIT FRAME

[Parity = NONE-8B]