Gateway configuration method and system of wind power programmable controller

By creating ES nodes and EAG subnodes in the EtherCAT slave station, determining the communication protocol type of downstream regulations, and conducting engineering compilation and analysis, the problem of inefficient configuration of PLC configuration tools in the secondary gateway structure is solved, efficient and accurate gateway configuration is achieved, and the compatibility and economicality of the wind power PLC system is improved.

CN120342865APending Publication Date: 2025-07-18XIAN THERMAL POWER RES INST CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510721227.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

When the existing PLC configuration tools handle the secondary gateway structure containing the EtherCAT gateway slave, the configuration work is insufficient, and the modification operation is large, resulting in inefficient configuration.

Method used

By creating an ES node of the EtherCAT slave and creating an EAG child node under the ES node, determining the communication protocol type of downstream regulations, storing node information and configuration information, performing project compilation and generating binary project files, and using PLC to parse configuration information, launching the EtherCAT master station, and realizing gateway configuration.

Benefits of technology

It improves the efficiency and accuracy of EtherCAT slave gateway configuration, reduces human errors, saves system resources, ensures system reliability and stability, and enhances the compatibility and economicality of wind power PLCs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120342865A_ABST
    Figure CN120342865A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data communication, in particular to a gateway configuration method and system of a wind power programmable controller. The method comprises the steps that a PLC configuration tool judges whether a current to-be-configured EtherCAT slave station is a gateway slave station or not according to a gateway configuration file; if the slave station is not the gateway slave station, gateway configuration is not carried out; if the slave station is a gateway slave station, an ES node of the slave station is created, an EAG child node is created under the node, the communication protocol type of a downstream protocol is determined through the EAG child node, and node information of the ES node and the communication protocol type are stored. And performing engineering compiling on the node information of the ES node and the configuration information of the downstream protocol to generate a binary engineering file, and downloading the binary engineering file to the PLC. And the PLC analyzes the file, obtains the configuration information of the EtherCAT bus equipment, starts the EtherCAT master station according to the information, reads the state machine transfer state when the master station is started, and finally completes the gateway configuration of the EtherCAT slave station.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data communication, and particularly relates to a method and system for configuring a gateway of a wind power programmable logic controller (PLC). Background Art

[0002] A wind power programmable logic controller (PLC) system is composed of a controller and multiple input / output modules (IO modules). Among them, EtherCAT (Ethernet for Control Automation Technology), as a real-time and high-speed Ethernet standard communication protocol, is applied to the wind power PLC system by virtue of advantages such as large-capacity transmission, high speed, high clock synchronization, low-cost implementation, and good openness. In this system, the PLC serves as the EtherCAT master station, and the input / output modules serve as EtherCAT slave stations. The master and slave stations communicate through the EtherCAT bus based on full-duplex Ethernet, and each EtherCAT slave station has a corresponding device description file (ESI file).

[0003] To be compatible with and adapt IO modules of other fieldbuses and enable them to access the EtherCAT network, an EtherCAT gateway slave station is set in the wind power PLC system. This gateway slave station has a dual identity, being both an EtherCAT slave station and the master station of a certain other fieldbus protocol (downstream protocol) that needs to access the EtherCAT bus. Its internal program can complete the mutual conversion between EtherCAT messages and downstream protocol messages.

[0004] The PLC configuration tool (tool) is software running on the upper computer and is used to configure the control system. After creating a project through processes such as device configuration and logic programming, the project is sent to the PLC for execution. When configuring devices on the EtherCAT bus, the tool generates a corresponding EtherCAT network description file (ENI file) based on the ESI file of the EtherCAT slave station in the project, and the EtherCAT master station communicates with the slave station according to the configuration in the ENI file. However, the current tool does not carry out special optimization for the two-level gateway structure.

[0005] In summary, in the process of applying EtherCAT technology in the wind power PLC system, although the basic communication function is achieved, the PLC configuration tool has problems of insufficient optimization when dealing with the two-level gateway structure including the EtherCAT gateway slave station. Summary of the Invention

[0006] The technical problem to be solved by the present invention is to provide a gateway configuration method and system for a wind power programmable logic controller in view of the deficiencies in the above-mentioned prior art, so as to solve the technical problems of insufficient gateway configuration and large modification operations in the current configuration work.

