Branch selection device, branch selection method, and industrial communication system

CN122952004APending Publication Date: 2026-10-20SUZHOU ZONGWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610869466.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-16
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种分支选择装置、分支选择方法以及工业通信系统,能够解决组网连接中存在的网络拓扑通信可靠性以及配置灵活性低的技术问题

Benefits of technology

[0016]本申请实施例提出的分支选择装置、分支选择方法以及工业通信系统,分支选择装置包括:多个第一通信接口以及多个第二通信接口;指令接收端口,用于接收由通信主站发出的控制指令;从站配置解析模块,用于根据控制指令产生路由控制信号;交叉通信逻辑模块,用于根据路由控制信号,配置第一通信接口与第二通信接口之间的映射关系,以建立或断开至少一个第一通信接口和对应的第二通信接口之间的传输通路;物理层自适应模块,物理层自适应模块用于根据流经传输通路的数据帧格式,控制对应的第一通信接口和/或第二通信接口中的数据收发方向。本申请实施例通过从站配置解析模块接收并解析通信主站发出的控制指令以产生相应的路由控制信号,使得交叉通信逻辑模块能够基于该路由控制信号动态配置多个第一通信接口与多个第二通信接口之间的映射关系并建立传输通路,与传统EtherCAT网络中数据只能沿物理线缆进行线性级联传输不同,提高了网络拓扑的配置灵活性;进一步的,通过物理层自适应模块根据流经传输通路的数据帧格式自动控制对应通信接口的数据收发方向,以提高交互数据在交叉传输过程中的可靠性;从而使得能够在不改变从站设备物理位置的前提下,实现网络拓扑与物理连接的解耦,避免了单一级联拓扑中因中间节点断开导致后级设备无法正常通信的情况,还满足了复杂工业现场中动态组网需求,进而提升了工业通信网络拓扑配置的灵活性以及通信系统的可靠性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The branch selection device, branch selection method, and industrial communication system proposed in this application include: a branch selection device comprising: multiple first communication interfaces and multiple second communication interfaces; an instruction receiving port for receiving control instructions issued by the communication master station; a slave station configuration parsing module for generating routing control signals according to the control instructions; a cross-communication logic module for configuring the mapping relationship between the first communication interfaces and the second communication interfaces according to the routing control signals, so as to establish or disconnect the transmission path between at least one first communication interface and the corresponding second communication interface; and a physical layer adaptive module for controlling the data transmission and reception direction in the corresponding first communication interface and / or second communication interface according to the data frame format flowing through the transmission path, thereby improving the flexibility of industrial communication network topology configuration and the reliability of the communication system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial communication technology, and in particular to branch selection devices, branch selection methods, and industrial communication systems. Background Technology

[0002] In industrial control and automation communication scenarios, EtherCAT communication technology is widely used due to its high speed and real-time performance. To achieve network data exchange between devices, traditional EtherCAT slave devices typically use cascading communication to form a network connection.

[0003] However, when using cascaded communication for network connections, if the cable of an intermediate node is broken or the node is disconnected, downstream devices may be unable to communicate normally. Furthermore, due to the relatively simple topology of this connection method, it is difficult to implement complex multi-master / multi-slave cross-control or redundancy backup, lacking flexibility. Therefore, existing network connections using cascaded communication suffer from technical problems of low network topology communication reliability and low configuration flexibility. Summary of the Invention

[0004] This application provides a branch selection device, a branch selection method, and an industrial communication system, which can solve the technical problems of low network topology communication reliability and low configuration flexibility in network connection.

[0005] To achieve the above objectives, a first aspect of this application provides a branch selection device, comprising: Multiple first communication interfaces and multiple second communication interfaces; The command receiving port is used to receive control commands issued by the communication master station; The slave configuration parsing module is used to generate routing control signals according to the control commands; A cross-communication logic module is used to configure the mapping relationship between the first communication interface and the second communication interface according to the routing control signal, so as to establish or disconnect the transmission path between at least one of the first communication interfaces and the corresponding second communication interface; A physical layer adaptive module is used to control the data transmission and reception direction in the corresponding first communication interface and / or second communication interface according to the data frame format flowing through the transmission path.

[0006] In some embodiments, the slave configuration parsing module includes a configuration register unit; The configuration register unit is used to receive and store the routing configuration information in the control command. The routing configuration information includes multiple bit field data, and each bit field data corresponds to a target pointing state of the first communication interface. The slave configuration parsing module is used to generate the corresponding routing control signal based on the bit segment data.

[0007] In some embodiments, the cross-communication logic module includes a priority arbitration unit; When the routing control signal indicates that multiple first communication interfaces simultaneously point to the same second communication interface, the priority arbitration unit is used to determine the priority first communication interface from the multiple first communication interfaces indicated by the routing control signal, and establish a transmission path between the priority first communication interface and the second communication interface indicated by the routing control signal.

[0008] In some embodiments, the priority arbitration unit is further configured to determine the first communication interface that is not the priority first communication interface from the plurality of first communication interfaces indicated by the routing control signal as a masked first communication interface; The priority arbitration unit is also used to disconnect the transmission path between the shielded first communication interface and the second communication interface indicated by the routing control signal, and switch the receiving end of the shielded first communication interface to a logical shielded state.

