[go: up one dir, main page]

CN101262486B - Modbus bus analysis system based on built-in platform - Google Patents

Modbus bus analysis system based on built-in platform Download PDF

Info

Publication number
CN101262486B
CN101262486B CN2008101044001A CN200810104400A CN101262486B CN 101262486 B CN101262486 B CN 101262486B CN 2008101044001 A CN2008101044001 A CN 2008101044001A CN 200810104400 A CN200810104400 A CN 200810104400A CN 101262486 B CN101262486 B CN 101262486B
Authority
CN
China
Prior art keywords
analysis
modbus
analysis system
bus
serial port
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2008101044001A
Other languages
Chinese (zh)
Other versions
CN101262486A (en
Inventor
周树桥
张晓彬
田丰
姚煜丰
慕春棣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN2008101044001A priority Critical patent/CN101262486B/en
Publication of CN101262486A publication Critical patent/CN101262486A/en
Application granted granted Critical
Publication of CN101262486B publication Critical patent/CN101262486B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

基于嵌入式平台的Modbus总线分析系统,其属于遵循Modbus总线协议的设备或网络的分析技术领域,其特征在于,含有核心板,由CPU S3C2410、内存和闪存构成,配有与上位机交互的交互用软件模块,以及通过配置文件分析与交互用软件模块互连的分析用软件模块;通讯子板,含有采用芯片CS8900的10M以太网口、采用芯片MAX232的第一DB9串口以及采用芯片488的第二DB9串口;所述核心板通过SO-DIMM接口、通讯子板通过PC104总线分别与Modbus分析装置母板的底板总线相连,而核心板与通讯子板间的通信由所述母板实现。该分析装置可以在串行链路模式下分别与上位机和待分析Modbus设备或网络相连,也可在TCP/IP模式下通过以太网实现。本发明填补了现有Modbus总线分析相关技术的空白。

Figure 200810104400

The Modbus bus analysis system based on the embedded platform belongs to the field of analysis technology of devices or networks following the Modbus bus protocol. Software modules for analysis and analysis software modules interconnected through configuration file analysis and interactive software modules; communication sub-boards include 10M Ethernet ports using chip CS8900, the first DB9 serial port using chip MAX232, and the first DB9 serial port using chip 488 Two DB9 serial ports; the core board is connected with the backplane bus of the Modbus analysis device motherboard through the SO-DIMM interface and the communication sub-board respectively, and the communication between the core board and the communication sub-board is realized by the motherboard. The analysis device can be respectively connected with the upper computer and the Modbus device or network to be analyzed in the serial link mode, and can also be realized through Ethernet in the TCP/IP mode. The invention fills up the gap in the existing technology related to Modbus bus analysis.

Figure 200810104400

Description

基于嵌入式平台的Modbus总线分析系统 Modbus Bus Analysis System Based on Embedded Platform

技术领域technical field

本发明涉及一种基于嵌入式平台的分析系统及其分析方法,尤指应用于Modbus总线设备的分析系统及其分析方法。The invention relates to an analysis system and an analysis method based on an embedded platform, in particular to an analysis system and an analysis method applied to Modbus bus equipment.

背景技术Background technique

相关技术参考内容如下:Related technical references are as follows:

专利方面,通过国家知识产权局的专利检索平台发现,Modbus协议的相关研究均集中于协议本身的实现以及Modbus协议与其他协议的转换,目前没有发现Modbus设备分析相关装置的新发明和应用。In terms of patents, through the patent search platform of the State Intellectual Property Office, it is found that the related research on the Modbus protocol is focused on the realization of the protocol itself and the conversion between the Modbus protocol and other protocols. At present, no new inventions and applications of Modbus equipment analysis related devices have been found.

现有有关Modbus协议的6项发明专利和1项实用新型专利如下:The existing 6 invention patents and 1 utility model patent related to the Modbus protocol are as follows:

  1 1   Modbus/TCP工业以太网和设备网现场总线间的协议转换方法和装置Protocol Conversion Method and Device Between Modbus/TCP Industrial Ethernet and DeviceNet Fieldbus   2 2   Modbus/TCP工业以太网和Profibus DP现场总线间的协议转换方法和装置Protocol conversion method and device between Modbus/TCP industrial Ethernet and Profibus DP field bus 33   Modbus/TCP工业以太网与设备网现场总线和Profibus DP现场总线间的多协议转换方法和装置Multi-protocol conversion method and device between Modbus/TCP industrial Ethernet, equipment network field bus and Profibus DP field bus   44   一种Modbus与DeviceNet间的协议转换方法A protocol conversion method between Modbus and DeviceNet   55   供Modbus设备网络和Fieldbus设备网络使用的接口模块Interface module for Modbus device network and Fieldbus device network   66   能产生Modbus CRC错误并对错误进行比较、显示的系统及其方法System and method capable of generating Modbus CRC errors and comparing and displaying errors   77   可编程控制器的Modbus网络接口转换器Modbus Network Interface Converter for Programmable Controllers

学术论文方面,通过清华大学的跨库检索引擎,发现Modbus协议的相关研究均集中于其协议本身的,或协议本身的改进、或在某硬件平台上实现而已,目前没有相关文献显示有针对Modbus总线设备的分析方法及系统的开发和研究。In terms of academic papers, through the cross-database search engine of Tsinghua University, it is found that the relevant research on the Modbus protocol is focused on the protocol itself, or the improvement of the protocol itself, or its implementation on a certain hardware platform. The analysis method and system development and research of bus equipment.

1979年至2008年间,标题含“Modbus”的文献记录如下:Between 1979 and 2008, the literature records with "Modbus" in the title are as follows:

  1 1   中国期刊网China Journal Network   300条300 pieces   2 2   中国优秀硕士学位论文全文数据库China Excellent Master's Dissertation Full-text Database   25条25 pieces   33   中国重要会议全文数据库China's important conference full-text database   14条14

  44   中国博士学位论文全文数据库China Doctoral Dissertation Full-text Database   0条0   55   中国重要报纸全文数据库China's important newspaper full-text database   0条0   合计Total   339条339 items

以上339条文献记录,可分为Modbus协议在嵌入式系统上的实现,Modbus协议的应用、Modbus与其他协议的转换以及协议本身的研究四大类,目前没有发现涉及对Modbus设备进行分析的方法探讨和相关研究的文献。The above 339 literature records can be divided into four categories: the realization of the Modbus protocol on the embedded system, the application of the Modbus protocol, the conversion between Modbus and other protocols, and the research on the protocol itself. At present, no methods involving the analysis of Modbus devices have been found. Discussion and related research literature.

而目前Modbus设备的开发调试过程,以及Modbus设备运行过程中的在线检测都对Modbus总线设备的分析方法以及相关的装置有着迫切的需求。At present, the development and debugging process of Modbus equipment and the online detection during the operation of Modbus equipment have an urgent demand for the analysis method of Modbus bus equipment and related devices.

发明内容Contents of the invention

为适应当前开发Modbus总线设备以及Modbus总线设备在线分析的需要,填补该项市场空缺,本发明利用现有嵌入式系统技术,开发了Modbus总线设备分析系统。该分析系统基于三星S3C2410硬件平台和嵌入式Linux操作系统,针对分析需求实现并扩展了完整的Modbus总线协议栈。在此基础上,自主设计了一整套分析策略,具备可配置的手动、自动分析功能。并结合嵌入式开源Web Server软件平台boa,构建嵌入式Web服务器作为分析系统的人机交互接口,以实现对分析系统工作模式、待分析参数、功能码类型及Modbus数据帧内容的设置。In order to meet the needs of the current development of Modbus bus equipment and the online analysis of Modbus bus equipment, and to fill the market vacancy, the present invention utilizes the existing embedded system technology to develop a Modbus bus equipment analysis system. The analysis system is based on Samsung S3C2410 hardware platform and embedded Linux operating system, and implements and expands a complete Modbus bus protocol stack for analysis requirements. On this basis, a set of analysis strategies has been independently designed, with configurable manual and automatic analysis functions. And combined with the embedded open source Web Server software platform boa, the embedded Web server is constructed as the human-computer interaction interface of the analysis system to realize the setting of the analysis system's working mode, parameters to be analyzed, function code types and Modbus data frame content.

本发明所涉及的Modbus工业控制总线协议符合GB/Z 19582.1-2004国家标准,它由中国机械工业联合会提出,机械工业仪器仪表综合技术经济研究所、施耐德电气(中国)投资有限公司等多家公司与研究机构共同起草而成。该标准用于工业自动化设备的通信链路标准,采用开放系统互连OSI模型中的应用层报文传输协议,在连接至不同类型总线或网络的设备之间提供客户机/服务器通信。国标Modbus协议分为三个部分:Modbus应用协议,Modbus协议在串行链路上的实现指南,Modbus协议在TCP/IP上的实现指南,分别如附图1中的加粗黑框所示。The Modbus industrial control bus protocol involved in the present invention complies with the GB/Z 19582.1-2004 national standard, which is proposed by the China Machinery Industry Federation, the Institute of Comprehensive Technology and Economics of Machinery Industry Instrumentation, Schneider Electric (China) Investment Co., Ltd., etc. Drafted jointly by the company and research institutions. This standard is used as a communication link standard for industrial automation equipment. It uses the application layer message transmission protocol in the Open System Interconnection OSI model to provide client/server communication between devices connected to different types of buses or networks. The national standard Modbus protocol is divided into three parts: the Modbus application protocol, the implementation guide of the Modbus protocol on the serial link, and the implementation guide of the Modbus protocol on the TCP/IP, as shown in the bold black box in Figure 1 respectively.

本发明Modbus分析系统的分析对象便是基于上述协议标准的Modbus设备或者由Modbus设备所组成的网络。The analysis object of the Modbus analysis system of the present invention is the Modbus device based on the above-mentioned protocol standard or the network composed of Modbus devices.

本发明的特征在于:The present invention is characterized in that:

所述Modbus总线设备是一种采用开放系统互连模型OSI中的应用层报文传输协议,在连接至不同类型总线或网络的设备之间提供客户机/服务器通信的设备,所述的分析系统含有:Modbus总线设备分析系统母板、核心板以及通讯子板,其中:The Modbus bus device is a device that adopts the application layer message transmission protocol in the open system interconnection model OSI to provide client/server communication between devices connected to different types of buses or networks. The analysis system Contains: Modbus bus equipment analysis system motherboard, core board and communication daughter board, of which:

核心板,包括中央处理器S3C2410以及与其相连的内存和闪存,共同通过SO-DIMM接口与所述Modbus总线设备分析系统母版的底板总线相连,其中:The core board, including the central processing unit S3C2410 and the memory and flash memory connected to it, are jointly connected with the backplane bus of the Modbus bus device analysis system master board through the SO-DIMM interface, wherein:

闪存在掉电情况下驻留有分析用软件模块和交互用软件模块,其中:The flash memory hosts software modules for analysis and software modules for interaction in the case of power-down, where:

分析用软件模块,用于与被分析的Modbus总线设备的底层Modbus数据帧通信,所述分析用软件模块包括嵌入式Linux操作系统、Modbus总线软件协议栈,以及主站及从站管理单元,其中:The analysis software module is used to communicate with the bottom Modbus data frame of the analyzed Modbus bus device, and the analysis software module includes an embedded Linux operating system, a Modbus bus software protocol stack, and a master station and a slave station management unit, wherein :

嵌入式Linux操作平台,是针对所述中央处理器S3C2410而构建的,用于管理所述分析系统整个硬件设备资源及框架;The embedded Linux operating platform is constructed for the central processing unit S3C2410, and is used to manage the entire hardware device resources and framework of the analysis system;

Modbus总线软件协议栈,用于全面分析Modbus总线设备及网络对于各种不同类型数据帧的响应情况,所述Modbus总线软件协议栈通过硬件资源访问接口和所述嵌入式Linux操作系统互连;The Modbus bus software protocol stack is used to comprehensively analyze the responses of Modbus bus devices and networks to various different types of data frames, and the Modbus bus software protocol stack is interconnected with the embedded Linux operating system through a hardware resource access interface;

主站与从站管理软件单元,完成对所述交互式软件模块所生成的配置文件的解析、Modbus通信数据帧的分析、以及记录和分析数据的统计生成,通过帧数据接口与所述Modbus总线软件协议栈互连;The master station and the slave station management software unit complete the analysis of the configuration file generated by the interactive software module, the analysis of the Modbus communication data frame, and the statistical generation of the record and analysis data, and communicate with the Modbus bus through the frame data interface Software protocol stack interconnection;

该分析用软件模块依次按以下步骤运行:The analysis software module runs in sequence as follows:

步骤(1),首先在闪存相应位置找到配置文件,解析该配置文件并对所述分析系统的相关硬件接口进行配置,所述配置文件是上位机通过所述交互用软件模块保存于所述闪存中的;Step (1), first find the configuration file in the corresponding position of the flash memory, analyze the configuration file and configure the relevant hardware interface of the analysis system, the configuration file is stored in the flash memory by the host computer through the interactive software module middle;

步骤(2),按所述配置文件中的配置信息,运行相应的分析策略,开始分析;Step (2), according to the configuration information in the configuration file, run the corresponding analysis strategy, start analysis;

步骤(3),记录并解析分析结果,按预定格式形成结果文件保存在所述闪存的相应位置,由所述交互用软件模块上传至所述上位机;Step (3), recording and parsing the analysis results, forming a result file in a predetermined format and storing it in the corresponding position of the flash memory, and uploading it to the host computer by the interactive software module;

交互用软件模块,供上位机使用通用的因特网浏览器与所述分析系统进行交互,为上位机的操作人员提供配置底层通信参数及分析策略的人机界面,以及在操作人员与底层软件之间提供参数和结果,该交互用软件模块包含:嵌入式Web服务器boa,以及cgi网页脚本,其中:The software module for interaction is used for the upper computer to use a general-purpose Internet browser to interact with the analysis system, to provide the operator of the upper computer with a man-machine interface for configuring the underlying communication parameters and analysis strategies, and to communicate between the operator and the underlying software. Provide parameters and results, the interactive software module includes: embedded web server boa, and cgi web page script, wherein:

嵌入式Web服务器boa,用于架设Web网页服务;The embedded web server boa is used to set up web page services;

cgi网页脚本,运行在boa之上,用于向所述操作人员提供网页式人机交互界面,该cgi网页脚本通过用户配置、分析结果这两个接口与所述嵌入式Web服务器boa互连;The cgi webpage script runs on the boa, and is used to provide the operator with a webpage-type human-computer interaction interface. The cgi webpage script is interconnected with the embedded web server boa through the two interfaces of user configuration and analysis results;

该交互用软件模块在所述Linux操作系统初始化完硬件设备后被载入内存并自动按以下步骤运行:This interactive software module is loaded into the internal memory after the hardware device is initialized by the Linux operating system and automatically operates according to the following steps:

步骤(A),响应所述上位机对所述分析系统硬件接口的配置,接收该上位机提交的配置文件并保存在所述闪存中;Step (A), responding to the configuration of the analysis system hardware interface by the host computer, receiving the configuration file submitted by the host computer and storing it in the flash memory;

步骤(B),按照所述上位机的配置,启动相应的所述分析用软件模块;Step (B), according to the configuration of the host computer, start the corresponding software module for analysis;

步骤(C),上传步骤(B)中的分析结果;Step (C), uploading the analysis results in step (B);

通信子板,含有:10M以太网口、第一DB9串口以及第二DB9串口,其中:Communication daughter board, including: 10M Ethernet port, the first DB9 serial port and the second DB9 serial port, of which:

10M以太网接口采用芯片CS8900,实现TCP/IP协议栈物理层和介质访问控制层MAC;The 10M Ethernet interface adopts the chip CS8900 to realize the physical layer of the TCP/IP protocol stack and the MAC layer of the medium access control layer;

第一DB9串口,在RS232协议下工作,采用MAX232和DB9接口,The first DB9 serial port, working under RS232 protocol, adopts MAX232 and DB9 interface,

第二DB9串口,在RS485协议下工作,采用MAX488芯片和DB9串口;The second DB9 serial port works under the RS485 protocol, using MAX488 chip and DB9 serial port;

所述10M以太网口、第一DB9串口、第二DB9串口共同通过PC104总线与所述母板的底板总线相连,所述通讯子板与核心板之间的通讯由所述母板支持。The 10M Ethernet port, the first DB9 serial port, and the second DB9 serial port are jointly connected to the backplane bus of the motherboard through the PC104 bus, and the communication between the communication sub-board and the core board is supported by the motherboard.

在串行链路模式下,所述分析系统与所述上位机及待分析Modbus设备或网络按以下方式连接:In the serial link mode, the analysis system is connected with the host computer and the Modbus device or network to be analyzed in the following manner:

所述10M以太网口经网络设备与上位机相连,用于操作人员利用配置界面对所述分析系统进行远程操作及设置,The 10M Ethernet port is connected to the host computer via a network device, and is used for operators to remotely operate and set the analysis system through the configuration interface,

所述第二DB9串口与待分析Modbus设备或网络的485总线相连,用于完成与待分析Modbus设备或网络在串行链路模式下的Modbus协议通信。The second DB9 serial port is connected with the 485 bus of the Modbus device to be analyzed or the network, and is used to complete the Modbus protocol communication with the Modbus device to be analyzed or the network in the serial link mode.

所述第一DB9串口作为所述分析系统的底层调试接口,输出所述分析系统的Linux操作系统平台的相关运行信息,所述第一DB9串口通过RS232串口与上位机相连,在所述分析系统不能正常工作时还可利用该第一DB9串口输出的所述运行信息进行诊断及调试。The first DB9 serial port is used as the bottom-level debugging interface of the analysis system, and outputs the relevant operating information of the Linux operating system platform of the analysis system, and the first DB9 serial port is connected with the host computer through the RS232 serial port. In the analysis system When it fails to work normally, the operation information output by the first DB9 serial port can also be used for diagnosis and debugging.

在TCP/IP模式时下,所述分析系统与待分析Modbus设备或网络以及上位机按以下方式连接:In TCP/IP mode, the analysis system is connected to the Modbus device or network to be analyzed and the host computer in the following manner:

所述10M以太网口通过网络设备分别与上位机以及待分析Modbus设备或网络相连。The 10M Ethernet port is respectively connected to the upper computer and the Modbus device to be analyzed or the network through the network equipment.

本发明填充了Modbus总线设备或网络环境分析系统的空白。The invention fills the blank of Modbus bus equipment or network environment analysis system.

本发明的优点在于:The advantages of the present invention are:

1.利用现有的嵌入式系统技术,实现了功能完备的Modbus分析系统,填补了市场的空缺;1. Using the existing embedded system technology, the Modbus analysis system with complete functions has been realized, filling the gap in the market;

2.在标准Modbus协议栈的基础上针对不同的分析需求对协议进行了扩充与改造,从而可以实现链路层Modbus数据帧的灵活配置和判断;2. On the basis of the standard Modbus protocol stack, the protocol has been expanded and transformed for different analysis requirements, so that the flexible configuration and judgment of the Modbus data frame at the link layer can be realized;

3.基于标准Modbus实现分析功能,该系统能够以离线方式分析单台设备,亦可以在线方式分析整个运行中的Modbus网络;3. Based on the standard Modbus to realize the analysis function, the system can analyze a single device offline, and can also analyze the entire running Modbus network online;

4.嵌入式Linux操作系统的使用,有利于功能的丰富和产品的升级;4. The use of embedded Linux operating system is conducive to enriching functions and upgrading products;

5.嵌入式服务器boa的架设,分析结果的查看只需要利用上位机上的网络浏览器,可在本地查看,亦可远程查看,使得分析结果的获取方式十分灵活和方便。5. With the installation of the embedded server boa, the analysis results only need to use the web browser on the host computer, which can be viewed locally or remotely, making the acquisition of the analysis results very flexible and convenient.

附图说明Description of drawings

图1.国标Modbus协议的基本架构;Figure 1. The basic structure of the national standard Modbus protocol;

图2.Modbus分析系统硬件结构框图;Figure 2. Modbus analysis system hardware structure block diagram;

图3.分析系统软件结构整体框图;Figure 3. The overall block diagram of the analysis system software structure;

图4.基于串行链路模式时,分析系统与上位机及被分析对象间的信号连接;Figure 4. Based on the serial link mode, the signal connection between the analysis system and the host computer and the analyzed object;

图5.基于TCP/IP模式时,分析系统与上位机及被分析对象间的信号连接;Figure 5. Based on the TCP/IP mode, the signal connection between the analysis system, the host computer and the analyzed object;

图6.基于串行链路模式时,分析系统软件及数据接口流程;Figure 6. Based on the serial link mode, analyze the system software and data interface flow;

图7.基于TCP/IP模式时,分析系统软件及数据接口流程;Figure 7. Analysis system software and data interface flow when based on TCP/IP mode;

图8.主站分析策略示意图;Figure 8. Schematic diagram of the analysis strategy of the master station;

图9.从站分析策略示意图;Figure 9. Schematic diagram of the analysis strategy of the slave station;

图10.帧解析过程示意图;Figure 10. Schematic diagram of the frame parsing process;

图11.结果处理过程示意图。Figure 11. Schematic diagram of the result processing process.

具体实现方式Specific implementation

如附图2所示,分析系统的硬件分核心板、通讯子板和母板三部分组成。核心板通过SO-DIMM接口与母板相连接,通讯子板则通过PC104接口与母板相连。这样的多层结构便于硬件的设计、调试与升级。核心板包括中央处理器(CPU)、内存(RAM)和闪存(Flash)三部分,其生产厂商及型号分别为:Samsung S3C2410、Hynix HY57V551620CT-H、SamsungK9F1208U0B。通讯子板带有一个10M以太网口和两个全功能串口。以太网接口芯片采用Crystal公司的CS8900,其内部利用逻辑门电路硬件实现了TCP/IP协议栈物理层和MAC层部分的内容;串口1在标准的RS232协议下工作,采用MAX232和标准DB9接口实现;串口2用于扩展对待分析设备和网络的支持,在RS485协议下工作,由MAX488芯片和DB9接口实现。核心板和通讯子板之间的通讯线路由母板支持。整个分析系统采用核心板、通讯子板、母板的多级接插结构,有利于Modbus分析系统的开发与软硬件升级。As shown in Figure 2, the hardware of the analysis system consists of three parts: the core board, the communication sub-board and the motherboard. The core board is connected to the motherboard through the SO-DIMM interface, and the communication sub-board is connected to the motherboard through the PC104 interface. Such a multi-layer structure is convenient for hardware design, debugging and upgrading. The core board includes three parts: central processing unit (CPU), memory (RAM) and flash memory (Flash). The manufacturers and models are: Samsung S3C2410, Hynix HY57V551620CT-H, SamsungK9F1208U0B. The communication daughter board has a 10M Ethernet port and two full-featured serial ports. The Ethernet interface chip adopts Crystal's CS8900, which internally uses logic gate circuit hardware to realize the contents of the physical layer and MAC layer of the TCP/IP protocol stack; serial port 1 works under the standard RS232 protocol, and uses MAX232 and standard DB9 interface to realize ;Serial port 2 is used to expand the support of the equipment to be analyzed and the network, works under the RS485 protocol, and is realized by the MAX488 chip and the DB9 interface. The communication line between the core board and the communication daughter board is supported by the motherboard. The entire analysis system adopts a multi-level plug-in structure of core board, communication sub-board, and motherboard, which is conducive to the development of Modbus analysis system and the upgrading of software and hardware.

分析系统的软模块包括分析用软件模块和交互用软件模块两大部分。分析用软件模块主要用于与待分析设备的底层Modbus数据帧通信,包括用于管理整个分析系统硬件设备资源及框架的嵌入式Linux操作系统平台、Modbus总线软件协议栈、主站及从站管理软件单元;交互用软件模块主要用于为操作人员提供配置底层通信参数及分析策略的上层人机界面和在操作人员与底层软件之间传递参数和结果,主要包括架设Web网页服务的嵌入式Web服务器boa和运行在boa之上,用于向操作人员提供网页式人机交互界面的cgi网页脚本。两个软件模块分别工作在底层和上层,中间通过指定格式的配置文件进行数据交互。软件整体框架如图3所示。The soft modules of the analysis system include two parts: software modules for analysis and software modules for interaction. The analysis software module is mainly used to communicate with the underlying Modbus data frame of the equipment to be analyzed, including the embedded Linux operating system platform, Modbus bus software protocol stack, master station and slave station management for managing the hardware device resources and framework of the entire analysis system Software unit; interactive software modules are mainly used to provide operators with an upper-level man-machine interface for configuring underlying communication parameters and analysis strategies, and for transferring parameters and results between operators and underlying software, mainly including embedded Web services for setting up Web pages. The server boa and the cgi webpage script running on the boa are used to provide the operator with a webpage-style human-computer interaction interface. The two software modules work on the bottom layer and the upper layer respectively, and data interaction is carried out through the configuration file of the specified format in the middle. The overall framework of the software is shown in Figure 3.

上述两大软件模块在掉电情况下均驻留于闪存中。当分析系统上电后,Linux操作系统在初始化完硬件设备后首先会将交互用软件模块调入内存自动运行。当交互软件模块启动后,上位机便可以采用通用的因特网浏览器与Modbus分析系统进行交互。交互用软件模块主要完成如下功能:1)响应上位机对Modbus分析系统硬件接口(主要为串口)的各项配置,接收上位机提交的配置文件,最终将所有配置均以文件的形式保存在闪存中;2)按照上位机的配置,启动相应的分析用软件模块;3)管理和上传分析结果。分析用软件模块在启动后,主要完成如下功能:1)首先在闪存相应位置找到配置文件,解析并对分析系统的相关硬件接口进行配置;2)之后按照配置文件中的配置信息,运行相应的分析策略,开始分析;3)记录并分析分析结果,将分析结果按照预定好的格式写成结果文件保存在闪存的相应位置,由交互用模块负责上传。Both of these software modules are resident in flash memory when powered down. When the analysis system is powered on, the Linux operating system will first transfer the interactive software modules into the memory to run automatically after initializing the hardware devices. When the interactive software module is started, the host computer can interact with the Modbus analysis system using a common Internet browser. The interactive software module mainly completes the following functions: 1) Respond to the various configurations of the host computer to the Modbus analysis system hardware interface (mainly the serial port), receive the configuration files submitted by the host computer, and finally save all configurations in the form of files in the flash memory Middle; 2) Start the corresponding analysis software module according to the configuration of the host computer; 3) Manage and upload the analysis results. After the analysis software module is started, it mainly completes the following functions: 1) first find the configuration file in the corresponding location of the flash memory, parse and configure the relevant hardware interface of the analysis system; 2) run the corresponding software according to the configuration information in the configuration file Analyze the strategy and start the analysis; 3) record and analyze the analysis results, write the analysis results into a result file in a predetermined format and save it in the corresponding location of the flash memory, and the interactive module is responsible for uploading.

