Heterogeneous PLC networking method and system for dual-redundancy double-ring network

By adopting the heterogeneous networking method of dual-redundant dual-ring network network in the PLC system, the problem of insufficient reliability and stability caused by single CPU design is solved, and high reliability and stable operation in harsh industrial environments are achieved.

CN120010372APending Publication Date: 2025-05-16GUAN HUADIAN TIANREN CONTROL EQUIP CO LTD +1

Patent Information

Application Number
CN202510062603.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

When existing PLC systems operate in harsh industrial environments, the single CPU design leads to insufficient system reliability and stability, making it difficult to meet the high-demand control system needs.

Method used

The dual-redundant dual-ring network heterogeneous PLC networking method is adopted to determine the redundant host and redundant standby through the communication connection of two CPUs and the synchronous redundant configuration, and establish a communication connection between the redundant parties and multiple remote IOs based on the dual-ring networking rules, forming a dual-ring network link, detecting the communication status in real time and switching.

Benefits of technology

It improves the reliability and availability of the PLC system, avoids the impact of single point of failure, ensures stable operation in harsh industrial environments, and maximizes the impact of abnormal failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120010372A_ABST
    Figure CN120010372A_ABST
Patent Text Reader

Abstract

The invention provides a heterogeneous PLC networking method and system for a dual-redundancy double-ring network, and belongs to the technical field of automatic control. The method comprises the steps that two CPUs serve as two redundancy parties, communication connection of the two redundancy parties is established, synchronous redundancy configuration is carried out, and a redundancy host and a redundancy standby in the two redundancy parties are determined according to redundancy configuration information of the two redundancy parties; establishing double-loop network links between the two redundant parties and the plurality of remote IOs based on a double-loop network networking rule; and detecting the communication state of the redundant host and the double-loop network link in the communication process in real time, and when any one of the redundant host and / or the double-loop network link has a communication fault, performing corresponding CPU switching and ring network structure link switching. The networking mode of the heterogeneous PLCs of the dual-redundancy double-loop network is utilized, so that the operation reliability and stability of a system formed by the PLCs in a severe industrial environment can be fully guaranteed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of automation control technology, and in particular to a dual-redundant dual-ring network heterogeneous PLC networking method, a dual-redundant dual-ring network heterogeneous PLC networking system, a machine-readable storage medium and an electronic device. Background Art

[0002] Programmable logic controller (PLC) is a digital computing and operating electronic system designed specifically for use in industrial environments. It uses a programmable memory to store instructions for performing logical operations, sequential control, timing, counting and arithmetic operations, and controls various types of mechanical equipment or production processes through digital or analog input and output. PLC plays an extremely important role in the field of industrial control automation, especially in process control systems with complex control processes and a large number of controlled objects. The control system built with general PLC as the core has stronger flexibility, applicability and scalability than the dedicated controller method. As the core control unit of the control system, the reliability of PLC is directly related to the safety and stability of the entire control system.

[0003] At present, in common control technology, the PLC system uses a single CPU, in which all control programs are stored. Once a system failure or program execution error occurs, the entire device will malfunction or stop immediately, which may cause serious consequences. The safety and reliability of automation are new technologies pursued by all equipment manufacturers. In addition, in the field of industrial automation, the single link composed of a single controller and a controlled device has the advantages of simple structure and low cost, so it has been widely used. However, with the continuous development of industry, the reliability and stability of the control system are increasingly required, and the single-link control system can no longer meet the requirements. Therefore, how to fully ensure the reliability and stability of the system composed of PLC in harsh industrial environments is an urgent problem to be solved. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a dual-redundant dual-ring network heterogeneous PLC networking method and system to at least solve the above-mentioned problem of how to fully ensure the operating reliability and stability of the system composed of PLCs in harsh industrial environments.

[0005] In order to achieve the above object, the first aspect of the present invention provides a dual-redundant dual-ring network heterogeneous PLC networking method, the PLC includes two CPUs, the functions of the first CPU and the second CPU are at least partially consistent, the method includes: The two CPUs are used as redundant parties, a communication connection between the two redundant parties is established, and synchronous redundant configuration is performed. The redundant host and redundant standby in the two redundant parties are determined according to the redundant configuration information of the two redundant parties; wherein the redundant standby backs up the normal control logic operation process data of the redundant host; Based on the dual-ring network networking rules, communication connections between the redundant parties and multiple remote IOs are established to form a dual-ring network link between the redundant parties and multiple remote IOs; wherein the dual-ring network link includes two ring network structure links that are independent of each other and back up each other, each CPU and each remote IO in the ring network structure link are communication nodes, and each ring network structure link is a closed ring formed by sequentially connecting each communication node through a communication connection link; The communication status of the redundant host and the dual-ring network link in the communication process is detected in real time. When a communication failure occurs in the redundant host and / or any ring network structure link in the dual-ring network link, the corresponding CPU switching and ring network structure link switching are performed.

[0006] Optionally, the above dual-ring network configuration rules include: Determine the data communication direction between the redundant parties and multiple remote IOs; According to the data communication direction, two sets of ring network switches are used to connect each communication node in sequence to form two ring network structure links.

