ModBus常用功能码 (功能码为10进制)
01 READ COIL STATUS 读线圈寄存器
02 READ INPUT STATUS 读状态寄存器
03 READ HOLDING REGISTER 读保持寄存器
04 READ INPUT REGISTER 读输入寄存器
05 WRITE SINGLE COIL 写单线圈寄存器
06 WRITE SINGLE REGISTER 写单保持寄存器
15 WRITE MULTIPLE COIL 写多线圈寄存器
16 WRITE MULTIPLE REGISTER 写多保持寄存器
Modbus Function Code说明
01 Read Coil Status (output relay)
02 Read Input Status (input relay)
03 Read Holding Registers (output register)
04 Read Input Registers
05 Force Single Coil
06 Preset Single Register
07 Read Exception Status
08 Diagnostics
09 Program 484
10 Poll 484
11 Fetch Comm. Event Ctr.
12 Fetch Comm. Event Log
13 Program Controller
14 Poll Controller
15 Force Multiple Coils
16 Preset Multiple Registers
17 Report Slave ID
18 Program 884/M84
19 Reset Comm. Link
20 Read General Reference
21 Write General Reference
22 Mask Write 4x Register
23 Read/Write 4x Register
24 Read FIFO Queue
43 Read Device Identication
65 to 72 开放给一般使用者定义
100 to 110 开放给一般使用者定义
01 READ COIL STATUS 读线圈寄存器
02 READ INPUT STATUS 读状态寄存器
03 READ HOLDING REGISTER 读保持寄存器
04 READ INPUT REGISTER 读输入寄存器
05 WRITE SINGLE COIL 写单线圈寄存器
06 WRITE SINGLE REGISTER 写单保持寄存器
15 WRITE MULTIPLE COIL 写多线圈寄存器
16 WRITE MULTIPLE REGISTER 写多保持寄存器
Modbus Function Code说明
01 Read Coil Status (output relay)
02 Read Input Status (input relay)
03 Read Holding Registers (output register)
04 Read Input Registers
05 Force Single Coil
06 Preset Single Register
07 Read Exception Status
08 Diagnostics
09 Program 484
10 Poll 484
11 Fetch Comm. Event Ctr.
12 Fetch Comm. Event Log
13 Program Controller
14 Poll Controller
15 Force Multiple Coils
16 Preset Multiple Registers
17 Report Slave ID
18 Program 884/M84
19 Reset Comm. Link
20 Read General Reference
21 Write General Reference
22 Mask Write 4x Register
23 Read/Write 4x Register
24 Read FIFO Queue
43 Read Device Identication
65 to 72 开放给一般使用者定义
100 to 110 开放给一般使用者定义