Time synchronization method and system based on industrial control system data soft bus
By adopting the time synchronization method based on the industrial control system data soft bus in the industrial control system, the problems of high-precision time synchronization system are solved, and high-precision, low-cost and high-reliability time synchronization are achieved.
Patent Information
- Application Number
- CN202411532709.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-07
AI Technical Summary
High-precision time synchronization systems have high cost, insufficient real-time and high dependence in industrial control.
The time synchronization method based on the industrial control system data soft bus is adopted. By regularly receiving external precision clock source signals for the time master station time receiving module, encapsulating them into time synchronization data packets, and sending them to nodes in the multicast group through the data soft bus to achieve time synchronization.
It realizes high-precision time synchronization, reduces system costs, improves real-time and reliability, has flexibility and loose coupling characteristics, and supports high concurrency and high responsiveness.
Smart Images

Figure CN119582997A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of high-precision time synchronization, and in particular to a time synchronization method and system based on an industrial control system data soft bus. Background Art
[0002] In industrial control systems, the time synchronization system is a key component to ensure the accuracy of data collection, processing and transmission. With the widespread application of distributed control systems (DCS), the demand for high-precision time synchronization is increasing. In order to ensure the time consistency of each node in the network, a system that can receive external precision clock sources (such as GPS time signals, precision clock cards) and use efficient data transmission mechanisms for time synchronization is required.
[0003] At present, the common time synchronization schemes in industrial control systems mainly include the following: NTP (Network Time Protocol): By transmitting timestamps in the network, each node synchronizes the clock according to the timestamp. However, the synchronization accuracy of NTP is limited by network delay and jitter, usually at the level of tens of milliseconds, which is difficult to meet high-precision requirements; PTP (Precision Time Protocol): Through the exchange of timestamps and delay calculation between master and slave devices, microsecond-level time synchronization is achieved. However, PTP is more complex to deploy and maintain in a complex network environment, and the cost is relatively high. Summary of the invention
[0004] In view of the above-mentioned problems, the present invention is proposed.
[0005] Therefore, the technical problem solved by the present invention is: the high cost, insufficient real-time performance and high dependence of the high-precision time synchronization system in industrial control.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides a time synchronization method based on an industrial control system data soft bus, comprising:
[0008] Regularly receive external precision clock source signals through the time receiving module of the time synchronization master station;
[0009] The received external precision clock source signal is transmitted to the data soft bus interface module, encapsulated into a time synchronization data packet, and sent to the nodes in the multicast group through the data soft bus;
[0010] The time synchronization data packet is received by the synchronization module of the time synchronization slave station, and is passed to the time synchronization processing module, which parses the timestamp information in the time synchronization data packet;
[0011] The time synchronization processing module calculates the offset between the local clock and the time of the master station;
[0012] Directly synchronizing the time or correcting the offset based on the offset to generate a synchronous data feedback packet;
[0013] The synchronization slave station periodically sends synchronization data feedback packets to the synchronization master station to confirm the synchronization success or report the synchronization status;
[0014] Based on the synchronous data feedback package, UI interface display is performed;
[0015] View and configure time synchronization system settings through the UI.
[0016] As a preferred solution for the time synchronization method based on the industrial control system data soft bus, wherein:
[0017] The periodic reception of an external precision clock source signal by the time receiving module of the time synchronization master station comprises:
[0018] The time receiving module of the time synchronization master station obtains accurate time information by connecting to an external precision clock source. The master station receives the external signal once at a certain interval.
[0019] As a preferred solution for the time synchronization method based on the industrial control system data soft bus, wherein:
[0020] The direct time synchronization or offset correction based on the offset includes:
[0021] When the offset is greater than the maximum boundary of the preset time correction interval, the direct time synchronization module is entered to directly write the time of the time synchronization master station into the local clock for direct time synchronization; when the offset is within the time correction interval, the time offset correction module is entered to adjust the offset through a special time correction algorithm, and when it is less than the minimum boundary of the time offset, the time synchronization is exited.
[0022] As a preferred solution for the time synchronization method based on the industrial control system data soft bus, wherein:
[0023] The encapsulation into a time synchronization data packet and sending it to the nodes in the multicast group through the data soft bus includes:
[0024] The data soft bus interface module encapsulates the received time signal to form a time synchronization data packet, which includes the time synchronization packet on the data soft bus, including the increment of each multicast; time offset; a corrected time from the master station, the corrected start time, and the absolute time; a corrected time from the slave station, the corrected start time, and the absolute time; a corrected time from the slave station, the corrected start time, and the absolute time; a corrected time to the master station, the corrected start time, and the absolute time; and is sent in a multicast manner to all control units and workstations configured in the same group to achieve time synchronization.
[0025] As a preferred solution for the time synchronization method based on the industrial control system data soft bus, wherein:
[0026] The synchronization data feedback packet includes the node status, synchronization status, time offset and current time.
[0027] As a preferred solution for the time synchronization method based on the industrial control system data soft bus, wherein:
[0028] The UI interface display based on the synchronous data feedback package includes:
[0029] The UI interface will dynamically display the status, synchronization status, offset and current time of each workstation based on the content of the received synchronization data feedback package, providing users with an intuitive information view for real-time monitoring.
[0030] As a preferred solution for the time synchronization method based on the industrial control system data soft bus, wherein:
[0031] Viewing and configuring the time synchronization system settings through the UI interface includes:
[0032] The time synchronization system has an independent UI interface, which supports viewing the status, synchronization status, time offset and current time of all workstation nodes in the industrial control system. If the local machine has the permission for active time synchronization, it supports writing the current time of the local machine into the local clock of the selected controller.
[0033] In a second aspect, an embodiment of the present invention provides a time synchronization system based on an industrial control system data soft bus, comprising:
[0034] A signal receiving module is used to periodically receive an external precision clock source signal through a time receiving module of a time synchronization master station;
[0035] The encapsulation module is used to transmit the received external precision clock source signal to the data soft bus interface module, encapsulate it into a time synchronization data packet, and send it to the nodes in the multicast group through the data soft bus;
[0036] A parsing module is used to receive a time synchronization data packet through a synchronization module of a time synchronization slave station, and pass it to a time synchronization processing module, and the time synchronization processing module parses the timestamp information in the time synchronization data packet;
[0037] A calculation module, used for calculating the offset between the local clock and the time of the time synchronization master station through the time synchronization processing module;
[0038] A synchronous data feedback packet generation module, used to perform direct time synchronization or offset correction based on the offset to generate a synchronous data feedback packet;
[0039] The status confirmation module is used to periodically send synchronization data feedback packets to the synchronization master station through the synchronization slave station to confirm the synchronization success or report the synchronization status;
[0040] The display module is used to display the UI interface based on the synchronous data feedback package;
[0041] The View Configuration module is used to view and configure the time synchronization system settings through the UI interface.
[0042] In a third aspect, an embodiment of the present invention provides a computing device, including:
[0043] Memory and processor;
[0044] The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the one or more programs are executed by the one or more processors, the one or more processors implement the time synchronization method based on the industrial control system data soft bus as described in any embodiment of the present invention.
[0045] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, can implement the time synchronization method based on the industrial control system data soft bus.
[0046] Beneficial effects of the present invention: The present invention is based on a data soft bus of publish / subscribe communication technology, supports using a time server or workstation as a clock source, supports customizing any controller as a time synchronization master station for system time synchronization, and has high flexibility; the time synchronization system adopts a multicast mode, with low server load, low bandwidth resource occupancy of the network backbone, decoupling of the sender and receiver of the message, and has the characteristics of loose coupling. Through asynchronous communication technology, it has high concurrency and high responsiveness, and can achieve state synchronization between different software modules. When the state of a module changes, it can publish the state information to other subscribers, thereby achieving state consistency. This mechanism helps to maintain the accuracy of the system state and improve the reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0048] Figure 1 It is an overall flow chart of the time synchronization method based on the industrial control system data soft bus according to the first embodiment of the present invention;
[0049] Figure 2 It is a system architecture diagram in a simulation example of a time synchronization method based on an industrial control system data soft bus according to a second embodiment of the present invention;
[0050] Figure 3 It is a timing architecture diagram of GPS as a clock source in a simulation example of a time synchronization method based on an industrial control system data soft bus according to a second embodiment of the present invention;
[0051] Figure 4 It is a time synchronization flow chart in a simulation example of a time synchronization method based on an industrial control system data soft bus according to a second embodiment of the present invention;
[0052] Figure 5 It is a timing architecture diagram of a workstation serving as a clock source in a simulation example of a time synchronization method based on an industrial control system data soft bus according to a second embodiment of the present invention. DETAILED DESCRIPTION
[0053] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.
[0054] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0055] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.
[0056] Example 1
[0057] Reference Figure 1 , which is the first embodiment of the present invention, provides a time synchronization method based on an industrial control system data soft bus, comprising:
[0058] S1: Regularly receive the external precision clock source signal through the time receiving module of the time synchronization master station;
[0059] S2: The received external precision clock source signal is transmitted to the data soft bus interface module, encapsulated into a time synchronization data packet, and sent to the nodes in the multicast group through the data soft bus;
[0060] S3: receiving the time synchronization data packet through the synchronization module of the time synchronization slave station and passing it to the time synchronization processing module, which parses the timestamp information in the time synchronization data packet;
[0061] S4: Calculate the offset between the local clock and the time of the master station through the time synchronization processing module;
[0062] S5: performing direct time synchronization or offset correction based on the offset to generate a synchronous data feedback packet;
[0063] S6: The synchronization slave station periodically sends synchronization data feedback packets to the synchronization master station to confirm the synchronization success or report the synchronization status;
[0064] S7: Based on the synchronous data feedback package, the UI interface is displayed;
[0065] S8: View and configure time synchronization system settings through the UI interface.
[0066] In the embodiment of the present application, the periodic reception of the external precision clock source signal by the time receiving module of the time synchronization master station in the above step S1 includes:
[0067] The time receiving module of the time synchronization master station obtains accurate time information by connecting to an external precision clock source. The master station receives the external signal once at a certain interval.
[0068] In the embodiment of the present application, the time receiving module of the time synchronization master station obtains accurate time information by connecting to the GPS signal, and the master station receives the external signal once every minute.
[0069] In another possible implementation, the time receiving module of the time synchronization master station may also obtain accurate time information by connecting to a network time protocol server.
[0070] In another possible implementation, the time receiving module of the time synchronization master station can also be connected to the Beidou navigation system to obtain high-precision time information by receiving the time signal sent by the Beidou navigation satellite. The Beidou system provides a high-precision time service similar to GPS, which is suitable for application scenarios that require high-precision clock synchronization.
[0071] In another possible implementation, the time receiving module of the time synchronization master station can also receive the time signal transmitted by radio by connecting to a radio clock signal receiver (such as WWVB, DCF77, etc.) These signals are usually sent by national standard time laboratories and provide high-precision time references.
[0072] In another possible implementation, the time receiving module of the synchronization master station can also obtain time information from a network device (such as a switch, a router) that supports PTP through the PTP protocol. PTP is a protocol for accurately synchronizing time between network devices, and is particularly suitable for scenarios that require high-precision time synchronization, such as industrial control systems.
[0073] In the embodiment of the present application, the above step S2 is encapsulated into a time synchronization data packet, and sent to the nodes in the multicast group through the data soft bus, including:
[0074] The data soft bus interface module encapsulates the received time signal to form a time synchronization data packet, which includes the time synchronization packet on the data soft bus, including the increment of each multicast; time offset; a corrected time from the master station, the corrected start time, and the absolute time; a corrected time from the slave station, the corrected start time, and the absolute time; a corrected time from the slave station, the corrected start time, and the absolute time; a corrected time to the master station, the corrected start time, and the absolute time; and is sent in a multicast manner to all control units and workstations configured in the same group to achieve time synchronization.
[0075] In the embodiment of the present application, the direct time synchronization or offset correction based on the offset in the above step S5 includes:
[0076] When the offset is greater than the maximum boundary of the preset time correction interval, the direct time synchronization module is entered to directly write the time of the time synchronization master station into the local clock for direct time synchronization; when the offset is within the time correction interval, the time offset correction module is entered to adjust the offset through a special time correction algorithm, and when it is less than the minimum boundary of the time offset, the time synchronization is exited.
[0077] Specifically, the synchronization data feedback package includes the node status, synchronization status, time offset and current time;
[0078] In the embodiment of the present application, the UI interface display based on the synchronous data feedback package in the above step S7 includes:
[0079] The UI interface will dynamically display the status, synchronization status, offset and current time of each workstation based on the content of the received synchronization data feedback package, providing users with an intuitive information view for real-time monitoring.
[0080] In the embodiment of the present application, viewing and configuring the time synchronization system settings through the UI interface in the above step S8 includes:
[0081] The time synchronization system has an independent UI interface, which supports viewing the status, synchronization status, time offset and current time of all workstation nodes in the industrial control system. If the local machine has the permission for active time synchronization, it supports writing the current time of the local machine into the local clock of the selected controller.
[0082] In another possible implementation, the controller has a built-in time synchronization configuration module, supports custom configuration of master mode and slave mode, and supports custom synchronization of the master clock source to meet complex application scenarios.
[0083] In another possible implementation, the system has a redundancy function, and a pair of timing master stations (one master station and one slave station, serving as hot standby for each other) can be configured in a single network to enhance the robustness and fault tolerance of the system.
[0084] In another possible implementation, when the primary station fails, the secondary station can automatically take over the time synchronization task to ensure the continuity and reliability of time synchronization.
[0085] The above is a schematic scheme of the time synchronization method based on the industrial control system data soft bus of this embodiment. It should be noted that the technical scheme of the time synchronization system based on the industrial control system data soft bus and the technical scheme of the time synchronization method based on the industrial control system data soft bus above belong to the same concept, and the details of the technical scheme of the time synchronization system based on the industrial control system data soft bus in this embodiment that are not described in detail can all be referred to the description of the technical scheme of the time synchronization method based on the industrial control system data soft bus above.
[0086] In this embodiment, the time synchronization system based on the industrial control system data soft bus includes:
[0087] A signal receiving module is used to periodically receive an external precision clock source signal through a time receiving module of a time synchronization master station;
[0088] The encapsulation module is used to transmit the received external precision clock source signal to the data soft bus interface module, encapsulate it into a time synchronization data packet, and send it to the nodes in the multicast group through the data soft bus;
[0089] A parsing module is used to receive a time synchronization data packet through a synchronization module of a time synchronization slave station, and pass it to a time synchronization processing module, and the time synchronization processing module parses the timestamp information in the time synchronization data packet;
[0090] A calculation module, used for calculating the offset between the local clock and the time of the time synchronization master station through the time synchronization processing module;
[0091] A synchronous data feedback packet generation module, used to perform direct time synchronization or offset correction based on the offset to generate a synchronous data feedback packet;
[0092] The status confirmation module is used to periodically send synchronization data feedback packets to the synchronization master station through the synchronization slave station to confirm the synchronization success or report the synchronization status;
[0093] The display module is used to display the UI interface based on the synchronous data feedback package;
[0094] The View Configuration module is used to view and configure the time synchronization system settings through the UI interface.
[0095] This embodiment further provides a computing device, which is applicable to the time synchronization method based on the industrial control system data soft bus, and includes:
[0096] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the time synchronization method based on the industrial control system data soft bus proposed in the above embodiment.
[0097] This embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, the time synchronization method based on the industrial control system data soft bus proposed in the above embodiment is implemented.
[0098] The storage medium proposed in this embodiment and the time synchronization method based on the industrial control system data soft bus proposed in the above embodiment belong to the same inventive concept. The technical details not described in detail in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0099] Example 2
[0100] Reference Figure 2-Figure 5 , which is an embodiment of the present invention, provides a time synchronization method based on an industrial control system data soft bus. In order to verify the beneficial effects of the present invention, a scientific demonstration is carried out through simulation experiments.
[0101] Taking the distributed control system (DCS) in the industrial control system as an example, the system includes a time receiving module of the time synchronization master station, a data soft bus interface module, a time synchronization processing module, a time offset correction module and multiple time synchronization slave station synchronization modules. By defining a private time synchronization protocol, high-precision clock synchronization is achieved.
[0102] The time synchronization system has an independent UI interface, which supports viewing the status, synchronization status, time offset and current time of all workstation nodes in the DCS. If the local machine has the authority for active time synchronization, it supports writing the local current time into the selected DPU, which is mostly used for the first synchronization with the precision clock source.
[0103] The workstations of the industrial control system involved include historical stations, interface stations, engineer stations, operator stations, etc., which are used for process scenarios such as industrial control system data storage, data interaction, system maintenance, monitoring, and control instruction issuance.
[0104] Private time synchronization protocol:
[0105] The invention defines a time synchronization protocol based on a data soft bus, including the format of a timestamp message, a transmission method and specific steps of a synchronization process. The time synchronization between nodes is realized by sending a timestamp message on a network.
[0106] like Figure 2 As shown, it is a system architecture diagram of this method, in which:
[0107] Time synchronization configuration module: The distributed processing unit (DPU) in the process control station has a built-in time synchronization configuration module, which supports custom configuration of master station mode and slave station mode, and supports custom synchronization of the master station clock source to meet complex application scenarios.
[0108] Timing master station receiving module: responsible for receiving external precision clock source signals, such as GPS time signals.
[0109] Data soft bus interface module: realizes connection and communication with the data soft bus, and encapsulates time synchronization information into data packets for transmission.
[0110] Timing slave station receiving module: responsible for receiving time synchronization data packets and passing them to the time synchronization processing module.
[0111] Time synchronization processing module: parses the time synchronization data packet, calculates the time offset of the time synchronization master station, and performs local clock correction through the direct time synchronization module or the time offset correction module to achieve synchronization with the time synchronization master station.
[0112] Direct time synchronization module: When the time offset exceeds the time offset correction interval, the time of the time synchronization master station is directly written into the local clock to achieve direct time synchronization.
[0113] Time offset correction module: When the time offset value is in the time offset correction interval, the offset is adjusted through a special time correction algorithm. When it is less than the minimum boundary of the time offset, the correction is successful and the module is exited.
[0114] Time synchronization data packet: The time synchronization packet on the data soft bus includes the time of the master station, the increment of each multicast; the time offset; the time of a correction from the master station, the corrected start time, and the absolute time; the time of a correction to the slave station, the corrected start time, and the absolute time; the time of a correction from the slave station, the corrected start time, and the absolute time; the time of a correction to the master station, the corrected start time, and the absolute time.
[0115] Synchronous data feedback package: The synchronous data feedback package on the data soft bus includes the node status, synchronization status, time offset and current time.
[0116] Synchronization process:
[0117] The timing master station receiving module regularly receives external precision clock source signals and sends time synchronization data packets to nodes in the multicast group through the data soft bus; the workstation and the timing slave station DPU receive the time synchronization data packets and enter the time synchronization processing module; the time synchronization processing module parses the timestamp information, calculates the time offset Δt, the corrected start time t1 from the master station, the corrected start time t2 to the slave station, the corrected start time t3 from the slave station, and the corrected start time t4 to the master station, and calculates the round-trip error as [(t4-t1)-(t3-t2)], which is corrected by the correction factor in the module. The time synchronization system UI interface displays the information in the received synchronization data feedback package on the UI interface through the data soft bus and refreshes it regularly.
[0118] Time synchronization solution 1:
[0119] This system supports custom configuration of the time synchronization master station, and supports configuration of the clock role module in the DPU in the process control station. The master station mode and the slave station mode can be selected. The DPU is a redundant structure, so the system has a redundant function. A pair of time synchronization master stations can be configured in a single network, one master station and one slave station, which serve as hot standby for each other. The precision clock source signal can be connected to the DPU through the traditional network time protocol. At this time, the time receiving module of the time synchronization master station will receive the external precision clock source signal, and make the time synchronization master station redundant through the redundant network of the DPU, thereby enhancing the robustness of the time synchronization master station and improving fault tolerance. The architecture is as follows Figure 3 As shown in the figure, after the time synchronization master station receives the precision clock source signal, it calls the data soft bus interface module to encapsulate the time synchronization information into a data packet and transmit it on the data soft bus, and then enters the time synchronization processing module of each machine node. The time synchronization processing flow is as follows Figure 4 As shown in the figure, each node will obtain a time offset Δt by calculating the time difference between the node and the time synchronization master station. When Δt is greater than the maximum boundary of the time correction interval (10s), it will enter the direct time synchronization module and write the time of the time synchronization master station directly into the local clock for direct time synchronization; when Δt is within the time correction interval, it will enter the time offset correction module and adjust the offset through a special time correction algorithm. When it is less than the minimum boundary of the time offset (1ms), it will exit the time synchronization.
[0120] Time synchronization solution 2:
[0121] This system supports the deployment of time synchronization system with workstations as clock sources under harsh conditions. The configuration file defines the time synchronization master station, whether to synchronize automatically, and the domain where the node needs to be synchronized. Figure 5 As shown, the time source workstation transmits the clock source signal to the time master station, and the time master station synchronizes all DPUs and workstations in the configured domain through the data soft bus. In this synchronization mode, the clock source workstation synchronizes with the time master station once every hour, and the time master station synchronizes with other DPUs and workstations in the domain once every 5 seconds.
[0122] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A time synchronization method based on industrial control system data soft bus, characterized in that: include: Regularly receive external precision clock source signals through the time receiving module of the time synchronization master station; The received external precision clock source signal is transmitted to the data soft bus interface module, encapsulated into a time synchronization data packet, and sent to the nodes in the multicast group through the data soft bus; The time synchronization data packet is received by the synchronization module of the time synchronization slave station, and is passed to the time synchronization processing module, which parses the timestamp information in the time synchronization data packet; The time synchronization processing module calculates the offset between the local clock and the time of the master station; Directly synchronizing the time or correcting the offset based on the offset to generate a synchronous data feedback packet; The synchronization slave station periodically sends synchronization data feedback packets to the synchronization master station to confirm the synchronization success or report the synchronization status; Based on the synchronous data feedback package, UI interface display is performed; View and configure time synchronization system settings through the UI.
2. The time synchronization method based on the industrial control system data soft bus according to claim 1, characterized in that: The periodic reception of an external precision clock source signal by the time receiving module of the time synchronization master station comprises: The time receiving module of the time synchronization master station obtains accurate time information by connecting to an external precision clock source. The master station receives the external signal once at a certain interval.
3. The time synchronization method based on the industrial control system data soft bus according to claim 2, characterized in that: The direct time synchronization or offset correction based on the offset includes: When the offset is greater than the maximum boundary of the preset time correction interval, the direct time synchronization module is entered to directly write the time of the time synchronization master station into the local clock for direct time synchronization; when the offset is within the time correction interval, the time offset correction module is entered to adjust the offset through a special time correction algorithm, and when it is less than the minimum boundary of the time offset, the time synchronization is exited.
4. The time synchronization method based on the industrial control system data soft bus as claimed in claim 3, characterized in that: The encapsulation into a time synchronization data packet and sending it to the nodes in the multicast group through the data soft bus includes: The data soft bus interface module encapsulates the received time signal to form a time synchronization data packet, which includes the time synchronization packet on the data soft bus, including the increment of each multicast; time offset; a corrected time from the master station, the corrected start time, and the absolute time; a corrected time from the slave station, the corrected start time, and the absolute time; a corrected time from the slave station, the corrected start time, and the absolute time; a corrected time to the master station, the corrected start time, and the absolute time; and is sent in a multicast manner to all control units and workstations configured in the same group to achieve time synchronization.
5. The time synchronization method based on the industrial control system data soft bus according to claim 4, characterized in that: The synchronization data feedback packet includes the node status, synchronization status, time offset and current time.
6. The time synchronization method based on the industrial control system data soft bus as claimed in claim 5, characterized in that: The UI interface display based on the synchronous data feedback package includes: The UI interface will dynamically display the status, synchronization status, offset and current time of each workstation based on the content of the received synchronization data feedback package, providing users with an intuitive information view for real-time monitoring.
7. The time synchronization method based on the industrial control system data soft bus according to claim 6, characterized in that: Viewing and configuring the time synchronization system settings through the UI interface includes: The time synchronization system has an independent UI interface, which supports viewing the status, synchronization status, time offset and current time of all workstation nodes in the industrial control system. If the local machine has the permission for active time synchronization, it supports writing the current time of the local machine into the local clock of the selected controller.
8. A system using the time synchronization method based on the industrial control system data soft bus as claimed in any one of claims 1 to 7, characterized in that: include: A signal receiving module is used to periodically receive an external precision clock source signal through a time receiving module of a time synchronization master station; The encapsulation module is used to transmit the received external precision clock source signal to the data soft bus interface module, encapsulate it into a time synchronization data packet, and send it to the nodes in the multicast group through the data soft bus; A parsing module is used to receive a time synchronization data packet through a synchronization module of a time synchronization slave station, and pass it to a time synchronization processing module, and the time synchronization processing module parses the timestamp information in the time synchronization data packet; A calculation module, used for calculating the offset between the local clock and the time of the time synchronization master station through the time synchronization processing module; A synchronous data feedback packet generation module, used to perform direct time synchronization or offset correction based on the offset to generate a synchronous data feedback packet; The status confirmation module is used to periodically send synchronization data feedback packets to the synchronization master station through the synchronization slave station to confirm the synchronization success or report the synchronization status; The display module is used to display the UI interface based on the synchronous data feedback package; The View Configuration module is used to view and configure the time synchronization system settings through the UI interface.
9. A computing device comprising: Memory and processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions. When the computer executable instructions are executed by the processor, the steps of the time synchronization method based on the industrial control system data soft bus as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the time synchronization method based on the industrial control system data soft bus as described in any one of claims 1 to 7.