Red Lion LEGEND User Manual
Page 32
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 receives a
Transmit Command or Print Request, it will wait the Serial Transmit Delay
time before it will begin transmitting data. The serial transmit delay can be
programmed for 0.002 or 0.100 second. 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 Legend unit are 1 start
bit, 7 data bits, No parity (Parity Bit = 0) or 1 parity bit (odd or even) and 1 stop
bit. The baud rates are programmable and the choices are; 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
(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 LGD 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, or 2).
T (54H)
Transmit value command; Followed by one Value Identifier
(A-O).
V (56H)
Change value command; Followed by one Value Identifier
(A-E, or O), then the proper numerical data.
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
O (4EH) COUNTER LOAD
CLD
1 (31H) OUTPUT 1
N/A
2 (32H) OUTPUT 2
N/A
Note: Command identifiers other than those listed should NOT be transmitted.
Otherwise, undefined or unpredictable operation could result.
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.
-30-
10 BIT DATA FORMAT