Ethercat master device and ethercat network control method

By designing dual master station modules and redundant control modules in the EtherCAT master station device, dual-system hot standby redundancy of the EtherCAT network is realized, which solves the stability and security problems of the EtherCAT network when the master station is abnormal, and improves the reliability and operational continuity of the system.

CN119728326BActive Publication Date: 2026-03-31XIDIAN POWER RECTIFIER XIAN +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-27
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

When the master station device fails, the EtherCAT network cannot achieve dual-system hot standby redundancy, which affects system stability and security.

Method used

Design an EtherCAT master station device, comprising a first master station module, a second master station module, and a redundant control module. Hot standby redundancy of the two master station modules is achieved through analog switches and network port switching components, ensuring that only the active master station module accesses the network, while the standby module backs up data in real time.

Benefits of technology

It implements dual-system hot standby redundancy in EtherCAT networks, improving network security and stability, avoiding system downtime or disturbances caused by master station anomalies, and meeting the needs of demanding application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119728326B_ABST
    Figure CN119728326B_ABST
Patent Text Reader

Abstract

The application discloses an EtherCAT master station device and an EtherCAT network control method, and relates to the technical field of industrial control, wherein the device comprises a first master station module, a second master station module and a redundancy control module; two network ports of each master station module are cross-connected with two network port switching components in the redundancy control module; the two network port switching components are also connected with a first slave station and a last slave station of an EtherCAT network respectively; the network port switching components are used for controlling the first master station module or the second master station module to access the EtherCAT network through an analog switch; the master station module accessing the EtherCAT network is in an active state, and the other master station module is in a standby state; the active master station module is used for accessing the EtherCAT network to execute a task, and the standby master station module is used for backing up data of the active master station module in real time. The application can improve the safety and stability of the EtherCAT network.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial control, and in particular to an EtherCAT master station device and an EtherCAT network control method. BACKGROUND

[0002] This section is intended to provide background or context to the embodiments of the application recited in the claims. The description herein does not constitute admission that the prior art is prior art nor does it constitute an admission of any description in this section as prior art to an application described herein and / or in another application also owned by the applicant of the present application.

[0003] EtherCAT (Ethernet for Control Automation Technology) is mainly used in industrial automation and control systems to achieve high-performance, real-time data transmission and control. Figure 1 is a schematic diagram of an EtherCAT network connection in the prior art, as shown in Figure 1 , when the cable redundancy function is enabled, the EtherCAT network port of the master station is connected to the IN port of the first slave station, the OUT port of the previous slave station is connected to the IN port of the next adjacent slave station. If the cable redundancy is enabled, the OUT port of the last slave station is connected to another EtherCAT network port of the master station.

[0004] All frames in the EtherCAT network can only be propagated in the form of a "logical ring network", that is, all frames are sent by the master station, pass through all network slaves in a certain order, and return to the master station after completing the loop. Please refer to Figure 2 , Figure 2 is a process diagram of EtherCAT frame transmission in the prior art.

[0005] The cable redundancy designed by the EtherCAT standard adopts a ring topology network structure. When the cable is disconnected at a certain point, the frames at both ends of the breakpoint will be processed separately to ensure the continuous operation of the network. Although the cable redundancy technology effectively improves the reliability of the network, when the EtherCAT master station device is abnormal, it will have a significant impact on the system operation.

[0006] In other existing traditional industrial control networks, whether based on fieldbus or Ethernet technology, many can support dual master stations working in the network at the same time to realize hot standby redundancy at the master station level, but the EtherCAT standard does not design a dual master station operation mechanism. For some demanding application scenarios, the EtherCAT network can only ensure safety by enabling the cable redundancy function, and cannot further have the dual system hot standby redundancy feature. Its working principle also determines that it does not support the case of enabling cable redundancy and supporting dual master stations online at the same time in the EtherCAT network. Therefore, the safety and stability of the EtherCAT network in the prior art need to be improved. SUMMARY

[0007] This invention provides an EtherCAT master station device to improve the security and stability of an EtherCAT network. The device includes: a first master station module, a second master station module, and a redundancy control module.

