Industrial Ethernet communication method, system and network equipment

By using frame processing units and preset address mapping rules in industrial Ethernet communications, the problem of poor real-time performance of data collection under complex topologies of the EtherCAT protocol is solved, achieving fast response and effective transmission of slave data, and improving real-time control. efficiency.

CN118827273APending Publication Date: 2024-10-22深圳市三旺通信股份有限公司
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410980236.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-10-22

AI Technical Summary

Technical Problem

In industrial Ethernet scenarios with a large number of slave stations and complex topology, the real-time performance of data collection in the EtherCAT protocol is poor, resulting in long data transmission times and affecting the efficiency of real-time control.

Method used

By introducing a frame processing unit and preset address mapping rules in industrial Ethernet communication, the slave station is allowed to respond to the read command during the PDO message return process, directly write the target data in the message, and increment the work counter when necessary , ensuring the real-time and validity of data.

Benefits of technology

It improves the real-time and effectiveness of slave station data, enables the master station to receive and respond to data quickly, reduces data transmission time, and improves overall processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118827273A_ABST
    Figure CN118827273A_ABST
Patent Text Reader

Abstract

The invention relates to the field of Ethernet communication, and discloses an industrial Ethernet communication method, an industrial Ethernet communication system and network equipment. The method comprises the following steps: receiving a PDO message sent by an industrial master station or a previous industrial slave station, and determining whether to forward the PDO message to a next industrial slave station; under the condition that the frame processing unit receives the PDO message returned by the next industrial slave station or determines that the PDO message is not forwarded to the next industrial slave station, if it is determined that a read instruction exists in the PDO message through a preset address mapping rule, the read instruction is responded; and writing the read target data into the target position in the PDO message and then forwarding the target data to the industrial master station or the previous industrial slave station. According to the invention, each slave station responds to the read instruction carried by the message in the message returning process so as to acquire the corresponding data, so that the real-time performance of data acquisition is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Ethernet communications, and in particular to an industrial Ethernet communication method, system and network device. Background Art

[0002] At present, there are many industrial Ethernet protocols used for real-time control and communication in the field of industrial automation, among which EtherCAT protocol is one of the fastest communication protocols. EtherCAT and traditional communication protocols (such as Modbus TCP protocol) are based on Ethernet and both adopt a one-master-multiple-slave communication method. In the same scenario, the EtherCAT protocol has a faster communication speed and can easily cope with real-time control scenarios, achieving faster data transmission and shorter communication cycles, while the Modbus TCP protocol has a slower communication speed and is suitable for scenarios with small data volumes and low real-time requirements. The EtherCAT slave station requires a dedicated chip to complete the protocol parsing to ensure the real-time performance of data communication. The main communication methods of EtherCAT are PDO and SDO. PDO is used for periodic data communication, and SDO is used for non-periodic data communication. Among them, PDO communication uses FMMU mechanism, logical read and write instructions, etc. to quickly complete the data collection and distribution of EtherCAT slave stations.

[0003] Generally speaking, the PDO communication method of EtherCAT is that the master station sends out PDO messages. After the PDO messages are sent out, when they pass through each slave station in turn, according to the FMMU mapping rules, logical read instructions are used to complete the collection of slave device data. After reaching the last slave station node, it returns along the original route and passes through each slave station in turn. During the return process, each slave station does not process the message. As a result, in the case of a large number of slave stations, a complex topology structure and strict real-time requirements, the data collected by the first slave station needs to wait until the last slave station completes the collection and returns to the master station before it is valid, which greatly reduces the real-time effectiveness of the first collected slave device data. Summary of the invention

[0004] In view of this, in order to solve the technical problem in the prior art that the real-time performance of slave device data collection is poor when there are a large number of slave stations and a complex topology structure, the present application provides an industrial Ethernet communication method, system and network device.

[0005] In a first aspect, the present application provides an industrial Ethernet communication method, applied to an industrial slave station, comprising:

