An EtherCAT slave station and data transmission system

By designing the EtherCAT slave station and using the EtherCAT slave station controller and processor to parse and encapsulate data packets, sequential data transmission between EtherCAT slave stations is realized, which solves the problem of unpredictable data transmission delay under the CSMA/CD media access control mechanism. , realizing high-speed, real-time and efficient data transmission of industrial Ethernet.

CN115776422BActive Publication Date: 2024-08-27CRRC ZHUZHOU ELECTRIC LOCOMOTIVE RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111049308.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-08
Publication Date
2024-08-27
Estimated Expiration
2041-09-08

AI Technical Summary

Technical Problem

The existing CSMA/CD media access control mechanism causes unpredictable transmission delays in industrial Ethernet, making it difficult to achieve high-speed, real-time and efficient data transmission.

Method used

An EtherCAT slave station is designed, including the first network port module, EtherCAT slave station controller and processor. By parsing and encapsulating data packets, the sequential transmission of data is realized, avoiding competition and reducing delay.

Benefits of technology

It achieves high-speed, real-time and efficient transmission of data, is suitable for industrial transmission fields, improves system communication speed and real-time performance, and reduces complexity and development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115776422B
    Figure CN115776422B
Patent Text Reader

Abstract

The invention discloses an EtherCAT slave station and a data transmission system. A first network port module transmits a first Ethernet data packet sent by a first site to an EtherCAT slave station controller. Then, the EtherCAT slave station controller parses the first Ethernet data packet to obtain first data, and performs a data trigger operation when data sent to a processor exists in the first data. When the processor detects the data trigger operation, it reads the data sent to itself from the first data, and sends the remaining first data after the processor reads and the second data to be sent to other sites to the EtherCAT slave station controller. The EtherCAT slave station controller encapsulates the data to obtain a second Ethernet data packet. Finally, the second network port module transmits the second Ethernet data packet to the second site. Data can be transmitted sequentially between sites without competition and with low delay, thereby realizing high-speed, real-time and efficient data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of EtherCAT, and in particular to an EtherCAT slave station and a data transmission system. Background Art

[0002] At present, the control mechanism commonly used in Ethernet for industrial transmission is CSMA / CD (carrier sense multiple access / collision detect) media access control mechanism. Each station in the network needs to compete for the right to send data, and its delay is unpredictable. Data collision may occur after data is sent. It is a non-deterministic network, which makes it difficult to achieve high-speed, real-time and efficient data transmission. Summary of the invention

[0003] The purpose of the present invention is to provide an EtherCAT slave station and a data transmission system, which realizes high-speed, real-time and efficient data transmission.

[0004] In order to solve the above technical problems, the present invention provides an EtherCAT slave station, comprising:

[0005] A first network port module, used for transmitting a first Ethernet data packet sent by a first station to an EtherCAT slave controller, wherein the first station is a master station or a first EtherCAT slave station;

[0006] The EtherCAT slave controller is used to parse the first Ethernet data packet to obtain first data, and perform a data trigger operation when data sent to the processor exists in the first data; encapsulate the second data and the first data remaining after the processor reads it to obtain a second Ethernet data packet;

[0007] The processor is used to read the data sent to itself from the first data when the data trigger operation is detected, and send the first data remaining after the processor reads and the second data to be sent to other sites to the EtherCAT slave controller;

[0008] The second network port module is used to transmit the second Ethernet data packet to a second station, where the second station is the master station or a second EtherCAT slave station.

[0009] Preferably, when data sent to the processor exists in the first data, performing a data trigger operation includes:

[0010] When data sent to the processor exists in the first data, the first data is stored in its own internal storage area and a flag bit of the status register is changed to a preset value;

[0011] When the data triggering operation is detected, reading the data sent to itself from the first data includes:

[0012] The flag bit of the status register is detected, and when it is detected that the flag bit of the status register is changed to a preset value, the data sent to itself is read from the first data in the internal storage area.

[0013] Preferably, detecting the flag bit of the status register includes:

[0014] The flag bit of the status register is periodically detected.

