Modbus protocol-based driver configuration method, tool and system
By constructing metadata using custom frames to generate request data conforming to the target communication protocol, the flexibility and scalability issues of driver configuration methods are resolved. This enables high integration and high flexibility in configuring various drivers, adapting to driver upgrade requirements.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA TECHENERGY
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-01
AI Technical Summary
Existing driver configuration methods lack flexibility and scalability, requiring users to frequently upgrade configuration tools to adapt to different types of drivers, which increases the complexity of the configuration process.
This paper provides a driver configuration method and tool based on the Modbus protocol. It generates request data that conforms to the target communication protocol by constructing metadata through custom frames, and realizes flexible configuration of various drivers. The configuration method has a high degree of integration, high flexibility and high real-time performance.
It enables the configuration of multiple drives without relying on specific configuration tools, improving integration and eliminating the need to pre-upgrade the configuration tools when upgrading drives, thus providing high flexibility and real-time performance.
Smart Images

Figure CN121967566A_ABST
Abstract
Description
A driver configuration method, tool, and system based on the Modbus protocol Technical Field
[0001] This application relates to the field of nuclear-grade industrial drive technology, specifically to a drive configuration method, tool, and system based on the Modbus protocol. Background Technology
[0002] To ensure the safe operation of equipment, the operating parameters of the device drivers need to be configured. Typically, drivers are highly customized, meaning each driver may correspond to a dedicated configuration tool. When there are many types of drivers, users need to use different configuration tools to configure different types of drivers, greatly increasing the complexity of the configuration process.
[0003] Moreover, the existing configuration methods have poor flexibility and scalability. Users need to upgrade the configuration tool for the driver before they can configure the upgraded driver through the upgraded configuration tool, which cannot quickly respond to the needs of driver changes. Summary of the Invention
[0004] In view of this, this application provides a driver configuration method, tool and system based on the Modbus protocol, which can generate actual request data that conforms to the target communication protocol based on the frame construction metadata of the user's custom configuration of the target communication protocol, realize the configuration of multiple drivers, and the configuration method has high integration and high flexibility.
[0005] To address the aforementioned problems, this application provides the following technical solution: In a first aspect, this application provides a method for configuring a motor driver based on the Modbus protocol, comprising: generating actual request data conforming to the target communication protocol based on request data in the frame construction metadata of a user-defined configuration of the target communication protocol; the target communication protocol being the communication protocol corresponding to the driver to be configured; sending the actual request data to the driver to be configured and receiving actual response data from the driver to be configured; parsing the actual response data based on the response data in the frame construction metadata; and, if the actual response data is successfully parsed, saving the frame construction metadata as a template corresponding to the target communication protocol.
[0006] In one possible implementation, both the request data and the response data in the frame construction metadata include multiple configuration items and multiple configuration values, with each configuration item corresponding to a configuration value. The configuration items include a frame boundary identifier, a protocol control field, the byte offset position of the address field, the field length and byte order, the data field structure, and verification configuration information. The data field structure includes the motor driver's rotation speed value, the motor driver's rotation direction, and the data field byte order. Generating actual request data conforming to the target communication protocol based on the user-defined configuration of the request data in the frame construction metadata includes: generating actual request data conforming to the target communication protocol based on the configuration values of the request data in the frame construction metadata, where the configuration values are customized by the user according to the corresponding configuration items, and the configuration items are customized by the user according to the target communication protocol.
[0007] One possible implementation includes, before generating actual request data conforming to the target communication protocol based on request data in the frame construction metadata of the user's custom configuration of the target communication protocol, receiving frame construction metadata of the user's custom configuration of the target communication protocol; or, calling frame construction metadata in the template of the target communication protocol.
[0008] In one possible implementation, if the actual response data is successfully parsed, the method further includes: saving the configuration log of the driver to be configured; and communicating with the driver to be configured via a target communication protocol.
[0009] In a second aspect of this application, a driver configuration tool based on the Modbus protocol is provided, comprising: a user interface module, a configuration module, a parsing module, and a communication module; the user interface module is used to receive frame construction metadata for user-defined configuration of a target communication protocol, wherein the target communication protocol is the communication protocol corresponding to the driver to be configured; the parsing module is used to generate actual request data conforming to the target communication protocol based on the request data in the frame construction metadata, and to parse the actual response data from the driver to be configured based on the response data in the frame construction metadata; the communication module is used to send the actual request data to the driver to be configured and to receive the actual response data from the driver to be configured; if the actual response data is successfully parsed, the configuration module is also used to save the frame construction metadata as a template of the target communication protocol.
[0010] In one possible implementation, the parsing module generates actual request data conforming to the target communication protocol based on the request data in the frame construction metadata customized by the user for the target communication protocol. This includes: the parsing module generating actual request data conforming to the target communication protocol based on the configuration values of the request data in the frame construction metadata, where the configuration values are customized by the user according to the corresponding configuration items, and the configuration items are customized by the user according to the target communication protocol; both the request data and the response data in the frame construction metadata include multiple configuration items and multiple configuration values, with each configuration item corresponding to a configuration value; the configuration items include a frame boundary identifier, a protocol control field, the byte offset position of the address field, the field length and byte order, the data field structure, and verification configuration information; the data field structure includes the motor driver's rotation speed value, the motor driver's rotation direction, and the data field byte order.
[0011] In one possible implementation, the parsing module is also used to: receive frame construction metadata from the interface interaction module; or, call the frame construction metadata in the template of the configuration module.
[0012] In one possible implementation, the tool further includes a logging module for storing configuration logs of the driver to be configured; and a communication module for communicating with the driver to be configured via a target communication protocol.
[0013] In a third aspect of this application, a driver configuration system based on the Modbus protocol is provided, including any of the above-mentioned driver configuration tools, and further including: a driver to be configured; the driver to be configured is used to receive actual request data from the driver configuration tool and send actual response data to the driver configuration tool.
[0014] In one possible implementation, after the driver to be configured is used to receive actual request data from the driver configuration tool, it is also used to: parse the target communication protocol corresponding to the actual request data and burn the target communication protocol.
[0015] The Modbus protocol-based driver configuration method provided in this application abstracts the data format in the communication protocol into configurable frame construction metadata, and generates actual request data based on the request data in the frame construction metadata. Since the frame construction metadata is user-defined, this configuration method allows users to configure various types of drivers without using configuration tools highly coupled with the driver being configured, resulting in high integration. Furthermore, in the event of driver upgrades, this method can directly generate actual request data based on user needs, eliminating the need for prior upgrades to configuration tools by third parties such as driver developers, thus offering high flexibility and real-time performance. Attached Figure Description
[0016] Figure 1 is a flowchart of a driver configuration method provided in an embodiment of this application; Figure 2 is a schematic diagram of a driver configuration tool provided in an embodiment of this application; Figure 3 is a schematic diagram of the interaction of various modules of a driver configuration tool provided in an embodiment of this application; Figure 4 is a schematic diagram of a motor driver configuration system provided in an embodiment of this application; Figure 5 is a schematic diagram of the information interaction flow of a motor driver configuration system provided in an embodiment of this application; Figure 6 is a schematic diagram of the information interaction flow of another motor driver configuration system provided in an embodiment of this application. Detailed Implementation
[0017] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the embodiments of this application will be further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0018] Referring to Figure 1, this figure is a flowchart of a driver configuration method based on the Modbus protocol provided in an embodiment of this application.
[0019] S101: Generate actual request data conforming to the target communication protocol based on the request data in the frame construction metadata of the user's custom configuration of the target communication protocol. The target communication protocol is the communication protocol corresponding to the driver to be configured.
[0020] Once the target communication protocol for the driver to be configured has been determined, users can customize the data format of the target communication protocol through the request data in the frame construction metadata. For example, if a user has determined the target communication protocol for the driver to be configured based on actual project operation or through data packet capture, they can customize the frame construction metadata corresponding to the target communication protocol through a visual interface.
[0021] S102: Send actual request data to the driver to be configured and receive actual response data from the driver to be configured.
[0022] Specifically, the actual request data generated in S101, conforming to the target communication protocol, is sent to the driver to be configured. The driver to be configured performs configuration based on the actual request data and returns the actual response data. The actual response data from the driver to be configured is received.
[0023] S103: Parse the actual response data based on the response data in the frame construction metadata.
[0024] Specifically, the actual response data from the driver to be configured is parsed and processed based on the response data in the user-defined frame construction metadata in S101.
[0025] S104: If the actual response data is successfully parsed, save the frame construction metadata as a template corresponding to the target communication protocol.
[0026] Specifically, if the actual response data is successfully parsed, it means that the driver to be configured can correctly recognize the actual request message and successfully parse the actual response message from the driver, indicating that the frame construction metadata configured by the user for the target communication protocol is correct. Saving the frame construction metadata as a template corresponding to the target communication protocol makes it convenient to directly call the template when configuring a driver using that communication protocol the next time, which is more convenient.
[0027] The driver configuration method provided in this application can abstract the data format in the communication protocol into configurable frame construction metadata, and generate actual request data based on the request data in the frame construction metadata. Since the frame construction metadata is user-defined, this configuration method allows users to configure various types of drivers without using configuration tools highly coupled with the driver to be configured, resulting in high integration. Furthermore, in the event of driver upgrade requirements, this method can directly generate actual request data according to user needs, without requiring prior upgrades to the configuration tools by third parties such as driver developers, thus offering high flexibility and real-time performance.
[0028] This application does not specifically limit the specific structure of the frame construction metadata. In one possible implementation, both the request data and the response data in the frame construction metadata include multiple configuration items and multiple configuration values, with each configuration item corresponding to a configuration value. The configuration items include a frame boundary identifier, a protocol control field, the byte offset position of the address field, the field length and byte order, the data field structure, and verification configuration information. The data field structure includes the motor driver's rotation speed value, the motor driver's rotation direction, and the data field byte order.
[0029] The following example uses the Modbus RTU protocol as the target communication protocol to illustrate the structure of frame construction metadata. See Table 1 below, which is a schematic table of request data in frame construction metadata based on the Modbus RTU protocol provided in this application embodiment.
[0030] Table 1
[0031] In Table 1, the frame boundary identifiers in the frame construction metadata include a frame start identifier and a frame end identifier. The frame start identifier is the flag indicating the start of the data frame, and the frame end identifier is the flag indicating the end of the data frame. Since the Modbus RTU protocol does not have dedicated frame header and trailer characters, but instead uses idle time to define the start and end of the data frame, the frame start identifier and frame end identifier in the frame construction metadata of the Modbus RTU protocol provided in this embodiment do not have corresponding configuration values. The protocol control field includes the slave address and function code. The slave address is used to uniquely identify the target device, and the function code is used to indicate the type of operation instruction. The byte offset position of the address field includes the starting register address and the number of registers. The starting register address is the address of the first holding register in the slave to be written, and the number of registers is the total number of holding registers to be written. The address offset position in the Modbus protocol is fixed and does not need to be set separately here. The field length and byte order include the number of bytes and the data field byte order, used to describe the length of multi-byte parameters in the data field and their byte arrangement order. The data field structure includes data field variables, which are the parameters to be written to the holding registers.
[0032] This application does not specifically limit the structure of the data field variables. Those skilled in the art can set the structure and values of the data field variables according to actual needs. One possible implementation is that the data field variables in Table 1 include rotation speed and rotation direction.
[0033] The verification configuration information includes the verification algorithm type and the byte order of the verification result. The verification algorithm type is used to specify the algorithm used to perform integrity verification on the frame data; the byte order of the verification result is used to define the byte arrangement order of the multi-byte verification value in the frame.
[0034] Generating actual request data conforming to the target communication protocol based on the request data in the frame construction metadata according to the user's custom configuration of the target communication protocol includes: generating actual request data conforming to the target communication protocol based on the configuration value of the request data in the frame construction metadata. The configuration value is customized by the user according to the corresponding configuration item, and the configuration item is customized by the user according to the target communication protocol.
[0035] Specifically, the configuration items shown in Table 1 are custom configurations obtained by the user according to the Modbus RTU protocol format. Users assign values to these configuration items according to their own needs, and the corresponding configuration values for each item are shown in Table 1. Based on the configuration values shown in Table 1, actual request data conforming to the Modbus RTU protocol can be generated: 01 10 00 0000 02 04 00 64 00 00 B8 73.
[0036] The motor driver configuration method provided in this application includes frame construction metadata comprising multiple configuration items and multiple configuration values. Users can customize configuration items and values according to the target communication protocol, thereby allowing users to flexibly adapt to different communication parameters under various communication scenarios. Moreover, since the configuration items are defined based on the target communication protocol, this configuration method can generate actual request data conforming to the target communication protocol format based on the configuration values. One possible implementation involves parsing the actual response data based on the response data in the frame construction metadata, including: performing frame verification, validation, and data extraction and transformation on the actual response data based on the response data in the frame construction metadata, in order to parse the actual response data.
[0037] Those skilled in the art should understand that the configuration items and values of the response data in the frame construction metadata are similar to those of the request data in the frame construction metadata, and will not be described again here.
[0038] Specifically, the actual response data returned by the driver to be configured conforms to the target communication protocol. Therefore, frame verification such as frame length verification and field validity verification can be performed on the actual response data based on the response data in the frame construction metadata corresponding to the target communication protocol. Furthermore, verification verification such as CRC check can be performed, and various parts of the actual response data can be extracted and compared. For example, when performing a "read" operation, this method can parse the actual response data returned by the driver to be configured based on the response data in the frame construction metadata shown in Table 1 to obtain information such as the motor driver's speed value and rotation direction.
[0039] The motor driver configuration method provided in this application can parse the actual response data based on the response data in the frame construction metadata, so that other steps of the configuration method can directly call the configuration value.
[0040] One possible implementation includes, before generating actual request data conforming to the target communication protocol based on request data in the frame construction metadata of the user's custom configuration of the target communication protocol, receiving the frame construction metadata of the user's custom configuration of the target communication protocol; or, calling the frame construction metadata in the template of the target communication protocol.
[0041] The motor driver configuration method provided in this application does not specifically limit the source of frame construction metadata. The frame construction metadata can be directly input by the user or come from historically saved templates. For templates that have been saved as the target communication protocol, the frame construction metadata in the template can be obtained by directly calling the template, which can improve efficiency, reduce user operation steps, and save time costs.
[0042] In one possible implementation, if the actual response message is successfully parsed, the configuration method further includes: saving the configuration log of the driver to be configured.
[0043] The configuration log includes information such as the sending time, content, and format of the actual request and response data, which can ensure the maintainability and scalability of the motor driver configuration and help to quickly trace and troubleshoot faults.
[0044] In one possible implementation, if the parsing result of the response data includes a configuration success message, the configuration method further includes: communicating with the driver to be configured via a target communication protocol.
[0045] Based on the motor driver configuration method provided in the above embodiments, this application also provides a motor driver configuration tool based on the Modbus protocol.
[0046] Referring to Figure 2, this figure is a schematic diagram of a driver configuration tool based on the Modbus protocol provided in an embodiment of this application. The driver configuration tool shown in Figure 2 includes: an interface interaction module 201, a configuration module 202, a parsing module 203, and a communication module 204.
[0047] In one possible implementation, the configuration tool also includes a logging module 205, a data structure interface module 206, and a public method interface 207.
[0048] The functions of each module in the configuration tool and the interactions between modules will be further explained below with reference to the accompanying drawings.
[0049] Referring to Figure 3, this figure is a schematic diagram of the interaction of various modules of a driver configuration tool provided in an embodiment of this application.
[0050] The interface interaction module 201 is used to receive frame construction metadata for the user's custom configuration of the target communication protocol, where the target communication protocol is the communication protocol corresponding to the driver to be configured. The interface interaction module 201 is also used to display data from the configuration module 202 and the parsing module 203.
[0051] The parsing module 203 generates actual request data conforming to the target communication protocol based on the request data in the frame construction metadata, and parses the actual response data based on the response data in the frame construction metadata. The communication module 204 sends the actual request data to the driver to be configured and receives the actual response data from the driver to be configured. If the parsing result of the response data includes a message indicating that the driver to be configured has been successfully configured, the configuration module 202 saves the frame construction metadata as a template for the target communication protocol. The configuration module 202 is also used to perform import, export, and version management operations on the various templates.
[0052] Specifically, after the parsing module 203 generates the actual request data based on the frame construction metadata, it sends the actual request data to the interface interaction module 201. After the user confirms the actual request data displayed by the interface interaction module 201, the interface interaction module 201 sends the actual request data to the communication module 204. The communication module 204 sends the actual response data from the driver to be configured to the parsing module 203, and the parsing module 203 sends the parsed actual response data to the interface interaction module 201.
[0053] The motor driver configuration tool provided in this application can abstract the data format in the communication protocol into configurable frame construction metadata, and generate actual request data based on the frame construction metadata. Since the frame construction metadata is user-defined, this configuration method allows users to configure various types of drivers without using a configuration tool highly coupled with the driver to be configured, resulting in high integration. Furthermore, in the event of driver upgrade requirements, this method can directly generate actual request data based on user needs, eliminating the need for prior upgrades to the configuration tool by third parties such as the driver developer, thus offering high flexibility and real-time performance.
[0054] One possible implementation involves the interface interaction module generating actual request data conforming to the target communication protocol based on the request data in the frame construction metadata customized by the user for the target communication protocol. This includes: the interface interaction module generating actual request data conforming to the target communication protocol based on the configuration values of the request data in the frame construction metadata; the configuration values are customized by the user according to corresponding configuration items; both the request data and response data in the frame construction metadata include multiple configuration items and multiple configuration values, with each configuration item corresponding to a specific configuration value; the configuration items include a frame boundary identifier, the byte offset position of the address field, the field length and byte order, the data field structure, and verification configuration information; the data field structure includes the motor driver's rotation speed value, the motor driver's rotation direction, and the data field byte order.
[0055] The configuration tool provided in this application embodiment includes frame construction metadata comprising multiple configuration items and multiple configuration values. Users can customize configuration items and values according to the target communication protocol, thereby allowing users to flexibly adapt to different communication parameters in various communication scenarios. Moreover, since the interface interaction module generates actual request data conforming to the target communication protocol based on the configuration values of the request data in the frame construction metadata, and the configuration values are customized by the user according to the corresponding configuration items, and the configuration items are customized by the user according to the target communication protocol, the configuration tool can generate actual request data conforming to the target communication protocol format based on the configuration values.
[0056] One possible implementation, whereby the parsing module parses the actual response data based on the response data in the frame construction metadata, includes: the parsing module performing frame verification, validation, and data extraction and transformation on the actual response data based on the response data in the frame construction metadata, in order to parse the actual response data.
[0057] The configuration tool provided in this application embodiment has a parsing module that can parse the actual response data based on the response data in the frame construction metadata, so that other modules in the configuration tool can directly call the configuration value.
[0058] In one possible implementation, the parsing module is also used to: receive frame construction metadata from the interface interaction module; or, call the frame construction metadata in the template of the configuration module.
[0059] Specifically, in Figure 3, the parsing module 203 can generate actual request data based on the request data in the frame construction metadata in the interface interaction module 201, or the parsing module 203 can call the template saved in the configuration module 202 and generate actual request data based on the request data in the frame construction metadata in the template.
[0060] The configuration tool provided in this application allows frame construction metadata to be directly input by the user or obtained from historically saved templates. For templates already saved as the target communication protocol, the configuration module can directly call the template to obtain the frame construction metadata, which can improve efficiency, reduce user operation steps, and save time.
[0061] In one possible implementation, the configuration tool also includes a logging module, which is used to save configuration logs of the driver to be configured. The configuration logs include information such as the sending time, data content, and data format of the actual request data and the actual response data.
[0062] Specifically, in Figure 3, the log module 205 is used to receive information from the interface interaction module 201, the configuration module 202, the parsing module 203 and the communication module 204. The log module 205 can ensure the maintainability and scalability of the motor driver configuration and help to quickly trace and troubleshoot faults.
[0063] In one possible implementation, the communication module is also used to communicate with the driver to be configured via a target communication protocol.
[0064] In one possible implementation, the configuration tool provided in this application embodiment may further include a data structure interface module and a common method interface module. The data structure interface module is used to unify the data interaction format; the common method interface module is used to implement the reuse of general control logic.
[0065] Based on the configuration tools provided in the above embodiments, this application also provides a motor driver configuration system based on the Modbus protocol. The configuration system includes any of the configuration tools in the above embodiments, and further includes: a driver to be configured.
[0066] Referring to Figure 4, this figure is a schematic diagram of a motor driver configuration system provided in an embodiment of this application.
[0067] In Figure 4, the driver to be configured 10 receives actual request data from the configuration tool 20 and sends actual response data to the configuration tool 20. If the parsed response data includes a configuration success message, the driver to be configured 10 and the configuration tool 20 communicate based on the target communication protocol.
[0068] To enable those skilled in the art to fully understand the information interaction process in the above configuration system, further explanation is provided below in conjunction with the accompanying drawings.
[0069] Referring to Figure 5, this figure is a schematic diagram of the information interaction process of a motor driver configuration system provided in an embodiment of this application.
[0070] The interaction process includes: S501: The parsing module in the configuration tool 20 receives user-defined frame construction metadata from the interface interaction module; or, the parsing module in the configuration tool 20 calls the frame construction metadata in the template of the configuration module.
[0071] S502: The parsing module in configuration tool 20 generates actual request data that conforms to the target communication protocol based on the request data in the frame construction metadata.
[0072] S503: The driver to be configured 10 receives and parses the actual request data from the configuration tool 20.
[0073] S504: The driver to be configured 10 sends the actual response data to the configuration tool 20.
[0074] S505: The parsing module in configuration tool 20 parses the actual response data from the driver to be configured 10 based on the response data in the frame construction metadata.
[0075] S506: If the actual response data is successfully parsed, the configuration tool 20 completes the configuration of the driver 10 to be configured, and the configuration module in the configuration tool 20 saves the current target communication protocol as a template.
[0076] S507: The driver to be configured 10 and the configuration tool 20 communicate via the target communication protocol.
[0077] In one possible implementation, after the driver to be configured receives the actual request data from the driver configuration tool, it is further used to: parse the target communication protocol corresponding to the actual request data and burn the target communication protocol.
[0078] Referring to Figure 6, this figure is a schematic diagram of the information interaction process of another motor driver configuration system provided in an embodiment of this application.
[0079] The difference from Figure 5 is that, in the configuration system shown in Figure 6, after S503 and before S504, it also includes: S508: The driver to be configured 10 identifies and burns the format of the target communication protocol.
[0080] After the driver to be configured 10 completes the identification and burning of the target communication protocol format, the driver to be configured 10 and the configuration tool 20 can communicate based on the target communication protocol.
[0081] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0082] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily 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 this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for configuring a motor driver based on the Modbus protocol, characterized in that, include: Generate actual request data that conforms to the target communication protocol based on the request data in the frame construction metadata of the user's custom configuration of the target communication protocol; The target communication protocol is the communication protocol corresponding to the driver to be configured; Send the actual request data to the driver to be configured, and receive the actual response data from the driver to be configured; The actual response data is parsed based on the response data in the frame construction metadata. If the actual response data is successfully parsed, the frame construction metadata is saved as a template corresponding to the target communication protocol.
2. The method according to claim 1, characterized in that, The request data and response data in the frame construction metadata both include multiple configuration items and multiple configuration values, with each configuration item corresponding to a configuration value. The configuration items include a frame boundary identifier, a protocol control field, the byte offset position of the address field, the field length and byte order, the data field structure, and verification configuration information. The data field structure includes the motor driver's rotation speed value, the motor driver's rotation direction, and the data field byte order. The step of generating actual request data conforming to the target communication protocol based on the request data in the frame construction metadata customized by the user includes: generating actual request data conforming to the target communication protocol based on the configuration value of the request data in the frame construction metadata, wherein the configuration value is customized by the user according to the corresponding configuration item, and the configuration item is customized by the user according to the target communication protocol.
3. The method according to claim 1 or 2, characterized in that, Before generating the actual request data conforming to the target communication protocol based on the request data in the frame construction metadata customized by the user for the target communication protocol, the method further includes: receiving the frame construction metadata customized by the user for the target communication protocol; or, calling the frame construction metadata in the template of the target communication protocol.
4. The method according to any one of claims 1 to 3, characterized in that, If the actual response data is successfully parsed, the method further includes: saving the configuration log of the driver to be configured; and communicating with the driver to be configured through the target communication protocol.
5. A driver configuration tool based on the Modbus protocol, characterized in that, include: Interface interaction module, configuration module, parsing module, and communication module; The interface interaction module is used to receive frame construction metadata for user-defined configuration of the target communication protocol, wherein the target communication protocol is the communication protocol corresponding to the driver to be configured. The parsing module is used to generate actual request data conforming to the target communication protocol based on the request data in the frame construction metadata, and to parse the actual response data from the driver to be configured based on the response data in the frame construction metadata. The communication module is used to send the actual request data to the driver to be configured, and to receive the actual response data from the driver to be configured; If the actual response data is successfully parsed, the configuration module is also used to save the frame construction metadata as a template of the target communication protocol.
6. The tool according to claim 5, characterized in that, The parsing module is used to generate actual request data conforming to the target communication protocol based on the request data in the frame construction metadata customized by the user. This includes: the parsing module generating the actual request data conforming to the target communication protocol based on the configuration values of the request data in the frame construction metadata; the configuration values are customized by the user according to corresponding configuration items; the configuration items are customized by the user according to the target communication protocol; both the request data and the response data in the frame construction metadata include multiple configuration items and multiple configuration values, with each configuration item corresponding to one configuration value; the configuration items include a frame boundary identifier, a protocol control field, the byte offset position of the address field, the field length and byte order, the data field structure, and verification configuration information; the data field structure includes the motor driver's rotation speed value, the motor driver's rotation direction, and the data field byte order.
7. The tool according to claim 5 or 6, characterized in that, The parsing module is also used to: receive the frame construction metadata from the interface interaction module; or, call the frame construction metadata in the template of the configuration module.
8. The tool according to any one of claims 5 to 7, characterized in that, The tool also includes a logging module for storing configuration logs of the driver to be configured; the communication module is further used for communicating with the driver to be configured via the target communication protocol.
9. A driver configuration system based on the Modbus protocol, characterized in that, The driver configuration tool according to any one of claims 5 to 8 further includes: a driver to be configured; the driver to be configured is used to receive actual request data from the driver configuration tool and send actual response data to the driver configuration tool.
10. The system according to claim 9, characterized in that, The driver to be configured is used to receive the actual request data from the driver configuration tool, and is also used to: parse the target communication protocol corresponding to the actual request data, and burn the target communication protocol.