仪器网(yiqi.com)欢迎您!

| 注册 登录
网站首页-资讯-专题- 微头条-话题-产品- 品牌库-搜索-供应商- 展会-招标-采购- 社区-知识-技术-资料库-方案-产品库- 视频

问答社区

上位机是modbud rtu通过串口服务器是不是要改成modbus tcp

千万不要看这里 2014-10-16 05:53:24 269  浏览
  •  

参与评论

全部评论(1条)

获取验证码
我已经阅读并接受《仪器网服务协议》

热门问答

上位机是modbud rtu通过串口服务器是不是要改成modbus tcp
 
2014-10-16 05:53:24 269 1
串口服务器和Modbus TCP/RTU 网关是同一回事吗?
用DCS和PLC进行通讯,DCS只支持Modbus RTU协议,PLC只支持Modbus TCP协议,DCS作为Modbus主站,PLC作为Modbus从站,已知HMS的Anybus AB9005、TSC的MD210等可以用来解决这个问题,上述设备和所谓的串口服务器是一回事吗?
2014-05-08 01:12:37 563 2
GPRS RTU模块可以将modbus TCP转换成modbus RTU吗?或是将modbus RTU转换成modbus TCP?
 
2014-12-21 15:17:31 284 1
modbus rtu串口通信
公司买了一个温度巡检仪,功能有限,我想通过自己做的软件来增强巡检仪的功能,但对串口通信编程知之甚少。现通过监控原程序得到以下数据:write requests: 01 03 00 01 00 01 D5 CA 01 01 00 50 00 20 3D C3 01 03 00 60 00 10 44 18 read requests: 01 03... 公司买了一个温度巡检仪,功能有限,我想通过自己做的软件来增强巡检仪的功能,但对串口通信编程知之甚少。现通过监控原程序得到以下数据:write requests: 01 03 00 01 00 01 D5 CA 01 01 00 50 00 20 3D C3 01 03 00 60 00 10 44 18 read requests: 01 03 02 00 02 39 85 01 01 04 00 00 00 00 FB D1 01 03 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 4E 20 AE 38 从中能不能翻译出什么东西?? 后来我又根据已有资料及网上相关程序编写了以下通讯程序: Private Sub Command1_Click() '发请求 Dim btSend(23) As Byte btSend(0) = &H1 '目标站号 btSend(1) = &H3 '功能码 btSend(2) = &H0 'I0.0地址(0000)高字节 btSend(3) = &H1 'i0.0地址(0000)低字节 btSend(4) = &H0 '读取个数高字节 btSend(5) = &H1 '读取个数低字节 btSend(6) = &HD5 btSend(7) = &HCA btSend(8) = &H1 btSend(9) = &H1 btSend(10) = &H0 btSend(11) = &H50 btSend(12) = &H0 btSend(13) = &H20 btSend(14) = &H3D btSend(15) = &HC3 btSend(16) = &H1 btSend(17) = &H3 btSend(18) = &H0 btSend(19) = &H60 btSend(20) = &H0 btSend(21) = &H10 btSend(22) = &H44 btSend(23) = &H18 ComK3.Output = CVar(btSend) Dim btReceive As Variant With ComK3 Do DoEvents Loop Until .InBufferCount = 5 .InputLen = 30 btReceive = .Input Text1.Text = Hex$(btReceive(1)) Text2.Text = Hex$(btReceive(2)) Text3.Text = Hex$(btReceive(3)) Text4.Text = Hex$(btReceive(4)) ' Text5.Text = Hex$(btReceive(5)) 'Text6.Text = Hex$(btReceive(6)) ' Text7.Text = Hex$(btReceive(7)) ' Text8.Text = Hex$(btReceive(8)) ' Text9.Text = Hex$(btReceive(9)) ' Text10.Text = Hex$(btReceive(10)) ' Text11.Text = Hex$(btReceive(11)) ' Text12.Text = Hex$(btReceive(12)) ' Text13.Text = Hex$(btReceive(13)) ' Text14.Text = Hex$(btReceive(14)) ' Text15.Text = Hex$(btReceive(15)) ' Text16.Text = Hex$(btReceive(16)) ' End If End With End Sub Private Sub Form_Load() With ComK3 .CommPort = 1 .Settings = "9600,N,8,2" .InputMode = comInputModeBinary '二进制收发 .InBufferSize = 512 .OutBufferSize = 512 If (Not .PortOpen) Then .PortOpen = True End With End Sub 能收到4个乱码,应该是错误标示,原程序待CRC验证,我验证不出,所以先删除了。期望大侠们帮我修改下程序 展开
2009-07-05 16:19:26 374 2
Modbus TCP和Modbus Rtu的区别
 
2017-10-02 23:41:54 359 1
Modbus TCP和Modbus Rtu协议的区别
 
2017-04-08 13:22:10 492 1
Modbus TCP和Modbus Rtu协议的区别
 
2016-09-21 03:10:16 469 1
Modbus TCP和Modbus Rtu协议的区别
 
2015-11-15 08:28:45 332 1
modbus tcp 到 rtu的转换
 
