CHAPTER 2: MODBUS COMMUNICATION
MODBUS FUNCTION CODES
UR FAMILY – COMMUNICATIONS GUIDE
2-5
2
2.2.3 Execute operation (function code 05h)
This function code allows the master to perform various operations in the relay. Available operations are shown in the
summary table below.
The following table shows the format of the master and slave packets in Modbus RTU. Modbus TCP/IP ADUs have a MBAP
instead of slave address, and CRC is in another stack layer. The example shows a master device requesting the slave
device 11h (17 decimal) to perform a reset. The high and low code value bytes always have the values “FF” and “00”
respectively and are a remnant of the original Modbus definition of this function code.
Table 2-6: Master and slave device packet transmission example
Table 2-7: Summary of operation codes for function 05h
2.2.4 Store single setting (function code 06h)
This function code allows the master to modify the contents of a single setting register in an relay. The following table
shows the format of the master and slave packets in Modbus RTU. Modbus TCP/IP ADUs have a MBAP instead of slave
address, and CRC is in another stack layer. The example shows a master device storing the value 200 at memory map
address 4051h to slave device 11h (17 dec).
NUMBER OF REGISTERS - high
00
DATA #1 - low
28
NUMBER OF REGISTERS - low
03
DATA #2 - high
01
CRC - low
A7
DATA #2 - low
2C
CRC - high
4A
DATA #3 - high
00
DATA #3 - low
00
CRC - low
0D
CRC - high
60
Master transmission
Slave response
Packet format
Example (Hex)
Packet format
Example (Hex)
SLAVE ADDRESS
11
SLAVE ADDRESS
11
FUNCTION CODE
05
FUNCTION CODE
05
OPERATION CODE - high
00
OPERATION CODE - high
00
OPERATION CODE - low
01
OPERATION CODE - low
01
CODE VALUE - high
FF
CODE VALUE - high
FF
CODE VALUE - low
00
CODE VALUE - low
00
CRC - low
DF
CRC - low
DF
CRC - high
6A
CRC - high
6A
Operation code
(Hex)
Definition
Description
0000
NO OPERATION
Does not do anything
0001
RESET
Performs the same function as the
front panel
RESET
key
0005
CLEAR EVENT RECORDS
Performs the same function as the
front panel
CLEAR EVENT RECORDS
menu
command
0006
CLEAR OSCILLOGRAPHY
Clears all oscillography records
1000 to 103F
VIRTUAL IN 1 to 64 ON/OFF
Sets the states of Virtual Inputs 1 to 64 either “ON” or “OFF”
Master transmission
Slave response
Packet format
Example (Hex)
Packet format
Example (Hex)