[0006] Receive a PDO message sent by an industrial master station or a previous industrial slave station, and determine whether to directly forward the PDO message to the next industrial slave station when the PDO message passes through an internal frame processing unit;

[0007] When the frame processing unit receives the PDO message sent back by the next industrial slave station or determines that the PDO message is not forwarded to the next industrial slave station, if it is determined through a preset address mapping rule that there is a read instruction in the PDO message, respond to the read instruction to write the read target data to the target location in the PDO message, and then forward the PDO message after the data is written to the industrial master station or the previous industrial slave station.

[0008] In an optional implementation manner, when the PDO message passes through the internal frame processing unit, the process of determining whether to directly forward it to the next industrial slave station further includes:

[0009] When the frame processing unit receives the PDO message for the first time, determining whether there is a write instruction in the PDO message by using the preset address mapping rule;

[0010] If not, determining whether to directly forward the PDO message to the next industrial slave station;

[0011] If so, respond to the write instruction, and after determining that the execution operation of the write instruction is completed, determine whether to directly forward the PDO message to the next industrial slave station.

[0012] In an optional embodiment, it also includes:

[0013] If it is determined that the current industrial slave station is the last industrial slave station, when it is determined that the write instruction does not exist in the PDO message or when it is determined that the execution operation of the write instruction is completed, it is determined that the PDO message is not forwarded to the next industrial slave station, and it is determined whether there is a read instruction in the PDO message through the preset address mapping rule.

[0014] In an optional implementation, if the current industrial slave station is the last industrial slave station, and after determining that the execution operation of the write instruction is completed, it also includes: increasing the working counter value inside the PDO message by one; and after responding to the read instruction to write the read target data to the target position in the PDO message, it also includes: increasing the working counter value by two;

[0015] If it is determined that the current industrial slave station is not the last industrial slave station, after determining that the current industrial slave station completes the execution operation of the write instruction, it also includes: increasing the working counter value inside the PDO message by one; and, after responding to the read instruction to write the read target data to the target position in the PDO message, it also includes: increasing the working counter value by one.

[0016] In an optional implementation manner, the process of determining that there is a read instruction in the PDO message by a preset address mapping rule includes:

[0017] Parsing the PDO message, addressing according to the mapping rule of the field bus memory management unit, so as to find the address space in the data part of the PDO message that is mapped with the physical address space of the current industrial slave station;

[0018] It is identified whether there is a read instruction in the address space.

[0019] In an optional implementation manner, the target location is an address space in the PDO message that is mapped to a physical address space of the current industrial slave station via the preset address mapping rule.

[0020] In a second aspect, the present application provides an industrial Ethernet communication method, applied to an industrial master station, comprising:

[0021] Configure preset address mapping rules;

[0022] Sending a PDO message, wherein the PDO message passes through each industrial slave station in sequence, so that each industrial slave station responds to the read instruction when determining that there is a read instruction in the PDO message through the preset address mapping rule during the return process of the PDO message, so as to write the read target data into the PDO message;

[0023] Receive the PDO message returned by each of the industrial slave stations.

[0024] In a third aspect, the present application provides an industrial Ethernet communication system, including an industrial master station and a plurality of industrial slave stations;

[0025] The industrial master station is used to configure a preset address mapping rule and send down a PDO message, wherein the PDO message passes through each of the industrial slave stations in sequence, so that each of the industrial slave stations executes the aforementioned industrial Ethernet communication method.

[0026] In a fourth aspect, the present application provides a network device, including a memory and a processor, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the aforementioned industrial Ethernet communication method.

[0027] In a fifth aspect, the present application provides a computer storage medium storing a computer program, which, when executed, implements the aforementioned industrial Ethernet communication method.

[0028] The embodiments of the present application have the following beneficial effects:

[0029] An embodiment of the present application provides an industrial Ethernet communication method, which is applied to an industrial slave station, and specifically includes: receiving a PDO message sent by an industrial master station or a previous industrial slave station, and determining whether to directly forward the PDO message to the next industrial slave station when the PDO message passes through an internal frame processing unit; when the frame processing unit receives a PDO message returned by the next industrial slave station or determines that the PDO message is not forwarded to the next industrial slave station, if it is determined through a preset address mapping rule that there is a read instruction in the PDO message, responding to the read instruction to write the read target data to the target position in the PDO message, and then forwarding the PDO message after the data is written to the industrial master station or the previous industrial slave station. In the present embodiment, when there are a large number of slave stations and a complex topological structure, each slave station responds to the read instruction carried in the message to collect its own internal data during the PDO message return process, thereby ensuring the real-time and validity of data such as sensitive data collected by each slave station, so that the master station can quickly respond based on the real-time nature of the data after receiving the data, avoiding the problem of responding to the read instruction during the message sending process so that the real-time validity of the collected data is reduced due to the long time it takes to be transmitted to the master station with the message return later. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present application and should not be regarded as limiting the scope of protection of the present application. In each of the drawings, similar components are numbered similarly.

[0031] Figure 1 A schematic diagram of the internal structure of an industrial slave station is shown;

[0032] Figure 2 A schematic diagram of an industrial Ethernet topology architecture in an embodiment of the present application is shown;

[0033] Figure 3 A schematic diagram of a process flow of an industrial Ethernet communication method in an embodiment of the present application is shown;

[0034] Figure 4 Another schematic diagram of the process of the industrial Ethernet communication method in the embodiment of the present application is shown;

[0035] Figure 5 A schematic diagram of the internal structure of an industrial slave station in an embodiment of the present application is shown;

[0036] Figure 6 A structural schematic diagram of an industrial Ethernet communication system in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0038] The components of the embodiments of the present application generally described and shown in the drawings herein may be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0039] Hereinafter, the terms "including", "having" and their cognates, which may be used in various embodiments of the present application, are intended only to indicate specific features, numbers, steps, operations, elements, components, or combinations of the foregoing items, and should not be understood as first excluding the existence of one or more other features, numbers, steps, operations, elements, components, or combinations of the foregoing items or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations of the foregoing items.

[0040] Furthermore, the terms “first”, “second”, “third”, etc. are merely used for distinguishing descriptions and are not to be understood as indicating or implying relative importance.

[0041] Unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meanings as those generally understood by those skilled in the art to which the various embodiments of the present application belong. The terms (such as those defined in generally used dictionaries) will be interpreted as having the same meanings as the contextual meanings in the relevant technical field and will not be interpreted as having idealized meanings or overly formal meanings unless clearly defined in the various embodiments of the present application.

[0042] Ethernet Control Automation Technology (EtherCAT) is a real-time industrial Ethernet technology based on Ethernet technology. This technology not only has the characteristics of high speed and high data efficiency, but also has a flexible network topology and encapsulates IP / UDP in the protocol, so communication can be achieved without the IP protocol. This technology adopts a master-slave structure. The master station has the control of the bus. The master station sends messages according to the control cycle. The data frame traverses all slave devices. Each slave device addresses the station message when the data frame passes by, and writes data or reads data to the specified position in the message according to the command in the data frame. Until the data frame accesses the last slave in the entire bus.

[0043] PDO (Process Data Object) is a data transmission format used for real-time Ethernet (Ethernet / IP) communication. It is used to transmit real-time data and provide a direct access channel to device application objects. It achieves efficient data transmission and interaction between devices by encapsulating process data in a standardized message structure.

[0044] FMMU (Fieldbus Memory Management Unit) is one of the core modules in the EtherCAT slave control IP core, which is used to implement the logical addressing of the master to the slave. FMMU implements the mapping between the logical address and the physical address of the slave, and supports bit-by-bit mapping. The FMMU unit is configured by the master and transmitted to the slave device during link startup. Each FMMU unit requires the following configuration information: data logical bit start address, slave physical memory start address, bit length, type bit indicating the mapping direction (input or output), and all data in the slave device can be bit-mapped to the master logical address.

