A software configuration method for a communication module based on the PROFINET protocol
By using a Qt5-based XML parsing library to parse PROFINET controller device description files, generate device parsing information, and configure the interface display, the problem of closed-source and complex PROFINET configuration in existing technologies is solved. This enables autonomous, controllable, convenient, and efficient device configuration, thereby improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG SUPCON RES
- Filing Date
- 2024-07-26
- Publication Date
- 2026-06-02
Smart Images

Figure CN119071279B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer software and industrial control technology, and in particular to a method for configuring communication module software based on the PROFINET protocol. Background Technology
[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 and standardizing industrial communication technologies. As a next-generation 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 aims to meet the demands of Industry 4.0 for more efficient, flexible, and integrated automation communication. PROFINET combines the successful experience of PROFIBUS with the widespread application of Ethernet technology, aiming to provide a unified network solution that supports both real-time communication and compatibility with IT standards (such as TCP / IP). It combines the advantages of traditional fieldbus technologies (such as the master-slave structure of PROFIBUS) with the advantages of modern Ethernet technology, making communication between devices faster, more reliable, and easier to integrate into a wider range of corporate networks. PROFINET innovates in its communication mechanism by dividing each communication cycle into two parts: a real-time channel and a standard channel (TCP / IP channel). Real-time channels ensure deterministic and low-latency transmission of control data, while standard channels handle non-time-sensitive data such as diagnostic information and parameter settings. This ensures real-time performance while fully leveraging the openness and flexibility of Ethernet. With the global advancement of Industry 4.0 and smart manufacturing, PROFINET has gained widespread adoption worldwide due to its high performance, openness, and excellent compatibility, with the number of installed nodes continuing to grow. It not only supports efficient communication between devices but also facilitates seamless integration of production data with enterprise-level IT systems, meeting the data transparency and interoperability requirements of future smart factories. In summary, the PROFINET technology background reflects the urgent need in the industrial automation field for efficient, integrated, and open communication standards, and the development trend of effectively integrating traditional automation technologies with modern information technologies as technology advances.
[0003] Regarding software configuration, many equipment manufacturers, both domestic and international, offer software that includes PROFINET configuration capabilities. For example, TIAPortal (Totally Integrated Automation Portal) is a comprehensive automation engineering software platform provided by Siemens, widely used for configuring, programming, and debugging Siemens PLCs (such as the S7-1200 and S7-1500 series) and configuring PROFINET networks. Users can use this software for equipment configuration, program writing, simulation testing, diagnosis, and maintenance, supporting advanced PROFINET functions and the latest equipment. PRONETA (PROFINET Network Analysis Tool) is a PC-based, installation-free software tool used for diagnosing and debugging PROFINET networks. It can automatically scan network topology, detect device status and 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; there is also ForceControl SCADA software, which, in addition to its powerful data acquisition and monitoring functions, also supports multiple communication protocols including PROFINET, enabling connection and data exchange with PROFINET devices; KingView provides a rich communication driver library, supports industrial Ethernet protocols such as PROFINET, and is convenient for building and managing PROFINET networks, but it is also not independently controllable. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of the prior art by providing a communication module software configuration method based on the PROFINET protocol. This method empowers industrial control software with the ability to configure and control controller devices based on the PROFINET protocol, giving traditional industrial control software the ability to configure PN devices autonomously, conveniently, and efficiently, thereby improving the user experience.
[0005] A method for configuring communication module software based on the PROFINET protocol includes the following steps:
[0006] S1: Using a Qt5-based XML parsing library combined with the GSDML file standard structure, it autonomously parses the PROFINET controller device description file, i.e., the GSDML file, and generates device parsing information.
[0007] S2: Display the description information designed based on the device parsing information and the configuration information set by the user on the software interface, respectively, for configuring the parameters of the software's controller module;
[0008] S3: Save the configuration information to the specified file format, input it into the compiler software for execution, and simultaneously input the GSDML file into the compiler software and execute the call to generate the standard configuration file.
[0009] Furthermore, the GSDML file includes detailed device I / O mappings and parameter information. Parsing this description file specifically includes the following steps:
[0010] S11: The PROFINET slave provides the GSDML file to be parsed to the PROFINET master configuration software. The description file is written according to the GSDML file specification and is imported into the device library by the software. When configuration is required, the corresponding file is parsed.
[0011] S12: The PROFINET master station configuration software acquires the characteristics of the PROFINET slave device and the data interfaces supported by the PROFINET slave device, and defines the data structure according to the GSDML file standard;
[0012] S13: Use Qt5's QXmlStreamReader to parse the given GSDML file line by line, fill the parsed data into the defined data structure, and define some API functions to use the parsed data.
[0013] Specifically, in step S13, the process of parsing the given GSDML file line by line using the QXmlStreamReader of Qt5 includes:
[0014] The program accepts a GSDML file as input as a file path and reads it. It then uses QXmlStreamReader to parse the file line by line, reading the header and body structures according to the standard GSDML file structure. The body structure contains device definition information and information on available modules, submodules, etc.
[0015] More preferably, in step S13, defining 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 device description for the current version;
[0017] Define and call the GetCurrentSlaveInputLength function to obtain the input length of the current version of the device, etc.
[0018] Define and call the GetDeviceAccessPointList function to obtain information such as available modules and slot definitions for multiple versions of devices;
[0019] Define and call the GetModuleListMap function to retrieve information on all available modules on the device;
[0020] Define and call the `GetPhysicalShots` function 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; its file format is XML, and the parsing of the description file follows the data structure defined by the `GSDML` file standard 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 device setting station name, address and parameters. The module information includes setting specification information such as the version and parameters of the device's modules and sub-modules.
[0022] The description information includes basic information and module information. The description information is designed based on the device parsing information and displayed according to user needs.
[0023] Furthermore, in step S3, generating the standard configuration file specifically includes the following steps:
[0024] S31: Extract the configuration item information set by the user in the software interface;
[0025] S32: Save the configuration item information to a specified file format to generate a configuration information file. The configuration information file is generated in the 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, the PNConfigLib software library checks whether the device description file and the user configuration information are correct, and finally generates an executable control configuration file.
[0027] Preferably, in step S32, the configuration information files include Configuration.xml and ListOfNodes.xml. The Configuration.xml file mainly stores the device's station name, address, module, and parameter information, while the ListOfNodes.xml file mainly stores the device's description file path information.
[0028] Compared with the prior art, the beneficial effects of the present invention are:
[0029] (1) This invention proposes a PROFINET controller device description file parsing method, which can autonomously and controllably parse standard device description files;
[0030] (2) Based on the information of the parsing device, the present invention develops a software controller module parameter configuration method, which allows users to easily and simply process the important information of the controller on the configuration interface;
[0031] (3) This invention combines Siemens’ open-source PROFINET compiler to propose a method for generating PROFINET standard configuration files that is integrated into domestic software, thereby enabling domestic software to control PROFINET devices. Attached Figure Description
[0032] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0033] Figure 1 This is a flowchart of a communication module software configuration method based on the PROFINET protocol according to the present invention;
[0034] Figure 2 This is a flowchart of a PROFINET controller device description file parsing method according to the present invention;
[0035] Figure 3 This is a block diagram illustrating the parameter configuration structure of a software controller module according to the present invention.
[0036] Figure 4 This is a flowchart of a software method for generating standard configuration files according to the present invention. Detailed Implementation
[0037] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0038] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this specification means the presence of the stated 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 this invention is to provide a software configuration method for communication modules based on the PROFINET protocol, enabling traditional industrial control software to configure PROFINET devices autonomously, conveniently, and efficiently, thereby improving the user experience. This method includes: a PROFINET controller device description file parsing method, a software controller module parameter configuration method, and a software standard configuration file generation method.
[0040] The specific embodiments of the present invention will be described below with reference to the accompanying drawings and examples.
[0041] Example 1
[0042] like Figure 1 As shown in the figure, this embodiment provides a communication module software configuration method based on the PROFINET protocol, which includes the following steps:
[0043] S1: Using a Qt5-based XML parsing library combined with the GSDML file standard structure, it autonomously parses the PROFINET controller device description file, i.e., the GSDML file, and generates device parsing information.
[0044] S2: Display the description information designed based on the device parsing information and the configuration information set by the user on the software interface, respectively, for configuring the parameters of the software's controller module;
[0045] S3: Save the configuration information to the specified file format, input it into the compiler software for execution, and simultaneously input the GSDML file into the compiler software and execute the call to generate the standard configuration file.
[0046] Step S1 is the PROFINET controller device description file parsing method, step S2 is the software controller module parameter configuration method, and step S3 is the software standard configuration file generation method.
[0047] In step S1, the PN device description file, i.e., the GSDML file, includes detailed device I / O mappings and parameter information. User-facing software and the compiler used to generate the driver device configuration file need to use this information to verify and generate the user-configured information. However, most commercially available software that can parse PN device description files is closed-source, making parsing the description file difficult. Figure 2 As shown, the specific steps include the following:
[0048] S11: The PROFINET slave provides the GSDML file to be parsed to the PROFINET master configuration software. The description file is written according to the GSDML file specification and is imported into the device library by the software. When configuration is required, the corresponding file is parsed.
[0049] S12: The PROFINET master station configuration software acquires the characteristics of the PROFINET slave device and the data interfaces supported by the PROFINET slave device, and defines the data structure according to the GSDML file standard;
[0050] S13: Use Qt5's QXmlStreamReader to parse the given GSDML file line by line, fill the parsed data into the defined data structure, and define some API functions to use the parsed data.
[0051] Specifically, in step S13, the process of parsing the given GSDML file line by line using the QXmlStreamReader of Qt5 includes:
[0052] The program accepts a GSDML file as input as a file path and reads it. It then uses QXmlStreamReader to parse the file line by line, reading the header and body structures according to the standard GSDML file structure. The body structure contains device definition information and information on available modules, submodules, etc.
[0053] Furthermore, in this embodiment, the definition of some API functions for parsing 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 multiple versions of devices;
[0057] Define and call the GetModuleListMap function to retrieve information on all available modules on the device;
[0058] Define and call the `GetPhysicalShots` function to obtain the number of physical slots on the current version of the device. Furthermore, the GSDML file is a structured extension of the GSD file; it 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 for storing the parsed information.
[0059] In step S2, the configuration item information includes setting information and module information. The setting information includes information such as device setting station name, address and parameters. The module information includes the version, parameters and other setting information of the device's modules and sub-modules.
[0060] The description information includes basic information and module information. The description information is designed based on the device parsing information and displayed according to user needs.
[0061] like Figure 3 As shown, the interface is mainly divided into configuration items and description items. Configuration items are what the user needs to configure, while description items display specific information about the device. Within "Configuration," there are "Settings" and "Modules." "Settings" allows you to set information such as the device's station name, address, and parameters, while "Modules" specifies information such as the version and parameters of the device's modules and sub-modules. In "Description," information is parsed using GSDML and the items designed for the user are displayed, divided into "Basic Information" and "Module Information."
[0062] Further, in step S3, the generation of the standard configuration file is as follows: Figure 4 As shown, the specific steps include the following:
[0063] S31: Extract the configuration item information set by the user in the software interface;
[0064] S32: Save the configuration item information to a specified file format to generate a configuration information file. The configuration information file is generated in the 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, the PNConfigLib software library checks whether the device description file and the user configuration information are correct, and finally generates an executable control configuration file.
[0066] In step S32 of this embodiment, the configuration information files include Configuration.xml and ListOfNodes.xml. The Configuration.xml file mainly stores the device's station name, address, module, and parameter information, while the ListOfNodes.xml file mainly stores the device's description file path information.
[0067] Compared with existing technologies, this patent has independently and controllably developed 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 this invention, XML stands for Extensible Markup Language, GSD stands for General Station Description, and GSDML stands for General Station Description Markup Language.
[0069] Finally, it should be noted that the above description is only a preferred embodiment of the present invention, and the scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be pointed out that for those skilled in the art, any improvements and modifications made without departing from the principle of the present invention should also be considered within the scope of protection of the present invention.
[0070] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above 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 software configuration method for a communication module based on the PROFINET protocol, characterized in that, Includes the following steps: S1: Using a Qt5-based XML parsing library combined with the GSDML file standard structure, the PROFINET controller device description file, i.e., the GSDML file, is automatically parsed to generate device parsing information. The GSDML file includes detailed device I / O mappings and parameter information. Parsing this description file specifically includes the following steps: S11: The PROFINET slave provides the GSDML file to be parsed to the PROFINET master configuration software. The description file is written according to the GSDML file specification and is imported into the device library by the software. When configuration is required, the corresponding file is parsed. S12: The PROFINET master station configuration software acquires the characteristics of the PROFINET slave device and the data interfaces supported by the PROFINET slave device, and defines the data structure according to the GSDML file standard; S13: Use Qt5's QXmlStreamReader to parse the given GSDML file line by line, fill the parsed data into the defined data structure, and define API functions to use the parsed data; S2: Display the description information designed based on the device parsing information and the configuration information set by the user on the software interface, respectively, for configuring the parameters of the controller module of the software; S3: Save the configuration information as a specified file format, input it into the compiler software for execution, and simultaneously input the GSDML file into the compiler software and execute the call to generate a standard configuration file. The generation of the standard configuration file specifically includes the following steps: S31: Extract the configuration item information set by the user in the software interface; S32: Save the configuration item information as a specified file format to generate a configuration information file. The configuration information file is generated in the 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, the PNConfigLib software library checks whether the device description file and the user configuration information are correct, and finally generates an executable control configuration file.
2. The communication module software configuration method based on the PROFINET protocol according to claim 1, characterized in that, In step S13, the process of parsing the given GSDML file line by line using the QXmlStreamReader of Qt5 specifically includes: It accepts the path to a GSDML file as an input parameter, reads the file according to the input parameter, and parses it line by line using QXmlStreamReader. It reads the header structure and body structure according to the standard GSDML file structure. The body structure contains the device definition information and the information of the modules and submodules that can be used.
3. The communication module software configuration method based on the PROFINET protocol according to claim 1, characterized in that, In step S13, the defined API function is used to parse 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 retrieve available modules and slot definition information for multiple device versions; Define and call the GetModuleListMap function to retrieve information about all available modules on the device; Define and call the GetPhysicalShots function to obtain the number of physical slots for the current version of the device.
4. The communication module software configuration method based on the PROFINET protocol according to claim 1, characterized in that, The GSDML file is a structured extension of the GSD file. It is in XML format and defines a data structure according to the GSDML file standard. It is used to store the information obtained by parsing the description file.
5. The communication module software configuration method based on the PROFINET protocol according to claim 1, characterized in that, In step S2, the configuration item information includes setting information and module information. The setting information includes the device setting station name, address, and parameter information. The module information includes the device's module and sub-module version, parameters, and other setting specifications. The description information includes basic information and module information. The description information is designed based on the device parsing information and displayed according to user needs.
6. The communication module software configuration method based on the PROFINET protocol according to claim 1, characterized in that, In step S32, the configuration information files include Configuration.xml and ListOfNodes.xml. The Configuration.xml file is used to store the device's station name, address, module, and parameter information, and the ListOfNodes.xml file is used to store the device's description file path information.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the communication module software configuration method based on the PROFINET protocol as described in any one of claims 1-6.
8. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause 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-6.