A method for managing module functions in PLC programming control software

By using XML format device description files, abstract functions and reflection principles in PLC programming control software, flexible adaptation of PLC module functions and automatic mapping of configuration interfaces are realized, solving the maintenance complexity problem when the PLC module function changes in the existing technology, and improving the maintenance convenience and operation efficiency of the software.

CN115685866BActive Publication Date: 2025-04-22NANDA AUTOMATION TECH JIANGSU CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211137119.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-19
Publication Date
2025-04-22
Estimated Expiration
2042-09-19

AI Technical Summary

Technical Problem

When the existing PLC programming control software adds or modifys the functions of PLC modules, it needs to make functional changes in the software development environment, resulting in complex and inconvenient maintenance.

Method used

By using specific XML format device description files in PLC programming control software, combining abstract functions and reflection principles, the mapping between the device description files and the configuration interface is realized, allowing users to add or modify module functions without functional changes through the device description files.

Benefits of technology

It realizes that the PLC programming control software can adapt to the needs of flexible module adaptation after one development, reduces the complexity of software maintenance, enables product maintenance personnel to complete module adaptation work, and improves the software operation efficiency and maintenance convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115685866B_ABST
    Figure CN115685866B_ABST
Patent Text Reader

Abstract

The invention discloses a method for managing module functions in PLC programming control software, and relates to a method for using PLC programming control software to read function blocks of a PLC module device description file and create a configuration interface in the field of industrial control. The PLC programming control software can be developed once to meet the needs of flexible module adaptation. The fixed format specification of the device description file generates different configuration interfaces after being interpreted by the programming control software, and uses different data structures to store parameters to finally form a configuration file. The configuration file is finally downloaded to the PLC module to be interpreted and executed. The interpretation of the PLC device description file in a specific format is realized, and a variety of methods are used in combination in the PLC programming control software to uniformly organize and manage the configuration of different functions of the PLC device. The needs of flexible module combination functions can be met with one-time development, and there is no need for a secondary development process of functional changes. Subsequent maintenance work is made more convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method for using PLC (Programmable logic controller) programming control software to read function blocks of a PLC module device description file and create a configuration interface in the field of industrial control. Background Art

[0002] PLC programming and control software is widely used in various aspects of industrial production. PLC programming has a wide range of applications, powerful functions, and is easy to use. It has been widely used in all areas of industrial production. The basic components of PLC programming and control software include the management and configuration of PLC modules, the configuration of various communication protocols, as well as registers and structured programming. Among them, the management and configuration of PLC modules is one of the main functions of the software. PLC modules generally include CPU modules, communication modules of various protocols, digital input / output modules, analog input / output modules, high-speed counting modules, event modules and other categories. The ways in which PLC programming and control software on the market implement module configuration and management can be roughly divided into the following categories:

[0003] 1. Embedded mode: The management of the internal maintenance module of the PLC programming configuration software is to maintain the information list of the PLC module in the software. Each module information contains the configuration information of the module. When the software starts running and the module is configured, the software reads the internal module information to generate the corresponding configuration interface, and guides the user to complete the configuration process, and finally realizes the control and configuration of the PLC module. This method is relatively simple to implement, but because the module information is integrated into the software, it is more complicated to maintain. When a new module is added or the function of the module is modified, the corresponding functional changes can only be made by the software developer, which is not conducive to software maintenance.

[0004] 2. Formatted text mode: The device description file of the module uses formatted text to save the key information of the module. The file is read in the PLC programming control software, and the corresponding configuration interface is created based on the read information. Then the user configuration information is saved in the corresponding data structure, and finally downloaded to the PLC to complete the PLC control configuration process. There are various forms of formatted text, such as XML, json, ini and other standard format files. In this way, when adding or modifying module functions, it is necessary not only to add information nodes to the corresponding device description file, but also to add the identification of the new module or the corresponding function processing in the development environment of the PLC programming control software. Even if the same function processing already exists in the programming control software, it is necessary to add the processing steps of the new module in the development environment. The reason for this phenomenon is that the external device description file cannot accurately correspond to the function block processing in the development environment of the programming control software.

[0005] 3. Industrial protocol mode: PLC programming and configuration software adopts the device management mode under the industrial standard protocol, such as FDT (filed device tool) / DTM (device type manager), EDDS (electronic device description language), etc. Taking the DTM mode as an example, in this mode, the PLC programming and control software is required to implement the functions of the FDT framework application. After the software is started, the device DTM file is loaded and the corresponding configuration interface is presented according to the file information. Finally, the configuration process is completed to realize the control configuration of the PLC. Although the FDT framework application does not require secondary development when adding new modules or changing the functionality of the modules, the addition and modification of DTM files in this mode is not convenient. The device files and PLC programming and configuration software must comply with the protocol specification (GB / T 34076), which is difficult to implement. Summary of the invention