[0045] Generally speaking, based on the PDO communication method of EtherCAT, the industrial master station (i.e., EtherCAT master station) sends PDO messages to the industrial slave stations (i.e., EtherCAT slave stations). When the message passes through each EtherCAT slave station in turn, Figure 1 As shown, after the PDO message enters from the Port0 port (i.e., the input port) of each EtherCAT slave station, it first passes through the frame processing unit for protocol data processing; then it is forwarded to other EtherCAT slave stations through the Port2 port (i.e., the output port), wherein the message forwarding process does not pass through the frame processing unit but is directly forwarded through the Port2 port.

[0046] Among them, if the time for each EtherCAT slave to process the EtherCAT protocol through the frame processing unit after receiving the PDO message is set to t1, the transmission time between the ports of any two adjacent EtherCAT slaves is t2, wherein the hardware delay is negligible; then, the EtherCAT master sends out a PDO message, and when it passes through each EtherCAT slave in turn, each EtherCAT slave responds to the read instruction carried in the message to collect the internal slave device data, and after the PDO message arrives at the last EtherCAT slave, the PDO message is returned along the original sending path, and each EtherCAT slave does not process the returned PDO message. Among them, taking the first EtherCAT slave station (i.e., slave station 1) as an example, at t1+t2, slave station 1 stores the data collected when responding to the read instruction into the corresponding position of the PDO message, and the PDO message after writing the data then passes through the remaining EtherCAT slave stations in turn (if the number of remaining slave stations required to pass is 8), and finally returns to the EtherCAT master station, then the time corresponding to the return of the PDO message to the master station is 9t1+18t2, which means that the data collected by slave station 1 at t1+t2 needs to be processed by the EtherCAT master station at 9t1+18t2, and then, with the increase of the number of slave stations in the industrial Ethernet topology, the more complex its topology is, the time for the data collected by each slave station to be sent to the master station will increase by a multiple of (t1+2t2), that is, in this topology, the slave station with a higher ranking will be more affected in terms of the real-time performance of the collected data, which will cause the master station to be unable to respond quickly based on the real-time effectiveness of the collected data, affecting the overall processing efficiency.

[0047] Based on this, an embodiment of the present application provides an industrial Ethernet communication method, which can be specifically applied to an industrial slave station (i.e., an EtherCAT slave station), wherein the industrial slave station operates within a network topology of industrial Ethernet, and the network topology includes an industrial master station (i.e., an EtherCAT master station) and an industrial slave station, wherein signals or data are transmitted between the industrial master station and the industrial slave station through an industrial Ethernet bus (i.e., an EtherCAT bus); optionally, within the same network topology, the number of the industrial master station and the industrial slave station is not limited here.

[0048] For reference, Figure 2 As shown, if the network topology includes an EtherCAT master station and multiple EtherCAT slave stations, where the equipment performance of each EtherCAT slave station is the same, the distance between each EtherCAT slave station is the same, the EtherCAT master station and each EtherCAT slave station are connected by a 100M network cable with an MII interface, and each EtherCAT slave station collects an equal amount of data when responding to a read command issued by the EtherCAT master station.

[0049] Furthermore, the EtherCAT master station can send a PDO message to the first EtherCAT slave station through the EtherCAT bus, and then the PDO message passes through each EtherCAT slave station in turn. After receiving the PDO message, each EtherCAT slave station responds to the instruction carried by the PDO message to complete the EtherCAT master station's data collection or writing operations on the EtherCAT slave station.