[0009] In some embodiments, both the first communication interface and the second communication interface include a physical layer transceiver, and the physical layer adaptive module includes a direction control state machine. The direction control state machine is used to monitor the start signature code and specific instruction sequence in the transmission path in real time. When the starting feature code is detected and the specific instruction sequence monitored in real time is a return instruction, the direction control state machine is used to generate a flip enable signal, and controls the physical layer transceiver of the first communication interface and / or the second communication interface to switch the transmit / receive mode according to the flip enable signal.

[0010] In some embodiments, the branch selection device includes a counting module connected to the direction control state machine; The counting module is used to perform timing after the direction control state machine controls the physical layer transceiver to switch to the transmit mode, and outputs a reset signal when the timing reaches a preset clock cycle threshold. The direction control state machine is also used to control the physical layer transceiver to switch to receive mode according to the reset signal.

[0011] In some embodiments, the branch selection device further includes a synchronization optimization module; The synchronization optimization module is used to obtain the mapping relationship currently configured by the cross-communication logic module in real time, and calculate the logic gate delay time of the corresponding transmission path according to the mapping relationship; The synchronization optimization module is also used to perform hardware-level time compensation on the synchronization protocol frames transmitted via the transmission path based on the logic gate delay time.

[0012] In some embodiments, the synchronization optimization module integrates a delay measurement circuit. After the transmission path is established, the delay measurement circuit is used to obtain the bus transmission delay between the first communication interface and the second communication interface by sending a probe pulse and monitoring the return signal. The synchronization optimization module is also used to feed back the bus transmission delay to the communication master station, so that the communication master station can perform global dynamic updates of the compensation parameters of the distributed clock system based on the bus transmission delay.

[0013] In some embodiments, the branch selection device further includes a traffic prediction module, which is connected to the first communication interface and the priority arbitration unit; The traffic prediction module is used to monitor the characteristics of the data packets input to each of the first communication interfaces in real time. The traffic prediction module is used to determine the predicted occupancy weight of the corresponding first communication interface based on the characteristics of the data packet. The priority arbitration unit is used to adjust the priority level of each of the first communication interfaces according to the predicted occupancy weight.

[0014] To achieve the above objectives, a second aspect of the present application provides a branch selection method, which is applied to the branch selection apparatus as described in the first aspect, the method comprising: Receive control commands sent by the communication master station; Generate routing control signals according to the control instructions; According to the routing control signal, configure the mapping relationship between the first communication interface and the second communication interface to establish or disconnect a transmission path between at least one first communication interface and the corresponding second communication interface; Based on the data frame format flowing through the transmission path, the data transmission and reception direction in the corresponding first communication interface and / or second communication interface is controlled.

[0015] To achieve the above objectives, a third aspect of the present application provides an industrial communication system, including a communication master station, multiple slave station devices, and a branch selection device as described in the first aspect, wherein the branch selection device can be used to implement the branch selection method as described in the second aspect.

[0016] The branch selection device, branch selection method, and industrial communication system proposed in this application include: a plurality of first communication interfaces and a plurality of second communication interfaces; an instruction receiving port for receiving control instructions issued by a communication master station; a slave station configuration parsing module for generating routing control signals according to the control instructions; a cross-communication logic module for configuring the mapping relationship between the first communication interfaces and the second communication interfaces according to the routing control signals, so as to establish or disconnect the transmission path between at least one first communication interface and the corresponding second communication interface; and a physical layer adaptive module for controlling the data transmission and reception direction in the corresponding first communication interface and / or second communication interface according to the data frame format flowing through the transmission path. This application embodiment receives and parses control commands issued by the master communication station through a slave configuration parsing module to generate corresponding routing control signals. This enables the cross-communication logic module to dynamically configure the mapping relationship between multiple first communication interfaces and multiple second communication interfaces and establish transmission paths based on the routing control signals. Unlike traditional EtherCAT networks where data can only be transmitted linearly along physical cables, this improves the flexibility of network topology configuration. Furthermore, the physical layer adaptive module automatically controls the data transmission and reception direction of the corresponding communication interface according to the data frame format flowing through the transmission path, thereby improving the reliability of interactive data during cross-transmission. This allows for the decoupling of network topology and physical connections without changing the physical location of slave devices, avoiding the situation where downstream devices cannot communicate normally due to the disconnection of intermediate nodes in a single cascaded topology. It also meets the dynamic networking requirements in complex industrial sites, thereby improving the flexibility of industrial communication network topology configuration and the reliability of the communication system.

[0017] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the description, claims and drawings. Attached Figure Description

[0018] Figure 1 This is a schematic diagram of an architecture of a branch selection device provided in an embodiment of this application.

[0019] Figure 2 This is another schematic diagram of the branch selection device provided in another embodiment of this application.

[0020] Figure 3 This is another schematic diagram of the branch selection device provided in another embodiment of this application.

[0021] Figure 4 This is another schematic diagram of the branch selection device provided in another embodiment of this application.

[0022] Figure 5 This is another schematic diagram of the branch selection device provided in another embodiment of this application.

[0023] Figure 6 This is another schematic diagram of the branch selection device provided in another embodiment of this application.

[0024] Figure 7 This is a data transmission status flowchart provided in another embodiment of this application.