[0015] Preferably, reading the data sent to itself includes:

[0016] Read data consistent with the IP and MAC address of the self.

[0017] Preferably, the second network port module is also used for looping back its own sending port and receiving port when the second site fails.

[0018] Preferably, the first network port module includes:

[0019] A first Ethernet port, used for transmitting the first Ethernet data packet sent by the first station to a first port chip;

[0020] The first port chip is used to transmit the first Ethernet data packet to the EtherCAT slave controller;

[0021] The second network port module includes:

[0022] A second port chip, used for receiving the second Ethernet data packet transmitted by the EtherCAT slave controller to a second Ethernet port;

[0023] The second Ethernet port is used to transmit the second Ethernet data packet to the second site.

[0024] Preferably, the first network port module further includes a first transformer, which is arranged between the first Ethernet port and the first port chip and is used to convert the signal voltage of the first Ethernet data packet;

[0025] The second network port module also includes a second transformer, which is arranged between the second Ethernet port and the second port chip and is used to convert the signal voltage of the second Ethernet data packet.

[0026] Preferably, a storage medium is also included for storing configuration data of the EtherCAT slave controller.

[0027] Preferably, a crystal oscillator is also included to provide a clock signal for the operation of the EtherCAT slave controller.

[0028] Preferably, the processor is a ZYNQ processor.

[0029] Preferably, the EtherCAT slave controller is a LAN9252 slave controller.

[0030] Preferably, the operating system executable by the processor may be a VxWorks system.

[0031] Preferably, the processor is also used to detect whether the EtherCAT slave controller has completed initialization and is in free running mode. If both are in free running mode, the processor executes the step of reading the data sent to itself from the first data when the data trigger operation is detected.

[0032] Preferably, the processor is also used to disable the PDI interrupt of the EtherCAT slave controller when the data trigger operation is detected, and enable the PDI interrupt of the EtherCAT slave controller when it is detected that the EtherCAT slave controller receives the first data remaining after the processor reads and receives the second data.

[0033] In order to solve the above technical problems, the present invention further provides a data transmission system, including a master station and the above EtherCAT slave station, wherein the master station is connected to the EtherCAT slave station.

[0034] The invention discloses an EtherCAT slave station and a data transmission system. A first network port module transmits a first Ethernet data packet sent by a first site to an EtherCAT slave station controller. Then, the EtherCAT slave station controller parses the first Ethernet data packet to obtain first data, and performs a data trigger operation when data sent to a processor exists in the first data. When the processor detects the data trigger operation, it reads the data sent to itself from the first data, and sends the remaining first data after the processor reads and the second data to be sent to other sites to the EtherCAT slave station controller. The EtherCAT slave station controller encapsulates the data to obtain a second Ethernet data packet. Finally, the second network port module transmits the second Ethernet data packet to the second site. Data can be transmitted sequentially between sites without competition and with low delay, thereby realizing high-speed, real-time and efficient data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0036] Figure 1 A schematic diagram of the structure of an EtherCAT slave provided for this application;

[0037] Figure 2 A schematic diagram of the structure of another EtherCAT slave provided for this application;

[0038] Figure 3 A schematic diagram of the operation function of an EtherCAT slave provided in this application;

[0039] Figure 4 A process data processing flow chart of an EtherCAT slave provided in this application. DETAILED DESCRIPTION

[0040] The core of the present invention is to provide an EtherCAT slave station and a data transmission system, which realizes high-speed, real-time and efficient data transmission.

[0041] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0042] Please refer to Figure 1 , Figure 1 A schematic diagram of the structure of an EtherCAT slave station provided in this application.

[0043] The present invention provides an EtherCAT (EtherNet Control Automation Technology) slave station, comprising:

[0044] The first network port module 1 is used to transmit a first Ethernet data packet sent by a first station to an EtherCAT slave controller 2, where the first station is a master station or a first EtherCAT slave station;