[0050] It is worth noting that, in the present embodiment, it is ensured that the PDO message passes through the frame processing unit of each EtherCAT slave station during the process of sending and returning, so that each EtherCAT slave station responds to the read instruction carried by the PDO message to collect its own internal data during the PDO message return process, thereby ensuring the real-time and validity of data such as sensitive data collected by each EtherCAT slave station, so that the EtherCAT master station can respond quickly based on the real-time nature of its data after receiving the data, avoiding the problem of responding to the read instruction during the message sending process so that the real-time validity of the collected data is reduced due to the long time it takes to transmit it back to the EtherCAT master station with the message later.

[0051] For example, Figure 3 As shown, the process of the industrial master station executing the industrial Ethernet communication method may include the following steps:

[0052] S110: Configure a preset address mapping rule.

[0053] S120, sending the PDO message so that the PDO message passes through each industrial slave station in sequence.

[0054] S130, receiving the PDO message sent back by each industrial slave station.

[0055] In this embodiment, the industrial master station pre-configures an address mapping rule before sending a PDO message, wherein the preset address mapping rule is used to map a continuous logical address space to a continuous physical address space of each industrial slave station, and then a PDO message can be used to address data in each arbitrarily distributed industrial slave station. The specific configuration process of the address mapping rule can be adjusted accordingly according to actual needs, and this embodiment does not limit this.

[0056] Furthermore, after configuring the address mapping rule, a PDO message is sent, wherein the PDO message passes through each industrial slave station in turn. After receiving the PDO message, each industrial slave station uses the address mapping rule to address the corresponding data, and then adds the data to the PDO message, and transmits the PDO message back to the industrial master station.

[0057] In this process, each industrial slave station responds to the read instruction carried in the PDO message only during the return process of the PDO message, that is, each industrial slave station addresses the internal target data only during the return process of the PDO message to write it into the PDO message, and then returns the PDO message with the written data to the industrial master station.

[0058] Correspondingly, if Figure 4 As shown, the process of any industrial slave station executing the industrial Ethernet communication method may include the following steps:

[0059] S210, receiving a PDO message sent by the industrial master station or the previous industrial slave station, and determining whether to directly forward the PDO message to the next industrial slave station when the PDO message passes through the internal frame processing unit.

[0060] S220, when the frame processing unit receives a PDO message sent back by the next industrial slave station or determines that the PDO message is not forwarded to the next industrial slave station, if it is determined through a preset address mapping rule that there is a read instruction in the PDO message, respond to the read instruction to write the read target data to the target location in the PDO message, and then forward the PDO message after the data is written to the industrial master station or the previous industrial slave station.

[0061] It should be noted that the present embodiment does not limit the execution order of S210 to S220 , and optionally, S210 and S220 may be performed simultaneously.

[0062] In this embodiment, refer to Figure 5 After receiving a PDO message from the EtherCAT master or the previous EtherCAT slave, any EtherCAT slave sends the PDO message to the internal frame processing unit. In the frame processing unit, the PDO message is parsed to determine the instruction information carried by the PDO message, and then determines whether to forward the PDO message directly to the next EtherCAT slave based on the carried instruction information.

[0063] Among them, when the frame processing unit receives the PDO message for the first time, it determines whether there is a write instruction in the PDO message through the preset address mapping rule; it can be understood that inside the frame processing unit, when the PDO message is received for the first time, the PDO message is parsed, and then the preset address mapping rule is used to determine whether there is a read instruction in the data part of the parsed PDO message. Among them, the preset address mapping rule is the field bus memory management unit mapping rule (i.e., the FMMU mapping rule), and the preset address mapping rule is pre-configured by the EtherCAT master station.

[0064] That is, within the frame processing unit, the PDO message is parsed and addressed according to the mapping relationship of the FMMU to find the address space in the data part of the PDO message that is mapped to the physical address space of the current EtherCAT slave station; and then identify whether there is a read instruction in the address space.

[0065] Furthermore, if there is no write instruction in the address space (i.e., the PDO message does not carry a write instruction), it is further determined whether to forward the PDO message directly to the next EtherCAT slave station; if there is a write instruction in the address space, the write instruction is first responded to, and after determining that the execution operation of the write instruction is completed, it is determined whether to forward the PDO message directly to the next EtherCAT slave station.