[0025] Figure 8 This is another schematic diagram of the branch selection device provided in another embodiment of this application.

[0026] Figure 9 This is another schematic diagram of the branch selection device provided in another embodiment of this application.

[0027] Figure 10 This is another schematic diagram of the branch selection device provided in another embodiment of this application.

[0028] Figure 11 This is a flowchart of a branch selection method provided in another embodiment of this application.

[0029] Figure 12 This is a schematic diagram of an industrial communication system architecture provided in another embodiment of this application. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0031] It should be noted that although functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart.

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0033] In industrial control and automation communication scenarios, EtherCAT communication technology is widely used due to its high speed and real-time performance. To achieve network data exchange between devices, traditional EtherCAT slave devices typically use cascading communication to form a network connection.

[0034] However, when using cascaded communication for network connections, if the cable of an intermediate node is broken or the node is disconnected, downstream devices may be unable to communicate normally. Furthermore, due to the relatively simple topology of this connection method, it is difficult to implement complex multi-master / multi-slave cross-control or redundancy backup, lacking flexibility. Therefore, existing network connections using cascaded communication suffer from technical problems of low network topology communication reliability and low configuration flexibility.

[0035] To address the technical issues of low reliability and configuration flexibility in network topology communication during network connection, this application embodiment utilizes a slave configuration parsing module to receive and parse control commands issued by the master communication station to generate corresponding routing control signals. This enables the cross-communication logic module to dynamically configure the mapping relationship between multiple first communication interfaces and multiple second communication interfaces and establish transmission paths based on these routing control signals. Unlike traditional EtherCAT networks where data can only be transmitted linearly along physical cables, this improves the configuration flexibility of the network topology. Furthermore, a physical layer adaptive module automatically controls the data transmission and reception direction of the corresponding communication interface according to the data frame format flowing through the transmission path, thereby improving the reliability of interactive data during cross-transmission. This allows for the decoupling of the network topology from the physical connection without changing the physical location of the slave devices, avoiding the situation where downstream devices cannot communicate normally due to the disconnection of intermediate nodes in a single cascaded topology. It also meets the dynamic networking requirements in complex industrial sites, thereby improving the flexibility of industrial communication network topology configuration and the reliability of the communication system.

[0036] First, refer to Figure 1 , Figure 1 The diagram illustrates an architecture of a branch selection device provided in an embodiment of this application. The branch selection device includes multiple first communication interfaces, multiple second communication interfaces, an instruction receiving port, a slave configuration parsing module, a cross-communication logic module, and a physical layer adaptive module. The number of first communication interfaces and second communication interfaces can be flexibly designed according to actual needs, such as three first communication interfaces and three second communication interfaces.

[0037] In one embodiment, such as Figure 1As shown, multiple first communication interfaces are used to connect to the uplink or different master controller channels (e.g., Master Port), and multiple second communication interfaces are used to connect to the downlink to mount conventional network slave devices (e.g., Slave Port); the command receiving port is used to receive control commands issued by the communication master station.

[0038] The slave configuration parsing module is connected to the command receiving port to obtain control commands issued by the master station. Specifically, the branch selection device acts as an independent node in the network. The slave configuration parsing module (e.g., an EtherCAT slave controller ESC) receives and parses the protocol frames sent by the master station. By accessing the internal configuration space (e.g., the branch selection register), it obtains the specific routing control commands and generates corresponding routing control signals to output to the cross-connection logic module.

[0039] The cross-connection logic module is connected to the slave configuration parsing module. It is used to drive the internal cross-connection matrix to operate based on routing control signals, dynamically configuring the mapping relationship between the first and second communication interfaces. This is understandable, as... Figure 1 As shown by the dashed line between the first and second communication interfaces, the cross-communication logic module can establish or disconnect a configurable transmission path between the first and second communication interfaces. Figure 1 As shown, a transmission path is established between the first communication interface 1 and the second communication interface 2, and a transmission path is established between the first communication interface 2 and the second communication interface 3, etc., according to the routing control instructions, so as to achieve decoupling of logical topology and physical transmission path.

[0040] In this scheme, the physical layer of the first and second communication interfaces adopts the RS485 half-duplex physical layer. During data interaction, it is necessary to control the transmit / receive enable state. Therefore, a physical layer adaptive module is also configured in the branch selection device. The physical layer adaptive module is used to control the data transmission and reception direction in the corresponding first and / or second communication interfaces according to the data frame format of the transmission path flowing between the first and second communication interfaces. Specifically, the physical layer adaptive module identifies the communication flow reversal requirement by real-time monitoring the frame format characteristics of the data frames flowing through the channel (e.g., specific start patterns and command sequences), thereby switching the transmit or receive mode of the physical layer of the corresponding first and / or second communication interfaces.

[0041] The branch selection device provided in this application embodiment parses the control commands issued by the communication master station through the slave station configuration parsing module. This enables the cross-communication logic module to dynamically configure the mapping relationship between the first communication interface and the second communication interface and establish a physical path based on the commands. Unlike traditional networks where data can only be transmitted in a single cascade along the cable, the physical layer adaptive module automatically controls the data transmission and reception direction of the underlying layer according to the data frame format to determine the reliability of interactive data during cross-transmission. This allows for flexible cross-configuration of communication connections without changing the physical location of nodes in the communication network, effectively improving the flexibility, scalability, and reliability of the industrial network communication topology.

