EasyManua.ls Logo

CUTES CT-2000F Series - D. Error Check Generation

Default Icon
136 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
C.TY TNHH TỰ ĐỘNG HÓA VIỆT TRUNG 02413.281.181-0989.984.666
Website:www.viet-trung.com.vn Đ/c:194-Nguyễn Trãi-Võ Cường-TP.Bắc Ninh
131
Serial
Communications
User
Ma
nual
(2) Function 06Hpreset signal register
Presets a value into a single holding register (4 x reference). When broadcast, the function
presets the same register reference in all attached slaves. The maximum parameters
supported by various controller models are listed on page.
Ex. To inverter in F0H address protocol, pre set data 6000(1770H) into 0080H register,
the protocol frame will listed as below.
Query
Field Name Example (hex) ASCII code RTU 8-Bit Field
Header ‘ : ’ (colon) None
Slave Address F0 F 0 1111 0110
Function 06 0 6 0000 0110
Register Address Hi 00 0 0 0000 0000
Register Address Lo 80 8 0 1000 0000
Preset Data Hi 17 1 7 0001 0111
Preset Data Lo 70 7 0 0777 0000
Error Check LRC (2 chars) CRC (16 bits)
Trailer CR LF None
Total Bytes 17 8
Response
Field Name Example (hex) ASCII code RTU 8-Bit Field
Header ‘ : ’ (colon) None
Slave Address F0 F 0 1111 0110
Function 06 0 6 0000 0110
Register Address Hi 00 0 0 0000 0000
Register Address Lo 80 8 0 1000 0000
Preset Data Hi 17 1 7 0001 0111
Preset Data Lo 70 7 0 0777 0000
Error Check LRC (2 chars) CRC (16 bits)
Trailer CR LF None
Total Bytes 17 8
D. Error check Generation
(1) LRC Generation
Add all bytes in the message, excluding the starting colon and ending CRLF. Add
them into an eight-bit field, so that carries will be discarded.
Subtract the final field value from FF hex (all 1's), to produce the ones complement.
Add 1 to produce the two's-complement. Ex. The query data is F0H + 06H + 00H +
80H + 17H + 70H = FDH, the two’s complement is 03H. The ‘0’ & ‘3’ will be the

Related product manuals