Highly Scalable General Bus Adaptation Method

By defining the global OD configuration file and tooling software for offline configuration in industrial bus communication, the problems of industrial bus communication management difficulties and low R&D efficiency in the existing technology are solved, and the unified and common models of product forms are achieved, which improves R&D efficiency and product promotion speed.

CN119046213BActive Publication Date: 2025-06-13NANJING MOVELASER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411546037.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-01
Publication Date
2025-06-13
Estimated Expiration
2044-11-01

AI Technical Summary

Technical Problem

In the industrial bus communications in the industrial field, the existing technology has problems such as divergent product models, difficulty in management, large R&D investment, long product launch cycle, low efficiency, and inability to efficiently reuse the underlying implementation.

Method used

It provides a high-scaling general bus adaptation method, which can decouple typical industrial bus communication by defining global OD configuration files, piped communication process, and offline configuration through tooling software to achieve unified product forms and common models in different business scenarios.

Benefits of technology

It has achieved unified product forms and common models in different business scenarios, greatly improving R&D efficiency, and providing a technical foundation for rapid promotion of products and batch-based use of multiple scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119046213B_ABST
    Figure CN119046213B_ABST
Patent Text Reader

Abstract

The present invention provides a highly scalable general bus adaptation method. First, a JSON configuration file is generated, and the tooling software reads the JSON configuration file and distributes it to the MB software module. The MB receives the JSON configuration file and responds to the configuration file verification result. The MB parses the JSON configuration file to generate communication OD rules applicable to STM32 parsing and stores and distributes them to STM32. STM32 dynamically generates a global configuration according to the OD rules. Finally, STM32 communicates and interacts with the PLC according to the global configuration of the communication protocol. The present invention decouples the implementation of typical industrial bus communication, pipelines the communication process, and configures the communication content offline, achieving the unity and common model of product forms in different business scenarios, greatly improving the R & D efficiency, and providing a technical basis for the rapid promotion and batch use of products in multiple scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technologies, and specifically to a general bus adaptation method with high scalability. Background Art

[0002] In the industrial field, there are a wide variety of industrial buses, and common communication protocols include Canopen / DP / modbus, etc. Based on each protocol, the definitions of various industries and manufacturers are complex and inconsistent, which greatly restricts the mass promotion of industrial sensing devices. The common communication configuration of lidar is as Figure 1 shown, and the specific structure is as follows:

[0003] 1. The MB (Main Board) of the lidar is based on an embedded architecture, which completes radar algorithms and control, as well as the generation of all data products. Through the communication point table definition generated by tooling software and imported in the form of a configuration, the encapsulation of the communication point table is completed to meet the differentiated requirements of different scenarios.

[0004] 2. The STM23 controller of the lidar completes the underlying protocols of Canopen / DP / modbus, realizing the platformization of the communication protocol. Through interaction with the MB, it obtains the form of the communication protocol and sends the encapsulated specified point table data to the main control of the fan.

[0005] 3. The tooling software, which works offline and is used in the production line or for operation and maintenance, completes the configuration of the communication point table based on the customer's definition through a visual interface and generates a static configuration file, which is imported and solidified in the radar device.

[0006] Although lidar has been widely adopted in the wind power field, in the face of the different customized communication requirements of each main engine factory, most of the current solutions are addressed through the form of communication customization development to adapt to the docking inheritance requirements of different scenarios and customers.

[0007] According to the current prevailing technical solutions, all adopt the form of customized development, and there are the following shortcomings:

[0008] 1. The product models are divergent and difficult to manage.

[0009] 2. There is a lot of customized development, large R & D investment, long product launch cycle, and low efficiency.

[0010] 3. The underlying implementation cannot be efficiently reused, and basic work needs to be frequently built. Summary of the Invention

[0011] To solve the problems of the prior art, the present invention provides a highly scalable general bus adaptation method, which decouples the implementation of typical industrial bus communication, pipelines the communication process, and configures the communication content offline, achieving the unification and common model of product forms in different business scenarios, greatly improving the R & D efficiency, and providing a technical basis for the rapid promotion and batch use of products in multiple scenarios.

[0012] The present invention provides a highly scalable general bus adaptation method, including the following steps:

