Chapter 9 Communications
LRC and CRC Error Checking
ASCII mode adopts LRC (Longitudinal Redundancy Check) and RTU mode adopts CRC (Cyclical
Redundancy Check)
LRC (ASCII Mode):
LRC (Longitudinal Redundancy Check) is calculated by summing up, module 256, the values
of the bytes from Slave address to last data character then calculating the hexadecimal
representation of the 2’s-complement negation of the sum.
For example, reading 1 word from address 05C4H of the AC servo drive with address 7FH.
Start ‘:’
‘7’
Slave address
‘F’
‘0’
Function
‘3’
‘0’
‘5’
‘C’
Starting data address
‘4’
‘0’
‘0’
‘0’
Number of data
‘1’
‘B’
LRC Check
‘4’
End 1 (0DH)(CR)
End 0 (0AH)(LF)
7FH + 03H + 05H + C4H + 00H + 01H = 14CH, take 4CH only, the 2’s complement negation of
4CH is B4H.
Hence, we can know that LRC CHK is ’B’,’4’.
Revision January 2011 9-13
Call 1(800)985-6929 for Sales
Call 1(800)985-6929 for Sales