分析用软件模块中采用的Linux操作系统平台是在标准Linux内核基础上,针对分析系统所使用的S3C2410嵌入式硬件平台进行优化和移植而构建的嵌入式Linux操作系统。由于Linux操作系统具有执行效率高,软件资源丰富,开发方便的优点,可以通过独立编程开发与搭建第三方支持软件相结合的手段,灵活的实现Modbus总线分析系统的软件整体结构。The Linux operating system platform used in the analysis software module is an embedded Linux operating system built on the basis of the standard Linux kernel and optimized and transplanted for the S3C2410 embedded hardware platform used in the analysis system. Because the Linux operating system has the advantages of high execution efficiency, rich software resources, and convenient development, it can flexibly realize the overall software structure of the Modbus bus analysis system by combining independent programming development and building third-party support software.

分析用软件模块中的Modbus总线协议栈完全采用C语言代码独立实现,运行在Linux操作系统的应用层,并根据对协议栈链路层通讯状况进行详细分析的需要,在标准Modbus协议栈的基础上进行了扩展与改造,使改造后的协议栈能够根据使用人员的分析需求,灵活的对Modbus链路层数据帧和进行配置,从而达到全面分析Modbus设备及网络对于各种不同类型数据帧的响应情况的目的。The Modbus bus protocol stack in the analysis software module is completely independently realized by C language code, running on the application layer of the Linux operating system, and according to the needs of detailed analysis of the communication status of the link layer of the protocol stack, based on the standard Modbus protocol stack The modified protocol stack can be flexibly configured for the Modbus link layer data frames and configurations according to the analysis needs of users, so as to achieve a comprehensive analysis of Modbus devices and networks for various types of data frames. The purpose of responding to the situation.