[0042] In one embodiment, reference is made to Figure 2 , Figure 2 This illustration shows another architectural diagram of the branch selection device provided in this application embodiment. For the receiving path of control commands issued by the communication master station, the command receiving port can be an in-band communication port multiplexed for the first communication interface, or an out-of-band configuration port independent of the first communication interface. When the command receiving port is multiplexed for the first communication interface (e.g., ... Figure 2 When the first communication interface 1) is used as an in-band communication port, the branch selection device does not need to add an additional dedicated physical control line. Furthermore, the instruction receiving port can also be an out-of-band configuration port independent of the first communication interface (such as...). Figure 1 As shown, it can be an independent serial port or a dedicated management network port, etc.

[0043] In one embodiment, combined with Figure 3 , Figure 3 This illustration shows another architecture diagram of the branch selection device provided in the embodiments of this application. The slave configuration parsing module is internally configured with a configuration register unit. The configuration register unit (e.g., a branch selection register) has a specific address space for receiving and storing routing configuration information in the control instructions issued by the communication master station.

[0044] Specifically, the routing configuration information is stored and expressed in the form of bit-segment allocation. That is, the routing configuration information includes multiple bit-segment data, and each bit-segment data independently corresponds to the target pointing state of a first communication interface. For example, in an EtherCAT communication scenario, the configuration register is an 8-bit read / write register (address defined as 0x0A00), and there are three first and three second communication interfaces. Different bit segments are allocated to control the destination of different communication interfaces. Specifically, bit segment Bit[1:0] corresponds to the branch selection state of the first first communication interface (such as first communication interface 1 or main interface M1). When its internal value is configured as "01", "10" or "11", it means that the target of the first communication interface 1 is different second communication interfaces (such as second communication interface 1, second communication interface 2 or second communication interface 3), respectively. When its value is "00", it means that no interface is selected. Similarly, bit segments Bit[3:2] and Bit[5:4] correspond to the target pointing states of first communication interface 2 and first communication interface 3, respectively.

[0045] Based on the bit segment definition of the register space, the slave configuration parsing module can determine the branch mapping relationship that the communication master station needs to establish by reading and parsing the bit segment data in the configuration register unit in real time, and generate the corresponding routing control signal to transmit to the cross-communication logic module for flexible transmission path configuration.

[0046] In one embodiment, reference is made to Figure 4 , Figure 4 This paper illustrates another architecture of the branch selection device provided in an embodiment of this application. The cross-communication logic module integrates a priority arbitration unit, which is used to resolve access contention and conflict issues caused by multiple first communication interfaces pointing to the same target second communication interface.

[0047] Specifically, during the dynamic route mapping process of the branch selection device, when the route control signal instructs multiple first communication interfaces (e.g.) Figure 4 The first communication interface 1 and the first communication interface 2 in the system both point to the same second communication interface (e.g., Figure 4 When the second communication interface 2) in the middle establishes a transmission channel, a contention state is triggered at this time; since the cross switch matrix inside the branch selection device usually only supports one-to-one connection mode at the same time, in order to avoid communication response conflicts caused by simultaneously feeding the same data stream into multiple interfaces at the physical layer from the hardware design.

[0048] When a contention state is triggered, the priority arbitration unit intervenes and makes a decision based on a preset priority strategy (e.g., pre-setting the priority of first communication interface 1 to be higher than that of first communication interface 2), thereby determining the highest priority first communication interface (i.e., the one indicated by the routing control signal) from among the multiple first communication interfaces. Figure 4 The first communication interface 1 in the middle). Further, based on the arbitration result, the cross-communication logic module establishes only a transmission path between the priority first communication interface and the target second communication interface (such as...). Figure 4 The transmission path between the first communication interface 1 and the second communication interface 2 ensures that the high-priority master station interface can obtain control over the interactive data of the lower-level slave station, thereby maintaining the orderly stability of network communication in complex scenarios.

[0049] In addition, the priority arbitration unit determines the first priority communication interface (e.g.) Figure 4 After the first communication interface 1), the priority arbitration unit will also compete for other first communication interfaces with lower priority (e.g., Figure 4 The first communication interface 2) is identified as a shielded first communication interface, and the access signal of the shielded first communication interface is directly discarded at the physical layer logic (e.g., at the multiplexer level), thereby disconnecting the transmission path between the shielded first communication interface and the target second communication interface indicated by the routing control signal. Figure 4 The transmission path between the first communication interface 1 and the second communication interface 2 in the device is such that the shielded access signal is not cached in the internal storage unit (such as FIFO).

[0050] Meanwhile, to prevent crosstalk between bus signals, the priority arbitration unit will also switch the receiving end of the shielded first communication interface to a logically shielded state. Understandably, in this logically shielded state, the receiving end of the shielded first communication interface will be logically clamped to an idle level or a high-impedance state, physically isolating it from interference. Since the branch selection device is a low-level hardware cross-routing device, it does not actively return specific bus busy or error status codes to the shielded first communication interface. After a conflict occurs, the shielded master station, unable to receive the response data frame from the target slave station, will have its upper-layer protocol handle the exception through a timeout mechanism. Thus, by establishing a priority link while simultaneously physically disconnecting and logically shielding non-priority links, the priority arbitration unit effectively avoids potential communication conflicts, ensuring completely transparent transmission of communication protocol data by the branch selection device.

