LRF-3000P Ultrasonic flowmeter
- 50 -
8.3.2. MODBUS-I Communication Protocol
MODBUS-I protocol applies RTU transmission mode, and its check code applies CRC-16-IBM (multinomial is
X16+X15+X2 + 1, mask code is 0xA001), which is gained through the cyclic redundancy algorithm.
MODBUS-I RTU mode applies the hexadecimal system to transmit data.
1. MODBUS-I protocol function code and format
Function code
Function data indicated
0x03
Read register
0x06
Single write register
2. Use of MODBUS protocol function code 0x03
Information frame format of the read register sent by the host:
Slave address
Operation function
code
Register’s first
address
Number of registers
Check code
1 byte
1 byte
2 bytes
2 bytes
2 bytes
0x01~ 0xF7
0x03
0x0000 ~ 0xFFFF
X0000 ~ 0x7D
CRC Check code
Slave feedback data frame format:
Slave address
Read operation
function code
Number of data
bytes
Data
Check code
1 byte
1 byte
1 byte
N*x2 bytes
2 bytes
0x01~ 0xF7
0x03
2xN*
N*x2 data
CRC Check code
N* =Number of data registers.
3. MODBUS protocol function code 0x06
Information frame format of the write-in single register sent by the host (function code 0
x
06):
Slave address
Operation function
code
Register’s first
address
Number of registers
Check code
1 byte
1 byte
2 bytes
2 bytes
2 bytes
0x01~0xF7
0x06
0x0000~0xFFFF
X0000 ~ 0xFFFF
CRC Check code
Slave feedback data frame format (function code 0x06):
Slave address
Operation function
code
Register’s first
address
Number of registers
Check code
1 byte
1 byte
2 bytes
2 bytes
2 bytes
0x01~0xF7
0x06
0x0000~0xFFFF
X0000~0xFFFF
CRC Check code
Flowmeter’s address