
C
Y
K
Tech
www.ceyeko.com
Page 54
1
2
3
4, 5
6, 7
6
M-1, M
M+1
M2
ADR
03H
Total
number
of bytes
Register
data 1
Register
data 2
…
…
Register
data m
Crc code
low byte
Crc code
high
byte
When the slave receives the correct, the slave sends back:
1st byte adr: slave address code (=001~254)
2nd byte 03h: Return read function code
3rd byte: Total number of bytes from 4 to m (including 4 and m)
4th to m bytes: register data
M+1, m+2 bytes: crc16 check from byte 1 to m
When the slave receives an error, the slave sends back:
1
2
3
4
5
ADR
83H
Information co-
de
Crc code low
byte
Crc code high
byte
1st byte adr: slave address code (=001~254)
1st byte 83h: Error reading register value
3rd byte information code: see information code table
4th, 5th byte: crc16 check from byte 1 to 3
Function code 06h: Write a single register value
The host sends:
1
2
3
4
5
6
7
8
ADR
06
Register
address
high byte
Register
address
low byte
Data high
byte
Data low
byte
Crc code
low byte
Crc code
high byte