Redundant disturbance-free switching method and computer device based on openPOWERLINK network
By adopting the redundant and non-disturbance switching method in the openPOWERLINK network, the rapid interchange of primary and secondary network nodes is solved, the problem of insufficient switching time and efficiency in the prior art is improved, the integrity and accuracy of data communication are improved, and the implementation cost is reduced.
Patent Information
- Application Number
- CN202411616036.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-13
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-13
AI Technical Summary
The existing redundant communication technology has insufficient switching time and efficiency, which may affect the integrity and accuracy of data communication, and the implementation cost of high availability seamless redundant protocols is relatively high.
The redundant disturbance-free switching method based on the openPOWERLINK network is adopted. The main network node shares the same CDC network configuration file and input and output cache data with the backup network node, and the main network nodes are quickly exchanged, and the main and backup network nodes are collected and controlled by themselves in the next sampling cycle.
It improves the efficiency of redundant handover, ensures the integrity and accuracy of data communication, reduces network handover time, avoids the situation of no main network nodes or dual backup network nodes, and reduces implementation costs.
Smart Images

Figure CN119135515B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of network redundancy switching, and in particular to a redundant disturbance-free switching method and a computer device based on an openPOWERLINK network. Background Art
[0002] In some important industrial control fields, DCS (Distributed Control System) has been widely used, involving a large amount of multi-dimensional data interaction within the control system, so the DCS system has extremely high requirements for the reliability and real-time performance of network communication. Redundancy is currently the most common method to solve the requirements of communication reliability and real-time performance. Its essence is to achieve reliable transmission of data communication as much as possible through the redundancy of related elements such as equipment and network protocols.
[0003] In response to the problem of redundant communication, the International Electrotechnical Commission IEC has specified redundant communication protocols in IEC62439-3, such as the parallel redundant protocol and the high-availability seamless redundant protocol, as application specifications for industrial communication networks and high-reliability automation networks, ultimately meeting the needs of zero-delay switching. However, the parallel redundant protocol and the high-availability seamless redundant protocol have special requirements for network equipment or network topology, and are currently very difficult and costly to build. The parallel redundant protocol adopts a dual-network architecture, and the terminal nodes must be connected to two independent local area networks, which is suitable for single equipment and ring networks; while the high-availability seamless redundant protocol will traverse the entire loop in the implementation of the ring network. The increase in the loop structure will lead to higher and higher loads, and the design and operation costs are high. Another type of traditional redundant communication technology, such as dual-machine hot backup, has high implementation and cost feasibility in engineering applications, but has problems such as long switching time and low switching efficiency, and may affect the integrity and accuracy of data communication when a failure occurs. Summary of the invention
[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a redundant disturbance-free switching method and a computer device based on an openPOWERLINK network, thereby improving the efficiency of redundant switching and improving the integrity and accuracy of data communication.
[0005] The present invention adopts the following technical solutions to achieve the above-mentioned purpose. In a first aspect, the present invention provides a redundant disturbance-free switching method based on an openPOWERLINK network, comprising:
[0006] S1. When the master network node starts running, it collects input and controls output data, and transmits intermediate quantities and collected input values to the standby network node according to task priority. The master network node and the standby network node share the same CDC (ChangeData Capture) network configuration file and input and output cache data;
[0007] S2: When the main network node fails and the switching condition is reached, the data is first copied to the standby network node according to the task priority;
[0008] S3, change the value of the active / standby condition variable to achieve the swap of active / standby network nodes, and the active network node enters the fault recovery detection process;
[0009] S4, the standby network node switches to the master network node state, and uses the intermediate quantity and the collected input value transmitted by the original master network node most recently as the initial value for the first operation;
[0010] S5. In the next sampling period, when the standby network node starts running, it directly enters data collection and calculation, and controls the output data;
[0011] S6. Determine the recovery status of the main network node failure. If the main network node failure is recovered, switch the main and standby network nodes again.
[0012] Furthermore, the switching condition is determined by the Ethernet operation state, the CDC file state and the protocol fault frame state. When any one of the Ethernet operation state, the CDC file state and the protocol fault frame state of the master network node fails, the master-slave network node switching operation is started;
[0013] The Ethernet operation status is used to indicate whether the communication function of the current network is good and whether the data communication is normal;
[0014] The CDC file is a network configuration file of the openPOWERLINK network, which contains the configuration information of the primary network node and the backup network node, including the node address, node type and communication parameters;
[0015] The protocol fault frame defines the post-fault processing and troubleshooting mechanism that occurs during openPOWERLINK network communication, including peer timeout response and peer network card failure. When a protocol fault frame occurs, a prompt message containing specific error information and error node identification is generated and sent to the network to notify the primary network node and backup network node.
[0016] Furthermore, factors that may cause CDC files to become corrupt or display error messages include:
[0017] The CDC file content or format is incorrect. If the configuration data in the CDC file is incorrectly modified or entered, or if there are incorrect delimiters, or if related fields are missing or the field order is incorrect, the CDC file cannot be correctly parsed and used.
[0018] Failure to load the CDC file. If the network is unstable or the device or power supply fails, this will indirectly lead to failure to correctly load or use the file;
[0019] CDC file is damaged. During the CDC file transmission, copying or editing process, if the CDC file header information is lost, part of the data is truncated or overwritten, the CDC file cannot be read and loaded correctly.
[0020] Furthermore, the master network node startup specifically includes:
[0021] The main network node thread starts, binds the main network port, and configures openPOWERLINK communication parameters;
[0022] Bind event trigger callback function and data synchronization callback function;
[0023] Initialize the object dictionary and openPOWERLINK protocol stack;
[0024] Parse CDC functions and allocate input and output memory;
[0025] Load the object dictionary and start the protocol stack program, entering the loop waiting state.
[0026] Furthermore, the startup of the standby network node specifically includes:
[0027] The standby network node thread starts, binds the standby network port, and configures openPOWERLINK communication parameters;
[0028] Bind event trigger callback function and data synchronization callback function;
[0029] Initialize the object dictionary and openPOWERLINK protocol stack;
[0030] Parse CDC functions and allocate input and output memory;
[0031] Load the object dictionary and start the protocol stack program, entering the loop waiting state.
[0032] In a second aspect, the present invention provides a computer device, including a memory, wherein the memory stores program instructions, and when the program instructions are executed, the above-mentioned redundant disturbance-free switching method based on the openPOWERLINK network is executed.
[0033] The beneficial effects of the present invention are:
[0034] The present invention establishes a dual-network redundancy mechanism of a field control station DPU in a DCS system without increasing existing network facilities.
[0035] The present invention combines the openPOWERLINK operation mechanism, the main network node and the standby network node share the same configuration CDC file and input and output cache data, when switching occurs, the main network node enters the fault recovery detection process and does not collect input and control output, while the standby network node uses the input and output cache data of the main network node, ensuring that self-collection and control start in the next cycle, saving network switching time, avoiding the occurrence of no main network node or double standby network nodes, and improving the integrity and accuracy of data communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 is a flow chart of a redundant disturbance-free switching method based on an openPOWERLINK network provided by an embodiment of the present invention;
[0037] Figure 2 It is a flowchart of starting a master network node and a backup network node provided by an embodiment of the present invention;
[0038] Figure 3 This is the main network node thread event processing flow provided by an embodiment of the present invention;
[0039] Figure 4 This is a standby network node thread event processing flow provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0040] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0041] In openPOWERLINK, redundancy is achieved by using a master-backup approach.
[0042] The field control station DPU in the DCS system provided by the present invention is installed with two network cards eth2 and eth3. After the system is started, eth3 is set as the openPOWERLINK master network node by default, and eth2 is set as the openPOWERLINK backup network node by default. When both eth3 and eth2 of the DPU are normal, the system works according to the default master and backup network nodes; when eth2 fails, the system alarms, but no switching occurs at this time; when eth3 fails, the system sets eth3 as the switching condition and alarms, and then eth2 switches to the master network node; when both eth3 and eth2 fail, the DPU device alarms, indicating that both the master and backup network nodes are in a failed state, and then enters the DPU device redundant switching process.
[0043] In the specific operation logic, the primary network node and the backup node share the same CDC network configuration file and input and output cache data. Figure 1 As shown in the figure, the redundant disturbance-free switching method based on the openPOWERLINK network includes:
[0044] S1, when the main network node operates normally, it collects input and controls output data, and transmits intermediate quantities and collected input values to the standby network node according to task priority;
[0045] S2: When the main network node fails and the switching condition is reached, the data is first copied to the backup network node according to the task priority to ensure the priority transmission of important data;
[0046] S3, change the value of the active / standby condition variable to achieve the swap of active / standby network nodes, and the active network node enters the fault recovery detection process;
[0047] S4, the standby network node switches to the master network node state, and uses the intermediate quantity and the collected input value transmitted by the original master network node most recently as the initial value of the first operation to ensure data security and output stability and continuity;
[0048] S5. In the next sampling period, the standby network node enters the normal operation state, directly enters the data collection and calculation, and controls the output data;
[0049] S6. If the main network node fails and recovers, the main and backup network nodes can be switched again.
[0050] The above mechanism not only ensures the security and stability of the data, but also ensures the consistency and speed of data collection by the backup machine.
[0051] In the present invention, the openPOWERLINK redundant switching mechanism is determined by three status factors, namely, Ethernet operation status, CDC file status and protocol fault frame status.
[0052] Ethernet operation status:
[0053] It is used to indicate whether the communication function of the current network is good and whether the data communication is normal. As a real-time industrial Ethernet communication protocol, openPOWERLINK runs on the basis of Ethernet. The quality of the basic physical network determines whether the protocol data packets on it can be sent and received normally.
[0054] CDC file states:
[0055] As a network configuration file unique to the openPOWERLINK network, the CDC file contains the configuration information of the entire network (including the master and slave stations), such as node addresses, node types, communication parameters, etc. This file facilitates developers to centrally manage and configure the entire network. It can also be used to add, delete or modify nodes in the network by modifying the file to adapt to changes in network topology or expansion requirements.
[0056] In actual applications, CDC files are usually not damaged by dynamic factors during network communication, but the following factors may cause them to be damaged or cause error messages:
[0057] The CDC file content or format is incorrect. If the configuration data in the file is modified or entered incorrectly, such as incorrect node ID, network parameters, timestamp, etc., it may cause communication failure or configuration failure; at the same time, because CDC files are usually in JSON file format, if there are incorrect delimiters, missing necessary fields, or the order of fields is wrong, the file may not be parsed and used correctly.
[0058] CDC file corruption. During the file transfer, copying, or editing process, problems such as loss of file header information, truncation or overwriting of some data may cause the file to be unable to be correctly read and loaded by the system.
[0059] Failed to load the CDC file. Network instability or device or power failure may indirectly cause the system to be unable to correctly load or use the file.
[0060] Protocol fault frame status:
[0061] The protocol fault frame defines the post-fault processing and troubleshooting mechanism that occurs during openPOWERLINK network communication. It mainly includes two categories: peer timeout response and peer network card failure. When a protocol fault frame occurs, the system will generate a prompt message containing specific error information and error node identification, and send it to the network to notify the master station and each slave station.
[0062] When one of the above three states of the main network node fails, in order to ensure the effectiveness and continuity of system data communication, the system will start the main and backup network node switching operation; otherwise, the system will operate according to the default main and backup network node configuration.
[0063] Specifically, after the present invention is powered on, the field control station DPU starts the main thread and the standby thread respectively, such as Figure 2 shown.
[0064] The main network node startup specifically includes:
[0065] The main network node thread starts, binds the main network port, and configures openPOWERLINK communication parameters;
[0066] Bind event trigger callback function and data synchronization callback function;
[0067] Initialize the object dictionary and openPOWERLINK protocol stack;
[0068] Parse CDC functions and allocate input and output memory;
[0069] Load the object dictionary and start the protocol stack program, entering the loop waiting state.
[0070] After the main network node is started, its thread event triggering process is as follows: Figure 3 As shown, specifically including:
[0071] Trigger event and data synchronization process;
[0072] Event triggers callback;
[0073] Determine whether the master-slave switching condition is met. If so, stop data synchronization, that is, stop data collection and control, and then switch the master network node to the standby network node; if not, complete data synchronization, that is, complete data collection and control.
[0074] The startup of the standby network node specifically includes:
[0075] The standby network node thread starts, binds the standby network port, and configures openPOWERLINK communication parameters;
[0076] Bind event trigger callback function and data synchronization callback function;
[0077] Initialize the object dictionary and openPOWERLINK protocol stack;
[0078] Parse CDC functions and allocate input and output memory;
[0079] Load the object dictionary and start the protocol stack program, entering the loop waiting state.
[0080] After the backup network node is started, its thread event triggering process is as follows: Figure 4 As shown, specifically including:
[0081] Trigger event and data synchronization process;
[0082] Event triggers callback;
[0083] Determine whether the master-slave switching condition is met. If so, stop data synchronization, that is, stop data collection and control, and then switch the standby network node to the master network node;
[0084] If not, the data synchronization callback is made and it is determined whether the master-slave switching conditions are met. If not, the event and data synchronization processing flow are triggered; if so, the master network node is switched and the input and output buffer data of the master network node is used. Finally, data synchronization is completed, that is, data collection and control are completed.
[0085] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.
Claims
1. A redundant disturbance-free switching method based on an openPOWERLINK network, characterized in that: include: S1. When the master network node starts running, it collects input and controls output data, and transmits intermediate quantities and collected input values to the standby network node according to task priority. The master network node and the standby network node share the same CDC network configuration file and input and output cache data; S2: When the main network node fails and the switching condition is reached, the data is first copied to the standby network node according to the task priority; S3, change the value of the active / standby condition variable to achieve the swap of active / standby network nodes, and the active network node enters the fault recovery detection process; S4, the standby network node switches to the master network node state, and uses the intermediate quantity and the collected input value transmitted by the original master network node most recently as the initial value for the first operation; S5. In the next sampling period, when the standby network node starts running, it directly enters data collection and calculation, and controls the output data; S6. Determine the recovery status of the main network node failure. If the main network node failure is recovered, switch the main and standby network nodes again; The switching condition is determined by the Ethernet operation status, the CDC file status and the protocol fault frame status. When any one of the Ethernet operation status, the CDC file status and the protocol fault frame status of the primary network node fails, the primary and standby network node switching operation is started; The Ethernet operation status is used to indicate whether the communication function of the current network is good and whether the data communication is normal; The CDC file is a network configuration file of the openPOWERLINK network, which contains the configuration information of the primary network node and the backup network node, including the node address, node type and communication parameters; The protocol fault frame defines the post-fault processing and troubleshooting mechanism that occurs during openPOWERLINK network communication, including peer timeout response and peer network card failure. When a protocol fault frame occurs, a prompt message containing specific error information and error node identification is generated and sent to the network to notify the primary network node and backup network node.
2. The method for redundant disturbance-free switching based on openPOWERLINK network according to claim 1, characterized in that: Factors that may cause CDC files to become corrupted or display error messages include: The CDC file content or format is incorrect. If the configuration data in the CDC file is incorrectly modified or entered, or if there are incorrect delimiters, or if related fields are missing or the field order is incorrect, the CDC file cannot be correctly parsed and used. Failure to load the CDC file. If the network is unstable or the device or power supply fails, this will indirectly lead to failure to correctly load or use the file; CDC file is damaged. During the CDC file transmission, copying or editing process, if the CDC file header information is lost, part of the data is truncated or overwritten, the CDC file cannot be read and loaded correctly.
3. The method for redundant disturbance-free switching based on openPOWERLINK network according to claim 1, characterized in that: The master network node startup specifically includes: The main network node thread starts, binds the main network port, and configures openPOWERLINK communication parameters; Bind event trigger callback function and data synchronization callback function; Initialize the object dictionary and openPOWERLINK protocol stack; Parse CDC functions and allocate input and output memory; Load the object dictionary and start the protocol stack program, entering the loop waiting state.
4. The method for redundant disturbance-free switching based on openPOWERLINK network according to claim 1, characterized in that: The startup of the standby network node specifically includes: The standby network node thread starts, binds the standby network port, and configures openPOWERLINK communication parameters; Bind event trigger callback function and data synchronization callback function; Initialize the object dictionary and openPOWERLINK protocol stack; Parse CDC functions and allocate input and output memory; Load the object dictionary and start the protocol stack program, entering the loop waiting state.
5. A computer device, comprising a memory, wherein the memory stores program instructions, characterized in that: When the program instructions are executed, the redundant disturbance-free switching method based on the openPOWERLINK network as described in any one of claims 1 to 4 is executed.
Citation Information
Patent Citations
Industrial control network redundancy fault-tolerant system
CN101907879A
Inter-board communication component based on POWERLINK technology
CN104079460A