[0007] The object of the present invention is achieved by the following technical solutions: In a first aspect, the present invention provides a gateway configuration method for a wind power programmable logic controller, including: Create an ES node of the EtherCAT slave station, where the EtherCAT slave station is the gateway slave station; create an EAG sub-node under the ES node, determine the communication protocol type of the corresponding downstream protocol according to the EAG sub-node, and store the node information of the ES node and the communication protocol type of the downstream protocol; Perform engineering compilation on the node information of the ES node and the configuration information of the downstream protocol to obtain a binary engineering file, and download the binary engineering file to the PLC; Use the PLC to parse the binary engineering file to obtain the configuration information of the EtherCAT bus device; The PLC starts the EtherCAT master station according to the configuration information of the EtherCAT bus device, establishes communication between the EtherCAT master station and the EtherCAT slave station, and completes the gateway configuration of the EtherCAT slave station.

[0008] As a further improvement of the present invention, creating an ES node of the EtherCAT slave station, where the EtherCAT slave station is the gateway slave station; creating an EAG sub-node under the ES node, determining the communication protocol type of the corresponding downstream protocol according to the EAG sub-node, and storing the node information of the ES node and the communication protocol type of the downstream protocol, specifically includes: The PLC configuration tool determines whether the currently to-be-configured EtherCAT slave station is the gateway slave station according to the gateway configuration file; If the EtherCAT slave station is not the gateway slave station, no gateway configuration is performed; if the EtherCAT slave station is the gateway slave station, an EAG sub-node is created under the ES node; read the gateway configuration file, and find the communication protocol type of the downstream protocol corresponding to the EAG sub-node according to the ProductCode and Revision; According to the communication protocol type of the downstream protocol, create a master node of the downstream protocol in the EAG sub-node; Fill the communication protocol type of the downstream protocol and the address of the ES node into the EAG sub-node parameters.

[0009] As a further improvement of the present invention, the node information of the ES node and the configuration information of the downstream protocol are compiled into a binary engineering file, specifically including: The engineering compilation includes a configuration mapping process and a channel address mapping process; The configuration mapping process is as follows: Through configuration mapping of the configuration of the downstream protocol, according to the content of the configuration file, the configuration of the downstream protocol is converted into the startup parameters of the EtherCAT gateway slave station. The startup parameters will be packed into the ENI file, and the ENI file will ultimately be packed into the binary engineering file; The channel address mapping is as follows: Collect all the inputs and outputs of the downstream protocol master and slave stations, centrally configure them in the EtherCAT process data of the EtherCAT gateway slave station, and map the addresses of the EtherCAT process data to the addresses of the corresponding input and output channels of the downstream protocol.

[0010] As a further improvement of the present invention, the configuration mapping process and the channel address mapping process specifically include: Read the configuration file and loop to query whether the parameters of the downstream protocol master and slave stations are in the configuration file; If not, they are invalid parameters that are not required in the gateway mode; If so, read the object dictionary location information corresponding to the parameters in the configuration file; In the startup command of the corresponding EtherCAT slave station, generate the startup commands for the pre-run and safe-run phases; Count the process data list of the downstream protocol master and slave stations, and generate process data with the same length and data type as the input and output process data of the downstream protocol on the process data page of the EtherCAT slave station; Replace the address of each channel in the downstream protocol process data with the process data address of the EtherCAT slave station; Compile and generate a binary engineering file, and download the binary engineering file to the PLC.

[0011] As a further improvement of the present invention, the data in the binary engineering file is stored in segments. One segment of data in the binary engineering file is the device data area of the project. The device data area stores all the gateway devices configured in the project in a tree structure, and each gateway device corresponds to a MODULE node on the device tree.

[0012] As a further improvement of the present invention, use the PLC to parse the binary engineering file to obtain the configuration information of the EtherCAT bus device, specifically including: The PLC parses the binary engineering file, reads the header of the binary engineering file to obtain the offset of the device data area, and obtains the starting address of the device data area through this offset. This starting address serves as the address of the MODULE structure of the root device node on the engineering device tree; The PLC traverses the engineering device tree and parses the MODULE according to the protocolType field of each MOUDLE structure on the node. When an EAG child node is found, it calls an external dynamic library function to transfer the program control right to the gateway module; Store the slave address of this gateway and the downstream protocol protocolType, and transfer the control right back to the PLC.

[0013] As a further improvement of the present invention, the PLC starts the EtherCAT master station according to the configuration information of the EtherCAT bus device, reads the state machine transition state when the EtherCAT master station starts, and completes the gateway configuration of the EtherCAT slave station, specifically including: Read the EtherCAT network description file configuration of the EtherCAT master station and create an EtherCAT configuration instance; Create an EtherCAT master station instance according to the EtherCAT configuration instance; Start the EtherCAT master station and sequentially switch the master station state machine to initialization, pre-operation, safe operation, and operation; Judge whether the EtherCAT master station successfully switches to safe operation; If it fails, it means that the configuration information sent to the gateway is incorrect; if it succeeds, it means that the configuration of all gateway slave stations is correct.