[0007] Optionally, before real-time detection of the communication status of the redundant host and the dual-ring network link in the communication process, the method further includes: The redundant host is operated in the host working mode, and the redundant standby is operated in the standby working mode, and initialized to obtain an initial state; Based on the initial state and the dual-ring network link, the communication interaction between the redundant parties and the multiple remote IOs is carried out according to the data communication direction between the redundant parties and the multiple remote IOs; Among them, the redundant host in the host working mode performs normal control logic operation according to the data communication direction between the communication nodes in the dual-ring network link, and synchronizes the normal control logic operation results to the redundant standby in the standby working mode according to the preset cycle, and the redundant standby in the standby working mode saves the normal control logic operation results.

[0008] Optionally, real-time detection of the communication status of redundant hosts in the communication process includes: The detection instruction issued by the redundant standby machine is sent to the redundant host, and the detection signal fed back by the redundant host is sent to the redundant standby machine, so that the redundant standby machine monitors the communication status of the redundant host according to the detection signal fed back by the redundant host; When a communication failure occurs on the redundant master, the redundant standby machine is switched to the redundant master so that the redundant standby machine enters the master working mode.

[0009] Optionally, the above-mentioned determination of the redundant master and the redundant standby in the redundant parties includes: In the process of synchronous redundant configuration, redundant configuration information of each CPU in both redundant parties is sent to the other CPU in both redundant parties respectively, so that each CPU determines the master-slave relationship of both redundant parties according to the redundant configuration information of both redundant parties; wherein the redundant configuration information represents the CPU mode option of the corresponding CPU, and the CPU whose CPU mode option is the first mode option is used as the redundant master, and the CPU whose CPU mode option is the second mode option is used as the redundant standby; Compare the master-slave relationships of the redundant parties determined by the two CPUs respectively, and determine the redundant master and redundant standby machines in the redundant parties based on the comparison result; wherein, if the master-slave relationships of the redundant parties determined by the two CPUs are inconsistent, the redundant configuration information of each CPU in the redundant parties is sent again to the other CPU in the redundant parties respectively, so as to update the redundant configuration information of the redundant parties in each CPU, until the master-slave relationships of the redundant parties determined by the two CPUs are consistent or the number of updates of the redundant configuration information reaches a preset number of updates. When the number of updates of the redundant configuration information reaches the preset number of updates, the PLC operation is terminated.

[0010] A second aspect of the present invention provides a dual-redundant dual-ring network heterogeneous PLC networking system, wherein the PLC includes two CPUs, and the functions of the first CPU and the second CPU are at least partially consistent. The system includes: The redundant configuration module is used to establish a communication connection between the two redundant CPUs and perform synchronous redundant configuration, and determine the redundant host and redundant standby in the redundant host according to the redundant configuration information of the two redundant CPUs; wherein the redundant standby backs up the normal control logic operation process data of the redundant host; A dual-ring network link establishment module is used to establish communication connections between the redundant parties and multiple remote IOs based on the dual-ring network networking rules to form a dual-ring network link between the redundant parties and the multiple remote IOs; wherein the dual-ring network link includes two ring network structure links that are independent of each other and back up each other, each CPU and each remote IO in the ring network structure link are communication nodes, and each ring network structure link is a closed ring formed by sequentially connecting each communication node through a communication connection link; The communication status detection module is used to detect the communication status of the redundant host and the dual-ring network link in the communication process in real time. When a communication failure occurs in the redundant host and / or any ring network structure link in the dual-ring network link, the corresponding CPU switching and ring network structure link switching are performed.

[0011] Optionally, the dual-redundant dual-ring network heterogeneous PLC networking system further includes a secondary ring network switch and a primary ring network switch, the secondary ring network switch and the primary ring network switch are respectively connected to each communication node, and each communication node is connected to a redundant power supply.

[0012] Optionally, the CPU and each remote IO exchange data via Ethernet, and each CPU is also integrated with dual RS485 interfaces and dual CAN interfaces for communication and interaction with external devices.

[0013] In a third aspect of the present invention, a machine-readable storage medium is provided, on which instructions are stored, and when the instructions are executed by a processor, the processor is configured to execute the above-mentioned dual-redundant dual-ring network heterogeneous PLC networking method.

[0014] In a fourth aspect of the present invention, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the dual-redundant dual-ring network heterogeneous PLC networking method is implemented.