[0051] In one embodiment, reference is made to Figure 5 , Figure 5This diagram illustrates another architecture of the branch selection device provided in this application embodiment. Both the first and second communication interfaces include physical layer transceivers. Since each communication interface of the branch selection device in this embodiment uses a half-duplex physical layer (such as the RS485 half-duplex communication protocol), the transmit / receive enable signals must be precisely controlled during data interaction. Based on this, the physical layer adaptive module integrates a direction control state machine to implement automatic transmit / receive switching logic independent of the upper-layer software protocol.

[0052] The direction control state machine is used to monitor the start signature and specific command sequences in the transmission path in real time. Understandably, in its default receive state, the direction control state machine listens to the bus data stream in real time, first detecting the start signature in the network data frames and verifying their frame format; then, it further parses the frame header to obtain the specific command sequence. When the start signature is detected, and the monitored specific command sequence is a return command (for example, detecting a specific 0x104 command frame representing the need for data return from a downstream slave device), the direction control state machine can determine that the current communication flow needs to be reversed.

[0053] Based on the identified flow reversal requirement, the direction control state machine generates a flip enable signal and controls the physical layer transceiver in the corresponding first and / or second communication interface to switch the transmit / receive mode according to the flip enable signal. For example, it triggers and controls the corresponding physical layer transceiver to switch from receive mode to transmit mode. Thus, by using the direction control state machine to perform mode switching based on data frame feature extraction, the branch selection device can identify the communication flow of service data and realize the swap of physical layer transmit / receive states, thereby improving the reliability of interactive data during data transmission.

[0054] In one embodiment, reference is made to Figure 6 , Figure 6 This paper illustrates another architecture of the branch selection device provided in an embodiment of the present application. The branch selection device further includes a counting module, which is connected to the direction control state machine inside the physical layer adaptive module and is used to provide a low-level timeout reset mechanism for the system.

[0055] After the physical layer transceiver of the direction control state machine switches to transmit mode, the counting module starts synchronously and begins timing. It is understood that the preset clock cycle threshold is a fixed number of clock cycles set by the system. For example, in an implementation scenario based on an 80MHz operating clock, the counting module can be configured with a fixed timeout counter, and the preset clock cycle threshold can be set to 3500 clock cycles. When the counting module's timing reaches the aforementioned preset clock cycle threshold (for example, if no new start mode is detected to end communication within this cycle), the counting module will output a reset signal to the direction control state machine.

[0056] The direction control state machine is used to trigger the reset logic based on the received reset signal, so as to control the corresponding physical layer transceiver to reset and switch back to the default receive mode (such as the idle state), thereby avoiding the physical communication link being occupied for a long time due to abnormal conditions, thus avoiding deadlock of the communication link, and improving the communication reliability of the application with branch selection device.

[0057] Reference Figure 7 , Figure 7 A flowchart illustrating the data transmission status provided in an embodiment of this application is shown. Figure 7 As shown, the switching process of the physical layer adaptive module is independent of the upper-layer EtherCAT communication protocol, and can transparently ensure the smooth interaction of business data during cross-transmission in a purely hardware manner, as described below.

[0058] When the system powers on or a new communication cycle begins, the direction control state machine first enters the initialization state. At this time, the physical layer transceivers of each communication interface are in receive mode by default, silently waiting for data input from the first communication interface. During the subsequent reception of data from the first communication interface, the direction control state machine monitors the validity of the underlying data stream in real time. If the data frame header verification of the first communication interface fails during this stage, or if other physical layer problems are detected in the data reception process itself, the state machine will directly trigger the exception handling logic, discard the current abnormal data, and quickly return to the initialization state, thereby preventing invalid data from continuously occupying bus resources.

[0059] After the data reception of the first communication interface is completed, the state machine immediately enters the data verification and enable switching judgment stage. Specifically, the direction control state machine further determines whether the received data frame has passed verification, that is, whether the data frame contains a valid start signature code and a specific return instruction sequence indicating a reversal of the flow direction. If the above data frame verification is successful, it indicates that the system needs to obtain response data from the downstream communication slave station. The direction control state machine then generates a flip enable signal, controlling the corresponding physical layer transceiver to switch the transmit / receive enable direction, thereby transitioning to the working state of receiving data from the second communication interface.

[0060] Upon entering the state of receiving data from the second communication interface, the internal counting module of the system starts synchronously. If a reception timeout occurs during the reception of data from the second communication interface (e.g., the timer reaches a preset clock cycle threshold without any change in the bus state), or if a problem is detected in data reception, the direction control state machine will output a reset signal, cutting off the current abnormal waiting state and directly returning to the initialization state. This effectively prevents system-level bus deadlock caused by a single link not responding. Conversely, if the data reception from the second communication interface is complete, it signifies the end of communication at this point. Before initiating the next communication, the direction control state machine will control the physical layer transceiver to switch the enable signal direction back to the initial default state.