[0014] As a further improvement of the present invention, after the gateway slave station is correctly configured, it further includes the engineering operation stage, specifically including: After the initialization of the gateway slave station is completed, the EtherCAT master station and the gateway slave station enter the running state; The gateway slave station serves as a data relay, and periodically converts EtherCAT data into downstream protocol data and sends it to the downstream protocol slave station, or converts the data of the downstream protocol slave station into EtherCAT data and sends it back to the master station; The master station communicates with the gateway slave station periodically through the EtherCAT bus; The thread of the gateway external library non-periodically obtains the diagnostic data of the slave station and uploads it to the upper computer.

[0015] In a second aspect, the present invention provides a gateway configuration system for a wind power programmable logic controller, which is used to implement the above-mentioned gateway configuration method for a wind power programmable logic controller, including: The gateway judgment module, and the PLC configuration tool determines whether the currently to-be-configured EtherCAT slave station is a gateway slave station according to the gateway configuration file; The device configuration module, if the EtherCAT slave station is not a gateway slave station, no gateway configuration is performed; if the EtherCAT slave station is a gateway slave station, an ES node of the gateway slave station is created; an EAG sub-node is created under the ES node, and the communication protocol type of the corresponding downstream protocol is determined according to the EAG sub-node, and the node information of the ES node and the communication protocol type of the downstream protocol are stored; The project compilation module compiles the node information of the ES node and the configuration information of the downstream protocol to obtain a binary project file, and downloads the binary project file to the PLC; The project parsing module uses the PLC to parse the binary project file to obtain the configuration information of the EtherCAT bus device; The gateway configuration module, the PLC starts the EtherCAT master station according to the configuration information of the EtherCAT bus device, reads the state machine transition state when the EtherCAT master station starts, establishes communication between the EtherCAT master station and the EtherCAT slave station, and completes the gateway configuration of the EtherCAT slave station.

[0016] In a third aspect, the present invention provides a computer-readable storage medium storing one or more programs, the one or more programs including instructions which, when executed by a computing device, cause the computing device to execute the above-mentioned gateway configuration method of the wind power programmable controller.

[0017] In a fourth aspect, the present invention provides a computing device, including: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include steps for executing the above-mentioned gateway configuration method of the wind power programmable controller.

[0018] The beneficial effects of the present invention are as follows: A gateway configuration method for a wind power programmable controller provided by the present invention automatically determines whether an EtherCAT slave is a gateway slave and performs corresponding configuration according to the judgment result, reducing the workload of manual judgment and configuration and improving the configuration efficiency. By judging whether the EtherCAT slave is a gateway slave, invalid configuration of non-gateway slaves is avoided, saving system resources. Determining the communication protocol type of the downstream protocol according to the EAG sub-node makes the configuration process more flexible and can adapt to different communication requirements. An EAG sub-node is created under the ES node, and the node information and communication protocol type are stored, facilitating subsequent management and maintenance. Through project compilation, the node information and configuration information are converted into a binary project file, ensuring the executability and security of the configuration information. The binary project file is downloaded to the PLC, realizing the physical deployment of the configuration information and ensuring seamless integration between the PLC and the EtherCAT master station. The PLC parses the binary project file to obtain the configuration information of the EtherCAT bus device, ensuring the correct application of the configuration information. The PLC starts the EtherCAT master station according to the configuration information and reads the state machine transition state when the master station starts, ensuring the stable operation and status monitoring of the master station. The present invention significantly improves the efficiency and accuracy of EtherCAT slave gateway configuration, reduces human errors, saves system resources, and ensures the reliability and stability of the system.

[0019] Furthermore, by inserting an EAG gateway node in the engineering device tree and providing a gateway external dynamic library in the PLC, a new type of wind power PLC gateway configuration method with minimal changes to the existing configuration tool and PLC program is realized, covering the gateway mode of the entire life cycle of the wind power PLC, including device configuration, engineering file compilation and parsing, gateway diagnosis, operation, etc., enhancing the compatibility, versatility, and economy of the wind power PLC.

[0020] Furthermore, by creating an EAG sub-node under the ES node and further creating a master station node in the EAG sub-node, modular and hierarchical management of the configuration information is realized. By reading the gateway configuration file and automatically finding the corresponding communication protocol type according to the ProductCode and Revision, the workload of manual judgment and configuration is reduced, and the configuration efficiency is improved. According to the found communication protocol type, the corresponding master station node is automatically created under the EAG sub-node, ensuring the accuracy and consistency of the configuration. The node information of the ES node and the configuration information of the downstream protocol are centrally stored, facilitating subsequent management and maintenance. The communication protocol type of the downstream protocol and the address of the ES node are filled into the EAG sub-node parameters, realizing parametric management of the configuration. Description of the Drawings

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0022] Figure 1 It is a schematic flowchart of the configuration method for the EtherCAT general gateway of the wind power programmable controller in the embodiment of the present invention; Figure 2 It is a flowchart of the device configuration stage in the embodiment of the present invention; Figure 3 It is a schematic diagram of the gateway device tree structure in the embodiment of the present invention; Figure 4 It is a flowchart of the project compilation stage in the embodiment of the present invention; Figure 5 It is a flowchart of the project loading stage in the embodiment of the present invention; Figure 6 It is a schematic diagram of the electronic device structure in the embodiment of the present invention. Specific embodiments