[0015] Through the above technical scheme, a dual-redundancy dual-ring network heterogeneous PLC networking method and system are provided. By establishing a communication connection between the two CPUs contained in the PLC and performing synchronous redundant configuration, the two CPUs are respectively used as redundant hosts and redundant standby machines according to the redundant configuration information of the redundant parties, so as to realize CPU dual redundancy. CPU dual redundancy effectively improves the reliability and availability of the PLC. Then, according to the dual-ring network networking rules, a dual-ring network link is established between the redundant parties and multiple remote IOs, so as to realize ring network redundancy and avoid the disadvantage that the single point failure of a single ring network has a large impact (if a node in the ring fails, it may affect the communication of the entire ring network). In the communication process between the redundant host and the dual-ring network link, the communication status of the redundant host and the dual-ring network link in the communication process is detected in real time. When a communication failure occurs in any ring network structure link in the redundant host and / or the dual-ring network link, the corresponding CPU switching and ring network structure link switching are performed. The method and system realize redundant backup, that is, the devices and links in the dual-ring network usually have redundant backup. When the main device (i.e., redundant host) or the main link fails, it can quickly switch to the backup device (i.e., redundant standby machine) or standby link to ensure normal communication. In the case of a redundant host failure, the normally working redundant standby machine of the method and system can ensure the stable operation of the PLC. Through the network redundancy achieved by the dual-ring network architecture of the network, when one ring network of the PLC fails, the other ring network ensures normal communication of the PLC. This greatly improves the overall reliability of the control system, eliminates the impact of abnormal failures to the greatest extent possible in the entire control system, and increases the availability of the control system by an order of magnitude. The method and system utilize the networking mode of heterogeneous PLCs of dual-redundant dual-ring networks, which can fully guarantee the operating reliability and stability of the system composed of PLCs in harsh industrial environments.

[0016] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the embodiments of the present invention, but do not constitute a limitation on the embodiments of the present invention. In the accompanying drawings: Figure 1 It is a flow chart of a dual-redundancy dual-ring network heterogeneous PLC networking method provided by an embodiment of the present invention; Figure 2 It is a block diagram of a dual-redundant dual-ring network heterogeneous PLC networking system provided by one embodiment of the present invention; Figure 3 It is a schematic diagram of a dual-ring network networking mode provided by an embodiment of the present invention; Figure 4 It is a schematic diagram of a CPU module system provided by one embodiment of the present invention; Figure 5 It is a schematic diagram of the structure of a remote IO provided by one embodiment of the present invention; Figure 6 It is a schematic diagram of the structure of an electronic device provided by a preferred embodiment of the present invention.

[0018] Description of Reference Numerals 10 - electronic device, 100 - processor, 101 - memory, 102 - computer program. DETAILED DESCRIPTION

[0019] The specific implementation of the present invention is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described here is only used to illustrate and explain the present invention, and is not used to limit the present invention.

[0020] Figure 1 FIG. 1 is a flow chart of a dual redundant dual ring network heterogeneous PLC networking method provided by an embodiment of the present invention. Figure 1 As shown, an embodiment of the present invention provides a dual-redundant dual-ring network heterogeneous PLC networking method, the PLC includes two CPUs, the functions of the first CPU and the second CPU are at least partially consistent, the method includes: S110: The two CPUs are used as redundant parties, a communication connection between the two redundant parties is established, and synchronous redundant configuration is performed, and a redundant master and a redundant standby in the two redundant parties are determined according to the redundant configuration information of the two redundant parties; wherein the redundant standby backs up the normal control logic operation process data of the redundant master; Specifically, the two CPUs contained in the PLC are used as the redundant host and redundant standby respectively to achieve CPU dual redundancy. Among them, the redundant host is responsible for the normal operation of the PLC, executes all calculations and instructions, and processes input and output operations. The redundant standby works as a backup for the redundant host. When the redundant host fails or fails, the redundant standby will take over the work of the redundant host and continue the operation of the PLC. The redundant standby usually maintains the same state and data as the redundant host to ensure a smooth transition.

[0021] In some implementations of this embodiment, the redundant host and the redundant standby machine monitor each other's working status through heartbeat detection. They periodically send heartbeat signals to confirm that each other is working properly. If the heartbeat signal is interrupted or the interruption exceeds a certain time limit, it will automatically switch to the redundant standby machine.

[0022] In some implementations of this embodiment, the redundant controller is a control unit between the redundant host and the redundant standby machine, responsible for monitoring and controlling the switching operation between the dual CPUs. It triggers the switching according to the result of the heartbeat detection. The specific switching process is as follows: When the redundant host fails, the redundant controller receives the corresponding signal and triggers the switching mechanism. The redundant standby machine will take over the work of the redundant host and continue the operation of the PLC. The redundant host and the redundant standby machine achieve high reliability and fault tolerance through heartbeat detection and redundant controllers. When the redundant host fails, the redundant standby machine will take over the work to ensure the continuous operation of the PLC. This redundant configuration is suitable for application scenarios with high reliability requirements for PLC, such as data centers, key equipment control, etc.

[0023] In the above implementation process, in the PLC (Programmable Logic Controller), CPU dual redundancy effectively improves the reliability and availability of the PLC. The dual redundant CPU configuration means that there are two identical CPUs running simultaneously in the PLC. The two CPUs usually process the same control task in parallel and continuously monitor each other's status. The working principle of the dual redundant CPU is as follows: 1. Parallel processing: The two CPUs execute the same program and logic operation at the same time, process the input signal and generate the output signal; 2. Data synchronization: The two CPUs maintain real-time synchronization of data to ensure that the data status of the two CPUs is consistent at any time; 3. Fault monitoring: The two CPUs continuously monitor each other's working status, including hardware failures, software errors, communication anomalies, etc.; 4. Fast switching: When one of the CPUs fails, the other CPU can quickly and seamlessly take over the control task, so that the operation of the PLC is not affected or only minimally affected. CPU dual redundancy can effectively prevent production interruptions, equipment damage and even safety accidents caused by CPU failures.

