Communication protocol
1.1 Overview
This product uses Modbus-RTU communication protocol, RS485 interface, Modbus protocol defines check code, data sequence,
etc., these are all necessary for specific data exchange. Modbus protocol uses master-slave acknowledgment connection
﹙half duplex﹚ on one communication line, this means that the signal is transmitted in the opposite direction on a separate
communication line. First, the signal of the host computer is addressed to a unique terminal device ﹙slave﹚, then, the response signal
sent by the terminal device is transmitted to the host in the opposite direction.
Modbus protocol only allows communication between host ﹙PC, etc.﹚ and terminal device, and does not allow data exchange
between independent terminal devices, so that each terminal device does not occupy the communication line when they initialize,
but only responds to the inquiry signal reaching the local machine.
1.1.1 Transfer method
Information transmission is asynchronous, and the communication information transmitted between the master and the slave is
in bytes, including 1 start bit, 8 data bits ﹙the smallest valid bit is sent first﹚, no parity, 1 stop bit.
1.1.2 Information frame format
Address code: The address code is composed of one byte ﹙8-bit binary code﹚ at the beginning of the frame, and the
decimal is 1 to 255. These bits indicate the address of the user-specified terminal device that will receive the host data from
it. The address of each terminal device must be unique, and only the addressed terminal will respond to the query containing
the address. When the terminal sends back a response, the slave address data in the response tells the host which terminal is
communicating with it.
Function code: The function code tells the terminal which terminal is performing what function. The following table lists the
function codes used in this series of instruments, as well as their meaning and function.
Data area: The data area contains the data required by the terminal to perform a specific function or the data collected by
the terminal in response to the query. The content of these data may be numeric, reference address or set value. For example,
the function code tells the terminal to read a register, and the data area needs to indicate which register to start and how
many data to read. The embedded address and data vary according to the type and the different contents between the
slaves.
CRC check code: The error check field ﹙CRC﹚ occupies two bytes and contains a 16-bit binary value. The CRC value is
calculated by the transmitting device and then appended to the data frame. The receiving device recalculates the CRC value
when receiving the data, and then compares it with the value in the received CRC field. If the two values are not equal,
it occurs error.
1.2 Read registers data enumeration
This feature allows the user to obtain data and system parameters collected
and recorded by the device. The host can read one or more register values
and can read up to 12 register values at a time ﹙cannot exceed the defined
address range﹚.
The following example is the basic data collected
from machine-readable 3 from the 01 ﹙the data
frame takes up 2 bytes per address﹚ output voltage,
output current, output frequency, where the output
voltage address is 0001H, the output current The
address is 0002H, and the address of the output
frequency is 0003H.
Indicate
Output voltage ﹙V﹚: Convert 0x00+0xE3 to decimal equal to 227
Output current ﹙A﹚: Convert 0x00+0xE6 to decimal equal to 230/100=2.3
Output frequency ﹙Hz﹚: Convert 0x00+0x32 to decimal equal to 50
Adress code
Function code
1 byte
1 byte
Data area
n bytes
Slave address
Function code
Start register address high
Start register address low
Register length high
Register length low
CRC Check low
CRC Check high
Slave address
Function code
Start register address high
Start register address low
Register length high
Register length low
CRC Check low
CRC Check high
- 17 -
CRC check code
2 bytes
0x01
Slave address
0x03
Function code
0x00
Register length
0x01
Register high
0x00
Register low
0x03
Register high
0x54
Register low
0x0B
Register high
Register low
CRC Check low
CRC Check high
1-255
0x03
0x00
0-23
0x00
1-12
0x01
0x03
0x06
0x00
0xE3
0x00
0xE6
0x00
0x32
0x84
0x81