[0023] In order to make the objectives and technical solutions of the present invention clearer and easier to understand. The following further details the present invention in conjunction with the accompanying drawings and embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0024] The following will clearly and completely describe the technical solutions of the present invention in conjunction with the accompanying drawings and specific embodiments. Among them, the described embodiments are only some embodiments of the present invention, rather than all embodiments.

[0025] Embodiment 1 As Figures 1 to 5 shown, this embodiment provides a gateway configuration method for a wind power programmable controller, which can seamlessly connect any legacy communication protocol IO module to the EtherCAT bus with minimal modification to the tool. The following are the specific embodiments.

[0026] First, the PLC configuration tool determines whether the currently to-be-configured EtherCAT slave is a gateway slave according to the gateway configuration file.

[0027] If the EtherCAT slave is not a gateway slave, no gateway configuration is performed; if the EtherCAT slave is a gateway slave, create an ES node for the gateway slave; create an EAG sub-node under the ES node, determine the communication protocol type of the corresponding downstream protocol according to the EAG sub-node, and store the node information of the ES node and the communication protocol type of the downstream protocol.

[0028] As Figure 2 , Figure 3 shown, create an EAG sub-node under the ES node; read the gateway configuration file, and find the communication protocol type of the downstream protocol corresponding to the EAG sub-node according to the ProductCode (device identifier) and Revision (revision version); Create a master node of the downstream protocol in the EAG sub-node according to the communication protocol type of the downstream protocol; Fill the communication protocol type of the downstream protocol and the address of the ES node into the EAG sub-node parameters.

[0029] Specifically, after creating the EAG sub-node, read the gateway configuration file, and find the ProtocolType (communication protocol type) of the downstream protocol corresponding to the gateway according to the ProductCode and Revision; according to the ProtocolType, create the corresponding SPM node, and store the slave address of the ES node and the ProtocolType of the SPM in the EAG node.

[0030] As Figure 4 shown, perform engineering compilation on the node information of the ES node and the configuration information of the downstream protocol to obtain a binary engineering file, and download the binary engineering file to the PLC.

[0031] The engineering compilation of this embodiment includes a configuration mapping process and a channel address mapping process; The configuration mapping process is: map the configuration of the downstream protocol, and according to the content of the configuration file, convert the configuration of the downstream protocol into the startup parameters of the EtherCAT gateway slave. The startup parameters will be packaged into the ENI file, and the ENI file will eventually be packaged into the LEF file; The channel address mapping is: collect all the inputs and outputs of the downstream protocol master and slave, and centrally configure them in the EtherCAT process data of the EtherCAT gateway slave, and map the address of the EtherCAT process data to the address of the corresponding input and output channels of the downstream protocol.

[0032] Specifically, read the configuration file, and loop to query whether the parameters of the downstream protocol master and slave are in the configuration file; If not, they are invalid parameters that are not required in the gateway mode; If so, read the object dictionary position information corresponding to the parameters in the configuration file; In the startup command of the corresponding EtherCAT slave, generate startup commands for the pre-operational and safe operational phases; Count the process data lists of the master and slave stations of the downstream protocol, and generate process data with the same length and data type as the input and output process data of the downstream protocol on the process data page of the EtherCAT slave; Replace the address of each channel in the downstream protocol process data with the process data address of the EtherCAT slave; Compile and generate a binary project file, and download the binary project file to the PLC.

[0033] Among them, the data in the binary project file is stored in segments. A segment of data in the binary project file is the device data area of the project. The device data area stores all the gateway devices configured in the project in a tree structure, and each gateway device corresponds to a MODULE node on the device tree.

[0034] Use the PLC to parse the binary project file to obtain the configuration information of the EtherCAT bus device.

[0035] The PLC parses the binary project file, reads the binary project file header to obtain the offset of the device data area, and obtains the starting address of the device data area through this offset. The starting address is used as the MODULE structure address of the root device node on the project device tree; The PLC traverses the project device tree and parses the MODULE according to the protocolType field of each MOUDLE structure on the node. When an EAG child node is found, call the external dynamic library function to transfer the program control right to the gateway module; Store the slave address of the gateway and the downstream protocol protocolType, and transfer the control right back to the PLC.

