![Kinco CV100 Series Manual Download Page 110](http://html1.mh-extra.com/html/kinco/cv100-series/cv100-series_manual_1967653110.webp)
107
Fig.10-2 Modbus protocol format
Modbus use “Big Endian” of encoder mode, which means sending data with high byte in front and low byte behind.
1.
RTU mode
In RTU mode,there must be a idle of at least 3.5 characters between two frames.It use CRC-16 for data check.
Following is an example for read the parameter of internal register 0101(A1.01) from No.5 slave.
Request frame
:
Slave
address
Function
code
Data
Checksum
Register address
Length
0x05
0x03
0x01
0x01
0x00
0x01
0xD5
0xB2
Response frame
:
Slave
address
Function
code
Data
Checksum
Response
length
Register
content
0x05
0x03
0x02
0x13
0x88
0x44
0xD2
Therein, checksum is CRC value.
2
.
ASCII mode
In ASCII
mode
, characters are used to start and end a frame. The colon “0x3A” is used to flag the start of a message
and each message is ended with a “0x0D,0x0A” combination. Except frame header and end of frame,all other
messages are coded in hexadecimal values, represented with readable ASCII characters. Only the characters
0
...
9
and
A
...
F
are used for coding. Herein the data use LRC as error checksum.
Following is an example for writing value 0003(0x0003) into the parameter of internal register 0201(A2.01) from No.5
slave.
Request frame
:
Frame
header
Slave
address
Function
code
Data
Check
code
Frame trail
Register address
Setting value
Character
:
0
5
0
6
0
2
0
1
0
0
0
3
E
F
CR
LF
ASCII
3A
30
35
30
36
30
32
30
31
30
30
30
33
45
46
0D
0A
Therein,the check code is LRC checksum,which value is equal to the complement of
(
05+06+02+01+0x00+0x03
)
.
Response frame
:
Frame
Slave
Function
Data
Check
Frame trail
Start(The space of
the frame is 3.5
characters at least)
Slave
address
Function
code
Data
Check sum
End(The space of
frame is 3.5
characters at least)
Modbus
Mode
RTU
Format
Start
(
0x3A
)
Slave
address
Function
code
Data
Check sum
End
(0x0D,ETX bytes
)
Modbus
Frame
ASCII
Mode