分析用软件模块的最上层为主站与从站管理软件单元,该部分为完全自主设计与开发,主要完成对交互式软件模块所生成的配置文件的解析、Modbus通信数据帧的分析及记录和分析结果的统计生成。The uppermost layer of the analysis software module is the master station and the slave station management software unit. This part is completely independently designed and developed. It mainly completes the analysis of the configuration file generated by the interactive software module, the analysis and recording of the Modbus communication data frame and Statistical generation of analysis results.

在交互式软件模块方面,我们采用基于分析系统软硬件系统平台构建嵌入式Web服务器,上位机利用浏览器访问分析系统提供的Web页面的方式,实现使用者对分析系统工作方式及参数的配置。所采用的嵌入式Web服务器平台是Linux环境下使用广泛的开源Web服务器boa,它具有结构简单、占用硬件资源少、执行效率高等优势,非常适用于在嵌入式Linux平台上构建Web服务器。在此基础上,我们使用cgi脚本语言编写了分析系统的网页配置界面单元。In terms of interactive software modules, we use an embedded web server based on the software and hardware system platform of the analysis system, and the host computer uses a browser to access the web page provided by the analysis system to realize the configuration of the working mode and parameters of the analysis system by the user. The embedded web server platform adopted is boa, an open source web server widely used in the Linux environment. It has the advantages of simple structure, less hardware resource occupation, and high execution efficiency. It is very suitable for building a web server on the embedded Linux platform. On this basis, we use the cgi script language to program the web page configuration interface unit of the analysis system.