[0045] The EtherCAT slave controller 2 is used to parse the first Ethernet data packet to obtain the first data, and perform a data trigger operation when the first data contains data to be sent to the processor 3; encapsulate the second data and the remaining first data after the processor 3 reads, to obtain a second Ethernet data packet;

[0046] The processor 3 is used to read the data sent to itself from the first data when a data trigger operation is detected, and send the remaining first data after the processor 3 reads and the second data to be sent to other stations to the EtherCAT slave controller 2;

[0047] The second network port module 4 is used to transmit a second Ethernet data packet to a second station, where the second station is a master station or a second EtherCAT slave station.

[0048] Considering that the CSMA / CD medium access Ethernet control mechanism has a data transmission delay, it is difficult to achieve high-speed, real-time and efficient transmission of data. To solve the above technical problems, the EtherCAT slave station in the present application includes a first network port module 1, an EtherCAT slave station controller 2, a processor 3 and a second network port module 4. The first network port module 1 transmits the first Ethernet data packet sent by the first site to the EtherCAT slave station controller 2, and the first site can be a master site or a first EtherCAT slave station. The EtherCAT slave station controller 2 parses the first Ethernet data packet to obtain the first data, and performs a data trigger operation when there is data sent to the processor 3 in the first data. When the data trigger operation is detected, the processor 3 reads the data sent to itself from the first data, and sends the remaining first data after the processor 3 reads to the EtherCAT slave station controller 2. In addition, if there is a second data to be sent to other sites, the second data is also sent to the EtherCAT slave station controller 2. The EtherCAT slave station controller 2 encapsulates the second data and the remaining first data after the processor 3 reads to obtain a second Ethernet data packet. The second network port module 4 transmits a second Ethernet data packet to a second station, and the second station can be a master station or a second EtherCAT slave station.

[0049] The EtherCAT slave uses full-duplex mode, which has the advantages of extremely short cycle time, precise synchronization and low hardware cost, etc. It realizes the communication function between the EtherCAT slave and the master, improves the system communication rate, and reduces the complexity and development cost of the system. The EtherCAT slave communication has the characteristics of high real-time performance and large transmission flow, which will be more suitable for the field of industrial transmission. In addition, the slave drive control has a certain versatility, and only needs to adapt the SPI (Serial Peripheral Interface) driver in different platforms.

[0050] For example, the master station sends out a first Ethernet data packet, and the first network port module 1 transmits the first Ethernet data packet to the EtherCAT slave controller 2. When the first Ethernet data packet arrives at the EtherCAT slave controller 2, the EtherCAT slave controller 2 parses the first Ethernet data packet to obtain the first data, and performs a data trigger operation when there is data sent to the processor 3 in the first data. When the processor 3 detects the data trigger operation, it reads the data sent to itself from the first data, and sends the remaining first data after the processor 3 reads and the second data to be sent to the fourth station to the EtherCAT slave controller 2. The EtherCAT slave controller 2 encapsulates the second data and the remaining first data after the processor 3 reads to obtain a second Ethernet data packet. The second network port module 4 transmits the second Ethernet data packet to the second EtherCAT slave station, and the second EtherCAT slave station performs similar processing until the entire loop is transmitted.

[0051] In addition, the EtherCAT slave controller 2 and the processor 3 can communicate via an SPI interface. Of course, other methods can also be used for communication, and this application does not make any special restrictions here. The EtherCAT slave controller 2 can be connected to the first network port module 1 and the second network port module 4 respectively via an MII (Media Independent Interface) interface, and this application does not make any special restrictions here.

[0052] In summary, this application adopts a network-based fieldbus communication control mode. The fieldbus control system integrates the control and monitoring equipment of the industrial site into a communication network through serial signals, and has the advantages of full digital, bidirectional and serial multi-node. EtherCAT is a fieldbus communication protocol based on industrial Ethernet, which has the characteristics of high speed and high efficiency data, and has a flexible network topology, and encapsulates IP / UDP (Internet Protocol / User Datagram Protocol) in the protocol, so communication can be achieved without the IP protocol, and it has wide adaptability.

