Redundant system of PLC (Programmable Logic Controller)

By adopting open target programming language and synchronization module in the PLC controller redundant system, the data execution security risks and enclosed problems of traditional systems are solved, and data synchronization and redundant control between PLC controllers is realized, which improves the System reliability and work efficiency.

CN119126659AActive Publication Date: 2024-12-13JISHAN ZHIGONG (SUZHOU) TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411082573.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-12-13
Estimated Expiration
2044-08-08

AI Technical Summary

Technical Problem

Traditional PLC controller redundant systems have data execution security risks and enclosed nature, are difficult to integrate with other algorithm software, and lack effective redundant solutions.

Method used

Design a PLC controller redundant system, adopting an open target program language as the intermediate language, and implementing data synchronization through PLC execution subsystem, configuration and status image area, configuration update and status analysis module, and image area access module. Execute switch execution programs to improve the openness and reliability of the system.

Benefits of technology

It improves the openness of the system, is easy to detect and integrate safely, enhances the reliability and work efficiency of the PLC control system, and realizes seamless data synchronization and redundant control between PLC controllers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119126659A_ABST
    Figure CN119126659A_ABST
Patent Text Reader

Abstract

The invention relates to a programmable logic controller (PLC) redundant system, which takes an open type target program language as an intermediate language, establishes a redundant system consisting of a plurality of PLCs based on a self-developed PLC IDE (integrated development environment), realizes data synchronization among the PLCs through mapping area access modules in the PLCs, and respectively writes synchronization results into corresponding configuration and state mapping areas. A configuration updating and state analysis module in each PLC respectively reads a corresponding configuration and state mapping area to analyze and determine a current execution PLC and each current standby PLC, and only the current execution PLC inputs, processes and outputs data; the application of the open target program language improves the openness of the system, is easier to carry out safety detection, and is easy to integrate or connect with other systems, and the design of the whole redundant system greatly improves the reliability and working efficiency of the PLC control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a PLC controller redundancy system, belonging to the technical field of industrial safety automation control. Background Art

[0002] In industrial automation systems, in order to ensure long-term stable and reliable operation of the system, a programmable logic controller (PLC) is generally used as the controller, and in order to further improve the reliability of the system, a redundant system needs to be established based on the PLC.

[0003] The main controller and the backup controller maintain a synchronization state. When the main controller fails, the backup controller will take over the control of the network, convert the previous "main connection" to "backup connection", and convert the previous "backup connection" to "main connection". At this time, the backup controller is converted to the main controller; when the I / O device receives a control transfer request, it must ensure that the latest data is sent to the new main controller.

[0004] In traditional PLC application scenarios, PLC manufacturers provide an integrated development environment (IDE) that complies with IEC61131-3. Based on this IDE, users use five commonly used programming languages, namely ladder diagram language (LD), structured text language (ST), sequential function flow chart language (SFC), function block diagram language (FBD) or instruction list language (IL) for programming, convert it into a self-developed intermediate language and then compile it into machine language or directly convert the PLC language into machine language, and download it to the target PLC for execution. Since the intermediate language or compiler is customized, the operation and redundancy of the PLC program are better realized; but due to the closed nature of the customized language or compiler (the major manufacturers cannot convert to each other), it brings security risks to the execution of data and is not easy to integrate with other algorithm software, especially motion control software. In addition, the industry's PLC industrial controllers do not provide redundancy solutions. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a PLC controller redundancy system, which uses an open target programming language as an intermediate language and cooperates with a redundant control design to improve the working efficiency of the PLC controller.

[0006] In order to solve the above technical problems, the present invention adopts the following technical solutions: the present invention designs a PLC controller redundancy system, including at least two PLC controllers, each of which has the same structure, and each of which includes a PLC execution subsystem, a configuration and status image area, a configuration update and status analysis module, and an image area access module, wherein the configuration and status image area is used to obtain and store the corresponding PLC controller configuration information, the PLC controller status, and the PLC execution subsystem status; the image area access module executes an image area access program implemented in an open target programming language to read and write the corresponding configuration and status image area and the data image area in the PLC execution subsystem; The image area access modules in each PLC controller communicate with each other to realize the synchronization of PLC controller configuration information, PLC controller status, PLC execution subsystem status, and data in the PLC execution subsystem, and each image area access module writes the synchronization result into the corresponding configuration and status image area, and the data image area in the PLC execution subsystem respectively; The configuration update and status analysis modules in each PLC controller read and analyze the corresponding configuration and status image area to determine a currently executing PLC controller and each current standby PLC controller, and each configuration update and status analysis module executes the same switching execution program implemented in an open target programming language for control, including controlling the PLC execution subsystem in the currently executing PLC controller to execute the PLC runtime program implemented in the open target programming language, inputting, processing and outputting data, and controlling the PLC execution subsystem in each current standby PLC controller to suspend work.

