
5.4
Transmission example
This chapter will illustrate how to use MODBUS protocol to control the device output
or read the device measurements. Values below are represented in hex.
5.4.1
Read register (correct)
The master requests to read the slave (ID 01 hex) output voltage (start address 00 00
hex). Below is the query frame.
Field name
Hex value Descriptions
ID
01
The slave ID
Function code
03
Read the register data from the slave
Byte count
04
The byte count of the output voltage is 4 bytes
Start address (hi)
00
The start address of the output voltage
Start address (lo)
00
CRC check (lo)
58
The CRC value after calculating 01 03 04 00 00 hex
CRC check (hi)
45
Example: Reading voltage 100V.
01
03
04
0000
5845
Below is the response frame sent by the slave.
Field name
Hex value Descriptions
ID
01
The slave ID
Function code
03
Read the register data from the slave
Frame status
00
Frame format correct
Byte count
04
The byte count of the requested data is 4 bytes
Data
42
The data type of output voltage is general fraction
Convert the register data of output voltage 01 00 00
00 hex into 100.0000V
Data
C8
Data
00
Data
00
CRC check (lo)
D6
The CRC value after checking 01 03 00 04 42 C8 00 00
hex
CRC check (hi)
81
Correct response :
01
03
00
04
42C80000
D681
The 4 bytes data refer to 5.3.4 section