[0008] The first network port of the first master station module is connected to the first network port of the redundant control module.

[0009] The second network port of the first master station module is connected to the third network port of the redundant control module;

[0010] The first network port of the second master station module is connected to the second network port of the redundant control module.

[0011] The second network port of the second master station module is connected to the fourth network port of the redundant control module;

[0012] The first and second network ports of the redundancy control module are connected to the first and second ports of the first network port switching component of the redundancy control module, respectively; the third and fourth network ports of the redundancy control module are connected to the first and second ports of the second network port switching component of the redundancy control module, respectively; the third port of the first network port switching component is connected to the input port of the first slave station; the third port of the second network port switching component is connected to the output port of the last slave station.

[0013] The first and second network port switching components are used to control the first or second master station module to access the EtherCAT network via an analog switch. The master station module that accesses the EtherCAT network is in an active state, while the other master station module is in a standby state. The active master station module is used to access the EtherCAT network to perform tasks, while the standby master station module is used to back up the data of the active master station module in real time.

[0014] This invention provides an EtherCAT network control method to improve the security and stability of EtherCAT networks. The method is applied to an EtherCAT master station device and includes:

[0015] When the EtherCAT master station device switches to the master station module connected to the EtherCAT network, the redundancy control module sends a command to the originally active master station module to switch to standby mode, and then disconnects the original active master station module from the EtherCAT network.

[0016] The redundancy control module sequentially reads the working status of the first master station module and the second master station module, sets the first ready master station module to the active state, first controls the network port of the master station module to connect to the EtherCAT network, and then sends an activation command to the master station module.

[0017] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described EtherCAT network control method.

[0018] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described EtherCAT network control method.

[0019] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described EtherCAT network control method.

[0020] The EtherCAT master station device in this embodiment of the invention includes a first master station module, a second master station module, and a redundancy control module. The first network port of the first master station module is connected to the first network port of the redundancy control module; the second network port of the first master station module is connected to the third network port of the redundancy control module; the first network port of the second master station module is connected to the second network port of the redundancy control module; the second network port of the second master station module is connected to the fourth network port of the redundancy control module; the first and second network ports of the redundancy control module are respectively connected to the first and second ports of the first network port switching component of the redundancy control module; the third and fourth network ports of the redundancy control module are respectively connected to the second network port of the redundancy control module. The first and second ports of the port switching component; the third port of the first port switching component is connected to the input port of the first slave station; the third port of the second port switching component is connected to the output port of the last slave station; the first and second port switching components are used to control the first master station module or the second master station module to access the EtherCAT network through an analog switch; the master station module accessing the EtherCAT network in the first and second master station modules is in an active state, and the other master station module is in a standby state. The active master station module is used to access the EtherCAT network to perform tasks, and the standby master station module is used to back up the data of the active master station module in real time. That is, in this embodiment of the EtherCAT master station device, both the first master station module and the second master station module have two network ports. The redundancy control module includes two network port switching components. The two network port switching components control the first master station module or the second master station module to access the EtherCAT network through an analog switch, so that the two network ports of the active master station module in the first master station module and the second master station module are respectively connected to the first slave station and the last slave station of the EtherCAT network, thereby realizing synchronous switching of the two network ports of the first master station module or the second master station module to access the EtherCAT network; wherein, the master station module that accesses the EtherCAT network to perform tasks is in an active state. In one state, the active master module serves as a backup, ensuring that only the active master module connects to the EtherCAT network. The backup master module is physically isolated from the EtherCAT network, allowing both network ports of the active master module to connect to the EtherCAT network, thus activating cable redundancy. Simultaneously, the dual master module design enables synchronous transmission of critical data. The backup master module can back up data from the active master module in real time. When the dual master modules switch over, the EtherCAT network can continue to operate normally, preventing downtime or disruption to the entire EtherCAT network control system due to master module malfunction. Therefore, the EtherCAT master device in this embodiment improves the security and stability of the EtherCAT network, meeting the requirements of demanding application scenarios. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In the drawings:

[0022] Figure 1 This is a schematic diagram of an EtherCAT network connection in the existing technology;

[0023] Figure 2 This is a diagram of the EtherCAT frame transmission process in the existing technology;

[0024] Figure 3 This is the first embodiment of the EtherCAT master station device in this invention.

[0025] Figure 4 This is the second embodiment of the EtherCAT master station device in this invention.

[0026] Figure 5 This is the third embodiment of the EtherCAT master station device in the present invention;

[0027] Figure 6 This is a specific example diagram of the EtherCAT network control method in this embodiment of the invention;

[0028] Figure 7 This is another specific example diagram of the EtherCAT network control method in this embodiment of the invention. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention. It should be noted that the terms "first" and "second" in the embodiments of the present invention are only for identifying two identical or similar technical contents.

[0030] First, the technical terms involved in this invention will be explained.

[0031] EtherCAT (Ethernet for Control Automation Technology): Ethernet control automation technology used in industrial automation and control systems to achieve high-performance, real-time data transmission and control.

[0032] Mbps: It stands for Million bits per second, which means millions of bits per second. Here, bit (1 bit equals 1 bit) is the smallest unit to represent digital signal data.

[0033] UART (Universal Asynchronous Receiver / Transmitter): A universal asynchronous receiver / transmitter, it is one of the most commonly used inter-device communication protocols. When correctly configured, a UART can work with many different types of serial protocols involving the transmission and reception of serial data. In serial communication, data is transmitted bit by bit through a single line or wire. In bidirectional communication, two wires are used for continuous serial data transmission. Depending on the application and system requirements, serial communication requires fewer circuits and wires, reducing implementation costs.

[0034] Analog switches: also known as solid-state relays, use MOSFETs to switch on or off signal links.

[0035] MCU (Microcontroller Unit): Also known as a microcontroller or single-chip microcomputer, it is a chip-level computer that integrates a CPU with a reduced frequency and specifications, along with peripheral interfaces such as memory, timer, USB, A / D converter, UART, and even LCD driver circuitry, all on a single chip. This enables terminal control functions and offers advantages such as high performance, low power consumption, programmability, and high flexibility. MCUs are generally available in 8-bit, 16-bit, 32-bit, and 64-bit versions.

[0036] EIA-485: Formerly known as RS-485 or RS485, it is a standard belonging to the physical layer of the OSI model, which specifies the electrical characteristics of 2-wire, half-duplex, balanced transmission line multi-point communication.

[0037] GPIO: General Purpose Input / Output, one of the pin functions of the processor.

[0038] UDP: User Datagram Protocol, is a simple, connectionless, unreliable datagram transport layer protocol.

[0039] The applicant discovered that the EtherCAT standard does not include a dual-master operation mechanism. For some demanding application scenarios, EtherCAT networks can only ensure security by enabling cable redundancy, lacking the ability to provide dual-system hot standby redundancy. Therefore, the security and stability of existing EtherCAT networks need improvement. To address this, the applicant proposed an EtherCAT master station device. By designing two identical master station modules (each with dual EtherCAT ports) and one redundant control module within the device, the EtherCAT master station retains cable redundancy while also implementing dual-system hot standby redundancy, thus improving equipment reliability.

[0040] Figure 3 This is the first embodiment of the EtherCAT master station device in this invention, such as... Figure 3 As shown, the EtherCAT master station device includes: a first master station module, a second master station module, and a redundant control module. The first master station module and the second master station module have identical hardware and software designs and each has at least two network ports.

[0041] The first network port of the first master station module is connected to the first network port (M1) of the redundant control module;

[0042] The second network port of the first master station module is connected to the third network port (M3) of the redundant control module;

[0043] The first network port of the second master station module is connected to the second network port (M2) of the redundant control module;

[0044] The second network port of the second master station module is connected to the fourth network port (M4) of the redundant control module.

[0045] The first network port (M1) and the second network port (M2) of the redundancy control module are connected to the first port and the second port of the first network port switching component of the redundancy control module, respectively; the third network port (M3) and the fourth network port (M4) of the redundancy control module are connected to the first port and the second port of the second network port switching component of the redundancy control module, respectively; the third port of the first network port switching component is connected to the input port of the first slave station; the third port of the second network port switching component is connected to the output port of the last slave station.

