使用 C# 为自动化研究员提供 Modbus 数据提供程序

Sudipto Chakraborty, Sreeramana Aithal
{"title":"使用 C# 为自动化研究员提供 Modbus 数据提供程序","authors":"Sudipto Chakraborty, Sreeramana Aithal","doi":"10.47992/ijcsbe.2581.6942.0285","DOIUrl":null,"url":null,"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.","PeriodicalId":350972,"journal":{"name":"International Journal of Case Studies in Business, IT, and Education","volume":"71 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2023-07-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Modbus Data Provider for Automation Researcher Using C#\",\"authors\":\"Sudipto Chakraborty, Sreeramana Aithal\",\"doi\":\"10.47992/ijcsbe.2581.6942.0285\",\"DOIUrl\":null,\"url\":null,\"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.\",\"PeriodicalId\":350972,\"journal\":{\"name\":\"International Journal of Case Studies in Business, IT, and Education\",\"volume\":\"71 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-07-19\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"International Journal of Case Studies in Business, IT, and Education\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.47992/ijcsbe.2581.6942.0285\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"International Journal of Case Studies in Business, IT, and Education","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.47992/ijcsbe.2581.6942.0285","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

目的:Modbus 是工业自动化设备间数据交换的常用协议。与其他协议相比,它具有抗噪声、长距离覆盖和易于与微控制器串行模块集成等优点。有时,我们需要为研究工作提供数据的设备。在此,我们将演示一个程序,以便研究人员创建一个虚拟的 Modbus 客户端,为研究工作获取 Modbus 数据。我们在 Visual Studio 中用 C# 语言创建了一个 Modbus 客户端。我们添加了几个模块,如 Modbus 客户端、串行模块和消息显示。我们还添加了几个图形用户界面元素来控制应用程序。项目代码可在 GitHub 上获取。研究人员可以根据自己的需要获取和定制。设计/方法/途径:我们用 C# 创建了一个应用程序。该应用程序有几个模块。主要模块是 Modbus 客户端。外部设备通过 USB 至 RS485 转换器连接。应用程序启动时,会创建 COM 对象。同时还启动了一个定时器。其间隔为一毫秒。它检查数据是否到达。一旦串行对象接收到数据,数据包就会传递给 Modbus 客户端。Modbus 客户端开始解析接收到的数据包。如果数据包没有问题,则提取命令。根据接收到的命令,创建响应数据包并添加所请求寄存器的数据。计算 CRC 并将其添加到数据包末尾。准备好数据包后,将响应发送回主站。发现/结果:有时,自动化研究人员没有设备来提供研究数据。通过这项研究工作,我们提供了一个程序,使研究人员可以创建一个虚拟 Modbus 客户端,为他们的研究工作提供数据。因此,它可以帮助研究人员使用他们的工作系统获取数据。我们使用 9600 波特率对其进行了多次测试。它工作完美,没有任何问题。研究人员可将其作为软件工具用于研究工作。原创性/价值:有多种软件程序可通过 Modbus 提供数据。有时我们需要根据自己的要求定制软件。大多数软件都不是开源的,因此我们在此提供一个应用程序,以便研究人员可以优化和定制代码,从而为他们的研究工作提供一些有价值的资源。论文类型:基于实验的研究。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Modbus Data Provider for Automation Researcher Using C#
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.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Go Green: ReUse LED Tube Light and Make it WhatsApp Enabled Using ESP Module, Twilio, and ThingESP Uplifting Brand Equity to Unprecedented levels by Introducing Purpose as the New 8th 'P' in the Marketing Mix Unlocking Potential in the Chemical Industry Sector: An Innovative SWOT Analysis Study Quantitative ABCD Analysis: Indian Household and Personal Care Sector Jung Personality Complexes: Evidence from Mahabharata Characters
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1