![Fonrich FR-DCMG Series User Manual Download Page 19](http://html1.mh-extra.com/html/fonrich/fr-dcmg-series/fr-dcmg-series_user-manual_2315910019.webp)
FR-DCMG DC System Monitor User Manual Fonrich New Energy Technology Co., Ltd.
Ⅵ, Definition of the Modbus Protocol
Configuration of the modbus
Modbus communication mode:RTU mode
Address of the slave device:range from 1 to 247 (default 1)
Baud rate:(bps) 2400、4800、9600(default)、19200、38400
Parity of the byte:odd parity、even parity、none parity(default)
Description of the modbus frame
The byte in the communication frame composed by 1 start bit, 8 bits data bit, 1 parity bit, 1
stop bit like the below table(Refer to standard modbus RTU protocol):
Address code
Function code
Data field
CRC field
1 byte
1 byte
N*1byte
2 bytes
The address code is the slave device address. The function code tell the slave device how to
respond, and what request of the slave device response. N in data field can not be bigger than
252, the CRC field used to check the frame by using cyclic redundancy check.
Description of the function codes
FR-DCMG supports almost all function codes, includes 01, 02, 03, 04, 05, 06, 15 and 16. These
modbus function codes are separated to two kinds of operation: bit operation and word
operation. In FR-DCMG modbus implementation, all bit operations with different function
codes share same bit register address mapping, and all word operations with different function
codes share same word register address mapping.
Read and write operations of the registers in bit
•
Function code 01 used to read the content of bit-type registers
•
Function code 02 used to read the content of bit-type registers
19