[0024] In some implementations of the present embodiment, the above-mentioned determination of the redundant master and the redundant standby in both redundant parties includes: in the process of performing synchronous redundant configuration, the redundant configuration information of each CPU in both redundant parties is respectively sent to the other CPU in both redundant parties, so that each CPU determines the master-slave relationship of both redundant parties according to the redundant configuration information of both redundant parties; wherein the redundant configuration information represents the CPU mode option of the corresponding CPU, and the CPU whose CPU mode option is the first mode option is used as the redundant master, and the CPU whose CPU mode option is the second mode option is used as the redundant standby; comparing the master-slave relationship of both redundant parties determined by the two CPUs respectively, and determining the redundant master and the redundant standby in both redundant parties based on the comparison result; wherein, if the master-slave relationship of both redundant parties determined by the two CPUs is inconsistent, the redundant configuration information of each CPU in both redundant parties is again sent to the other CPU in both redundant parties respectively, so as to update the redundant configuration information of both redundant parties in each CPU, until the master-slave relationship of both redundant parties determined by the two CPUs is consistent or the number of updates of the redundant configuration information reaches a preset number of updates, and when the number of updates of the redundant configuration information reaches the preset number of updates, the PLC operation is terminated.

[0025] Specifically, according to the communication connection between the redundant parties, the redundant parties respectively obtain the redundant configuration information of the other party, and each CPU uses the CPU with the CPU mode option of the first mode option as the redundant master and the CPU with the CPU mode option of the second mode option as the redundant standby according to its own CPU mode option and the CPU mode option of the other party, thereby obtaining the master-slave relationship of the redundant parties determined by the two CPUs respectively, and judging whether the master-slave relationship of the redundant parties determined by the two CPUs is consistent. If not, it is necessary to re-exchange the redundant configuration information to update the redundant configuration information of the redundant parties in each CPU. When the number of updates of the redundant configuration information reaches the preset number of updates, it indicates that the PLC has configuration errors or program errors, and the PLC operation is stopped.

[0026] S120: Based on the dual-ring network networking rules, establish communication connections between the redundant parties and the multiple remote IOs to form a dual-ring network link between the redundant parties and the multiple remote IOs; wherein the dual-ring network link includes two ring network structure links that are independent of each other and back up each other, each CPU and each remote IO in the ring network structure link are communication nodes, and each ring network structure link is a closed ring formed by sequentially connecting each communication node through a communication connection link; Among them, the communication between the CPU and remote IO relies on the high-speed differential wiring inside the backplane (Ethernet mode) for data exchange; the CPU is integrated with dual RS485 interfaces and dual CAN ports for communication and interaction with peripherals. In addition, there is a fiber optic port that can be used to expand the remote IO when the single backplane IO card slots are insufficient, thereby realizing the network heterogeneity of the PLC.

[0027] It should be noted that network heterogeneity refers to the existence of multiple network elements and technologies of different types and characteristics in a network environment, including but not limited to different operating systems, network protocols, hardware devices, topologies, data formats and transmission rates, etc. Network heterogeneity covers a variety of different network components and technologies.

[0028] In some implementations of this embodiment, the above-mentioned dual ring network networking rules include: determining the data communication direction between the redundant parties and multiple remote IOs; according to the data communication direction, using two sets of ring network switches to connect each communication node in sequence to form two ring network structure links.

[0029] Among them, the ring network switch can form a ring network topology, and the data flow can be transmitted in two directions, which increases the stability and reliability of the network.

[0030] Please refer to Figure 3 , Figure 3 The diagram is a schematic diagram of a dual ring network configuration method provided by an embodiment of the present invention. The arrows represent the connection method of the network cables in the ring network; the direction of the arrows refers to the direction of data communication. It should be noted that Figure 3 The data communication direction in the ring network is only one of the system applications. The ring network is a computer network topology. In the ring network, each communication node is connected in sequence through a communication link to form a closed ring. Data is usually transmitted in one direction in the ring, from one communication node to the next communication node until it reaches the target communication node. The ring network has the following advantages: 1. Simple structure: easy to implement and maintain, and cable laying is relatively simple. 2. High reliability: When a link in the ring network fails, the data can be transmitted in the opposite direction and reach the destination through the other side of the ring network, with a certain fault tolerance. This method realizes ring network redundancy, that is, using two sets of ring network switches to form a dual ring network to solve the disadvantage of large impact of single point failure (if a node in the ring fails, it may affect the communication of the entire ring network).

