MODBUS is a communication protocol over a variety of  networks such as RS232 and Ethernet which was designed by Modicon.

It has been used widely since last several ten years and FreeMODBUS is a free implementation of this popular MODBUS protocol. 


Recently I wanted to have a tool to share data between some embedded devices over serial connection or ethernet and heard MODBUS can be a starting point for such purpose. So this is the outcome.


This MBServer ( a sample MODBUS TCP server) supports Qt5 but for now no GUI. Later I will put some GUI on it to talk with devices which can support MODBUS. For someone with interests on this can find source tree in the following link.  


https://github.com/seetime/freeMBServer/


How to build:


You need to have Cmake to generate Visual studio C++ project file.


First download source file and enter the root folder


cd <MBServer_root_dir>

mkdir build

cd build

cmake ..


With the project file generated, open it in Visual studio IDE and build and run.

 

For test, I used a MODBUS Diagnostick tool such as Modsak.  



Conclusion.


If someone need to develop application to talk with remote device over serial or Ethernet, MODBUS can be a option for such. This post could be helpful for someone searching or wanting to develop a basic MODBUS server tool. 


Posted by kevino
,