[0053] The EtherCAT slave station of the present application can transmit data sequentially between stations without competition and with low delay, thus achieving high-speed, real-time and efficient data transmission.

[0054] Based on the above embodiments:

[0055] Please refer to Figure 2 , Figure 2 A schematic diagram of the structure of another EtherCAT slave station provided for this application.

[0056] As a preferred embodiment, when there is data sent to the processor 3 in the first data, a data triggering operation is performed, including:

[0057] When the first data includes data to be sent to the processor 3, the first data is stored in its own internal storage area and the flag bit of the status register is changed to a preset value;

[0058] When a data trigger operation is detected, the data sent to the self is read from the first data, including:

[0059] The flag bit of the status register is detected, and when it is detected that the flag bit of the status register is changed to a preset value, the data sent to itself is read from the first data in the internal storage area.

[0060] In this embodiment, when there is data sent to the processor 3 in the first data, the EtherCAT slave controller 2 stores the first data in its own internal storage area and changes the flag bit of the status register to a preset value. If there is no data sent to the processor 3, the flag bit in the status register is not changed. The processor 3 detects the flag bit of the status register, and reads the data sent to itself from the first data in the internal storage area when detecting that the flag bit of the status register is changed to the preset value, thereby realizing the reading of data and improving the data transmission efficiency.

[0061] It should be noted that the EtherCAT slave controller 2 can determine whether there is data to be sent to the processor 3 according to the IP and MAC addresses of each data in the first data.

[0062] In addition, the internal storage area may be, but is not limited to, the internal RAM (Random Access Memory) of the EtherCAT slave controller 2 itself.

[0063] The preset value of the flag bit of the status register can be 1 or 0, and this application does not make any special limitation here.

[0064] As a preferred embodiment, detecting the flag bit of the status register includes:

[0065] Periodically check the status register flag.

[0066] In order to realize the processing of periodic data and process data communication, in this embodiment, the processor 3 can periodically detect the flag bit of the status register. Whenever it is detected that the flag bit of the status register has changed to a preset value, it reads the data sent to itself from the first data in the internal storage area, thereby realizing the processing of periodic data and process data communication.

[0067] As a preferred embodiment, reading the data sent to itself includes:

[0068] Read data that is consistent with its own IP and MAC address.

[0069] In this embodiment, the processor 3 can read data consistent with its own IP and MAC (Media Access Control Address) address from the first data, thereby realizing accurate reading of its own data and making the operation process simple and fast.

[0070] As a preferred embodiment, the second network port module 4 is also used for looping back its own sending port and receiving port when the second site fails.

[0071] Considering that when the second site fails, in order to achieve data transmission, in this embodiment, the failure of the second site includes the failure of the first network port module of the second site, and / or the failure of the second network port module of the second site. After the failure occurs, the second network port module 4 will loop back its own sending port and receiving port to isolate the second site where the failure occurs, avoid spreading and causing paralysis of the entire network, and ensure the transmission of data in the Ethernet system.

[0072] In addition, when a second site failure occurs, the second site will issue an alarm prompt, which indicates that there is a problem with the data link transmission. The EtherCAT slave station controller 2 can control the loopback of the second network port module 4, and this application does not make any special limitations here.

[0073] As a preferred embodiment, the first network port module 1 includes:

[0074] The first Ethernet port 11 is used to transmit a first Ethernet data packet sent by a first station to a first port chip 12;

[0075] The first port chip 12 is used to transmit a first Ethernet data packet to the EtherCAT slave controller 2;

[0076] The second network port module 4 includes:

[0077] The second port chip 42 is used to receive the second Ethernet data packet transmitted by the EtherCAT slave controller 2 to the second Ethernet port 41;

[0078] The second Ethernet port 41 is used to transmit a second Ethernet data packet to the second site.

[0079] In this embodiment, the first network port module 1 may include a first Ethernet port 11 and a first port chip 12. The first Ethernet port 11 transmits the first Ethernet data packet sent by the first station to the first port chip 12, and the first port chip 12 transmits the first Ethernet data packet to the EtherCAT slave controller 2.

[0080] The second network port module 4 may include a second port chip 42 and a second Ethernet port 41. The second port chip 42 receives the second Ethernet data packet transmitted by the EtherCAT slave controller 2 to the second Ethernet port 41, and the second Ethernet port 41 transmits the second Ethernet data packet to the second station.

[0081] In addition, the first Ethernet port 11 and the second Ethernet port 41 may both be RJ45 network ports, and this application does not make any special limitation thereto.

[0082] The first port chip 12 and the second port chip 42 may both be PHY chips, which is not particularly limited in the present application.

[0083] As a preferred embodiment, the first network port module 1 further includes a first transformer 13, which is arranged between the first Ethernet port 11 and the first port chip 12 and is used to convert the signal voltage of the first Ethernet data packet;

[0084] The second network port module 4 further includes a second transformer 43 . The second transformer 43 is disposed between the second Ethernet port 41 and the second port chip 42 and is used for converting the signal voltage of the second Ethernet data packet.

[0085] Taking into account that there may be a deviation between the voltages of the first Ethernet port 11 and the first port chip 12, in this embodiment, a first transformer 13 is provided between the first Ethernet port 11 and the first port chip 12, which can convert the signal voltage of the first Ethernet data packet to adapt to the voltage of the first port chip 12, thereby realizing effective transmission of the first Ethernet data packet.

[0086] Taking into account that there may be a deviation between the voltage of the second Ethernet port 41 and the second port chip 42, in this embodiment, a second transformer 43 is set between the second Ethernet port 41 and the second port chip 42, which can convert the signal voltage of the second Ethernet data packet to adapt to the voltage of the second Ethernet port 41, thereby realizing effective transmission of the second Ethernet data packet.

[0087] As a preferred embodiment, it further comprises a storage medium 5 for storing configuration data of the EtherCAT slave controller 2 .

[0088] In this embodiment, the EtherCAT slave station further includes a storage medium 5 which can store configuration data of the EtherCAT slave station controller 2 .

[0089] The storage medium 5 may be, but is not limited to, an EEPROM (Electrically Erasable Programmable read-only memory).

[0090] As a preferred embodiment, a crystal oscillator 6 is further included to provide a clock signal for the operation of the EtherCAT slave controller 2 .

[0091] In this embodiment, the EtherCAT slave station further includes a crystal oscillator 6, which can provide a clock signal for the EtherCAT slave station controller 2 to operate, so that the EtherCAT slave station controller 2 operates based on the clock signal.

[0092] As a preferred embodiment, the processor 3 is a ZYNQ processor 3.

[0093] In this embodiment, the processor 3 can adopt the ZYNQ processor 3, the EtherCAT slave station uses the ZYNQ processor 3 to control the EtherCAT slave station controller 2, and the ZYNQ processor 3 reads and writes data in the internal storage area of ​​the EtherCAT slave station controller 2 through the SPI interface to complete data exchange and implement the application layer protocol.

[0094] As a preferred embodiment, the EtherCAT slave controller 2 is a LAN9252 slave controller.

[0095] In this embodiment, the EtherCAT slave controller 2 can adopt the powerful LAN9252 slave controller, which is a 2 / 3-port EtherCAT slave controller 2, and has the advantages of most 8 / 16 / 32-bit embedded controller ports, dual integrated 10 / 100PHY, low power consumption mode, etc. The LAN9252 slave controller has hardware for realizing link layer functions such as processing of EtherCAT data frames, which improves data transmission efficiency and is the core of realizing EtherCAT data communication.

[0096] As a preferred embodiment, the operating system that can be run by the processor 3 can be a VxWorks system.

[0097] In this embodiment, the operating system that can be run by the processor 3 can be selected from the VxWorks system, which is an embedded real-time operating system that provides a richer debugging, simulation environment and tools, and has good reliability and excellent real-time performance. When the VxWorks system is running, the processor 3 can achieve real-time control of the EtherCAT slave controller 2, with less delay, improve the efficiency of data transmission, and achieve high-speed, real-time and efficient data transmission.