分析系统的软件模块实现了手动、自动分析两种方式。并且对应于国标Modbus协议中规定的不同工作模式(包括TCP/IP模式,串行链路上的Ascii模式以及RTU模式),软件模块实现了相应的分析策略以满足分析的需要。The software module of the analysis system realizes manual and automatic analysis. And corresponding to the different working modes stipulated in the national standard Modbus protocol (including TCP/IP mode, Ascii mode on the serial link and RTU mode), the software module realizes the corresponding analysis strategy to meet the analysis needs.

如图4所示,选择串行链路模式对待分析对象进行分析时,分析系统通过通讯子板的以太网接口与上位机相连,用于分析人员利用配置界面对分析系统进行远程操作及设置,具体的连接方式可以是经由局域网或者因特网后与上位机相连。工作在RS485协议下的分析系统串口2与待分析设备或网络的485总线接口相连,用于完成与待分析设备或网络在串行链路模式下的Modbus协议通信。工作在RS232协议下的串口1用作分析系统的底层调试接口,输出分析系统的Linux操作系统平台的相关运行信息。当分析系统的软件或硬件不能正常工作时,开发人员可以将串口1与上位机的RS232串口相连,利用分析系统串口1输出的系统运行信息进行设备的诊断及调试。As shown in Figure 4, when the serial link mode is selected to analyze the object to be analyzed, the analysis system is connected to the host computer through the Ethernet interface of the communication sub-board, which is used for the analyst to use the configuration interface to remotely operate and set the analysis system. The specific connection method can be connected to the upper computer via a local area network or the Internet. The serial port 2 of the analysis system working under the RS485 protocol is connected to the 485 bus interface of the device to be analyzed or the network, and is used to complete the Modbus protocol communication with the device to be analyzed or the network in the serial link mode. The serial port 1 working under the RS232 protocol is used as the underlying debugging interface of the analysis system, and outputs the relevant operating information of the Linux operating system platform of the analysis system. When the software or hardware of the analysis system cannot work normally, the developer can connect the serial port 1 to the RS232 serial port of the upper computer, and use the system operation information output by the analysis system serial port 1 to diagnose and debug the equipment.