[0031] In some implementations of this embodiment, the realization of the self-healing function of the dual-ring network (referring to the ability to automatically detect and quickly restore communication when a network failure occurs) mainly depends on the following aspects: 1. Network topology: The dual-ring network adopts two ring topologies, and the two rings are independent of each other and back up each other. When one ring fails, data can be transmitted through the other ring to ensure the continuity of communication. 2. Fault detection mechanism: The devices in the dual-ring network will monitor the status of the link in real time, and determine whether a fault occurs by sending a detection signal or receiving feedback information. Once a fault is detected, the self-healing mechanism will be started immediately. 3. Self-healing algorithm: When a fault occurs, the self-healing algorithm will calculate the best recovery path based on the network topology and fault location. Usually, the fault link will be isolated and the network will be reconfigured so that data can be transmitted through other normal links. Specifically, this method realizes redundant backup, that is, the devices and links in the dual-ring network usually have redundant backup. When the main device (i.e., redundant host) or the main link fails, it can be quickly switched to the backup device (i.e., redundant backup machine) or backup link to ensure normal communication. The realization of the self-healing function requires the ability to switch quickly, that is, after detecting a fault, the data can be quickly switched to the backup path to reduce the time of communication interruption, and the self-healing time is within 10ms. In the above implementation process, the self-healing function of the dual-ring network is realized through reasonable network topology, effective fault detection mechanism, intelligent self-healing algorithm and redundant backup, which can improve the reliability and stability of the network.

[0032] S130: Real-time detection of the communication status of the redundant host and the dual-ring network link in the communication process, and when a communication failure occurs in the redundant host and / or any ring network structure link in the dual-ring network link, corresponding CPU switching and ring network structure link switching are performed.

[0033] Specifically, the method establishes a communication connection between two CPUs included in the PLC and performs synchronous redundant configuration, so that according to the redundant configuration information of the redundant parties, the two CPUs are respectively used as redundant hosts and redundant backup machines to achieve CPU dual redundancy. CPU dual redundancy effectively improves the reliability and availability of the PLC. Then, according to the dual-ring network networking rules, a dual-ring network link is established between the redundant parties and multiple remote IOs, so as to achieve ring network redundancy and avoid the disadvantage that the single point failure of a single ring network has a large impact (if a node in the ring fails, it may affect the communication of the entire ring network). In the communication process between the redundant host and the dual-ring network link, the communication status of the redundant host and the dual-ring network link in the communication process is detected in real time. When a communication failure occurs in any ring network structure link in the redundant host and / or the dual-ring network link, the corresponding CPU switching and ring network structure link switching are performed. The method realizes redundant backup, that is, the devices and links in the dual-ring network usually have redundant backup. When the main device (i.e., the redundant host) or the main link fails, it can be quickly switched to the backup device (i.e., the redundant backup machine) or the backup link to ensure normal communication. In the case of a redundant host failure, the normally working redundant standby machine can ensure the stable operation of the PLC. Through the network redundancy achieved by the dual-ring network architecture, in the case of a failure in one ring of the PLC, the other ring ensures normal communication of the PLC. This greatly improves the overall reliability of the control system, eliminates the impact of abnormal failures to the greatest extent possible, and increases the availability of the control system by an order of magnitude. This method utilizes the networking mode of dual-redundant dual-ring network heterogeneous PLCs, which can fully guarantee the reliability and stability of the system composed of PLCs in harsh industrial environments.

[0034] In some implementations of the present embodiment, before real-time detection of the communication status of the redundant host and the dual-ring network link in the communication process, the method also includes: operating the redundant host in the host working mode and operating the redundant standby in the standby working mode, initializing and obtaining an initial state; based on the initial state and the dual-ring network link, according to the data communication direction between the redundant parties and the multiple remote IOs, communication interaction is performed between the redundant parties and the multiple remote IOs; wherein the redundant host in the host working mode performs normal control logic operation according to the data communication direction between the communication nodes in the dual-ring network link, and synchronizes the normal control logic operation results to the redundant standby in the standby working mode according to a preset period, and the redundant standby in the standby working mode saves the normal control logic operation results.

[0035] In some implementations of the present embodiment, the communication status of the redundant host in the communication process is detected in real time, including: sending a detection instruction issued by the redundant standby machine to the redundant host, and sending a detection signal fed back by the redundant host to the redundant standby machine, so that the redundant standby machine monitors the communication status of the redundant host according to the detection signal fed back by the redundant host; when a communication failure occurs in the redundant host, the redundant standby machine is switched to the redundant host, so that the redundant standby machine enters the host working mode.

[0036] Specifically, the redundant host in the host working mode runs the control logic normally and refreshes the I / O data, and periodically synchronizes the normal control logic operation results to the redundant standby machine. The redundant standby machine in the standby working mode does not run the control logic, nor refreshes the I / O data, but only updates the normal control logic operation results synchronized from the redundant host to the corresponding process data area, and monitors the working status of the redundant host at all times. When an abnormal failure occurs in the redundant host, it will be upgraded to the redundant host at any time to take over the entire control system, and start running the control logic and executing the I / O data refresh operation without interference, thereby ensuring normal communication.