[0066] It should be noted that if the current EtherCAT slave is the first slave or an intermediate slave, when it is determined that the PDO message does not carry a write instruction or the execution operation of the write instruction is completed, the PDO message is directly forwarded to the next EtherCAT slave.

[0067] In some examples, if it is determined that the current EtherCAT slave is the last slave, since the EtherCAT slave has no next EtherCAT slave, when it is determined that there is no write instruction in the PDO message or the execution operation of the write instruction is completed, it is determined that the PDO message is not forwarded to the next EtherCAT slave, and it is determined whether there is a read instruction in the PDO message through a preset address mapping rule.

[0068] It can be understood that when the current EtherCAT slave is the last slave, after the EtherCAT slave receives the PDO message, the frame processing unit can synchronously determine whether the PDO message carries a write instruction and a read instruction; or, it can first determine whether the PDO message carries a write instruction and then determine whether it carries a read instruction. Optionally, when it is determined that the PDO message carries a write instruction and a read instruction, the write instruction and the read instruction can be responded to synchronously.

[0069] Furthermore, if the current EtherCAT slave station is the last slave station, the PDO message starts to be returned along the sending path after being processed by the frame processing unit, that is, after the last slave station completes the corresponding instruction response operation, the PDO message is returned to the previous EtherCAT slave station one by one starting from the last slave station until the PDO message returns to the EtherCAT master station.

[0070] Among them, in the return process of the PDO message, each EtherCAT slave station sends the PDO message to the frame processing unit after receiving it, and then the frame processing unit parses the PDO message and addresses it according to the mapping relationship of the FMMU to find the address space in the data part of the PDO message that is mapped with the physical address space of the current EtherCAT slave station; and then identifies whether there is a read instruction in the address space.

[0071] Furthermore, when it is determined that there is a read instruction, the read instruction operation is responded to so that the target data read from the current EtherCAT slave station is written to the target location in the PDO message and then forwarded to the EtherCAT master station or the previous EtherCAT slave station; wherein the target location is an address space in the PDO message that is mapped to the physical address space of the current EtherCAT slave station via a corresponding preset address mapping rule.

[0072] That is, the read target data is stored in the address space corresponding to the original read instruction in the PDO message, so that when the PDO message after the data is written is returned to the EtherCAT master station, since there is a mapping relationship between the address space and the EtherCAT slave station where the target data is written, the EtherCAT master station can read the target data stored in the corresponding address space according to the mapping relationship after receiving the PDO message.

[0073] It is worth noting that if the current EtherCAT slave is an intermediate slave or the last slave, after writing the target data, the PDO message after the data is written will be directly forwarded to the previous EtherCAT slave; and if the current EtherCAT slave is the first slave, the PDO message after the data is written will be forwarded to the EtherCAT master.

[0074] In addition, it should be noted that if the current EtherCAT slave is the last slave, and after determining that the execution operation of the write instruction is completed, the working counter value (i.e., WKC) inside the PDO message is adjusted in the frame processing unit, so that the working counter value inside the PDO message is incremented by one; and after determining that the execution operation of the read instruction is completed, the working counter value is further incremented by two, thereby indicating that the PDO message is processed in the current EtherCAT slave through the working counter value.

[0075] In addition, if it is determined in the last slave station that the PDO message carries only a read instruction, then after it is determined that the execution operation of the read instruction is completed, the value of the working counter is incremented by one.

[0076] Among them, the initial value of the WKC value inside the PDO message is set by the EtherCAT master station. The value of the initial value can be set according to actual needs and is not limited here. For example, the initial value can be set to 0; and then the change in the WKC value is used to indicate the number of times the PDO message is operated by the slave station.