[0013] 1) Define a global OD configuration and summarize it into a json configuration file;

[0014] 2) The tooling software reads the json configuration file and sends it to the MB software module via the ftp protocol;

[0015] 3) The MB receives the json configuration file sent by the tooling software and responds with the configuration file verification result;

[0016] 4) The MB parses the json configuration file to generate communication OD rules applicable to STM32 parsing and stores them;

[0017] 5) The STM32 requests configuration information, parses and validates it, and stores it. If the operation is normal, it returns the configuration rule version. If it is abnormal, it returns the failure reason;

[0018] 6) The MB sends the communication OD rules to the STM32 via the serial communication protocol, and the STM32 dynamically generates a global configuration according to the OD rules;

[0019] 7) The STM32 communicates and interacts with the PLC according to the global configuration of the communication protocol.

[0020] The OD configuration file in step 1) is designed according to the communication protocol and communication configuration. The communication protocol is Canopen, DP or modbus. The json configuration file in step 1) includes a collection of slave data group objects, a collection of slave data sub-objects, and related attribute definition fields.

[0021] Before the STM32 requests configuration information in step 5), the STM32 polls to determine whether the configuration rule exists. The specific process of polling to determine the configuration rule is as follows:

[0022] When the STM32 has no configuration rule or the communication status is abnormal, the STM32 periodically requests the configuration rule from the MB, and the current STM32 configuration rule is carried in the request message;

[0023] When the STM32 has a configuration rule, when the STM32 periodically requests data, the MB returns a change flag bit in the response to inform the configuration change, and the STM32 immediately requests the configuration information after receiving it.

[0024] The process of the MB in step 6) sending the communication OD rules to the STM32 is as follows:

[0025] 6.1) The MB pushes the STM32 data index list,

[0026] 6.2) The MB pushes the STM32 data list;

[0027] 6.3) The MB organizes the data content to be sent according to the index corresponding to the data list and the configuration rules of the sub-objects in the configuration rules;

[0028] 6.4) The MB stores the data content as a defined global variable for the sending module to send to the STM32.

[0029] The STM32 data processing flow in step 7) is as follows:

[0030] 7.1) The STM32 receives the data mapping rules pushed by the MB;

[0031] 7.2) The STM32 receives the data list pushed by the MB;

[0032] 7.3) The STM32 forms a data list to be sent through the data mapping rules and the data list;

[0033] 7.3) The STM32 obtains the configuration rules of the subindex under the PDO (Process Data Object) through the configuration rules issued by the MB; the PDO is a tree structure, and there are multiple slave indexes under the PDO, and there are multiple subindexes under each slave index;

[0034] 7.4) The STM32 defines a data unit and assigns the data pointer to the subindex object structure;

[0035] 7.5) The STM32 accesses the structure variable to obtain the pushed data content for data sending services.

[0036] The present invention also provides a device for executing a general bus adaptation method with high scalability, which at least includes a processor and a memory. The memory stores computer execution instructions, and the processor executes the computer execution instructions stored in the memory, including data input, data processing, and data output modules, and executes the above-mentioned general bus adaptation method with high scalability.

[0037] The present invention also provides a computer-readable storage medium storing a computer program or instruction, which, when the computer program or instruction is run, implements the above-mentioned general bus adaptation method with high scalability.

[0038] The beneficial effects of the present invention are as follows: decoupling typical industrial bus communication, pipelining the communication process, and offline configuring the communication content, achieving the unification and co-modeling of product forms in different business scenarios, greatly improving the R & D efficiency, and providing a technical basis for the rapid promotion and mass use of products in multiple scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0040] Figure 1 It is a schematic diagram of the communication configuration of the lidar;

[0041] Figure 2 It is a schematic diagram of the overall process of the present invention;

[0042] Figure 3 It is a schematic diagram of the process of downloading the tooling software configuration;

[0043] Figure 4 It is a schematic diagram of the message interaction process between MB and STM32;

[0044] Figure 5 It is a schematic diagram of the STM32 data sending service process. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0046] A specific embodiment of the present invention is as Figure 2 shown (taking Canopen communication as an example), and the specific process is as follows:

[0047] 1. Define the global OD (Object Dictionary) configuration and summarize it into a json configuration file;