[0037] Figure 2 FIG. 1 is a block diagram of a dual-redundancy dual-ring network heterogeneous PLC networking system provided by an embodiment of the present invention. Figure 2 As shown, an embodiment of the present invention provides a dual-redundant dual-ring network heterogeneous PLC networking system, the PLC includes two CPUs, the functions of the first CPU and the second CPU are at least partially consistent, and the system includes: The redundant configuration module is used to establish a communication connection between the two redundant CPUs and perform synchronous redundant configuration, and determine the redundant host and redundant standby in the redundant host according to the redundant configuration information of the two redundant CPUs; wherein the redundant standby backs up the normal control logic operation process data of the redundant host; A dual-ring network link establishment module is used to establish communication connections between the redundant parties and multiple remote IOs based on the dual-ring network networking rules to form a dual-ring network link between the redundant parties and the multiple remote IOs; wherein the dual-ring network link includes two ring network structure links that are independent of each other and back up each other, each CPU and each remote IO in the ring network structure link are communication nodes, and each ring network structure link is a closed ring formed by sequentially connecting each communication node through a communication connection link; The communication status detection module is used to detect the communication status of the redundant host and the dual-ring network link in the communication process in real time. When a communication failure occurs in the redundant host and / or any ring network structure link in the dual-ring network link, the corresponding CPU switching and ring network structure link switching are performed.

[0038] Specifically, the system establishes a communication connection between the two CPUs contained in the PLC and performs synchronous redundant configuration, so that according to the redundant configuration information of the redundant parties, the two CPUs are used as redundant hosts and redundant backup machines respectively to achieve CPU dual redundancy. CPU dual redundancy effectively improves the reliability and availability of the PLC. Then, according to the dual-ring network networking rules, a dual-ring network link is established between the redundant parties and multiple remote IOs to achieve ring network redundancy, avoiding the disadvantage that the single point failure of a single ring network has a large impact (if a node in the ring fails, it may affect the communication of the entire ring network). During the communication process between the redundant host and the dual-ring network link, the communication status of the redundant host and the dual-ring network link in the communication process is detected in real time. When a communication failure occurs in any ring network structure link in the redundant host and / or the dual-ring network link, the corresponding CPU switching and ring network structure link switching are performed. The system realizes redundant backup, that is, the devices and links in the dual-ring network usually have redundant backup. When the main device (i.e., the redundant host) or the main link fails, it can be quickly switched to the backup device (i.e., the redundant backup machine) or the backup link to ensure normal communication. In the event of a redundant host failure, the normally working redundant standby machine can ensure the stable operation of the PLC. Through the network redundancy achieved by the dual-ring network architecture, in the event of a failure in one ring of the PLC, the other ring ensures normal PLC communication. This greatly improves the overall reliability of the control system, eliminates the impact of abnormal failures to the greatest extent possible, and increases the availability of the control system by an order of magnitude. The system uses a dual-redundant dual-ring network heterogeneous PLC networking method to fully ensure the reliability and stability of the system composed of PLCs in harsh industrial environments.

[0039] In some implementations of this embodiment, the dual-redundant dual-ring network heterogeneous PLC networking system also includes a secondary ring network switch and a main ring network switch, the secondary ring network switch and the main ring network switch are respectively connected to each communication node, and each communication node is connected to a redundant power supply.

[0040] Specifically, the communication links between the communication nodes are connected in sequence through the secondary ring network switch and the communication links between the communication nodes are connected in sequence through the main ring network switch to form a ring network topology structure, and a dual ring network link including two independent and mutually backed-up ring network structure links is obtained. The data stream can be transmitted in both directions of the ring network structure link, which increases the stability and reliability of the network. Using two sets of ring network switches to form a dual ring network solves the disadvantage of a large single point failure (if a node in the ring fails, it may affect the communication of the entire ring network).

[0041] Among them, power redundancy is a technology that provides high-reliability power supply guarantee for electronic equipment or systems. The core idea of ​​power redundancy is to configure multiple power supplies (usually two or more) so that when one of the power supplies fails, other normally working power supplies can immediately take over the power supply task, thereby ensuring that the equipment or system will not be interrupted due to power failure. Power redundancy has the following advantages: 1. Improve the reliability and stability of the system: reduce the downtime caused by power failure, especially suitable for scenarios with extremely high requirements for continuity and stability, such as data centers, industrial control systems, etc.; 2. Enhance fault tolerance: be able to cope with abnormal situations such as sudden power failure, overload, voltage fluctuation, etc.; 3. Ensure the continuity of key businesses: For some key businesses that cannot tolerate short power outages, such as financial transactions, medical equipment, etc., power redundancy is crucial. Ways to achieve power redundancy include: 1. Hot backup redundancy: the backup power supply is in standby state and starts quickly when the main power supply fails; 2. Parallel redundancy: multiple power supplies work at the same time to share the load. When a power supply fails, the remaining power supplies automatically bear more load. When designing a power redundancy system, factors such as power supply capacity matching, switching time, and current sharing control need to be considered to ensure efficient and stable operation of the system. When the dual-redundant dual-ring network heterogeneous PLC networking system realizes power parallel redundancy, multiple power supplies work simultaneously to share the load. When a power supply fails, the remaining power supplies automatically bear more loads. The power supply output voltage is 12V, which effectively improves the power supply capacity of the power supply on the backplane (the power supply voltage will attenuate on the backplane, causing unstable system operation).

[0042] In some implementations of this embodiment, the CPU and each remote IO exchange data via Ethernet, and each CPU is also integrated with dual RS485 interfaces and dual CAN interfaces for communication and interaction with external devices.