[0061] In one embodiment, reference is made to Figure 8 , Figure 8 This illustration shows another architectural diagram of the branch selection device provided in an embodiment of this application. The branch selection device also includes a synchronization optimization module. It is understood that in industrial automation communication applications (such as EtherCAT networks), a distributed clock mechanism is typically used to ensure high-precision time synchronization between various slave device nodes. When the cross-connect matrix inside the branch selection device dynamically switches, the differences in physical trace lengths between different communication interfaces and the number of multiplexer logic levels inevitably introduce additional, topology-dependent transmission delays into the data link, potentially affecting the overall network synchronization accuracy.

[0062] Based on this, the synchronization optimization module obtains the mapping relationship currently configured by the cross-communication logic module in real time, and then determines the physical transmission path between the first and second communication interfaces established at present according to the mapping relationship, so as to calculate the logic gate delay time of the corresponding transmission path. Then, based on the specific mapping path characteristics, the logic gate delay time generated when the data frame flows through the corresponding transmission path is accurately calculated.

[0063] Understandably, the process of calculating the logic gate delay time of the corresponding transmission path specifically includes: First, the synchronization optimization module parses the mapping configuration of the current cross-communication logic module in real time to establish the specific internal flow of the communication signal (i.e., the precise connection path from a specific first communication interface to a specific second communication interface); then, by calling the timing model library pre-calibrated and stored in the internal register or lookup table (LUT) during the logic synthesis or placement and routing stage of the chip, the inherent switching propagation delay of each underlying hardware unit (including input buffers, multiplexer logic gates, internal cross nodes, and output drivers, etc.) that the signal passes through sequentially on the specific communication path is determined, and this delay is linearly mathematically accumulated with the internal routing delay and the existing cross-clock domain clock cycle loss to calculate the logic gate delay time introduced by the current data interaction path in real time.

[0064] Furthermore, after obtaining the logic gate delay time, the synchronization optimization module performs hardware-level time compensation on the synchronization protocol frame transmitted through the transmission path based on the logic gate delay time. Specifically, when the synchronization optimization module detects that a protocol frame carrying distributed clock synchronization information flows through the currently mapped transmission path, its internal hardware adder dynamically adds the pre-calculated logic gate delay time value to the delay compensation field (or timestamp field) of the synchronization protocol frame in a purely hardware-based online correction manner during the transmission of the data frame. It also synchronously triggers the underlying logic to complete the recalculation and update of the data frame check sequence (FCS). This allows the module to adaptively offset the additional internal delay introduced by the cross-routing logic when the underlying physical link is dynamically reconstructed, thereby effectively maintaining high-precision time synchronization of the industrial communication system while achieving flexible switching of multiple branches.

[0065] In one embodiment, reference is made to Figure 9 , Figure 9 This illustration shows another architectural diagram of the branch selection device provided in this application embodiment. The synchronization optimization module integrates a delay measurement circuit to further improve the clock synchronization accuracy under complex network topologies. Specifically, after the cross-communication logic module completes the mapping configuration and establishes a specific transmission path, the delay measurement circuit is used to accurately measure the bus transmission delay between the currently established first communication interface and the second communication interface by sending probe pulses to the underlying physical communication link and monitoring the corresponding return signal in real time.

[0066] Furthermore, such as Figure 9 As shown, the synchronization optimization module is also used to upload and feed back the actual measured bus transmission delay to the upper-level communication master station. It is understandable that in industrial field communication networks, when the branch selection device performs dynamic routing switching, the physical cable length and actual communication connection distance between the communication master station and different downstream slave device nodes often change. At this time, after receiving the feedback bus transmission delay, the communication master station can obtain the current dynamically reconstructed real link status, so that it can globally and dynamically update the compensation parameters of the distributed clock system accordingly. This allows the communication master station to utilize real-time pulse detection and master station global parameter updates to improve the communication reliability and synchronization of the industrial communication system.

[0067] In one embodiment, reference is made to Figure 10 , Figure 10This illustration shows another architectural diagram of the branch selection device provided in an embodiment of this application. The branch selection device further includes a traffic prediction module. The input of the traffic prediction module is connected to each first communication interface, and the output of the traffic prediction module is connected to the priority arbitration unit inside the cross-communication logic module, so as to provide dynamic arbitration basis in the scenario of multiple first communication interfaces pointing to the same second communication interface in a multi-control concurrent scenario.

[0068] Specifically, the traffic prediction module monitors the characteristics of the data packets input to each first communication interface in real time. It is understandable that the service data sent by different communication master stations typically differs in frame length, transmission period, or data density, resulting in different data packet characteristics for each data frame received by the first communication interface. In this solution, the traffic prediction module captures and analyzes these data packet characteristics at the underlying level to perceive the current communication load status and subsequent traffic trends of each first communication interface.

[0069] Furthermore, the traffic prediction module determines the predicted occupancy weight of the corresponding first communication interface based on the monitored data packet characteristics. Specifically, after acquiring data packet characteristics (such as payload length, inter-frame interval, and packet arrival frequency), the traffic prediction module inputs them into an internally configured hardware multiply-accumulate unit or lookup table. The system can pre-set different sensitivity coefficients for each packet characteristic; for example, a higher evaluation coefficient is assigned to "arrival frequency," which characterizes high-frequency real-time interaction, while a moderate evaluation coefficient is assigned to regular data lengths. The traffic prediction module integrates these dispersed characteristic parameters into corresponding predicted occupancy weights through weighted summation or nonlinear lookup table mapping. These predicted occupancy weights quantify the demand or expected occupancy scale of the underlying bus bandwidth for the first communication interface in a future scheduling cycle.