[0007] As a preferred technical solution of the present invention: the PLC execution subsystem includes a data image area, an input module, an output module, and a PLC execution module; wherein the data entry of the input module is connected to the data mapping area, the data exit of the input module is connected to the data entry of the PLC execution module, the data exit of the PLC execution module is connected to the data entry of the output module, and the data exit of the output module is connected to the data mapping area; the image area access module executes an image area access program implemented in an open target programming language to read and write data image areas in the corresponding PLC execution subsystem; The configuration update and status analysis module is connected to the input module and the output module. The configuration update and status analysis module controls the input module to obtain data from the data mapping area and sends it to the PLC execution module. The PLC execution module executes the PLC runtime program implemented in the open target program language to process the data. The configuration update and status analysis module controls the output module to receive the result data processed by the PLC execution module and send it back to the data mapping area, or the configuration update and status analysis module controls the input module and the output module to suspend the PLC execution module's processing of the data.

[0008] As a preferred technical solution of the present invention: based on a PLC program designed in a standard PLC programming language, a PLC runtime program implemented in an open object programming language and an image area access program implemented in an open object programming language are obtained in the following manner; Extract each variable in the PLC program, preset each attribute data according to the corresponding variable, call the image area generation program, and apply for the corresponding space in the data image area; At the same time, the IEC to open object programming language compiler is used to convert the PLC program into a code implemented in the open object programming language, and the PLC runtime program is obtained by compiling it with the open object programming language compiler, and sent to the PLC execution module in each PLC controller; and the image area access program implemented in the open object programming language is correspondingly generated and sent to the image area access module in each PLC controller; And in the same way as obtaining the PLC runtime program, the switching program designed by the configuration is converted to obtain the switching execution program implemented in the open target programming language, and sent to the image area access module in each PLC controller.

[0009] As a preferred technical solution of the present invention: in the process of converting a PLC program into a PLC runtime program implemented in an open target programming language, the variables defined in the PLC program are modified into a structure or class with preset attribute data; at the same time, an image area access program implemented in an open target programming language is generated using the obtained structure or class instance and sent to the image area access module in each PLC controller.

[0010] As a preferred technical solution of the present invention: the preset attribute data includes variable name, type, length, value, and offset address.

[0011] As a preferred technical solution of the present invention: each PLC controller is connected to a PLC programming platform respectively, the PLC programming platform designs the PLC program in a standard PLC programming language, and the PLC programming platform configures and designs the switching program.

[0012] As a preferred technical solution of the present invention: the standard PLC programming language includes ladder diagram language (LD), structured text language (ST), sequential function flow chart language (SFC), function block diagram language (FBD) or instruction list language (IL).

[0013] As a preferred technical solution of the present invention: the open target programming language is C++ programming language or C programming language.

[0014] As a preferred technical solution of the present invention: the PLC controller configuration information includes hardware information, communication configuration, and PLC execution subsystem configuration information of the PLC controller.

[0015] As a preferred technical solution of the present invention: the data image area in the PLC execution subsystem of each PLC controller is connected to the external device respectively, and the external device collects data and sends it to the data image area of ​​the current executing PLC controller, and after being processed by the PLC execution module, it is transmitted to the external device through the data image area.

[0016] The PLC controller redundancy system of the present invention adopts the above technical solution and has the following technical effects compared with the prior art: The present invention designs a PLC controller redundant system, which uses an open target programming language as an intermediate language, builds a redundant system composed of multiple PLC controllers based on a self-developed PLC IDE, and realizes data synchronization between each other based on the image area access module in each PLC controller through the PLC execution subsystem, configuration and status image area, configuration update and status analysis module, and image area access module specifically designed under each PLC controller, and writes the synchronization results into the corresponding configuration and status image area respectively. The configuration update and status analysis module in each PLC controller reads the corresponding configuration and status image area analysis to determine a current execution PLC controller and each current standby PLC controller, and respectively executes the same switching execution program for control, the current execution PLC controller inputs, processes, and outputs data, and each current standby PLC controller suspends work; the application of the open target programming language improves the openness of the system, makes it easier to perform safety detection, and is easy to integrate or connect with other systems, and the design of the entire redundant system greatly improves the reliability and work efficiency of the PLC control system. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a schematic diagram of redundant control in the application of the redundant system of the PLC controller designed by the present invention; Figure 2 This is a schematic diagram of the application architecture of the PLC controller redundant system designed by the present invention; Figure 3It is a flow chart of data image area generation in the application of PLC controller redundant system designed by the present invention; Figure 4 It is a flow chart of program generation when PLC is running in the application of PLC controller redundancy system designed by the present invention; Figure 5 The invention is a flow chart for generating configuration and state image area in the redundant system application of a PLC controller. DETAILED DESCRIPTION

