Industrial control data transmission method and device and master-slave module
Through the ring networking method, data request packets are transmitted in the Powerlink network using the active master station and the standby master station in the opposite direction, solving the problem of unreliable data transmission in the event of master-slave module failure and achieving high reliability and stability of industrial Ethernet.
Patent Information
- Application Number
- CN202510450977.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-11
- Publication Date
- 2025-07-11
AI Technical Summary
When the master and slave module in the existing Powerlink network fail, the data transmission is unreliable and some slave data cannot be reported.
The ring networking method is adopted to connect the master station and slave station in series in industrial Ethernet, and use the active master station and the backup master station to transmit data request messages in the opposite direction to ensure that all slaves can successfully receive and report data in the event of a failure.
It improves the reliability of industrial Ethernet, ensures that data can still be transmitted normally when any master or slave station fails, and improves the stability and reliability of the network.
Smart Images

Figure CN120301730A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of industrial control technologies, and in particular, to an industrial control data transmission method, apparatus, and master-slave modules. Background Art
[0002] Powerlink is an Ethernet communication protocol applied to the field of industrial automation, and can also be referred to as industrial Ethernet. A common networking method of Powerlink is single-sided connection networking. The disadvantage of this networking method is that if a network failure occurs between a Powerlink master station and a Powerlink slave station or between Powerlink slave stations, data of some Powerlink slave stations will not be reported. Summary of the Invention
[0003] In view of this, embodiments of this application provide an industrial control data transmission method, apparatus, and master-slave modules to solve the problem in the prior art that data cannot be correctly transmitted when a failure occurs in the master-slave modules in an industrial control Ethernet.
[0004] In a first aspect of the embodiments of this application, an industrial control data transmission method is provided. This method is used to transmit data between a master station and a slave station in an industrial Ethernet, and includes:
[0005] Step S11: A first master station generates a first data request message, where the first master station is an active master station in the industrial Ethernet;
[0006] Step S12: The first master station sequentially sends the first data request message to N slave stations in the industrial Ethernet. The first master station is sequentially connected in series with the first to the Nth slave stations, and N is a positive integer;
[0007] Step S13: The first master station sends the first data request message to a second master station, so that the second master station forwards the first data request message to N slave stations in sequence in a second direction. The second master station is a standby master station in the industrial Ethernet. The second master station is sequentially connected in series with the Nth to the first slave stations. The first direction and the second direction are opposite directions;
[0008] Step S14: The first master station receives a first data response message sent by a first target slave station, where the first target slave station is the destination slave station in the first data request message.
[0009] In some embodiments, the first data response message is determined by the first target slave station in the following manner:
[0010] In response to determining that the first data request message is received for the first time, parse the first data request message;
[0011] Forward the first data request message to a distributed bus interface DP slave station;
[0012] Receive the response data sent by the DP slave station, and determine the first data response message based on the response data.
[0013] In some embodiments, determining that the first data request message is received for the first time includes:
[0014] Receive the first data request message, and parse the unique identifier of the first data request message;
[0015] Determine whether a first data request message with a unique identifier has been received during the current industrial Ethernet data transmission cycle;
[0016] If so, discard the first data request message;
[0017] If not, determine that the first data request message is received for the first time.
[0018] In a second aspect of the embodiments of the present application, an industrial control data transmission method is provided. This method is used to transmit data between the master station and the slave station in the industrial Ethernet. The industrial Ethernet includes a first master station, a second master station, and N slave stations. The first master station is the active master station in the industrial Ethernet, and the second master station is the standby master station in the industrial Ethernet. The first master station is sequentially connected in series with the first to the Nth slave stations, and the second master station is sequentially connected in series with the Nth to the first slave stations, where N is a positive integer;
[0019] This method includes:
[0020] Step S41, the second master station monitors the first master station;
[0021] Step S42, in response to determining that the first master station fails based on the monitoring result, the second master station connects to the first slave station, and the second master station is promoted to the active master station in the industrial Ethernet;
[0022] Step S43, the second master station generates a second data request message, and sends the second data request message to the N slave stations in the second direction;
[0023] Step S44, the second master station receives the second data response message sent by the second target slave station, where the second target slave station is the destination slave station in the second data request message.
[0024] In some embodiments, after step S43, this method further includes:
[0025] Step S431, in response to determining that the response of the second data request message times out, the second master station sends the second data request message to the N slave stations in the first direction, where the first direction and the second direction are opposite directions.
[0026] In some embodiments, in step S42, the second master station determines that the first master station fails in the following manner:
[0027] In response to determining that the reception of the first master station message times out, the second master station determines that the first master station has failed;
[0028] Wherein, the first master station message includes at least one of the following:
[0029] The first master station data transmission message, the first master station system message, and the handshake message between the first master station and the second master station.
[0030] In a third aspect of the embodiments of the present application, an industrial control data transmission device is provided, including:
[0031] A packet assembly module, configured to generate a first data request message by a first master station in an industrial Ethernet, where the first master station is the active master station in the industrial Ethernet;
[0032] A sending module, configured to sequentially send the first data request message from the first master station to N slave stations in the industrial Ethernet, where the first master station is sequentially connected in series with the first to Nth slave stations, and N is a positive integer;
[0033] The sending module is further configured to send the first data request message from the first master station to the second master station, so that the second master station sequentially forwards the first data request message to N slave stations in a second direction. The second master station is the standby master station in the industrial Ethernet, and the second master station is sequentially connected in series with the Nth to first slave stations. The first direction and the second direction are opposite directions;
[0034] A receiving module, configured to receive a first data response message sent by a first target slave station by the first master station, where the first target slave station is the destination slave station in the first data request message.
[0035] In a fourth aspect of the embodiments of the present application, an industrial control data transmission device is provided, including:
[0036] A monitoring module, configured to monitor the first master station by a second master station in an industrial Ethernet. The industrial Ethernet includes a first master station, a second master station, and N slave stations. The first master station is the active master station in the industrial Ethernet, the second master station is the standby master station in the industrial Ethernet, the first master station is sequentially connected in series with the first to Nth slave stations, the second master station is sequentially connected in series with the Nth to first slave stations, and N is a positive integer;
[0037] A switching module, configured to connect the second master station to the first slave station in response to determining that the first master station has failed based on the monitoring result, and the second master station is promoted to be the active master station of the industrial Ethernet;
[0038] A sending module, configured to generate a second data request message by the second master station and send the second data request message to N slave stations in a second direction;
[0039] A receiving module, configured to receive, by a second master station, a second data response message sent by a second target slave station, where the second target slave station is the destination slave station in the second data request message.
[0040] In a fifth aspect of the embodiments of the present application, a master-slave module in an industrial Ethernet is provided. The master-slave module, as a master station or a slave station in the industrial Ethernet, executes the method according to any one of the first aspect or the second aspect as described above. The master-slave module includes:
[0041] A first physical layer interface, a second physical layer interface, a hub, a data receiving buffer unit, a data sending buffer unit, a multi-region buffer unit, a state machine, a packet assembling unit, and an application processing unit;
[0042] The first physical layer interface and the second physical layer interface are respectively connected to different other master-slave modules;
[0043] One end of the hub is respectively connected to the first physical layer interface and the second physical layer, and the other end is respectively connected to the data receiving buffer unit and the data sending buffer unit;
[0044] The data receiving buffer unit and the data sending buffer unit are connected to the multi-region buffer unit, and the multi-region buffer unit is connected to the application processing unit;
[0045] The multi-region buffer unit is further connected to the packet assembling unit, and the packet assembling unit is connected to the data sending buffer unit.
[0046] In some embodiments, the multi-region buffer unit includes at least two storage regions;
[0047] Wherein, at least one first region is used for temporarily storing the received real-time data, and at least one second region is used for backing up the received historical data.
[0048] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: By adopting a ring network connection method in the embodiments of the present application, that is, the first master station in the industrial Ethernet is serially connected to the first to the Nth slave stations in sequence, and the second master station is serially connected to the Nth to the first slave stations in sequence. The first master station as the active master station generates a first data request message and sequentially sends the first data request message in the first direction. Moreover, the second master station as the standby master station receives the first data request message from the first master station and sequentially sends the first data request message in the second direction opposite to the first direction. Therefore, when any master station or slave station fails, it can ensure that all slave stations can successfully receive the data request and report the response data, improving the reliability of the industrial Ethernet. Description of the Drawings
[0049] To more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0050] Figure 1 It is a schematic diagram of the Powerlink network structure obtained by using the one-sided connection networking method in the related art.
[0051] Figure 2 It is a timing diagram in POWERLINK.
[0052] Figure 3 It is a schematic flowchart of an industrial control data transmission method provided by an embodiment of the present application.
[0053] Figure 4 It is a schematic flowchart of a method for a first target slave station to determine a first data response message provided by an embodiment of the present application.
[0054] Figure 5 It is a schematic flowchart of another industrial control data transmission method provided by an embodiment of the present application.
[0055] Figure 6 It is a schematic diagram of the Powerlink network structure obtained by using the ring network networking method provided by an embodiment of the present application.
[0056] Figure 7 It is a schematic diagram of the switching method when the master station fails in the Powerlink network with ring network networking.
[0057] Figure 8 It is a schematic diagram of the switching method when a slave station fails in the Powerlink network with ring network networking.
[0058] Figure 9 It is a topology diagram of the Powerlink ring network redundancy system provided by an embodiment of the present application.
[0059] Figure 10 It is a block diagram of the master-slave module architecture at the ARM and FPGA layers provided by an embodiment of the present application.
[0060] Figure 11 It is a functional block diagram of the master-slave module at the MAC layer and PCP layer provided by an embodiment of the present application.
[0061] Figure 12 It is a schematic diagram of the network state machine NMT in the master station module.
[0062] Figure 13It is a schematic diagram of the network state machine NMT in the slave station module.
[0063] Figure 14 It is a schematic diagram of the periodic state machine DLL_MS in the master station module.
[0064] Figure 15 It is a schematic diagram of the state of DLL_CS processing communication within a POWERLINK cycle.
[0065] Figure 16 It is a schematic diagram of an industrial control data transmission device provided by an embodiment of the present application.
[0066] Figure 17 It is a schematic diagram of another industrial control data transmission device provided by an embodiment of the present application. Detailed implementation manners
[0067] In the following description, for the purpose of illustration rather than limitation, specific details such as specific system structures and technologies are presented in order to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.
[0068] A method and device for industrial control data transmission according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0069] As mentioned above, the common networking method of Powerlink is single-sided connection networking.
[0070] Figure 1 It is a schematic diagram of the Powerlink network structure obtained by using the single-sided connection networking method in the related art. As Figure 1 shown, this network structure includes a master station and N slave stations, where the number of N slave stations can be set according to actual needs and is not limited here.
[0071] Among them, the master station is sequentially connected in series with slave stations 1 to N and works in accordance with the CANopen standard at the application layer. The CANopen protocol has three main parts: PDO, SDO, and object dictionary OD.
[0072] 1) PDO: Process data object, which can be understood as data that needs to be transmitted periodically and in real time during the communication process.
[0073] 2) SDO: Service data object, which can be understood as data that is not transmitted periodically and has low real-time requirements during the communication process, such as network, configuration commands, and data that needs to be transmitted occasionally.
[0074] 3) OD: Object Dictionary, which is a collection of all data items.
[0075] The node that manages the authorization to send messages to the Ethernet is called the POWERLINK management node (master station, ManageNode). All other nodes only send messages within the communication time slots specified by the master station, and such nodes are called controlled nodes (Control Node).
[0076] Figure 2 It is the timing diagram in POWERLINK. As Figure 2 shown, the Powerlink communication data frame includes SoC, Preq, Pres, SoA, and AsyncData. The isochronous synchronous data exchange between nodes occurs periodically and repeats at fixed time intervals, and this interval is called the Powerlink cycle. The Powerlink cycle can be divided into an isochronous synchronous phase and an asynchronous phase.
[0077] At the beginning of the Powerlink cycle, the master station should send an SoC frame to all nodes via Ethernet multicast at a fixed cycle interval as the start of the isochronous synchronous phase and as the starting message for periodic data. The sending and receiving moments of this frame should become the common timing reference for all nodes. Then the master station sends a request PReq frame (output data) to the slave station. The PReq frame is an Ethernet unicast frame and is only received by the target node. Each configured slave station should publish its data to all other nodes via Pres in multicast. Both the PReq frame and the PRes frame can transmit application data. The master station only sends PReq data to one slave station per frame. The PReq frame transmission is only dedicated to the relevant data of the addressed slave station. For each configured and active isochronous synchronous slave station, the PReq frame / PRes frame process should be repeated. When all configured active isochronous synchronous slave stations have been processed, the master station sends a multicast PRes frame to all nodes. Through this frame, the master station can publish its data to all other nodes. This frame is dedicated to transmitting data related to the slave station group.
[0078] The SoA frame is the first frame in the asynchronous phase and notifies all slave stations that all isochronous synchronous data exchanges have been completed in the isochronous synchronous phase. The SoA frame gives the master station or a certain slave station the permission for asynchronous transmission, corresponding to the master station or slave station sending an ASnd message. The SoA frame is used to identify slave stations, request the status information of slave stations, poll only asynchronous slave stations, and give a slave station the permission for asynchronous transmission. Only one frame of ASnd message is allowed to be sent in each asynchronous phase, and requests and responses require at least two cycles.
[0079] The calculation in the asynchronous phase is from the start of the SoA to the end of the asynchronous response. Through a special form of the StatusRequest—SoA frame, the master station polls each asynchronous-only slave station cyclically. The slave station responds through a special form of the asynchronous transmission frame—StatusResponse.
[0080] When a network failure occurs between the Powerlink master station and the Powerlink slave station or between Powerlink slave stations, some Powerlink slave station data cannot be reported.
[0081] In view of this, the embodiment of the present application provides an industrial control data transmission method. By adopting a ring networking method, that is, the first master station in the industrial Ethernet is serially connected to the first to the Nth slave stations in sequence, and the second master station is serially connected to the Nth to the first slave stations in sequence. The first master station, as the active master station, generates a first data request message and sends the first data request message in sequence in the first direction. Moreover, the second master station, as the standby master station, receives the first data request message from the first master station and sends the first data request message in sequence in the second direction opposite to the first direction. Thus, when any master station or slave station fails, it can ensure that all slave stations can successfully receive the data request and report the response data, improving the reliability of the industrial Ethernet.
[0082] Figure 3 It is a schematic flowchart of an industrial control data transmission method provided by the embodiment of the present application. As Figure 3 shown, the method includes the following steps:
[0083] In step S11, the first master station generates a first data request message.
[0084] Among them, the first master station is the active master station in the industrial Ethernet.
[0085] In step S12, the first master station sequentially sends the first data request message to N slave stations in the industrial Ethernet.
[0086] Among them, the first master station is serially connected to the first to the Nth slave stations in sequence, and N is a positive integer.
[0087] In step S13, the first master station sends the first data request message to the second master station so that the second master station sequentially forwards the first data request message to N slave stations in the second direction.
[0088] Among them, the second master station is the standby master station in the industrial Ethernet. The second master station is serially connected to the Nth to the first slave stations in sequence. The first direction and the second direction are opposite directions.
[0089] In step S14, the first master station receives a first data response message sent by the first target slave station, where the first target slave station is the destination slave station in the first data request message.
[0090] In some embodiments of the present application, the method may be executed by an active master station in an industrial Ethernet for transmitting data between the master station and slave stations in the industrial Ethernet. Among them, the industrial Ethernet may include at least two master stations, one of which is the active master station and the other master stations are standby master stations. The standby master stations only listen to the active master station and do not generate data transmission.
[0091] In some embodiments, the first master station may generate a first data request message, and the first master station is the active master station in the industrial Ethernet. In one example, the first data request message may be a message sent by the master station to the slave station during the isochronous synchronization phase or a message sent by the master station to the slave station during the asynchronous phase.
[0092] In some embodiments of the present application, the first master station may sequentially send the first data request message to N slave stations in the industrial Ethernet, and the first master station is serially connected to the first to Nth slave stations in sequence. For example, if the first master station is connected to the first slave station, the first slave station is connected to the second slave station, and so on until the N-1th slave station is connected to the Nth slave station, then the first master station may sequentially transmit the first data request message in the order of the first to Nth slave stations, that is, the first direction is from the first to the Nth slave station.
[0093] In some other embodiments of the present application, the first master station may also send the first data request message to the second master station so that the second master station sequentially forwards the first data request message to N slave stations in the second direction.
[0094] That is to say, the first master station and the second master station may be connected so that the second master station can act as a standby master station to listen to the first master station acting as the active master station, but the second master station itself does not generate data transmission, that is, when the second master station acts as a standby master station, it only forwards messages and does not generate messages.
[0095] The second master station may also be serially connected to the above N slave stations in sequence, and its connection order is different from the connection order of the first master station and the N slave stations. In one example, the second master station may be serially connected to the Nth to the first slave stations in sequence. For example, if the second master station is connected to the Nth slave station, the Nth slave station is connected to the N-1th slave station, and so on until the second slave station is connected to the first slave station. At this time, the second master station may sequentially transmit the first data request message in the order of the Nth to the first slave station, that is, the second direction is from the Nth to the first slave station.
[0096] As described above, the master station sends PReq data to only one slave station per frame, and the SoA frame grants the master station or a certain slave station the asynchronous transmission permission. Therefore, the first data request message includes a destination slave station. After any slave station receives the first data request message, it parses the message. If it determines that the destination slave station is this slave station, it forwards the first data request message to each distributed bus interface (Distributed Profinet, DP) connected below it. The DP can be an input / output (I / O) module.
[0097] The DP module can execute the control instruction in the first data request message and then generate response data. The slave station connected to the DP module can receive the response data from the DP slave station, generate a first data response message, and then transmit the first data response message to the master station.
[0098] Among them, the message transmission direction when the first target slave station transmits the first data response message is opposite to the message transmission direction when the first target slave station receives the first data request message.
[0099] In this way, by using the first master station and the second master station to transmit the same data request message in different transmission directions respectively, it can ensure that the remaining slave stations can correctly receive the data request message when one slave station fails.
[0100] According to the technical solution provided by the embodiment of the present application, by adopting a ring network topology, that is, the first master station in the industrial Ethernet is sequentially connected in series with the first to the Nth slave stations, and the second master station is sequentially connected in series with the Nth to the first slave stations. The first master station as the active master station generates a first data request message and sequentially sends the first data request message in the first direction. And the second master station as the standby master station receives the first data request message from the first master station and sequentially sends the first data request message in the second direction opposite to the first direction. Thus, when any master station or slave station fails, it can ensure that all slave stations can successfully receive the data request and report the response data, improving the reliability of the industrial Ethernet.
[0101] Figure 4 It is a schematic flowchart of the method for the first target slave station provided by the embodiment of the present application to determine the first data response message. As Figure 4 shown, the method includes the following steps:
[0102] In step S21, in response to determining that the first data request message is received for the first time, parse the first data request message.
[0103] In step S22, forward the first data request message to the distributed bus interface DP slave station.
[0104] In step S23, receive the response data sent by the DP slave station, and determine the first data response message based on the response data.
[0105] In some embodiments of the present application, when the first target slave station determines the first data response message, it may first determine whether the first data request message it receives is the first data request message received during the current industrial Ethernet data transmission cycle. If so, parse the first data request message and forward the first data request message to the DP slave station.
[0106] Among them, the first target slave station determines whether the first data request message it receives is the first data request message received during the current industrial Ethernet data transmission cycle. It can be to receive the first data request message, parse the unique identifier of the first data request message; determine whether the first data request message with the unique identifier has been received during the current industrial Ethernet data transmission cycle. If so, discard the first data request message; if not, determine that the first data request message is received for the first time.
[0107] Adopting this method can avoid repeatedly executing the control instructions in the first data request message, resulting in control accidents, and improve network security.
[0108] After the DP slave station executes the control instructions in the first data request message and generates response data, the first target slave station receives the response data and generates the first data response message based on the response data.
[0109] Figure 5 It is a schematic flowchart of another industrial control data transmission method provided by an embodiment of the present application.
[0110] As Figure 5 shown, the method includes the following steps:
[0111] In step S41, the second master station monitors the first master station.
[0112] In step S42, in response to determining that the first master station fails based on the monitoring result, the second master station connects to the first slave station, and the second master station is promoted to the active master station of the industrial Ethernet.
[0113] In step S43, the second master station generates a second data request message and sends the second data request message to N slave stations in the second direction.
[0114] In step S44, the second master station receives the second data response message sent by the second target slave station, and the second target slave station is the destination slave station in the second data request message.
[0115] In some embodiments of the present application, the method may be executed by a second master station in an industrial Ethernet for transmitting data between the second master station and slave stations in the industrial Ethernet. The industrial Ethernet may include a first master station, a second master station, and N slave stations. The first master station is the active master station in the industrial Ethernet, and the second master station is the standby master station in the industrial Ethernet. The first master station is serially connected to the first to the Nth slave stations in sequence, and the second master station is serially connected to the Nth to the first slave stations in sequence, where N is a positive integer.
[0116] The second master station may monitor the first master station. In one example, the second master station may determine whether it times out to receive a first master station message, and the first master station message includes at least one of the following: a first master station data transmission message, a first master station system message, and a handshake message between the first master station and the second master station.
[0117] That is to say, when the second master station monitors the first master station, all messages sent or received by the first master station will be transmitted to the second master station. On the other hand, a handshake message may be periodically sent between the first master station and the second master station to maintain the communication connection. If the second master station determines that the time since the last receipt of a message from the first master station exceeds a preset duration, it may determine that the first master station has failed.
[0118] If the second master station determines that the first master station has failed based on the monitoring result, the second master station may connect to the first slave station and promote the second master station to be the active master station in the industrial Ethernet. On the other hand, the first master station may disconnect from the first slave station.
[0119] After being promoted to the active master station, the second master station may generate a second data request message and send the second data request message to the N slave stations in a second direction. The second data request message also includes a destination slave station, that is, a second target slave station. After receiving the second data request message, the destination slave station forwards the second data request message to each DP slave station connected thereto and receives the response data from the DP slave stations. The destination slave station generates a second data response message based on the response data and transmits the second data response message to the second master station.
[0120] Wherein, the message transmission direction when the second target slave station transmits the second data response message is opposite to the message transmission direction when the second target slave station receives the second data request message.
[0121] In certain embodiments of the present application, after executing step S43, the method may further include:
[0122] In step S45, in response to determining that the response to the second data request message times out, the second master station sends the second data request message to the N slave stations in a first direction, and the first direction and the second direction are opposite directions.
[0123] When the first master station fails, the second master station can be switched to the active master station and connected to the first slave station, so that the second master station and the first to the Nth slave stations form a closed loop. Under normal circumstances, the second master station can transmit messages in the default direction, for example, transmit request messages in the direction from the Nth to the first slave station, and transmit response messages in the opposite direction.
[0124] At this time, if a slave station fails, the second master station may not be able to transmit the request message to the slave stations between this slave station and the first slave station, and the slave stations between the first slave station and this slave station may not be able to transmit the response message to the second master station either.
[0125] In view of this, when the second slave station determines that the response of the second data request message times out, that is, when it determines that there is a faulty slave station, the second slave station can send the second data request message to the N slave stations in the first direction, so as to ensure the correct transmission of data.
[0126] For example, if the ith slave station fails, and the destination slave station of the current second data request message is the (i - j)th slave station, where i is less than N, j is greater than or equal to 1, and i - j is greater than 1. Since the second master station transmits the request message in the direction from the Nth to the first, the message transmission will abort when it reaches the ith slave station, and the second master station cannot receive the response message returned by the (i - j)th slave station within the preset time.
[0127] At this time, the second master station can transmit the second data request message again in the direction from the first to the Nth. Since (i - j) is less than i, the second data request message can be successfully sent to the (i - j)th slave station, and then the second data response message is transmitted in turn in the direction from the (i - j)th to the first slave station, thus ensuring the normal transmission of data.
[0128] When performing data transmission in the next cycle, the second master station can use the direction of the previous data transmission as the default direction. For example, if the previous request message transmission direction is from the first to the Nth slave station direction, the data direction of this cycle is the same as the previous one.
[0129] Figure 6 It is a schematic diagram of the Powerlink network structure obtained by using the ring network networking method provided in the embodiments of the present application. As Figure 6As shown in the figure, a ring network can be formed by using two Powerlink masters (Master 1 and Master 2) and N Powerlink slaves. At any given time, only one Powerlink master in the ring network is in the working mode and can perform data exchange, while the other Powerlink master is in the listening mode. The listening mode only parses the input data and does not perform output communication. With this networking method, if the network where any one of the master stations on either side of the ring network is disconnected, the Powerlink master that was originally in the working mode will redundantly switch to the listening mode, and the Powerlink master that was originally in the listening mode will switch to the working mode. The network transmission direction will change, and data transmission will be realized in the reverse direction starting from the node at the disconnection point, without losing the data reporting of some Powerlink slaves, thereby improving the stability and reliability of the industrial site and preventing losses caused by the suspension of on-site production.
[0130] Among them, each master station and slave station has two physical layer (PHY) ports. One PHY port of the master station or slave station is connected to one PHY port of the previous station (master station / slave station), and the other PHY port of the master station or slave station is connected to one PHY port of the next station (master station / slave station), thus connecting end to end to form a ring.
[0131] Figure 7 It is a schematic diagram of the switching method when a master station fails in a Powerlink network with a ring network configuration. As Figure 7 shown in the figure, there are two master stations in the ring network. When a network failure occurs on one side of a certain master station, data will be transmitted from the other side network. One of them is in the active state, and the other master station is in the standby state. The standby master station only listens. When the working master station fails, the standby master station takes over its work and continues to maintain the stable operation of the network.
[0132] The range of the slave station node numbers of POWERLINK is from 1 to 239, and the node number of the standard master station is 240. For a master station redundancy system, since there are multiple master stations, the range of the node numbers of these master stations is 241-250. For the active master station, when sending out SoC, SoA, PollRequest, and ASND data frames, the value of the node identifier (NODE ID) in them is set to 240; when sending out PollResponse data frames, the NODE ID is set to the NODE ID of the active master station itself. The standby master station uses its own node number to send and receive data.
[0133] That is to say, when Figure 7When the master station with node number 241 is active, it uses 241 and 240 as its own node numbers to send and receive data. When the master station with node number 241 fails and the master station with node number 242 takes over its work, the master station with node number 242 uses 242 and 240 as its own node numbers to send and receive data.
[0134] After the active master station is switched, the standby master station and each slave station still form a ring network. At this time, within a ring network, data is transmitted from one node to another node in the default direction. If a certain section of the network in the middle fails and data cannot be sent to the nodes behind this section of the network along this direction, after the network system detects this situation, it will automatically transmit the data required by the nodes behind this section of the network from another direction. The network system will record the communication status each time, and the next communication will follow the successful communication path of the previous time.
[0135] Figure 8 It is a schematic diagram of the switching method when a slave station fails in a Powerlink network with a ring network. As Figure 8 shown, the active master station can send data in the order of slave station node 1 to slave station node 5, and receive data in the order of slave station node 5 to slave station node 1. When there is a network failure between slave station node 3 and slave station node 4, if the destination slave station of this data transmission is slave station node 4, the data of the active master station cannot be transmitted to this slave station node 4, and thus the response data reported by slave station node 4 cannot be received either.
[0136] At this time, the standby master station can forward the data received from the active master station in the order of slave station node 5 to slave station node 1, and receive it in the order of slave station node 1 to slave station node 5. Since the network between the standby master station and slave station node 4 is normal, this path can correctly send data to slave station node 4 and can also normally receive the response data returned by slave station node 4. The standby master station then forwards the received response data to the active master station, thus completing this data transmission.
[0137] On the other hand, if the active master station itself fails, at this time the standby master station will be promoted to the active master station, and the original standby master station is connected to slave station node 1 through a switching unit. Under normal circumstances, the original standby master station sends data in the order of slave station node 5 to slave station node 1, and receives data in the order of slave station node 1 to slave station node 5.
[0138] When there is a network failure between slave node 3 and slave node 4, if the destination slave of the current data transmission is slave node 2, the original standby master station cannot correctly transmit data to this slave node 2, nor can it receive response data from this slave node 2. At this time, the original standby master station can switch the data transmission direction, send data in the order from slave node 1 to slave node 5, and receive data in the order from slave node 5 to slave node 1, so as to be able to transmit data normally with slave node 2.
[0139] That is to say, in a ring network, when the slave ID number requested by the master station to access matches the ID number of one of the many configured slave stations, this slave station processes the data uploaded by the DP slave station and then sends it to the next-level slave station; when the slave ID number requested by the master station to access does not match the ID number of one of the many configured slave stations, this slave station forwards the data from the previous-level slave station to the next-level slave station from another PHY port.
[0140] Figure 9 It is the topology diagram of the Powerlink ring network redundancy system provided by the embodiment of the present application. As Figure 9 shown, the rack where the active master station is located is the current master control communication active rack, the rack where the standby master station of the master station is located is the master control communication listening rack, the rack where the slave station is located is the IO module rack, the main port of the active master station of the master station is connected to the first slave station, the first slave station is connected to the next slave station, and so on. The last slave station is connected to the standby master station, and the standby master station is connected to the slave port of the active master station to form a Powerlink ring network.
[0141] Figure 10 It is the architecture block diagram of the master-slave module at the ARM and FPGA layers provided by the embodiment of the present application. As Figure 10 shown, the Powerlink ring network master station adopts the XILINX ZYNQ (ARM+FPGA) architecture, constructs the MAC layer and PCP protocol layer of the Powerlink protocol stack inside the FPGA, the ARM implements the application layer and the AP layer, and the PCP layer and the AP layer interact through registers and / or buffers. The master station card communicates with the master control through PCIE, and data is shared with the master control through DPRAM in the master station card.
[0142] The Powerlink ring network slave station realizes the function of converting the POWERLINK slave station to the DP master station, adopts the XILINX ZYNQ (ARM+FPGA) architecture, constructs the MAC layer and PCP layer of the Powerlink protocol stack inside the FPGA, and the DP protocol layer. The ARM implements the AP layer, and the PCP layer and the AP layer interact through registers / tribuf, and the PCP layer and the DP layer interact through DPRAM. It realizes data communication between the Powerlink master and slave stations, periodic data and aperiodic data transmission, and network status diagnosis.
[0143] The AP layer of the Powerlink protocol stack mainly realizes functions such as object dictionary establishment, network management, asynchronous stage data processing, PDO data reading, and node configuration.
[0144] The PCP layer of the Powerlink protocol stack is mainly responsible for functions such as the timing control, data transceiver, and network driver of the Powerlink protocol stack.
[0145] The PCP layer mainly realizes the interaction with the application layer, the MAC layer mainly realizes the data interaction with the PHY layer, and the data interaction between the PCP layer and the MAC layer is carried out in the DMA manner.
[0146] Figure 11 It is the functional block diagram of the master-slave module provided by the embodiment of the present application in the MAC layer and the PCP layer. As Figure 11 shown, the master-slave module includes a first physical layer interface, a second physical layer interface, a hub, a data receiving buffer unit, a data sending buffer unit, a multi-region buffer unit, a state machine, a packet assembling unit, and an application processing unit.
[0147] Among them, the first physical layer interface and the second physical layer interface are respectively connected to different other master-slave modules. One end of the hub is respectively connected to the first physical layer interface and the second physical layer, and the other end is respectively connected to the data receiving buffer unit and the data sending buffer unit. The data receiving buffer unit and the data sending buffer unit are connected to the multi-region buffer unit, and the multi-region buffer unit is connected to the application processing unit. The multi-region buffer unit is also connected to the packet assembling unit, and the packet assembling unit is connected to the data sending buffer unit.
[0148] Among them, the multi-region buffer unit includes at least two storage regions. At least one first region is used for temporarily storing the received real-time data, and at least one second region is used for backing up the received historical data. In some implementation manners, the multi-region buffer unit can be, for example, a triple buffer unit (TripleBuffer).
[0149] That is to say, the master-slave module may include a Host parallel interface, a control and status register, a triple buffer storage, a transmitted packet assembling, a received buffer storage, a transmitted buffer storage, an interrupt control, an Ethernet PHY configuration, an NMT state machine, a DLL state machine, and an Open MAC layer. Among them, the functions of each unit are shown in Table 1:
[0150] Table 1 Functions of Each Unit in the Master-Slave Module
[0151]
[0152]
[0153] Both the master station and the slave station are started through a common initialization process. After this process ends, the node-specific Powerlink Node ID is evaluated to determine whether the node is set as the master station or the slave station. The subsequent processes are divided into the master-station-specific part and the slave-station-specific part.
[0154] Figure 12 It is a schematic diagram of the NMT of the network state machine in the master station module. As Figure 12 shown, NMT_MS_NOT_ACTIVE is the listening state and does not send any frames. In the NMT_MS_PRE_OPERATIONAL_1 state, the master station starts to execute the POWERLINK short cycle, without PDO exchange, and identifies the configured slave stations.
[0155] In the NMT_MS_PRE_OPERATIONAL_2 state, the master station starts to execute the isochronous synchronization cycle, starts polling the identified slave stations through PReq frames, and identifies the configured slave stations.
[0156] In the NMT_MS_READY_TO_OPERATE state, the master station should start sending PDO data to the identified isochronous slave stations as required by the PDO mapping. Mark the data invalid and ignore the PDO data received from the slave stations. For the identified asynchronous-only slave stations, cyclic access should be performed through the SoA StatusRequest frame. For the configured but unidentified slave stations, search should be performed through the SoAIdentRequest frame;
[0157] NMT_MS_OPERATIONAL is the running state. In this state, PDOs can be sent and received, and the data is valid. The identified asynchronous-only slave stations should be cyclically accessed through the SoA StatusRequest frame. For the configured but unidentified slave stations, search should be performed through the SoAIdentRequest frame.
[0158] Figure 13 It is a schematic diagram of the NMT of the network state machine in the slave station module. As Figure 13 shown, in the NMT_CS_NOT_ACTIVE state, the slave station listens to the network and waits for the NMTReset command sent by ASnd.
[0159] In the NMT_CS_PRE_OPERATIONAL_1 state, when the master station authorizes through the SoA Asynclnvite command, this slave station should send a frame, identify the IdentRequest of the master station and respond (carrying the device information of the slave station), without PDO communication.
[0160] In the NMT_CS_PRE_OPERATIONAL_1 state, when the master station sends authorization through the SoA Asynclnvite command, the slave station shall send a frame to identify the master station's IdentRequest and respond (carrying the slave station's device information), and there is no PDO communication.
[0161] In the NMT_CS_PRE_OPERATIONAL_2 state, the slave station waits for the configuration to complete and can be queried by the master station through PReq; the received PDO data is invalid, and the returned PRes frame needs to mark the data as invalid (carrying the slave station status).
[0162] In the NMT_CS_READY_TO_OPERATE state, when the master station queries this periodic node through PReq, this node shall respond through PRes (marking the data as invalid).
[0163] NMT_CS_OPERATIONAL is the operating state. When the master station queries this periodic node through PReq, this node shall respond through PRes, and the data is valid.
[0164] NMT_CS_STOPPED is the stopped state. In this state, it does not participate in the periodic exchange and still monitors the SoA frame.
[0165] Figure 14 It is a schematic diagram of the periodic state machine DLL_MS in the master station module. As Figure 14 shown, DLL_MS generates a frame sequence in a POWERLINK cycle and monitors the reaction of the slave station. The order of the frame sequence is related to the NMT_MS state.
[0166] Normally, the slave station is synchronized through the reception of SoC. This means that the most important parameter for POWERLINK network synchronization is the timing accuracy of the event DLL_ME_SOC_TRIG.
[0167] If DLL_MS detects an error in the communication, an error event will be generated for "DLL error handling".
[0168] DLL_MS_NON_CYCLEIC phase:
[0169] This phase indicates that cyclic communication has not started or has been stopped by the NMT_MS state machine (NMT_MS_PRE_OPERATIONAL_1 state of NMT). The state machine waits in this state until the NMT state changes to NMT_MS_PRE_OPERATIONAL_2. This depends on the current NMT state, the events to be processed, and the events to be ignored. In DLL_MS_NON_CYCLIC, the event DLL_ME_SOA_TRIG should be generated instead of DLL_ME_SOC_TRIG.
[0170] DLL_MS_WAIT_SOA state:
[0171] If an authorized but non-acknowledged SoA is sent, the master station waits in this state until the asynchronous phase times out or any Ethernet frame is received before the start of the next POWERLINK short cycle.
[0172] DLL_MS_WAIT_SOC_TRIG state:
[0173] If the communication for this cycle has been completed, the state machine remains in this state until the next cycle starts with DLL_ME_SOC_TRIG.
[0174] DLL_MS_WAIT_PRES state:
[0175] After sending the PReq frame, the state machine waits in this state for a response. The waiting time is limited by a timeout.
[0176] DLL_MS_WAIT_ASND state:
[0177] If an authorized (Invite) SoA is sent, the state machine waits in this state until the asynchronous phase ends with the event DLL_ME_SOC_TRIG.
[0178] The dependencies between NMT_MS and DLL_MS are as follows:
[0179] In the NMT_MS states of NMT_GS_INITIALISATION and NMT_MS_NOT_ACTIVE, the master station cyclic state machine is not active. This indicates that before the first transition to DLL_MS_NON_CYCLIC, its state does not affect the master station's response. The response is determined by the NMT_MS state.
[0180] In the NMT_MS_NMT_MS_BASIC_ETHERNET state, the cyclic state machine is not active. This indicates that its state does not affect the master's response before the first transition to DLL_MS_NON_CYCLIC. The response is defined by the NMT_MS state.
[0181] In the NMT_MS_PRE_OPERATIONAL_1 state, the master cyclic state machine generates POWERLINK short cycles and monitors the behavior of slaves. DLL_MS is in the DLL_MS_NON_CYCLIC mode.
[0182] In the NMT_MS_OPERATIONAL, NMT_MS_READY_TO_OPERATE, and NMT_MS_PRE_OPERATIONAL_2 states, the master cyclic state machine generates POWERLINK cycles and monitors the behavior of slaves.
[0183] Figure 15 It is a state diagram of the communication processing within a POWERLINK cycle by DLL_CS. As Figure 15 shown, DLL_C monitors the order of frames received within a cycle and reacts as follows. The expected order of frame reception depends on the state of NMT_CS.
[0184] If an error in the communication is detected by DLL_CS, an error event of "DLL error handling" is generated. DLL_CS will attempt to continue the communication without considering any errors.
[0185] DLL_CS_NON_CYCLIC state:
[0186] This state indicates that isochronous synchronous communication has not started or the connection has been lost. It depends on the current state of NMT_CS, as well as the events being processed and the events to be ignored.
[0187] DLL_CS_WAIT_SOC state:
[0188] After receiving the SoA frame, the state machine waits in this state until the start of the next cycle (triggered by the SoC frame from the master). Any type of Ethernet frame can be received between the SoA frame and the SoC frame (asynchronous phase).
[0189] DLL_CS_WAIT_PREQ state:
[0190] After the start of the cycle, the state machine waits in this state for the PReq frame. After receiving the PReq, the slave should respond with a PRes frame. In this state, the slave can receive or process PRes frames from other slaves.
[0191] DLL_CS_WAIT_SOA status:
[0192] After receiving the PReq frame, the state machine waits for the reception of the SoA frame. The reception of the SoA frame confirms the end of the isochronous synchronization phase. In this state, the slave station can receive or process PRes frames from other nodes.
[0193] The dependency relationship between NMT_CS and DLL_CS is as follows:
[0194] When NMT_C is in the states of NMT_GS_INITIALISATION, NMT_CS_NOT_ACTIVE, NMT_CS_BASIC_ETHERNET, and NMT_CS_PRE_OPERATIONAL_1, DLL_CS is in the state of DLL_CS_NON_CYCLIC.
[0195] When NMT_C is in the states of NMT_CS_OPERATIONAL and NMT_CS_READY_TO_OPERATE, there are three mandatory frames for non-multiplexed nodes. They should appear in the specified order in each cycle: SoC, PReq, and SoA. If the node is accessed by multiplexing, only the SoC and SoA frames are mandatory in each cycle. Only when the node is configured in this way, the PReq frame is mandatory in the multiplexed cycle.
[0196] When NMT_C is in the state of NMT_CS_PRE_OPERATIONAL_2, there are two mandatory frames. They should appear in the specified order in each cycle: SoC and SoA. The PReq frame can appear between SoC and SoA. In the state of NMT_CS_PRE_OPERATIONAL_2, since the node has not been configured, the timeout detection of SoC is not performed.
[0197] The cycle state machine monitors all received frames to detect frame loss. Regardless of the current state of the cycle state machine, the received frames should be accepted by the slave station.
[0198] Any combination of the above optional technical solutions can form an optional embodiment of the present application, which will not be elaborated one by one here.
[0199] The following is an embodiment of the device of the present application, which can be used to execute the method embodiment of the present application. For the details not disclosed in the device embodiment of the present application, please refer to the method embodiment of the present application.
[0200] Figure 16 It is a schematic diagram of an industrial control data transmission device provided by an embodiment of the present application. As Figure 16 shown, the device includes:
[0201] The packet assembly module 1601 is configured to generate a first data request message by a first master station in an industrial Ethernet, and the first master station is the active master station in the industrial Ethernet.
[0202] The sending module 1602 is configured to sequentially send the first data request message from the first master station to N slave stations in the industrial Ethernet. The first master station is sequentially connected in series with the first to the Nth slave stations, and N is a positive integer.
[0203] The sending module 1602 is further configured to send the first data request message from the first master station to a second master station, so that the second master station sequentially forwards the first data request message to N slave stations in a second direction. The second master station is the standby master station in the industrial Ethernet, and the second master station is sequentially connected in series with the Nth to the first slave stations. The first direction and the second direction are opposite directions.
[0204] The receiving module 1603 is configured to receive a first data response message sent by a first target slave station by the first master station, and the first target slave station is the destination slave station in the first data request message.
[0205] According to the technical solution provided by the embodiment of the present application, by adopting a ring network formation method, that is, the first master station in the industrial Ethernet is sequentially connected in series with the first to the Nth slave stations, and the second master station is sequentially connected in series with the Nth to the first slave stations. The first master station as the active master station generates a first data request message and sequentially sends the first data request message in a first direction. Moreover, the second master station as the standby master station receives the first data request message from the first master station and sequentially sends the first data request message in a second direction opposite to the first direction. Therefore, when any one of the master stations or slave stations fails, it can ensure that all slave stations can successfully receive the data request and report the response data, improving the reliability of the industrial Ethernet.
[0206] Figure 17 It is a schematic diagram of another industrial control data transmission device provided by the embodiment of the present application. As Figure 17 shown, the device includes:
[0207] The monitoring module 1701 is configured to monitor the first master station by the second master station in the industrial Ethernet. The industrial Ethernet includes a first master station, a second master station and N slave stations. The first master station is the active master station in the industrial Ethernet, the second master station is the standby master station in the industrial Ethernet, the first master station is sequentially connected in series with the first to the Nth slave stations, the second master station is sequentially connected in series with the Nth to the first slave stations, and N is a positive integer.
[0208] The switching module 1702 is configured to respond to determining that the first master station fails based on the monitoring result, connect the second master station to the first slave station, and promote the second master station to be the active master station of the industrial Ethernet.
[0209] The sending module 1703 is configured to generate a second data request message by a second master station and send the second data request message to N slave stations in a second direction.
[0210] The receiving module 1704 is configured to receive, by the second master station, a second data response message sent by a second target slave station, where the second target slave station is the destination slave station in the second data request message.
[0211] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution is prior or subsequent. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0212] Those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional unit and module is used as an example for illustration. In practical applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0213] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above method embodiments of the present application, it can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. The computer program can include computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0214] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.
Claims
1. An industrial control data transmission method, characterized in that, The method is used for transmitting data between a master station and slave stations in an industrial Ethernet. The method includes: Step S11, the first master station generates a first data request message, and the first master station is the active master station in the industrial Ethernet; Step S12, the first master station sequentially sends the first data request message to N slave stations in the industrial Ethernet. The first master station is sequentially connected in series with the first to the Nth slave stations, and N is a positive integer; Step S13, the first master station sends the first data request message to the second master station, so that the second master station forwards the first data request message to the N slave stations in sequence in the second direction. The second master station is the standby master station in the industrial Ethernet. The second master station is sequentially connected in series with the Nth to the first slave stations, and the first direction and the second direction are opposite directions; Step S14, the first master station receives a first data response message sent by the first target slave station, and the first target slave station is the destination slave station in the first data request message.
2. The method according to claim 1, wherein The first data response message is determined by the first target slave station in the following manner: In response to determining that the first data request message is received for the first time, parse the first data request message; Forward the first data request message to a distributed bus interface DP slave station; Receive the response data sent by the DP slave station, and determine the first data response message based on the response data.
3. The method according to claim 2, wherein The determination of receiving the first data request message for the first time includes: Receive the first data request message, and parse the unique identifier of the first data request message; Determine whether a first data request message with the unique identifier has been received during the current industrial Ethernet data transmission cycle; If so, discard the first data request message; If not, determine that the first data request message is received for the first time.
4. An industrial control data transmission method, characterized in that, The method is used for transmitting data between a master station and slave stations in an industrial Ethernet. The industrial Ethernet includes a first master station, a second master station and N slave stations. The first master station is the active master station in the industrial Ethernet. The second master station is the standby master station in the industrial Ethernet. The first master station is sequentially connected in series with the first to the Nth slave stations. The second master station is sequentially connected in series with the Nth to the first slave stations, and N is a positive integer; The method includes: Step S41, the second master station monitors the first master station; Step S42, in response to determining that the first master station fails based on the monitoring result, the second master station connects to the first slave station, and the second master station is promoted to be the active master station in the industrial Ethernet; Step S43, the second master station generates a second data request message and sends the second data request message to the N slave stations in the second direction; Step S44, the second master station receives a second data response message sent by the second target slave station, and the second target slave station is the destination slave station in the second data request message.
5. The method according to claim 4, wherein After the step S43, the method further includes: Step S45: In response to determining that the response to the second data request message has timed out, the second master station sends the second data request message to the N slave stations in a first direction, where the first direction and the second direction are opposite directions.
6. The method according to claim 4, wherein In step S42, the second master station determines that the first master station has failed in the following manner: In response to determining that the reception of the first master station message has timed out, the second master station determines that the first master station has failed; Wherein, the first master station message includes at least one of the following: The first master station data transmission message, the first master station system message, and the handshake message between the first master station and the second master station.
7. An industrial control data transmission device, characterized in that, Including: A packet assembly module, configured to generate a first data request message by a first master station in an industrial Ethernet, where the first master station is the active master station in the industrial Ethernet; A sending module, configured to sequentially send the first data request message from the first master station to N slave stations in the industrial Ethernet. The first master station is sequentially connected in series with the first to the Nth slave stations, and N is a positive integer; The sending module is further configured to send the first data request message from the first master station to the second master station, so that the second master station sequentially forwards the first data request message to the N slave stations in a second direction. The second master station is the standby master station in the industrial Ethernet. The second master station is sequentially connected in series with the Nth to the first slave stations, and the first direction and the second direction are opposite directions; A receiving module, configured to receive a first data response message sent by a first target slave station by the first master station, where the first target slave station is the destination slave station in the first data request message.
8. An industrial control data transmission device, characterized in that Including: A monitoring module, configured to monitor the first master station by a second master station in an industrial Ethernet. The industrial Ethernet includes a first master station, a second master station, and N slave stations. The first master station is the active master station in the industrial Ethernet. The second master station is the standby master station in the industrial Ethernet. The first master station is sequentially connected in series with the first to the Nth slave stations. The second master station is sequentially connected in series with the Nth to the first slave stations, and N is a positive integer; A switching module, configured to connect the first slave station in response to determining that the first master station has failed based on the monitoring result, and the second master station is promoted to be the active master station of the industrial Ethernet; A sending module, configured to generate a second data request message by the second master station and send the second data request message to the N slave stations in a second direction; A receiving module, configured to receive a second data response message sent by a second target slave station by the second master station, where the second target slave station is the destination slave station in the second data request message.
9. A master-slave module in an industrial Ethernet, characterized in that, The master-slave module, as a master station or a slave station in an industrial Ethernet, executes the method according to any one of claims 1 to 6. The master-slave module includes: A first physical layer interface, a second physical layer interface, a hub, a data reception buffer unit, a data transmission buffer unit, a multi-region buffer unit, a state machine, a packet assembly unit, and an application processing unit; The first physical layer interface and the second physical layer interface are respectively connected to different other master-slave modules; One end of the hub is respectively connected to the first physical layer interface and the second physical layer, and the other end is respectively connected to the data receiving buffer unit and the data sending buffer unit; The data receiving buffer unit and the data sending buffer unit are connected to the multi-region buffer unit, and the multi-region buffer unit is connected to the application processing unit; The multi-region buffer unit is further connected to the packet assembly unit, and the packet assembly unit is connected to the data sending buffer unit.
10. The master-slave module according to claim 9, wherein The multi-region buffer unit includes at least two storage regions; Wherein, at least one first region is used for temporarily storing the received real-time data, and at least one second region is used for backing up the received historical data.