There are five function codes that set commands. Table 1 shows the different codes.

Table 1. Function Codes

Function Code

(Hex.)

Subfunction Code

(Hex.)

Function

Command Message

Response Message

Minimum Data Length

(byte)

Maximum Data Length

(byte)

Minimum Data Length

(byte)

Maximum Data Length

(byte)

03

-

Read Multiple Holding Registers

8

8

7

37

08

-

Loopback Test

8

8

8

8

10

-

Writing to Multiple Holding Registers

11

41

8

8

5A

-

Writing to Multiple Holding Registers / Reading the Register Indicated

11

41

17

17

67

010D

Reading the Contents of Non-Consecutive Holding Registers

10

248

10

248

010E

Writing to Non-Consecutive Holding Registers

14

250

8

8