[0018] The specific implementation modes of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0019] The present invention designs a PLC controller redundancy system, which includes at least two PLC controllers in practical application, and the structures of the PLC controllers are the same as each other. Figure 1 As shown, each PLC controller includes a PLC execution subsystem, a configuration and status image area, a configuration update and status analysis module, and an image area access module, wherein the configuration and status image area is used to obtain and store the corresponding PLC controller configuration information, as well as the PLC controller status and the PLC execution subsystem status; wherein the PLC controller configuration information includes the hardware information, communication configuration, and PLC execution subsystem configuration information of the PLC controller; the image area access module executes an image area access program implemented in an open target programming language to read and write the corresponding configuration and status image area and the data image area in the PLC execution subsystem.

[0020] like Figure 1 As shown, the image area access modules in each PLC controller communicate with each other to achieve synchronization of PLC controller configuration information, PLC controller status, PLC execution subsystem status, and data in the PLC execution subsystem, and each image area access module writes the synchronization results into the corresponding configuration and status image area, and the data image area in the PLC execution subsystem.

[0021] The configuration update and status analysis modules in each PLC controller read and analyze the corresponding configuration and status image area to determine a currently executing PLC controller and each current standby PLC controller, and each configuration update and status analysis module executes the same switching execution program implemented in an open target programming language for control, including controlling the PLC execution subsystem in the currently executing PLC controller to execute the PLC runtime program implemented in the open target programming language, inputting, processing and outputting data, and controlling the PLC execution subsystem in each current standby PLC controller to suspend work.

[0022] In practical applications, such as Figure 1As shown, the specific design of the PLC execution subsystem includes a data image area, an input module, an output module, and a PLC execution module; wherein the data entry of the input module is connected to the data mapping area, the data exit of the input module is connected to the data entry of the PLC execution module, the data exit of the PLC execution module is connected to the data entry of the output module, and the data exit of the output module is connected to the data mapping area; the image area access module executes an image area access program implemented in an open target programming language to read and write to the data image area in the corresponding PLC execution subsystem.

[0023] And if Figure 1 As shown, the configuration update and status analysis module is further designed to connect the input module and the output module, the configuration update and status analysis module controls the input module to obtain data from the data mapping area and sends it to the PLC execution module, the PLC execution module executes the PLC runtime program implemented in the open target program language to process the data, and the configuration update and status analysis module controls the output module to receive the result data after processing by the PLC execution module and send it back to the data mapping area, or the configuration update and status analysis module controls the input module and the output module to suspend the PLC execution module's processing of the data.

[0024] Regarding the PLC runtime program, image area access program, and switching execution program respectively implemented in the open target programming language involved in the above design, in actual application, each PLC controller is connected to a PLC programming platform respectively, and the PLC programming platform designs the PLC program in a standard PLC programming language such as ladder diagram language (LD), structured text language (ST), sequential function flow chart language (SFC), function block diagram language (FBD) or instruction list language (IL), and the PLC programming platform configures and designs the switching program, and specifically designs the PLC runtime program, image area access program, and switching execution program to be obtained in the following manner.

[0025] like Figure 3 As shown, extract each variable in the PLC program, preset each attribute data according to the variable, call the image area generation program, and apply for the corresponding space in the data image area; at the same time, Figure 4 As shown, an IEC to open target programming language compiler is used to convert the PLC program into a code implemented in the open target programming language, wherein the variables defined in the PLC program are modified into structures or classes with preset attribute data, and then compiled by the open target programming language compiler to obtain a PLC runtime program, which is sent to a PLC execution module in each PLC controller; in actual applications, the specific design presets various attribute data including variable name, type, length, value, and offset address.

[0026] After obtaining the PLC runtime program, the obtained structure or class instance is modified using the variables in the PLC program to generate an image area access program implemented in an open target programming language and send it to the image area access module in each PLC controller.

[0027] Furthermore, in the same manner as obtaining the PLC runtime program, the switching program designed for the configuration is converted to obtain a switching execution program implemented in an open target programming language, and sent to the image area access module in each PLC controller.

