麦多奇智能空开MODBUS RTUProtocol

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.
本文目录
  1. 1. 写线圈
  2. 2. 读线圈
  3. 3. read holding registers
  4. 4. read input registers
  5. 5. 写保持寄存器
麦多奇智能空开MODBUS RTU协议插图

MODBUS地址信息表(地址采用hexadecimal数表示)

address命令类型功能描述数据范围说明说明
输出线圈操作      function code: 写(0X05)(支持广播) 
0输出线圈远程复位       0xFF00成功后自动为0
1输出线圈远程合闸/分闸       0xFF00/0x0000 
2输出线圈远程锁扣/解锁       0xFF00/0x0000 
3输出线圈自动控制/手动       0xFF00/0x0000 
保持寄存器   function code: 写(0X10)    读(0X3)
0保持寄存器Device address1-255(默认为1)(0为广播地址)
1保持寄存器Baud rate1200 ~ 9600  默认为9600
2保持寄存器过压值250 ~300(V)读写  00 00取消
3保持寄存器欠压值150 ~200 (V)读写  00 00取消
     
输入寄存器   function code(0X4)
0输入寄存器实时电压A0~600(V)只读
1输入寄存器实时电压B0~600(V)只读
2输入寄存器实时电压C0~600(V)只读
3输入寄存器实时漏电0~1000(mA)只读
4输入寄存器开关分/合闸状态min:0xF(15),合:0xF0(240)只读
读线圈操作      function code: 读(0X01)
0输出线圈远程复位      成功后自动为0
1输出线圈远程合闸/分闸    1:合闸0:分闸 
2输出线圈远程锁扣/解锁    1:锁扣0:解锁 
3输出线圈自动控制/手动    1:自动0:手动 
    

注:

标注类型的均为16位无符整型

产品出厂通信参数设置:

Device address: 1

Baud rate:9600

Verification method:无效验

CRC check: 16位CRC check,低位在前

stop bit:1

协议举例说明:

写线圈

send

字节序号010203 ~ 0405 ~ 0607 ~ 08
FunctionDevice addressfunction code05Coil address操作码CRC check

回应

字节序号010203 ~ 0405 ~ 0607 ~ 08
FunctionDevice addressfunction code05Coil address操作码CRC check

读线圈

send

字节序号010203 ~ 0405 ~ 0607 ~ 08
FunctionDevice addressfunction code01starting address数据长度CRC check

回应

字节序号010203 0405 ~ 06
FunctionDevice addressfunction code01字节长度Coil statusCRC check

read holding registers

send

字节序号010203 ~ 0405 ~ 0607 ~ 08
FunctionDevice addressfunction code03register address数据长度CRC check

回应

字节序号01020304 ~ 05………2n+2 ~ 2n+32n+4 ~ 2n+5
FunctionDevice addressfunction code03字节长度data1………….datanCRC check
注:
数据长度以2字节为1单位;数据长度不能超过16。
字节序号010203 ~ 0405 ~ 0607 ~ 08
FunctionDevice addressfunction code01register address数据长度CRC check
字节序号01020304 ~ 05………2n+2 ~ 2n+32n+4 ~ 2n+5
FunctionDevice addressfunction code01字节长度data1………….datanCRC check

注:
数据长度以2字节为1单位;数据长度不能超过16。

read input registers

send

字节序号010203 ~ 0405 ~ 0607 ~ 08
FunctionDevice addressfunction code04register address数据长度CRC check

read

字节序号01020304 ~ 05………2n+2 ~ 2n+32n+4 ~ 2n+5
FunctionDevice addressfunction code04字节长度data1………….datanCRC check

注: 数据长度以2字节为1单位;数据长度不能超过16。

写保持寄存器

send

字节序号010203 ~ 0405 ~ 060708 ~ 09…….2n+6 ~ 2n+72n+8 ~2n+9
FunctionDevice addressfunction code10register address数据长度字节长度data1……….datanCRC check

read

字节序号010203 ~ 0405 ~ 0607 ~ 08
FunctionDevice addressfunction code10register address数据长度CRC check

调试用示例:

read holding registers(读产品设定值) 0~3:(Quantity4个)

send:01 03 00 00 00 04 44 09

receive:01 03 08 00 01 25 80 01 13 00 A0 73 BD 

麦多奇智能空开MODBUS RTU协议插图1

read input registers(读实时值): 0~3:(Quantity4个)  //读电流电压值

send:01 04 00 00 00 04 F1 C9

receive:01 04 08 00 D0 00 F2 00 F9 00 00 1C 24

read input registers: 0~4:(Quantity5个)  //读所有值