[0070] Then, the traffic prediction module connects to the priority arbitration unit and transmits the predicted occupancy weight to the priority arbitration unit. The priority arbitration unit adjusts the priority level of each first communication interface according to the predicted occupancy weight. Specifically, in addition to the fixed static priority logic, the priority arbitration unit also has a parallel dynamic weight comparison logic. When it receives the predicted occupancy weight of each first communication interface output in real time by the traffic prediction module, the hardware comparator array inside the priority arbitration unit will cross-compare these weight values ​​in real time. If the predicted occupancy weight of a first communication interface that was originally in a lower static priority (e.g., first communication interface 2) increases significantly and the weight difference with the higher priority interface exceeds the system's preset dynamic compensation threshold, the priority arbitration unit will trigger a priority boosting action, temporarily placing the priority level of the first communication interface at the top or increasing it in stages. Thus, by introducing this traffic prediction and dynamic arbitration mechanism, the branch selection device can adaptively adjust the priority according to the actual underlying communication traffic characteristics, thereby improving the utilization rate and adjustment flexibility of network bandwidth in complex communication environments.

[0071] In addition, embodiments of this application also provide an industrial communication method, which is applied to the branch selection device described above, with reference to... Figure 11 , Figure 11 A flowchart of an industrial communication method provided in an embodiment of this application is shown, including steps 1101 to 1104.

[0072] Step 1101: Receive control commands sent by the communication master station.

[0073] Step 1102: Generate routing control signals according to control instructions.

[0074] Step 1103: Configure the mapping relationship between the first communication interface and the second communication interface according to the routing control signal, so as to establish or disconnect the transmission path between at least one first communication interface and the corresponding second communication interface.

[0075] Step 1104: Control the data transmission and reception direction in the corresponding first communication interface and / or second communication interface according to the data frame format flowing through the transmission path.

[0076] Steps 1101 to 1104 are described in detail below.

[0077] During system operation, the branch selection device acts as a network node, acquiring configuration commands issued by the communication master station in real time through the command receiving port. This command receiving port can flexibly select an in-band communication path multiplexed for the first communication interface, or use an independent physical control line for out-of-band configuration, depending on actual network requirements.

[0078] The slave configuration parsing module in the branch selection device parses the acquired control instructions and stores them in specific bit fields of the internal configuration register unit. Then, by reading the target pointing status represented by each set of bit fields in the register, it converts the logical configuration requirements of the communication master station into routing control signals that can be directly driven by the underlying hardware.

[0079] The cross-connection logic module in the branch selection device responds to the routing control signal, driving the internal cross-connection matrix to dynamically adjust the signal routing between the first and second communication interfaces. Through on-demand configuration of the mapping relationship, specific physical transmission paths can be flexibly established or severed, thereby achieving network logical topology reconstruction and decoupling without altering physical connections. In the event of a conflict where multiple interfaces point to the same target, the priority arbitration unit intervenes to ensure the stable operation of high-priority links.

[0080] After the physical transmission path is established, the physical layer adaptive module in the branch selection device monitors the data flow characteristics on the bus in real time through a direction control state machine. The state machine accurately determines the current communication flow requirement by identifying the start signature code and specific return instruction sequences in the data frame, and then generates a toggle enable signal to control the switching of the physical layer transceiver's transmit / receive modes. This hardware feature extraction-based adaptive control ensures the reliability and transparency of data interaction in a half-duplex communication environment.

[0081] Since the industrial communication method of this application is applied to the branch selection device of the above embodiments, it has all the beneficial effects of the branch selection device in the above embodiments, and will not be repeated here.

[0082] In addition, this application also provides an industrial communication system, referring to... Figure 12 , Figure 12 This illustration shows an architecture diagram of an industrial communication system provided in an embodiment of this application. The industrial communication system mainly includes a communication master station, multiple slave station devices, and a branch selection device as described above.

[0083] In this system, the master communication station (e.g., IPC or PLC) acts as the control core, responsible for sending EtherCAT communication protocol frames and control commands to the downstream network. The branch selection device, as an independent slave node in the network, connects to the master station and the slave devices. Protocol frames sent by the master station flow sequentially through each node along the network link, enabling the branch selection device to directly receive and parse the control commands issued by the master station.

[0084] The branch selection device has multiple first communication interfaces (such as...) Figure 12 The main communication interfaces M1, M2, and M3 shown in the figure) and multiple second communication interfaces (such as...) Figure 12The diagram shows the slave interfaces SA, SB, and SC. Each slave device in the network is connected to the corresponding communication interface of the branch selection device via physical cables. When the slave devices in the network exchange service data, this exchange data flows through the branch selection device. The branch selection device then establishes a dynamic mapping between the corresponding first and second communication interfaces based on the control commands obtained from the master station, thereby cross-transmitting the exchange data of the slave devices connected to different interfaces to the designated communication interface.