[0028] Regarding the configuration and status image area, in actual application, according to Figure 5 The execution is shown to obtain.

[0029] The above design scheme is applied in practice. Regarding the open target programming language, C++ programming language or C programming language is specifically adopted to improve the openness of the system. Compared with customized and closed intermediate languages ​​or compilers of other manufacturers, C / C++ as an intermediate language is easier to perform security detection, and the design system is very friendly to the control library algorithm running based on C / C++ and easy to integrate. In addition, other systems open to C / C++ are easier to integrate or dock with the design system of the present invention, such as programming or efficiency tools such as MATLAB.

[0030] In actual implementation, Figure 2 As shown, the data image area in the PLC execution subsystem of each PLC controller is connected to an external device respectively, and the corresponding PLC controller configuration information, PLC controller status, and PLC execution subsystem status are obtained and stored based on the configuration and status image area in each PLC controller. Each image area access module executes the image area access program to read and write the corresponding configuration and status image area, and the data image area in the PLC execution subsystem. The image area access modules in each PLC controller communicate with each other under a preset period to realize the synchronization of the PLC controller configuration information, PLC controller status, PLC execution subsystem status, and data in the PLC execution subsystem and write them into the corresponding configuration and status image area, and the data image area in the PLC execution subsystem, thereby realizing the periodic synchronization between each PLC controller.

[0031] Based on the synchronization between the above-mentioned PLC controllers, the configuration update and status analysis modules in each PLC controller read and analyze the corresponding configuration and status image area respectively, so as to determine a currently executing PLC controller and each current standby PLC controller, such as taking the fault-free and highest-performance PLC controller as the currently executing PLC controller and the others as the current standby PLC controllers; thereafter, the configuration update and status analysis modules in each PLC controller can respectively execute the same switching execution program for control, specifically, the configuration update and status analysis module in the currently executing PLC controller executes the switching execution program to control its PLC execution subsystem to execute the PLC runtime program, input data, Processing and output; the configuration update and status analysis modules in the remaining current standby PLC controllers respectively execute the switching execution program to control their PLC execution subsystems to suspend work, specifically control the input module and the output module, and suspend the PLC execution module from processing data; in this way, under the above-mentioned periodic synchronization operation, the period realizes the synchronous update of the configuration information and status information of each PLC controller, and the configuration update and status analysis module in each PLC controller can determine a current execution PLC controller and each current standby PLC controller according to the preset rules based on the obtained configuration information and status information of itself and the remaining PLC controllers, and perform the corresponding design switching mentioned above, thereby realizing redundant control of the PLC controller.

[0032] Under periodic operation, after determining the currently executing PLC controller, data is collected by an external device and sent to the data image area of ​​the currently executing PLC controller. The configuration update and status analysis module in the currently executing PLC controller controls the input module to obtain data from the data mapping area and sends it to the corresponding PLC execution module. The corresponding PLC execution module executes the PLC runtime program to process the data. The configuration update and status analysis module in the currently executing PLC controller controls the output module to receive the result data processed by the PLC execution module and send it back to the data mapping area, and finally transmits it to the external device via the data image area.

[0033] While the currently executing PLC controller is processing data, the synchronization operation described above also involves the data synchronization of the data image area in each PLC controller, that is, the cycle ensures the data synchronization between the PLC controllers. When switching between different PLC controllers regarding the currently executing PLC controller, seamless connection between the processed data is achieved.

[0034] In actual applications, the user can actively or conditionally trigger the system to passively switch the currently executing PLC controller and each current standby PLC controller, that is, the currently executing PLC controller is switched to the current standby PLC controller, and one of the current standby PLC controllers is switched to the currently executing PLC controller.

[0035] The above design scheme is based on the self-developed PLC IDE to build a redundant system consisting of multiple PLC controllers, and uses an open target programming language as the intermediate language, which improves the openness of the system, makes it easier to perform safety tests, and is easy to integrate or connect with other systems. The design of the entire redundant system greatly improves the reliability and work efficiency of the PLC control system.

[0036] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.

Claims

