Clock competition method applied to industrial automation Ethernet, computing equipment and medium
By automatically generating backup master clock devices in industrial automation Ethernet, network chaos and data scheduling interruption caused by master clock device failure are solved, ensuring network stability and data transmission continuity.
Patent Information
- Application Number
- CN202510548636.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-28
- Publication Date
- 2025-05-30
AI Technical Summary
In industrial automation Ethernet, when the main clock device fails to send the main clock message, and other node devices cannot perform the alignment, resulting in the network being in a chaotic state and data scheduling is interrupted.
A method is provided that in industrial automation Ethernet, when the master clock device fails, a backup master clock device is automatically generated to replace the failed master clock device to ensure that the data scheduling of each node device in the network is not interrupted.
By automatically generating backup master clock devices in the network, network chaos and data scheduling interruption caused by master clock device failure are solved, ensuring network stability and data transmission continuity.
Smart Images

Figure CN120074729A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of industrial communication networks, and particularly to a method, a computing device, and a medium for clock competition. Background Art
[0002] EPA (Ethernet for Plant Automation) factory automation Ethernet is a real-time Ethernet technology independently developed in China for control systems, which has been included in the fieldbus international standard IEC61158 and the real-time Ethernet standard IEC61784. Currently, EPA has been widely applied in multiple fields such as power, chemical industry, machinery, mining, and petroleum.
[0003] As a highly real-time and distributed industrial Ethernet, each node device in the EPA network can be undifferentiated, and each node device is connected by cables to form a star-shaped, ring-shaped or other topological structures. By selecting a node device as the master clock device among all node devices, all other node devices (hereinafter referred to as slave clock devices) can use the clock of the master clock device as a reference (the master clock device provides a clock reference for the slave clock devices), and the slave clock devices perform time synchronization with the master clock device by receiving the master clock messages sent by the master clock device.
[0004] However, when the master clock device fails to send master clock messages due to a fault, all other node devices will be unable to perform time synchronization, resulting in the network being in a chaotic state, and the data scheduling between each node in the network stops and needs to be restored. Summary of the Invention
[0005] In view of the above problems, the present disclosure provides a method, a computing device, and a medium for clock competition, which generate a corresponding master clock device when the master clock device in the industrial automation Ethernet fails to send master clock messages, and generate a standby master node device when there is no standby master node device, so that when the master clock device fails, the standby master clock device can replace the master clock device in time to maintain the uninterrupted data scheduling of each node device in the network, and solve the above problems.
[0006] According to a first aspect of the present disclosure, there is provided a method for clock competition, which is applied to an industrial automation Ethernet. The method includes accessing node devices to the industrial automation Ethernet in a preset mode; determining whether a desired clock device already exists in the industrial automation Ethernet; in response to determining that a desired clock device exists, controlling the node device to be a slave clock device; and in response to determining that a desired clock device does not exist, controlling the node device to perform a clock competition with other node devices participating in the competition with the node device in the preset mode to determine a master clock device or a standby master clock device.
[0007] In one embodiment, the method further includes, in response to a preset mode being a competition mode, determining whether a master clock device already exists in an industrial automation Ethernet; in response to determining that no master clock device exists, a node device sending master clock declaration messages to other node devices in a plurality of consecutive macro cycles; determining whether the node device receives other master node cycle messages from other node devices; and in response to not receiving other master node cycle messages, determining the node device as the master clock device.
[0008] In one embodiment, determining the node device as the master clock device further includes, in response to not receiving other master node cycle messages, determining whether other master clock declaration messages are received from other node devices; determining that other master clock declaration messages are received from other node devices, further determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the other master clock declaration messages; and in response to the priority of the IP address of the node device being higher, determining the node device to operate as the master clock device.
[0009] In one embodiment, determining the node device as the master clock device further includes, in response to not receiving other master clock declaration messages, determining the node device to operate as the master clock device.
[0010] In one embodiment, the desired clock device further includes a standby master clock device, and the method further includes, in response to determining that a master clock device exists, synchronizing the clock of the node device with the master clock device of the industrial automation network; enabling the standby master device function of the node device; determining whether a standby master clock device already exists in the industrial automation Ethernet; and in response to no standby master clock device existing, determining the node device as the standby master clock device.
[0011] In one embodiment, the method further includes, in response to the preset mode being a forced master mode, determining whether a forced master mode master clock device exists in the industrial automation Ethernet; and in response to determining that no forced master mode master clock device exists, determining the node device as the master clock device.
[0012] In one embodiment, the method further includes determining whether the node device receives a forced master mode master node cycle message; in response to receiving a forced master mode master node cycle message, determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the forced master mode master node cycle message; and in response to the priority of the IP address of the node device being higher, determining the node device to operate as the master clock device.
[0013] In one embodiment, the method further includes, in response to not receiving a forced master mode master node cycle message, determining the node device to operate as the master clock device.
[0014] In one embodiment, the desired device further includes a forced master mode standby master clock device, and the method further includes synchronizing the clock of the node device with the industrial automation network and enabling the standby master enable function of the node device in response to determining that there is a forced master mode master clock device; determining whether there is a forced master mode standby master clock device in the industrial automation Ethernet; and determining the node device as the standby master clock device in response to determining that there is no forced master mode standby master clock device.
[0015] In one embodiment, the method further includes determining whether the node device receives a forced master mode standby master node cycle message; determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the forced master mode standby master node cycle message in response to receiving the forced master mode standby master node cycle message; determining whether the master clock device is offline in response to determining that the priority of the IP address of the node device is higher; and determining the node device as the standby master clock device to run in response to determining that the master clock device is not offline.
[0016] In one embodiment, the method further includes determining whether the node device receives a forced master mode standby master node cycle message; determining whether the master clock device is offline in response to not receiving the forced master mode standby master node cycle message; and determining the node device as the standby master clock device to run in response to determining that the master clock device is not offline.
[0017] In one embodiment, the method further includes determining whether there is a forced master mode standby master clock device and a forced standby master mode standby master device in the industrial automation Ethernet in response to the preset mode being the forced standby master mode; and determining the node device as the standby master clock device in response to determining that there is no forced master mode standby master clock device and no forced standby master mode standby master clock device.
[0018] In one embodiment, the method further includes determining whether the node device receives a forced master mode standby master node cycle message and a forced standby master mode standby master node cycle message; determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the forced standby master mode standby master node cycle message in response to not receiving the forced master mode standby master node cycle message but receiving the forced standby master mode standby master node cycle message; determining whether the master clock device is offline in response to determining that the priority of the IP address of the node device is higher; and determining the node device as the standby master clock device to run in response to determining that the master clock device is not offline.
[0019] In one embodiment, the method further includes determining whether the node device has received a forced master mode standby master node cycle message and a forced standby master mode standby master node cycle message; in response to determining that the node device has not received a forced master mode standby master node cycle message and a forced standby master mode standby master node cycle message, further determining whether the master clock device is offline; and in response to determining that the master clock device is not offline, determining that the node device operates as a standby master clock device.
[0020] In one embodiment, the method further includes determining whether the node device has received a forced master mode standby master node cycle message and a forced standby master mode standby master node cycle message; in response to determining that the forced master mode standby master node cycle message and the forced standby master mode standby master node cycle message have not been received, further determining whether the node device has received a standby master node cycle message; in response to determining that the node device has not received a standby master node cycle message, determining whether the master clock device is offline; and in response to determining that the master clock device is not offline, determining that the node device operates as a standby master clock device.
[0021] In one embodiment, the method further includes in response to the node device receiving a standby master node cycle message, determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the standby master node cycle message; in response to the priority of the IP address of the node device being higher, determining whether the master clock device is offline; and in response to determining that the master clock device is not offline, determining that the node device operates as a standby master clock device.
[0022] In one embodiment, the method further includes when the node device operates as a standby master clock device, listening for and parsing messages in the industrial automation Ethernet within multiple macro cycles; when determining that there is no message sent by the master clock device in the message, determining that the master clock device is offline; and in response to determining that the master clock device is offline, the node device sends a standby master clock switch message to other node devices and switches itself to the master clock device.
[0023] According to a second aspect of the present disclosure, there is provided a computing device for implementing clock competition in an industrial automation Ethernet, the computing device including: one or more processors; and a memory storing computer-executable instructions, the computer-executable instructions, when executed by the one or more processors, cause the one or more processors to execute the clock competition method according to the first aspect of the present disclosure.
[0024] According to a third aspect of the present disclosure, there is provided a non-transitory storage medium having stored thereon computer-executable instructions, the computer-executable instructions, when executed by a computer, cause the computer to execute the clock competition method according to the first aspect or the second aspect of the present disclosure.
[0025] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it used to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood from the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent. In the drawings, like or similar reference numerals denote like or similar elements.
[0028] Figure 1 The flowchart of a method for clock competition in an EPA network according to an embodiment of the present disclosure is shown.
[0029] Figure 2 The flowchart of a method for clock competition in an EPA network according to another embodiment of the present disclosure is shown.
[0030] Figure 3 The flowchart of a method for clock competition in an EPA network according to still another embodiment of the present disclosure is shown.
[0031] Figure 4 The flowchart of a method for clock competition in an EPA network according to still another embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0032] The following describes exemplary embodiments of the present disclosure in conjunction with the accompanying drawings. Various details of the embodiments of the present disclosure are included to assist in understanding, and they should be considered merely exemplary. Therefore, those of ordinary skill in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0033] As used herein, the term "including" and its variations mean open inclusion, that is, "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "an exemplary embodiment" and "an embodiment" mean "at least one exemplary embodiment". The term "another embodiment" means "at least one additional embodiment". There may be other explicit and implicit definitions hereinafter.
[0034] Based on the above situation, the present disclosure provides a method for clock competition, which generates a corresponding master clock device when the master clock device fails and cannot send the master clock message in the industrial automation Ethernet, and generates a corresponding backup master node device when there is no backup master node device, so that when the master clock device fails, the backup master clock device can replace the master clock device in time to maintain the data scheduling of each node device in the network without interruption, thereby solving the above problems.
[0035] It should be understood that in the industrial automation Ethernet of the present disclosure, the clock identities of the network nodes can be divided into three categories, namely, master clock devices (master nodes), backup master clock devices (backup master nodes) and slave clock devices (slave nodes).
[0036] The master clock device is a node with master status, providing the time base for the network in which it is located, and all non-master nodes synchronize with it. There is only one master clock device in a network.
[0037] The backup master clock device is the backup device of the master node. When the master clock device exists, the backup master clock device does not play a role. The backup master clock device will be synchronized with the master clock device in the network in advance. When the master clock device in the network disappears, the backup master clock device will replace the original master clock device and become the new master clock device before the slave node completely loses synchronization, and re-provide the time reference for the network. There is only one backup master clock device in a network.
[0038] The slave clock node is an ordinary node in the industrial automation Ethernet. It needs to be synchronized with the master clock device in the network before it can execute scheduling and achieve deterministic communication.
[0039] The clock competition method according to various embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings. It should be understood that the actual clock competition method may have other method steps, but in order to avoid blurring the focus of the present disclosure, the present disclosure does not discuss these other method steps and the accompanying drawings do not show them.
[0040] Figure 1 A method for clock competition applied to industrial automation Ethernet according to some embodiments of the present disclosure is shown. Figure 1 As shown, the clock competition method provided by the present disclosure includes: 101, connecting the node device to the industrial automation Ethernet in a preset mode; 102, determining whether the desired clock device already exists in the industrial automation Ethernet; 103, in response to determining that the desired clock device exists, controlling the node device to act as a slave clock device; and 104, in response to determining that the desired clock device does not exist, controlling the node device to perform clock competition in a preset mode with other node devices participating in the competition with the node device to determine a master clock device or a backup master clock device.
[0041] In the present disclosure, the preset modes for the specific clock identities of configurable nodes may include a competition mode, a strong master clock mode, and a forced standby master clock mode. When a node device accesses the network in the competition mode, after the node device is powered on and initialized, it will execute the competition process for the master clock device or the standby master clock device. When a node device accesses the network in the forced master clock mode, after the node device is powered on and initialized, it will execute the competition process for the master clock device. When a node device accesses the network in the forced standby master clock mode, after the node device is powered on and initialized and time synchronization is completed, it will execute the competition process for the standby master clock device. Optionally, the preset mode may further include a forced slave clock mode. When a node device accesses the network in the forced slave clock mode, after the node device is powered on and initialized, it will operate with a slave clock identity.
[0042] The following will Figures 2 to 4 describe in detail the competition process for the master clock device or the standby master clock device in the competition mode, the competition process for the master clock device in the forced master clock mode, and the competition process for the standby master clock device in the forced standby master clock mode.
[0043] Figure 2 shows a flowchart of the clock competition method in the competition mode. As Figure 2 shown, in the competition mode, the method may include determining whether there is a master clock device in the industrial automation Ethernet; when it is determined that there is no master clock device, the node device sends a master clock declaration message to other node devices in a continuous plurality of macrocycles, and determines whether other master node cycle messages are received from other node devices; and based on the determination that no other master node cycle messages are received, determining the node device as the master clock device.
[0044] When it is determined that no other master node cycle messages are received, determine whether other master clock declaration messages are received from other node devices; and when it is determined that no other master clock declaration messages are received, determine the node device to operate as the master clock device.
[0045] Optionally, determining the node device as the master clock device further includes, when it is determined that no other master node cycle message is received, determining whether an other master clock declaration message from another node device is received; when it is determined that an other master clock declaration message is received, determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the other master clock declaration message; and in response to the priority of the IP address of the node device being higher, determining the node device to operate as the master clock device, or when it is determined that no other master node cycle message is received, determining whether an other master clock declaration message from another node device is received; and when it is determined that no other master clock declaration message is received, determining the node device to operate as the master clock device. When it is determined that a forced master mode master node cycle message and an other master clock declaration message are received and the priority of the IP address of the node device is not the highest, the node device is determined to be a slave clock device.
[0046] The method further includes, when it is determined that there is a master clock device, synchronizing the clock of the node device with the clock of the industrial automation Ethernet and enabling the backup master enable function of the node device; determining whether there is already a backup master clock device in the industrial automation Ethernet; and when it is determined that there is no backup master clock device, determining the node device as the backup master clock device. Synchronizing the clock of the node device with the industrial automation network may include synchronizing the clock of the node device with the clock of the master clock device or synchronizing the clock of the node device with the clock of the slave node device.
[0047] Optionally, as Figure 2 shown, when it is determined that there is a master clock device, the node device may first operate as a slave node clock for subsequent clock synchronization, and then when it is determined that there is no backup master clock device, determine to be the backup master clock device.
[0048] The method further includes determining whether the node device receives a forced master mode backup master node cycle message and a forced backup master mode backup master node cycle message; when it is determined that neither a forced master mode backup master node cycle message nor a forced backup master mode backup master node cycle message is received, determining whether the node device receives a backup master node cycle message; when it is determined that the node device does not receive a backup master node cycle message, determining whether the master clock device is offline; and when it is determined that the master clock device is not offline, determining the node device to operate as the backup master clock device.
[0049] Alternatively, when the node device receives the backup master node cycle message, and the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the backup master node cycle message, and the master clock device is not offline, the node device is determined to operate as the backup master clock device. Optionally, before the foregoing determination is made, it is first determined whether the node device operating as the backup master device has enabled the backup master function, and only after it is determined that the backup master function is enabled, the subsequent determination is made. During the foregoing process, if the node device determined to be the backup master clock device does not enable the backup master function or the priority of the IP address is not the highest, the node device is switched to operate as a slave clock device.
[0050] The method further includes, when the node device operates as the backup master clock device, listening to and parsing messages in the industrial automation Ethernet within multiple macro cycles; when it is determined that there is no message sent by the master clock device in the messages, determining that the master clock device is offline; and in response to determining that the master clock device is offline, the node device sends a backup master clock switch message to other node devices and switches itself to the master clock device.
[0051] Optionally, after the node device switches from the backup master clock device identity to the master clock device identity, the method further includes determining whether the node device receives a forced master mode master node cycle message; when it is determined that the node device receives a forced master mode master node cycle message, determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the forced master mode master node cycle message; and when it is determined that the priority of the IP address of the node device is higher, determining that the node device operates as the master clock device, or determining whether the node device receives a forced master mode master node cycle message; and when it is determined that the node device does not receive a forced master mode master node cycle message, determining that the node device operates as the master clock device.
[0052] Figure 3 Shows the flowchart of the clock competition method in the forced master mode. As Figure 3 shown, the method further includes determining whether there is a forced master mode master clock device in the industrial automation Ethernet; and when it is determined that there is no forced master mode master clock device, determining the node device as the master clock device.
[0053] The method further includes determining whether the node device has received a forced master mode master node cycle message; when it is determined that the forced master mode master node cycle message has been received, determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the forced master mode master node cycle message; and when it is determined that the priority of the IP address of the node device is higher, determining that the node device operates as the master clock device, or determining whether the node device has received a forced master mode master node cycle message; and when it is determined that the forced master mode master node cycle message has not been received, determining that the node device operates as the master clock device. When it is determined that the forced master mode master node cycle message has been received and the priority of the IP address of the node device is not the highest, the node device is determined to be a slave clock device.
[0054] When it is determined that there is a forced master mode master clock device, synchronize the clock of the node device with the industrial automation Ethernet, and enable the backup master enable function of the node device; determine whether there is a forced master mode backup master clock device in the industrial automation Ethernet; when it is determined that there is no forced master mode backup master clock device, determine the node device as the backup master clock device.
[0055] The method may further include determining whether the node device has received a forced master mode backup master node cycle message; when it is determined that the forced master mode backup master node cycle message has been received, determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the forced master mode backup master node cycle message; when it is determined that the priority of the IP address of the node device is higher, determining whether the master clock device is offline; and when it is determined that the master clock device is not offline, determining that the node device operates as the backup master clock device, or sequentially determining whether the node device has received a forced master mode backup master node cycle message and whether the master clock device is offline; and when it is determined that neither has occurred, determining that the node device operates as the backup master clock device. Optionally, before starting the foregoing determination, first determine whether the node device operating as the backup master device has enabled the backup master enable function, and only perform subsequent determinations after determining that it has been enabled. During the foregoing process, if the node device determined to be the backup master clock device identity has not enabled the backup master enable function or the priority of the IP address is not the highest, then the node device is switched to operate as a slave clock device identity.
[0056] The method further includes when the node device operates as the backup master clock device, listening to and parsing the messages in the industrial automation Ethernet within multiple macro cycles; when it is determined that there is no message sent by the master clock device in the message, determining that the master clock device is offline; and in response to determining that the master clock device is offline, the node device sends a backup master clock switch message to other node devices and switches itself to the master clock device.
[0057] Figure 4 Shows the flowchart of the clock competition method in the forced backup master mode. As Figure 4As shown, the method further includes determining whether there are forced master mode standby master clock devices and forced standby master mode standby master devices in the industrial automation Ethernet; and when it is determined that there are no forced master mode standby master clock devices and forced standby master mode standby master clock devices, determining the node device as the standby master clock device.
[0058] The method further includes determining whether the node device receives forced master mode standby master node cycle messages and forced standby master mode standby master node cycle messages; when it is determined that the node device does not receive forced master mode standby master node cycle messages but receives forced standby master mode standby master node cycle messages, determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the forced standby master mode standby master node cycle message; when it is determined that the priority of the IP address of the node device is higher, determining whether the master clock device is offline; and when it is determined that the master clock device is not offline, determining the node device to operate as the standby master clock device, or determining whether the node device receives forced master mode standby master node cycle messages and forced standby master mode standby master node cycle messages; when it is determined that the node device does not receive forced master mode standby master node cycle messages and forced standby master mode standby master node cycle messages, determining whether the master clock device is offline; and when it is determined that the master clock device is not offline, determining the node device to operate as the standby master clock device. In the foregoing process, if it is determined that the forced master mode standby master node cycle message or the priority of the IP address is not higher, the node device is switched to operate in the identity of a slave clock device.
[0059] The method further includes when the node device operates as the standby master clock device, listening to and parsing messages in the industrial automation Ethernet within multiple macro cycles; when it is determined that there are no messages sent by the master clock device in the messages, determining that the master clock device is offline; and in response to determining that the master clock device is offline, the node device sends a standby master clock switch message to other node devices and switches itself to the master clock device.
[0060] Optionally, the method further includes when the node device operates in the identity of a slave clock device, continuously listening to and parsing messages in the industrial automation Ethernet within multiple macro cycles; in response to determining that there are no messages sent by the master clock device in the messages, determining that the master clock device is offline; and determining that the master clock device is offline and automatically executing the master clock competition process in the competition mode. Optionally, the foregoing multiple macro cycles can be five macro cycles or other macro cycles, as long as it can be determined whether the master clock device is offline.
[0061] The clock competition method provided by the present disclosure supports specifying a primary clock device and a backup primary clock device by pre-configuring the mode for node devices to access the network. Moreover, when there is a backup primary clock node in the network, if the primary clock device goes offline, the backup primary clock device is switched to the primary clock device, and the backup primary clock provides the clock reference to the network, thereby ensuring that even when the primary clock device fails, the data scheduling of each node device in the network will not be interrupted.
[0062] The present disclosure also provides a computing device for implementing clock competition in an industrial automation Ethernet, which includes one or more processors and a memory storing computer-executable instructions. The computer-executable instructions, when executed by the one or more processors, cause the one or more processors to execute the clock competition method according to any of the foregoing embodiments of the present disclosure.
[0063] The present disclosure also provides a non-transitory storage medium storing computer-executable instructions, which, when executed by a computer, cause the computer to execute the clock competition method according to any of the foregoing embodiments of the present disclosure.
[0064] Those of ordinary skill in the art should understand that the present disclosure is not limited to the above embodiments, and the present disclosure can be implemented in many other forms without departing from its gist and scope. Therefore, the shown examples and embodiments are considered illustrative rather than restrictive, and the present disclosure can cover various modifications and substitutions without departing from the spirit and scope of the present disclosure as defined by the appended claims.
Claims
1. A clock competition method applied to industrial automation Ethernet, characterized in that: The method comprises: Connecting the node device to the industrial automation Ethernet in a preset mode; Determining whether a desired clock device already exists in the industrial automation Ethernet network; In response to determining that the desired clock device exists, controlling the node device to function as a slave clock device; and In response to determining that the desired clock device does not exist, the node device is controlled to perform clock competition in a preset mode with other node devices participating in competition with the node device to determine a master clock device or a backup master clock device.
2. The method according to claim 1, characterized in that The method further comprises: In response to the preset mode being a competition mode; Determining whether a master clock device already exists in the industrial automation Ethernet network; In response to determining that there is no master clock device, the node device sends a master clock declaration message to the other node devices within a plurality of consecutive macro cycles; Determining whether the node device has received other master node periodic messages from other node devices; and In response to not receiving the other master node periodic message, determining the node device as a master clock device.
3. The method according to claim 2, characterized in that Determining the node device as a master clock device includes: In response to not receiving the other master node periodic message, determining whether other master clock declaration messages from the other node devices are received; In response to determining that other master clock declaration messages are received from the other node devices, further determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the other master clock declaration message; and In response to the priority of the IP address of the node device being higher than the priority of the IP addresses corresponding to the other master clock declaration messages, the node device is determined as the master clock device.
4. The method according to claim 3, characterized in that: Determining the node device as a master clock device also includes: In response to not receiving the other master clock declaration message, determining the node device as a master clock device.
5. The method according to claim 2, characterized in that: The desired clock device also includes a backup master clock device, and the method further includes: In response to determining that a master clock device exists, synchronizing the node device with a clock of the master clock device of the industrial automation Ethernet network; Turn on the backup master device enabling function of the node device; determining whether a backup master clock device already exists in the industrial automation Ethernet network; and In response to determining that the backup master clock device does not exist, the node device is determined to be the backup master clock device.
6. The method according to claim 1, characterized in that The method further comprises: In response to the preset mode being a forced main mode; determining whether there is a forced master mode master clock device in the industrial automation Ethernet network; and In response to determining that the forced master mode master clock device does not exist, the node device is determined to be a master clock device.
7. The method according to claim 6, characterized in that The method further comprises: Determining whether the node device receives a forced master mode master node periodic message; In response to receiving the forced master mode master node periodic message, determining whether the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the forced master mode master node periodic message; and In response to the fact that the priority of the IP address of the node device is higher than the priority of the IP address corresponding to the forced master mode master node periodic message, the node device is determined as a master clock device.
8. The method according to claim 7, characterized in that The method further comprises: In response to not receiving the forced master mode master node periodic message, determining the node device as the master clock device.
9. The method according to claim 1, characterized in that: The desired device further includes a forced master mode backup master clock device, and the method further includes: In response to determining that the forced master mode master clock device exists, synchronizing the clock of the node device with the clock of the industrial automation Ethernet, and enabling a standby master enable function of the node device; determining whether the forced master mode backup master clock device already exists in the industrial automation Ethernet network; and In response to determining that the forced master mode backup master clock device does not exist, the node device is determined to be the backup master clock device.
10. The method according to claim 1, characterized in that The method further comprises: When the node device operates as a backup master clock device, it monitors and parses messages in the industrial automation Ethernet within a plurality of macrocycles; In response to determining that there is no message sent by the master clock device in the message, determining that the master clock device is offline; and In response to determining that the master clock device is offline, the node device sends a backup master clock switching message to the other node devices, and switches itself to the master clock device.
11. A computing device for implementing clock competition in industrial automation Ethernet, characterized in that: The computing device comprises: one or more processors; and A memory storing computer executable instructions which, when executed by the one or more processors, cause the one or more processors to perform the method according to claims 1-10.
12. A non-transitory storage medium having computer executable instructions stored thereon, characterized in that: The computer executable instructions, when executed by a computer, cause the computer to perform the method according to claims 1-10.
Citation Information
Patent Citations
Master clock competition method and master clock competition system
CN104022861A
Clock competition method and device
CN110138490A
Self-adaptive master clock competition method and system for multistage clock synchronization network
CN111431652A
Decentralized fast network time synchronization method
CN112821979A