Checksum, Checksum -2, D checksum – Rockwell Automation 2092-DAx Ultra1500 Host Commands for Serial Communication Reference Manual User Manual

Page 12

Advertising
background image

Publication 2092-RM001A-EN-P — March 2005

1-2

Communications Protocol

If the drive receives the command without a communication error, the
response is in the same format as the host command. Numeric parameters are
encoded as strings.

If the drive receives the host's command with a communication error (parity or
checksum errors, for example), the drive sends an NAK. The host should
assume a communication error occurred if a response from the drive does not
occur within a time-out period (generally 200ms).

If drive does not recognize the command, it sends US.

Checksum

The checksum range consists of ID to Separator fields. Checksum is the
ASCII hex code of the least significant digit from the sum of hexadecimal
codes in the checksum range.

For example, this VER command has a checksum of 42 (ASCII hex code of B)

30H+31H+23H+56H+45H+52H+3AH = 1AB
The ASCII hex code of B is 42.

However, this VER command response also has a checksum of 42 (ASCII hex
code of B)

30H+31H+24H+56H+45H+52H+20H+31H+2EH+30H+30H+3AH = 28B
The ASCII hex code of B is 42.

Command

STX

0

1

#

V

E

R

B

ETX

ASCII

2

30

31

23

56

45

52

42

3

Command

STX

0

1

&

V

E

R

1

.

0

0

:

B

ETX

ASCII

2

30

31

24

56

45

52

20

31

2E

30

30

3A

42

3

Advertising