EtherCAT slave station gateway device and configuration tool
By using the PDI interface data interaction between the EtherCAT slave controller and the microcontroller, and the TIA-485 interface extended by UART, combined with the SPI interface and NVM communication design, the configuration complexity of the gateway device in the Modbus-RTU terminal access to the EtherCAT network is solved. This achieves efficient protocol conversion and simplifies user operation, reducing hardware costs and user operation complexity.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN DUANYI TECH CO LTD
- Filing Date
- 2026-01-30
- Publication Date
- 2026-04-10
AI Technical Summary
Existing gateway devices for Modbus-RTU terminals to access EtherCAT networks integrate dedicated configuration function hardware interfaces, and user configuration operations are cumbersome, resulting in high hardware costs and poor user experience.
The design employs an EtherCAT slave controller to interact with the microcontroller via the PDI interface, and combines the microcontroller's TIA-485 interface extended via UART as a Modbus-RTU interface. It communicates with the NVM via the SPI interface, simplifying the hardware structure and transmitting configuration parameters through the EtherCAT interface. This eliminates the need for a dedicated configuration function hardware interface and simplifies user operation.
It achieves stable protocol conversion between Modbus-RTU terminals and EtherCAT networks, reducing integration costs and time, simplifying user configuration operations, improving adaptability and user experience, reducing EEPROM devices, and lowering product costs.
Smart Images

