15
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: password of factory command
The 8
th
-11
th
bytes: parameters corresponding to the function code
The 12
th
byte ETX: end of frame (DDH)
The 13
th
-14
th
bytes: cumulative sum check code from byte 1 to 12
Byte return:
1
2
3
4
5
6
7
8
FH (Frame
header)
Address
code
State code
State parameters
EOF (End of
frame)
Cumulative sum
STX
ADDR
STATE
1-8 bit
9-16 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-5
th
bytes: parameters corresponding to the state code
The 6
th
byte ETX: end of frame (DDH)
The 7
th
-8
th
bytes: cumulative sum check code from byte 1 to 6
4.2 Setting Command (suitable for factory command format)
The password to set the command is AABBEEFFH (the lower one comes first).
Serial
number
FUNC
Code
Function
Parameter
Remark
1
00H
Set the device
address
00000001H-000000F7H
(1-247)
0x00 is broadcast address and it
only accepts, but does not reply.
2
01H
Set RS232 baud
rate
00000000H-00000004H
0:9600bps (Default)
1:19200bps
2:38400bps
3:57600bps
4:115200bps
3
02H
Set RS485 baud
rate
00000000H-00000004H
4
03H
Set suction angle
00000000H-00000E10H
(0-3600 degrees)
Default 36 degrees.
5
04H
Set direction
00000000H~00000001H
0:CCW
1:CW(Default)