[0098] Please refer to Figure 3 , Figure 3 A schematic diagram of the operation function of an EtherCAT slave provided in this application.

[0099] As a preferred embodiment, the processor 3 is also used to detect whether the EtherCAT slave controller 2 has completed initialization and is in free running mode. If both are in free running mode, the processor 3 executes the step of reading the data sent to itself from the first data when a data trigger operation is detected.

[0100] In order to implement the application layer protocol, in an embodiment, the processor 3 detects whether the EtherCAT slave station controller 2 has completed initialization and is in free running mode. If both are in this mode, it executes the step of reading the data sent to itself from the first data when a data trigger operation is detected, thereby realizing the processing of process data and the application layer protocol.

[0101] In addition, the running functions for implementing the application layer protocol include: main() main function; HW_Init() function initializes processor 3; Main Init() function initializes ESC (EtherCAT Slave Controller, slave protocol controller) registers, queries the status of the master station, control registers, reads related configuration registers, and starts or terminates slave-related communication services; Mainloop() queries periodic data, and the EtherCAT slave station processes periodic data and application layer tasks in free running mode (query mode), and this application does not make any special limitations here.

[0102] Free-running mode means that the EtherCAT slave works based on its own clock and is not synchronized with the EtherCAT communication cycle.

[0103] As a preferred embodiment, the processor 3 is also used to disable the PDI (Parallel Digital Interface) interrupt of the EtherCAT slave controller 2 when a data trigger operation is detected, and to enable the PDI interrupt of the EtherCAT slave controller 2 when it is detected that the EtherCAT slave controller 2 receives the first data remaining after the processor 3 reads and receives the second data.

[0104] In order to realize the transmission and communication of periodic data, in this embodiment, when the processor 3 detects the data trigger operation, the PDI interrupt of the EtherCAT slave controller 2 is disabled, and the slave controller will no longer receive the first Ethernet data packet of the new cycle sent by the first station. When the processor 3 detects that the EtherCAT slave controller 2 receives the first data remaining after the processor 3 reads and receives the second data, the processor 3 enables the PDI interrupt of the EtherCAT slave controller 2. At this time, the slave controller can receive the first Ethernet data packet of the new cycle sent by the first station, and execute the parsing step of the data packet, so that the EtherCAT slave can process the periodic data and complete data communication in the running state.

[0105] Please refer to Figure 4 , Figure 4 A process data processing flow chart of an EtherCAT slave provided in this application.

[0106] To facilitate the understanding of the process data processing flow of the EtherCAT slave provided in this application, the process data processing flow of the EtherCAT slave is specifically described below:

[0107] 1. Check whether the initialization is completed. If it is completed, determine whether it is in free running mode; if it is not completed, return;

[0108] 2. When the program is in free-running mode, check whether the data output by the processor to the EtherCAT slave controller is received (i.e. whether a process output event occurs);

[0109] 3. When the data output by the processor is received by the EtherCAT slave controller, the EtherCAT slave controller updates the output mapping and sends the data;

[0110] 4. Disability PDI interruption;

[0111] 5. Application layer data update;

[0112] 6. Check the EtherCAT slave status (i.e. whether a process input event has occurred) and enable PDI interrupt;

[0113] 7. Update input data;

[0114] 8. Check the timer register at the end of the cycle to check if there is a timeout;

[0115] 9. Call the EtherCAT function, i.e. the protocol stack processing function, to transmit the data to be sent and received, as well as the EtherCAT slave state switching;

[0116] 10. Call lower priority applications to check other tasks in the protocol stack, such as checking whether there are errors in state switching and whether there are problems with the synchronization mode;

[0117] 11. Check communication and synchronization variables and update application layer status.

[0118] The present invention also provides a data transmission system, comprising a master station and the above-mentioned EtherCAT slave station, wherein the master station is connected to the EtherCAT slave station.

[0119] In addition, the data transmission system may also include a plurality of the above-mentioned EtherCAT slave stations, which is not particularly limited in this application.