[0043] Specifically, the communication between the CPU and remote IO relies on the high-speed differential wiring inside the backplane (Ethernet mode) for data exchange; the CPU is integrated with dual RS485 interfaces and dual CAN ports for communication and interaction with peripherals. In addition, there is a fiber optic port that can be used to expand the remote IO when the single backplane IO card slots are insufficient, thereby realizing the network heterogeneity of the PLC.

[0044] Please refer to Figure 4 , Figure 4 This is a schematic diagram of a CPU module system provided by an embodiment of the present invention. Taking the main CPU module system as an example, the CPU module system is composed of a main ring network switch card, a secondary ring network switch card, a main CPU card, a main system power card, a backup system power card and a backplane, and the backplane is used to fix the cards and provide power supply and communication between the cards.

[0045] Please refer to Figure 5 , Figure 5 It is a structural diagram of a remote IO provided by an embodiment of the present invention. As an IO acquisition system at the remote end, the remote IO is composed of a main ring network switch card, a secondary ring network switch card, a remote IO_CPU card, a main power supply card, a backup power supply card, IO cards (such as DI, DO, AI, AO, RTD, SSI, PWM, SOE, etc., a single backplane has a maximum of 10 cards) and a backplane, which is used to fix the cards and provide power supply and communication between the cards.

[0046] The embodiment of the present invention further provides a machine-readable storage medium having instructions stored thereon, which, when executed by the processor 100, configures the processor 100 to execute the above-mentioned dual-redundancy dual-ring network heterogeneous PLC networking method.

[0047] Machine-readable storage media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0048] An embodiment of the present invention further provides an electronic device 10, which includes a memory 101, a processor 100, and a computer program 102 stored in the memory 101 and executable on the processor 100. When the processor 100 executes the computer program 102, the above-mentioned dual-redundant dual-ring network heterogeneous PLC networking method is implemented.

[0049] like Figure 6 FIG. 1 is a schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 6As shown, the electronic device 10 of this embodiment includes: a processor 100, a memory 101, and a computer program 102 stored in the memory 101 and executable on the processor 100. When the processor 100 executes the computer program 102, the steps in the above method embodiment are implemented. Alternatively, when the processor 100 executes the computer program 102, the functions of each module / unit in the above device embodiment are implemented.

[0050] Exemplarily, the computer program 102 may be divided into one or more modules / units, one or more modules / units are stored in the memory 101, and are executed by the processor 100 to complete the present invention. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 102 in the electronic device 10. For example, the computer program 102 may be divided into a redundant configuration module, a dual ring network link establishment module, and a communication status detection module.

[0051] The electronic device 10 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The electronic device 10 may include, but is not limited to, a processor 100 and a memory 101. Those skilled in the art will appreciate that Figure 6 It is only an example of the electronic device 10 and does not constitute a limitation of the electronic device 10. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0052] The processor 100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0053] The memory 101 may be an internal storage unit of the electronic device 10, such as a hard disk or memory of the electronic device 10. The memory 101 may also be an external storage device of the electronic device 10, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card (FlashCard), etc. equipped on the electronic device 10. Further, the memory 101 may also include both an internal storage unit of the electronic device 10 and an external storage device. The memory 101 is used to store computer programs and other programs and data required by the electronic device 10. The memory 101 may also be used to temporarily store data that has been output or is to be output.

[0054] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0055] It should be understood by those skilled in the art that the embodiments of the present application may be provided as methods, systems, or computer program 102 products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program 102 product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0056] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program 102 products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by the computer program 102 instructions. These computer program 102 instructions can be provided to a processor 100 of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor 100 of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0057] These computer program 102 instructions may also be stored in a computer readable memory 101 that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory 101 produce an article of manufacture including an instruction device that implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0058] These computer program 102 instructions may also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0059] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0060] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A dual-redundancy dual-ring network heterogeneous PLC networking method, characterized in that: The PLC includes two CPUs, the functions of the first CPU and the second CPU are at least partially consistent, and the method includes: The two CPUs are used as redundant parties, a communication connection between the two redundant parties is established, and synchronous redundant configuration is performed, and a redundant host and a redundant standby machine in the two redundant parties are determined according to the redundant configuration information of the two redundant parties; wherein the redundant standby machine backs up the normal control logic operation process data of the redundant host machine; Based on the dual-ring network networking rules, communication connections between the redundant parties and multiple remote IOs are established to form a dual-ring network link between the redundant parties and the multiple remote IOs; wherein the dual-ring network link includes two ring network structure links that are independent of each other and serve as backups for each other, each CPU and each remote IO in the ring network structure link is a communication node, and each ring network structure link is a closed ring formed by sequentially connecting each communication node through a communication connection link; The communication status of the redundant host and the dual-ring network link in the communication process is detected in real time. When a communication failure occurs in the redundant host and / or any ring network structure link in the dual-ring network link, the corresponding CPU switching and ring network structure link switching are performed.

2. The dual-redundancy dual-ring network heterogeneous PLC networking method according to claim 1 is characterized in that: The dual ring network configuration rules include: Determine the data communication direction between the redundant parties and multiple remote IOs; According to the data communication direction, two sets of ring network switches are used to connect the communication nodes in sequence to form two ring network structure links.

