modbus rtu通讯问题
modbus rtu通讯问题:
大家好:想请做过MODBUS通讯的朋友帮忙,在这先行谢了!
我用VB 程序与霍尼韦尔的DCS工控机通讯,AI部分通讯正常,单是DO部分却一直不行,行请大家帮忙分析一下是哪里的问题。
DCS数字量DO,平时寻址功能码用01,发命令用05 ,建了7个点:
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送置1命令 03 05 00 00 FF 00 8D D8 置1是认为给的命令
下位机返回码 03 05 00 00 FF 00 8D D8
DCS发1命令 03 01 00 00 00 01 FC 28
下位机返回码 03 01 01 01 91 F0 下位机的回码是否正确
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送命令 03 05 00 00 00 00 CC 28 DCS自动发的命令,为什么这样发
下位机返回码 03 05 00 00 00 00 CC 28
DCS发送命令 03 01 00 00 00 01 FC 28
下位机返回码 03 01 01 01 91 F0 下位机的回码是否正确
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送命令 03 05 00 01 FF 00 DC 18
下位机返回码 03 05 00 01 FF 00 DC 18
DCS发送命令 03 01 00 01 00 01 AD E8
下位机返回码 03 01 01 02 D1 F1 下位机的回码是否正确
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送命令 03 05 00 02 FF 00 2C 18
下位机返回码 03 05 00 02 FF 00 2C 18
DCS发送命令 03 01 00 02 00 01 5D E8
下位机返回码 03 01 01 04 51 F3 下位机的回码是否正确
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送命令 03 01 00 02 00 01 5D E8 为什么又一次命令
下位机返回码 03 01 01 00 50 30
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送命令 03 05 00 03 FF 00 7D D8
下位机返回码 03 05 00 03 FF 00 7D D8
DCS发送命令 03 01 00 03 00 01 0C 28
下位机返回码 03 01 01 08 51 F6
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送命令 03 01 00 01 00 01 AD E8 为什么发此码
下位机返回码 03 01 01 00 50 30
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发命令 03 01 00 03 00 01 0C 28 为什么又一次命令
下位机返回码 03 01 01 00 50 30
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送命令 03 05 00 04 FF 00 CC 19
下位机返回码 03 05 00 04 FF 00 CC 19
DCS发送命令 03 01 00 04 00 01 BD E9
下位机返回码 03 01 01 10 51 FC 下位机的回码是否正确
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
DCS发送平时寻址命令 03 01 00 00 00 07 7C 2A
下位机返回码 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 04 00 01 BD E9 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 05 00 05 FF 00 9D D9 03 05 00 05 FF 00 9D D9
03 01 00 05 00 01 EC 29 03 01 01 20 51 E8
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 05 00 01 EC 29 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 05 00 06 FF 00 6D D9 03 05 00 06 FF 00 6D D9
03 01 00 06 00 01 1C 29 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 05 00 06 00 00 2C 29 03 05 00 06 00 00 2C 29
03 01 00 06 00 01 1C 29 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 00 00 07 7C 2A 03 01 01 00 50 30
03 01 00 06 00 01 1C 29 03 01 01 00 50 30
做11个点的通讯,情况更糟
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 05 00 07 FF 00 3C 19 03 05 00 07 FF 00 3C 19
03 01 00 07 00 01 4D E9 03 01 02 80 00 A1 FC
03 01 00 07 00 01 4D E9 03 01 02 80 00 A1 FC
03 01 00 07 00 01 4D E9 03 01 02 80 00 A1 FC 发了4次码,几乎就是连接不上
03 01 00 01 00 01 AD E8 03 01 02 80 00 A1 FC
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 05 00 08 FF 00 0C 1A 03 05 00 08 FF 00 0C 1A
03 01 00 08 00 01 7D EA 03 01 02 00 01 01 FC
03 01 00 08 00 01 7D EA 03 01 02 00 01 01 FC
03 01 00 08 00 01 7D EA 03 01 02 00 01 01 FC
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 05 00 09 FF 00 5D DA 03 05 00 09 FF 00 5D DA
03 01 00 09 00 01 2C 2A 03 01 02 00 02 41 FD
03 01 00 09 00 01 2C 2A 03 01 02 00 02 41 FD
03 01 00 09 00 01 2C 2A 03 01 02 00 02 41 FD
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 05 00 0A FF 00 AD DA 03 05 00 0A FF 00 AD DA
03 01 00 0A 00 01 DC 2A 03 01 02 00 02 41 FD
03 01 00 0A 00 01 DC 2A 03 01 02 00 02 41 FD
03 01 00 0A 00 01 DC 2A 03 01 00 00 00 0B 7C 2F
03 01 00 00 00 0B 7C 2F 03 01 00 00 00 0B 7C 2F
03 01 00 00 00 0B 7C 2F 03 01 00 00 00 0B 7C 2F
03 01 00 00 00 0B 7C 2F 03 01 00 00 00 0B 7C 2F
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
03 01 00 00 00 0B 7C 2F 03 01 02 00 00 C0 3C
非常感谢做过的高手指点!!
[解决办法]
http://www.machinelife.net/ MODBUS协议文章