beautypg.com

3 lrc chk (checksum), Lrc chk (checksum) -5 – Delta DVP-ES2 User Manual

Page 607

background image

4 . C o m m u n i c a t i o n s

Field name

ASCII

Hex

Bytes Count

10

31 30

Data Hi (T20)

00

30 30

Data Lo (T20)

01

30 31

Data Hi (T21)

00

30 30

Data Lo (T21)

02

30 32

Data Hi (T22)

00

30 30

Data Lo (T22)

03

30 33

Data Hi (T23)

00

30 30

Data Lo (T23)

04

30 34

Data Hi (T24)

00

30 30

Data Lo (T24)

05

30 35

Data Hi (T25)

00

30 30

Data Lo (T25)

06

30 36

Data Hi (T26)

00

30 30

Data Lo (T26)

07

30 37

Data Hi (T27)

00

30 30

Data Lo (T27)

08

30 38

Check sum(LRC)

C8

43 38

END

CR LF

0D 0A

4.2.3 LRC CHK (checksum)

LRC (Longitudinal Redundancy Check) is calculated by summing up the Hex values from ADR1 to last

data character then finding the 2’s-complement negation of the sum.

Example: Read the content of register at address 0401H. 01H+03H+04H+01H+00+01H = 0AH.

The 2’s-complement of 0AH: F6H

Field name

ASCII

Hex

STX :

3A

Slave Address

01

30 31

Command code

03

30 33

Starting data address Hi

04

30 34

Starting data address Lo

01

30 31

Number of data Hi

00

30 30

Number of data Lo

01

30 31

LRC checksum

F6

46 36

END

CR LF

0D 0A

4 - 5

This manual is related to the following products: