Method for cable redundancy and distributed clock synchronization based on EtherCAT, and its master device.
The EtherCAT control method and master device maintain network synchronization and redundancy by constructing topology data, identifying redundant paths, and adjusting device connections to ensure continuous operation and synchronized slave devices.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- DELTA ELECTRONICS INC(CN)
- Filing Date
- 2024-10-07
- Publication Date
- 2026-04-23
AI Technical Summary
EtherCAT networks face challenges in maintaining synchronized operation and cable redundancy when network disconnections occur, leading to clock deviation and system inoperability.
An EtherCAT control method and master device that supports both cable redundancy and distributed clock synchronization by constructing network topology data, identifying redundant paths, disconnecting and reconnecting devices as needed, and performing synchronized clock processes to maintain system operation.
Ensures the EtherCAT network remains operational with synchronized slave devices even after disconnections, reducing hardware costs and eliminating the need for repeated synchronization processes.
Smart Images

Figure 0007850780000001 
Figure 0007850780000002 
Figure 0007850780000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a control method for Ethernet automatic control technology (EtherCAT) and its master device, and more particularly to an EtherCAT control method and its master device that simultaneously supports cable redundancy and a distributed clock mechanism. [Background technology]
[0002] Ethernet for Control Automation Technology (EtherCAT) is an Ethernet-based fieldbus. Ethernet's full-duplex nature forms the basis of the EtherCAT transport protocol and is used to support diverse network topologies, including linear, tree, star, and ring structures; all combinations resulting from these structures are available as EtherCAT topologies. Due to these characteristics, EtherCAT is widely used in automation and industrial manufacturing fields.
[0003] EtherCAT technology was developed by Beckhoff GmbH in Germany, released in 2003, and officially adopted as the IEC standard IEC / PAS62407 in February 2005. It was integrated into the new generation standard IEC61158 for international fieldbus technology, and the International Organization for Standardization (ISO) also incorporated EtherCAT into its ISO15745 standard. Currently, the EtherCAT Technology Group (ETG) is promoting the support and dissemination of this technology.
[0004] EtherCAT employs a master-slave architecture, transmitting data or commands between a master device and slave devices via EtherCAT datagrams. The EtherCAT packet structure includes a datagram header, data, and a working counter. Depending on the packet header configuration, EtherCAT can send data packets (also called command packets) to specific slave devices, or broadcast data packets containing "broadcast read" and "broadcast write" instructions to all slave devices. A slave device identifies a received data packet as one that should be processed by it, and the working counter is incremented upon successful processing (reading and / or writing) of the data within that packet. From the working counter value within the data packet, a slave device can determine how many slave devices successfully processed the data packet. Ethernet is the carrier of EtherCAT data, and can transmit one or more EtherCATs at a time within an Ethernet data frame (frame) conforming to the Ethernet (IEEE 802.3) standard. For the sake of convenience in the following explanation, "transmission of data packets" refers to the operation of EtherCAT carrying and transmitting Ethernet data packets, and the detailed structure within the data packets that enables specific functions will not be explained here, as it conforms to the EtherCAT specifications.
[0005] In simple terms, the EtherCAT communication method involves a master device, which is the only node capable of actively transmitting data packets. These data packets travel through all slave devices in the network topology. When a data packet reaches a slave device, it reads the desired data, writes the data to be transmitted into the packet, and then transmits the data packet to the next slave device. If there are no further slave devices to which the data packet can be transmitted to the last slave device, the data packet is returned to the master device along its original path via the Ethernet full-duplex characteristic. While EtherCAT has various network topology configurations, the entire transmission path described above is equivalent to a closed loop, where the data packet is transmitted from the master device, completes a loop, and returns to the master device.
[0006] In the initial stages of EtherCAT operation, the master device needs to construct the overall network topology data to understand the basic data of each slave device and the interconnection status between them. Briefly, the network topology data construction process involves the master device broadcasting a query packet to all slave devices. Each slave device receives the query packet, and after the query packet is returned to the master device, it learns the number of slave devices in the current network topology from the activity counter value in the query packet. The master device then sequentially sends relevant data packets to each slave device to initialize it and prompt each slave device to report its relevant parameter data. Based on the parameter information of each slave device, the master device learns the overall connectivity architecture of the EtherCAT network topology, including information such as which connection ports each slave device has and which connection ports connect each slave device to the next slave device. Once EtherCAT enters the normal operation phase, if the master device detects a change in the network topology, for example, by discovering that the received activity count value differs from the expected value, the master device can repeat the above process to obtain the latest network topology data.
[0007] In EtherCAT networks, precise synchronization of each slave device is crucial for synchronization operations. Because each slave device in an EtherCAT network has a different local clock, each slave device corrects and synchronizes its local clock to generate a local system clock. EtherCAT then uses the IEEE 1588 standard distributed clock mechanism to synchronize the local system clocks of each slave device, achieving precise synchronization. For convenience of explanation, the operation of this mechanism is referred to as the distributed clock synchronization process, and is briefly described as follows: A slave device in the network topology is selected as the reference clock. The master device sends a specific "broadcast write" data packet to each slave device. When a slave device receives the data packet, it writes its local clock value at that time as a timestamp to the data packet. After the data packet is sent to the last slave device and returned, passing through each slave device again, each slave device writes its local clock value as a timestamp to the data packet once more. Based on the received timestamp data, the master device can calculate the difference between each slave device's local clock and a reference clock, called the system time offset and the system time delay between each slave device. The master device transmits these parameters to each slave device via data packets, and each slave device stores them for use when calculating or synchronizing its local system clock. For example, the system time delay is stored in the temporary storage device 0x928 of each device's EtherCAT Slave Controller (ESC). After EtherCAT enters the normal operation phase, the master device periodically sends synchronization packets to all slave devices to synchronize the local system clocks of all slave devices.The synchronization packet carries the current reference clock value, and each slave device synchronizes its own local system clock based on the most recently received reference clock value, its own local clock value at the time of reception, system time offset, and system time delay, so that each slave device's local system clock is always maintained within an error range of 100 ns or less.
[0008] Another feature of EtherCAT is the inclusion of a cable redundancy mechanism, which aims to improve system survivability by allowing healthy slave devices on the network to connect to the master device via redundant paths in the event of a device disconnection. The cable redundancy mechanism must be implemented in conjunction with the network topology. If the EtherCAT network topology is linear, a disconnection in one intermediate slave device (e.g., IP address error, cable damage, or loss of connectivity due to poor contact at the connection port) will render the downstream slave devices unusable in the system because they cannot connect to the master device. If the network topology is closed-loop, a disconnection in one intermediate slave device will result in two linear structures in the network topology. After the master device updates the network topology data, slave devices with connectivity capabilities can connect to the master device via one of these linear structures and be used in the system. However, if a slave device fails, it will become unusable in the system even if it has connectivity capabilities.
[0009] Figure 1 shows a conventional EtherCAT system including a closed loop. A conventional EtherCAT system consists of a master device 100 and multiple slave devices S1~S NThe master device 100 includes two Ethernet MAC devices (Ethernet media access control devices), including Ethernet MAC devices 102 and 103, which are connected to Ethernet connection ports 104 and 105, respectively. The Ethernet connection ports have a transmitting unit TX and a receiving unit RX. The two transmitting units TX of the master device 100 simultaneously transmit data packets of the same content, each transmitted via the network connection, and finally received by the corresponding receiving unit RX of the master device 100. After this, the master device 100 needs to integrate the data from the two Ethernet MAC devices 102 and 103. If the network is disconnected, for example, if slave devices S2 and S3 are disconnected, the original closed loop becomes two separate linear structures, each connected to the two Ethernet connection ports 104 and 105 of the master device 100, thus achieving cable redundancy by allowing each slave device to be connected to the master device 100, but the distributed clock mechanism cannot operate normally. Due to the change in network topology structure and data packet transmission path, slave devices S3~S N This prevents the transmission of data packets based on the reference clock data of slave device S1. Slave devices S3~S N If the clock does not match the reference clock, clock deviation problems will occur in multiple slave devices. Therefore, if a network disconnection occurs, cable redundancy mechanisms and distributed clock mechanisms will fail to synchronize multiple slave devices. [Overview of the project] [Problems that the invention aims to solve]
[0010] In view of this, the present invention provides an EtherCAT control method and its master device that enables the system to remain operational when a network disconnection occurs, by simultaneously supporting a cable redundancy mechanism and a distributed clock mechanism. [Means for solving the problem]
[0011] The present invention provides an EtherCAT-based cable redundancy and distributed clock synchronization method applicable to a master device connected to a branch device that is connected to other slave devices to form a closed loop, the control method comprising: (1) sending a query packet to instruct the branch device and N slave devices to report status information of multiple connection ports, and constructing network topology data based on the status information of the multiple connection ports; (2) proceeding to step (3) if it is determined that a redundant path exists according to the network topology data, and to step (4) otherwise; (3) sending a first command packet to instruct the branch device to disconnect the connection between the branch device and the Nth slave device; (4) performing a distributed clock synchronization process to calculate multiple system time delays in redundant mode; and (5) sending a second command packet to instruct the branch device to connect the Nth (N is a natural number greater than 1)th slave device.
[0012] Another aspect of the present invention further provides an EtherCAT master device including a connection port, an Ethernet MAC device, and a processor. The connection port is configured to connect to branch devices, and N slave devices connected in series are connected to the master device via the branch devices, the Ethernet MAC device is connected to the connection port, and the processor is connected to the Ethernet MAC device and configured to perform the aforementioned EtherCAT-based cable redundancy and distributed clock synchronization method.
[0013] Another aspect of the present invention further provides an EtherCAT master device including a processor configured to perform the aforementioned EtherCAT-based cable redundancy and distributed clock synchronization method. The EtherCAT master device may further be integrated into branch devices, bringing commercially integrated advantages to the master device hardware. [Effects of the Invention]
[0014] Compared to related technologies, the EtherCAT-based cable redundancy and distributed clock synchronization method and master equipment according to the present invention have the advantages that (1) when a network disconnection occurs, the cable redundancy mechanism can be executed to improve the survivability of the EtherCAT network connection and maintain the synchronized operation of multiple master equipment; and (2) after the disconnection is resolved, there is no need to execute the distributed clock synchronization process again, and the system time delay of each master equipment calculated in the initial network topology can be applied. [Brief explanation of the drawing]
[0015] [Figure 1] This diagram shows a schematic representation of a conventional EtherCAT system, including the cable redundancy mechanism. [Figure 2] A block diagram of an EtherCAT master device according to the first embodiment of the present invention is shown. [Figure 3A] A schematic diagram of an EtherCAT system including a cable redundancy mechanism according to the first embodiment of the present invention is shown. [Figure 3B] A schematic diagram of an EtherCAT system according to an embodiment of the present invention is shown. [Figure 3C] Figure 3A shows a schematic diagram illustrating the temporary change of the EtherCAT system to a linear network topology. [Figure 3D] Figure 3A shows a schematic diagram of the EtherCAT system that executes a distributed clock process when disconnected. [Figure 4] A flowchart of an EtherCAT master device according to the first embodiment of the present invention is shown. [Figure 5] A block diagram of an EtherCAT master device according to a second embodiment of the present invention is shown. [Modes for carrying out the invention]
[0016] The following describes exemplary embodiments of the present invention in more detail with reference to the accompanying drawings. These exemplary embodiments are realized in various forms, and these embodiments make the present invention more comprehensive and complete, and convey the concept of the exemplary embodiments to those skilled in the art. The drawings are not necessarily drawn to a fixed scale and are merely schematic diagrams of the present invention. In the drawings, the same reference numerals indicate the same or corresponding parts, and redundant explanations are omitted.
[0017] Referring to Figure 2, Figure 2 is a block diagram of an EtherCAT master device according to a first embodiment of the present invention. The master device 200 includes a processor 201, an Ethernet MAC 202, and an Ethernet connection port 204 including a transmitting unit TX and a receiving unit RX. The processor 201 is coupled to the Ethernet MAC 202 and connects the EtherCAT network to the outside via the Ethernet connection port 204, and operates the EtherCAT network according to the design of the present invention.
[0018] Referring to Figure 3A, Figure 3A is a schematic diagram of an EtherCAT system according to the first embodiment of the present invention. The EtherCAT system consists of a master device 200 and branch devices S A And multiple slave devices S1~S N and include. The master device 200 is, for example, a human machine interface (HMI) or a programmable logic controller (PLC), and the branch device S A and multiple slave devices S1~S Nis, for example, a variable frequency driver (VFD) or an alternating-current servo driver (ASD), among which the branch device S A and a plurality of slave devices S1 to S N has all the functions of the reference slave device. In terms of configuration, the branch device S A has a total of three connection ports, namely one input terminal and two output terminals. For example, the connection port P0 is the input terminal, and the connection ports P1 and P2 are the output terminals. Each slave device S1 to S N has two connection ports P0 and P1. The connection port P0 of the branch device S A is connected to the connection port 204 of the upstream master device 200. The connection port P1 of the branch device S A is connected to the connection port P0 of the downstream slave device S1. The connection port P1 of the slave device S1 is connected to the connection port P0 of the downstream slave device S2. Similarly, the connection port P1 of the slave device S N-1 is connected to the connection port P0 of the downstream slave device S N The connection port P1 of the last slave device S N is connected to the connection port P2 of the branch device S A The branch device S A forms a closed loop with the slave devices S1 to S N and the cable redundancy mechanism can act on this closed loop. From another perspective, the closed loop can be regarded as a branch in the system network topology, and this branch is connected to the master device 200 of the system through the branch device S A According to the first embodiment of the present invention, since the master device 200 only requires one Ethernet MAC202 in hardware to implement the cable redundancy mechanism, compared with the case of using two Ethernet MACs to implement the cable redundancy mechanism as in the conventional method shown in FIG. 1, the present invention can reduce the hardware cost.
[0019] Note that Figure 3A is one example of an application using the EtherCAT master device 200 according to the first embodiment of the present invention, and in a different application example, branch device S A For example, a slave device has three or more connection ports, but actually only uses three connection ports, and slave devices S1~S N For example, a slave device has two or more connection ports, but actually only uses two connection ports. For example, an existing reference slave device has four connection ports, and branch device S A The fourth connection port can connect to other branches in the system network topology, and slave devices S1~S N The third and fourth connection ports can connect to other branches in the system network topology, enabling all devices to be utilized to their fullest potential within the system.
[0020] In Figure 3A, slave devices S1~S N The formation of a closed loop is an example to facilitate explanation, and the present invention can be further applied to other network topologies to suit actual applications. Specifically, in industrial automation applications, products manufactured on a production line must undergo complex processing steps, and since one processing step may be performed by one or more slave devices, a suitable network topology is required to accommodate the processing steps. In one embodiment, as shown in Figure 3B, the EtherCAT system consists of one master device 200 and multiple branch devices S A S A1 S A2 , and multiple slave devices S B1 ~S B4 S C1 ~S CN S D1 ~S DM It includes N and M, where N and M are natural numbers greater than 1. The configuration consists of a master device 200 and branch devices S. A Between them, there is at least one slave device S B1 These are connected in series, with the master device 200 and branch device S ABetween them, there is at least one branch device S A1 These are connected in series, and branch equipment S A2 and at least one branch equipment S A1 Between them, there is at least one slave device S B2 ~S B4 These are connected in series to form a combination of multiple linear topologies. Branch equipment S A This involves multiple slave devices S C1 ~S CN It is connected in series with branch equipment S A2 This involves multiple slave devices S D1 ~S DM They are connected in series, forming multiple closed-loop topology combinations. In summary, the EtherCAT system in Figure 3B includes multiple linear topologies and multiple closed-loop topologies and combinations to suit practical applications.
[0021] Referring to Figure 4, Figure 4 is a flowchart of an EtherCAT master device according to the first embodiment of the present invention. For the sake of explanation, using the application scenario in Figure 3A as an example, the EtherCAT master device 200 is configured to execute the flowchart in Figure 4. The processor 201 of the EtherCAT master device 200 in the first embodiment of the present invention is configured to execute the following steps.
[0022] Step S41: Construct network topology data. According to the EtherCAT specification, during the system initialization phase, the master device 200 scans the slave devices in the network to construct network topology data. Specifically, the master device 200 broadcasts query packets to the slave devices in the network (e.g., branch devices S A Multiple slave devices S1~S N The master device 200 then instructs the branch devices S, etc. to report their connection port status information. Based on the collected connection port status information, the master device 200 and branch devices S A Multiple slave devices S1~S NThe network topology data that establishes the connection relationship between branch equipment S A Multiple slave devices S1~S N Which connection port does it have, branch equipment S A Multiple slave devices S1~S N This includes status information such as which connection port is used to connect to the next slave device.
[0023] Step S42: Determine whether redundant paths exist according to the network topology data. If so, proceed to step S43; otherwise, proceed to step S44. The master device 200 determines the presence or absence of redundant paths by checking whether the network topology data has a closed loop. Using the application scenario in Figure 3A as an example, the master device 200 uses the network topology data to determine the presence or absence of the last slave device S N Connection port P1 and branch device S A When connected to connection port P2, it can be determined that the network topology has redundant paths. In contrast, the last slave device S N It has only one connection port P0 that is currently connected, and the last slave device S N If connection port P1 is not connected to any slave device, this network topology data does not have a closed loop, and therefore it is determined that there are no redundant paths in the current network topology data. Although master device 200 can implement cable redundancy communication protocols, it does not need to implement the cable redundancy mechanism if there are no redundant paths in the network topology data.
[0024] Step S43: Branch Equipment S A and slave device S N The connection between them is disconnected, temporarily changing the closed loop to a linear network topology. As shown in Figure 3C, in step S43, the master device 200 sends a command packet to the last slave device S N Send to slave device SN The step of instructing the connection port P1 to be closed, and the master device 200 sends a command packet to branch device S A Send to branch equipment S A The step includes instructing the branch device S to close connection port P2. A and slave device S N Connecting, or branch equipment S A and slave device S N Disconnecting the connection between them results in a different equivalent network topology, but the actual data packet path is different, "Master device 200, Branch device S A , slave device S1, ..., slave device S N The same applies. Therefore, the system time delay calculated for a linear network topology still applies to a closed loop.
[0025] Step S44: Execute the distributed clock synchronization process. As shown in Figure 3C, the master device 200 controls the first slave device (e.g., branch device S). A The local clock of the device is read as the reference clock, and based on the reference clock, multiple system time delays are calculated, and the system time delay between the connection port P0 of the two devices is calculated as follows: A1 , t 12 , ..., t (N-1)N Specifically, the time difference between the local clock of the master device 200 and the reference clock is the system time offset, and after subtracting the system time offset, the packets transmitted by the master device 200 are sent to branch device S. A The time it takes to reach connection port P0 is t A The packet is sent to multiple slave devices S1~S N The time it takes to sequentially reach connection port P0 is t1~t N Therefore, branch equipment S A The system time delay between and slave device S1 is t A1 Therefore, the system time delay between slave devices S1 and S2 is t 12and so on. After the master device 200 completes the distributed clock synchronization process, the parameters obtained include the system reference time (i.e., the reference clock) and a plurality of system time delays t A1 , t 12 , …, t (N-1)N . For details of the distributed clock synchronization process, refer to the EtherCAT specification, so detailed description is omitted here. The master device 200 transmits the reference clock and the plurality of system time delays t A1 , t 12 , …, t (N-1)N to the branch device S A , a plurality of slave devices S1~S N , so that the branch device S A , a plurality of slave devices S1~S N are synchronized.
[0026] Step S45: According to the network topology data, determine whether there is a redundant path. If so, proceed to step S46; if not, proceed to step S47.
[0027] Step S46: Connect the branch device S A and the slave device S N . Since the distributed clock synchronization process is completed in step S44, the master device 200 sends a command packet to the last slave device S N to instruct to open the connection port P1 of the slave device S N , and the master device 200 sends a command packet to the branch device S A to instruct to open the connection port P2 of the branch device S A , thereby restoring the connection state between the branch device S A and the last slave device S N , returning the network topology to a closed loop, and proceed to step S47.
[0028] Step S47: Periodically transmit packets to synchronize the local system time. The master device 200 transmits the current reference clock to all slave devices to synchronize the local system clock. The contents of this step have been described in previous technical documentation and will not be repeated here.
[0029] Step S48: Check network topology data. For example, as shown in Figure 3D, if the master device 200 detects that the connection port P1 of slave device S2 has changed from its original connected state to an unconnected state, and if this indicates that a disconnection has occurred between slave device S2 and the next slave device S3, it returns to step S44 to perform the distributed clock synchronization process at the time of disconnection. The master device 200 checks the branch device S A Using this as the reference clock, after connection port 203 transmits a data packet, the first stage is performed by branch equipment S A The RX connection port P0 is reached, and the second stage is branch equipment S A The third stage reaches the TX connection port P1 of slave device S1, the fourth stage reaches the RX connection port P0 of slave device S2, the fifth stage goes from the TX connection port P1 of slave device S2 to the RX connection port P0 of slave device S1, and the sixth stage goes to branch device S A The RX connection port P1 is reached, and the 7th stage is branch equipment S A RX connection port P1 to branch equipment S A The TX connection port P2 is forwarded, and the 8th stage is slave device S N The RX connection port P1 is reached, and the 9th stage is the slave device S N The TX connection port P0 of the slave device S3 reaches the RX connection port P1, and the 10th step is slave device S N From the TX connection port P1, slave device S N The RX connection port P0 is reached, and the 11th stage is branch equipment S A The RX connection port P2 is reached, and the 12th stage is branch equipment S A The signal is routed from RX connection port P2 to TX connection port P0, and the final 13th stage is branch equipment SA The connection returns from the TX connection port P0 to the RX connection port 204 of the master device 200. Note that in the 7th stage, branch device S A In the event of a disconnection, data packets are routed from slave device S1 to slave device S as a redundant path. N It is configured to forward to [the specified location]. Although the disconnection changes the network topology from the original closed loop to two linear structures, the aforementioned data packet transmission path is logically equivalent to a single closed loop, and data packets carrying the reference clock transmitted from master device 200 can still be received by each slave device, so the EtherCAT distributed clock synchronization process can still be applied.
[0030] If the master device 200 determines that the network topology check is normal, it returns to step S47 and continues its routine work. If the master device 200 determines that the connection port P1 of the slave device S2 has recovered from the disconnected state to the original connected state, it indicates that the disconnection has been resolved and proceeds to step S49.
[0031] Step S49: Use the system time delay calculated in cable redundancy mode. If the network disconnection is restored and the original network topology is restored, use the multiple system time delays of the initial network topology recorded in step S44 without running the distributed clock synchronization process again. A1 , t 12 , ..., t (N-1)N It can be re-assigned. Therefore, as long as the current network topology and the initial network topology are identical, the system time delay should also be identical. After step S49 is completed, return to step S47 and continue with the regular routine work.
[0032] Referring to Figure 5, which is a block diagram of an EtherCAT master device according to a second embodiment of the present invention, the master device 500 includes a processor 501, an Ethernet MAC 502, an Ethernet connection port 503, and a branch unit 506. The branch unit 506 is a slave device having a total of three connection ports P0, P1, and P2, with one input terminal and two output terminals. Since the branch unit 506 is integrated into the master device 500, connection port P0 and Ethernet connection port 503 do not need to have physical connection port interface hardware. The TX / RX of connection port P0 is connected to the RX / TX of Ethernet connection port 503, and connection ports P1 and P2 become the two external connection port interfaces of the master device 500. The processor 501 is coupled to the Ethernet MAC 502 and externally connected to the EtherCAT network via connection ports P1 and P2 of the branch unit 506, operating the EtherCAT network according to the design of the present invention, and the operation process is the same as in Figure 4 and will not be repeated here. According to a second embodiment of the present invention, branch equipment S A After incorporating into the master device 500, the master device 500 can also function as a redundant path for forwarding packets, thereby extending the functionality of the master device 500. In one embodiment, when the master device 500 is applied to the EtherCAT system shown in Figure 3B, the master device 500 and multiple slave devices S are configured to suit the actual application. D1 ~S DM The first slave device S D1 Between at least two branch equipment S A1 S A2 They are connected in series, and at least two of the two branch devices S A1 S A2 Between at least one slave device S B2 ~S B4 They are connected in series.
[0033] The above are merely specific embodiments of the present invention, and the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that a person skilled in the art could easily conceive within the technical scope of the present invention are included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention is based on the scope of protection of the claims described above. [Explanation of Symbols]
[0034] 100 Master devices 102, 103 Ethernet MAC devices 104, 105 Ethernet connection ports 200 Master devices 201 Processor 202 Ethernet MAC 204 Ethernet connection ports 500 Master Devices 501 Processor 502 Ethernet MAC 503 Ethernet connection port 506 Branch Unit P0, P1, P2 connection ports RX Receiver Unit S1~S N S B1 ~S B4 S C1 ~S CN S D1 ~S DM Slave device S41~S49 Step S A S A1 S A2 Branch equipment t1~t N Time it took for the packet to reach the slave device t A1 , t 12 ~t (N-1)N System time delay TX Transmitter Unit
Claims
1. A cable redundancy and distributed clock synchronization method based on Ethernet, used for a master device connected to N slave devices connected in series via branch devices, Step (1) sends an inquiry packet to instruct the branch device and the N slave devices to report status information of multiple connection ports, and constructs network topology data based on the status information of the multiple connection ports. Step (2) proceeds to step (3) if it is determined that a redundant path exists according to the network topology data, and to step (4) otherwise. Step (3) Sending a first command packet to instruct the branch device to disconnect the connection between the branch device and the Nth slave device of the N slave devices, Step (4) is to perform a distributed clock synchronization process to calculate multiple system time delays in redundant mode, Step (5) proceeds to step (6) if it is determined that the redundant path exists according to the network topology data, and to step (7) otherwise. Step (6) involves sending a second command packet to instruct the branch device to connect with the Nth slave device, Step (7) to periodically send packets to the branch device and the N slave devices to synchronize the local system times of the branch device and the N slave devices, If the network topology data indicates that it is normal, step (8) is performed again, If the network topology data indicates that a disconnection has occurred, step (4) is performed again to calculate multiple system time delays in disconnection mode (step (9)). If the network topology data indicates that the disconnection has been resolved, step (10) is to repeat step (7) using the multiple system time delays in the redundant mode. N is a natural number greater than 1. method.
2. Each of the N slave devices is The first connection port is connected to the upstream device, Including a second connection port connected to a downstream device, The aforementioned branch equipment is A first connection port connected to the master device, A second connection port connected to the first connection port of the first slave device among the N slave devices, A third connection port connected to the second connection port of the Nth slave device, The method according to claim 1.
3. Step (2) above is, The step of determining that the redundant path exists when the network topology data indicates that the third connection port of the branch device is connected to the second connection port of the Nth slave device, The method according to claim 2.
4. Step (3) above is, The steps include sending the first command packet to the Nth slave device to instruct it to close the second connection port of the Nth slave device, The step of sending the first command packet to the branch device to instruct it to close the third connection port of the branch device, The method according to claim 2.
5. The aforementioned step (6) is, The steps include sending the second command packet to the Nth slave device to instruct it to open the second connection port of the Nth slave device, The step of sending the second command packet to the branch device to instruct it to open the third connection port of the branch device, The method according to claim 2.
6. If step (4) is performed again after step (9), the branch device is configured to forward data packets from the first slave device to the Nth slave device among the N slave devices as a redundant path in case of disconnection. The method according to claim 1.
7. A master device applicable to Ethernet, A connection port configured to connect to a branch device, wherein N slave devices connected in series are connected to the master device via the branch device, The Ethernet MAC device (Ethernet media access control device) connected to the aforementioned connection port, A processor connected to the Ethernet MAC device and configured to perform the EthernetCAT-based cable redundancy and distributed clock synchronization method described in claim 1, is included. Master device applicable to EtherCAT.
8. At least one slave device is connected in series between the master device and the branch device. The master device according to claim 7.
9. At least one branch device is connected in series between the master device and the branch device, and at least one slave device is connected in series between the branch device and the at least one branch device. The master device according to claim 8.
10. A master device applicable to Ethernet, Processor and An Ethernet MAC device connected to the aforementioned processor, A branch unit comprising: a first connection port connected to the Ethernet MAC device; a second connection port connected to the first slave device among N slave devices connected in series; and a third connection port connected to the Nth slave device among the N slave devices, The aforementioned processor, Step (1) sends an inquiry packet to instruct the branch unit and the N slave devices to report status information of multiple connection ports, and constructs network topology data based on the status information of the multiple connection ports. Step (2) proceeds to step (3) if it is determined that a redundant path exists according to the network topology data, and to step (4) otherwise. Step (3) involves sending a first command packet to instruct the branch unit to disconnect the connection between the branch unit and the Nth slave device, Step (4) is to perform a distributed clock synchronization process to calculate multiple system time delays in redundant mode, Step (5) proceeds to step (6) if it is determined that the redundant path exists according to the network topology data, and to step (7) otherwise. Step (6) involves sending a second command packet to instruct the branch unit to connect with the Nth slave device, Step (7) to periodically send packets to the branch unit and the N slave devices to synchronize the multiple local system times of the branch unit and the N slave devices, If the network topology data indicates that it is normal, step (8) is performed again, If the network topology data indicates that a disconnection has occurred, step (4) is performed again to calculate multiple system time delays in disconnection mode (step (9)). If the network topology data indicates that the disconnection has been resolved, the system is configured to perform step (10) of repeating step (7) using the multiple system time delays in the redundant mode. N is a natural number greater than 1. Master device.
11. Each of the N slave devices is The first connection port is connected to the upstream device, Including a second connection port connected to a downstream device, The master device according to claim 10.
12. Step (2) above is, The step of determining that the redundant path exists when the network topology data indicates that the third connection port of the branch unit is connected to the second connection port of the Nth slave device, The master device according to claim 11.
13. Step (3) above is, The steps include sending the first command packet to the Nth slave device to instruct it to close the second connection port of the Nth slave device, The step of sending the first command packet to the branch unit instructing it to close the third connection port of the branch unit, The master device according to claim 11.
14. The aforementioned step (6) is, The steps include sending the second command packet to the Nth slave device to instruct it to open the second connection port of the Nth slave device, The step of sending the second command packet to the branch unit to instruct it to open the third connection port of the branch unit, The master device according to claim 11.
15. If step (4) is performed again after step (9), the branch unit is configured to forward data packets from the first slave device to the Nth slave device as a redundant path in case of disconnection. The master device according to claim 10.
16. At least two branch devices are connected in series between the master device and the first slave device, and at least one slave device is connected in series between the at least two branch devices. The master device according to claim 10.
Citation Information
Patent Citations
Connection of multiple slave units to a master control unit in a distributed control system
JP2017514378A
Network management device, management method, management program, and recording medium
JP2020161999A
Real-time distributed network module, real-time distributed network and method therefor
US20140233372A1