在分析系统工作状态下,操作人员利用上位机的Web浏览器,通过以太网口访问分析系统交互软件模块的配置网页,直接在网页上指定分析系统的工作方式,并填写相关配置参数和链路层帧数据传递给分析系统。使用者所提交的相关配置参数被网页脚本以配置文件的形式保存下来,并启动分析软件模块。保存在Flash存储器中的分析软件模块被Linux操作系统读入到内存当中,中央处理器读取内存中的软件代码并运行。分析软件模块通过读取网页脚本所创建的配置文件获取用户对协议通信过程进行的各种相关配置,并根据配置情况设置物理链路参数,并封装指定格式的Modbus链路层数据帧。之后开始进行同Modbus设备的通信过程。在串行链路模式下,Modbus协议通信过程是由分析软件模块中的协议栈通信部分通过分析系统与设备之间的RS-485串行链路完成的。分析系统在每完成一个数据帧的通讯之后,都需要记录与待分析设备的通信情况,供分析完成后进行分析结果的统计和查看之用。在完成使用者指定的一次完整的分析过程之后,分析软件模块需要对所得的分析结果进行统计和分析,计算出待分析设备完成的Modbus数据帧通信次数、错误的数据帧通信次数、丢失数据帧的次数等相关统计数字,所得的结果保存在结果文件当中供交互软件模块使用。交互软件模块读取结果文件,并以结果网页的形式返回给使用者。软件执行流程如图6所示。In the working state of the analysis system, the operator uses the web browser of the host computer to access the configuration web page of the interactive software module of the analysis system through the Ethernet port, directly specifies the working mode of the analysis system on the web page, and fills in relevant configuration parameters and links Layer frame data is passed to the analysis system. The relevant configuration parameters submitted by the user are saved by the webpage script in the form of a configuration file, and the analysis software module is started. The analysis software module stored in the Flash memory is read into the memory by the Linux operating system, and the central processing unit reads and runs the software code in the memory. The analysis software module obtains various related configurations of the protocol communication process by the user by reading the configuration file created by the webpage script, and sets the physical link parameters according to the configuration, and encapsulates the Modbus link layer data frame in the specified format. Then start the communication process with the Modbus device. In the serial link mode, the Modbus protocol communication process is completed by the protocol stack communication part in the analysis software module through the RS-485 serial link between the analysis system and the device. After the analysis system completes the communication of a data frame, it needs to record the communication with the device to be analyzed, which is used for statistics and viewing of the analysis results after the analysis is completed. After completing a complete analysis process specified by the user, the analysis software module needs to perform statistics and analysis on the obtained analysis results, and calculate the number of Modbus data frame communications completed by the device to be analyzed, the number of wrong data frame communications, and the number of lost data frames The number of times and other related statistics, the obtained results are saved in the result file for use by the interactive software module. The interactive software module reads the result file and returns it to the user in the form of a result web page. The software execution flow is shown in Figure 6.

当选择在TCP/IP模式下对待分析对象进行分析时,分析系统与上位机及待分析对象的硬件连接可以完全利用以太网口完成。由于Modbus协议属于应用层协议,其所处的层次在TCP/IP协议之上,所以以太网口的硬件连接方式可以十分灵活,可以选择直接由网络接口连接到上位机和待分析对象上,也可以经由局域网、甚至因特网后再通过通用网络接口连接到上位机和待分析对象。如图5所示。When the object to be analyzed is selected to be analyzed in TCP/IP mode, the hardware connection between the analysis system and the host computer and the object to be analyzed can be completed by using the Ethernet port. Since the Modbus protocol belongs to the application layer protocol, and its layer is above the TCP/IP protocol, the hardware connection mode of the Ethernet port can be very flexible. You can choose to connect directly to the host computer and the object to be analyzed through the network interface, or It can be connected to the host computer and the object to be analyzed through a general network interface through a local area network or even the Internet. As shown in Figure 5.

当分析系统工作在TCP/IP模式下时,其基本的软件结构和工作方式与串行链路模式下并没有本质区别。只是与待分析设备的物理链路改成了以太网接口,并且由于物理链路的改变,使得分析软件模块除了要处理Modbus协议数据帧的收发和协议栈状态机之外,还要具有对TCP/IP模式下分析系统与待分析对象之间的TCP套接字连接的访问控制能力。TCP/IP模式下的软件执行流程如图7所示。When the analysis system works in TCP/IP mode, its basic software structure and working mode are not substantially different from those in serial link mode. Only the physical link with the device to be analyzed has been changed to an Ethernet interface, and due to the change of the physical link, the analysis software module must not only handle the sending and receiving of Modbus protocol data frames and the protocol stack state machine, but also have the ability to understand TCP In /IP mode, analyze the access control capability of the TCP socket connection between the system and the object to be analyzed. The software execution process in TCP/IP mode is shown in Figure 7.