[0006] In view of the above problems, the present invention proposes a method for managing module functions in PLC programming and control software, so that the PLC programming and control software can be developed once and can adapt to the needs of flexible module adaptation; and after a major upgrade and iterative development of the programming and control software, the entire device description file can continue to be used or the overall migration work can be carried out very conveniently.

[0007] The technical solution of the present invention is: the PLC module is controlled by the PLC programming configuration software. When a new module is added to the PLC module, the fixed format specification of the device description file generates different configuration interfaces after being interpreted by the programming control software, and different data structures are used to store parameters to finally form a configuration file. The configuration file is finally downloaded to the PLC module to be interpreted and executed, specifically comprising the following steps:

[0008] Step 1: The staff opens the device description file template through the PLC programming configuration software;

[0009] Step 2: copy each PLC function block, i.e., node block, of the newly added module from the function routine of the newly added module;

[0010] Step 3: Fill all node blocks into the device description file template;

[0011] Step 4: Modify the parameters in the node block to generate a device description file for the newly added module;

[0012] Step 5: Start the PLC programming control software and establish a mapping between the description file node information and the configuration interface;

[0013] Step 6: PLC programming control software loads the device description file to generate a device list;

[0014] Step 7: The user selects a specific module from the device list of the programming control software and configures it into the actual engineering configuration project at the industrial site;

[0015] Step 8, the PLC programming control software establishes a configuration interface based on the node information of the module;

[0016] Step 9. The PLC programming control software saves the configuration parameters to generate a configuration file, and downloads it to the PLC for execution; completed.

[0017] Furthermore, the device description file is in XML format, including a header part and a body part, wherein the header part includes the device series, identification, name, description and other necessary identification information of some modules. The body is a functional area including the parameters required by the device category and the configuration interface related parts. The function node in the device description file is mapped to the configuration interface of the programming configuration control software by the string value in the attribute as the key information.

[0018] Furthermore, in steps 5-8, it is necessary to first create a delegate factory and a corresponding interface class in the PLC programming control software, and correspond the static properties of the interface class to the UI properties of the node in the device description file. Then, the UI properties can be used to find the mapping key-value pairs between the static properties in the delegate factory and the interface class. When the device description file is configured, the interface class is called through the delegate factory to generate the configuration interface.

[0019] Furthermore, step 7 is specifically as follows:

[0020] Step 7.1, the user creates a factory class in the PLC programming control software;

[0021] Step 7.2, define the specific type of std::function function encapsulation;

[0022] Step 7.3, create a mapping team of keyword strings and function encapsulation;

[0023] Step 7.4, register the interface class and add information to the queue;

[0024] Step 7.5, call the create() method of the factory class, call the function encapsulation according to the keyword, and create an instance of the interface class.

[0025] The present invention provides a device description file of a PLC module in a formatted text language (xml) format, which binds the corresponding functions in the PLC programming control software through specific information nodes, that is, by using the same string for the description file UI attribute and the interface class keyword in the PLC programming control software, the configuration interface is bound to specific information in the programming control software by comprehensively utilizing the combination of abstract functions and reflection principles. Ultimately, by loading a specific format of xml device description file, the PLC programming control software does not need to develop functional changes when adding new modules or configuring any implemented functions of the module. This xml format device description file is composed of a specific format device template file generated by the programming control software and various fixed format function block routines.

[0026] The present invention is an implementation of PLC programming control software to interpret the device description file of the PLC module and generate a configuration interface. It has the following beneficial effects:

[0027] 1. The present invention unifies the format of the PLC module device description file, so that PLC modules with different functions can be implemented in the device description file of the unified format.

[0028] 2. The present invention realizes the interpretation of PLC device description files in a specific format, and comprehensively uses multiple methods in PLC programming control software to uniformly organize and manage the configuration of different functions of PLC devices.

[0029] 3. We have made original improvements in the implementation of PLC programming control software, and adopted the method of entrusting factories to uniformly manage device description files and configuration interfaces. We have realized low-coupling and high-aggregation coding standards, which greatly improves the software operation efficiency.

[0030] Fourth, the implementation of the present invention enables the PLC programming configuration software to meet the demand for flexible module combination functions with one development, without the need for secondary development of functional changes, making subsequent maintenance work more convenient.

[0031] 5. The adaptation work of PLC modules in programming control software can be changed from the work of software developers to that of product maintenance personnel. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 This is the workflow diagram of this case.

[0033] Figure 2 This is the use case diagram of the user configuring the PLC module in this case.

[0034] Figure 3 This is the UML static structure diagram of the configuration interface in this case.

[0035] Figure 4 This is the flowchart of the configuration interface created by the factory in this case. DETAILED DESCRIPTION

