34
sum data returned =2BH + 31H + 32H+ 33H + 34H + 35H+ 36H + 37H+45H + 2BH + 30H + 6DH
+ 33H + 20H = 2F7, and the least 8-bit binary is F7.
Therefore, data of command PRT(cr)(lf) is + 1234567E + 0m3!F7(cr)(lf), "!" as for the
delimiter, the first part is the character for summation and the second part is an 1-bit check
code.
6.
Use of W prefix: W+digit string address code+basic command, the digit string value range is
0~255, divided by 13 (0DH ENTER),10 (0AH changing a line). If you want to access to the
transient flow velocity of No. 123 flowmeter, you could send command W123DV (cr) (If), the
corresponding binary codes are 57H, 31H, 32H, 33H, 44H, 56H, 0DH and 0AH; only the meters
with the same network address and command could have data feedbacks.
7.
W and P commands could be combined for use, for example, , which means the
network address it reads is the total value of No. 123 flowmeter, its feedback data are
accumulated and checked.
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.