[0046] That is, the fifth network port (S1) of the redundant control module is connected to the first slave station of the EtherCAT network, and the sixth network port (S2) of the redundant control module is connected to the last slave station of the EtherCAT network. The fifth network port (S1) and the sixth network port (S2) are connected to the EtherCAT slave station to form a ring network.

[0047] Refer to Table 1 and Figure 3 Table 1 is the network interface connection table for the redundancy control module.

[0048] Table 1 Network Interface Connection Table for Redundancy Control Module

[0049] Redundant module network interface Connected other device interface S1 IN port of first slave S2 OUT port of last slave M1 Network port 1 of first master module M2 Network port 1 of second master module M3 Network port 2 of first master module M4 Network port 2 of second master module

[0050] Figure 3 In this configuration, the first network port switching component and the second network port switching component are used to control the first master station module or the second master station module to access the EtherCAT network via an analog switch. The master station module that accesses the EtherCAT network in the first master station module and the second master station module is in an active state, while the other master station module is in a standby state. The master station module in the active state is used to access the EtherCAT network to perform tasks, while the master station module in the standby state is used to back up the data of the master station module in the active state in real time.

[0051] Figure 4 This is the second embodiment of the EtherCAT master station device in the present invention, see reference. Figure 4 The first network port switching component and / or the second network port switching component include one or more analog switch chips, each analog switch chip containing multiple synchronously switchable two-to-one low-impedance broadband bidirectional analog switches, each analog switch controlling one signal line of the network interface.

[0052] In one embodiment, both the first network port switching component and the second network port switching component include: an enable signal control terminal and a switch selection signal control terminal, as referenced. Figure 4 The first and second network port switching components provide input terminals EN_A and IN_A to the outside. EN_A is connected to the EN of all internal analog switch chips, and IN_A is connected to the IN of all internal analog switch chips to achieve synchronous and consistent control of all analog switch chips.

[0053] When the enable signal control terminals of the first and second network port switching components receive an invalid enable level, the first and second network port switching components disconnect from the first master station module and the EtherCAT network through analog switches.

[0054] When the enable signal control terminals of the first and second network port switching components receive a valid enable level and the switch selection signal control terminal receives a high level, the first and second network port switching components control the first master station module to access the EtherCAT network through an analog switch.

[0055] When the enable signal control terminals of the first and second network port switching components receive a valid enable low level, and the switch selection signal control terminal receives a low level, the first and second network port switching components control the second master station module to access the EtherCAT network through an analog switch.

[0056] Specifically, when the enable signal control terminals of the first and second network port switching components receive an invalid enable level, the first network port switching component disconnects the connection between the first port, the second port and the third port through an analog switch, and the second network port switching component disconnects the connection between the first port, the second port and the third port through an analog switch.

[0057] When the enable signal control terminals of the first and second network port switching components receive a valid enable level and the switch selection signal control terminal receives a high level, the first network port switching component connects the first network port of the first master station module to the first slave station through an analog switch, and the second network port switching component connects the second network port of the first master station module to the last slave station through an analog switch.

[0058] When the enable signal control terminals of the first and second network port switching components receive a valid enable level and the switch selection signal control terminal receives a low level, the first network port switching component connects the first network port of the second master station module to the first slave station through an analog switch, and the second network port switching component connects the second network port of the second master station module to the last slave station through an analog switch.

[0059] Furthermore, when the enable signal control terminals of the first and second network port switching components receive a valid enable level, and the switch selection signal control terminal receives a high level, the first network port switching component connects the first port to the third port through an analog switch, and the second network port switching component connects the first port to the third port through an analog switch.

[0060] When the enable signal control terminals of the first and second network port switching components receive a valid enable level and the switch selection signal control terminal receives a low level, the first network port switching component connects the second port to the third port through an analog switch, and the second network port switching component connects the second port to the third port through an analog switch.