[0120] For more details about the working principle and working mode of the data transmission system, please refer to the relevant description of the above embodiments, which will not be repeated here.

[0121] It should be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0122] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An EtherCAT slave station, characterized in that: include: A first network port module, used for transmitting a first Ethernet data packet sent by a first station to an EtherCAT slave controller, wherein the first station is a master station or a first EtherCAT slave station; The EtherCAT slave controller is used to parse the first Ethernet data packet to obtain first data, and perform a data trigger operation when data sent to the processor exists in the first data; Encapsulating the second data and the first data remaining after the processor reads the data to obtain a second Ethernet data packet; The processor is used to read the data sent to itself from the first data when the data trigger operation is detected, and send the first data remaining after the processor reads and the second data to be sent to other sites to the EtherCAT slave controller; The second network port module is used to transmit the second Ethernet data packet to a second site, where the second site is the master site or a second EtherCAT slave site.

2. The EtherCAT slave station according to claim 1, characterized in that: When data sent to the processor exists in the first data, a data triggering operation is performed, including: When data sent to the processor exists in the first data, the first data is stored in its own internal storage area and a flag bit of the status register is changed to a preset value; When the data triggering operation is detected, reading the data sent to itself from the first data includes: The flag bit of the status register is detected, and when it is detected that the flag bit of the status register is changed to a preset value, the data sent to itself is read from the first data in the internal storage area.

3. The EtherCAT slave station according to claim 2, characterized in that: Detecting the flag bit of the status register includes: The flag bit of the status register is periodically detected.

4. The EtherCAT slave station according to claim 1, characterized in that: Read the data sent to itself, including: Read data consistent with the IP and MAC address of the self.

5. The EtherCAT slave station according to claim 1, characterized in that: The second network port module is also used for looping back its own sending port and receiving port when the second site fails.

6. The EtherCAT slave station according to claim 1, characterized in that: The first network port module includes: A first Ethernet port, used for transmitting the first Ethernet data packet sent by the first station to a first port chip; The first port chip is used to transmit the first Ethernet data packet to the EtherCAT slave controller; The second network port module includes: A second port chip, used for receiving the second Ethernet data packet transmitted by the EtherCAT slave controller to a second Ethernet port; The second Ethernet port is used to transmit the second Ethernet data packet to the second site.

7. The EtherCAT slave station according to claim 6, characterized in that: The first network port module further includes a first transformer, which is disposed between the first Ethernet port and the first port chip and is used to convert the signal voltage of the first Ethernet data packet; The second network port module also includes a second transformer, which is arranged between the second Ethernet port and the second port chip and is used to convert the signal voltage of the second Ethernet data packet.

8. The EtherCAT slave station according to claim 1, characterized in that: It also includes a storage medium for storing configuration data of the EtherCAT slave controller.

9. The EtherCAT slave station according to claim 1, characterized in that: A crystal oscillator is also included to provide a clock signal for the EtherCAT slave controller to operate.

10. The EtherCAT slave station according to claim 1, characterized in that: The processor is a ZYNQ processor.

11. The EtherCAT slave station according to claim 1, characterized in that: The EtherCAT slave controller is a LAN9252 slave controller.

12. The EtherCAT slave station according to claim 1, characterized in that: The operating system that can be run on the processor is the VxWorks system.

13. The EtherCAT slave station according to claim 1, characterized in that: The processor is also used to detect whether the EtherCAT slave controller has completed initialization and is in a free-running mode. If both are in the free-running mode, the processor executes the step of reading the data sent to itself from the first data when the data trigger operation is detected.

14. The EtherCAT slave station according to any one of claims 1 to 13, characterized in that: The processor is also used to disable the PDI interrupt of the EtherCAT slave controller when the data trigger operation is detected, and enable the PDI interrupt of the EtherCAT slave controller when it is detected that the EtherCAT slave controller receives the first data remaining after the processor reads and receives the second data.

15. A data transmission system, characterized in that: The method comprises a master station and an EtherCAT slave station as claimed in any one of claims 1 to 14, wherein the master station is connected to the EtherCAT slave station.