[0036] In order to clearly illustrate the technical features of this patent, this patent is elaborated in detail below through a specific implementation method and in combination with its accompanying drawings.

[0037] The invention comprises a device description file template of a module, a routine of a function block, an abstract engineering mode of module management inside the software and a specific implementation method of the function configuration corresponding to the information node.

[0038] The present invention is composed of a device description file and a PLC programming configuration software. The device description file needs to meet a fixed standard format, wherein the main function is provided by a device description file template, and the device description file template is generated by the PLC programming configuration software. The functional part is provided with a standard format by different functional routines. The fixed format specification of the device description file generates different configuration interfaces after being interpreted by the programming control software, and uses different data structures to store parameters to finally form a configuration file. The configuration file is finally downloaded to the PLC module to be interpreted and executed. The overall process is implemented as follows: Figure 1 shown.

[0039] The PLC module is controlled by the PLC programming configuration software. When a new module is added to the PLC module:

[0040] Step 1. The staff opens the device description file template through the PLC programming configuration software; the device description file template of the PLC module is generated by the PLC programming configuration software. The user first opens the device description file template of the PLC module;

[0041] Step 2: copy each PLC function block, i.e., node block, of the newly added module from the function routine of the newly added module;

[0042] Step 3: Fill all node blocks into the device description file template;

[0043] Step 4: Modify the parameters in the node block to generate a device description file for the newly added module;

[0044] Specifically, there are PLC function block routines with different functions in the electronic version of the software manual of the newly added module. The user copies the corresponding node block to the corresponding node segment of the template, and then modifies the corresponding parameters (different PLC function blocks have different parameters, such as the serial port function block has baud rate, data bit, stop bit, check bit, stop bit, serial port protocol and other parameters. The network function block has IP address, default gateway, subnet mask and other parameters), and generates the device description file of the newly added module;

[0045] Step 5: Start the PLC programming control software and establish a mapping between the description file node information and the configuration interface;

[0046] Step 6: PLC programming control software loads the device description file to generate a device list;

[0047] Step 7: The user selects a specific module from the device list of the programming control software and configures it into the actual engineering configuration project at the industrial site;

[0048] Step 8, the PLC programming control software establishes a configuration interface based on the node information of the module;

[0049] Step 9. The PLC programming control software saves the configuration parameters (user parameters entered by the user in the configuration interface, such as baud rate = 19200, data bit = 8, etc.) to generate a configuration file, and downloads it to the PLC for execution; completed.

[0050] In the above, the device description file is in XML format, including the header part and the body part, where the header part includes the device series, identification, name, description and other necessary identification information of some modules. The body is the functional area including the parameters required by the device category and the configuration interface related parts. The function node in the device description file uses the string value in the attribute as the key information and is mapped to the configuration interface of the programming configuration control software.

[0051] In steps 5-8, you need to first create a delegate factory and a corresponding interface class in the PLC programming control software, and correspond the static properties of the interface class to the UI properties of the node in the device description file. Then you can use the UI properties to find the mapping key-value pairs between the static properties in the delegate factory and the interface class. When the device description file is configured, call the interface class through the delegate factory to generate the configuration interface.

[0052] The interface class of the configuration interface uses static property pairs in UML to correspond to the UI properties in the device description file. When the QMyModule module class loads the device description file, it saves the device properties. When the interface class is generated, the device properties are obtained according to the passed parameters to generate the configuration interface. The interface class includes the serial port configuration interface class (QComCfgWidget), the network configuration interface class (QEthCfgWight), etc.

[0053] QUiWidgetFactory is a delegate factory responsible for processing applications to create function configuration interfaces. When the factory is created, it registers all implemented configuration interface classes, and saves the keywords of the configuration interface classes and the function encapsulation for creating instances into a queue. When the delegate factory receives a creation application, since the keywords in the description file are the same as the keywords of the corresponding configuration interface class, the function encapsulation in the queue is called through the keywords of the function block in the device description file to create a configuration interface instance. The use of keywords not only hides the internal implementation of the configuration software, but also makes the implementation of the device description file more flexible. In this class, the singleton design pattern, factory design pattern, template function and the new C++ language standard are comprehensively used to conveniently implement the reflection mechanism. The implementation process is as follows: Figure 4 As shown:

[0054] Step 7.1, the user creates a factory class in the PLC programming control software;

[0055] Step 7.2, define the specific type of std::function function encapsulation;

[0056] Step 7.3, create a mapping team of keyword string and function encapsulation; the keyword string is not only the UI attribute string of the function block node in the device description file, but also the keyword of the interface class. The mapping key-value pair of this string and the function of creating the interface is saved in the commission factory. After configuring the PLC module, the software can call the function through the UI attribute of the description file of the PLC module to generate the configuration interface;

[0057] Step 7.4, register the interface class and add information to the queue;