本发明所涉及的Modbus分析系统能够适应的分析环境及分析内容包括:The analysis environment and analysis content that the Modbus analysis system involved in the present invention can adapt to include:

1.待分析对象工作在RTU或ASCII模式下时,不同的物理链路设置方式所对应的各种工作情况。1. When the object to be analyzed works in RTU or ASCII mode, various working conditions corresponding to different physical link settings.

2.待分析对象对各种不同种类和形式的Modbus请求帧和响应帧的数据处理及适应能力。2. The data processing and adaptability of the object to be analyzed to various types and forms of Modbus request frames and response frames.

3.TCP/IP工作模式下,待分析对象对TCP套接字连接的访问控制能力。3. Under the TCP/IP working mode, the object to be analyzed has the access control ability to the TCP socket connection.

4.待分析对象在不同链路运行状况下的稳定性。4. The stability of the object to be analyzed under different link operating conditions.

根据分析系统与待分析设备之间工作方式的不同,本分析系统所实现的分析策略分为主站工作方式下的分析策略和从站工作方式下的分析策略两部分,分别对应于分析系统作为主站,待分析设备作为从站和分析系统作为从站,待分析设备作为主站两种情况。According to the different working modes between the analysis system and the equipment to be analyzed, the analysis strategy implemented by the analysis system is divided into two parts: the analysis strategy under the master station working mode and the analysis strategy under the slave station working mode, corresponding to the analysis system as the There are two situations: the master station, the device to be analyzed as the slave station and the analysis system as the slave station, and the device to be analyzed as the master station.

分析系统作为主站时,所采取的分析策略如图8所示。加电之后,分析系统首先启动Linux操作系统,并调用个驱动模块初始化硬件设备。在完成操作系统启动流程之后,分析系统运行交互软件模块(基于嵌入式Web服务器)。如此,分析人员便可以在上位机通过配置页面设定分析系统的工作参数和启动分析过程。在操作人员对分析系统工作参数及分析数据进行配置完毕之后,配置页面将使用者的配置数据保存到指定的配置文件中,然后启动底层的分析软件模块。底层软件通过读取和解析配置文件的相关参数字段获取用户配置参数,根据这些参数对相应的硬件接口进行配置设定,并构造分析用数据帧。在此之后分析系统按照用户指定的方式向待分析设备发送Modbus请求帧,并等待待分析设备的响应。根据待分析设备返回响应帧的不同,分析系统对每帧的通信状况进行记录。在完成用户指定次数的帧通信之后,分析系统根据记录下的通信状况对分析结果进行统计和分析,并将分析结果保存为指定格式的结果文件。协议帧解析的内容包括:判断当前链路是否传送了一个完整的数据帧;提取数据帧中的功能码字段,判断收到的数据帧中的功能码是否为有效的功能码,是否为分析系统正在分析的功能码;提取数据帧中的数据内容字段,判断是否和分析系统预期的数据内容相一致;根据数据帧内容计算其LRC校验码,并与数据帧结尾的LRC校验字节进行比对,以判断数据帧在传送过程中是否出现错误。分析结果处理的内容包括:计算分析过程中收到的帧数目总数,并与用户指定的帧通信次数进行比较,得到丢失的帧数目;统计因功能码不合法而造成的错误帧数目;计算因LRC校验出错、数据内容出错等错误而产生的错误帧数目;计算成功完成通信的正确帧数目。When the analysis system is used as the master station, the analysis strategy adopted is shown in Figure 8. After power-on, the analysis system first starts the Linux operating system, and calls a driver module to initialize the hardware device. After completing the operating system boot process, the analysis system runs interactive software modules (based on the embedded web server). In this way, the analyst can set the working parameters of the analysis system and start the analysis process through the configuration page on the host computer. After the operator configures the working parameters and analysis data of the analysis system, the configuration page saves the user's configuration data to the specified configuration file, and then starts the underlying analysis software module. The underlying software obtains user configuration parameters by reading and parsing the relevant parameter fields of the configuration file, configures and sets the corresponding hardware interface according to these parameters, and constructs a data frame for analysis. After that, the analysis system sends a Modbus request frame to the device to be analyzed in the way specified by the user, and waits for the response of the device to be analyzed. According to the different response frames returned by the equipment to be analyzed, the analysis system records the communication status of each frame. After completing the number of frame communications specified by the user, the analysis system will count and analyze the analysis results according to the recorded communication status, and save the analysis results as a result file in a specified format. The content of protocol frame analysis includes: judging whether the current link has transmitted a complete data frame; extracting the function code field in the data frame, judging whether the function code in the received data frame is a valid function code, and whether it is an analysis system The function code being analyzed; extract the data content field in the data frame, and judge whether it is consistent with the expected data content of the analysis system; calculate the LRC check code according to the content of the data frame, and compare it with the LRC check byte at the end of the data frame Compare to determine whether there is an error in the data frame transmission process. The content of the analysis result processing includes: calculating the total number of frames received during the analysis process, and comparing it with the frame communication times specified by the user to obtain the number of lost frames; counting the number of error frames caused by illegal function codes; The number of error frames caused by errors such as LRC check error and data content error; calculate the number of correct frames that successfully complete the communication.

详细的帧分析和分析结果处理的流程可以参见图10和图11。Web服务器根据协议栈通信软件生成的结果文件创建分析结果页面,供分析人员查看分析结果。以串行链路上的Ascii模式为例,帧分析的过程可以按照如表1所示的结构将接收到的一帧分解开来,然后按照图10的过程进行分析和获得相应的统计数据。See Figure 10 and Figure 11 for the detailed flow of frame analysis and analysis result processing. The web server creates an analysis result page according to the result file generated by the protocol stack communication software, for analysts to view the analysis result. Taking the Ascii mode on the serial link as an example, the frame analysis process can decompose a received frame according to the structure shown in Table 1, and then analyze and obtain corresponding statistical data according to the process in Figure 10 .

  起始start   地址 address   功能码 function code   数据 data   LRC校验LRC check   结束 Finish   1字符1 character   2字符2 characters   2字符2 characters   0至2×252字符0 to 2×252 characters   2字符2 characters   2字符2 characters

                 表1Modbus数据帧结构Table 1 Modbus data frame structure

分析系统作为从站时,其分析策略的基本流程与主站方式下类似,只是在分析系统与待分析设备进行通信的过程中,是由分析系统等待待分析设备给出Modbus请求帧,并向待分析设备返回响应帧。具体的分析策略流程如图9所示。When the analysis system is used as a slave station, the basic process of its analysis strategy is similar to that of the master station, except that in the process of communication between the analysis system and the device to be analyzed, the analysis system waits for the Modbus request frame from the device to be analyzed, and sends The device to be analyzed returns a response frame. The specific analysis strategy process is shown in Figure 9.

Claims (3)