[0048] The OD configuration file designs according to the characteristics of the Canopen master-slave bus communication and the communication configuration. The configuration file is mainly in json format. The json format contains a collection of slave data group objects, a collection of slave data sub-objects, and related attribute definition fields. The specific field content and organization method are shown in the following table:

[0049] Key Value version OD configuration file version number, used to manage the configuration file version type OD configuration file protocol type, differentiating Canopen (0), DP (1), modbus (2); slaveindex OD configuration file slavedata configuration object set |slaveindex slavedata object index |slavetype Data type of the slavedata object set |sublist Subdata object set of the slavedata object's sub-objects ||dataname Subdata object data name ||accesstype Read / write type of the sub-sub object data ||datatype Sub-sub object data type ||datasize Sub-sub object data size ||datavalue Sub-sub object data content ||datacoefficient Sub-sub object data coefficient ...

[0050] 2. The tooling software reads the json configuration file and distributes it to the MB software module via the ftp protocol;

[0051] 3. MB parses the json configuration file to generate communication OD rules suitable for STM32 parsing;

[0052] 4. MB distributes the rules to STM32 via the serial communication protocol, and STM32 dynamically generates global configurations according to the OD rules;

[0053] 5. STM32 communicates and interacts with the PLC according to the Canopen global configuration.

[0054] The process of distributing the tooling software configuration is as Figure 3 shown, specifically including:

[0055] 1. The tooling software selects appropriate configuration rules at the interface end, and the file is distributed via ftp;

[0056] 2. MB receives the configuration file and responds with the configuration file verification result;

[0057] 3. MB parses the received configuration json file into configuration rules and stores them;

[0058] 4. STM32 will poll to determine whether the configuration rules exist:

[0059] When STM32 has no configuration rules or the communication status is abnormal, STM32 periodically requests configuration rules from MB, and the current STM32 configuration rules are carried in the request message

[0060] When STM32 has configuration rules, when STM32 periodically requests data, MB returns the change flag bit in the response to inform of configuration changes, and STM32 immediately requests configuration information after receiving it

[0061] 5. STM32 requests configuration information, parses, validates and stores it. If the operation is normal, it returns the configuration rule version. If it is abnormal, it returns the failure reason.

[0062] The message interaction process between MB and STM32 is as shown in the following table and Figure 4 shown, specifically:

[0063] Serial number 1 Version 7 bytes 2 Type 1 byte 3 Slavenum 1 byte (0 - 256) 4 Slaveindex1 2 bytes 5 Slaveindex1Subnum 1 byte 6 Slaveindex1type 1 byte 7 Accesstypesub1 1 byte 8 Datatypesub1 1 byte 9 Sizesub1 1 byte 10 Datavaluesub1 4 bytes 11 Accesstypesub2 1 byte 12 Datatypesub2 1 byte 13 Sizesub2 1 byte 14 Datavaluesub2 4 bytes 15 Slaveindex2 ... ... Slaveindex2num ... crcnum 2 bytes

[0064] 1. MB pushes the STM32 data index list,

[0065] 2. MB pushes the STM32 data list;

[0066] 3. According to the index corresponding to the data list, and then organize the data content to be sent according to the configuration rules of the sub-object in the configuration rules;

[0067] 4. Store the data content as a defined global variable for the sending module to send the data.

[0068] The STM32 data sending service process is as Figure 5 shown, specifically:

[0069] 1. Stm32 receives the data mapping rules pushed by MB, eg: 0x0011, 0x0012, 0x0013, 0x0014, 0x0015;

[0070] 2. Stm32 receives the data list pushed by MB (all uint8 data), eg: 0x11, 0x12, 0x13, 0x14, 0x15;

[0071] 3. The data list and the data mapping rules correspond one by one to get: MapData[0x0011]=0x11, MapData[0x0012]=0x12, MapData[0x0013]=0x13, MapData[0x0014]=0x14, MapData[0x0015]=0x15;

[0072] 4. Through the configuration rules issued by MB, the configuration rule of subindex1 under pdo is {"accesstype":"0","datatype":"0x17","size":"0","datavalue":"0x0011001200150014",} to obtain the data push of this data structure according to the u32 data organized by 0x0011001200150014;

