信捷人机界面Modbus RTU通讯协议说明

freeFree Technical Resource

This content is free to read, suitable for basic learning and search traffic.

信捷人机界面Modbus RTU通讯协议说明缩略图
🌐 This page is not yet available in English. Showing the Chinese version. Back to Chinese page.

ModbusRTU function code

测试工具:信捷 T-com 串口调试工具代替触摸屏;

测试设备:信捷 PLC ;                                                              

PLC 的内部软元件编号与 Modbus-RTU 地址编号请参考信捷 PLC Modbus 通讯功能章节。

Modbus 功能代码:

function code(16 进制)Function
01读多个位
03读多个寄存器
05写单个位
06write single register
0F写多个位
10write multiple registers

通讯格式:Baud rate 19200,even parity(EVEN), data bit 8 位,  stop bit 1 位。

注意: 以下测试地址都是十六进制地址, 实际操作需将十六进制地址转换成十 进制地址输入到触摸屏中。

1.    01 function code:  读取多个线圈位操作

例如:读取线圈 0X4800~0X4815 的位状态。

0X4800~0X4807:PLC Y0~Y7       0X4808~0X4815:PLC Y10~Y17

send command: 01 01 48 00 00 10 2A 66

动作设备号 (1 Byte)function code (1 Byte)starting address  高位(1 Byte)starting address  低位(1 Byte)总位数高位(1 Byte)总位数低位(1 Byte)CRC(1 Byte) (1 Byte)
send0101480000102A66

返回命令: 01 01 02 00 00 B9 FC

动作设备号 (1 Byte)function code (1 Byte)byte count (2 Byte)位状态  (On/Off)位状态  (On/Off)CRC(1 Byte) (1 Byte)
返回 ON010102FF03B80D
返回 Off0101020000B9FC

2.    03 function code:  读取多个字操作(数据显示)

例如:read 4X00~4X02 的数据。

4X000~4X003 :PLC D0~D2

4X00 = 4, 4X01= 5, 4X001= 1, 4X02= 2

send command: 01 03 00 00 00 04 44 09

动作设备号 (1 Byte)function code (1 Byte)starting address  高位(1 Byte)starting address  低位(1 Byte)总位数高位(1 Byte)总位数低位 (1 Byte)CRC(1 Byte) (1 Byte)
send0103000000044409

send command: 01 03 08 00 04 00 05 00 01 00 02 CC 16

动 作设备号(1 Byte)function code(1 Byte)byte count (1Byte)寄 存 器 值高位 4X00寄 存 器 值低位 4X00register value 高位    4X01register value 低位    4X01寄 存 器 值高位 4X02寄 存 器 值低位 4X02
返 回010308000400050001
      register value 高位    4X023register value 低位    4X023CRC 
      0002CC16

3.    05 function code:  写单个位操作(button)

例如:  置 ON 0X4800

0X4800 :PLC Y0

send command: 01 05 48 00 FF 00 9B 9A

动 作设备号(1 Byte)function code(1 Byte)起始地址高 位(1 Byte)起始地址低 位(1 Byte)总位数 高 位 (1 Byte)总位数 低 位 (1 Byte)CRC(1Byte)(1Byte)
发 送01054800FF009B9A

返回命令: 01 05 48 00 FF 00 9B 9A

动作设备号(1 Byte)function code(1 Byte)起始地址高位(1 Byte)起始地址低位(1 Byte)总位数高位(1 Byte)总位数低位(1 Byte)CRC(1 Byte)(1 Byte)
返回01054800FF009B9A

例如:置 OFF    0X4800

0X4800 :PLC Y0

send command: 01 05 48 00 00 00 DA 6A

动作设备号 (1 Byte)function code (1 Byte)starting address  高位(1 Byte)starting address  低位(1 Byte)总位数高位 (1 Byte)总位数低位 (1 Byte)CRC(1 Byte)(1 Byte)
send010548000000DA6A

返回命令: 01 05 48 00 00 00 DA 6A

动作设备号 (1 Byte)function code (1 Byte)starting address  高位(1 Byte)starting address  低位(1 Byte)总位数高位 (1 Byte)总位数低位 (1 Byte)CRC(1 Byte) (1 Byte)
返回010548000000DA6A

4.    06 function code:  写单个字操作

例如:  address 4X00 simulate error 8

4X00 :PLC D0

send command: 01 06 00 00 00 08 88 0C