[0061] Figure 5 This is the third embodiment of the EtherCAT master station device in the embodiments of the present invention, such as... Figure 5 As shown, the redundant control module also includes a microcontroller (MCU); the microcontroller (MCU) is connected to the enable signal control terminal and the switch selection signal control terminal of the first network port switching component and the second network port switching component, respectively. The microcontroller is used to send an invalid enable level or an effective enable level to the enable signal control terminal of the first network port switching component and the second network port switching component, and to send a high level or a low level to the switch selection signal control terminal of the first network port switching component and the second network port switching component.

[0062] refer to Figure 4 , Figure 5The microcontroller inside the redundant control module connects the control pin OUT1 to the input terminal EN_A of all network port switching components, and connects the control pin OUT2 to the input terminal IN_A of all network port switching components. For example, the microcontroller uses two GPIOs as output high and low level signals to control two sets of network port switching components, so as to achieve synchronous and consistent control of all network port switching components.

[0063] The analog switch chip in this embodiment of the invention provides three working modes. If its EN is invalid, the switch is open. If EN is valid, the IN controls the 2-to-1 connection mode of the switch. Furthermore, each network port switching component provides three working modes: only the first master station module accesses the network, only the second master station module accesses the network, and no master station module accesses the network. Refer to Table 2, which is the control logic table of the redundant control module.

[0064] Table 2 Control Logic Table for Redundancy Control Module

[0065]

[0066] In one embodiment, the microcontroller further includes an external interface for receiving or transmitting external signals.

[0067] refer to Figure 5 The DI / DO interface is used for external display, and can acquire external signals and send local signals to support the interaction between the master station device and other devices.

[0068] In one embodiment, the redundancy control module further includes a first bus interface connected to the microcontroller; the first master station module includes a second bus interface, and the second master station module includes a third bus interface; the first bus interface, the second bus interface, and the third bus interface are interconnected.

[0069] Redundancy control module: Monitors the working status of the first master station module and the second master station module through the first bus interface, the second bus interface and the third bus interface, and issues control signals according to the working status of the first master station module and the second master station module. The working status includes active status, standby status and abnormal status.

[0070] refer to Figure 5 Each of the two main station modules and the redundant control module is equipped with a bus interface, which forms a network to transmit data.

[0071] For example, the bus interface can be a UART interface, or an EIA-485 interface can be implemented through the extension of the UART interface. The physical layer uses the EIA-485 bus, and the transmission protocol uses Modbus-RTU.

[0072] The redundancy control module periodically monitors the working status of the two master station modules via the bus, and then sends the arbitrated active or standby status to the corresponding master station module via the bus. It also controls the connection between the active master station module and the network by controlling the level status of the control pins OUT1 and OUT2.

[0073] refer to Figure 3 , Figure 5 Both the first master station module and the second master station module have a synchronization interface, which enables data synchronization between the first master station module and the second master station module.

[0074] This invention provides an EtherCAT network control method, applied to an EtherCAT master station device, the method comprising:

[0075] When the EtherCAT master station device switches to the master station module connected to the EtherCAT network, the redundancy control module sends a command to the originally active master station module to switch to standby mode, and then disconnects the original active master station module from the EtherCAT network.

[0076] The redundancy control module sequentially reads the working status of the first master station module and the second master station module, sets the first ready master station module to the active state, first controls the network port of the master station module to connect to the EtherCAT network, and then sends an activation command to the master station module.

[0077] Figure 6 This is a specific example diagram of the EtherCAT network control method in an embodiment of the present invention, as shown below. Figure 6 The diagram illustrates the switching process for the EtherCAT master station. Figure 6 The M side is the side where the redundant control module connects to the two master station modules, including the first network port (M1), the second network port (M2), the third network port (M3), and the fourth network port (M4). The S side is the side where the redundant control module connects to the slave station, including the fifth network port (S1) and the sixth network port (S2). The first master station module is referred to as master station A, and the second master station module is referred to as master station B.