[0058] Step 7.5, call the create() method of the factory class, call the function encapsulation according to the keyword, and create an instance of the interface class.

[0059] Overall:

[0060] The present invention has made original improvements in both device description files and PLC programming control software program implementation. Specifically:

[0061] In terms of device description files, the use of device description file templates plus function module routines allows maintenance personnel to easily add device description files for PLC modules in formatted text language (xml) format.

[0062] In terms of the program of the programming control software, the specific node information in the device description file is mapped to the corresponding configuration interface by combining the abstract function with the reflection principle in the software, so that the software generates the corresponding configuration information after loading the device description file.

[0063] Among them, abstraction refers to the abstract factory pattern in the design pattern, which is to use the abstract factory in the programming control software to generate interface class objects according to keywords.

[0064] Reflection in this article refers to specifying the interface class of the software by calling the class name outside the programming control software, and using the specified interface class to generate a configuration interface.

[0065] The reflection mechanism is that in the running state, for any class, all the properties and methods of this class can be known; for any object, any method and property of it can be called; this function of dynamically obtaining information and dynamically calling object methods is called the reflection mechanism.

[0066] The final software is developed without the need for secondary development of functional changes when adding new modules or configuring any implemented functions in the modules.

[0067] This method makes it possible to make any combination of functions in the PLC module without the need for redevelopment of the programming control software. The PLC module can be updated and replaced only by maintenance personnel who need to change the device description file. Since the device description file is in a universal XML format, users can easily edit it, and it can meet the cross-platform requirements of programming control software under different CPU architectures and different operating systems. The module's device description file template is generated by the PLC programming control software, which can reduce the difficulty of adding a new device description file. When making a new module device description file, the maintenance personnel can find the function block corresponding to the module function from the function routine, copy it to the module's device description file template, and then make differential modifications to some parameters to complete the production of the entire device description file.

[0068] After the functionality of the PLC programming control software is upgraded and modified, the device description file template is updated again in a timely manner. The upgrade and modification of the entire device description file system can be completed by copying the corresponding functional nodes from the original device description file.

[0069] There are many specific implementation ways of the present invention. The above is only the preferred implementation mode of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements can be made without departing from the principle of the present invention. These improvements should also be regarded as the protection scope of the present invention.

Claims

1. A method for managing module functions in PLC programming control software, characterized in that: The PLC module is controlled by the PLC programming configuration software. When a new module is added to the PLC module, the fixed format specification of the device description file is interpreted by the programming control software to generate different configuration interfaces, and different data structures are used to store parameters to finally form a configuration file. The configuration file is finally downloaded to the PLC module to be interpreted and executed, which specifically includes the following steps: Step 1: The staff opens the device description file template through the PLC programming configuration software; Step 2: copy each PLC function block, i.e., node block, of the newly added module from the function routine of the newly added module; Step 3: Fill all node blocks into the device description file template; Step 4: Modify the parameters in the node block to generate a device description file for the newly added module; Step 5: Start the PLC programming control software and establish a mapping between the description file node information and the configuration interface; Step 6: PLC programming control software loads the device description file to generate a device list; Step 7: The user selects a specific module from the device list of the programming control software and configures it into the actual engineering configuration project at the industrial site; Step 8: The PLC programming control software generates a configuration interface according to the node information of the module; Step 9. The PLC programming control software saves the configuration parameters to generate a configuration file, and downloads it to the PLC for execution; completed.

2. The method for managing module functions in PLC programming control software according to claim 1, characterized in that: The device description file is in XML format, including a header part and a body part. The header part includes the device series, identification, name and description. The body is the functional area, including the parameters required for the device category and the configuration interface related parts. The function node in the device description file uses the string value in the attribute as the key information and is mapped to the configuration interface of the programming configuration control software.

3. The method for managing module functions in PLC programming control software according to claim 1, characterized in that: In steps 5-8, you need to first create a delegate factory and a corresponding interface class in the PLC programming control software, match the static properties of the interface class with the UI properties of the node in the device description file, and then use the UI properties to find the mapping key-value pairs between the static properties in the delegate factory and the interface class. When the device description file is configured, call the interface class through the delegate factory to generate the configuration interface.

4. The method for managing module functions in PLC programming control software according to claim 1, characterized in that: Step 7 is as follows: Step 7.1, the user creates a factory class in the PLC programming control software; Step 7.2, define the specific type of std::function function encapsulation; Step 7.3, create a mapping team of keyword strings and function encapsulation; Step 7.4, register the interface class and add information to the queue; Step 7.5, call the create() method of the factory class, call the function encapsulation according to the keyword, and create an instance of the interface class.

Citation Information

Patent Citations

  • Configuration software picture editing tool design method

    CN105677303A

  • Method and device for automatically generating program and storage medium

    CN111475159A