Rs-485 serial communications – Max Machinery 120 FLOW RATE & TOTAL INDICATOR User Manual
Page 19

120-200-350 © 1993 (Rev 5/97) Max Machinery, Inc.
Page 19
RS-485 SERIAL COMMUNICATIONS (cont.)
Description Of Data Format
The serial data format consists of a start character (>), a two character unit ID number, a three character
command, data for the command (if applicable), a two character checksum and a termination character.
The unit ID number and the checksum are in ASCII hexadecimal and have a range of 00 to FF. The
checksum is the two least significant hexadecimal digits of the sum of the ASCII values of the unit ID
number, the command and the data. All hexadecimal characters A through F must be in upper case. All
leading zeroes in data fields must be sent. Decimal points within the data field are indicated by an
ASCII comma. The termination character may be an ASCII carriage return or an ASCII decimal point.
Each character within the string is made up of ten serial bits. The first bit is the start bit, followed by
seven data bits (ASCII code), followed by the parity bit and the tenth bit is the stop bit. If the unit is
programmed to space parity, the unit ignores the received parity and transmits space parity.
Responses by the indicator consist of three possibilities:
1. A (acknowledge)
2. Ad..cc (acknowledge with data, d..., and checksum of the data, cc)
3. Nee (not acknowledge with a two digit error code, ee)
Example:
Command sent to indicator: >01RST18B.
Where:
> is the start character,
01 is the unit ID number,
RST is the three character command (reset),
1 is applicable data (reset option - reset only),
8B is the two least significant digits of the hexadecimal checksum,
30 +31 +52 +53 +54 +31 (hex) = 18B hexadecimal
and . is the termination character.
Error Codes:
01 Invalid Command
02 Communication Checksum Error
03 Buffer Overrun Error
05 Data Format Error
08 Parity or Framing Error
10 In Run Mode, Command not Allowed
12 In Program Mode, Command not Allowed
13 Mode Already Active. Command not Allowed
21 Data out of Range
RS-485 SERIAL COMMUNICATIONS
0
1
R
S
T
1