[0078] 1. During the operation of the EtherCAT network system, if the redundant control module detects a failure in the active master module through the bus, or receives a system switching instruction through the external interface and there is a standby master module, then it will start executing the system switching logic. Each master module in the EtherCAT network, whether active or standby, corresponds to a system. System switching is the switching of the active / standby master module.

[0079] 2. When the EtherCAT master station device undergoes a system switch, the redundant control module sends a command to the originally active master station module to switch to standby mode, and then disconnects the original active master station module from the network. At this time, no master station module is connected to the EtherCAT network.

[0080] 3. The redundant control module periodically reads the working status of the first master station module and the second master station module, sets the first ready master station module to the active state, first controls its network port to connect to the EtherCAT network, and then sends an activation command to the master station module.

[0081] The above steps enable the switching between the active and standby master station modules.

[0082] In one embodiment, the first master station module and the second master station module determine the current working status of the local machine; for example, each master station module periodically determines the current working status of the local machine.

[0083] The first master station module and the second master station module can send their current working status to the other master station module, so that each master station module can take on the task of forwarding messages between the other master station module and the redundancy control module. The messages include the working status of the master station module.

[0084] Each master station module is responsible for forwarding messages between the other master station module and the redundancy control module. It receives the working status information of the other master station module and forwards it to the redundancy control module, and receives the instructions of the redundancy control module and forwards them to the other master station module. This function allows any master station module to continue communicating with the redundancy control module after a bus interface failure, thus improving reliability.

[0085] Figure 7 This is another specific example diagram of the EtherCAT network control method in the embodiments of the present invention, as shown below. Figure 7 As shown, the task flow of the two master station modules of the EtherCAT master station device is illustrated, combined with... Figure 5 and Figure 7 The first master station module and the second master station module are redundant to each other, and operate as the A system and B system of the EtherCAT master station device, respectively. The first master station module and the second master station module realize data synchronization through a synchronization interface. The synchronization interface can be a gigabit Ethernet, and data is transmitted through the simple and fast UDP protocol.

[0086] Each master station module first determines its current operating status in each control cycle. If either the first or second master station module determines that its current operating status is active, it executes the control logic and sends data to the other master station module through the synchronization interface. If either the first or second master station module determines that its current operating status is standby, it does not execute the control logic, receives data sent by the other master station module, and overwrites the existing data on its own machine.

[0087] In summary, the embodiments of the present invention have the following beneficial effects:

[0088] 1) Through the design of dual master station modules and redundant control modules, the EtherCAT master station device has dual system redundancy function;

[0089] 2) The network port switching component of the redundant control module is realized by analog switch, which can ensure that only the active master station module is connected to the network, the standby master station module is physically isolated from the network, and the switching operation is fast. The MCU controls it to complete the switching automatically without manual intervention.

[0090] 3) Both EtherCAT interfaces of the activated master module are connected to the network, and the cable redundancy function is enabled;

[0091] 4) The master station modules achieve synchronous transmission of key data through the synchronization interface, so that the system can continue to run after switching, avoiding the shutdown or disturbance of the entire control system caused by the switching of master station A and B systems;

[0092] 5) One master station module takes over the message forwarding work between another master station module and the redundant control module, so that the master station module can continue to communicate with the redundant control module after the bus interface fails, thereby further improving reliability.

[0093] 6) Any master station module can work as an independent device in a single system mode, which can provide users with flexible choices and facilitate the upgrading of user solutions;

[0094] 7) In this embodiment of the invention, the EtherCAT master station device retains the EtherCAT master station cable redundancy while realizing the function of dual-system hot standby redundancy, without affecting the operating efficiency, achieving low cost, and greatly improving the reliability of the control system.

[0095] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described EtherCAT network control method.

[0096] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described EtherCAT network control method.

[0097] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described EtherCAT network control method.

