
!
(2) After connecting a device separately, power on and click "test baud rate" of the software. The software will test the
baud rate and address of the current device. The default baud rate is 4800bit / s and the default address is 0x01.
(3) Modify the address and baud rate according to the need, and query the current function status of the device.
(4) If the test is not successful, please recheck the equipment wiring and 485 driver installation.
3.2. Data frame format definition
Modbus RTU communication protocol is adopted, and the format is as follows:
Time of initial structure
≥
4 bytes
Address code = 1 byte
Function code = 1 byte
Data area = n bytes
Error check = 16 bit CRC code
Time to end structure
≥
4 bytes
Address code: the address of the transmitter, which is unique in the same communication network (factory default is
0x01).
Function code: instruction function indication issued by the host.
Data area: the data area is the specific communication data, pay attention to the high byte of 16bits data before!
CRC code: two byte check code.
Host query frame structure:
Coding
8-bit binary
Data bit
8 bit
Parity bit
no
Stop bit
1 digit
Error checking
CRC (Redundant Cyclic Code)
Baud rate
It can be set by yourself, and the factory default is 4800bit / s
3. Modbus communication protocol
3.1. Basic communication parameters