[0036] As Figure 5 shown, the PLC starts the EtherCAT master according to the configuration information of the EtherCAT bus device, reads the state machine transition state when the EtherCAT master starts, and at the same time, when the state machine transition state is startup, establish communication between the EtherCAT master and the EtherCAT slave to complete the gateway configuration of the EtherCAT slave.

[0037] Specifically, read the EtherCAT network description file configuration of the EtherCAT master and create an EtherCAT configuration instance; Create an EtherCAT master instance according to the EtherCAT configuration instance; Start the EtherCAT master station and switch the master station state machine to initialization, pre-operation, safe operation, and operation in sequence; Determine whether the EtherCAT master station successfully switches to safe operation; If it fails, it means that the configuration information sent to the gateway is incorrect; if it succeeds, it means that the configurations of all gateway slave stations are correct.

[0038] When the gateway slave station is correctly configured, it also includes the project operation stage, specifically including: The initialization of the gateway slave station is completed, and the EtherCAT master station and the gateway slave station enter the operation state; The gateway slave station acts as a data relay, periodically converting EtherCAT data into downstream protocol data and sending it to the downstream protocol slave station, or converting the data of the downstream protocol slave station into EtherCAT data and sending it back to the master station; The master station communicates with the gateway slave station periodically through the EtherCAT bus; The thread of the gateway external library non-periodically obtains the diagnostic data of the slave station and uploads it to the host computer.

[0039] In summary, this embodiment mainly covers the entire life cycle of the wind power PLC. By inserting an EAG gateway node in the engineering device tree and providing a gateway external dynamic library in the PLC, etc., a new wind power PLC gateway configuration method with minimal changes to the existing configuration tool and PLC program is realized, covering the gateway mode of the entire life cycle of the wind power PLC including device configuration, engineering file compilation and parsing, gateway diagnosis, operation, etc., enhancing the compatibility, versatility, and economy of the wind power PLC.

[0040] Embodiment 2 As a preferred embodiment of this embodiment, the steps of this embodiment specifically include: When the tool performs device configuration, it includes: distinguishing between gateway slave stations and ordinary IO slave stations that are not gateways; matching a corresponding downstream protocol for each gateway slave station. The relationship between the ProductCode of the EtherCAT gateway slave station and the corresponding downstream protocol ProtocolType is stored in the e2a_gateway.xml file in the root directory of the tool.

[0041] Specifically, when the user adds an EtherCAT slave station to the project in the tool: 1) Read the configuration file to determine whether the slave station is a gateway slave station. If not, directly create the EtherCAT slave station node (EtherCAT Slave Node, hereinafter referred to as the ES node) and end; 2) If it is a gateway slave station, first create the ES node, and create a dedicated gateway node (EtherCAT to Any Gateway Node, hereinafter referred to as the EAG sub-node) under the ES node; 3) Read the ProtocolType of the corresponding downstream protocol, and create a master node of the corresponding downstream protocol (Sub Protocol Master Node, hereinafter referred to as the SPM node) under the EAG sub-node; 4) Fill the downstream protocol ProtocolType and the EtherCAT gateway slave station address into the EAG sub-node parameters.

[0042] To implement the configuration of the downstream protocol, the tool needs to send the configuration of the downstream protocol to the gateway slave station through the EtherCAT bus. This process is called Configuration Mapping. The configuration mapping rules are also placed in the configuration file e2a_gateway.xml. This file records the correspondence between each configuration item of the downstream protocol master / slave station and the object dictionary elements (index, sub-index, data length) of the EtherCAT gateway slave station. The product after the tool compiles the project is a binary project file (LEF file). The data in the LEF file is stored in segments. One of them is the device data area of the project. This area stores all the devices configured in the project in a tree structure. Each device corresponds to a MODULE node on the tree. When the project is compiled, first through configuration mapping, according to the content of the configuration file, the configuration of the downstream protocol is converted into the startup parameters (InitCommand) of the EtherCAT gateway slave station. The startup parameters will be packed into the ENI file, and the ENI file will eventually be packed into the LEF file. Specifically, the content of the ENI file is located in the device data area - EtherCAT master node.

[0043] The values of the input and output channels of all devices are stored in the IEC data area of the LEF file. Since the master station and the gateway actually communicate through the EtherCAT bus, by default, the values of the input and output channels of the downstream protocol devices are invalid, which is reflected in that the value of the input channel is always 0, and writing values to the output channel through logical operations is invalid. To solve this problem, the tool needs to correspond the input and output channels of the downstream protocol with the input and output channels of the EtherCAT gateway. This process is called Channel Address Mapping. When compiling the project, the tool will collect all the input and output of the downstream protocol master and slave stations and centrally configure them in the EtherCAT process data (PDO) of the EtherCAT gateway slave station, and map the address of the PDO to the address of the corresponding input and output channels of the downstream protocol, realizing the unification of upstream and downstream data in the gateway mode.