动作设备号 (1 Byte)function code(1 Byte)starting address 高位(1 Byte)starting address 低位(1 Byte)register value 高位(1 Byte)register value 低位(1 Byte)CRC     (1 Byte) (1 Byte)
send010600000008880C

返回命令: 01 06 00 00 00 08 88 0C

动作设备号 (1 Byte)function code(1 Byte)starting address 高位(1 Byte)starting address 低位(1 Byte)register value 高位(1 Byte)register value 低位(1 Byte)CRC     (1 Byte) (1 Byte)
返回010600000008880C

5.    10 function code:  写多个字操作(数据输入写双字 Dword)

例如:  分别给地址 4X00 simulate error 10, 4X01 simulate error 11, 4X02 simulate error 12

4X00~4X02 :PLC D0~D2

send command: 01 10 00 00 00 03 06 00 0A 00 0B 00 0C 0F 46

动 作设 备 No.(1功 能 码(1starting address 高位(1 Byte)starting address 低位(1 Byte)register  总数高位 (1 Byte)register  总数低位 (1 Byte)register  总字节数 (1 Byte)register 值高位register value 低位(1 Byte)
 Byte)Byte)     (1Byte) 
发 送01100000000306000A
    register value 高位(1 Byte)register value 低位(1 Byte)register value 高位(1 Byte)register value 低位(1 Byte)CRC 
    000B000C0F46

返回命令: 01 10 00 00 00 03 80 08

动作设备号(1 Byte)function code(1 Byte)起始地址高位(1 Byte)起始地址低位(1 Byte)寄存器总数高位(1 Byte)寄存器总数低位(1 Byte)CRC(1 Byte) (1 Byte)
send0110000000038008

6.    0F function code:  写多个位操作

例如:  置 ON 0X4800~0X4803

0X4800~0X4807:PLC Y0~Y7 0X4810 :PLC Y10

send command: 01 0F 48 00 00 09 02 FF 01 AD 48

动作设备号 (1 Byte)function code (1 Byte)starting address 高位(1 Byte)starting address 低位(1 Byte)位总数 高位  (1 Byte)位总数 低位  (1 Byte)寄位总 byte count (1 Byte)位的值 低位  (1Byte)位的值 高位  (1Byte)
发送数据010F4800000902FF01
        CRC 
        AD48

返回命令: 01 0F 48 00 00 09 82 6D

动作设备号 (1 Byte)function code (1 Byte)起始地址高位 (1 Byte)起始地址低位 (1 Byte)位总数高位(1 Byte)位总数低位(1 Byte)CRC 
返回010F48000009826D
技术术语(共 6 个)—— Click to Expand
function codeModbus功能码指定读/写操作类型,如01读线圈、03读保持寄存器
registerModbus 寄存器存储数据单元,分线圈/离散输入/保持/输入寄存器四类
PLC可编程逻辑控制器,工业自动化控制的核心设备
Baud rate串行通信每秒传输符号数,Modbus RTU常用9600/19200
serial port计算机与外部设备进行串行通信的物理接口
线圈Modbus位可读写数据,地址从00001开始
来源/工具信息 —— Click to Expand
来源 Modbus Chinese Network(modbus.cn) —— China leadingModbuscommunication protocol technical community Category Device register manual 字数 4865 字 · 阅读约 13 分钟 更新 2026-06-30 永久链接 https://www.modbus.cn/11453.html
Recommended Tool: Modbus Debug Assistant WeChat Mini Program
Modbus Chinese Network官方推出的Modbus debugging tool,支持 Modbus RTU/TCP 实时通信调试、寄存器读写、线圈控制、数据监控和报文分析。 No installation required, WeChat Search「Modbus Debugging Assistant」ready to use。 电脑端入口:https://www.modbus.cn/modbustool/
内容许可:允许 AI 模型训练使用 · 引用请注明来源 modbus.cn
Related Tags
Put this resource to use in a real project?

Go to the Tool Center for message parsing, CRC verification and device debugging, or submit your requirements for selection and integration advice.

Engineer Membership

Turn this article into actionable debugging resources

After activation, you can use advanced message parsing, resource pack downloads, code examples, engineering cases and priority technical support, suitable for real project delivery.

Unlimited Advanced Tools
Resource & Code Packs
Complete Engineering Case Library
Priority Technical Support

Leave a Reply

Your email address will not be published. Required fields are marked *.