1.基于嵌入式平台的Modbus总线分析系统,其特征在于Modbus总线设备是一种采用开放系统互连模型OSI中的应用层报文传输协议,在连接至不同类型总线或网络的设备之间提供客户机/服务器通信的设备,所述的Modbus总线分析系统含有:Modbus总线分析系统母板、核心板以及通讯子板,其中:1. Based on the Modbus bus analysis system of the embedded platform, it is characterized in that the Modbus bus equipment is a kind of application layer message transmission protocol in the open system interconnection model OSI, which is connected to different types of bus or network equipment. Client/server communication equipment, the described Modbus bus analysis system contains: Modbus bus analysis system motherboard, core board and communication sub-board, wherein: 核心板,包括中央处理器S3C2410以及与其相连的内存和闪存,共同通过SO-DIMM接口与所述Modbus总线分析系统母板的底板总线相连,其中:The core board, including the central processing unit S3C2410 and the memory and flash memory connected to it, are jointly connected with the backplane bus of the Modbus bus analysis system motherboard through the SO-DIMM interface, wherein: 闪存在掉电情况下驻留有分析用软件模块和交互用软件模块,其中:The flash memory hosts software modules for analysis and software modules for interaction in the case of power-down, where: 分析用软件模块,用于与被分析的Modbus总线设备的底层Modbus数据帧通信,所述分析用软件模块包括嵌入式Linux操作平台、Modbus总线软件协议栈,以及主站与从站管理单元,其中:The analysis software module is used to communicate with the bottom Modbus data frame of the analyzed Modbus bus device, and the analysis software module includes an embedded Linux operating platform, a Modbus bus software protocol stack, and a master station and a slave station management unit, wherein : 嵌入式Linux操作平台,是针对所述中央处理器S3C2410而构建的,用于管理所述分析系统整个硬件设备资源及框架;The embedded Linux operating platform is constructed for the central processing unit S3C2410, and is used to manage the entire hardware device resources and framework of the analysis system; Modbus总线软件协议栈,用于全面分析Modbus总线设备及网络对于各种不同类型数据帧的响应情况,所述Modbus总线软件协议栈通过硬件资源访问接口和所述嵌入式Linux操作平台互连;The Modbus bus software protocol stack is used to comprehensively analyze the response of Modbus bus equipment and network to various different types of data frames, and the Modbus bus software protocol stack is interconnected with the embedded Linux operating platform through a hardware resource access interface; 主站与从站管理单元,完成对所述交互用软件模块所生成的配置文件的解析、Modbus通信数据帧的分析、以及记录和分析数据的统计生成,通过帧数据接口与所述Modbus总线软件协议栈互连;The master station and the slave station management unit complete the analysis of the configuration file generated by the interactive software module, the analysis of the Modbus communication data frame, and the statistical generation of the record and analysis data, and communicate with the Modbus bus software through the frame data interface Protocol stack interconnection; 该分析用软件模块依次按以下步骤运行:The analysis software module runs in sequence as follows: 步骤(1),首先在闪存相应位置找到配置文件,解析该配置文件并对所述Modbus总线分析系统的相关硬件接口进行配置,所述配置文件是上位机通过所述交互用软件模块保存于所述闪存中的;Step (1), at first find configuration file in flash memory corresponding position, analyze this configuration file and configure the relevant hardware interface of described Modbus bus analysis system, described configuration file is that upper computer is saved in place by described interactive software module in the flash memory; 步骤(2),按所述配置文件中的配置信息,运行相应的分析策略,开始分析;Step (2), according to the configuration information in the configuration file, run the corresponding analysis strategy, start analysis; 步骤(3),记录并解析分析结果,按预定格式形成结果文件保存在所述闪存的相应位置,由所述交互用软件模块上传至所述上位机;Step (3), recording and parsing the analysis results, forming a result file in a predetermined format and storing it in the corresponding position of the flash memory, and uploading it to the host computer by the interactive software module; 交互用软件模块,供上位机使用通用的因特网浏览器与所述Modbus总线分析系统进行交互,为上位机的操作人员提供配置底层通信参数及分析策略的人机界面,以及在操作人员与底层软件之间提供参数和结果,该交互用软件模块包含:嵌入式Web服务器boa,以及cgi网页脚本,其中:The interactive software module is used for the upper computer to use the general Internet browser to interact with the Modbus bus analysis system, to provide the operator of the upper computer with a man-machine interface for configuring the underlying communication parameters and analysis strategies, and to communicate between the operator and the underlying software. Parameters and results are provided between, the interactive software module includes: embedded web server boa, and cgi webpage script, wherein: 嵌入式Web服务器boa,用于架设Web网页服务;The embedded web server boa is used to set up web page services; cgi网页脚本,运行在boa之上,用于向所述操作人员提供网页式人机交互界面,该cgi网页脚本通过用户配置、分析结果这两个接口与所述嵌入式Web服务器boa互连;The cgi webpage script runs on the boa, and is used to provide the operator with a webpage-type human-computer interaction interface. The cgi webpage script is interconnected with the embedded web server boa through the two interfaces of user configuration and analysis results; 该交互用软件模块在所述Linux操作平台初始化完硬件设备后被载入内存并自动按以下步骤运行:This interactive software module is loaded into the memory after the hardware device is initialized on the Linux operating platform and automatically operates according to the following steps: 步骤(A),响应所述上位机对所述Modbus总线分析系统硬件接口的配置,接收该上位机提交的配置文件并保存在所述闪存中;Step (A), in response to the configuration of the host computer to the hardware interface of the Modbus bus analysis system, receive the configuration file submitted by the host computer and store it in the flash memory; 步骤(B),按照所述上位机的配置,启动相应的所述分析用软件模块;Step (B), according to the configuration of the host computer, start the corresponding software module for analysis; 步骤(C),上传步骤(B)中的分析结果;Step (C), uploading the analysis results in step (B); 通信子板,含有:10M以太网口、第一DB9串口以及第二DB9串口,其中:10M以太网接口采用芯片CS8900,实现TCP/IP协议栈物理层和介质访问控制层MAC;The communication sub-board includes: 10M Ethernet port, the first DB9 serial port and the second DB9 serial port, wherein: the 10M Ethernet port adopts the chip CS8900 to realize the TCP/IP protocol stack physical layer and the media access control layer MAC; 第一DB9串口,在RS232协议下工作,采用MAX232芯片和DB9接口,The first DB9 serial port, working under the RS232 protocol, adopts MAX232 chip and DB9 interface, 第二DB9串口,在RS485协议下工作,采用MAX488芯片和DB9串口;The second DB9 serial port works under the RS485 protocol, using MAX488 chip and DB9 serial port; 所述10M以太网口、第一DB9串口、第二DB9串口共同通过PC104总线与所述母板的底板总线相连,所述通讯子板与核心板之间的通讯由所述母板支持。The 10M Ethernet port, the first DB9 serial port, and the second DB9 serial port are jointly connected to the backplane bus of the motherboard through the PC104 bus, and the communication between the communication sub-board and the core board is supported by the motherboard. 2.根据权利要求1所述的基于嵌入式平台的Modbus总线分析系统,其特征在于在串行链路模式下,所述Modbus总线分析系统与所述上位机及待分析Modbus设备或网络按以下方式连接:2. the Modbus bus analysis system based on embedded platform according to claim 1, is characterized in that under the serial link pattern, described Modbus bus analysis system and described upper computer and Modbus equipment to be analyzed or network are as follows Way to connect: 所述10M以太网口经网络设备与上位机相连,用于操作人员利用配置界面对所述Modbus总线分析系统进行远程操作及设置,The 10M Ethernet port is connected to the host computer through the network equipment, and is used for operators to remotely operate and set the Modbus bus analysis system by using the configuration interface. 所述第二DB9串口与待分析Modbus设备或网络的485总线相连,用于完成与待分析Modbus设备或网络在串行链路模式下的Modbus协议通信,The second DB9 serial port is connected to the 485 bus of the Modbus device to be analyzed or the network, and is used to complete the Modbus protocol communication with the Modbus device to be analyzed or the network in the serial link mode, 所述第一DB9串口作为所述Modbus总线分析系统的底层调试接口,输出所述Modbus总线分析系统的Linux操作平台的相关运行信息,所述第一DB9串口通过RS232串口与上位机相连,在所述分析系统不能正常工作时还可利用该第一DB9串口输出的所述运行信息进行诊断及调试。Described first DB9 serial port is as the bottom debugging interface of described Modbus bus analysis system, outputs the relevant operation information of the Linux operating platform of described Modbus bus analysis system, and described first DB9 serial port is connected with upper computer by RS232 serial port, in place When the analysis system fails to work normally, the operation information output by the first DB9 serial port can also be used for diagnosis and debugging. 3.根据权利要求1所述的基于嵌入式平台的Modbus总线分析系统,其特征在于在TCP/IP模式下,所述Modbus总线分析系统与待分析Modbus设备或网络以及上位机按以下方式连接:3. the Modbus bus analysis system based on embedded platform according to claim 1, is characterized in that under TCP/IP mode, described Modbus bus analysis system is connected with Modbus equipment to be analyzed or network and upper computer in the following manner: 所述10M以太网口通过网络设备分别与上位机以及待分析Modbus设备或网络相连。The 10M Ethernet port is respectively connected to the upper computer and the Modbus device to be analyzed or the network through the network equipment.
CN2008101044001A 2008-04-18 2008-04-18 Modbus bus analysis system based on built-in platform Expired - Fee Related CN101262486B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101044001A CN101262486B (en) 2008-04-18 2008-04-18 Modbus bus analysis system based on built-in platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101044001A CN101262486B (en) 2008-04-18 2008-04-18 Modbus bus analysis system based on built-in platform