[0044] After the tool compiles the project, the LEF file is downloaded to the PLC, and the PLC obtains the configuration information of the bus device by parsing the LEF file. Specifically, the PLC first reads the LEF file header to obtain the offset of the device data area, and then obtains the starting address of the device data area through this offset. This address is also the MODULE structure address of the root device node on the device tree. Subsequently, the PLC traverses the project device tree in preorder and parses the MODULE according to the protocolType field of each MOUDLE structure on the node. When an EAG child node is found, the control right of the LEF parsing program is taken over in the form of an external dynamic library function of e2a_gateway.so to parse the EAG child node MODULE. Specifically, the gateway slave station stores the diagnostic information of the downstream protocol master and slave stations in the object dictionary. The diagnostic information structures of different protocols may be different. Through the slave station address and downstream protocol type parameters in the EAG child node MDOULE, the program can find the corresponding EtherCAT slave station and confirm the storage location and format of the diagnostic information to realize the upload of the diagnostic information. After the parsing of the EAG child node MODULE is completed, the external dynamic library returns the control right of the LEF parsing program to the PLC program. The PLC program continues to parse the downstream protocol device, and in this process, the PLC can ignore the gateway structure and regard the downstream protocol as a completely independent bus. By inserting an external dynamic library function into the LEF parsing, the original PLC program can transparently support gateway communication.

[0045] After the project file is loaded, the PLC initializes and starts the EtherCAT master station. When the EtherCAT master station starts, the state machine transitions: initialization (INIT), pre-operation (PREOP), safe operation (SAFEOP), operation (OP). The InitCommand of the gateway slave station will be executed in the PREOP and SAFEOP stages (PS). When the master station state machine successfully switches to SAFEOP / OP, it means that the configurations of all gateways on the bus have been successfully downloaded to the EtherCAT gateway slave station.

[0046] After the EtherCAT master station starts up, both the master and slave stations are in the OP state. The downstream protocol master station periodically receives data from the slave station and uploads it to the master station through the EtherCAT bus; when receiving the output of the EtherCAT master station, it converts it into a downstream protocol message and sends it to the slave station. At the same time, the external dynamic library function reads the diagnostic information of the gateway slave station non-periodically through CoE (CANopen Over EtherCAT) and uploads it to the upper computer for monitoring.

[0047] Embodiment 3 This embodiment provides a gateway configuration system for a wind power programmable logic controller, which is used to implement the gateway configuration method of the wind power programmable logic controller in Embodiment 1 and Embodiment 2. The system mainly includes: a gateway judgment module, a device configuration module, a project compilation module, a project parsing module, and a gateway configuration module. Each module specifically includes: The gateway judgment module, based on the gateway configuration file, the PLC configuration tool determines whether the currently to-be-configured EtherCAT slave station is a gateway slave station; The device configuration module, if the EtherCAT slave station is not a gateway slave station, no gateway configuration is performed; if the EtherCAT slave station is a gateway slave station, an ES node of the gateway slave station is created; an EAG sub-node is created under the ES node, the communication protocol type of the corresponding downstream protocol is determined according to the EAG sub-node, and the node information of the ES node and the communication protocol type of the downstream protocol are stored; The project compilation module compiles the node information of the ES node and the configuration information of the downstream protocol into a binary project file, and downloads the binary project file to the PLC; The project parsing module uses the PLC to parse the binary project file to obtain the configuration information of the EtherCAT bus device; The gateway configuration module, based on the configuration information of the EtherCAT bus device, the PLC starts the EtherCAT master station, establishes communication between the EtherCAT master station and the EtherCAT slave station, and completes the gateway configuration of the EtherCAT slave station.

[0048] Embodiment 4 In another embodiment of the present invention, the present invention further provides a storage medium, specifically a computer-readable storage medium (Memory). The computer-readable storage medium is a memory device in a terminal device and is used to store programs and data. It can be understood that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and, of course, the extended storage medium supported by the terminal device. It can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. The computer-readable storage medium provides a storage space, and the operating system of the terminal is stored in this storage space. Moreover, one or more instructions suitable for being loaded and executed by a processor are also stored in this storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that more specific examples (non-exhaustive list) of the computer-readable storage medium here include: electrical connections with one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0049] The computer-readable storage medium also includes data signals propagated in a baseband or as part of a carrier wave, in which the readable program code is carried. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium can also be any readable medium other than the readable storage medium, and this readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.

