如何获得用于RS-485通信的Modbus协议 [英] How to get Modbus Protocol for RS-485 Communication

查看:238
本文介绍了如何获得用于RS-485通信的Modbus协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hai All,

现在我正在努力使用MODBUS通信协议进行Rs-485通信。我应该如何通过RS-485通信我的设备。现在我没有从这些串口通信中获得任何数据。

任何人都可以向我解释如何使用RS-485通信设备。



感谢ADV,

Hai All,
Now i am struggling with MODBUS communication protocol for Rs-485 Communication. And how should i communicate my Device via RS-485. Now i didn't get any data from these serialport communication.
Can any one explain me how to communicate devices with RS-485 .

Thanks in ADV,

推荐答案

WIN32 C++ code RS485 modbus 4 way relay module. Best compiled with MS Visual studio.
Open source project will allow you to customize according to your requirements. No closed source limitations.

MessageBox(NULL,"WIN32 C++ for MS Visual Studio Rules!",NULL,NULL);





rs485modbus下载| SourceForge.net [ ^ ]


据我所知,使用RS-485可以使用与RS-232完全相同的类: System.IO.Ports.SerialPort ,请参阅:

http:// msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx [ ^ ]。



请参阅:

http://en.wikipedia.org/wiki/Rs-232 [ ^ ],

http://en.wikipedia.org/wiki/RS-485 [ ^ ]。



通过串口工作的Modbus协议是很平常的事情,即使它的串行变体已经过时(希望如此)。最有可能的是,您将使用协议的Modbus RTU或Modbus ASCII版本。请参阅:

http://en.wikipedia.org/wiki/Modbus [< a href =http://en.wikipedia.org/wiki/Modbustarget =_ blanktitle =New Window> ^ ],

http://www.modbus.org/ [ ^ ]。



-SA
To best of my knowledge, to work with RS-485, you can use exact same class you would use with RS-232: System.IO.Ports.SerialPort, please see:
http://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx[^].

Please see:
http://en.wikipedia.org/wiki/Rs-232[^],
http://en.wikipedia.org/wiki/RS-485[^].

Modbus protocol working through a serial port is a very usual thing, even though the serial variants of it are getting obsolete (hopefully). Most likely, you will use Modbus RTU or Modbus ASCII versions of the protocol. Please see:
http://en.wikipedia.org/wiki/Modbus[^],
http://www.modbus.org/[^].

—SA


这篇关于如何获得用于RS-485通信的Modbus协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