send:01 04 00 00 00 05 30 09

receive:01 04 0A 00 EA 00 EA 00 EA 00 00 00 0F 74 04    

read input registers: 4:(Quantity1个)  //读所有值

send:01 04 00 04 00 01 70 0B 

receive:01 04 02 00 0F F9 34    

写保持寄存器:

send:01 10 00 00 00 04 08 00 01 25 80 01 0E 00 AA 40 11  

receive:01 10 00 00 00 04 C1 CA

说明: 修改保持寄存参数  通信地址,Baud rate,过压值,欠压值;

注意修改 通信地址,波特率后, 下次发送数据, 要做相应修改

写保持寄存器:

send:01 10 00 00 00 04 08 00 02 12 c0 01 04 00 be 56 94

receive:01 10 00 00 00 04 C1 CA

说明: 修改保持寄存参数  通信地址,Baud rate,过压值,欠压值;

注意修改 通信地址,波特率后, 下次发送数据, 要做相应修改

写保持寄存器:

send:02 10 00 00 00 04 08 00 01 25 80 01 00 00 b0 e3 18

receive:02 10 00 00 00 04 C1 F9

说明: 修改保持寄存参数  通信地址,Baud rate,过压值,欠压值;

注意修改 通信地址,波特率后, 下次发送数据, 要做相应修改

写保持寄存器:

send:02 10 00 00 00 04 08 00 01 09 60 00 ff 00 af 15 66

receive:02 10 00 00 00 04 C1 F9

说明: 修改保持寄存参数  通信地址,Baud rate,过压值,欠压值;

注意修改 通信地址,波特率后, 下次发送数据, 要做相应修改

写保持寄存器:

send:01 10 00 00 00 04 08 00 01 25 80 00 00 00 00 A0 51

receive:01 10 00 00 00 04 C1 CA

说明: 修改保持寄存参数  通信地址,Baud rate,过压值,欠压值;

注意修改 通信地址,波特率后, 下次发送数据, 要做相应修改

写保持寄存器:

send:01 10 00 00 00 04 08 00 01 25 80 00 00 00 00 A0 51

receive:01 10 00 00 00 04 C1 CA

麦多奇智能空开MODBUS RTU协议插图2

说明: 修改保持寄存参数  通信地址,Baud rate,过压值,欠压值;

注意修改 通信地址,波特率后, 下次发送数据, 要做相应修改

写保持寄存器:

send:01 10 00 02 00 02 04 01 0E 00 AA 92 36//02 36  

receive:01 10 00 02 00 02 E0 08

说明: 修改保持寄存参数  过压值,欠压值;

合闸命令:

send:01 05 00 01 FF 00 DD FA

接送:01 05 00 01 FF 00 DD FA

分闸命令:

send:01 05 00 01 00 00 9C 0A

receive:01 05 00 01 00 00 9C 0A

远程锁扣命令:

send:01 05 00 02 FF 00 2D FA

receive:01 05 00 02 FF 00 2D FA 

远程解锁命令:

send:01 05 00 02 00 00 6C 0A

receive:01 05 00 02 00 00 6C 0A

自动控制命令:

send:01 05 00 03 FF 00 7C 3A

receive:01 05 00 03 FF 00 7C 3A

手动控制命令:

send:01 05 00 03 00 00 3D CA

receive:01 05 00 03 00 00 3D CA

复位命令:

send:01 05 00 00 FF 00 CD CA

receive:01 05 00 00 FF 00 CD CA

广播复位命令:

send:00 05 00 00 FF 00 8D EB

读寄存器状态命令:

send:01 01 00 00 00 04 3D C9

读分合闸状态命令:

send:01 01 00 01 00 01 AC 0A

读手自动状态命令:

send:01 01 00 03 00 01 0D CA

技术术语(共 6 个)—— Click to Expand
function codeModbus功能码指定读/写操作类型,如01读线圈、03读保持寄存器
registerModbus 寄存器存储数据单元,分线圈/离散输入/保持/输入寄存器四类
CRC check循环冗余校验,用于检测数据传输中的错误
Baud rate串行通信每秒传输符号数,Modbus RTU常用9600/19200
线圈Modbus位可读写数据,地址从00001开始
保持寄存器Modbus 16位可读写数据,地址从40001开始
来源/工具信息 —— Click to Expand
来源 Modbus Chinese Network(modbus.cn) —— China leadingModbuscommunication protocol technical community Category Device register manual 字数 3955 字 · 阅读约 10 分钟 更新 2026-06-30 永久链接 https://www.modbus.cn/26139.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 *.