1. A PLC controller redundant system, characterized in that: The invention comprises at least two PLC controllers, each of which has the same structure, and each of which comprises a PLC execution subsystem, a configuration and status image area, a configuration update and status analysis module, and an image area access module, wherein the configuration and status image area is used to obtain and store corresponding PLC controller configuration information, PLC controller status, and PLC execution subsystem status; the image area access module executes an image area access program implemented in an open target programming language to read and write the corresponding configuration and status image area and the data image area in the PLC execution subsystem; The image area access modules in each PLC controller communicate with each other to realize the synchronization of PLC controller configuration information, PLC controller status, PLC execution subsystem status, and data in the PLC execution subsystem, and each image area access module writes the synchronization result into the corresponding configuration and status image area, and the data image area in the PLC execution subsystem; The configuration update and status analysis modules in each PLC controller read and analyze the corresponding configuration and status image area to determine a currently executing PLC controller and each current standby PLC controller, and each configuration update and status analysis module executes the same switching execution program implemented in an open target programming language for control, including controlling the PLC execution subsystem in the currently executing PLC controller to execute the PLC runtime program implemented in the open target programming language, inputting, processing and outputting data, and controlling the PLC execution subsystem in each current standby PLC controller to suspend work.

2. A PLC controller redundant system according to claim 1, characterized in that: The PLC execution subsystem includes a data image area, an input module, an output module, and a PLC execution module; wherein the data entry of the input module is connected to the data mapping area, the data exit of the input module is connected to the data entry of the PLC execution module, the data exit of the PLC execution module is connected to the data entry of the output module, and the data exit of the output module is connected to the data mapping area; the image area access module executes an image area access program implemented in an open target programming language to read and write data in the corresponding PLC execution subsystem. The configuration update and status analysis module is connected to the input module and the output module. The configuration update and status analysis module controls the input module to obtain data from the data mapping area and sends it to the PLC execution module. The PLC execution module executes the PLC runtime program implemented in the open target program language to process the data. The configuration update and status analysis module controls the output module to receive the result data processed by the PLC execution module and send it back to the data mapping area, or the configuration update and status analysis module controls the input module and the output module to suspend the PLC execution module's processing of the data.

3. A PLC controller redundant system according to claim 2, characterized in that: Based on the PLC program designed in the standard PLC programming language, a PLC runtime program implemented in the open object programming language and an image area access program implemented in the open object programming language are obtained as follows; Extract each variable in the PLC program, preset each attribute data according to the corresponding variable, call the image area generation program, and apply for the corresponding space in the data image area; At the same time, the IEC to open object programming language compiler is used to convert the PLC program into a code implemented in the open object programming language, and the PLC runtime program is obtained by compiling it with the open object programming language compiler, and sent to the PLC execution module in each PLC controller; and the image area access program implemented in the open object programming language is correspondingly generated and sent to the image area access module in each PLC controller; And in the same way as obtaining the PLC runtime program, the switching program designed by the configuration is converted to obtain the switching execution program implemented in the open target programming language, and sent to the image area access module in each PLC controller.

4. A PLC controller redundant system according to claim 3, characterized in that: In the process of converting a PLC program into a PLC runtime program implemented in an open target programming language, the variables defined in the PLC program are modified into a structure or class with preset attribute data; at the same time, an image area access program implemented in the open target programming language is generated using the obtained structure or class instance and sent to the image area access module in each PLC controller.

5. A PLC controller redundant system according to claim 3 or 4, characterized in that: The preset attribute data include variable name, type, length, value, and offset address.

6. A PLC controller redundant system according to claim 3, characterized in that: Each PLC controller is connected to a PLC programming platform respectively, and the PLC programming platform designs the PLC program in a standard PLC programming language, and the PLC programming platform configures and designs the switching program.

7. A PLC controller redundant system according to claim 3, characterized in that: The standard PLC programming language includes ladder diagram language LD, structured text language ST, sequential function flow chart language SFC, function block diagram language FBD or instruction list language IL.

8. A PLC controller redundant system according to any one of claims 1 to 4, characterized in that: The open object programming language is C++ programming language or C programming language.

9. A PLC controller redundant system according to claim 1, characterized in that: The PLC controller configuration information includes the hardware information, communication configuration, and PLC execution subsystem configuration information of the PLC controller.

10. A PLC controller redundant system according to claim 2, characterized in that: The data image area in the PLC execution subsystem of each PLC controller is connected to external devices respectively. The external devices collect data and send it to the data image area of ​​the current executing PLC controller. After being processed by the PLC execution module, it is transmitted to the external device through the data image area.

Citation Information

Patent Citations

  • PLC compiling implement method

    CN101587445A

  • Method and device for realizing redundant virtual PLC, equipment and storage medium

    CN113434341A

  • Redundant controller system and standby system controller

    JP2016024798A

  • Program creation support device, control method and program

    JP2016224559A

  • An automation system and a method that provide a global view for managing any industrial controller in a network

    US20230120197A1