14
Chapter 4 Communication Control Mode
4.1 Command Format
4.1.1 Common Command Format (send 10 bytes, return 10 bytes)
Byte send:
1
2
3
4
5
6
7
8
9
10
FH (Frame
header)
Address
code
Function
code
Function parameters
EOF (End
of frame)
Cumulative sum
STX
ADDR
FUNC
1-8 bit 9-16 bit 17-24 bit 25-32 bit
ETX
Low byte High byte
The 1
st
byte STX: frame header (CCH)
The 2
nd
byte ADDR: slave address (01H~ F7H)
The 3
rd
byte FUNC: function code
The 4-7
th
bytes: parameters corresponding to the function code
The 8
th
byte ETX: end of frame (DDH)
The 9
th
-10
th
bytes: cumulative sum check code from byte 1 to 8
Byte return:
1
2
3
4
5
6
7
8
9
10
FH (Frame
header)
Address
code
State
code
State parameters
EOF (End
of frame)
Cumulative sum
STX
ADDR
STATE 1-8 bit 9-16 bit 17-24 bit 25-32 bit
ETX
Low byte High byte
The 1
st
byte STX: frame header (CCH)
The 2
nd
byte ADDR: slave address (01H~ F7H)
The 3
rd
byte STATE: state code
The 4-7
th
bytes: parameters corresponding to the state code
The 8
th
byte ETX: end of frame (DDH)
The 9
th
-10
th
bytes: cumulative sum check code from byte 1 to 8
4.1.2 Factory Command Format (send 14 bytes, return 8 bytes)
Byte send:
1
2
3
4-7
8
9
10
11
12
13
14
FH (Frame
header)
Address
code
Functio
n code
Pass
word
Function Parameters
EOF (End
of frame)
Cumulative sum
STX
ADDR
FUNC
1-8 bit 9-16
bit
17-24
bit
25-3
2 bit
ETX
Low byte
High
byte