METHOD FOR CABLE REDUNDANCY AND DISTRIBUTED CLOCK SYNCHRONIZATION BASED ON EtherCAT AND MASTER DEVICE THEREOF
The EtherCAT control method addresses the challenge of maintaining system operability and synchronization during network disconnections by integrating cable redundancy and distributed clock synchronization, ensuring efficient and reliable network performance.
Patent Information
- Application Number
- JP2024176096
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-08
- Filing Date
- 2024-10-07
- Publication Date
- 2025-06-19
- Estimated Expiration
- 2044-10-07
AI Technical Summary
Existing EtherCAT systems face challenges in maintaining operability when a network connection is interrupted, as the cable redundancy mechanism and distributed clock mechanism often fail to function synchronously.
The proposed method involves a control method for EtherCAT that supports both cable redundancy and distributed clock synchronization. This is achieved by sending inquiry packets to determine connection port statuses, constructing network topology data, and executing distributed clock synchronization processes while maintaining redundant paths.
This solution enables the EtherCAT system to maintain operability and synchronization even during network disconnections, improving system survivability and reducing the need for repeated clock synchronization processes.
Smart Images

Figure 2025092412000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a control method of Ethernet Automatic Control Technology (EtherCAT) and its master device, and particularly to an EtherCAT control method that simultaneously supports cable redundancy and a distributed clock mechanism and its master device.
Background Art
[0002] Ethernet Automatic Control Technology (Ethernet for Control Automation Technology, EtherCAT) is a fieldbus based on Ethernet. The full-duplex characteristic of Ethernet constitutes the basis of the EtherCAT transport protocol and is used to support various network topology structures including structures such as linear, tree, star, and ring types, and all combinations resulting from these structures can be utilized as the topology structure of EtherCAT. Since EtherCAT has the above characteristics, it is widely used in the fields of automation and industrial manufacturing.
[0003] EtherCAT technology was developed by Beckhoff in Germany, put on the market in 2003, officially became the IEC standard - IEC / PAS62407 in February 2005, was integrated into the new generation standard IEC61158 of international fieldbus technology, and the International Organization for Standardization (ISO) also incorporated EtherCAT into the ISO15745 standard. Currently, the EtherCAT Technology Group (ETG) promotes the support and popularization of this technology.
[0004] EtherCAT adopts a master-slave architecture and transmits data or commands between a master device and slave devices via EtherCAT datagrams. The packet structure of EtherCAT includes a datagram header, data, and a working counter. By setting the packet header, EtherCAT can send a data packet (or a command packet) to a specific slave device or send broadcast data packets including "broadcast read" and "broadcast write" to all slave devices. A slave device identifies that the received data packet is a packet to be processed by this slave device, and when the processing (reading or / and writing) of the data in the data packet is successful, the value of the working counter is incremented. A slave device can know from the working count value in the data packet how many slave devices have successfully processed the data packet. Ethernet is the carrier of EtherCAT data, and one or more EtherCATs can be put into an Ethernet data frame compliant with the Ethernet (IEEE 802.3) standard and transmitted at a time. For the convenience of the following description, "transmission of data packets" means the operation of EtherCAT carrying and transmitting Ethernet data packets, and the detailed structure within the data packet that can realize a specific function is not described here as it complies with the specifications of EtherCAT.
[0005] To briefly explain the EtherCAT communication method, the master device is the only node that can actively transmit data packets. These data packets pass through all slave devices within the network topology. When a data packet reaches a slave device, the slave device reads the desired data, writes the data to be transmitted into the data packet, and then transmits the data packet to the next slave device. If there is no next slave device to which the data packet can be transmitted, the data packet is returned to the master device along the original path through the full-duplex Ethernet feature. Although EtherCAT has various network topology forms, the entire above-mentioned transmission path is equivalent to a closed loop, and the data packet is transmitted from the master device, makes a full circle, and returns to the master device.
[0006] At the initial stage of EtherCAT operation, the master device needs to construct the overall network topology data in order to understand the basic data of each slave device and the interconnection status between each slave. To briefly explain the process of constructing the network topology data, the master device broadcasts query packets to all slave devices. After each slave device receives the query packet and the query packet returns to the master device, the slave device can know the number of slave devices in the current network topology from the operation counter value in the query packet. Then, the master device sequentially transmits related data packets to each slave device to initialize each slave device and makes each slave device report the related parameter data of that slave device. Based on the parameter information of each slave device, the master device knows the connection architecture of the entire EhterCAT network topology, including which connection ports each slave device has and through which connection ports each slave device is connected to the next slave device. When EtherCAT enters the normal operation stage, for example, if the master device detects a change in the network topology, such as discovering that the received operation counter value is different from the expected value, the master device can execute the above-mentioned process again to obtain the latest network topology data.
[0007] In an EtherCAT network, accurate synchronization of each slave device is crucial in the synchronization operation. Since the local clocks of each slave device within the EtherCAT network are different, each slave device generates a local system clock after correcting and synchronizing its local clock. EtherCAT uses the distributed clock mechanism of the IEEE 1588 standard to align the local system clocks of each slave device to achieve an accurate synchronization effect. For the sake of convenience in explanation, the operation procedure of this mechanism is referred to as the distributed clock synchronization process and is briefly described as follows. Select a slave device in the network topology 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 the local clock value of the slave device at that time as a timestamp into the data packet. After the data packet is sent to the last slave device and then returned and passes through each slave device again, each slave device writes the local clock value into the data packet again as a timestamp. Based on the received timestamp data, the master device can calculate the differences between the local clocks of each slave device and the reference clock, which are 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 the data packet, and each slave device stores them for use when calculating or synchronizing the local system clock. For example, the system time delay is stored in the temporary storage device 0x928 of the EtherCAT Slave Controller (ESC) of each device. After EtherCAT enters the normal operation stage, the master device periodically sends synchronization packets to all slave devices to synchronize the local system clocks of all slave devices.Synchronous packets carry the current reference clock value, and each slave device synchronizes its local system clock based on the most recently received reference clock value, its own local clock value at the time of reception, the system time offset, and the system time delay so that the local system clock of each slave device is always maintained within an error range of 100 ns or less.
[0008] Another feature of EtherCAT is that it includes a cable redundancy mechanism, the purpose of which is to improve the survivability of the system by connecting normal slave devices on the network to the master device through redundant paths in the event of a device disconnection. The cable redundancy mechanism needs to be implemented in combination with the network topology. When the EtherCAT network topology is linear, if a disconnection occurs in one of the intermediate slave devices (for example, due to an IP address error, cable breakage, or loss of connection ability due to poor contact of the connection port), the downstream slave devices cannot be connected to the master device, so they cannot be used in the system. When the network topology is a closed loop, if a disconnection occurs in one of the intermediate slave devices, the network topology becomes two linear structures. After the master device updates the network topology data, the slave devices with connection ability can be connected to the master device through one of the linear structures and can be used in the system. However, if a failure occurs in a slave device, it cannot be used in the system even if it has a connection function.
[0009] Figure 1 is a conventional EtherCAT system including a closed loop. The conventional EtherCAT system includes a master device 100 and a plurality of slave devices S1 to S NIt includes. The master device 100 includes two Ethernet MAC devices (Ethernet media access control device) including Ethernet MAC devices 102 and 103 respectively connected to Ethernet connection ports 104 and 105. 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 through a network connection, and finally received by the corresponding receiving unit RX of the master device 100. Then, the master device 100 needs to integrate the data of the two Ethernet MAC devices 102 and 103. When the network is disconnected, for example, when the slave devices S2 and S3 are disconnected, the original closed loop becomes two separated linear structures, each connected to the two Ethernet connection ports 104 and 105 of the master device 100. Thus, the cable redundancy effect of being able to connect each slave device to the master device 100 can be achieved, but the distributed clock mechanism cannot operate normally. Due to the changes in the network topology structure and the data packet transmission path, N it becomes impossible to transmit data packets based on the reference clock data of the slave device S1. Slave devices S3~S N If it does not match the reference clock, the problem of clock deviation occurs in multiple slave devices. Therefore, when a network disconnection occurs, the cable redundancy mechanism and the distributed clock mechanism have the problem that multiple slave devices cannot be synchronized.
Summary of the Invention
Problems to be Solved by the Invention
[0010] In view of this, the present invention provides an EtherCAT control method and its master device that can support a cable redundancy mechanism and a distributed clock mechanism at the same time, enabling the system to maintain an operable state when a network connection is interrupted.
Means for Solving the Problems
[0011] The present invention provides a method for cable redundancy and distributed clock synchronization based on EtherCAT applied to a master device connected to a branch device that forms a closed loop by connecting to other slave devices. The control method includes: sending an inquiry packet to instruct the branch device and N slave devices to report the status information of multiple connection ports; constructing network topology data based on the status information of the multiple connection ports (step (1)); proceeding to step (3) if a redundant path is determined to exist according to the network topology data, or proceeding to step (4) otherwise (step (2)); sending a first command packet to instruct to disconnect the connection state between the branch device and the Nth slave device (step (3)); executing a distributed clock synchronization process to calculate multiple system time delays in the redundant mode (step (4)); and sending a second command packet to instruct to connect the branch device and the Nth (where N is a natural number greater than 1) slave device (step (5)).
[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 a branch device, and N slave devices connected in series are connected to the master device via the branch device. The Ethernet MAC device is connected to the connection port, and the processor is connected to the Ethernet MAC device and is configured to execute the method for cable redundancy and distributed clock synchronization based on EtherCAT described above.
[0013] Another aspect of the present invention further provides an EtherCAT master device including a processor configured to execute the aforementioned EtherCAT-based cable redundancy and distributed clock synchronization method. The EtherCAT master device may be further incorporated into a branch device, bringing commercially integrated advantages to the hardware of the master device.
Advantages of the Invention
[0014] Compared with related technologies, the EtherCAT-based cable redundancy and distributed clock synchronization method and its master device according to the present invention have the following advantages: (1) When a disconnection occurs in the network, a cable redundancy mechanism can be executed to improve the survivability of the EtherCAT network connection and maintain the synchronous operation of multiple master devices; (2) After the disconnection is eliminated, there is no need to execute the distributed clock synchronization process again, and the system time delay of each master device calculated in the initial network topology can be applied.
Brief Description of the Drawings
[0015]
Figure 1
Figure 2
Figure 3A
Figure 3B
Figure 3C
Figure 3D
Figure 4
Figure 5
Embodiments for Carrying out the Invention
[0016] Hereinafter, exemplary embodiments of the present invention will be described in more detail with reference to the accompanying drawings. The exemplary embodiments can be embodied in various forms, and by these embodiments, the present invention becomes more comprehensive and complete, and conveys the concept of the exemplary embodiments to those skilled in the art. The drawings are not necessarily drawn to scale and are merely schematic diagrams of the present invention. In the figures, the same reference numerals indicate the same or corresponding parts, and duplicate descriptions are omitted.
[0017] Referring to FIG. 2, FIG. 2 is a block diagram of the EtherCAT master device according to the 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, externally connects to the EtherCAT network via the Ethernet connection port 204, and operates the EtherCAT network according to the design of the present invention.
[0018] Referring to FIG. 3A, FIG. 3A is a schematic diagram of the EtherCAT system according to the first embodiment of the present invention. The EtherCAT system includes a master device 200, a branch device S A and a plurality of slave devices S1 to S N and. 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 the plurality of slave devices S1 to 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, and 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 FIG. 3A shows one of the application examples using the EtherCAT master device 200 according to the first embodiment of the present invention. In different application examples, the branch device S A is, for example, a slave device that has three or more connection ports but actually uses only three connection ports. Slave devices S1 to S N are, for example, slave devices that have two or more connection ports but actually use only two connection ports. For example, an existing standard slave device has four connection ports, and the fourth connection port of the branch device S A can be connected to another branch in the system network topology, and the third and fourth connection ports of the slave devices S1 to S N can be connected to other branches in the system network topology, enabling all devices to be maximally utilized in the system.
[0020] In FIG. 3A, the fact that the slave devices S1 to S N form a closed loop is an example for ease of explanation, and the present invention is further applied to other network topologies to conform to actual applications. Specifically, in industrial automation applications, the products manufactured on the production line need to execute complex processing steps, and one processing step can be executed by one or more slave devices, so an appropriate network topology for conforming to the processing steps is required. In one embodiment, as shown in FIG. 3B, the EtherCAT system includes one master device 200, a plurality of branch devices S A , S A1 , S A2 , and a plurality of slave devices S B1 to S B4 , S C1 to S CN , S D1 to S DM , where N and M are natural numbers greater than 1. In terms of configuration, at least one slave device S A is connected in series between the master device 200 and the branch device S B1 , and between the master device 200 and the branch device S AThere is at least one branch device S connected in series therebetween A1 is connected in series, and between the branch device S A2 and at least one branch device S A1 there is at least one slave device S B2 ~S B4 is connected in series to form a combination of multiple linear topologies. The branch device S A is connected in series to a plurality of slave devices S C1 ~S CN and the branch device S A2 is connected in series to a plurality of slave devices S D1 ~S DM is connected in series to form a combination of multiple closed-loop topologies. In summary, the EtherCAT system in Fig. 3B includes a combination of multiple linear topologies and multiple closed-loop topologies to conform to actual applications.
[0021] Referring to Fig. 4, Fig. 4 is a flowchart of an EtherCAT master device according to the first embodiment of the present invention. For convenience of explanation, taking the application scenario in Fig. 3A as an example, the EtherCAT master device 200 is configured to execute the flowchart in Fig. 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, at the system initialization stage, the master device 200 scans the slave devices in the network to construct network topology data. Specifically, the master device 200 broadcasts a query packet to instruct the slave devices in the network (for example, the branch device S A , a plurality of slave devices S1~S N , etc.) to report their connection port status information. Then, based on the collected connection port status information, the master device 200 determines the connection relationship between the master device 200 and the branch device S A , a plurality of slave devices S1~S NThe network topology data for constructing the connection relationship with [device name] is the branch device S A , a plurality of slave devices S1 to S N indicating which connection ports they have, the branch device S A , a plurality of slave devices S1 to S N including status information such as which connection port is used to connect to the next slave device between them.
[0023] Step S42: According to the network topology data, determine whether there is a redundant path. If so, proceed to step S43; if not, proceed to step S44. The master device 200 determines the presence or absence of a redundant path by checking whether the network topology data has a closed loop. Taking the application scenario in Figure 3A as an example, the master device 200 can determine from the network topology data that when the connection port P1 of the last slave device S N is connected to the connection port P2 of the branch device S A , it is determined that there is a redundant path in the network topology. In contrast, if the network topology data has only one connection port P0 for the last slave device S N in the connected state, and the connection port P1 of the last slave device S N is not connected to any slave device, it indicates that this network topology data does not have a closed loop, so it is determined that there is no redundant path in the current network topology data. Note that the master device 200 can execute the cable redundancy communication protocol, but when there is no redundant path in the network topology data, there is no need to execute the cable redundancy mechanism.
[0024] Step S43: Disconnect the connection state between the branch device S A and the slave device S N to temporarily change 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 to...N instructing to close the connection port P1; and the master device 200 transmits a command packet to the branch device S A to instruct the branch device S A to close the connection port P2. Note that connecting the branch device S A and the slave device S N or disconnecting the connection state between the branch device S A and the slave device S N results in different equivalent network topologies but the same physical data packet path, "master device 200, branch device S A , slave device S1,..., slave device S N ". Therefore, the system time delay calculated in the linear network topology still applies to the closed loop.
[0025] Step S44: Execute the distributed clock synchronization process. As shown in FIG. 3C, the master device 200 reads the local clock of the first slave device (e.g., branch device S A ) as the reference clock, calculates a plurality of system time delays based on the reference clock, and the system time delays between the connection ports P0 of the two devices are t A1 , t 12 ,..., t (N-1)N respectively. Specifically, the time difference between the local clock of the master device 200 and the reference clock is the system time offset. After subtracting the system time offset, the time when the packet sent by the master device 200 reaches the connection port P0 of the branch device S A is t A , and the times when the packet reaches the connection ports P0 of the plurality of slave devices S1 to S N sequentially are t1 to t N . Therefore, the system time delay between the branch device S A and the slave device S1 is t A1 , and the system time delay between the 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, the EtherCAT specification can be referred to, so detailed explanations are omitted here. The master device 200 transmits the reference clock and a 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: Determine whether there is a redundant path according to the network topology data. 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 proceeding to step S47.
[0028] Step S47: Transmit periodic 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. Since the content of this step has been described in the prior art, it will not be repeated here.
[0029] Step S48: Check the network topology data. For example, as shown in FIG. 3D, when the master device 200 detects that the connection port P1 of the slave device S2 has changed from the original connected state to the unconnected state, or when it indicates that a disconnection has occurred between the slave device S2 and the next slave device S3, it returns to step S44 to execute the distributed clock synchronization process at the time of disconnection. The master device 200 uses the branch device S A as the reference clock. After the connection port 203 transmits the data packet, in the first stage, it reaches the RX connection port P0 of the branch device S A ; in the second stage, it reaches the TX connection port P1 of the branch device S A ; in the third stage, it reaches the RX connection port P0 of the slave device S1; in the fourth stage, it reaches the RX connection port P0 of the slave device S2; in the fifth stage, it reaches the RX connection port P0 of the slave device S1 from the TX connection port P1 of the slave device S2; in the sixth stage, it reaches the RX connection port P1 of the branch device S A ; in the seventh stage, it transfers from the RX connection port P1 of the branch device S A to the TX connection port P2 of the branch device S A ; in the eighth stage, it reaches the RX connection port P1 of the slave device S N ; in the ninth stage, it reaches the RX connection port P1 of the slave device S3 from the TX connection port P0 of the slave device S N ; in the tenth stage, it reaches the RX connection port P0 of the slave device S N from the TX connection port P1 of the slave device S N ; in the eleventh stage, it reaches the RX connection port P2 of the branch device S A ; in the twelfth stage, it reaches the TX connection port P0 from the RX connection port P2 of the branch device S A ; and the final thirteenth stage is the branch device SA returns from the TX connection port P0 of [device name] to the RX connection port 204 of the master device 200. In the seventh step, the branch device S A is configured to transfer data packets from the slave device S1 to the slave device S as a redundant path when a disconnection occurs. Although the network topology has changed from the original closed loop to two linear structures due to the disconnection, the transmission path of the aforementioned data packets is logically equivalent to one closed loop, and the data packets carrying the reference clock transmitted from the master device 200 can still be received by each slave device. Therefore, the EtherCAT distributed clock synchronization process can still be applied. N When the master device 200 determines that the check result of the network topology is normal, it returns to step S47 and continues the regular routine work. When the master device 200 determines that the connection port P1 of the slave device S2 has recovered from the unconnected state to the original connected state, it indicates the resolution of the disconnection and proceeds to step S49.
[0030] Step S49: Use the system time delay calculated in the cable redundancy mode. When the network disconnection is restored and the original network topology is restored, without re-executing the distributed clock synchronization process, the multiple system time delays t
[0031] of the initial network topology recorded in step S44 can be reallocated. Therefore, as long as the current network topology is the same as the initial network topology, the system time delay should also be the same. After step S49 is completed, it returns to step S47 and continues the regular routine work. A1 t 12 t (N-1)N …, t
[0032] Referring to FIG. 5, FIG. 5 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, one input terminal and two output terminals. Since the branch unit 506 is built into the master device 500, the connection port P0 and the Ethernet connection port 503 may not have substantial connection port interface hardware. The TX / RX of the connection port P0 is connected to the RX / TX of the Ethernet connection port 503, and the connection ports P1 and P2 are 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 through the connection ports P1 and P2 of the branch unit 506, and operates the EtherCAT network according to the design of the present invention, and the operation process is the same as that of FIG. 4, so it will not be repeated here. According to a second embodiment of the present invention, a branch device S A After the master device 500 is incorporated with the above, the master device 500 can also function as a redundant path for forwarding packets, thereby expanding the functionality of the master device 500. In one embodiment, when the master device 500 is applied to the EtherCAT system of FIG. 3B, the master device 500 and multiple slave devices S may be connected to each other in a manner suitable for practical applications. D1 ~S DM The first slave device S D1 At least two branch devices between A1 , S A2 are connected in series, and at least two of the two branch devices S A1 , S A2 At least one slave device S B2 ~S B4 are connected in series.
[0033] The above are only specific embodiments of the present invention, and the protection scope of the present invention is not limited thereto. For those skilled in the art, any changes or substitutions that can be easily conceived within the technical scope of the present invention are all included in the protection scope of the present invention. Therefore, the protection scope of the present invention is based on the protection scope of the above-mentioned patent claims.
Explanation of Signs
[0034] 100 Master device 102, 103 Ethernet MAC devices 104, 105 Ethernet connection ports 200 Master device 201 Processor 202 Ethernet MAC 204 Ethernet connection port 500 Master device 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 steps S A , S A1 , S A2 Branch device t1~t N Time when the packet reaches the slave device t A1 , t 12 ~t (N-1)N System time delay TX Transmitter unit
Claims
1. A method for cable redundancy and distributed clock synchronization based on EtherCAT, used for a master device connected via a branch device to N slave devices connected in series, comprising: (1) sending an inquiry packet to instruct the branch device and the N slave devices to report status information of a plurality of connection ports, and constructing network topology data based on the status information of the plurality of connection ports; Step (2), if it is determined according to the network topology data that a redundant path exists, proceed to step (3), otherwise proceed to step (4); (3) sending a first command packet to instruct a disconnection between the branch device and an Nth slave device of the N slave devices; (4) performing a distributed clock synchronization process to calculate multiple system time delays in redundant mode; (5) sending a second command packet to instruct the branch device to connect to the N-th slave device; N is a natural number greater than 1. method.
2. Each of the N slave devices A first connection port connected to an upstream device; a second connection port connected to a downstream device; The branch device includes: a first connection port connected to the master device; a second connection port connected to the first connection port of a 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 of claim 1.
3. The step (2) if the network topology data indicates that the third connection port of the branch device connects to the second connection port of the Nth slave device, then it is determined that the redundant path exists. The method of claim 2.
4. The step (3) sending the first command packet to the N-th slave device to instruct the N-th slave device to close the second connection port; sending the first command packet to the branch device to instruct the branch device to close the third connection port; The method of claim 2.
5. The step (5) sending the second command packet to the N-th slave device to instruct it to open the second connection port of the N-th slave device; sending the second command packet to the branch device to instruct the branch device to open the third connection port; The method of claim 2.
6. a step (6) of, after the step (4), proceeding to a step (5) if it is determined according to the network topology data that the redundant path exists, or proceeding to a step (7) if not; and (7) transmitting periodic packets to the branch device and the N slave devices to synchronize a plurality of local system times of the branch device and the N slave devices. The method of claim 1.
7. After the step (7), (8) performing the step (7) again if the network topology data indicates normality; (9) performing step (4) again to calculate a number of system time delays in a disconnected mode if the network topology data indicates a disconnection has occurred; and (10) performing step (7) again using the plurality of system time delays in the redundancy mode if the network topology data indicates a clearing of the disconnection. The method according to claim 6.
8. When performing step (4) again after step (9), the branch device is configured to transfer a data packet from a first slave device to the Nth slave device among the N slave devices as a redundant path when a disconnection occurs. The method of claim 7.
9. A master device applied to EtherCAT, a connection port configured to connect to a branch device, the connection port being connected to the master device via the branch device by N serially connected slave devices; an Ethernet media access control device (MAC device) connected to the connection port; a processor connected to the Ethernet MAC device and configured to perform the EtherCAT based cable redundancy and distributed clock synchronization method of claim 1; A master device applied to EtherCAT.
10. At least one slave device is connected in series between the master device and the branch device.
10. The master device of claim 9.
11. 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.
11. The master device of claim 10.
12. A master device applied to EtherCAT, A processor; an Ethernet MAC device connected to the processor; a branch unit including: a first connection port connected to the Ethernet MAC device; a second connection port connected to a first slave device among N slave devices connected in series; and a third connection port connected to an Nth slave device among the N slave devices; The processor, (1) sending an inquiry packet to instruct the branch unit and the N slave devices to report status information of a plurality of connection ports, and constructing network topology data based on the status information of the plurality of connection ports; Step (2), if it is determined according to the network topology data that a redundant path exists, proceed to step (3), otherwise proceed to step (4); (3) sending a first command packet to instruct the branch unit to disconnect the connection between the branch unit and the N-th slave device; (4) performing a distributed clock synchronization process to calculate multiple system time delays in redundant mode; (5) transmitting a second command packet to instruct the branch unit to connect to the N-th slave device; N is a natural number greater than 1. Master device.
13. Each of the N slave devices A first connection port connected to an upstream device; and a second connection port connected to a downstream device.
13. The master device of claim 12.
14. The step (2) if the network topology data indicates that the third connection port of the branch unit connects to the second connection port of the Nth slave device, it is determined that the redundant path exists; 14. The master device of claim 13.
15. The step (3) sending the first command packet to the N-th slave device to instruct the N-th slave device to close the second connection port; sending the first command packet to the branch unit to instruct the branch unit to close the third connection port; 14. The master device of claim 13.
16. The step (5) sending the second command packet to the N-th slave device to instruct it to open the second connection port of the N-th slave device; sending the second command packet to the branch unit to instruct the branch unit to open the third connection port of the branch unit; 14. The master device of claim 13.
17. The master device is a step (6) of, after the step (4), proceeding to a step (5) if it is determined according to the network topology data that the redundant path exists, or proceeding to a step (7) if not; and (7) transmitting periodic packets to the branch unit and the N slave devices to synchronize a plurality of local system times of the branch unit and the N slave devices.
13. The master device of claim 12.
18. After step (7), the master device: (8) performing the step (7) again if the network topology data indicates normality; (9) performing step (4) again to calculate a number of system time delays in a disconnected mode if the network topology data indicates a disconnection has occurred; and (10) performing step (7) again using the plurality of system time delays in the redundancy mode if the network topology data indicates a clearing of the disconnection.
20. The master device of claim 17.
19. After the step (9), when the step (4) is executed again, the branch unit is configured to transfer a data packet from the first slave device to the Nth slave device as a redundant path when a disconnection occurs.
20. The master device of claim 18.
20. 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; 13. The master device of claim 12.
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