2010-09-12 00:16:45 384 1
谁做过modbus tcp服务器客户端通信
 
2017-03-03 01:24:59 388 1
modbus TCP故障代码的返回格式是什么,是TCP,不是RTU
 
2017-12-04 04:58:30 666 2
modbus rtu与modbus tcp各用什么通讯线
 
2017-05-11 02:36:06 383 2
同等距离modbus tcp 比modbus rtu 速度快吗
 
2017-07-05 06:09:42 400 1
modbus RTU和modbus TCP能同时使用么
 
2017-08-14 04:39:33 431 1
modbus tcp和mdbus rtu有什么区别
 
2017-08-14 20:21:20 415 1
tcp网络如何发送modbus rtu命令
 
2018-11-22 02:01:13 252 0
西门子S7-1200 PLC与C#(上位机)通讯(TCP协议)
只要可以读写寄存器就可以了 首先建立连接了,如何编码?看了很久的手册也不是很明白,以前用过三菱的。 可以举个列子,高速我方法就可乐
2017-08-09 07:52:28 734 2
modbus rtu通信协议详解以及与modbus tcp通信协议之间的区别和联系
 
2017-06-07 09:21:30 440 1
本人现在在做modbus rtu 协议 上位机与智能仪表通信 希望高手指点一下
自己程序谢了 读仪表地址01的值,读到txt2.text中 程序如下: Private Sub Form_Load() '初始化串口 MSComm1.CommPort = 1 '选择串口 MSComm1.Settings = "9600,E,8,1" '设... 自己程序谢了 读仪表地址01的值,读到txt2.text中 程序如下: Private Sub Form_Load() '初始化串口 MSComm1.CommPort = 1 '选择串口 MSComm1.Settings = "9600,E,8,1" '设置通信参数 MSComm1.InputMode = comInputModeBinary '设置接受数据为二进制形式 MSComm1.InBufferSize = 512 MSComm1.OutBufferSize = 512 MSComm1.InputLen = 0 '从接受缓冲区读取全部数据 Timer1.Interval = 100 Timer1.Enabled = True Timer2.Interval = 10 Timer2.Enabled = False 'MSComm1.SThreshold = 1 ' If Not MSComm1.PortOpen Then MSComm1.PortOpen = True ' End If End Sub Function crc16(ByRef cmdstring() As Byte, ByVal j As Integer) Dim data As Integer Dim i As Integer Dim k As Integer Dim Addressreg_crc As Long Addressreg_crc = &HFFFF For i = 0 To j Addressreg_crc = Addressreg_crc Xor cmdstring(i) For k = 0 To 7 data = Addressreg_crc And &H1 If data Then Addressreg_crc = Addressreg_crc \ 2 ' Addressreg_crc = Addressreg_crc And &H7FFF Addressreg_crc = Addressreg_crc Xor &HA001 Else Addressreg_crc = Addressreg_crc \ 2 ' Addressreg_crc = Addressreg_crc And &H7FFF End If Next k Next i Hibyte = Addressreg_crc And &HFF Lobyte = (Addressreg_crc And &HFF00) / &H100 End Function Private Sub timer1_timer() MSComm1.OutBufferCount = 0 '清空接受缓冲区 Dim sendstr(8) As Byte sendstr(0) = &H1 sendstr(1) = &H3 sendstr(2) = &H0 sendstr(3) = &H1 sendstr(4) = &H0 sendstr(5) = &H1 Call crc16(sendstr(), 5) sendstr(5) = Hibyte sendstr(6) = Lobyte MSComm1.Output = sendstr '发送查询命令 Timer2.Enabled = True '启动定时器2 End Sub ' Private Function Hex2(ByRef c As String) As String ' Hex2 = Hex(CInt(c)) 'If Len(Hex2) < 2 Then 'Hex2 = "0" & Hex2 'End If 'End Function Private Sub Timer2_Timer() Dim inputbuf As String '接收数组 Dim inputsafebuf() As Byte '安全数组 Dim index As Integer inputbuf = "" ' MSComm1.RThreshold = 7 inputsafebuf = MSComm1.Input '将输入缓冲区中的数据放入安全数组中 Select Case MSComm1.CommEvent Case comEvReceive For index = 0 To UBound(inputsafebuf) - 1 If Len(Hex(inputsafebuf(index))) = 1 Then inputbuf = inputbuf & "0" & inputsafebuf(index) Else inputbuf = inputbuf & inputsafebuf(index) End If Next index '将安全数组中的数据放入接收数组中 ' n = Val("&H" & CStr(Mid(inputbuf, 5, 2))) '字符数 ' If Mid(inputbuf, 1, 2) = 1 And Mid(inputbuf, 3, 2) = 3 And Mid(inputbuf, 5, 2) = 2 Then txt2.Text = Val("&H" & CStr(Mid(inputbuf, 7, 4))) ' End If Case comEvSend Exit Sub End Select End Sub 展开
2011-09-22 08:32:51 458 3
威纶modbus协议里面的rtu over tcp是什么意思
 
2017-09-14 23:11:57 411 1

5月突出贡献榜

推荐主页

最新话题