[0098] The EtherCAT master station device in this embodiment of the invention includes a first master station module, a second master station module, and a redundancy control module. The first network port of the first master station module is connected to the first network port of the redundancy control module; the second network port of the first master station module is connected to the third network port of the redundancy control module; the first network port of the second master station module is connected to the second network port of the redundancy control module; the second network port of the second master station module is connected to the fourth network port of the redundancy control module; the first and second network ports of the redundancy control module are respectively connected to the first and second ports of the first network port switching component of the redundancy control module; the third and fourth network ports of the redundancy control module are respectively connected to the second network port of the redundancy control module. The first and second ports of the port switching component; the third port of the first port switching component is connected to the input port of the first slave station; the third port of the second port switching component is connected to the output port of the last slave station; the first and second port switching components are used to control the first master station module or the second master station module to access the EtherCAT network through an analog switch; the master station module accessing the EtherCAT network in the first and second master station modules is in an active state, and the other master station module is in a standby state. The active master station module is used to access the EtherCAT network to perform tasks, and the standby master station module is used to back up the data of the active master station module in real time. That is, in this embodiment of the EtherCAT master station device, both the first master station module and the second master station module have two network ports. The redundancy control module includes two network port switching components. The two network port switching components control the first master station module or the second master station module to access the EtherCAT network through an analog switch, so that the two network ports of the active master station module in the first master station module and the second master station module are respectively connected to the first slave station and the last slave station of the EtherCAT network, thereby realizing synchronous switching of the two network ports of the first master station module or the second master station module to access the EtherCAT network; wherein, the master station module that accesses the EtherCAT network to perform tasks is in an active state. In one state, the active master module serves as a backup, ensuring that only the active master module connects to the EtherCAT network. The backup master module is physically isolated from the EtherCAT network, allowing both network ports of the active master module to connect to the EtherCAT network, thus activating cable redundancy. Simultaneously, the dual master module design enables synchronous transmission of critical data. The backup master module can back up data from the active master module in real time. When the dual master modules switch over, the EtherCAT network can continue to operate normally, preventing downtime or disruption to the entire EtherCAT network control system due to master module malfunction. Therefore, the EtherCAT master device in this embodiment improves the security and stability of the EtherCAT network, meeting the requirements of demanding application scenarios.

[0099] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0100] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0101] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0102] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 Figure 1 The steps of the function specified in one or more boxes.

[0103] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An EtherCAT master station device, characterized by comprising: The application relates to a redundant control module for an EtherCAT network, comprising: a first master module, a second master module and a redundant control module; a first network port of the first master module is connected to a first network port of the redundant control module; a second network port of the first master module is connected to a third network port of the redundant control module; a first network port of the second master module is connected to a second network port of the redundant control module; a second network port of the second master module is connected to a fourth network port of the redundant control module; the first network port and the second network port of the redundant control module are respectively connected to a first port and a second port of a first network switch assembly of the redundant control module; the third network port and the fourth network port of the redundant control module are respectively connected to a first port and a second port of a second network switch assembly of the redundant control module; a third port of the first network switch assembly is connected to an input port of a first slave station; a third port of the second network switch assembly is connected to an output port of a last slave station; the first network switch assembly and the second network switch assembly are used for controlling the first master module or the second master module to access the EtherCAT network through analog switches; a master module of the first master module and the second master module that accesses the EtherCAT network is in an active state, and the other master module is in a standby state; the master module in the active state is used for accessing the EtherCAT network to execute tasks, and the master module in the standby state is used for backing up data of the master module in the active state in real time; wherein the redundant control module further comprises a microcontroller; the microcontroller is connected to an enable signal control end and a switch selection signal control end of the first network switch assembly and the second network switch assembly; the microcontroller is used for sending an invalid enable level or a valid enable level to the enable signal control end of the first network switch assembly and the second network switch assembly, and sending a high level or a low level to the switch selection signal control end of the first network switch assembly and the second network switch assembly; the redundant control module further comprises a first bus interface connected to the microcontroller; the first master module comprises a second bus interface, and the second master module comprises a third bus interface; the first bus interface, the second bus interface and the third bus interface are in communication; the redundant control module: through the first bus interface, the second bus interface and the third bus interface, the working state of the first master module and the second master module is monitored, a control signal is sent according to the working state of the first master module and the second master module, and the working state comprises an active state, a standby state and an abnormal state.

