CN101262486A - Modbus bus analysis system based on built-in platform - Google Patents
Modbus bus analysis system based on built-in platform Download PDFInfo
- Publication number
- CN101262486A CN101262486A CNA2008101044001A CN200810104400A CN101262486A CN 101262486 A CN101262486 A CN 101262486A CN A2008101044001 A CNA2008101044001 A CN A2008101044001A CN 200810104400 A CN200810104400 A CN 200810104400A CN 101262486 A CN101262486 A CN 101262486A
- Authority
- CN
- China
- Prior art keywords
- modbus
- analysis
- analytical system
- software module
- interface
- 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.)
- Granted
Links
- 238000004458 analytical method Methods 0.000 title claims abstract description 75
- 230000006854 communication Effects 0.000 claims abstract description 45
- 238000004891 communication Methods 0.000 claims abstract description 41
- 230000002452 interceptive effect Effects 0.000 claims abstract description 9
- 230000004044 response Effects 0.000 claims description 8
- 238000012545 processing Methods 0.000 claims description 7
- 230000003993 interaction Effects 0.000 claims description 4
- 230000007257 malfunction Effects 0.000 claims description 3
- 239000011159 matrix material Substances 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 abstract description 4
- 238000000034 method Methods 0.000 description 28
- 230000008569 process Effects 0.000 description 15
- 230000006870 function Effects 0.000 description 13
- 238000010586 diagram Methods 0.000 description 6
- 230000008901 benefit Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 3
- 238000011160 research Methods 0.000 description 3
- 239000012141 concentrate Substances 0.000 description 2
- 238000010276 construction Methods 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000007630 basic procedure Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005538 encapsulation Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012916 structural analysis Methods 0.000 description 1
- 230000007474 system interaction Effects 0.000 description 1
Images
Landscapes
- Computer And Data Communications (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a Modbus bus analysis system based on embedded operation systems, which pertains to the analysis technical field of equipment or network complying with the Modbus bus protocol. The invention is characterized in that: the bus analysis system comprises a core board and a communication daughter board. The core board is composed of a CPU S3C2410, an EMS memory and a Flash memory and is provided with a software module for interacting with an upper computer and a software module which is used for analyzing and connected with the interactive software module through configuration file analysis; the communication daughter board consists of an Ethernet port (10m) adopting chip CS8900, a first DB9 serial port adopting chip MAX232 and a second DB9 serial port adopting chip 488; the core board and the communication daughter board are respectively connected with motherboard bus of Modbus analysis device through a SO-DIMM interface and a PC104 bus, while the communication between the core board and the communication daughter board is realized through the motherboard. The analysis device can be respectively connected with the upper machine and the Modbus equipment or network to be analyzed under the mode of serial link, can also be realized through Ethernet under TCP/IP mode. The Modbus bus analysis system of the invention fills the blank of the related technology of the existing Modbus bus analysis.
Description
Technical field
The present invention relates to a kind of analytical system and analytical method thereof, refer to be applied to the analytical system and the analytical method thereof of Modbus bus apparatus especially based on embedded platform.
Background technology
The correlation technique reference content is as follows:
The patent aspect, patent retrieval platform by State Intellectual Property Office is found, the correlative study of Modbus agreement all concentrates on the realization of agreement itself and the conversion of Modbus agreement and other agreements, does not find the new invention and the application of Modbus device analysis relevant apparatus at present.
6 patents of invention and 1 utility model patent of existing relevant Modbus agreement are as follows:
1 | Method for converting protocol and device between Modbus/TCP Industrial Ethernet and facility network fieldbus |
2 | Method for converting protocol and device between Modbus/TCP Industrial Ethernet and Profibus DP fieldbus |
3 | Multi protocol conversion method and device between Modbus/TCP Industrial Ethernet and facility network fieldbus and Profibus DP fieldbus |
4 | Method for converting protocol between a kind of Modbus and DeviceNet |
5 | Interface module for Modbus device network and the use of Fieldbus device network |
6 | The system and the method thereof that can produce the Modbus crc error and mistake is compared, shows |
7 | The Modbus network interface transducer of Programmable Logic Controller |
The scientific paper aspect, cross search engine by Tsing-Hua University, the correlative study of discovery Modbus agreement all concentrates on its agreement itself, or the improvement of agreement itself or on certain hardware platform, realize, there is not pertinent literature to show R and D at present at the analytical method and the system of Modbus bus apparatus.
In the period of 1979 to 2008, the document that title contains " Modbus " writes down as follows:
1 | CNKI | Article 300, |
2 | The outstanding master thesis full-text database of China | Article 25, |
3 | China momentous conference full-text database | Article 14, |
4 | China's doctorate paper full-text database | Article 0, |
5 | CCND | Article 0, |
Add up to | Article 339, |
More than 339 document records, can be divided into the realization of Modbus agreement on embedded system, the research four big classes of the conversion of the application of Modbus agreement, Modbus and other agreements and agreement itself not have at present to find to relate to the method discussion that Modbus equipment is analyzed and the document of correlative study.
And the exploitation debug process of present Modbus equipment, and the online detection in the Modbus equipment running process all has urgent demand to the analytical method and the relevant device of Modbus bus apparatus.
Summary of the invention
For adapting to the needs of current exploitation Modbus bus apparatus and the on-line analysis of Modbus bus apparatus, fill up this gaps in market, the present invention utilizes existing embedded system technology, has developed Modbus bus apparatus analytical system.This analytical system is based on Samsung S3C2410 hardware platform and built-in Linux operating system, realizes and expanded complete Modbus bus protocol stack at analyze demands.On this basis, autonomous Design a whole set of analysis strategy, possess configurable manually, analytic function automatically.And, make up the Man Machine Interface of embedded web server as analytical system in conjunction with the embedded Web Server software platform boa that increases income, to realize setting to analytical system mode of operation, parameter to be analyzed, function code type and Modbus data frame content.
Modbus industrial-controlled general line agreement involved in the present invention meets GB/Z 19582.1-2004 national standard, it is proposed by Chinese mechanical industry federation, and many companies such as the mechanical industry instrument and meter complex art institute for economic research, Shi'naide Electric (China) Investment Co. Ltd. and research institution draft jointly and form.This standard is used for the communication link standard of industrial automation equipment, adopts the application layer Message Protocol in the open system interconnection osi model, and client/server communication is provided between the equipment that is connected to dissimilar buses or network.GB Modbus agreement is divided into three parts: Modbus application protocol, the Modbus agreement realization guide on serial link, the realization guide of Modbus agreement on TCP/IP is respectively shown in the overstriking black surround in the accompanying drawing 1.
The analytic target of Modbus analytical system of the present invention is based on the Modbus equipment of above-mentioned consensus standard or the network of being made up of Modbus equipment.
The invention is characterized in:
Described Modbus bus apparatus is a kind of application layer Message Protocol that adopts among the Open Systems Interconnection OSI, the equipment of client/server communication is provided between the equipment that is connected to dissimilar buses or network, described analytical system contains: Modbus bus apparatus analytical system motherboard, core board and communication daughter board, wherein:
Core board comprises central processing unit S3C2410 and coupled internal memory and flash memory, links to each other with the backplane bus of described Modbus bus apparatus analytical system mother matrix by the SO-DIMM interface jointly, wherein:
Flash memory is resident under power-down conditions to be had the usefulness of analysis software module and uses software module alternately, wherein:
Analyze and use software module, be used for communicating by letter with the bottom Modbus Frame of analyzed Modbus bus apparatus, described analysis comprises built-in Linux operating system, Modbus bus software protocol stack with software module, and main website and slave station administrative unit, wherein:
The built-in Linux operating platform makes up at described central processing unit S3C2410, is used to manage whole hardware device resources of described analytical system and framework;
Modbus bus software protocol stack, be used for multianalysis Modbus bus apparatus and the network response condition for various different types of data frames, described Modbus bus software protocol stack is by hardware resource access interface and the interconnection of described built-in Linux operating system;
Main website and slave station management software unit, finish the parsing of the configuration file that described interactive software module is generated, the analysis of Modbus communications data frame and the statistics of record and analysis data and generate, by frame data interface and the interconnection of described Modbus bus software protocol stack;
This is analyzed with software module operation according to the following steps successively:
Step (1) at first finds configuration file in the flash memory relevant position, resolves this configuration file and the related hardware interface of described analytical system is configured, and described configuration file is that host computer is stored in the described flash memory with software module alternately by described;
Step (2), the configuration information by in the described configuration file moves corresponding analysis strategy, begins to analyze;
Step (3), record and analytic results form the relevant position that destination file is kept at described flash memory by predetermined format, are uploaded to described host computer with software module alternately by described;
The mutual software module of using, use general explorer and described analytical system to carry out alternately for host computer, the man-machine interface of configuration bottom communication parameter and analysis strategy is provided for the operating personnel of host computer, and between operating personnel and bottom software, provide parameter and result, this comprises with software module alternately: embedded web server boa, and the cgi page script, wherein:
Embedded web server boa is used to set up the Web web service;
The cgi page script operates on the boa, is used for providing the Web page type human-computer interaction interface to described operating personnel, and this cgi page script is by user's configuration, these two interfaces of analysis result and described embedded web server boa interconnection;
Should behind the intact hardware device of described (SuSE) Linux OS initialization, be written into internal memory and operation according to the following steps automatically with software module alternately:
Step (A) responds the configuration of described host computer to described analytical system hardware interface, receives the configuration file that this host computer submits to and is kept in the described flash memory;
Step (B) according to the configuration of described host computer, starts corresponding described analysis software module;
Step (C) is uploaded the analysis result in the step (B);
The communication daughter board, contain: 10M Ethernet interface, first DB9 serial port and second DB9 serial port, wherein:
The 10M Ethernet interface adopts chip CS8900, realizes ICP/IP protocol stack physical layer and media access control layer MAC;
First DB9 serial port is worked under the RS232 agreement, adopts MAX232 and DB9 interface,
Second DB9 serial port is worked under the RS485 agreement, adopts MAX488 chip and DB9 serial port;
Described 10M Ethernet interface, first DB9 serial port, second DB9 serial port link to each other with the backplane bus of described motherboard by the PC104 bus jointly, and the communication between described communication daughter board and the core board is by described motherboard support.
Under the serial link pattern, described analytical system and described host computer and Modbus equipment to be analyzed or network are connected in the following manner:
Described 10M Ethernet interface links to each other with host computer through the network equipment, and be used for operating personnel and utilize configuration interface that described analytical system is carried out remote operation and setting,
Described second DB9 serial port links to each other with 485 buses of Modbus equipment to be analyzed or network, is used to finish the Modbus protocol communication under the serial link pattern with Modbus equipment to be analyzed or network.
Described first DB9 serial port is as the debugging bottom most interface of described analytical system, export the relevant operation information of the (SuSE) Linux OS platform of described analytical system, described first DB9 serial port links to each other with host computer by the RS232 serial ports, and the described operation information that also can utilize this first DB9 serial port to export when described analytical system cisco unity malfunction is diagnosed and debugged.
In the TCP/IP pattern at present, described analytical system and Modbus equipment to be analyzed or network and host computer are connected in the following manner:
Described 10M Ethernet interface links to each other with host computer and Modbus equipment to be analyzed or network respectively by the network equipment.
The present invention has filled the blank of Modbus bus apparatus or network environment analytical system.
The invention has the advantages that:
1. utilize existing embedded system technology, realized the Modbus analytical system of complete function, filled up the vacancy in market;
2. on the basis of standard Modbus protocol stack, agreement is expanded and transform, thereby can realize the flexible configuration and the judgement of link layer Modbus Frame at different analyze demands;
3. realize analytic function based on standard Modbus, this system can analyze single device with offline mode, can also online mode analyzes the Modbus network in the whole service;
4. the use of built-in Linux operating system helps the upgrading of the abundant and product of function;
5. setting up of embedded server boa, analysis result check the web browser that only need utilize on the host computer, can
This locality is checked, also can long-rangely check, makes that the obtain manner of analysis result is very flexible and convenient.
Description of drawings
Fig. 1. the basic framework of GB Modbus agreement;
Fig. 2 .Modbus analytical system hardware block diagram;
Fig. 3. analytical system software configuration entire block diagram;
Fig. 4. during based on the serial link pattern, analytical system is connected with signal between host computer and analyzed object;
Fig. 5. during based on the TCP/IP pattern, analytical system is connected with signal between host computer and analyzed object;
Fig. 6. during based on the serial link pattern, analytical system software and data-interface flow process;
Fig. 7. during based on the TCP/IP pattern, analytical system software and data-interface flow process;
Fig. 8. main website analysis strategy schematic diagram;
Fig. 9. slave station analysis strategy schematic diagram;
Figure 10. frame resolving schematic diagram;
Figure 11. result treatment process schematic diagram.
Specific implementation
As shown in Figure 2, the hardware of analytical system divides core board, communication daughter board and motherboard three parts to form.Core board is connected with motherboard by the SO-DIMM interface, and the communication daughter board then links to each other with motherboard by the PC104 interface.Such sandwich construction is convenient to design, debugging and the upgrading of hardware.Core board comprises central processing unit (CPU), internal memory (RAM) and flash memory (Flash) three parts, and its production firm and model are respectively: Samsung S3C2410, Hynix HY57V551620CT-H, SamsungK9F1208U0B.The communication daughter board has a 10M Ethernet interface and two global functional serial ports.The Ethernet interface chip adopts the CS8900 of Crystal company, and its inner utilization logic gates hardware has been realized the content of ICP/IP protocol stack physical layer and MAC layer segment; Serial ports 1 is worked under the RS232 of standard agreement, adopts MAX232 and standard DB9 interface to realize; Serial ports 2 is used to expand the support for the treatment of analytical equipment and network, works under the RS485 agreement, is realized by MAX488 chip and DB9 interface.Communication line between core board and the communication daughter board is by the motherboard support.Whole analytical system adopts the multistage structure that patches of core board, communication daughter board, motherboard, helps the exploitation and the software and hardware upgrading of Modbus analytical system.
The soft mode piece of analytical system comprises analyzing to be used software module and uses the software module two large divisions alternately.Analysis is mainly used in the bottom Modbus Frame of equipment to be analyzed with software module and communicates by letter, and comprises the built-in Linux operating system platform, Modbus bus software protocol stack, main website and the slave station management software unit that are used to manage whole analytical system hardware device resources and framework; Being mainly used in to operating personnel with software module alternately provides the upper strata man-machine interface of configuration bottom communication parameter and analysis strategy and transmit parameter and result between operating personnel and bottom software, mainly comprise the embedded web server boa that sets up the Web web service and operate on the boa, be used for providing the cgi page script of Web page type human-computer interaction interface to operating personnel.Two software modules are operated in bottom and upper strata respectively, and middle configuration file by specified format carries out data interaction.The software general frame as shown in Figure 3.
Above-mentioned two fatware modules all reside in the flash memory under power-down conditions.After analytical system powered on, (SuSE) Linux OS at first can move calling in internal memory with software module alternately behind the intact hardware device of initialization automatically.After the interactive software module started, host computer just can adopt general explorer and Modbus analytical system to carry out alternately.Mainly finish following function with software module alternately: 1) the response host computer receives the configuration file that host computer is submitted to every configuration of Modbus analytical system hardware interface (being mainly serial ports), and all configurations all are kept in the flash memory with the form of file the most at last; 2), start corresponding the analysis and use software module according to the configuration of host computer; 3) manage and upload analysis result.Analyze with software module after startup, mainly finish following function: 1) at first find configuration file, resolve and the related hardware interface of analytical system is configured in the flash memory relevant position; 2) afterwards according to the configuration information in the configuration file, move corresponding analysis strategy, begin to analyze; 3) record and analysis analysis result are write analysis result as relevant position that destination file is kept at flash memory according to the form of reserving in advance, by being responsible for uploading with module alternately.
Analyzing with the (SuSE) Linux OS platform that adopts in the software module is on standard Linux kernel basis, the built-in Linux operating system that is optimized and transplants and make up at the employed S3C2410 embedded hardware of analytical system platform.Carry out the efficient height because (SuSE) Linux OS has, software resource is abundant, develops advantage easily, can by independent programming development with build the means that third party's support software combines, realize the software overall structure of Modbus bus analysis system flexibly.
Analyzing adopts the C language codes independently to realize with the Modbus bus protocol stack in the software module fully, operate in the application layer of (SuSE) Linux OS, and according to the needs that protocol stack link layer communication condition carried out labor, on the basis of standard Modbus protocol stack, expand and transform, make the improved protocol stack can be according to user of service's analyze demands, flexibly to Modbus link layer Frame and being configured, thereby reach multianalysis Modbus equipment and network purpose for the response condition of various different types of data frames.
The superiors that analyze with software module are main website and slave station management software unit, this part is complete autonomous Design and exploitation, mainly finishes the parsing of the configuration file that the interactive software module is generated, the analysis of Modbus communications data frame and the statistics of record and analysis result and generates.
Aspect the interactive software module, we adopt based on analytical system software and hardware system platform construction embedded web server, host computer utilizes the mode of the Web page that the browser access analytical system provides, and realizes the configuration of user to analytical system working method and parameter.The embedded web server platform that is adopted is the use Web server boa that increases income widely under the Linux environment, it have simple in structure, take hardware resource few, carry out advantages such as efficient height, be highly suitable on embedded Linux platform, making up Web server.On this basis, we use the cgi script to write the webpage configuration interface unit of analytical system.
The software module of analytical system has realized analyzing manually, automatically dual mode.And corresponding to the different working modes of stipulating in the GB Modbus agreement (comprising the TCP/IP pattern, Ascii pattern on the serial link and RTU pattern), software module has realized that corresponding analysis strategy is to satisfy the needs of analyzing.
As shown in Figure 4, when selecting the serial link pattern to treat analytic target to analyze, analytical system links to each other with host computer by the Ethernet interface of communication daughter board, be used for the analyst and utilize configuration interface that analytical system is carried out remote operation and setting, concrete connected mode can be via linking to each other with host computer behind local area network (LAN) or the internet.The analytical system serial ports 2 that is operated under the RS485 agreement links to each other with 485 bus interface of equipment to be analyzed or network, is used to finish the Modbus protocol communication under the serial link pattern with equipment to be analyzed or network.Be operated in serial ports 1 under the RS232 agreement as the debugging bottom most interface of analytical system, the relevant operation information of the (SuSE) Linux OS platform of output analysis system.When the software of analytical system or hardware cisco unity malfunction, the developer can link to each other serial ports 1 with the RS232 serial ports of host computer, utilizes system's operation information of analytical system serial ports 1 output to carry out the diagnosis and the debugging of equipment.
Under the analytical system operating state, operating personnel utilize the Web browser of host computer, configuration webpage by Ethernet interface access analysis system interaction software module, the direct working method of designated analysis system on webpage, and fill in relevant configured parameter and the link-layer frame data passes is given analytical system.The relevant configured parameter that the user submitted to is preserved with the form of configuration file by page script, and starts analysis software module.The analysis software module that is kept in the Flash memory is read in the middle of the internal memory by (SuSE) Linux OS, and central processing unit reads software code and the operation in the internal memory.Analysis software module is obtained the various relevant configuration that the user carries out the protocol communication process by the configuration file that reads page script and create, and according to configuring condition the physical link parameter is set, and the Modbus link layer Frame of encapsulation specified format.Begin to carry out communication process afterwards with Modbus equipment.Under the serial link pattern, Modbus protocol communication process is to be finished by the RS-485 serial link between analytical system and the equipment by the protocol stack communications portion in the analysis software module.Analytical system all needs to write down the signal intelligence with equipment to be analyzed after the communication of whenever finishing a Frame, carry out the statistics of analysis result and the usefulness of checking for analyzing after finishing.After finishing the once complete analytic process of user's appointment, analysis software module need be carried out statistics and analysis to the analysis result of gained, calculate the Modbus Frame number of communications that equipment to be analyzed finishes, the Frame number of communications of mistake, the ASSOCIATE STATISTICS numerals such as number of times of lost data frames, the result of gained uses for the interactive software module in the middle of being kept at destination file.The interactive software module reads destination file, and returns to the user with the form of results web page.The software execution flow journey as shown in Figure 6.
When treating analytic target analyzing under being chosen in the TCP/IP pattern, analytical system is connected and can utilizes Ethernet interface to finish fully with the hardware of host computer and object to be analyzed.Because the Modbus agreement belongs to application layer protocol, its residing level is on ICP/IP protocol, so the hardware connection mode of Ethernet interface can be very flexible, can select directly to be connected on host computer and the object to be analyzed by network interface, also can be via being connected to host computer and object to be analyzed by universal network interface again behind local area network (LAN) even the internet.As shown in Figure 5.
When analytical system is operated in TCP/IP pattern following time, not essential distinction under software configuration that it is basic and working method and the serial link pattern.Just the physical link with equipment to be analyzed has made Ethernet interface into, and because the change of physical link, make analysis software module except the transmitting-receiving and protocol stack state machine that will handle the Modbus protocol data frame, also will have the access control ability that analytical system under the TCP/IP pattern is connected with TCP socket between the object to be analyzed.Software execution flow journey under the TCP/IP pattern as shown in Figure 7.
Analysis environments that Modbus analytical system involved in the present invention can adapt to and analysis content comprise:
1. object to be analyzed is operated in RTU or ascii mode following time, the pairing various working conditions of different physical link set-up modes.
2. object to be analyzed is to the data processing and the adaptive capacity of the Modbus claim frame and the response frame of various variety classeses and form.
3.TCP/IP under the mode of operation, the access control ability that object to be analyzed connects the TCP socket.
4. the stability of object to be analyzed under different link operation conditionss.
Different according to working method between analytical system and the equipment to be analyzed, the analysis strategy that this analysis system is realized is divided into analysis strategy under the main website working method and the analysis strategy two parts under the slave station working method, correspond respectively to analytical system as main website, as slave station, equipment to be analyzed is as two kinds of situations of main website as slave station and analytical system for equipment to be analyzed.
Analytical system is during as main website, and the analysis strategy of being taked as shown in Figure 8.After powering up, analytical system at first starts (SuSE) Linux OS, and calls a driver module initiating hardware equipment.After complete operation system start-up flow process, analytical system operation interactive software module (based on embedded web server).So, the analyst just can be in running parameter and the startup analytic process of host computer by configuration page setting analytical system.Operating personnel to the analytical system running parameter and analyze data be configured finish after, the configuration page is saved in user's configuration data in the configuration file of appointment, starts the analysis software module of bottom then.Bottom software obtains user's configuration parameter by the relevant parameter field that reads and resolve configuration file, according to these parameters the relevant hardware interface is configured setting, and the structural analysis Frame.Analytical system sends the Modbus claim frame according to the mode of user's appointment to equipment to be analyzed after this, and waits for the response of equipment to be analyzed.Return the difference of response frame according to equipment to be analyzed, analytical system is carried out record to the communication conditions of every frame.After the frame traffic of finishing user's predetermined number of times, analytical system is carried out statistics and analysis according to the communication conditions of noting to analysis result, and analysis result is saved as the destination file of specified format.The content that protocol frame is resolved comprises: judge whether current link has transmitted a complete Frame; Extract the function code field in the Frame, judge whether the function code in the Frame of receiving is effective function code, whether is the function code that analytical system is being analyzed; Extract the data content field in the Frame, judge whether with the data content of analytical system expection consistent; Calculate its LRC check code according to data frame content, and compare, mistake in transport process, whether occurs with the judgment data frame with the LRC check byte of Frame ending.The content that analysis result is handled comprises: the frame number sum of receiving in the process of calculation analysis, and compare the frame number that obtains losing with the frame traffic number of times of user's appointment; The erroneous frame number that statistics causes because of function code is illegal; Calculating is because of wrong erroneous frame numbers that produces such as the LRC verification make mistakes, data content is made mistakes; Calculating completes successfully the correct frame number of communication.
The flow process that detailed frame analysis and analysis result are handled can be referring to Figure 10 and Figure 11.Web server is created the analysis result page according to the destination file that the protocol stack communication software generates, and checks analysis result for the analyst.With the Ascii pattern on the serial link is example, and the process of frame analysis can come according to the frame decomposition that structure as shown in table 1 will receive, and analyzes and obtain corresponding statistics then according to the process of Figure 10.
Initial | The address | Function code | Data | The LRC verification | Finish |
1 character | 2 characters | 2 characters | 0 to 2 * 252 character | 2 characters | 2 characters |
Table 1Modbus data frame structure
Analytical system is during as slave station, similar under the basic procedure of its analysis strategy and the main website mode, just in the process that analytical system and equipment to be analyzed communicate, be to wait for that by analytical system equipment to be analyzed provides the Modbus claim frame, and return response frame to equipment to be analyzed.Concrete analysis strategy flow process as shown in Figure 9.
Claims (3)
1. based on the Modbus bus analysis system of embedded platform, it is characterized in that described Modbus bus apparatus is a kind of application layer Message Protocol that adopts among the Open Systems Interconnection OSI, the equipment of client/server communication is provided between the equipment that is connected to dissimilar buses or network, described analytical system contains: Modbus bus apparatus analytical system motherboard, core board and communication daughter board, wherein:
Core board comprises central processing unit S3C2410 and coupled internal memory and flash memory, links to each other with the backplane bus of described Modbus bus apparatus analytical system mother matrix by the SO-DIMM interface jointly, wherein:
Flash memory is resident under power-down conditions to be had the usefulness of analysis software module and uses software module alternately, wherein:
Analyze and use software module, be used for communicating by letter with the bottom Modbus Frame of analyzed Modbus bus apparatus, described analysis comprises built-in Linux operating system, Modbus bus software protocol stack with software module, and main website and slave station administrative unit, wherein:
The built-in Linux operating platform makes up at described central processing unit S3C2410, is used to manage whole hardware device resources of described analytical system and framework;
Modbus bus software protocol stack, be used for multianalysis Modbus bus apparatus and the network response condition for various different types of data frames, described Modbus bus software protocol stack is by hardware resource access interface and the interconnection of described built-in Linux operating system;
Main website and slave station management software unit, finish the parsing of the configuration file that described interactive software module is generated, the analysis of Modbus communications data frame and the statistics of record and analysis data and generate, by frame data interface and the interconnection of described Modbus bus software protocol stack;
This is analyzed with software module operation according to the following steps successively:
Step (1) at first finds configuration file in the flash memory relevant position, resolves this configuration file and the related hardware interface of described analytical system is configured, and described configuration file is that host computer is stored in the described flash memory with software module alternately by described;
Step (2), the configuration information by in the described configuration file moves corresponding analysis strategy, begins to analyze;
Step (3), record and analytic results form the relevant position that destination file is kept at described flash memory by predetermined format, are uploaded to described host computer with software module alternately by described;
The mutual software module of using, use general explorer and described analytical system to carry out alternately for host computer, the man-machine interface of configuration bottom communication parameter and analysis strategy is provided for the operating personnel of host computer, and between operating personnel and bottom software, provide parameter and result, this comprises with software module alternately: embedded web server boa, and the cgi page script, wherein:
Embedded web server boa is used to set up the Web web service;
The cgi page script operates on the boa, is used for providing the Web page type human-computer interaction interface to described operating personnel, and this cgi page script is by user's configuration, these two interfaces of analysis result and described embedded web server boa interconnection;
Should behind the intact hardware device of described (SuSE) Linux OS initialization, be written into internal memory and operation according to the following steps automatically with software module alternately:
Step (A) responds the configuration of described host computer to described analytical system hardware interface, receives the configuration file that this host computer submits to and is kept in the described flash memory;
Step (B) according to the configuration of described host computer, starts corresponding described analysis software module;
Step (C) is uploaded the analysis result in the step (B);
The communication daughter board, contain: 10M Ethernet interface, first DB9 serial port and second DB9 serial port, wherein:
The 10M Ethernet interface adopts chip CS8900, realizes ICP/IP protocol stack physical layer and media access control layer MAC;
First DB9 serial port is worked under the RS232 agreement, adopts MAX232 and DB9 interface,
Second DB9 serial port is worked under the RS485 agreement, adopts MAX488 chip and DB9 serial port;
Described 10M Ethernet interface, first DB9 serial port, second DB9 serial port link to each other with the backplane bus of described motherboard by the PC104 bus jointly, and the communication between described communication daughter board and the core board is by described motherboard support.
2. the Modbus bus analysis system based on embedded platform according to claim 1 is characterized in that under the serial link pattern, and described analytical system and described host computer and Modbus equipment to be analyzed or network are connected in the following manner:
Described 10M Ethernet interface links to each other with host computer through the network equipment, and be used for operating personnel and utilize configuration interface that described analytical system is carried out remote operation and setting,
Described second DB9 serial port links to each other with 485 buses of Modbus equipment to be analyzed or network, is used to finish the Modbus protocol communication under the serial link pattern with Modbus equipment to be analyzed or network.
Described first DB9 serial port is as the debugging bottom most interface of described analytical system, export the relevant operation information of the (SuSE) Linux OS platform of described analytical system, described first DB9 serial port links to each other with host computer by the RS232 serial ports, and the described operation information that also can utilize this first DB9 serial port to export when described analytical system cisco unity malfunction is diagnosed and debugged.
3. the Modbus bus analysis system based on embedded platform according to claim 1 is characterized in that in the TCP/IP pattern at present, and described analytical system and Modbus equipment to be analyzed or network and host computer are connected in the following manner:
Described 10M Ethernet interface links to each other with host computer and Modbus equipment to be analyzed or network respectively by the network equipment.
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 true CN101262486A (en) | 2008-09-10 |
CN101262486B 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) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102685134A (en) * | 2012-05-15 | 2012-09-19 | 深圳市中电电力技术股份有限公司 | Communication managing machine capable of being comprehensively realized based on extensible markup language and dynamic library |
CN102694695A (en) * | 2012-04-27 | 2012-09-26 | 南大傲拓科技江苏有限公司 | Serial communication configuration and debugging method based on Ethernet communication protocol |
CN102710792A (en) * | 2012-06-21 | 2012-10-03 | 上海理工大学 | Design method for embedded generic node with remote service function |
WO2013033889A1 (en) * | 2011-09-06 | 2013-03-14 | 长沙中联重工科技发展股份有限公司 | Method for communicating with plc and upper computer |
CN103792928A (en) * | 2014-02-24 | 2014-05-14 | 东南大学 | Industrial field data collecting and analyzing 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 |
CN105635317A (en) * | 2016-03-01 | 2016-06-01 | 中国科学院上海高等研究院 | Wireless communication method and system applied to bridge detection |
CN105700929A (en) * | 2016-01-15 | 2016-06-22 | 浪潮(北京)电子信息产业有限公司 | Method and system controlling operating system configuration parameter |
CN106874230A (en) * | 2015-12-11 | 2017-06-20 | 南车株洲电力机车研究所有限公司 | The daughter board for being applied to PC/104 EBIs and the method for being applied to the daughter board |
CN106888185A (en) * | 2015-12-15 | 2017-06-23 | 北京网御星云信息技术有限公司 | A kind of industrial network security means of defence based on serial link |
CN105320524B (en) * | 2015-11-16 | 2018-11-09 | 郑州众智科技股份有限公司 | The serial port communication method of controller starting-up interface based on STM32MCU |
CN109474707A (en) * | 2019-01-16 | 2019-03-15 | 济南浪潮高新科技投资发展有限公司 | 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 |
CN111240752A (en) * | 2019-12-31 | 2020-06-05 | 北京元心科技有限公司 | Operating system self-adaption method and system |
CN113433851A (en) * | 2021-06-09 | 2021-09-24 | 中国舰船研究设计中心 | Modular serial port type signal acquisition and processing device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB0201223D0 (en) * | 2002-01-19 | 2002-03-06 | Inc Technologies Holdings Ltd | Kiosk Technology kit |
CN100536513C (en) * | 2006-01-27 | 2009-09-02 | 上海纳杰电气成套有限公司 | Intelligent device with the automatic failure SMS alarm function |
-
2008
- 2008-04-18 CN CN2008101044001A patent/CN101262486B/en not_active Expired - Fee Related
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013033889A1 (en) * | 2011-09-06 | 2013-03-14 | 长沙中联重工科技发展股份有限公司 | Method for communicating with plc and upper computer |
CN102694695A (en) * | 2012-04-27 | 2012-09-26 | 南大傲拓科技江苏有限公司 | Serial communication configuration and debugging method based on Ethernet communication protocol |
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 |
CN102685134A (en) * | 2012-05-15 | 2012-09-19 | 深圳市中电电力技术股份有限公司 | 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 |
CN103792928A (en) * | 2014-02-24 | 2014-05-14 | 东南大学 | Industrial field data collecting and analyzing 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 |
CN106874230A (en) * | 2015-12-11 | 2017-06-20 | 南车株洲电力机车研究所有限公司 | The daughter board for being applied to PC/104 EBIs and the method for being applied to the daughter board |
CN106874230B (en) * | 2015-12-11 | 2020-01-03 | 南车株洲电力机车研究所有限公司 | Daughter board applied to PC/104 bus interface and method applied to daughter board |
CN106888185A (en) * | 2015-12-15 | 2017-06-23 | 北京网御星云信息技术有限公司 | A kind of industrial network security means of defence based on serial link |
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 |
CN109474707A (en) * | 2019-01-16 | 2019-03-15 | 济南浪潮高新科技投资发展有限公司 | Two-layer protocol design and data transmission method and system based on serial port protocol |
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 |
CN111240752A (en) * | 2019-12-31 | 2020-06-05 | 北京元心科技有限公司 | Operating system self-adaption method and system |
CN113433851A (en) * | 2021-06-09 | 2021-09-24 | 中国舰船研究设计中心 | Modular serial port type signal acquisition and processing device |
Also Published As
Publication number | Publication date |
---|---|
CN101262486B (en) | 2011-05-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101262486B (en) | Modbus bus analysis system based on built-in platform | |
CN112131636B (en) | Device and method for accurately mapping building information model and Internet of things monitoring item | |
CN100401707C (en) | Remote process transfering method and system in distribution type control system | |
CN102520619B (en) | General-purpose satellite remote sensing simulator | |
CN103384268B (en) | A kind of network embedded integration manufaturing data acquisition terminal | |
CN103792928B (en) | A kind of industrial field data acquisition analysis system based on Modbus | |
CN102891796B (en) | Mining intelligent transmission gateway | |
CN101859135B (en) | Method and device for controlling distributed automation system | |
CN106713357A (en) | Universal network protocol analysis method | |
CN105577439A (en) | Simulation method based on sensing device | |
EP3279816A1 (en) | Data analysis processing method, apparatus, computer device, and storage medium | |
CN112068808A (en) | General processing system for multi-bus data conversion of avionics system | |
CN117278661A (en) | Industrial Internet of things multi-protocol analysis method and system | |
CN101145970A (en) | System and method for online location of communication system device failures | |
CN102541811B (en) | On-demand computing-based data analysis device and method for analysis factors | |
CN108600150B (en) | Data acquisition flow method for cooperation of data acquisition platform and Internet of things terminal | |
CN112015374B (en) | Cross-programming-language micro-service integration system based on natural language | |
US7428486B1 (en) | System and method for generating process simulation parameters | |
CN110989499A (en) | Hybrid architecture control system based on high-speed wireless communication | |
Rauch et al. | A STEP-NC approach for multi-process manufacturing, simulation and optimisation | |
CN1932760B (en) | System and method for execution of application program | |
KR20200081657A (en) | Platform of Smart Factory | |
CN102243489B (en) | Cross-platform data processing system and method | |
CN205050186U (en) | Real -time automatic system of booking rooms | |
CN110098991B (en) | Equipment for accessing EtherCAT bus system to universal Internet of things cloud platform |
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 |