Summary of the most complete example data in Modbus history
1 Introduction
Modbus protocol is a universal language applied to electronic controllers. Through this protocol, the controllers can communicate with each other, and between the controllers and other devices via a network (such as Ethernet). It has become a general industry standard. With it, control equipment produced by different manufacturers can be connected to an industrial network for centralized monitoring. This protocol defines the message structure that a controller can recognize and use, regardless of what kind of network they communicate through. It describes the process of a controller requesting access to other devices, how to respond to requests from other devices, and how to detect and record errors. It has formulated a common format for the structure and content of the message domain.
When communicating on the same Modbus network, this protocol determines that each controller needs to know their device address, identify the message sent by the address, and decide what action to take. If a response is needed, the controller will generate feedback information and send it out using the Modbus protocol. On other networks, messages containing the Modbus protocol are converted to the frame or packet structure used on this network. This conversion also expands the method of solving node addresses, routing paths, and error detection based on specific networks.
This protocol supports traditional RS-232, RS-422, RS-485 and Ethernet equipment. Many industrial equipment, including PLC, DCS, smart meters, etc. are using Modbus protocol as the communication standard between them.
2. Porting and practice articles
2.1 Article
Porting and practice of FreeModbus in small embedded system: http://blog.csdn.net/zgkxzx/article/details/46560979
Porting and practice of libmodbus in linux embedded system: http://blog.csdn.net/zgkxzx/article/details/78231171
Android Modbus的实现–Modbus4Android:http://blog.csdn.net/zgkxzx/article/details/71630301
2.2 Open source library download address
libmobus: http://libmodbus.org/
( ps: upload it to CSDN to facilitate everyone to download, originally set up free, but there is no such option)
http://download.csdn.net/download/zgkxzx/10021543FreeModbus: https://www.freemodbus.org/
( ps: uploaded to CSDN, originally set up free, but there is no such option) http://download.csdn.net/download/zgkxzx/10021538Modbus4Android : https://github.com/zgkxzx/Modbus4Android
FreeModbus STM32 RTT version: https://github.com/zgkxzx/FreeModbus_Slave-Master-RTT-STM32
( ps: This library is FreeModbus ported on RT-thread domestic embedded operating system, made by armink god, master-slave mode With, easy to use, original address: https://github.com/armink/FreeModbus_Slave-Master-RTT-STM32 )
3. Resource summary
Modbus standard protocol document: https://pan.baidu.com/s/1sl7HcdR
Modbus detailed documentation: https://pan.baidu.com/s/1i4FiDLj
Modbus debugging tools have both Master and slave modes: https://pan.baidu.com/s/1kVMMvX1
libmobus linux best implementation library: http://libmodbus.org/
http://download.csdn.net/download/zgkxzx/10021543FreeModbus Embedded System Best Implementation Library: https://www.freemodbus.org/
http://download.csdn.net/download/zgkxzx/10021538The best implementation library download address of Modbus4Android Android: https://github.com/zgkxzx/Modbus4Android
FreeModbus STM32 RTT version STM32 and other microcontrollers are the best libraries for implementing a lightweight operating system: https://github.com/zgkxzx/FreeModbus_Slave-Master-RTT-STM32
- Modbus4J java's modbus implementation library https://github.com/infiniteautomation/modbus4j
<li class="tool-item tool-active is-like "><a href="javascript:;"><svg class="icon" aria-hidden="true"> <use xlink:href="#csdnc-thumbsup"></use> </svg><span class="name">点赞</span> <span class="count">17</span> </a></li> <li class="tool-item tool-active is-collection "><a href="javascript:;" data-report-click="{"mod":"popu_824"}"><svg class="icon" aria-hidden="true"> <use xlink:href="#icon-csdnc-Collection-G"></use> </svg><span class="name">收藏</span></a></li> <li class="tool-item tool-active is-share"><a href="javascript:;" data-report-click="{"mod":"1582594662_002"}"><svg class="icon" aria-hidden="true"> <use xlink:href="#icon-csdnc-fenxiang"></use> </svg>分享</a></li> <!--打赏开始--> <!--打赏结束--> <li class="tool-item tool-more"> <a> <svg t="1575545411852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M179.176 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5718"></path><path d="M509.684 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5719"></path><path d="M846.175 499.222m-113.245 0a113.245 113.245 0 1 0 226.49 0 113.245 113.245 0 1 0-226.49 0Z" p-id="5720"></path></svg> </a> <ul class="more-box"> <li class="item"><a class="article-report">文章举报</a></li> </ul> </li> </ul> </div> </div> <div class="person-messagebox"> <div class="left-message"><a href="https://blog.csdn.net/zgkxzx"> <img src="https://profile.csdnimg.cn/D/9/C/3_zgkxzx" class="avatar_pic" username="zgkxzx"> <img src="https://g.csdnimg.cn/static/user-reg-year/1x/9.png" class="user-years"> </a></div> <div class="middle-message"> <div class="title"><span class="tit"><a href="https://blog.csdn.net/zgkxzx" data-report-click="{"mod":"popu_379"}" target="_blank">深秋风瘦</a></span> </div> <div class="text"><span>发布了34 篇原创文章</span> · <span>获赞 41</span> · <span>访问量 6万+</span></div> </div> <div class="right-message"> <a href="https://im.csdn.net/im/main.html?userName=zgkxzx" target="_blank" class="btn btn-sm btn-red-hollow bt-button personal-letter">私信 </a> <a class="btn btn-sm bt-button personal-watch" data-report-click="{"mod":"popu_379"}">关注</a> </div> </div> </div> </article>