2. The EtherCAT master device of claim 1, wherein the first network switch assembly and / or the second network switch assembly comprise one or more analog switch chips, and each analog switch chip comprises a plurality of two-way low-resistance broadband analog switches that can be synchronously switched.

3. The EtherCAT master device of claim 1, wherein the first network switch assembly and the second network switch assembly each comprise an enable signal control end and a switch selection signal control end; when the enable signal control end of the first network switch assembly and the second network switch assembly receives an invalid enable level, the first network switch assembly and the second network switch assembly disconnect the first master module and the second master module from the EtherCAT network through the analog switches. When the enable signal control end of the first network port switching component and the second network port switching component receives an effective enable level, and the switch selection signal control end receives a high level, the first network port switching component and the second network port switching component control the first master module to access the EtherCAT network through the analog switch. When the enable signal control end of the first network port switching component and the second network port switching component receives an effective enable low level, and the switch selection signal control end receives a low level, the first network port switching component and the second network port switching component control the second master module to access the EtherCAT network through the analog switch.

4. The EtherCAT master station device of claim 3, wherein, When the enable signal control end of the first network port switching component and the second network port switching component receives an invalid enable level, the first network port switching component disconnects the first port, the second port and the third port through the analog switch, and the second network port switching component disconnects the first port, the second port and the third port through the analog switch; When the enable signal control end of the first network port switching component and the second network port switching component receives an effective enable level, and the switch selection signal control end receives a high level, the first network port switching component connects the first network port of the first master module and the first slave station through the analog switch, and the second network port switching component connects the second network port of the first master module and the last slave station through the analog switch; When the enable signal control end of the first network port switching component and the second network port switching component receives an effective enable level, and the switch selection signal control end receives a low level, the first network port switching component connects the first network port of the second master module and the first slave station through the analog switch, and the second network port switching component connects the second network port of the second master module and the last slave station through the analog switch.

5. The EtherCAT master station device of claim 4, wherein, When the enable signal control end of the first network port switching component and the second network port switching component receives an effective enable level, and the switch selection signal control end receives a high level, the first network port switching component connects the first port and the third port through the analog switch, and the second network port switching component connects the first port and the third port through the analog switch; When the enable signal control end of the first network port switching component and the second network port switching component receives an effective enable level, and the switch selection signal control end receives a low level, the first network port switching component connects the second port and the third port through the analog switch, and the second network port switching component connects the second port and the third port through the analog switch.

6. The EtherCAT master device of claim 1, wherein, The microcontroller further comprises an external interface for receiving external signals or transmitting signals externally.

7. The EtherCAT master device of claim 1, wherein The first master module and the second master module both have a synchronization interface, and the data of the first master module and the second master module are synchronized through the synchronization interface.

8. An EtherCAT network control method, characterized by, The EtherCAT master station device is applied to any one of claims 1 to 7, comprising: When the EtherCAT master device switches to access the master module of the EtherCAT network, the redundancy control module sends a command to the master module in the original active state to switch to the standby state, and then disconnects the original active master module from the EtherCAT network; The redundancy control module reads the working states of the first master module and the second master module in turn, sets the first master module ready for monitoring to the active state, controls the network port of the master module to access the EtherCAT network, and sends an activation instruction to the master module.

9. The EtherCAT network control method according to claim 8, wherein Comprise: The first master module and the second master module determine the current working state of the local machine; Any one of the first master module and the second master module sends the current working state of the local machine to the other master module, so that each master module undertakes the message forwarding work of the other master module and the redundancy control module, and the message includes the working state of the master module.

10. The EtherCAT network control method according to claim 8, wherein Comprise: When any one of the first master module and the second master module determines that the current working state of the local machine is the active state, data is sent to the other master module through the synchronization interface; When any one of the first master module and the second master module determines that the current working state is the standby state, the data sent by the other master module is received and the data is overwritten to the existing data of the local machine.

11. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the EtherCAT network control method of any one of claims 8 to 10.

12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to realize the EtherCAT network control method of any one of claims 8 to 10.

13. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to realize the EtherCAT network control method of any one of claims 8 to 10.