[0077] It can be understood that if two command response operations are synchronously or continuously executed inside the EtherCAT slave, the working counter value will increase by three at the end. If the two command response operations are not synchronous or continuous, the working counter value will increase by one after each command response operation is completed. This also means that the WKC value increases by three only in the last slave, and the WKC value in the PDO message of the other slaves only increases by one each time they respond to a command operation.

[0078] Furthermore, if it is determined that the current EtherCAT slave is not the last slave, after responding to the write instruction or the read instruction (i.e., after determining that the current EtherCAT slave completes the execution operation of the write instruction or the read instruction), the value of WKC inside the PDO message is adjusted so that the value of WKC is incremented by one.

[0079] It can be understood that after the EtherCAT master sends a PDO message, when passing through the first slave station, the frame processing unit inside the slave station determines whether there is a write instruction in the PDO message according to the FMMU mapping rule. If there is no write instruction, the PDO message is directly forwarded, and the WKC is not counted. Then the PDO message passes through the remaining slave stations in the topology in turn. When it reaches the last slave station, the PDO message is processed by the frame processing unit and then returns to the original path. In the frame processing unit, the read instruction carried in the PDO message is responded to, and the corresponding data is collected according to the FMMU mapping rule and written into the PDO message. Then, the PDO message after writing the data passes through each slave station in turn and finally returns to the EtherCAT master station. In this process, the first slave station collects data at time t1, and the data arrives at the EtherCAT master station at time t1+t2, and then the time difference between the EtherCAT master station receiving and the EtherCAT slave station collecting the same data is only t2, thereby greatly improving the real-time effectiveness of data collection.

[0080] In this embodiment, the PDO message sent by the EtherCAT master station will pass through the frame processing unit twice in the same intermediate EtherCAT slave station, and when the PDO message passes through the slave station for the first time, the frame processing unit does not respond to the read instruction or count WKC, but responds to the read instruction and counts WKC when passing through the slave station for the second time. That is, this embodiment enables each EtherCAT slave station to respond to the read instruction carried by the PDO message to collect its own internal data only during the return process of the PDO message, thereby ensuring the real-time and validity of data such as sensitive data collected by each EtherCAT slave station.

[0081] See also Figure 6 The embodiment of the present application also provides an industrial Ethernet communication system. Exemplarily, the system includes an industrial master station 100 and multiple industrial slave stations 200 (such as industrial slave station 1, industrial slave station 2, ..., industrial slave station n shown in the figure).

[0082] Among them, the industrial master station 100 is used to execute the industrial Ethernet communication method provided by any of the above embodiments, pre-configure preset address mapping rules, and send PDO messages to each industrial slave station 200 in turn through the industrial Ethernet bus, so that each industrial slave station 200 executes the industrial Ethernet communication method provided by any of the above embodiments.

[0083] It can be understood that the industrial Ethernet communication system of this embodiment corresponds to the industrial Ethernet communication method of the above embodiment, and the options in the above embodiment are also applicable to this embodiment, so they will not be described repeatedly here.

[0084] The present application also provides a network device, which exemplarily includes a processor and a memory, wherein the memory stores a computer program, and the processor runs the computer program to enable the network device to perform the functions of each module in the above-mentioned industrial Ethernet communication method or the above-mentioned industrial Ethernet communication system. Optionally, the network device includes but is not limited to a gateway, a switch, a router, etc. that supports the industrial Ethernet protocol.

[0085] Among them, the processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including a central processing unit (CPU), a graphics processing unit (GPU) and a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or at least one of other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application.

[0086] The memory may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory is used to store a computer program, and the processor may execute the computer program accordingly after receiving an execution instruction.

[0087] The present application also provides a computer-readable storage medium for storing the computer program used in the above network device. For example, the computer-readable storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0088] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and structure diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in an alternative implementation, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the structure diagram and / or the flow diagram, and the combination of boxes in the structure diagram and / or the flow diagram, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0089] In addition, the functional modules or units in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0090] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a smart phone, a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the various embodiments of the present application.

