Communication module software configuration method based on PROFINET protocol
Through the Qt5-based XML parsing library, PROFINET device description files are analyzed and standard configuration files are generated, which solves the problem of complex device configuration in the existing technology, realizes independent and controllable and efficient device configuration, improves user experience and gives domestic software control Capabilities of PROFINET devices.
Patent Information
- Application Number
- CN202411012572.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-07-26
AI Technical Summary
The existing PROFINET device configuration software is complex in operation and is inconvenient for autonomous control, lacks independent control and efficient configuration capabilities, which affects the user experience.
Using the Qt5-based XML parsing library combined with the GSDML file standard structure, the PROFINET controller device description file is independently parsed, the device parsing information is generated, and the configuration items and description items are displayed through the software interface, and the standard configuration files are saved and generated to achieve independent and controllable Device configuration.
It provides a simple and easy-to-understand device configuration interface, improves user experience, and gives domestic software the ability to control PROFINET devices, realizing the independent controllable and efficient configuration of traditional industrial control software.
Smart Images

Figure CN119071279A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of computer software and industrial control, and in particular to a communication module software configuration method based on PROFINET protocol. Background Art
[0002] PROFINET technology is an advanced communication protocol developed in the field of industrial automation. PROFINET was launched by PROFIBUS International (PI), an organization dedicated to promoting the standardization and promotion of industrial communication technology. As a new generation of automation bus standard based on Industrial Ethernet technology, PROFINET was first introduced in 2003 and gradually became part of the IEC 61158 and IEC 61784 international standards. The development of this technology is aimed at meeting the needs of efficient, flexible and more integrated automation communication in the era of Industry 4.0. PROFINET combines the successful experience of PROFIBUS with the widespread application of Ethernet technology, aiming to provide a unified network solution that supports real-time communication and is compatible with IT standards (such as TCP / IP). It combines traditional fieldbus technology (such as the master-slave structure of PROFIBUS) with the advantages of modern Ethernet technology, making communication between devices faster, more reliable, and easy to integrate into a wider company network. PROFINET has achieved innovation in communication mechanism, dividing each communication cycle into two parts: real-time channel and standard channel (TCP / IP channel). The real-time channel ensures deterministic and low-latency transmission of control data, while the standard channel handles non-time-sensitive data such as diagnostic information and parameter settings, which ensures real-time performance and fully utilizes the openness and flexibility of Ethernet. With the advancement of Industry 4.0 and smart manufacturing around the world, PROFINET has been widely used around the world with its high performance, openness and good compatibility, and the number of installed nodes continues to grow. It not only supports efficient communication between devices, but also promotes the seamless integration of production data with enterprise-level IT systems, meeting the requirements of future smart factories for data transparency and interoperability. In summary, the PROFINET technical background reflects the urgent need for efficient, integrated and open communication standards in the field of industrial automation, as well as the development trend of how to effectively integrate traditional automation technology with modern information technology as technology advances.
[0003] As for software configuration, there are many equipment manufacturers at home and abroad whose software contains PROFINET configuration, such as TIAPortal (Totally Integrated Automation Portal), which is an integrated automation engineering software platform provided by Siemens, and is widely used for configuration, programming, and debugging of Siemens PLCs (such as S7-1200, S7-1500 series) and configuration of PROFINET networks. Users can use this software to configure equipment, write programs, perform simulation tests, diagnose and maintain, etc. It supports PROFINET's advanced functions and the latest equipment; PRONETA (PROFINET Network Analysis Tool) is a PC-based software tool that does not require installation and is used to diagnose and debug PROFINET networks. It can automatically scan network topology, detect device status, network health, and provide detailed diagnostic reports; CODESYS is a popular IEC61131-3 programming system that also supports PROFINET configuration, but it is relatively complex to use, inconvenient to operate, and closed-source and uncontrollable; and Likong SCADA software, in addition to powerful data acquisition and monitoring functions, also supports a variety of communication protocols including PROFINET, and can achieve connection and data exchange with PROFINET devices; KingView provides a rich communication driver library that supports industrial Ethernet protocols such as PROFINET, which is convenient for building and managing PROFINET networks, but it is also not autonomous and controllable. Summary of the invention
[0004] The purpose of the present invention is to solve the shortcomings of the above-mentioned prior art and provide a communication module software configuration method based on the PROFINET protocol, which gives industrial control software the ability to configure and control controller devices based on the PROFINET protocol, and gives traditional industrial control software the ability to configure PN devices autonomously, conveniently and efficiently, thereby improving user experience.
[0005] A communication module software configuration method based on PROFINET protocol includes the following steps:
[0006] S1: Use the Qt5-based XML parsing library combined with the GSDML file standard structure to autonomously parse the PROFINET controller device description file, i.e., the GSDML file, and generate device parsing information;
[0007] S2: Displaying and arranging the descriptive item information designed according to the device parsing information and the configuration item information set by the user on the software interface respectively, so as to configure the parameters of the controller module of the software;
[0008] S3: Save the configuration item information into a specified file format, input it into a compiler software for execution, input the GSDML file into the compiler software, and execute the call to generate a standard configuration file.
[0009] Furthermore, the GSDML file includes detailed device IO mapping and parameter information, and parsing the description file specifically includes the following steps:
[0010] S11: The PROFINET slave station provides the GSDML file to be parsed to the PROFINET master station configuration software for use. The description file is written according to the GSDML file specification and is imported into the device library by the software. When the configuration needs to be used, the corresponding file is parsed;
[0011] S12: the PROFINET master configuration software obtains the characteristics of the PROFINET slave device and the data interface supported by the PROFINET slave device, and defines the data structure according to the GSDML file standard;
[0012] S13: Utilize the QXmlStreamReader of Qt5 to parse the given GSDML file line by line, fill the parsed data into the defined data structure, and define some API functions for using the parsed data.
[0013] Wherein, in step S13, the parsing of the given GSDML file line by line by using the QXmlStreamReader of Qt5 specifically includes:
[0014] Accept the GSDML file as the file path input and read it, parse it line by line using QXmlStreamReader, read the header structure and body structure according to the standard structure of the GSDML file, the body structure contains the definition information of the device and the available modules, submodules information and so on.
[0015] Preferably, in step S13, the definition of some API functions for using parsed data includes but is not limited to:
[0016] Define and call the GetDeviceID function to read the ID information of the current version of the device description;
[0017] Define and call the GetCurrentSlaveInputLength function to obtain the input length of the current version of the device;
[0018] Define and call the GetDeviceAccessPointList function to obtain information such as available modules and slot definitions for multi-version devices;
[0019] Define and call the GetModuleListMap function to obtain all module information available on the device;
[0020] The GetPhysicalShots function is defined and called to obtain the number of physical slots available for the current version of the device. Furthermore, the GSDML file is a structured extension of the GSD file, and the file is in XML format. The parsing of the description file defines a data structure according to the GSDML file standard, and is used to store the parsed information.
[0021] Further, in step S2, the configuration item information includes setting information and module information, the setting information includes information such as the device setting station name, address and parameters, and the module information includes setting specific information such as the version and parameters of the module and submodule of the device;
[0022] The descriptive item information includes basic information and module information. The descriptive item information is designed based on the device parsing information and displayed according to user needs.
[0023] Furthermore, in step S3, generating a standard configuration file specifically includes the following steps:
[0024] S31: extracting the configuration item information set by the user in the software interface;
[0025] S32: Save the configuration item information into a specified file format to generate a configuration information file, wherein the configuration information file is generated in a standard format required by the PNConfigLib software library;
[0026] S33: Execute the compiler software, input the configuration information file and the PROFINET controller device description file, and the PNConfigLib software library checks whether the device description file and the user-configured information are correct, and finally generates an executable control configuration file.
[0027] Preferably, in step S32, the configuration information file includes Configuration.xml and ListOfNodes.xml, the Configuration.xml file mainly stores the station name, address, module, and parameter information of the device, and the ListOfNodes.xml file mainly stores the description file path information of the device.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] (1) The present invention provides a PROFINET controller device description file parsing method, which autonomously and controllably parses a standard device description file;
[0030] (2) The present invention develops a set of software controller module parameter configuration methods based on the information of the parsed device, which allows users to process important information of the controller in a concise and easy-to-understand manner on the configuration interface;
[0031] (3) The present invention combines the open source PROFINET compiler of Siemens and proposes a method for generating a PROFINET standard configuration file integrated in domestic software, thereby giving domestic software the ability to control PROFINET devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0033] Figure 1 A flow chart of a communication module software configuration method based on PROFINET protocol according to the present invention;
[0034] Figure 2 A flow chart of a PROFINET controller device description file parsing method of the present invention;
[0035] Figure 3 A block diagram of the structural relationship of a software controller module parameter configuration of the present invention;
[0036] Figure 4 The present invention is a flow chart of a method for generating a standard configuration file by software. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0038] Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of the features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0039] The purpose of the present invention is to provide a communication module software configuration method based on the PROFINET protocol, which gives traditional industrial control software the ability to configure PROFINET devices autonomously, conveniently and efficiently, and improves user experience. The method includes: a PROFINET controller device description file parsing method, a software controller module parameter configuration method and a software generation standard configuration file method.
[0040] The specific implementation of the present invention is described below with reference to the accompanying drawings and embodiments.
[0041] Example 1
[0042] like Figure 1 As shown, this embodiment provides a communication module software configuration method based on the PROFINET protocol, comprising the following steps:
[0043] S1: Use the Qt5-based XML parsing library combined with the GSDML file standard structure to autonomously parse the PROFINET controller device description file, i.e., the GSDML file, and generate device parsing information;
[0044] S2: Displaying and arranging the descriptive item information designed according to the device parsing information and the configuration item information set by the user on the software interface respectively, so as to configure the parameters of the controller module of the software;
[0045] S3: Save the configuration item information into a specified file format, input it into a compiler software for execution, input the GSDML file into the compiler software, and execute the call to generate a standard configuration file.
[0046] Step S1 is a method for parsing a PROFINET controller device description file, step S2 is a method for configuring software controller module parameters, and step S3 is a method for generating a standard configuration file by software.
[0047] In step S1, the PN device description file, i.e., the GSDML file, includes detailed device IO mapping and parameter information. The user-oriented software and the compiler used to generate the configuration file of the driver device need to use the specified information to verify and generate the user-configured information. However, most of the software on the market that can parse the PN device description file is closed source. Figure 2 As shown, the specific steps include:
[0048] S11: The PROFINET slave station provides the GSDML file to be parsed to the PROFINET master station configuration software for use. The description file is written according to the GSDML file specification and is imported into the device library by the software. When the configuration needs to be used, the corresponding file is parsed;
[0049] S12: the PROFINET master configuration software obtains the characteristics of the PROFINET slave device and the data interface supported by the PROFINET slave device, and defines the data structure according to the GSDML file standard;
[0050] S13: Utilize the QXmlStreamReader of Qt5 to parse the given GSDML file line by line, fill the parsed data into the defined data structure, and define some API functions for using the parsed data.
[0051] Specifically, in step S13, the parsing of the given GSDML file line by line by using the QXmlStreamReader of Qt5 specifically includes:
[0052] Accept the GSDML file as the file path input and read it, parse it line by line using QXmlStreamReader, read the header structure and body structure according to the standard structure of the GSDML file, the body structure contains the definition information of the device and the available modules, submodules information and so on.
[0053] In addition, in this embodiment, the definition of some API functions for using parsed data includes but is not limited to:
[0054] Define and call the GetDeviceID function to read the ID information of the current version of the device;
[0055] Define and call the GetCurrentSlaveInputLength function to obtain the input length of the current version of the device;
[0056] Define and call the GetDeviceAccessPointList function to obtain information such as available modules and slot definitions for multi-version devices;
[0057] Define and call the GetModuleListMap function to obtain all module information available on the device;
[0058] Define and call the GetPhysicalShots function to obtain the number of physical slots of the current version of the device. Furthermore, the GSDML file is a structured extension of the GSD file. The file is in XML format and can be opened and edited using any text editor. The parsing of the description file defines a data structure according to the GSDML file standard, which is used to store the parsed information.
[0059] In step S2, the configuration item information includes setting information and module information, wherein the setting information includes information such as the device setting station name, address and parameters, and the module information includes setting specific information such as the version and parameters of the device's module and submodule;
[0060] The descriptive item information includes basic information and module information. The descriptive item information is designed based on the device parsing information and displayed according to user needs.
[0061] like Figure 3 As shown in the figure, the interface is mainly divided into configuration items and description items. Configuration items are required by user configuration, and description items are to display specific information of the device. In "Configuration", it is mainly divided into "Settings" and "Modules". "Settings" is to set the station name, address, parameters and other information for the device, while "Modules" is to set specific information such as the version and parameters of the module and submodule of the device. In "Description", it is mainly based on GSDML parsing information and designing the items that users need to see for display, which is divided into "Basic Information" and "Module Information".
[0062] Further, in step S3, the standard configuration file is generated as follows: Figure 4 As shown, the specific steps include:
[0063] S31: extracting the configuration item information set by the user in the software interface;
[0064] S32: Save the configuration item information into a specified file format to generate a configuration information file, wherein the configuration information file is generated in a standard format required by the PNConfigLib software library;
[0065] S33: Execute the compiler software, input the configuration information file and the PROFINET controller device description file, and the PNConfigLib software library checks whether the device description file and the user-configured information are correct, and finally generates an executable control configuration file.
[0066] Among them, in step S32 of this embodiment, the configuration information file includes Configuration.xml and ListOfNodes.xml, the Configuration.xml file mainly stores the station name, address, module, and parameter information of the device, and the ListOfNodes.xml file mainly stores the description file path information of the device.
[0067] Compared with the existing technology, this patent independently and controllably develops an implementation method for device configuration software based on the PROFINET communication protocol, which efficiently and clearly displays important device configuration information and provides PROFINET communication support for traditional industrial control software.
[0068] In the present invention, XML is Extensible Markup Language, GSD is General Station Description, and GSDML is General Station Description Markup Language.
[0069] Finally, it should be noted that the above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
[0070] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A communication module software configuration method based on PROFINET protocol, characterized in that: The steps include: S1: Use the Qt5-based XML parsing library combined with the GSDML file standard structure to autonomously parse the PROFINET controller device description file, i.e., the GSDML file, and generate device parsing information; S2: Displaying and arranging the descriptive item information designed according to the device parsing information and the configuration item information set by the user on the software interface respectively, so as to configure the parameters of the controller module of the software; S3: Save the configuration item information into a specified file format, input it into a compiler software for execution, input the GSDML file into the compiler software, and execute the call to generate a standard configuration file.
2. The communication module software configuration method based on the PROFINET protocol according to claim 1, characterized in that: In step S1, the GSDML file includes detailed device IO mapping and parameter information, and parsing the description file specifically includes the following steps: S11: The PROFINET slave station provides the GSDML file to be parsed to the PROFINET master station configuration software for use. The description file is written according to the GSDML file specification and is imported into the device library by the software. When the configuration needs to be used, the corresponding file is parsed; S12: the PROFINET master configuration software obtains the characteristics of the PROFINET slave device and the data interface supported by the PROFINET slave device, and defines the data structure according to the GSDML file standard; S13: Utilize the QXmlStreamReader of Qt5 to parse the given GSDML file line by line, fill the parsed data into the defined data structure, and define some API functions for using the parsed data.
3. The communication module software configuration method based on the PROFINET protocol according to claim 2, characterized in that: In step S13, the use of Qt5's QXmlStreamReader to parse the given GSDML file line by line specifically includes: Accept the GSDML file as the file path input and read it, parse it line by line using QXmlStreamReader, read the header structure and body structure according to the standard structure of the GSDML file, the body structure contains the definition information of the device and the available modules, submodules information and so on.
4. The communication module software configuration method based on the PROFINET protocol according to claim 2, characterized in that: In step S13, some API functions are defined to use the parsed data, including but not limited to: Define and call the GetDeviceID function to read the ID information of the current version of the device; Define and call the GetCurrentSlaveInputLength function to obtain the input length of the current version of the device; Define and call the GetDeviceAccessPointList function to obtain information such as available modules and slot definitions for multi-version devices; Define and call the GetModuleListMap function to obtain all module information available on the device; Define and call the GetPhysicalShots function to obtain the number of physical slots of the current version of the device.
5. The communication module software configuration method based on PROFINET protocol according to claim 2, characterized in that: The GSDML file is a structured extension of the GSD file, and the file is in XML format. The parsing of the description file is based on the GSDML file standard definition data structure, which is used to store the parsed information.
6. The communication module software configuration method based on PROFINET protocol according to claim 1, characterized in that: In step S2, the configuration item information includes setting information and module information, wherein the setting information includes information such as the device setting station name, address and parameters, and the module information includes setting specific information such as the version and parameters of the device's module and submodule; The descriptive item information includes basic information and module information. The descriptive item information is designed based on the device parsing information and displayed according to user needs.
7. The communication module software configuration method based on PROFINET protocol according to claim 1, characterized in that: In step S3, the generation of the standard configuration file specifically includes the following steps: S31: extracting the configuration item information set by the user in the software interface; S32: Save the configuration item information into a specified file format to generate a configuration information file, wherein the configuration information file is generated in a standard format required by the PNConfigLib software library; S33: Execute the compiler software, input the configuration information file and the PROFINET controller device description file, and the PNConfigLib software library checks whether the device description file and the user-configured information are correct, and finally generates an executable control configuration file.
8. The method for configuring the communication module software based on the PROFINET protocol according to claim 7, characterized in that: In step S32, the configuration information file includes Configuration.xml and ListOfNodes.xml. The Configuration.xml file mainly stores the station name, address, module, and parameter information of the device, and the ListOfNodes.xml file mainly stores the description file path information of the device.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the communication module software configuration method based on the PROFINET protocol as described in any one of claims 1 to 8 is implemented.
10. An electronic device, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the communication module software configuration method based on the PROFINET protocol as described in any one of claims 1-8.
Citation Information
Patent Citations
Switch equipment networking method, switch equipment supporting profinet protocol and storage medium
CN111541566A
Method for linkage control of robot through USB control handle
CN114474108A
Equipment parameter acquisition method and device, computer equipment and computer readable medium
CN116661893A
Method for exchanging configuration data of field bus configuration software
CN116866142A
IO equipment communication system and method
CN117793033A
Cited By
PLC visual control device and method based on PROFINET slave station
CN121037355A