[0050] The program code for performing the operations of the present invention can be written in any combination of one or more programming languages. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as an independent software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, by using an Internet service provider to connect through the Internet).

[0051] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the gateway configuration method for a wind power programmable controller in the above embodiments; the one or more instructions in the computer-readable storage medium are loaded and executed by the processor to perform the following steps: Create an ES node of the EtherCAT slave station, where the EtherCAT slave station is a gateway slave station; create an EAG sub-node under the ES node, determine the communication protocol type of the corresponding downstream protocol according to the EAG sub-node, and store the node information of the ES node and the communication protocol type of the downstream protocol; Perform engineering compilation on the node information of the ES node and the configuration information of the downstream protocol to obtain a binary engineering file, and download the binary engineering file to the PLC; Use the PLC to parse the binary engineering file to obtain the configuration information of the EtherCAT bus device; The PLC starts the EtherCAT master station according to the configuration information of the EtherCAT bus device, establishes communication between the EtherCAT master station and the EtherCAT slave station, and completes the gateway configuration of the EtherCAT slave station.

[0052] Embodiment 5 Figure 6 The block diagram of an electronic device provided by the present invention according to an embodiment.

[0053] Please refer to Figure 6 , the terminal device 600 is an electronic device, and the electronic device is presented in the form of a general computing device. The components of the electronic device may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0054] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present invention described in the method part of this specification. For example, the processing unit 610 can execute the steps as shown in Figure 1 .

[0055] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 6201 and / or a cache storage unit 6202, and may further include a read-only storage unit (ROM) 6203.

[0056] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205. Such program modules 6205 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.

[0057] The bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any one of a variety of bus structures.