[0073] 5. Define a uint8 dataunit[4] data unit and assign the dataunit pointer to the subindex object structure;

[0074] 6. Canfestival obtains the push data content through accessing the structure variable to perform the data sending service.

[0075] The present invention also provides a device for executing a general bus adaptation method with high scalability, at least including a processor and a memory, the memory stores computer execution instructions, and the processor executes the computer execution instructions stored in the memory, including data input, data processing, and data output modules, to execute the above-mentioned general bus adaptation method with high scalability.

[0076] The present invention also provides a computer-readable storage medium storing a computer program or instructions, which, when run, implement the above-mentioned general bus adaptation method with high scalability.

[0077] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device embodiments, the above are only the preferred embodiments of the present invention. Since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiments. The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. For any person skilled in the art of this technology, any changes or substitutions that can be easily thought of within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention without departing from the principle of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims

1. A highly scalable universal bus adaptation method, characterized in that The following steps are involved: 1) Customers define global OD configurations based on usage scenarios and summarize them into JSON configuration files; 2) The tooling software reads the json configuration file and sends it to the MB software module via the ftp protocol; 3) MB receives the JSON configuration file sent by the tooling software and responds to the configuration file verification result; 4) MB parses the json configuration file to generate and store the communication OD rules suitable for STM32 parsing; 5) STM32 requests configuration information and parses and verifies the storage. If the operation is normal, it returns the configuration rule version. If it is abnormal, it returns the reason for failure. 6) MB sends the communication OD rules to STM32 through the serial communication protocol, and STM32 dynamically generates global configuration according to the OD rules; 7) STM32 communicates with PLC according to the global configuration of the communication protocol. The STM32 data processing flow is as follows: 7.1) STM32 receives the data mapping rules pushed by MB; 7.2) STM32 receives the data list pushed by MB; 7.3) STM32 uses data mapping rules to form a data list to be sent; 7.3) STM32 obtains the configuration rules of subindex under PDO through the configuration rules issued by MB; 7.4) STM32 defines the data unit and assigns the data pointer to the subindex object structure; 7.5) STM32 obtains the push data content by accessing the structure variables to perform data sending services.

2. The highly scalable universal bus adaptation method according to claim 1, characterized in that: Step 1) The OD configuration file is designed according to the communication protocol and communication configuration, and the communication protocol is Canopen, DP or modbus.

3. The highly scalable universal bus adaptation method according to claim 1 or 2, characterized in that: Step 1) The json configuration file includes a slave data group object set, a slave data sub-object set and related attribute definition fields.

4. The highly scalable universal bus adaptation method according to claim 1, characterized in that: Step 5) Before the STM32 requests configuration information, the STM32 polls to determine whether the configuration rule exists.

5. The highly scalable universal bus adaptation method according to claim 4, characterized in that: The specific process of the STM32 polling judgment configuration rule is as follows: When STM32 has no configuration rules or the communication status is abnormal, STM32 timing and MB request configuration rules, and the request message carries the current STM32 configuration rules; When STM32 has configuration rules, when STM32 requests data regularly, MB returns the change flag in the response to inform the configuration change, and STM32 immediately requests configuration information after receiving it.

6. The highly scalable universal bus adaptation method according to claim 1, characterized in that: Step 6) The process of the MB sending the communication OD rule to the STM32 is as follows: 6.1) MB pushes STM32 data index list, 6.2) MB pushes STM32 data list; 6.3) MB forms the data content to be sent according to the index corresponding to the data list and the configuration organization rules of the sub-object in the configuration rules; 6.4) MB stores the data content into defined global variables for the sending module to send to STM32.

7. A device for executing a highly scalable universal bus adaptation method, characterized in that: It at least includes a processor and a memory, the memory stores computer-executable instructions, and the processor executes the computer-executable instructions stored in the memory, including data input, data processing, and data output modules, and executes the highly scalable universal bus adaptation method described in claim 1.

8. A computer-readable storage medium, characterized in that: A computer program or instruction is stored, and when the computer program or instruction is executed, the highly scalable universal bus adaptation method described in claim 1 is implemented.

Citation Information

Patent Citations

  • Method and device for configuring yaml file and medium

    CN115390941A

  • Method for generating analysis rule based on serial port communication bytecode protocol

    CN115801922A