
User Guide
©2008
-2021 Seeed Technology Co., Ltd. All rights reserved. solution.seeedstudio.com
17
/
22
Note:Only ONE sensor should be on RS485 network, or there will be data collision and corrupt the
data on line.
Note:Refer to SETTING mode to exit the Active Output Mode.
Example: When set to 5 then sensor will output the data every 5 seconds without any master request
command.
7.4 Modbus Function Code
For description below, data started with 0X/0x means that it’s in HEX format.
7.4.1 Function Code 3 Protocol Example
Master Request: AA 03 RRRR NNNN CCCC
AA
1 byte
Slave Address,0-255
0x03
1 byte
Function Code 3
RRRR
2 byte
Starting Register Addr
NNNN
2 byte
Quantity of Register to read
CCCC
2 byte
CRC CHECKSUM
Slave Response: AA 03 MM VV0 VV1 VV2 VV3… CCCC
AA
1 byte
Slave Address,0-255
0x03
1 byte
Function Code 3
MM
1 byte
Register Data Byte Count
VV0,VV1
2 byte
Register Value (High8bits first)
VV2,VV3
2 byte
Register Value (High8bits first)
…
…
Register Value (High8bits first)
CCCC
2 byte
CRC CHECKSUM
Example: Read register 0x0200-0x0201,that is slave address and baudrate.
Master Request:01 03 0200 0002 C5B3
Slave Addr.
1 byte
0x01
Function Code
1 byte
0x03
Starting Register
2 byte
0x0200