[0085] Since the industrial communication system of this application has the branch selection device of the above embodiments, it has all the beneficial effects of the branch selection device in the above embodiments, which will not be repeated here.

[0086] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0087] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0088] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0089] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0090] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0091] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. The coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, or indirect coupling or communication connection between the apparatus or units, and may be electrical, mechanical, or other forms.

[0092] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0093] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0094] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0095] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A branch selection device, characterized in that, include: Multiple first communication interfaces and multiple second communication interfaces; The command receiving port is used to receive control commands issued by the communication master station; The slave configuration parsing module is used to generate routing control signals according to the control commands; A cross-communication logic module is used to configure the mapping relationship between the first communication interface and the second communication interface according to the routing control signal, so as to establish or disconnect the transmission path between at least one of the first communication interfaces and the corresponding second communication interface; A physical layer adaptive module is used to control the data transmission and reception direction in the corresponding first communication interface and / or second communication interface according to the data frame format flowing through the transmission path.

2. The branch selection device according to claim 1, characterized in that, The instruction receiving port is either an in-band communication port multiplexed to the first communication interface, or an out-of-band configuration port independent of the first communication interface.

3. The branch selection device according to claim 1, characterized in that, The slave station configuration parsing module includes a configuration storage unit; The configuration register unit is used to receive and store the routing configuration information in the control command. The routing configuration information includes multiple bit field data, and each bit field data corresponds to a target pointing state of the first communication interface. The slave configuration parsing module is used to generate the corresponding routing control signal based on the bit segment data.

4. The branch selection device according to claim 1, characterized in that, The cross-communication logic module includes a priority arbitration unit; When the routing control signal indicates that multiple first communication interfaces simultaneously point to the same second communication interface, the priority arbitration unit is used to determine the priority first communication interface from the multiple first communication interfaces indicated by the routing control signal, and establish a transmission path between the priority first communication interface and the second communication interface indicated by the routing control signal.

5. The branch selection device according to claim 4, characterized in that, The priority arbitration unit is further configured to determine the first communication interface that is not the priority first communication interface from the plurality of first communication interfaces indicated by the routing control signal as a masked first communication interface. The priority arbitration unit is also used to disconnect the transmission path between the shielded first communication interface and the second communication interface indicated by the routing control signal, and switch the receiving end of the shielded first communication interface to a logical shielded state.

6. The branch selection device according to claim 1, characterized in that, Both the first communication interface and the second communication interface include physical layer transceivers, and the physical layer adaptive module includes a direction control state machine; The direction control state machine is used to monitor the start signature code and specific instruction sequence in the transmission path in real time. When the starting feature code is detected and the specific instruction sequence monitored in real time is a return instruction, the direction control state machine is used to generate a flip enable signal, and controls the physical layer transceiver of the first communication interface and / or the second communication interface to switch the transmit / receive mode according to the flip enable signal.

7. The branch selection device according to claim 6, characterized in that, The branch selection device includes a counting module, which is connected to the direction control state machine; The counting module is used to perform timing after the direction control state machine controls the physical layer transceiver to switch to the transmit mode, and outputs a reset signal when the timing reaches a preset clock cycle threshold. The direction control state machine is also used to control the physical layer transceiver to switch to receive mode according to the reset signal.

8. The branch selection device according to claim 1, characterized in that, The branch selection device also includes a synchronization optimization module; The synchronization optimization module is used to obtain the mapping relationship currently configured by the cross-communication logic module in real time, and calculate the logic gate delay time of the corresponding transmission path according to the mapping relationship; The synchronization optimization module is also used to perform hardware-level time compensation on the synchronization protocol frames transmitted via the transmission path based on the logic gate delay time.

9. The branch selection device according to claim 8, characterized in that, The synchronization optimization module integrates a delay measurement circuit. After the transmission path is established, the delay measurement circuit is used to obtain the bus transmission delay between the first communication interface and the second communication interface by sending a probe pulse and monitoring the return signal. The synchronization optimization module is also used to feed back the bus transmission delay to the communication master station, so that the communication master station can perform global dynamic updates of the compensation parameters of the distributed clock system based on the bus transmission delay.

10. The branch selection device according to claim 4, characterized in that, The branch selection device further includes a traffic prediction module, which is connected to the first communication interface and the priority arbitration unit. The traffic prediction module is used to monitor the characteristics of the data packets input to each of the first communication interfaces in real time. The traffic prediction module is used to determine the predicted occupancy weight of the corresponding first communication interface based on the characteristics of the data packet. The priority arbitration unit is used to adjust the priority level of each of the first communication interfaces according to the predicted occupancy weight.

11. A branch selection method, characterized in that, The method is applied to the branch selection device as described in any one of claims 1 to 10, and the method includes: Receive control commands sent by the communication master station; Generate routing control signals according to the control instructions; According to the routing control signal, configure the mapping relationship between the first communication interface and the second communication interface to establish or disconnect at least one transmission path between the first communication interface and the corresponding second communication interface; Based on the data frame format flowing through the transmission path, the data transmission and reception direction in the corresponding first communication interface and / or second communication interface is controlled.

12. An industrial communication system, characterized in that, include: The communication master station, multiple slave station devices, and the branch selection device as described in any one of claims 1 to 10, wherein the branch selection device can be used to implement the branch selection method as described in claim 11.