Figure CN121841968A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of industrial automation control technology, specifically an EtherCAT slave gateway device and configuration tool. Background Technology
[0002] Industrial fieldbus, as a key communication technology in the field of industrial automation, has developed into various technical standards over the years. Among the more widely used are PROFIBUS-DP, CAN, CC-Link, and Modbus-RTU. Modbus-RTU is one of the most widely used serial communication protocols in industrial automation. It adopts a master-slave architecture, commonly uses the TIA-485 bus as the transmission medium, and has a relatively low transmission rate and slow data refresh rate.
[0003] Ethernet technology is rapidly replacing traditional fieldbuses, a trend that has become a significant development direction in industrial automation. For example... Figure 1 As shown, compared to fieldbus, industrial Ethernet offers advantages such as higher communication speeds, compatibility with the IEEE 802.3 standard for easier interconnection between devices from different manufacturers, and lower networking costs. Mainstream industrial Ethernet technologies include PROFINET, EtherNet / IP, EtherCAT, and POWERLINK. EtherCAT is a high-performance real-time industrial Ethernet communication protocol, with its core innovation being the "fly-read / fly-write" mechanism. Due to its ultra-high real-time performance, flexible network topology, and powerful scalability, it is widely used in motion control, factory automation, and process control.
[0004] like Figure 2 As shown, with EtherCAT and Modbus-RTU as typical examples, although Industrial Ethernet has obvious advantages, the existing stock of fieldbus devices is huge, and technological iteration and equipment upgrades cannot be completed in one step. In the future, the field of industrial control networks will continue to see the coexistence and development of Industrial Ethernet and Fieldbus. Using a gateway to convert protocols between Ethernet and Fieldbus can avoid modifying existing equipment hardware and software, significantly saving integration time, manpower, and modification costs, thus becoming a widely accepted choice in the industry.
[0005] Currently, several manufacturers have launched gateway devices that can connect Modbus-RTU terminals to EtherCAT networks, but they all integrate dedicated configuration function hardware interfaces and the user configuration operation is relatively cumbersome. Summary of the Invention
[0006] This invention provides an EtherCAT slave gateway device and configuration tool, which solves the problem that the gateway device for Modbus-RTU terminals to access the EtherCAT network integrates a dedicated hardware interface for configuration functions and the user configuration operation is cumbersome.
[0007] To achieve the above objectives, the present invention provides the following technical solution: Compared with existing technologies, this invention has the following advantages: This invention provides an EtherCAT slave gateway device that interacts with the microcontroller via the PDI interface of the EtherCAT slave controller. Combined with the microcontroller's TIA-485 interface extended via UART as a Modbus-RTU interface, it can stably achieve protocol conversion and data interaction between the Modbus-RTU terminal and the EtherCAT network. It is suitable for application scenarios where industrial Ethernet and fieldbus coexist, requiring no modification to existing equipment hardware or software, effectively saving integration costs and time. Based on the communication design between the microcontroller and the NVM via the SPI interface, the microcontroller reads the operating parameters from the NVM and writes them to the EtherCAT slave controller to complete initialization, eliminating the need for a dedicated configuration function hardware interface, simplifying the hardware structure and reducing the complexity of user configuration operations. The reset control module adopts a simplified design composed of the microcontroller's digital output pins, and with standardized interface connections for each module, it ensures stable and reliable operation of the device, improves adaptability and practicality, and meets the needs of efficient integration in industrial control networks.
[0008] Furthermore, the design of the gateway device transmitting configuration parameters via the EtherCAT interface reduces the need for additional debugging interface hardware configuration, lowers product costs, and eliminates the need for users to use additional debugging cables. Furthermore, the gateway device stores the ESC operating parameters through NVM and the MCU initializes the ESC through the PDI interface, which reduces the number of EEPROM devices and lowers product costs. Furthermore, after determining the gateway's operating parameters, a series of parameter distribution and verification tasks can be completed automatically without user intervention, improving work efficiency and user experience. Furthermore, users no longer need to write XML files to the gateway device, improving work efficiency and user experience; Furthermore, an XML file matching the gateway device can be automatically generated based on the new parameters, eliminating the tedious operation of re-editing the XML file for users, improving work efficiency and avoiding XML file errors; Furthermore, new parameters can be exported and imported as text files, making it convenient for users to back up and archive them. Attached Figure Description
[0009] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic diagram illustrating the working principle of the gateway device in the background technology of this invention; Figure 2 This is a hardware design block diagram of a conventional gateway device, which is the background technology of this invention. Figure 3 This is a hardware design block diagram of the gateway device according to an embodiment of the present invention; Figure 4 This is a software design block diagram of the gateway device according to an embodiment of the present invention; Figure 5 This is a flowchart of the gateway device software parameter information management module according to an embodiment of the present invention; Figure 6 This is a block diagram illustrating the configuration tool software design for an embodiment of the present invention. Figure 7 This is a flowchart illustrating the parameter update device configuration tool software according to an embodiment of the present invention. Detailed Implementation
[0011] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0012] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0013] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0014] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0015] First, the definitions of abbreviations and technical terms are introduced, as shown in Table 1.
[0016] Table 1. Definitions of Abbreviations and Technical Terms
[0017] The inventor discovered a Modbus RTU to EtherCAT protocol conversion gateway (model: HT3S-ECS-MDN) from a certain company during practical work. The HT3S-ECS-MDN gateway can be used as a slave station when connected to an EtherCAT bus, and as a master or slave station when connected to a MODBUS-RTU bus.
[0018] This solution uses a DIP switch to put the device into configuration mode. To return to normal operation, the DIP switch needs to be readjusted. The aforementioned DIP switch switches between EtherCAT mode (normal operation) and Ethernet mode (configuration parameters). Its ESC is also a more complex and expensive dedicated multi-mode chip than a standard ESC, increasing hardware costs and making user operation cumbersome.
[0019] To address the aforementioned shortcomings, this invention optimizes the design of EtherCAT slave Modbus-RTU gateway devices. Firstly, it utilizes EtherCAT's SDO method to read and distribute device operating parameters, enabling the gateway device to update configuration parameters directly via the EtherCAT interface, eliminating the need for special components, dedicated configuration hardware, and auxiliary materials. Secondly, it removes the EEPROM device used in the traditional ESC design, replacing it with parameter information stored on the MCU side and configured during device initialization. These optimizations reduce hardware costs, simplify user operations, and significantly improve the user experience.
[0020] like Figure 3 As shown, this embodiment of the invention provides an EtherCAT slave gateway device, including an EtherCAT slave controller, a microcontroller, a non-volatile memory, an EtherCAT interface, a Modbus-RTU interface, and a reset control module; The EtherCAT slave controller and the microcontroller establish a data connection through a process data interface to enable the interaction of process data and mailbox data; The microcontroller side is extended to form a TIA-485 interface through a universal asynchronous transceiver interface, which is used as a Modbus-RTU interface to access the Modbus-RTU network. The microcontroller establishes a communication connection with the NVM, and the NVM is used to store the operating parameters of the gateway device. The reset control module consists of a digital output pin of a microcontroller. The operating parameters of the EtherCAT slave controller are read from the NVM by the microcontroller and written to the EtherCAT slave controller through the PDI interface to complete the initialization.
[0021] The main logic chips of the gateway device are ESC and MCU. ESC is responsible for interfacing with the EtherCAT network, and MCU is responsible for interfacing with the Modbus-RTU network. The ESC side provides two RJ45 interfaces for accessing the EtherCAT network. Unlike the traditional EtherCAT slave design, the EEPROM has been removed, and the configuration parameters of the ESC are written by the MCU. The MCU side provides a TIA-485 interface to access the Modbus-RTU network. An NVM device is designed for the MCU to access. The NVM is responsible for storing the operating parameters of the gateway device, and the parameters will not be lost when the device loses power. Data access between the MCU and ESC adopts the standard EtherCAT slave design scheme, which is determined by the specific configuration of the chip selection. It can use a serial interface or a parallel bus. The MCU connects to the ESC reset pin via a digital output pin (named RESET_ESC), which can control the ESC to reset it. The RJ45 (IN) interface can be connected to the network interface of the configured computer via a standard network cable.
[0022] Data interaction between the EtherCAT slave controller and the microcontroller via the PDI interface, combined with the microcontroller's TIA-485 interface extended via UART as a Modbus-RTU interface, can stably achieve protocol conversion and data interaction between the Modbus-RTU terminal and the EtherCAT network. This adapts to application scenarios where industrial Ethernet and fieldbus coexist, without requiring modifications to existing equipment hardware and software, effectively saving integration costs and time. Utilizing the microcontroller's communication design with the NVM via the SPI interface, the microcontroller reads operating parameters from the NVM and writes them to the EtherCAT slave controller for initialization, eliminating the need for a dedicated configuration hardware interface, simplifying the hardware structure and reducing the complexity of user configuration operations. The reset control module adopts a simplified design composed of the microcontroller's digital output pins, coupled with standardized interface connections for each module, ensuring stable and reliable operation of the device, improving adaptability and practicality, and meeting the needs of efficient integration in industrial control networks.
[0023] Regarding the software design of the gateway device, such as Figure 4 As shown: In the gateway device, the ESC chip relies on the MCU to configure its operating parameters and does not involve software design. The MCU part requires the design of protocol conversion-related modules. For accessing the ESC function, an ESC interface abstraction layer and an EtherCAT slave protocol stack layer are designed, and this part follows the standard EtherCAT slave software design scheme. It has Modbus-RTU master station functionality, and the TIA-485 interface abstraction layer and Modbus master station protocol stack software are ported. This part adopts the standard Modbus master station software design scheme. The protocol conversion and data synchronization module is used to refresh EtherCAT and Modbus data and maintain the mapping and synchronization of the two sets of protocol data. The reset module controls the output state of the RESET_ESC pin to achieve controllable reset of the ESC chip, and also has the function of controlling MCU reset. The NVM interface abstraction layer is ported and a configuration parameter storage module is designed to store the parameters issued by the configuration tool software into the NVM device. The parameters include ESC working parameters and Modbus protocol parameters. After the gateway device starts up, the MCU reads the parameters and configures the ESC to complete its initialization. This solution replaces the ESC reading configuration from the dedicated EEPROM. The parameter information management module accesses the NVM to store and retrieve parameter information through the configuration parameter storage module, accesses the ESC object dictionary through the EtherCAT slave protocol stack, and controls the reset operation of the ESC and MCU through the reset module. After the device is started, the parameter information management module first reads the parameters from the NVM, then resets and initializes the ESC to start the device's EtherCAT slave function. If the EtherCAT master station control device enters normal working state, the module starts the protocol conversion management module and exits. If the device is not in normal operating condition on the EtherCAT side, and a specific data unit in the monitored object dictionary of the parameter information management module is modified, the module will switch to parameter update logic. During the update process, parameter information will be received from the configuration tool software in several segments, written to the NVM, and the device will be reset. This process continues until the configuration work is completely completed, at which point the device will be reset for the last time. The workflow of the parameter information management module is as follows: Figure 5 As shown; After the protocol conversion management module is started, it first obtains relevant parameters from the parameter information management module, creates a mapping relationship between EtherCAT protocol PDO data and Modbus data through the protocol conversion data synchronization module, and then starts the Modbus master station function and the protocol conversion data synchronization module. The data mapping relationship created by the protocol conversion data synchronization module is consistent with the result generated by the protocol conversion data mapping module in the configuration tool software, and continuously refreshes PDO data and Modbus data to achieve protocol conversion; like Figure 6As shown, another embodiment of the present invention provides a configuration tool for an EtherCAT slave gateway device; The gateway configuration tool software runs on a general-purpose computer and accesses the gateway device via the EtherCAT protocol. The protocol conversion parameter editing module provides a graphical interface for configuring gateway parameters. The configurable content includes Modbus communication parameters (serial port baud rate, data bit length, stop bit length, parity method, etc.) and each data access parameter (slave ID, function code, address, length, scan cycle, etc.). This module interacts with the parameter information download module and the parameter information verification module to update the device parameters. After all parameters are determined, the protocol conversion data mapping module generates a mapping relationship between EtherCAT protocol PDO data and Modbus protocol data, and passes it to the protocol conversion parameter editing module for display in the graphical interface. This mapping relationship is consistent with the result generated by the protocol conversion management module in the device. The software integrates the EtherCAT master protocol stack, obtains the object dictionary of the gateway device via SDO, and can write configuration information into the object dictionary. Each SDO write operation will check whether it is successful. The parameter information download module is based on the EtherCAT master protocol stack. After the tool software scans the gateway device, it accesses the device's EtherCAT object dictionary via SDO, reads the object dictionary, and then writes the new parameters into it. Because the device will restart several times, the parameters are written in multiple segments. Each time the device restarts, the tool software rescans and writes the corresponding data segment until all data is updated. No user intervention is required. The process for updating device parameters is as follows: Figure 7 As shown; The parameter information verification module is based on the EtherCAT master station protocol stack. After the parameter information download module completes its work, the simulation control system master station reads the device information. If it matches the downloaded information, it will enter the normal working mode. If successful, the verification is deemed passed. The XML file module can generate an XML file for the gateway device that matches the current parameters for use by the master controller of the control system. Traditionally, slave devices need to use specific host computer software to burn the XML file information into the EEPROM that works with ESC. This solution eliminates this operation. The configuration file module can export and import parameters as text files, supporting batch processing or archiving by users; Another embodiment of the present invention provides an EtherCAT slave gateway device, comprising: The gateway device's MCU side extends to implement a TIA-485 interface through a UART interface, connects to the ESC's PDI via SPI, and connects to the ESC's RESET input via a GPIO output. The gateway device uses an EEPROM as the NVM. The MCU accesses the EEPROM via SPI. The EEPROM is divided into two storage areas: one for storing ESC operating parameters and the other for storing Modbus protocol parameters. The gateway device MCU side uses the RT-Thread operating system, and the relevant hardware abstraction layer has been integrated into it. SOES is ported as the EtherCAT slave protocol stack, and LibModbus is ported as the Modbus protocol stack. The configuration tool software that comes with the device is a Windows desktop application based on the .NET framework (it can also be based on QT to support cross-platform compatibility). It uses SOEM as the EtherCAT master protocol stack to achieve interaction with the device. On the configuration tool software interface, configure the gateway device to enable 1 TIA-485 interface, that is, enable only 1 Modbus master station to access the Modbus network. Set the interface parameters to baud rate 115200, data bits 8, stop bits 1, no parity, and access 3 Modbus slave stations. Each slave station contains coil, discrete input, input register, and holding register type data, and configure the corresponding function code, start address, length and other information. Click the "Configuration Complete" button. The protocol conversion data mapping module generates a mapping relationship and displays it in the graphical interface. After selecting the actual network card used, click the "Scan Device" button to obtain the gateway device connected to the configuration computer and confirm. Check the "Automatic Verification" option and click the "Parameter Download" button to start the automated download operation. After the download is completed, the verification operation will start automatically. If "Automatic Verification" is not checked, you can also manually click the "Verify" button to perform the operation. Clicking the "Export Configuration" button will export the configuration file as a text file, which contains all configuration parameter information and data mapping relationships. Clicking the "Import Configuration" button will import the configuration file content into the software and display it on the interface. Clicking the "Generate XML" button will generate an XML file according to the previously edited configuration parameters; Throughout the operation, ensure that the gateway device is powered normally and that the RJ45 (IN) network interface is connected to the RJ45 interface of the configuration computer using a standard network cable. The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0024] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that can be understood by those skilled in the art. The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.
Claims
1. An EtherCAT slave gateway device, characterized in that, It includes an EtherCAT slave controller, a microcontroller, non-volatile memory, an EtherCAT interface, a Modbus-RTU interface, and a reset control module; The EtherCAT slave controller and the microcontroller establish a data connection through a process data interface to enable the interaction of process data and mailbox data; The microcontroller side is extended to form a TIA-485 interface through a universal asynchronous transceiver interface, which is used as a Modbus-RTU interface to access the Modbus-RTU network. The microcontroller establishes a communication connection with the NVM, and the NVM is used to store the operating parameters of the gateway device. The reset control module consists of a digital output pin of a microcontroller. The operating parameters of the EtherCAT slave controller are read from the NVM by the microcontroller and written to the EtherCAT slave controller through the PDI interface to complete the initialization.
2. The EtherCAT slave gateway device according to claim 1, characterized in that, The EtherCAT side has two RJ45 interfaces, supporting EtherCAT network access and connection to the configuration computer.
3. The EtherCAT slave gateway device according to claim 1, characterized in that, The process data interface connection between the MCU and ESC is either a serial interface or a parallel bus, and the serial interface adopts a serial peripheral interface.
4. The EtherCAT slave gateway device according to claim 1, characterized in that, The reset control module is directly connected to the reset pin of the EtherCAT slave controller and is used to output a level signal to control the controllable reset of the EtherCAT slave controller.
5. The EtherCAT slave gateway device according to claim 1, characterized in that, The software functions performed by the microcontroller include: The ESC interface abstraction layer and EtherCAT slave protocol stack layer are used to realize the interaction between the MCU and the ESC. The TIA-485 interface abstraction layer and Modbus master protocol stack are used to implement Modbus-RTU network communication. The protocol conversion data synchronization module is used to create and maintain the mapping relationship between EtherCAT protocol PDO data and Modbus data, so as to realize real-time data refresh and synchronization; The configuration parameter storage module connects to the NVM interface abstraction layer and accesses NVM through the NVM interface abstraction layer to realize the storage and retrieval of configuration parameters. The parameter information management module is used to read parameters from NVM, initialize ESC, monitor parameter updates, and control reset operations. The reset module enables controllable reset of the ESC and MCU by controlling the output level of the RESET_ESC pin.
6. A configuration tool for an EtherCAT slave gateway device according to any one of claims 1-5, characterized in that, Running on a general-purpose computer, it includes the following functional modules: The protocol conversion parameter editing module provides a graphical interface for configuring Modbus communication parameters and data access parameters; The protocol conversion data mapping module is used to generate the mapping relationship between EtherCAT protocol PDO data and Modbus protocol data, and display it in the graphical interface. The EtherCAT master protocol stack is used to interact with the EtherCAT slave protocol stack of the gateway device and access the object dictionary of the gateway device via SDO. The parameter information download module, based on the EtherCAT master station protocol stack, writes configuration parameters to the gateway device in segments via SDO, and automatically adapts to resume parameter transmission after device restart; The parameter information verification module simulates the control system master station reading gateway device information to verify the consistency of downloaded parameters; The XML file module is used to generate XML files that accompany the configuration parameters for use by the control system's main station controller. The configuration file module supports exporting and importing configuration parameters as text files.
7. The configuration tool for an EtherCAT slave gateway device according to claim 6, wherein the EtherCAT slave protocol stack is an SOES protocol stack and the Modbus protocol stack is a LibModbus protocol stack.
8. The configuration tool for an EtherCAT slave gateway device according to claim 6, wherein the MCU side adopts the RT-Thread operating system, and the operating system integrates a related hardware abstraction layer.
9. The configuration tool for an EtherCAT slave gateway device according to claim 6, wherein the configuration parameters include Modbus communication parameters and data access parameters; the Modbus communication parameters include serial port baud rate, data bit length, stop bit length, and parity check method; the data access parameters include slave ID, function code, address, length, and scan cycle.
10. A configuration tool for an EtherCAT slave gateway device according to claim 6, characterized in that, The parameter information verification module supports both automatic and manual verification modes. After successful verification, the gateway device enters normal operation mode. The XML file generated by the XML file module does not need to be burned to the dedicated EEPROM of the ESC and can be directly called by the main controller of the control system. The configuration file module supports users to batch process configuration parameters or archive them.