Sending commands and data – Red Lion LEGEND User Manual

Page 35

Advertising
background image

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 by 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 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 LGM unit.

COMMAND

DESCRIPTION

N (4EH)

Address command; Followed by a one or two digit address
number 1 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,
I, J, O & 1 6).

T (54H)

Transmit value command; Followed by one Value Identifier
(A O).

V (56H)

Change value command; Followed by one Value Identifier
(A E, and K O), then the proper numerical data.

The command string is constructed by using a command, a value identifier,

and a data value if required. The Data value need not contain the decimal
point since it is fixed within the Legend unit, when programmed at the front
panel. The Legend will accept the decimal point, however, it does not

interpret them in any way. Leading zeros can be eliminated, but all trailing
zeros must be present.

VALUE IDENTIFIERS

MNEMONIC

A (41H) PRESET 1

P1

B (42H) PRESET 2

P2

C (43H) SCALE FACTOR COUNT

SFC

D (44H) SCALE FACTOR RATE

SFR

E (45H) COUNT

CNT

H (48H) RATE

RT

I (49H) PEAK

PEK

J (4AH) VALLEY

VAL

K (4BH) PRESET 3

P3

L (4CH) PRESET 4

P4

M (4DH) PRESET 5

P5

N (4EH) PRESET 6

P6

O (4FH) COUNTER LOAD

CLD

1 (31H) OUTPUT 1

N/A

2 (32H) OUTPUT 2

N/A

3 (33H) OUTPUT 3

N/A

4 (34H) OUTPUT 4

N/A

5 (35H) OUTPUT 5

N/A

6 (36H) OUTPUT 6

N/A

Note: Command identifiers other than those listed should NOT be transmitted.

Otherwise, unpredictable operation could result.

EXAMPLE: If a Scale Factor of 1.0000 is to be sent, the data value can be

transmitted as 1.0000 or 10000. If a “1” is transmitted, the Scale Factor will
be changed to 0.0001.
The Address command is used to allow a command to be directed to a

specific unit on the Serial Communications Line. When the unit address is
zero, transmission of the Address command is not required. This is done for
applications that do not require more than one Legend. For applications that
require several units, each Legend on the line must be given a non zero
address. If they are given the same address, a command such as the Transmit
Value Command, will cause all the units to respond simultaneously, resulting
in a communication collision. All Legends in a multiple unit application
should be given an address other than zero.

-33-

10 BIT DATA FORMAT

Advertising