3. The dual redundant dual ring network heterogeneous PLC networking method according to claim 1 is characterized in that: Before real-time detection of the communication status of the redundant host and the dual-ring network link in the communication process, the method further includes: The redundant host is operated in the host working mode, and the redundant standby is operated in the standby working mode, and initialized to obtain an initial state; Based on the initial state and the dual-ring network link, the communication interaction between the redundant parties and the multiple remote IOs is carried out according to the data communication direction between the redundant parties and the multiple remote IOs; Among them, the redundant host in the host working mode performs normal control logic operation according to the data communication direction between the communication nodes in the dual-ring network link, and synchronizes the normal control logic operation results to the redundant standby in the standby working mode according to the preset cycle, and the redundant standby in the standby working mode saves the normal control logic operation results.

4. The dual-redundancy dual-ring network heterogeneous PLC networking method according to claim 3 is characterized in that: Real-time detection of the communication status of redundant hosts in the communication process, including: The detection instruction issued by the redundant standby machine is sent to the redundant host, and the detection signal fed back by the redundant host is sent to the redundant standby machine, so that the redundant standby machine monitors the communication status of the redundant host according to the detection signal fed back by the redundant host; When a communication failure occurs on the redundant master, the redundant standby machine is switched to the redundant master so that the redundant standby machine enters the master working mode.

5. The dual-redundancy dual-ring network heterogeneous PLC networking method according to claim 1 is characterized in that: The step of determining the redundant master and the redundant standby in the redundant parties includes: In the process of synchronous redundant configuration, redundant configuration information of each CPU in both redundant parties is sent to the other CPU in both redundant parties respectively, so that each CPU determines the master-slave relationship of both redundant parties according to the redundant configuration information of both redundant parties; wherein the redundant configuration information represents the CPU mode option of the corresponding CPU, and the CPU whose CPU mode option is the first mode option is used as the redundant master, and the CPU whose CPU mode option is the second mode option is used as the redundant standby; Compare the master-slave relationships of the redundant parties determined by the two CPUs respectively, and determine the redundant master and redundant standby machines in the redundant parties based on the comparison result; wherein, if the master-slave relationships of the redundant parties determined by the two CPUs are inconsistent, the redundant configuration information of each CPU in the redundant parties is sent again to the other CPU in the redundant parties respectively, so as to update the redundant configuration information of the redundant parties in each CPU, until the master-slave relationships of the redundant parties determined by the two CPUs are consistent or the number of updates of the redundant configuration information reaches a preset number of updates. When the number of updates of the redundant configuration information reaches the preset number of updates, the PLC operation is terminated.

6. A dual-redundant dual-ring network heterogeneous PLC networking system, characterized in that: The PLC includes two CPUs, the functions of the first CPU and the second CPU are at least partially consistent, and the system includes: A redundant configuration module is used to establish a communication connection between the two redundant CPUs and perform synchronous redundant configuration, and determine the redundant host and redundant standby in the redundant host according to the redundant configuration information of the two redundant CPUs; wherein the redundant standby backs up the normal control logic operation process data of the redundant host; A dual-ring network link establishment module is used to establish communication connections between the redundant parties and multiple remote IOs based on the dual-ring network networking rules to form a dual-ring network link between the redundant parties and the multiple remote IOs; wherein the dual-ring network link includes two ring network structure links that are independent of each other and back up each other, each CPU and each remote IO in the ring network structure link are communication nodes, and each ring network structure link is a closed ring formed by sequentially connecting each communication node through a communication connection link; The communication status detection module is used to detect the communication status of the redundant host and the dual-ring network link in the communication process in real time. When a communication failure occurs in the redundant host and / or any ring network structure link in the dual-ring network link, the corresponding CPU switching and ring network structure link switching are performed.

7. The dual-redundancy dual-ring network heterogeneous PLC networking system according to claim 6 is characterized in that: It also includes a secondary ring network switch and a main ring network switch, wherein the secondary ring network switch and the main ring network switch are respectively connected to each communication node, and each communication node is connected to a redundant power supply.

8. The dual-redundancy dual-ring network heterogeneous PLC networking system according to claim 6 is characterized in that: The CPU and each remote IO exchange data via Ethernet, and each CPU is also integrated with dual RS485 interfaces and dual CAN interfaces for communication and interaction with external devices.

9. A machine-readable storage medium having instructions stored thereon, characterized in that: When the instruction is executed by a processor, the processor is configured to execute the dual-redundant dual-ring network heterogeneous PLC networking method as described in any one of claims 1 to 5.

10. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the dual-redundant dual-ring network heterogeneous PLC networking method described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Drilling machine integrated double-loop network coupling control system based on IPC and PLC

    CN103343681A

  • Node device in ring network and path switching control method for same

    CN103918225A

  • Ring network with fault protection function and fault protection method for ring network

    CN103973537A

  • MAC-based PLC dual-redundant method and MAC-based PLC dual-redundant system

    CN106647613A

  • Controller hardware redundancy control method and system

    CN114509981A

Cited By

  • Bus-type PLC (Programmable Logic Controller) double-CPU (Central Processing Unit) hot standby redundant system

    CN120831931A

  • Distributed PLC (Programmable Logic Controller) double-CPU (Central Processing Unit) hot standby redundant system

    CN121209408A