Appendix Communication Protocol GK600 User Manual
- 268 -
Sub-parameter: table of line diagnosis sub-parameter.
Example:
Parameter 0x08 is used here to set the communication no-response mode of 0x01 slave:
Appendix Table 41
Address
Parameter
Sub-PARA
Data
Check sum
Request
01
08
00 04
00 00
A1 CA
Response
01
08
00 04
00 00
A1 CA
Read error or warning
In case illegal parameter, illegal register address, data errors and other anomalies are detected
during communication, slave response communication anomaly will occur. In such a case, the
slave response will be in the following formats:
Slave response:
Appendix Table 42
Address
Parameter
Data
Check code
01
0x80+parameter
Error code
XX XX
Example:
Parameter 0x10 is used here to write the corresponding write data 1, 11, 4 and 100.00 in
control registers 0x6200, 0x6201, 0x6202 and 0x6203 of 0x01 slave:
Appendix Table 43
Address Parameter
Register
address
Number of
registers
Number of
data bytes
Data
Check
sum
Request
01
10
62 00
00 04
08
0001,000B
0004 2710
DE 64
Response 01
90
None
None
None
20
0C 01
7. LRC/CRC Generation
In consideration of the demand for speed improvement, CRC-16 is usually realized in form
mode. C-language source codes for realization of CRC-16 are given below. Please note that
the high and low bytes have been exchanged in final result, that is to say, the result is the CRC
check sum to be sent:
/* The function of CRC16*/
Uint16 CRC16(const Uint16 *data, Uint16 len)