[0058] The electronic device 600 may also communicate with one or more external devices 700 (such as a keyboard, a pointing device, a Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or may communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication may be performed through the input / output (I / O) interface 650. Moreover, the electronic device 600 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 through the bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, etc.

[0059] The databases involved in the embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., and is not limited thereto. The processors involved in the embodiments provided in this application may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., and is not limited thereto.

Claims

1. A gateway configuration method for a wind power programmable controller, characterized in that, Including: Create an ES node for the EtherCAT slave, where the EtherCAT slave is a gateway slave; Create an EAG sub-node under the ES node, determine the communication protocol type of the corresponding downstream protocol according to the EAG sub-node, and store the node information of the ES node and the communication protocol type of the downstream protocol; Perform engineering compilation on the node information of the ES node and the configuration information of the downstream protocol to obtain a binary engineering file, and download the binary engineering file to the PLC; Use the PLC to parse the binary engineering file to obtain the configuration information of the EtherCAT bus device; The PLC starts the EtherCAT master according to the configuration information of the EtherCAT bus device, establishes communication between the EtherCAT master and the EtherCAT slave, and completes the gateway configuration of the EtherCAT slave.

2. The gateway configuration method of the wind power programmable controller according to claim 1, wherein Create an ES node for the EtherCAT slave, where the EtherCAT slave is a gateway slave; create an EAG sub-node under the ES node, determine the communication protocol type of the corresponding downstream protocol according to the EAG sub-node, and store the node information of the ES node and the communication protocol type of the downstream protocol. Specifically, it includes: The PLC configuration tool determines whether the currently to-be-configured EtherCAT slave is a gateway slave according to the gateway configuration file; If the EtherCAT slave is not a gateway slave, no gateway configuration is performed; if the EtherCAT slave is a gateway slave, an EAG sub-node is created under the ES node; read the gateway configuration file, and find the communication protocol type of the downstream protocol corresponding to the EAG sub-node according to the ProductCode and Revision; Create a master node of the downstream protocol in the EAG sub-node according to the communication protocol type of the downstream protocol; Fill the communication protocol type of the downstream protocol and the address of the ES node into the EAG sub-node parameters.

3. The gateway configuration method of the wind power programmable controller according to claim 1, characterized in that, Perform engineering compilation on the node information of the ES node and the configuration information of the downstream protocol to obtain a binary engineering file. Specifically, it includes: The engineering compilation includes a configuration mapping process and a channel address mapping process; The configuration mapping process is: map the configuration of the downstream protocol. According to the content of the configuration file, convert the configuration of the downstream protocol into the startup parameters of the EtherCAT gateway slave. The startup parameters will be packaged into the ENI file, and the ENI file will ultimately be packaged into the binary engineering file; The channel address mapping is: collect all the inputs and outputs of the master and slave of the downstream protocol, centrally configure them in the EtherCAT process data of the EtherCAT gateway slave, and map the addresses of the EtherCAT process data to the addresses of the corresponding input and output channels of the downstream protocol.

4. The gateway configuration method of the wind power programmable controller according to claim 3, characterized in that The configuration mapping process and the channel address mapping process. Specifically, it includes: Read the configuration file and loop to query whether the master and slave parameters of the downstream protocol are in the configuration file; If not, it is an invalid parameter that is not required in the gateway mode; If so, read the object dictionary location information corresponding to the parameter in the configuration file; Generate startup commands for the pre - operation and safe - operation phases in the startup command of the corresponding EtherCAT slave station; Count the process data list of the master - slave stations of the downstream protocol, and generate process data with the same length and data type as the input - output process data of the downstream protocol on the process data page of the EtherCAT slave station; Replace the address of each channel in the process data of the downstream protocol with the process data address of the EtherCAT slave station; Compile and generate a binary project file, and download the binary project file to the PLC.

5. The gateway configuration method of the wind power programmable controller according to claim 3, characterized in that The data in the binary project file is stored in segments. A segment of data in the binary project file is the device data area of the project. The device data area stores all gateway devices configured in the project in a tree - structure manner. Each gateway device corresponds to a MODULE node on the device tree.

6. The gateway configuration method of the wind power programmable controller according to claim 1, characterized in that Use the PLC to parse the binary project file to obtain the configuration information of the EtherCAT bus devices, specifically including: The PLC parses the binary project file, reads the binary project file header to obtain the offset of the device data area, and obtains the starting address of the device data area through this offset. The starting address is used as the MODULE structure address of the root device node on the project device tree; The PLC traverses the project device tree and parses the MODULE according to the protocolType field of each MOUDLE structure on the node. When an EAG child node is found, it calls an external dynamic - library function to transfer the program control right to the gateway module; Store the slave address of the gateway and the protocolType of the downstream protocol, and transfer the control right back to the PLC.

7. The gateway configuration method of the wind power programmable controller according to claim 6, characterized in that, The PLC starts the EtherCAT master station according to the configuration information of the EtherCAT bus devices, reads the state - machine transition state when the EtherCAT master station starts, and completes the gateway configuration of the EtherCAT slave station, specifically including: Read the EtherCAT network description file configuration of the EtherCAT master station and create an EtherCAT configuration instance; Create an EtherCAT master - station instance according to the EtherCAT configuration instance; Start the EtherCAT master station, and sequentially switch the master - station state machine to initialization, pre - operation, safe - operation, and operation; Judge whether the switch of the EtherCAT master station to safe - operation is successful; If it fails, it means that the configuration information sent to the gateway is incorrect; if it is successful, it means that the configuration of all gateway slave stations is correct.

8. The gateway configuration method of the wind power programmable controller according to claim 7, characterized in that, When the gateway slave - station configuration is correct, it also includes the project - running phase, specifically including: The initialization of the gateway slave station is completed, and the EtherCAT master station and the gateway slave station enter the running state; The gateway slave station acts as a data relay, and periodically converts EtherCAT data into downstream - protocol data and sends it to the downstream - protocol slave station, or converts the data of the downstream - protocol slave station into EtherCAT data and sends it back to the master station; The master station communicates with the gateway slave station periodically through the EtherCAT bus; The thread of the gateway external library non - periodically obtains the diagnostic data of the slave station and uploads it to the upper computer.

9. A gateway configuration system for a wind power programmable controller, which is used to implement the gateway configuration method of the wind power programmable controller according to any one of claims 1 to 8, characterized in that, Including: The gateway judgment module, and the PLC configuration tool judges whether the currently to-be-configured EtherCAT slave station is a gateway slave station according to the gateway configuration file; The device configuration module, if the EtherCAT slave station is not a gateway slave station, no gateway configuration is performed; if the EtherCAT slave station is a gateway slave station, an ES node of the gateway slave station is created; an EAG sub-node is created under the ES node, and the communication protocol type of the corresponding downstream protocol is determined according to the EAG sub-node, and the node information of the ES node and the communication protocol type of the downstream protocol are stored; The project compilation module compiles the node information of the ES node and the configuration information of the downstream protocol to obtain a binary project file, and downloads the binary project file to the PLC; The project parsing module uses the PLC to parse the binary project file to obtain the configuration information of the EtherCAT bus device; The gateway configuration module, the PLC starts the EtherCAT master station according to the configuration information of the EtherCAT bus device, establishes communication between the EtherCAT master station and the EtherCAT slave station, and completes the gateway configuration of the EtherCAT slave station.

10. A computing device, characterized in that, Comprising: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include steps for executing the gateway configuration method of the wind power programmable controller according to any one of claims 1 to 8.

Citation Information

Cited By

  • EtherCAT slave station gateway for semiconductor temperature control equipment

    CN121098666A