Communication system, method and device integrating SERCOS network and TSN
By calculating the real-time transmission delay of the hub and delaying the transmission time of data frames, the buffer occupation and latency problems caused by data frame jitter in the SERCOS network and TSN converged system are solved, thereby improving the reliability and efficiency of the communication system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-10
- Publication Date
- 2026-03-13
AI Technical Summary
In a communication system that integrates SERCOS network and TSN, the arrival time of data frames at the TSN gateway fluctuates significantly, causing data frames to occupy gateway buffer space, block subsequent data packets, and increase transmission latency.
By obtaining the hub's real-time transmission delay, the timing of sending data frames is calculated and delayed to ensure that data frames arrive at the gateway within a reasonable communication cycle time slot window, thus avoiding buffer space occupation and latency.
It stabilizes the arrival time of data frames at the gateway, improves the reliability of the gateway and the data transmission efficiency of the communication system, and avoids buffer space blockage and increased latency.
Smart Images

Figure CN121664757A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of communication technology, specifically to a communication system, method, and apparatus that integrates SERCOS network and TSN. Background Technology
[0002] In recent years, the convergence of Serial Real-Time Communication Specification (SERCOS) networks and Time-Sensitive Networking (TSN) has become a key technological direction for building high-performance industrial internet and achieving deterministic communication and heterogeneous integration of multiple protocols. SERCOS and TSN networks share a high degree of consistency in their design principles of "time synchronization" and "time slot scheduling." By integrating SERCOS and TSN networks, the superior performance and topological reliability of SERCOS in high-speed motion control can be retained, while also endowing them with the ability to interconnect and share resources, providing a more robust network infrastructure for cross-device collaborative control and flexible manufacturing.
[0003] However, the applicant discovered that in a communication system integrating SERCOS and TSN, the arrival time of data frames at the gateway within the TSN often fluctuates significantly when the SERCOS network sends data frames to the TSN. Since the TSN communication cycle is divided into fixed time slot windows, data frames are only allowed to be sent from the opening to the closing of the corresponding time slot window within the current communication cycle. If the arrival time of a data frame sent by the SERCOS network at the gateway within the TSN fluctuates significantly, the data frame may not arrive at the gateway within the time slot window of the current communication cycle. In this case, the data frame will be buffered by the gateway until the corresponding time slot window of the next communication cycle opens, at which point the gateway will send the data frame to the downstream device within the TSN.
[0004] Therefore, the large jitter in the arrival time of data frames at the gateway in the TSN will cause data frames sent from the SERCOS network to the TSN to occupy the gateway's buffer space, thereby blocking subsequent data packets that arrive on time. In addition, it will also cause delays in the transmission of data frames sent from the SERCOS network to the TSN. This delay will accumulate along the transmission path, resulting in an increase in end-to-end latency. Summary of the Invention
[0005] To address the problems in the related technologies, this disclosure provides a communication system, method, and apparatus that integrates SERCOS network and TSN.
[0006] In a first aspect, this disclosure provides a communication system that integrates a SERCOS network and a TSN. The communication system includes a time-sensitive network (TSN) and a serial real-time communication protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations.
[0007] The main site is configured as follows: Send the first data frame to the hub corresponding to the next slave station in the closed loop.
[0008] In response to receiving the first data frame through the hub corresponding to the slave station preceding the master station in the closed loop, the first reception time of receiving the first data frame is obtained.
[0009] Get the real-time transmission delay of each hub in the multiple hubs at the current time, and get the real-time total transmission delay of the multiple hubs based on the real-time transmission delay of each hub.
[0010] Based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay.
[0011] A first data frame is sent to the gateway at a first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0012] In one embodiment of this disclosure, the TSN further includes a server and a switch, with the server connected to the gateway via the switch.
[0013] The server is also configured as follows: At the second transmission time, a second data frame is sent to the master station via the switch. This second transmission time occurs after the start time of the current communication cycle, and the time difference between the second transmission time and the cycle start time is based on x2=f. mn.offset -((f 2.length The second transmission delay time x2 is obtained by calculating ( / BW)+(l2 / C)), where f mn.offset f is the preset third transmission delay duration. 2.lengthl1 represents the data length of the second data frame, and l2 represents the length of the communication medium between the server and the master station.
[0014] The main site is also configured as follows: In response to receiving the second data frame sent by the server through the switch, the second data frame is sent to the slave station connected to the next hub of the master station in the closed loop through the third transmission time. The third transmission time is after the start time of the cycle, and the time difference between the third transmission time and the start time of the cycle is the third transmission delay duration.
[0015] In one embodiment of this disclosure, f mn.offset Through f mn.offset =G+(f 2.length The value is calculated as ( / BW)+(l2 / C), where G is the preset protection time interval.
[0016] In one embodiment of this disclosure, the master station is further configured as follows: Send a calibration data frame to the hub corresponding to the next slave station in the closed loop.
[0017] Any one of the multiple hubs is configured as follows: If any hub is the hub corresponding to the next slave station after the master station in the closed loop, then it receives the calibration data frame sent by the master station. If any hub is not the hub corresponding to the next slave station after the master station in the closed loop, then it receives the calibration data frame sent by the hub corresponding to the previous slave station of any hub in the closed loop.
[0018] Record the entry time of the calibration data frame into any hub port and the exit time of any hub port, and obtain the calibration transmission delay corresponding to any hub based on the entry and exit times, and insert the calibration transmission delay into the calibration data frame.
[0019] If any hub is not the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the hub corresponding to the following slave station of any hub in the closed loop. If any hub is the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the master station.
[0020] The main site is also configured as follows: Receive the calibration data frame sent by the hub corresponding to the slave station preceding the master station in the closed loop, parse the calibration data frame, and obtain the calibration transmission delay corresponding to each hub among multiple hubs.
[0021] The maximum transmission delay is determined from the maximum rated transmission delay of each hub.
[0022] In one embodiment of this disclosure, the master station is further configured as follows: Before sending the calibration data frame to the hub corresponding to the next slave station in the closed loop, disconnect the connection between the master station and the gateway, and disable the function of the master station to send service instructions to any of the multiple slave stations.
[0023] Before sending the first data frame to the hub corresponding to the next slave station in the closed loop, the connection between the master station and the gateway is restored, and the function of sending service instructions from the master station to any of the multiple slave stations is unblocked.
[0024] Secondly, this disclosure provides a control method for a communication system that integrates a SERCOS network and a TSN. The communication system includes a time-sensitive network (TSN) and a serial real-time communication protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations.
[0025] The method is applied to the main station, and the method includes: Send the first data frame to the hub corresponding to the next slave station in the closed loop.
[0026] In response to receiving the first data frame through the hub corresponding to the slave station preceding the master station in the closed loop, the first reception time of receiving the first data frame is obtained.
[0027] Get the real-time transmission delay of each hub in the multiple hubs at the current time, and get the real-time total transmission delay of the multiple hubs based on the real-time transmission delay of each hub.
[0028] Based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay.
[0029] A first data frame is sent to the gateway at a first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0030] In one embodiment of this disclosure, the TSN further includes a server and a switch, with the server connected to the gateway via the switch.
[0031] The method further includes: In response to receiving the second data frame sent by the server through the switch, the second data frame is sent to the slave station connected to the next hub of the master station in the closed loop through the third transmission time. The third transmission time is after the start time of the current communication cycle, and the time difference between the third transmission time and the start time of the cycle is a preset third transmission delay duration.
[0032] The second data frame is sent by the server to the master station via the switch at the second transmission time. This second transmission time occurs after the start of the period, and the time difference between the second transmission time and the start of the period is based on x2=f. mn.offset -((f 2.length The second transmission delay time x2 is obtained by calculating ( / BW)+(l2 / C)), where f mn.offset f is the third transmission delay duration. 2.length l1 represents the data length of the second data frame, and l2 represents the length of the communication medium between the server and the master station.
[0033] In one embodiment of this disclosure, f mn.offset Through f mn.offset =G+(f 2.length The value is calculated as ( / BW)+(l2 / C), where G is the preset protection time interval.
[0034] In one embodiment of this disclosure, before sending the first data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Send a calibration data frame to the hub corresponding to the next slave station in the closed loop.
[0035] Any one of the multiple hubs is used to perform the following steps: If any hub is the hub corresponding to the next slave station after the master station in the closed loop, then it receives the calibration data frame sent by the master station. If any hub is not the hub corresponding to the next slave station after the master station in the closed loop, then it receives the calibration data frame sent by the hub corresponding to the previous slave station of any hub in the closed loop.
[0036] Record the entry time of the calibration data frame into any hub port and the exit time of any hub port, and obtain the calibration transmission delay corresponding to any hub based on the entry and exit times, and insert the calibration transmission delay into the calibration data frame.
[0037] If any hub is not the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the hub corresponding to the following slave station of any hub in the closed loop. If any hub is the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the master station.
[0038] The method further includes: Receive the calibration data frame sent by the hub corresponding to the slave station preceding the master station in the closed loop, parse the calibration data frame, and obtain the calibration transmission delay corresponding to each hub among multiple hubs.
[0039] The maximum transmission delay is determined from the maximum rated transmission delay of each hub.
[0040] In one embodiment of this disclosure, before sending a calibration data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Disconnect the connection between the master station and the gateway, and disable the function of the master station to send business instructions to any of the multiple slave stations.
[0041] Before sending the first data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Restore the connection between the master station and the gateway, and remove the block on the function of the master station sending business instructions to any of the multiple slave stations.
[0042] Thirdly, this disclosure provides a control device for a communication system that integrates a SERCOS network and a TSN. The communication system includes a time-sensitive network (TSN) and a serial real-time communication protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations.
[0043] The device is located at the main station, and the device includes: The first data frame sending module is configured to send the first data frame to the hub corresponding to the next slave station in the closed loop.
[0044] The receive time acquisition module is configured to acquire the first receive time of receiving the first data frame in response to receiving the first data frame through the hub corresponding to the previous slave station in the closed loop.
[0045] The transmission delay acquisition module is configured to acquire the real-time transmission delay of each of the multiple hubs at the current moment, and to obtain the real-time total transmission delay of the multiple hubs based on the real-time transmission delay of each hub.
[0046] The send delay acquisition module is configured to be based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay.
[0047] The second data frame sending module is configured to send a first data frame to the gateway at a first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0048] Thirdly, embodiments of this disclosure provide an electronic device including a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method as described in any one of the first aspects.
[0049] Fourthly, this disclosure provides a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the method as described in any one of the first aspects.
[0050] According to the technical solution provided in this disclosure, the communication system includes a Time-Based Network (TSN) and a Serial Real-Time Communication Protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations. The master station is configured to: send a first data frame to the hub corresponding to the next slave station in the closed loop; in response to receiving the first data frame through the hub corresponding to the previous slave station in the closed loop, obtain the first reception time of the first data frame; obtain the real-time transmission delay of each hub in the multiple hubs at the current time, and obtain the total real-time transmission delay of the multiple hubs based on the real-time transmission delay of each hub; based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame.max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay; a first data frame is sent to the gateway at the first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0051] In the above scheme, when the master station receives the first data frame sent by the slave station connected to the previous hub in the closed loop, it does not immediately send the first data frame to the gateway. Instead, it sends it to the gateway after a first transmission delay period. Since the first transmission delay can be understood as the longest possible delay in the process of the first data frame being sent from the master station, traversing all slave stations in the SERCOS network through a closed loop, and then returning to the master station, it can be assumed that even if the arrival time of the first data frame at the master station is jittered due to a certain transmission delay of the hub in the closed loop, the arrival time of the first data frame at the master station will not be later than the first transmission time. Therefore, even if the total transmission delay jitter of the hub in the closed loop is large, it will not affect the first transmission time of the master station sending the first data frame to the gateway. The first transmission time is relatively stable, thus ensuring that the jitter of the arrival time of the first data frame at the gateway is small. This allows the gateway to reasonably configure the corresponding time slot window in the communication cycle, so that the first data frame can arrive at the gateway during the period from the opening to the closing of the corresponding time slot window in the current communication cycle, and thus be stably forwarded by the gateway. This avoids the first data frame occupying the gateway's buffer space, preventing it from blocking subsequent data packets that arrive on time, thus improving the reliability of the gateway. In addition, the above scheme will not cause a delay in the transmission of the first data frame, thereby improving the data transmission efficiency of the above communication system.
[0052] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0053] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings: Figure 1 A schematic diagram of the structure of a communication system that integrates a SERCOS network and a TSN according to an embodiment of the present disclosure is shown.
[0054] Figure 2 A flowchart illustrating a control method for a communication system integrating a SERCOS network and a TSN according to an embodiment of the present disclosure is shown.
[0055] Figure 3A structural block diagram of a control device for a communication system integrating a SERCOS network and a TSN according to an embodiment of the present disclosure is shown.
[0056] Figure 4 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0057] Figure 5 A schematic diagram of the structure of a computer system suitable for implementing the method according to embodiments of the present disclosure is shown. Detailed Implementation
[0058] In the following, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to enable those skilled in the art to readily implement them. Furthermore, for clarity, portions unrelated to the description of exemplary embodiments have been omitted from the drawings.
[0059] In this disclosure, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, figures, steps, behaviors, components, parts or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the presence or addition of one or more other features, figures, steps, behaviors, components, parts or combinations thereof.
[0060] It should also be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0061] In this disclosure, any operation involving the acquisition of user information or user data, or the display of user information or user data to others, is an operation authorized or confirmed by the user, or actively selected by the user.
[0062] The applicant discovered that in a communication system that integrates SERCOS network and TSN, when the SERCOS network sends data frames to the TSN, the arrival time of the data frames at the gateway in the TSN often fluctuates significantly.
[0063] In SERCOS networks, each hub has a certain transmission delay, and this delay is subject to jitter, resulting in a significant jitter in the total transmission delay across all hubs. When a SERCOS network sends data frames to a TSN, the arrival time of the data frame at the TSN gateway is easily affected by the timing of the master station sending data frames to slave stations and the total transmission delay of the hubs. Since the jitter in the total transmission delay caused by the hubs in a SERCOS network is significant, the jitter in the arrival time of the data frame at the TSN gateway is also substantial.
[0064] Because the communication cycle of TSN is divided into fixed time slot windows, data frames are only allowed to be sent from the opening to the closing of the corresponding time slot window of the current communication cycle. If the jitter of the time when the data frame sent by the master station in the SERCOS network arrives at the gateway in the TSN is large, the data frame may not arrive at the gateway in the TSN during the period from the opening to the closing of the corresponding time slot window of the current communication cycle. In this case, the data frame will be buffered by the gateway until the corresponding time slot window of the next communication cycle opens, at which point the gateway will send the data frame to the downstream device of the gateway in the TSN.
[0065] Therefore, the jitter in the arrival time of data frames sent by the master station in the SERCOS network to the gateway in the TSN is large. This will cause the data frames sent by the SERCOS network to the TSN to occupy the gateway's buffer space, thereby blocking subsequent data packets that arrive on time. In addition, it will also cause the transmission of data frames sent by the SERCOS network to the TSN to be delayed. This delay will accumulate along the transmission path, resulting in an increase in end-to-end latency.
[0066] To address the aforementioned issues, this disclosure provides a communication system, method, and apparatus that integrates SERCOS networks and TSN.
[0067] According to the technical solution provided in this disclosure, the communication system includes a Time-Based Network (TSN) and a Serial Real-Time Communication Protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations. The master station is configured to: send a first data frame to the hub corresponding to the next slave station in the closed loop; in response to receiving the first data frame through the hub corresponding to the previous slave station in the closed loop, obtain the first reception time of the first data frame; obtain the real-time transmission delay of each hub in the multiple hubs at the current time, and obtain the total real-time transmission delay of the multiple hubs based on the real-time transmission delay of each hub; based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay; a first data frame is sent to the gateway at the first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0068] In the above scheme, when the master station receives the first data frame sent by the slave station connected to the previous hub in the closed loop, it does not immediately send the first data frame to the gateway. Instead, it sends it to the gateway after a first transmission delay period. Since the first transmission delay can be understood as the longest possible delay in the process of the first data frame being sent from the master station, traversing all slave stations in the SERCOS network through a closed loop, and then returning to the master station, it can be assumed that even if the arrival time of the first data frame at the master station is jittered due to a certain transmission delay of the hub in the closed loop, the arrival time of the first data frame at the master station will not be later than the first transmission time. Therefore, even if the total transmission delay jitter of the hub in the closed loop is large, it will not affect the first transmission time of the master station sending the first data frame to the gateway. The first transmission time is relatively stable, thus ensuring that the jitter of the arrival time of the first data frame at the gateway is small. This allows the gateway to reasonably configure the corresponding time slot window in the communication cycle, so that the first data frame can arrive at the gateway during the period from the opening to the closing of the corresponding time slot window in the current communication cycle, and thus be stably forwarded by the gateway. This avoids the first data frame occupying the gateway's buffer space, preventing it from blocking subsequent data packets that arrive on time, thus improving the reliability of the gateway. In addition, the above scheme will not cause a delay in the transmission of the first data frame, thereby improving the data transmission efficiency of the above communication system.
[0069] This disclosure provides a communication system that integrates a SERCOS network and a TSN. The communication system includes a time-sensitive network (TSN) and a serial real-time communication protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations.
[0070] For example, a SERCOS network in a communication system includes three slave stations and a hub corresponding to each slave station. Figure 1 A schematic diagram of the structure of a communication system integrating a SERCOS network and a TSN according to an embodiment of the present disclosure is shown. Figure 1As shown, the communication system includes a time-sensitive network (TSN) 100 and a serial real-time communication protocol (SERCOS) network 200. The TSN 100 includes a gateway 101, and the SERCOS network 200 includes a master station 201, a slave station 212, a hub 213 corresponding to the slave station 212, a slave station 222, a hub 223 corresponding to the slave station 222, a slave station 232, and a hub 233 corresponding to the slave station 232. The gateway 101 is connected to the master station 201. The master station 201 forms a closed loop with the slave stations 212, 222, and 232 through the hubs 213, 223, and 233 corresponding to the slave stations 212, 222, and 232, respectively.
[0071] The main site 201 is configured as follows: Send the first data frame to the hub corresponding to the next slave station in the closed loop.
[0072] In response to receiving the first data frame through the hub corresponding to the slave station preceding the master station in the closed loop, the first reception time of receiving the first data frame is obtained.
[0073] Get the real-time transmission delay of each hub in the multiple hubs at the current time, and get the real-time total transmission delay of the multiple hubs based on the real-time transmission delay of each hub.
[0074] Based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay.
[0075] A first data frame is sent to the gateway at a first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0076] In one implementation of this disclosure, in the SERCOS network of the aforementioned communication system, the data transmission path is as follows: Master station 201 sends a first data frame to hub 213 corresponding to the next slave station 212 in the closed loop. Hub 213 receives the first data frame sent by master station 201 and sends the first data frame to its corresponding slave station 212 and hub 223 corresponding to the next slave station 222 in the closed loop. Hub 223 receives the first data frame sent by hub 213 and sends the first data frame to its corresponding slave station 222 and hub 233 corresponding to the next slave station 232 in the closed loop. Hub 233 receives the first data frame sent by hub 223 and sends the first data frame to its corresponding slave station 232 and master station 201 in the closed loop.
[0077] In one implementation of this disclosure, the real-time transmission delay of a hub can be understood as the time difference between the moment a data frame enters the hub's port and the moment it leaves the hub's port. Obtaining the real-time transmission delay of each of the multiple hubs at the current moment can be achieved by periodically collecting its own real-time transmission delay and returning it to the master station. Obtaining the total real-time transmission delay of the multiple hubs based on the real-time transmission delay of each hub can be understood as adding the real-time transmission delays of each hub together.
[0078] In one implementation of this disclosure, f1.length / BW can be considered as the time it takes for a data frame to occupy the transmission medium in a SERCOS network link; l1 / C can be considered as the time it takes for a data frame to propagate in a closed loop medium; n×Delay max This can be considered as the total transmission delay of a data frame after passing through all n hubs in the worst-case scenario; (f 1.length / BW)+(l1 / C)+n×Delay max It can be regarded as the theoretical maximum total time for data frames to be transmitted in the SERCOS network, that is, the worst-case sum of the three types of critical delays that may occur from the time the first data frame is initiated to the completion of the closed loop.
[0079] In the technical solution provided by the embodiments of this disclosure, when the master station receives the first data frame sent by the slave station connected to the previous hub in the closed loop, it does not immediately send the first data frame to the gateway, but delays the first transmission delay time and then sends it to the gateway at the first transmission time. Since the first transmission delay can be understood as the longest possible delay in the process of the first data frame being sent from the master station, traversing all slave stations in the SERCOS network through a closed loop, and then returning to the master station, it can be assumed that even if the arrival time of the first data frame at the master station is jittered due to a certain transmission delay of the hub in the closed loop, the arrival time of the first data frame at the master station will not be later than the first transmission time. Therefore, even if the total transmission delay jitter of the hub in the closed loop is large, it will not affect the first transmission time of the master station sending the first data frame to the gateway. The first transmission time is relatively stable, thus ensuring that the jitter of the arrival time of the first data frame at the gateway is small. This allows the gateway to reasonably configure the corresponding time slot window in the communication cycle, so that the first data frame can arrive at the gateway during the period from the opening to the closing of the corresponding time slot window in the current communication cycle, and thus be stably forwarded by the gateway. This avoids the first data frame occupying the gateway's buffer space, preventing it from blocking subsequent data packets that arrive on time, thus improving the reliability of the gateway. In addition, the above scheme will not cause a delay in the transmission of the first data frame, thereby improving the data transmission efficiency of the above communication system.
[0080] In one embodiment of this disclosure, such as Figure 1 As shown, in the communication system, TSN 100 also includes server 102 and switch 103, with server 102 connected to gateway 101 via switch 103.
[0081] Server 102 is also configured as follows: At the second transmission time, a second data frame is sent to the master station via the switch. This second transmission time occurs after the start time of the current communication cycle, and the time difference between the second transmission time and the cycle start time is based on x2=f. mn.offset -((f 2.length The second transmission delay time x2 is obtained by calculating ( / BW)+(l2 / C)), where f mn.offset f is the preset third transmission delay duration. 2.length l1 represents the data length of the second data frame, and l2 represents the length of the communication medium between the server and the master station.
[0082] The main site is also configured as follows: In response to receiving the second data frame sent by the server through the switch, the second data frame is sent to the slave station connected to the next hub of the master station in the closed loop through the third transmission time. The third transmission time is after the start time of the cycle, and the time difference between the third transmission time and the start time of the cycle is the third transmission delay duration.
[0083] In one implementation of this disclosure, f mn.offset It can be done through f mn.offset =G+(f 2.length The value is calculated as ( / BW) + (l2 / C), where G is the preset protection time interval. Among them, (f 2.length / BW)+(l2 / C) can be considered as the theoretical maximum total time taken for a data frame to be transmitted in the TSN, therefore f mn.offset This can be considered as the theoretical maximum total time plus a protection time interval G used for safety buffering, where G serves as the protection time interval to compensate for minor jitter or burst delays in actual transmission, avoiding timing conflicts, thereby ensuring that f mn.offset It can cover the maximum transmission delay within the closed loop of the TSN network, and also reserves security redundancy to ensure its reliability as the master station forwarding timing reference.
[0084] In the technical solution provided by the embodiments of this disclosure, firstly, the server is configured to send a second data frame to the master station through a switch at a second transmission time, wherein the time difference between the second transmission time and the start time of the cycle is the second transmission delay duration. Specifically, by delaying the transmission of the second data frame by the second transmission delay duration from the start time of the cycle, the server ensures that when the second data frame is transmitted to the master station through the switch, the master station can forward the second data frame to the slave station in the closed loop precisely at the third transmission time. This avoids the second data frame arriving at the master station too early or too late due to data transmission delays in the TSN, and ensures that the arrival time of the second data frame at the master station accurately matches the timing window of the SERCOS network communication cycle, preventing problems such as buffer blockage or data loss caused by improper reception timing at the master station. Secondly, the master station is configured to respond to receiving the second data frame sent by the server through the switch, and at the third transmission time, send the second data frame to the slave station connected to the next hub in the closed loop through the master station. The third transmission time is after the start time of the cycle, and the time difference between the third transmission time and the start time of the cycle is a preset third transmission delay duration. This ensures that the second data frame is transmitted to the slave station in a fixed sequence in the closed loop of the SERCOS network, thereby ensuring the synchronization of the slave station's execution instructions.
[0085] In one embodiment of this disclosure, the master station is further configured as follows: Send a calibration data frame to the hub corresponding to the next slave station in the closed loop.
[0086] Any one of the multiple hubs is configured as follows: If any hub is the hub corresponding to the next slave station of the master station in the closed loop, then the calibration data frame sent by the master station is received; if any hub is not the hub corresponding to the next slave station of the master station in the closed loop, then the calibration data frame sent by the hub corresponding to the previous slave station of any hub in the closed loop is received.
[0087] Record the entry time of the calibration data frame into any hub port and the exit time of any hub port, and obtain the calibration transmission delay corresponding to any hub based on the entry and exit times, and insert the calibration transmission delay into the calibration data frame.
[0088] If any hub is not the hub corresponding to the previous slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the hub corresponding to the next slave station of the slave station corresponding to any hub in the closed loop; if any hub is the hub corresponding to the previous slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the master station.
[0089] The main site is also configured as follows: Receive the calibration data frame sent by the hub corresponding to the slave station preceding the master station in the closed loop, parse the calibration data frame, and obtain the calibration transmission delay corresponding to each hub among multiple hubs.
[0090] The maximum transmission delay is determined from the maximum rated transmission delay of each hub.
[0091] In the technical solution provided by the embodiments of this disclosure, a calibration data frame is sent by the master station and transmitted along a closed loop. Each hub in the closed loop records the entry / exit time of the calibration data frame and obtains the calibration transmission delay of the hub based on the above times, thereby ensuring that the calibration transmission delay can accurately reflect the delay characteristics of the corresponding hub under actual operating conditions (such as delay fluctuations caused by load and temperature). By parsing the calibration data frame by the master station, extracting the delay of each hub, and taking the maximum value as the maximum transmission delay, the obtained maximum transmission delay can be made to fit the actual scenario, that is, to ensure that the maximum transmission delay can cover the hub delay under the worst case. The above process reuses the closed loop topology in the SERCOS network, without additional hardware overhead, and the data used to calculate the transmission delay is transmitted embedded in the calibration frame, without occupying service bandwidth, thereby reducing costs while improving the accuracy of the obtained maximum transmission delay.
[0092] In one embodiment of this disclosure, the master station is further configured as follows: Before sending the calibration data frame to the hub corresponding to the next slave station in the closed loop, disconnect the connection between the master station and the gateway, and disable the function of the master station to send service instructions to any of the multiple slave stations.
[0093] Before sending the first data frame to the hub corresponding to the next slave station in the closed loop, the connection between the master station and the gateway is restored, and the function of sending service instructions from the master station to any of the multiple slave stations is unblocked.
[0094] In the technical solution provided by the embodiments of this disclosure, by disconnecting the connection between the master station and the gateway before sending the calibration data frame to the hub corresponding to the next slave station in the closed loop, and by blocking the function of the master station sending service instructions to any of the multiple slave stations, the interference of TSN-side data transmission and SERCOS network-side service execution on the transmission of calibration data frames can be completely isolated. This avoids the service frames and calibration data frames competing for bandwidth in the closed loop of the SERCOS network, or the gateway communication introducing additional delays, ensuring that the entry / exit times recorded by the hub can accurately reflect its own transmission delay. By restoring the connection between the master station and the gateway before sending the first data frame to the hub corresponding to the next slave station in the closed loop, and by removing the blocking of the function of the master station sending service instructions to any of the multiple slave stations, the master station system can quickly return to normal operation after obtaining the maximum transmission delay. Therefore, the above solution improves the accuracy of the obtained maximum transmission delay without affecting the normal operation of the communication system as much as possible.
[0095] This disclosure provides a control method for a communication system that integrates SERCOS network and TSN.
[0096] The communication system includes a Time-Based Network (TSN) and a Serial Real-Time Communication Protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with multiple slave stations through the hubs corresponding to the slave stations.
[0097] The method is applied to the main station. Figure 2 A flowchart illustrating a control method for a communication system integrating a SERCOS network and a TSN according to an embodiment of this disclosure is shown. Figure 2 As shown, the control method for the communication system integrating SERCOS network and TSN includes the following steps: In step S101, the first data frame is sent to the hub corresponding to the next slave station in the closed loop.
[0098] In step S102, in response to receiving the first data frame through the hub corresponding to the previous slave station in the closed loop, the first reception time of receiving the first data frame is obtained.
[0099] In step S103, the real-time transmission delay of each hub in the multiple hubs is obtained at the current time, and the real-time total transmission delay of the multiple hubs is obtained based on the real-time transmission delay of each hub.
[0100] In step S104, based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1.
[0101] Where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay.
[0102] In step S105, a first data frame is sent to the gateway at the first transmission time.
[0103] The first transmission time is after the first reception time, and the time difference between the first transmission time and the first reception time is the first transmission delay duration.
[0104] In one embodiment of this disclosure, the TSN further includes a server and a switch, with the server connected to the gateway via the switch.
[0105] The method further includes: In response to receiving the second data frame sent by the server through the switch, the second data frame is sent to the slave station connected to the next hub of the master station in the closed loop through the third transmission time. The third transmission time is after the start time of the current communication cycle, and the time difference between the third transmission time and the start time of the cycle is a preset third transmission delay duration.
[0106] The second data frame is sent by the server to the master station via the switch at the second transmission time. This second transmission time occurs after the start of the period, and the time difference between the second transmission time and the start of the period is based on x2=f. mn.offset -((f 2.length The second transmission delay time x2 is obtained by calculating ( / BW)+(l2 / C)), where f mn.offset f is the third transmission delay duration. 2.lengthl1 represents the data length of the second data frame, and l2 represents the length of the communication medium between the server and the master station.
[0107] In one embodiment of this disclosure, f mn.offset Through f mn.offset =G+(f 2.length The value is calculated as ( / BW)+(l2 / C), where G is the preset protection time interval.
[0108] In one embodiment of this disclosure, before sending the first data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Send a calibration data frame to the hub corresponding to the next slave station in the closed loop.
[0109] Any one of the multiple hubs is used to perform the following steps: If any hub is the hub corresponding to the next slave station after the master station in the closed loop, then it receives the calibration data frame sent by the master station. If any hub is not the hub corresponding to the next slave station after the master station in the closed loop, then it receives the calibration data frame sent by the hub corresponding to the previous slave station of any hub in the closed loop.
[0110] Record the entry time of the calibration data frame into any hub port and the exit time of any hub port, and obtain the calibration transmission delay corresponding to any hub based on the entry and exit times, and insert the calibration transmission delay into the calibration data frame.
[0111] If any hub is not the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the hub corresponding to the following slave station of any hub in the closed loop. If any hub is the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the master station.
[0112] The method further includes: Receive the calibration data frame sent by the hub corresponding to the slave station preceding the master station in the closed loop, parse the calibration data frame, and obtain the calibration transmission delay corresponding to each hub among multiple hubs.
[0113] The maximum transmission delay is determined from the maximum rated transmission delay of each hub.
[0114] In one embodiment of this disclosure, before sending a calibration data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Disconnect the connection between the master station and the gateway, and disable the function of the master station to send business instructions to any of the multiple slave stations.
[0115] Before sending the first data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Restore the connection between the master station and the gateway, and remove the block on the function of the master station sending business instructions to any of the multiple slave stations.
[0116] According to the technical solution provided in this disclosure, the communication system includes a Time-Based Network (TSN) and a Serial Real-Time Communication Protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations. The master station is configured to: send a first data frame to the hub corresponding to the next slave station in the closed loop; in response to receiving the first data frame through the hub corresponding to the previous slave station in the closed loop, obtain the first reception time of the first data frame; obtain the real-time transmission delay of each hub in the multiple hubs at the current time, and obtain the total real-time transmission delay of the multiple hubs based on the real-time transmission delay of each hub; based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay; a first data frame is sent to the gateway at the first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0117] In the above scheme, when the master station receives the first data frame sent by the slave station connected to the previous hub in the closed loop, it does not immediately send the first data frame to the gateway. Instead, it sends it to the gateway after a first transmission delay period. Since the first transmission delay can be understood as the longest possible delay in the process of the first data frame being sent from the master station, traversing all slave stations in the SERCOS network through the closed loop, and then returning to the master station, it can be assumed that even if the arrival time of the first data frame at the master station is jittered due to the transmission delay of the hub in the closed loop, the arrival time of the first data frame at the master station will not be later than the first transmission time. Therefore, even if the total transmission delay jitter of the hub in the closed loop is large, it will not affect the first transmission time of the master station sending the first data frame to the gateway. The first transmission time is relatively stable, thus ensuring that the jitter of the arrival time of the first data frame at the gateway is small. This allows the gateway to reasonably configure the corresponding time slot window in the communication cycle, so that the first data frame can arrive at the gateway during the period from the opening to the closing of the corresponding time slot window in the current communication cycle, and thus be stably forwarded by the gateway. This avoids the first data frame occupying the gateway's buffer space, preventing it from blocking subsequent data packets that arrive on time, thus improving the reliability of the gateway. In addition, the above scheme will not cause a delay in the transmission of the first data frame, thereby improving the data transmission efficiency of the above communication system.
[0118] This disclosure provides a control device for a communication system integrating a SERCOS network and a TSN. The communication system includes a time-sensitive network (TSN) and a SERCOS network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations. The control device for the integrated SERCOS network and TSN communication system is located at the master station. Figure 3 A structural block diagram of a control device for a communication system integrating a SERCOS network and a TSN according to an embodiment of the present disclosure is shown. This device can be implemented as part or all of an electronic device through software, hardware, or a combination of both.
[0119] like Figure 3 As shown, the control device for the communication system integrating SERCOS network and TSN includes: The first data frame sending module 301 is configured to send the first data frame to the hub corresponding to the next slave station in the closed loop.
[0120] The receive time acquisition module 302 is configured to acquire the first receive time of receiving the first data frame in response to receiving the first data frame through the hub corresponding to the slave station preceding the master station in the closed loop.
[0121] The transmission delay acquisition module 303 is configured to acquire the real-time transmission delay of each of the multiple hubs at the current moment, and to obtain the real-time total transmission delay of the multiple hubs based on the real-time transmission delay of each hub.
[0122] The transmission delay acquisition module 304 is configured to be based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay.
[0123] The second data frame sending module 305 is configured to send a first data frame to the gateway at a first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0124] According to the technical solution provided in this disclosure, the communication system includes a Time-Based Network (TSN) and a Serial Real-Time Communication Protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations. The master station is configured to: send a first data frame to the hub corresponding to the next slave station in the closed loop; in response to receiving the first data frame through the hub corresponding to the previous slave station in the closed loop, obtain the first reception time of the first data frame; obtain the real-time transmission delay of each hub in the multiple hubs at the current time, and obtain the total real-time transmission delay of the multiple hubs based on the real-time transmission delay of each hub; based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. maxt represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay; a first data frame is sent to the gateway at the first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0125] In the above scheme, when the master station receives the first data frame sent by the slave station connected to the previous hub in the closed loop, it does not immediately send the first data frame to the gateway. Instead, it sends it to the gateway after a first transmission delay period. Since the first transmission delay can be understood as the longest possible delay in the process of the first data frame being sent from the master station, traversing all slave stations in the SERCOS network through the closed loop, and then returning to the master station, it can be assumed that even if the arrival time of the first data frame at the master station is jittered due to the transmission delay of the hub in the closed loop, the arrival time of the first data frame at the master station will not be later than the first transmission time. Therefore, even if the total transmission delay jitter of the hub in the closed loop is large, it will not affect the first transmission time of the master station sending the first data frame to the gateway. The first transmission time is relatively stable, thus ensuring that the jitter of the arrival time of the first data frame at the gateway is small. This allows the gateway to reasonably configure the corresponding time slot window in the communication cycle, so that the first data frame can arrive at the gateway during the period from the opening to the closing of the corresponding time slot window in the current communication cycle, and thus be stably forwarded by the gateway. This avoids the first data frame occupying the gateway's buffer space, preventing it from blocking subsequent data packets that arrive on time, thus improving the reliability of the gateway. In addition, the above scheme will not cause a delay in the transmission of the first data frame, thereby improving the data transmission efficiency of the above communication system.
[0126] This disclosure also discloses an electronic device. Figure 4 A structural block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0127] like Figure 4 As shown, the electronic device includes a memory and a processor, wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method according to embodiments of the present disclosure.
[0128] This disclosure provides a control method for a communication system that integrates a SERCOS network and a TSN. The communication system includes a time-sensitive network (TSN) and a serial real-time communication protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations.
[0129] The method is applied to the main station, and the method includes: Send the first data frame to the hub corresponding to the next slave station in the closed loop.
[0130] In response to receiving the first data frame through the hub corresponding to the slave station preceding the master station in the closed loop, the first reception time of receiving the first data frame is obtained.
[0131] Get the real-time transmission delay of each hub in the multiple hubs at the current time, and get the real-time total transmission delay of the multiple hubs based on the real-time transmission delay of each hub.
[0132] Based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length L1 is the data length of the first data frame, BW is the bandwidth of the network in the communication system, l1 is the length of the communication medium of the closed loop, C is the speed at which the signal is transmitted in the communication medium of the communication system, and Delay is the data length of the first data frame. max t represents the maximum transmission delay of a hub among multiple hubs, n represents the number of hubs among multiple hubs, and t represents the total real-time transmission delay.
[0133] A first data frame is sent to the gateway at a first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
[0134] In one embodiment of this disclosure, the TSN further includes a server and a switch, with the server connected to the gateway via the switch.
[0135] The method further includes: In response to receiving the second data frame sent by the server through the switch, the second data frame is sent to the slave station connected to the next hub of the master station in the closed loop through the third transmission time. The third transmission time is after the start time of the current communication cycle, and the time difference between the third transmission time and the start time of the cycle is a preset third transmission delay duration.
[0136] The second data frame is sent by the server to the master station via the switch at the second transmission time. This second transmission time occurs after the start of the period, and the time difference between the second transmission time and the start of the period is based on x2=f. mn.offset -((f 2.length The second transmission delay time x2 is obtained by calculating ( / BW)+(l2 / C)), where f mn.offset f is the third transmission delay duration. 2.lengthl1 represents the data length of the second data frame, and l2 represents the length of the communication medium between the server and the master station.
[0137] In one embodiment of this disclosure, f mn.offset Through f mn.offset =G+(f 2.length The value is calculated as ( / BW)+(l2 / C), where G is the preset protection time interval.
[0138] In one embodiment of this disclosure, before sending the first data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Send a calibration data frame to the hub corresponding to the next slave station in the closed loop.
[0139] Any one of the multiple hubs is used to perform the following steps: If any hub is the hub corresponding to the next slave station after the master station in the closed loop, then it receives the calibration data frame sent by the master station. If any hub is not the hub corresponding to the next slave station after the master station in the closed loop, then it receives the calibration data frame sent by the hub corresponding to the previous slave station of any hub in the closed loop.
[0140] Record the entry time of the calibration data frame into any hub port and the exit time of any hub port, and obtain the calibration transmission delay corresponding to any hub based on the entry and exit times, and insert the calibration transmission delay into the calibration data frame.
[0141] If any hub is not the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the hub corresponding to the following slave station of any hub in the closed loop. If any hub is the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the master station.
[0142] The method further includes: Receive the calibration data frame sent by the hub corresponding to the slave station preceding the master station in the closed loop, parse the calibration data frame, and obtain the calibration transmission delay corresponding to each hub among multiple hubs.
[0143] The maximum transmission delay is determined from the maximum rated transmission delay of each hub.
[0144] In one embodiment of this disclosure, before sending a calibration data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Disconnect the connection between the master station and the gateway, and disable the function of the master station to send business instructions to any of the multiple slave stations.
[0145] Before sending the first data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Restore the connection between the master station and the gateway, and remove the block on the function of the master station sending business instructions to any of the multiple slave stations.
[0146] Figure 5 A schematic diagram of the structure of a computer system suitable for implementing the method according to embodiments of the present disclosure is shown.
[0147] like Figure 5 As shown, the computer system includes a processing unit that can execute various methods described above based on a program stored in a read-only memory (ROM) or a program loaded from a storage portion into a random access memory (RAM). The RAM also stores various programs and data required for the operation of the computer system. The processing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0148] The following components are connected to the I / O interface: input sections including keyboards, mice, etc.; output sections including cathode ray tubes (CRTs), liquid crystal displays (LCDs), and speakers; storage sections including hard disks; and communication sections including network interface cards such as LAN cards and modems. The communication section performs communication processes via a network such as the Internet. Drives are also connected to the I / O interface as needed. Removable media, such as disks, optical disks, magneto-optical disks, semiconductor memories, etc., are installed on the drive as needed so that computer programs read from them can be installed into the storage section as required. The processing unit can be implemented as a CPU, GPU, TPU, FPGA, NPU, etc.
[0149] In particular, according to embodiments of this disclosure, the methods described above can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing the methods described above. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium.
[0150] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0151] The units or modules described in the embodiments of this disclosure can be implemented in software or programmable hardware. The described units or modules can also be located in a processor, and the names of these units or modules do not necessarily constitute a limitation on the unit or module itself.
[0152] In another aspect, this disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system described above; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to perform the methods described in this disclosure.
[0153] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
Claims
1. A communication system integrating SERCOS network and TSN, characterized in that, The communication system includes a Time-Based Network (TSN) and a Serial Real-Time Communication Protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations. The main station is configured as follows: Send the first data frame to the hub corresponding to the next slave station of the master station in the closed loop; In response to receiving the first data frame through the hub corresponding to the slave station preceding the master station in the closed loop, the first reception time of receiving the first data frame is obtained; Obtain the real-time transmission delay of each of the multiple hubs at the current moment, and obtain the total real-time transmission delay of the multiple hubs based on the real-time transmission delay of each hub. Based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length Where BW is the data length of the first data frame, L1 is the bandwidth of the network in the communication system, C is the length of the communication medium of the closed loop, and Delay is the transmission speed of the signal in the communication medium of the communication system. max Let n be the maximum transmission delay of the hub among the plurality of hubs, n be the number of hubs among the plurality of hubs, and t be the total real-time transmission delay; The first data frame is sent to the gateway at a first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
2. The communication system integrating SERCOS network and TSN according to claim 1, characterized in that, The TSN also includes a server and a switch, with the server connected to the gateway via the switch; The server is also configured as follows: At the second transmission time, a second data frame is sent to the master station through the switch, wherein the second transmission time is after the start time of the current communication cycle, and the time difference between the second transmission time and the start time of the cycle is based on x2=f. mn.offset -((f 2.length The second transmission delay time x2 is obtained by calculating ( / BW)+(l2 / C)), where f mn.offset f is the preset third transmission delay duration. 2.length l1 is the data length of the second data frame, and l2 is the length of the communication medium from the server to the master station; The main station is also configured as follows: In response to receiving a second data frame sent by the server through the switch, the second data frame is sent to the slave station connected to the next hub of the master station in the closed loop at a third transmission time, wherein the third transmission time is after the start time of the cycle, and the time difference between the third transmission time and the start time of the cycle is the third transmission delay duration.
3. The communication system integrating SERCOS network and TSN according to claim 2, characterized in that, The f mn.offset Through f mn.offset =G+(f 2.length The value is calculated as ( / BW)+(l2 / C), where G is the preset protection time interval.
4. The communication system integrating SERCOS network and TSN according to claim 1, characterized in that, The main station is also configured as follows: Send a calibration data frame to the hub corresponding to the next slave station of the master station in the closed loop; Any one of the plurality of hubs is configured as follows: If any of the hubs is the hub corresponding to the next slave station of the master station in the closed loop, then the calibration data frame sent by the master station is received. If any of the hubs is not the hub corresponding to the next slave station of the master station in the closed loop, then the calibration data frame sent by the hub corresponding to the previous slave station of the slave station corresponding to any of the hubs in the closed loop is received. Record the entry time of the calibration data frame into the port of any hub and the exit time of the port of any hub, and obtain the calibration transmission delay corresponding to any hub based on the entry time and the exit time, and insert the calibration transmission delay into the calibration data frame. If any of the hubs is not the hub corresponding to the previous slave station of the master station in the closed loop, then send the inserted calibration data frame to the hub corresponding to the next slave station of the slave station corresponding to any of the hubs in the closed loop. If any of the hubs is the hub corresponding to the slave station preceding the master station in the closed loop, then the inserted calibration data frame is sent to the master station. The main station is also configured as follows: The calibration data frame sent by the hub corresponding to the slave station preceding the master station in the closed loop is received, and the calibration data frame is parsed to obtain the calibration transmission delay corresponding to each of the plurality of hubs. The maximum transmission delay is determined from the rated transmission delays corresponding to each hub.
5. The communication system integrating SERCOS network and TSN according to claim 4, characterized in that, The main station is also configured as follows: Before sending the calibration data frame to the hub corresponding to the next slave station in the closed loop, the connection between the master station and the gateway is disconnected, and the function of the master station sending service instructions to any of the multiple slave stations is blocked. Before sending the first data frame to the hub corresponding to the next slave station in the closed loop, the connection between the master station and the gateway is restored, and the function of the master station sending service instructions to any of the multiple slave stations is unblocked.
6. A control method for a communication system integrating SERCOS network and TSN, characterized in that, The communication system includes a Time-Based Network (TSN) and a Serial Real-Time Communication Protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations. The method is applied to the main station, and the method includes: Send the first data frame to the hub corresponding to the next slave station of the master station in the closed loop; In response to receiving the first data frame through the hub corresponding to the slave station preceding the master station in the closed loop, the first reception time of receiving the first data frame is obtained; Obtain the real-time transmission delay of each of the multiple hubs at the current moment, and obtain the total real-time transmission delay of the multiple hubs based on the real-time transmission delay of each hub. Based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length Where BW is the data length of the first data frame, L1 is the bandwidth of the network in the communication system, C is the length of the communication medium of the closed loop, and Delay is the transmission speed of the signal in the communication medium of the communication system. max Let n be the maximum transmission delay of the hub among the plurality of hubs, n be the number of hubs among the plurality of hubs, and t be the total real-time transmission delay; The first data frame is sent to the gateway at a first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
7. The control method for the communication system integrating SERCOS network and TSN according to claim 6, characterized in that, The TSN also includes a server and a switch, with the server connected to the gateway via the switch; The method further includes: In response to receiving a second data frame sent by the server through the switch, the second data frame is sent to the slave station connected to the next hub of the master station in the closed loop at a third sending time, wherein the third sending time is after the start time of the current communication cycle, and the time difference between the third sending time and the start time of the cycle is a preset third sending delay duration. The second data frame is sent by the server to the master station through the switch at a second transmission time, wherein the second transmission time is after the start time of the period, and the time difference between the second transmission time and the start time of the period is based on x2=f. mn.offset -((f 2.length The second transmission delay time x2 is obtained by calculating ( / BW)+(l2 / C)), where f mn.offset f is the third transmission delay duration. 2.length l1 is the data length of the second data frame, and l2 is the length of the communication medium from the server to the master station.
8. The control method for the communication system integrating SERCOS network and TSN according to claim 7, characterized in that, The f mn.offset Through f mn.offset =G+(f 2.length The value is calculated as ( / BW)+(l2 / C), where G is the preset protection time interval.
9. The control method for the communication system integrating SERCOS network and TSN according to claim 6, characterized in that, Before sending the first data frame to the hub corresponding to the next slave station of the master station in the closed loop, the method further includes: Send a calibration data frame to the hub corresponding to the next slave station of the master station in the closed loop; Any one of the plurality of hubs is used to perform the following steps: If any of the hubs is the hub corresponding to the next slave station of the master station in the closed loop, then the calibration data frame sent by the master station is received; if any of the hubs is not the hub corresponding to the next slave station of the master station in the closed loop, then the calibration data frame sent by the hub corresponding to the previous slave station of any of the hubs in the closed loop is received. Record the entry time of the calibration data frame into the port of any hub and the exit time of the port of any hub, and obtain the calibration transmission delay corresponding to any hub based on the entry time and the exit time, and insert the calibration transmission delay into the calibration data frame. If any of the hubs is not the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the hub corresponding to the following slave station of the slave station corresponding to any of the hubs in the closed loop; if any of the hubs is the hub corresponding to the preceding slave station of the master station in the closed loop, then the inserted calibration data frame is sent to the master station. The method further includes: The calibration data frame sent by the hub corresponding to the slave station preceding the master station in the closed loop is received, and the calibration data frame is parsed to obtain the calibration transmission delay corresponding to each of the plurality of hubs. The maximum transmission delay is determined from the rated transmission delays corresponding to each hub.
10. The control method for the communication system integrating SERCOS network and TSN according to claim 9, characterized in that, Before sending the calibration data frame to the hub corresponding to the next slave station in the closed loop, the method further includes: Disconnect the connection between the master station and the gateway, and disable the function of the master station to send service instructions to any of the multiple slave stations; Before sending the first data frame to the hub corresponding to the next slave station in the closed loop of the master station, the method further includes: Restore the connection between the master station and the gateway, and remove the block on the function of the master station to send service instructions to any of the multiple slave stations.
11. A control device for a communication system integrating SERCOS network and TSN, characterized in that, The communication system includes a Time-Based Network (TSN) and a Serial Real-Time Communication Protocol (SERCOS) network. The TSN includes a gateway, and the SERCOS network includes a master station, multiple slave stations, and a hub corresponding to each slave station. The gateway is connected to the master station, and the master station forms a closed loop with the multiple slave stations through the hubs corresponding to the slave stations. The device is located at the main station, and the device includes: The first data frame sending module is configured to send a first data frame to the hub corresponding to the next slave station of the master station in the closed loop; The receiving time acquisition module is configured to acquire the first receiving time of receiving the first data frame in response to receiving the first data frame through the hub corresponding to the previous slave station of the master station in the closed loop. The transmission delay acquisition module is configured to acquire the real-time transmission delay of each of the plurality of hubs at the current moment, and to obtain the real-time total transmission delay of the plurality of hubs based on the real-time transmission delay of each hub. The send delay acquisition module is configured to be based on x1=(f 1.length / BW)+(l1 / C)+n×Delay max -t calculates the first transmission delay duration x1, where f 1.length Where BW is the data length of the first data frame, L1 is the bandwidth of the network in the communication system, C is the length of the communication medium of the closed loop, and Delay is the transmission speed of the signal in the communication medium of the communication system. max Let n be the maximum transmission delay of the hub among the plurality of hubs, n be the number of hubs among the plurality of hubs, and t be the total real-time transmission delay; The second data frame sending module is configured to send the first data frame to the gateway at a first sending time, wherein the first sending time is after the first receiving time, and the time difference between the first sending time and the first receiving time is the first sending delay duration.
12. An electronic device, characterized in that, It includes a memory and a processor; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the method of any one of claims 6-10.
13. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by a processor, the computer instructions implement the method of any one of claims 6-10.