[0091] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. An industrial Ethernet communication method, characterized in that: Applied to industrial slaves, including: Receive a PDO message sent by an industrial master station or a previous industrial slave station, and determine whether to directly forward the PDO message to the next industrial slave station when the PDO message passes through an internal frame processing unit; When the frame processing unit receives the PDO message sent back by the next industrial slave station or determines that the PDO message is not forwarded to the next industrial slave station, if it is determined through a preset address mapping rule that there is a read instruction in the PDO message, respond to the read instruction to write the read target data to the target location in the PDO message, and then forward the PDO message after the data is written to the industrial master station or the previous industrial slave station.

2. The industrial Ethernet communication method according to claim 1, characterized in that: The process of determining whether to directly forward the PDO message to the next industrial slave station when the PDO message passes through the internal frame processing unit also includes: When the frame processing unit receives the PDO message for the first time, determining whether there is a write instruction in the PDO message by using the preset address mapping rule; If not, determining whether to directly forward the PDO message to the next industrial slave station; If so, respond to the write instruction, and after determining that the execution operation of the write instruction is completed, determine whether to directly forward the PDO message to the next industrial slave station.

3. The industrial Ethernet communication method according to claim 2, characterized in that: Also includes: If it is determined that the current industrial slave station is the last industrial slave station, when it is determined that the write instruction does not exist in the PDO message or when it is determined that the execution operation of the write instruction is completed, it is determined that the PDO message is not forwarded to the next industrial slave station, and it is determined whether there is a read instruction in the PDO message through the preset address mapping rule.

4. The industrial Ethernet communication method according to claim 3, characterized in that: If the current industrial slave station is the last industrial slave station, and after determining that the execution operation of the write instruction is completed, it also includes: increasing the working counter value inside the PDO message by one; and after responding to the read instruction to write the read target data to the target position in the PDO message, it also includes: increasing the working counter value by two; If it is determined that the current industrial slave station is not the last industrial slave station, after determining that the current industrial slave station completes the execution operation of the write instruction, it also includes: increasing the working counter value inside the PDO message by one; and, after responding to the read instruction to write the read target data to the target position in the PDO message, it also includes: increasing the working counter value by one.

5. The industrial Ethernet communication method according to claim 1, characterized in that: The process of determining that there is a read instruction in the PDO message by a preset address mapping rule includes: Parsing the PDO message, addressing according to the mapping rule of the field bus memory management unit, so as to find the address space in the data part of the PDO message that is mapped with the physical address space of the current industrial slave station; It is identified whether there is a read instruction in the address space.

6. The industrial Ethernet communication method according to claim 1, characterized in that: The target location is an address space in the PDO message that is mapped to the physical address space of the current industrial slave station via the preset address mapping rule.

7. An industrial Ethernet communication method, characterized in that: Applied to industrial master stations, including: Configure preset address mapping rules; Sending a PDO message, wherein the PDO message passes through each industrial slave station in sequence, so that each industrial slave station responds to the read instruction when determining that there is a read instruction in the PDO message through the preset address mapping rule during the return process of the PDO message, so as to write the read target data into the PDO message; Receive the PDO message returned by each of the industrial slave stations.

8. An industrial Ethernet communication system, characterized in that: Includes an industrial master station and multiple industrial slave stations; The industrial master station is used to configure a preset address mapping rule and send a PDO message, wherein the PDO message passes through each of the industrial slave stations in sequence, so that each of the industrial slave stations executes the industrial Ethernet communication method according to any one of claims 1-6.

9. A network device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor is used to execute the computer program to implement the industrial Ethernet communication method according to any one of claims 1 to 7.

10. A computer storage medium, characterized in that: A computer program is stored therein, and when the computer program is executed, the industrial Ethernet communication method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Industrial ethernet communication method and system, network device, and computer storage medium

    WO2026020940A1