0% found this document useful (0 votes)
88 views2 pages

2018new Modbus Communication Protocol

The document describes the Modbus communication protocol. It details: 1. The hardware interface is RS485, baud rate is 9600bps, data format is 8 data bits, 1 stop bit, no parity bit, and CRC16 validation is used. 2. Station numbers range from 01-99, with the menu displaying the value +1. 3. Function codes 03 and 06 can be used to read and write registers respectively.

Uploaded by

adulqwul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views2 pages

2018new Modbus Communication Protocol

The document describes the Modbus communication protocol. It details: 1. The hardware interface is RS485, baud rate is 9600bps, data format is 8 data bits, 1 stop bit, no parity bit, and CRC16 validation is used. 2. Station numbers range from 01-99, with the menu displaying the value +1. 3. Function codes 03 and 06 can be used to read and write registers respectively.

Uploaded by

adulqwul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Modbus Communication Protocol

1. Hardware and data format


Hardware interface: RS485
Baud rate: 9600bps
Data format TTU: 8 data bits, 1 stop bit
Parity: No parity bit
Validate CRC16, starting from the message, the low byte in front, the high byte in the
back.
2. Station number
The setting range is 01~99, meter station number==the menu displays the value+1
3. Function code 03, 06
Using the 03 function code of the Modbus Communication Protocol, the above
registers can be read individually or centrally;
Function code 06 can be modified individually for the 0x0005~0x0008 registers.
4. The information frame format: (The slave address is 01, all are binary data)
The Master sending: Station Number(1B) Function Code(1B) Initial Address(2B) Reading Count(2B) CRC(2B)
T1-T4 01 03 00 XX 00 XX XX XX T1~T4

NOTE: T1-4 Meaning: Each frame of beginning and end will keep 3~5 stationary state.
Station Number(address): One byte“01”
Function Code: One byte“03”
Start Address: Two bytes
Reading Count: Two bytes
CRC: Check Code, Two bytes;

The Slaver response: Station Number(1B) Function Code(1B) Reading number of bytes(1B) Data(2B) CRC(2B)
T1-T4 01 03 02 XX XX XX XX T1~T4

NOTE: T1-4 Meaning: Each frame of beginning and end will keep 3~5 stationary state.
Station Number(address): One byte“01”
Function Code: One byte“03”
Data: Two bytes; High post first, constitute 16 byte binary data.
CRC: Check Code, Two bytes;

5. CRC Code Computation Rule:


● The reserved 16 -bit register is to hexadecimal FFFF(That all are 1), called this register is CRC register;
● There is status XOR between the first 8 bits of data and 16 bits CRC register, or can setting the result
inside to the register;
● Checking the low post whether is 0, if it is 0 then move the con tent of register to the on the right
one(approach the low post). Using the 0 fill up high post; If it is 1 then move the content of register to
the on the right one(approach the low post), Using the 0 fill up high post. Then the CRC register and
polynomial A001(1010 0000 0000 0001) proceed XOR;
● Repeated step 3, until move right 8 times, then the whole 8 bits proceed a deal.
● Repeated step 2 ~4, proceed the next 8 bits deal.
● Finally get the CRC register is CRC code. Taking the result into information frame, exchange the high
post and low post, the low post first.

6. Communication Protocol Paradigm

1) Read from register

Station Function Initial Reading Check

Number Code Address Count Code Meaning

01 03 0000 0001 840a Reading empty height, unit is cm

01 03 0001 0001 d5ca Reading empty height, unit is mm

01 03 0002 0001 25ca Reading liquid level height, unit is cm

01 03 0003 0001 740a Reading liquid level height, unit is mm

2) Modify the instrument range, 20m(2000cm)


The master sending data(HEX): 01 06 00 05 07 D0 XX XX
Instrument response: 01 06 00 05 07 D0 XX XX, Meaning the modify was successfully.
Note: 00 05 Register, range, unit is cm (read-write)
07 D0 is the range of modify
If the return value is different, meaning modify failed or preset data exceeded.

3) Modify the instrument blind zone, 0.5m(50cm)


The master sending data(HEX): 01 06 00 06 00 32 XX XX
Instrument response: 01 06 00 06 00 32 XX XX, Meaning the modify was successfully.
Note: 00 06 Register, blind zone, unit is cm (read-write)
00 32 is the blind zone of modify

4) Modify the instrument Min level 20m,(2000cm)


The master sending data(HEX): 01 06 00 07 07 D0 XX XX
Instrument response: 01 06 00 07 07 D0 XX XX, Meaning the modify was successfully.
Note: 00 07 Register, Min level, unit is cm (read-write)
07 D0 is the Min level of modify

5 ) Modify the instrument Max level 0.5m(50cm)


The master sending data(HEX): 01 06 00 08 00 32 XX XX
Instrument response: 01 06 00 08 00 32 XX XX, Meaning the modify was successfully.
Note: 00 08 Register, Max level, unit is cm (read-write)
00 32 is the Max level of modify

You might also like