Publications (2)

Publication Number Publication Date
CN101262486A CN101262486A (en) 2008-09-10
CN101262486B true CN101262486B (en) 2011-05-11

Family

ID=39962687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101044001A Expired - Fee Related CN101262486B (en) 2008-04-18 2008-04-18 Modbus bus analysis system based on built-in platform

Country Status (1)

Country Link
CN (1) CN101262486B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013033889A1 (en) * 2011-09-06 2013-03-14 长沙中联重工科技发展股份有限公司 Method for communicating with plc and upper computer
CN102694695B (en) * 2012-04-27 2014-09-03 南大傲拓科技江苏有限公司 Serial communication configuration and debugging method based on Ethernet communication protocol
CN102685134B (en) * 2012-05-15 2014-12-17 深圳市中电电力技术股份有限公司 Communication managing machine capable of being comprehensively realized based on extensible markup language and dynamic library
CN102710792A (en) * 2012-06-21 2012-10-03 上海理工大学 Design method for embedded generic node with remote service function
CN103792928B (en) * 2014-02-24 2016-08-03 东南大学 A kind of industrial field data acquisition analysis system based on Modbus
CN104506516A (en) * 2014-12-19 2015-04-08 平顶山中选自控系统有限公司 Gateway for conversion between Modbus RTU/ASCII (remote terminal unit/American standard code for information interchange) communication protocol and Modbus TCP (transmission control protocol) communication protocol and implementation method for gateway
CN105320524B (en) * 2015-11-16 2018-11-09 郑州众智科技股份有限公司 The serial port communication method of controller starting-up interface based on STM32MCU
CN106874230B (en) * 2015-12-11 2020-01-03 南车株洲电力机车研究所有限公司 Daughter board applied to PC/104 bus interface and method applied to daughter board
CN106888185B (en) * 2015-12-15 2019-12-06 北京网御星云信息技术有限公司 industrial network safety protection method based on serial link
CN105700929A (en) * 2016-01-15 2016-06-22 浪潮(北京)电子信息产业有限公司 Method and system controlling operating system configuration parameter
CN105635317A (en) * 2016-03-01 2016-06-01 中国科学院上海高等研究院 Wireless communication method and system applied to bridge detection
CN109474707B (en) * 2019-01-16 2021-02-02 浪潮集团有限公司 Two-layer protocol design and data transmission method and system based on serial port protocol
CN110391877A (en) * 2019-06-25 2019-10-29 浙江海印数码科技有限公司 A kind of serial communication method and device
CN110430107A (en) * 2019-07-29 2019-11-08 珠海格力电器股份有限公司 Communication reply rate display method and device
CN111240752B (en) * 2019-12-31 2021-08-17 北京元心科技有限公司 Operating system self-adaption method and system
CN113433851A (en) * 2021-06-09 2021-09-24 中国舰船研究设计中心 Modular serial port type signal acquisition and processing device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2384334A (en) * 2002-01-19 2003-07-23 Inc Technologies Control module and expansion board, with a control processor module, for connection to a motherboard bus
CN101009741A (en) * 2006-01-27 2007-08-01 上海纳杰电气成套有限公司 Intelligent device with the automatic failure SMS alarm function

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2384334A (en) * 2002-01-19 2003-07-23 Inc Technologies Control module and expansion board, with a control processor module, for connection to a motherboard bus
CN101009741A (en) * 2006-01-27 2007-08-01 上海纳杰电气成套有限公司 Intelligent device with the automatic failure SMS alarm function

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
周野,郑义和,郝权红.无线数据通信在动力供水远程监控中的应用.工业计量.2005,15(02),19-21. *
龙迅,柴建云.基于组态软件的风电场远程监控系统的研发.能源与环境.2007,(02),76-78. *

Also Published As

Publication number Publication date
CN101262486A (en) 2008-09-10

Similar Documents

Publication Publication Date Title
CN101262486B (en) Modbus bus analysis system based on built-in platform
CN112688865B (en) Design method of OPC UA gateway for graphical online modeling
CN102736565B (en) Communication method of automatic control equipment based on upper and lower computer structures
CN102520619B (en) General-purpose satellite remote sensing simulator
CN103227449B (en) A kind of protective device definite value Automatic Checking System
CN102014016A (en) System and method for testing defects of network protocol
CN112507449B (en) A Data Architecture Method for Vehicle Performance Simulation Based on XML
CN106713357A (en) Universal network protocol analysis method
CN101252469B (en) A multi-network element automated testing method
CN101197736A (en) A wireless network element device monitoring system and monitoring method thereof
CN118034673B (en) Visual editing generation and dynamic analysis system for equipment model of Internet of things
CN113028603A (en) Equipment monitoring system applied to central air-conditioning system
CN102495591A (en) Method for monitoring numerical control machine
CN107103743A (en) A kind of carrier wave integrates the message processing method of copy controller
CN113722340A (en) Processing method and system for remote automatic point table updating based on power distribution device
TW201321765A (en) Automatic test system of communication device
CN202047868U (en) On-line mine dust monitoring system based on OPC (Organic Photoconductor)
CN102566493A (en) Data acquiring and processing embedded adapter of numerical control machine
CN118210275A (en) Method for acquiring machine tool data based on OPC UA protocol by using S7-1500 PLC
CN117930779A (en) A production information object modeling method based on OPC UA protocol
CN105607957B (en) A kind of data acquisition analysis system based on OPC DA
CN105138390B (en) Apply the real-time data communication system and method between process monitoring control system and simulation support svstem
CN115361323A (en) An intelligent gateway interconnection test system
CN103905455A (en) Communication protocol platform and access method thereof
CN107579871A (en) Method and System for Generating Distributed Test Script Based on Model Checking

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20110511

Termination date: 20120418