Modbus Data Provider for Automation Researcher Using C#

Main Article Content

Sudip Chakraborty
Aithal P. S.

Abstract

Purpose: Modbus is a popular protocol for data exchange between devices in industrial automation. It has several advantages over other protocols, like noise immunity, long-distance coverage, and easy integration with the microcontroller's serial module. Sometimes we need a device that provides data for our research work. Here we demonstrate a procedure so researchers can create a virtual Modbus client to get Modbus data for their research work. We created a Modbus client in C# language In Visual Studio. We added a couple of modules, Like the Modbus client, serial module, and message display. We added a couple of graphical user interface elements to control the application. The project code is available on GitHub. The researcher can get and customize according to their needs.


Design/Methodology/Approach: We created an application in C#. The application has several modules. The main module is the Modbus client. The external device is connected through USB to RS485 converter. When our application starts, the COM object is created. One timer is also started. Its interval is one millisecond. It checks whether the data is reached or not. Once the serial object receives the data, the packet is passed to that Modbus client. The Modbus client starts parsing the received packet. If the packet is OK, then, Extract the command. According to the received command, it created a response packet and added the data of the requested register. Calculate the CRC and add it at the end of the packet. After preparing the packet, send a response back to the master.


Findings/Result: Sometimes, the automation researcher does not have the device to provide the research data. Through this research work, we provide a procedure so the researcher can create a virtual Modbus client to provide the data for their research work. So it can be helpful to the researcher to get the data using their working system. We tested it several times with the baud rate of 9600. It is working perfectly without any issues. Researchers can use it for their research work as a software tool.


Originality/Value: Several software programs are available to provide the data over the Modbus. Sometimes we need to customize the software according to our requirements. Most of the software is not open source, so here we provide an application so that researchers can optimize and customize the code for their research work so it can provide them with some valuable resources.


Paper Type: Experimental-based Research.

Article Details

How to Cite
Sudip Chakraborty, & Aithal P. S. (2023). Modbus Data Provider for Automation Researcher Using C#. International Journal of Case Studies in Business, IT and Education (IJCSBE), 7(3), 1–7. https://doi.org/10.47992/IJCSBE.2581.6942.0285
Section
Articles

Most read articles by the same author(s)

<< < 1 2 3 4 5 6 7 8 > >>