Controller area network bus node address configuration method, device and equipment

By automatically assigning controller LAN bus node addresses, the high error rate problem in traditional methods is solved, achieving accuracy and applicability, and making it suitable for operations in confined spaces.

CN120956554APending Publication Date: 2025-11-14RES INST OF PHYSICAL & CHEM ENG OF NUCLEAR IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511275819.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-08
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

In existing technologies, the CAN bus node address configuration error rate is high, leading to systemic risks such as bus arbitration failure, and traditional methods are not suitable for operation in confined spaces.

Method used

By obtaining the configured address range, the system automatically assigns addresses to node devices. The automatic allocation of node addresses is achieved using the main control module and communication module. Combined with address offset and response frame identification, the accuracy of address configuration is ensured.

Benefits of technology

It enables automatic allocation of controller LAN bus node addresses, reduces configuration error rate, improves configuration accuracy, and is suitable for operation in confined spaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120956554A_ABST
    Figure CN120956554A_ABST
Patent Text Reader

Abstract

The invention provides a controller area network bus node address configuration method, device and equipment, and relates to the field of industrial automation. The method comprises the following steps: acquiring an address range of a configuration address; configuring a first node address for a first node device in the at least one node device according to the target initial address of the address range, and determining an end address corresponding to the first node device; when a second node in the at least one node device accesses the controller local area network bus, the end address of the first node device is configured to the second node device as the initial address of the second node, and when the next node accesses the controller local area network bus, the end address of the first node device is configured to the second node device as the initial address of the second node; and performing address configuration on the next node by taking the end address of the current node as the initial address of the next node until the end address of the next node is equal to or greater than the target end address. According to the scheme of the invention, automatic allocation of the node addresses on the controller area network bus is realized, and the accuracy of address allocation is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation, and in particular to a method, apparatus, and device for configuring the address of a controller area network bus node. Background Technology

[0002] Currently, CAN bus (Controller Area Network bus) is one of the important communication methods in the field of industrial automation. In engineering sites, a multi-master architecture topology design is usually adopted. According to statistics from the International Association of Automation, the number of CAN bus devices deployed in global industrial control networks exceeded 320 million nodes in 2024. The vast majority of these nodes use traditional physical DIP switches or dedicated host computer software for address configuration. Physical DIP switches require manual conversion of decimal target addresses into binary codes. Industrial field tests show that the error rate of non-professionals is as high as 28.7% (N=1500), and incorrect configuration may lead to systemic risks such as bus arbitration failure. On the other hand, using dedicated host computer software for address configuration is not only limited by the size of the computer and the compatibility of the interface, but also unfavorable for operation in confined spaces. Summary of the Invention

[0003] The technical problem to be solved by this invention is to provide a method, apparatus, and device for configuring the address of a controller area network (Controller Area Network) bus node. This enables accurate automatic allocation of node addresses and reduces the address configuration error rate.

[0004] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: An embodiment of the present invention provides a controller local area network (Controller Area Network) bus node address configuration method, applied to a node address configuration device, the method comprising: When at least one node device on the access controller's local area network bus is detected, the address range of the configuration address is obtained; wherein, the address range includes: the target start address and the target end address; Configure a first node address for the first node device in at least one node device according to the target start address of the address range, and determine the end address corresponding to the first node device; When a second node in at least one node device is connected to the controller LAN bus, the end address of the first node device is configured as the start address of the second node device. When the next node is connected to the controller LAN bus, the end address of the current node is configured as the start address of the next node device, until the end address of the next node is equal to or greater than the target end address.

[0005] Optionally, a first node address is configured for a first node device among at least one node device based on the target start address of the address range, and the end address corresponding to the first node device is determined, including: Configure the target starting address of the address range as the first node address to the first node device; Determine the end address corresponding to the first node device based on the first node address and address offset.

[0006] Optionally, the address of the next node can be configured by using the end address of the current node as the start address of the next node, including: Configure the address of the next node based on its starting address and address offset. The starting address of the next node = the ending address of the current node + address offset, and the ending address of the next node = the starting address of the next node + address offset.

[0007] Optionally, the controller area network bus node address configuration method further includes: Read the response frames returned by all node devices on the access controller's LAN bus; Based on the upper and lower limits of the address and the response frame, determine the node information corresponding to each node device on the accessed controller area network bus.

[0008] Optionally, based on the address upper and lower limits and the response frame, the node information corresponding to each node device on the accessed controller area network bus is determined, including: The response frames sent back by each node device are parsed to obtain the first target address corresponding to each node device; The first target address corresponding to each node device is compared with the upper and lower limits of the address to determine the node information corresponding to each node device.

[0009] Optionally, the controller area network bus node address configuration method further includes: When there is only one node device on the access controller's local area network bus, the second target address is received manually and configured to the node device.

[0010] Embodiments of the present invention also provide a controller local area network bus node address configuration device, comprising: The main control module is used to obtain the address range of the configuration address when at least one node device is detected on the controller LAN bus; wherein the address range includes a target start address and a target end address; configure a first node address for a first node device among the at least one node device according to the target start address of the address range, and determine the end address corresponding to the first node device; when a second node among the at least one node device accesses the controller LAN bus, configure the end address of the first node device as the start address of the second node device, and configure the address of the next node as the start address of the next node when the next node accesses the controller LAN bus, until the end address of the next node is equal to or greater than the target end address.

[0011] Optionally, the controller area network bus node address configuration device further includes at least one of the following: The storage module integrated within the main control module is used to store the address range, address offset, and upper and lower limit values ​​of the configuration address; The communication module, which is electrically connected to the main control module, is used to electrically connect to the node devices on the controller local area network bus; The power management module, which is electrically connected to the main control module, is used to provide stable power to the main control module and the communication module. The watchdog module integrated within the main control module is used to monitor the main control module's program.

[0012] The above-described solution of the present invention has at least the following beneficial effects: The controller area network (CAN) bus node configuration method of the present invention includes: when at least one node device is detected accessing the CAN bus, obtaining an address range for configuration addresses; wherein the address range includes a target start address and a target end address; configuring a first node address for a first node device among the at least one node device according to the target start address of the address range, and determining the end address corresponding to the first node device; when a second node among the at least one node device accesses the CAN bus, configuring the end address of the first node device as the start address of the second node device, and configuring the address of the next node as the start address of the next node when the next node accesses the CAN bus, until the end address of the next node is equal to or greater than the target end address. This achieves automatic allocation of node device addresses on the CAN bus, while ensuring the accuracy of address allocation and reducing the address configuration error rate. Attached Figure Description

[0013] Figure 1 This is a flowchart of the controller local area network bus node address configuration method of the present invention; Figure 2 This is a flowchart of the intelligent allocation process for the controller local area network bus node address configuration method of the present invention; Figure 3 This is an automatic identification flowchart of the controller local area network bus node address configuration method of the present invention; Figure 4 This is a flowchart of the manual address writing process for the controller local area network bus node address configuration method of the present invention; Figure 5 This is a schematic diagram of the module structure of the controller local area network bus node address configuration device of the present invention; Figure 6 This is a wiring diagram of the internal circuit of the communication module of the controller local area network bus node address configuration device of the present invention. Detailed Implementation

[0014] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0015] like Figure 1 As shown, an embodiment of the present invention provides a controller local area network (CLAN) bus node address configuration method, applied to a node address configuration device, the method comprising: Step 11: When at least one node device on the access controller's local area network bus is detected, obtain the address range of the configuration address; wherein, the address range includes: the target start address and the target end address; Step 12: Configure a first node address for the first node device in at least one node device according to the target start address of the address range, and determine the end address corresponding to the first node device; Step 13: When the second node in at least one node device is connected to the controller LAN bus, the end address of the first node device is configured as the start address of the second node device. When the next node is connected to the controller LAN bus, the end address of the current node is configured as the start address of the next node device, until the end address of the next node is equal to or greater than the target end address.

[0016] In this embodiment, the node address configuration device includes: a main control module; a storage module integrated within the main control module, the storage module being used to store address configuration parameters; the address configuration parameters include at least one of: address range, address offset of the currently accessed controller area network bus, and address upper and lower limits; wherein, the address range includes: target start address and target end address; a communication module electrically connected to the main control module; and a power management module electrically connected to the main control module, the power management module being used for stable power supply; in use, the communication module is electrically connected to the node devices on the controller area network bus, and the main control module performs intelligent address configuration of the currently connected node devices through the communication module based on the address configuration parameters stored in the storage module.

[0017] In this embodiment, the address configuration parameters can be stored in the storage module as needed. When in use, the main control module directly calls the stored address configuration parameters from the storage module. The controller LAN bus node address configuration method of the present invention realizes the rapid configuration of node device addresses on the controller LAN bus through intelligent address allocation design, while ensuring configuration quality and reducing the address configuration error rate.

[0018] In an optional embodiment of the present invention, step 12 may include: Step 121: Configure the target starting address of the address range as the first node address to the first node device; Step 122: Determine the end address corresponding to the first node device based on the first node address and address offset.

[0019] In this embodiment, the communication module of the node address configuration device is connected to the first node device on the controller local area network bus. The main control module of the node address configuration device configures the target start address in the address configuration parameters as the start address of the first node device, i.e., the first node address, through the communication module, and then disconnects the first node device. After using the target start address of the address range as the start address of the first node device, the end address of the first node device is determined according to the address offset of the first node device. The end address corresponding to the first node device = the first node address + the address offset of the currently accessed controller local area network bus. Specifically, assuming the start address of the first device node is 1 and the address offset is 2, the corresponding end address is 1 + 2 = 3. The address offset can be set according to requirements.

[0020] In an optional embodiment of the present invention, step 13, configuring the address of the next node by using the end address of the current node as the start address of the next node, includes: Step 131: Configure the address of the next node according to the starting address and the address offset of the next node. The starting address of the next node = the ending address of the current node + the address offset, and the ending address of the next node = the starting address and the address offset of the next node.

[0021] In this embodiment, before intelligent address allocation, it is first necessary to obtain the node addresses that the current Controller Area Network (CLAN) bus node devices need to be allocated. Then, all obtained node addresses are stored in the storage module, and the target start address, target end address, and address offset are set. The target start address refers to the minimum number of nodes on the CLAN bus, which is usually set to 1. The address offset refers to the interval between two node addresses; for example, when the first node address is 1 and the second node address is 3, the address offset is 3-1=2. The target end address refers to the maximum number of nodes on the CLAN bus, which generally does not exceed 128. During intelligent address allocation, when a single node is connected, the device writes the target start address to the node device. When the node is disconnected, the device calculates the next target address based on the address offset and automatically writes the target address to the next node device when the next node is connected. This process is repeated until the end address of the connected node device is greater than the target end address. This design can be used for writing addresses of a large number of node devices before they leave the factory.

[0022] In this embodiment, such as Figure 2 As shown, in specific implementation, the main control module of the node address configuration device determines the target address to be configured for the next node device based on the first address configured for the first node device and the address offset in the address configuration parameters, using a preset formula: the start address of the next node = the end address of the current node + the address offset, and the end address of the next node = the start address of the next node + the address offset. Then, the communication module of the node address configuration device connects to the next node device on the controller local area network bus and determines whether the target address to be configured for the next node device is greater than the target start address and less than the target end address. If it is greater than the target start address and less than the target end address, the target address is configured for the currently connected node device, and the node device is disconnected after configuration. The target address to be configured for the next node device is recalculated, and it is determined whether the next target address is greater than the target start address and less than the target end address, until the target address is greater than or equal to the target end address, at which point the end address is configured.

[0023] In an optional embodiment of the present invention, the controller local area network bus node address configuration method further includes: Step 14: Read the response frames returned by all node devices on the access controller LAN bus; Step 15: Determine the node information corresponding to each node device on the accessed controller LAN bus based on the address upper and lower limits and the response frame.

[0024] In this embodiment, steps 14 and 15 are mainly used to identify the addresses of the node devices on the controller LAN bus that have been configured with addresses, thereby enabling the troubleshooting of the addresses of the node devices on the current controller LAN bus, ensuring that the node address of each node device is successfully configured and is the correct address, and facilitating quick query of on-site faults.

[0025] In an optional embodiment of the present invention, step 15 may include: Step 151: Parse the response frames returned by each node device to obtain the first target address corresponding to each node device; Step 152: Compare the first target address corresponding to each node device with the upper and lower limits of the address to determine the node information corresponding to each node device.

[0026] In this embodiment, step 152 specifically involves comparing the first target address corresponding to each node device with the upper and lower limit values ​​of the address. When the first target address corresponding to the current node device is within the range of the upper and lower limit values, the current node device is determined to be an installed node, and the address information corresponding to the current node device is output. When the first target address corresponding to the current node device is not within the range of the upper and lower limit values, the current node device is determined to be an uninstalled node, and the address information corresponding to the current node device is output. Wherein, the first target address corresponding to the current node device not being within the range of the upper and lower limit values ​​includes: the first target address being a null value or exceeding the range of the upper and lower limit values.

[0027] In this embodiment, such as Figure 3 As shown, in specific implementation, the upper and lower limit values ​​of the addresses corresponding to the node devices on the currently connected controller area network bus are first stored in the storage module. When the communication module connects to a single node device, the main control module sends address read commands to the single connected node device cyclically through the communication module and obtains the response frames fed back by the connected node device. By parsing the response frames, the node address information of the currently connected node device is obtained. When the communication module connects to a controller area network bus with multiple node devices, the main control module sends address read commands to the connected controller area network bus cyclically through the communication module according to the upper and lower limit values ​​of the address configuration parameters, and obtains the response frames fed back by the connected controller area network bus. By parsing the response frames, the address information of the installed nodes and the address information of the uninstalled nodes on the currently connected controller area network bus are obtained. In this embodiment, when there is only one node device on the controller LAN bus, the single node device can be directly connected for automatic device address identification. When there are multiple node devices on the controller LAN bus, the communication module is directly connected to the controller LAN bus to automatically identify all node devices on the controller LAN bus. In this embodiment, the response frame consists of a frame ID and data bits. For example, when the first byte of the data bits is 0x01, it represents a node address of 1. The address upper and lower limits are determined based on the address of the node device on the controller LAN bus that needs to be identified before identification. The configuration is set by using the maximum value of the device address on the current controller LAN bus as the upper limit and the minimum value as the lower limit. For example, if the upper limit of the node device address on a controller LAN bus is known to be 20 and the lower limit is 1, then the upper limit of 20 and the lower limit of 1 are pre-written into the configuration device. During identification, the configuration device will send instructions to read addresses 1-20 to the controller LAN bus in a loop. If the return data for address 1 is received, it means that node address 1 has been installed. If the return data for address 1 is not received, it means that node address 1 has not been installed. The judgment of other installed and uninstalled node addresses is the same as the judgment of address 1.

[0028] In an optional embodiment of the present invention, the controller local area network bus node address configuration method further includes: Step 16: When there is only one node device on the access controller's local area network bus, receive the manually input second target address and configure the second target address to the node device.

[0029] In this embodiment, step 16 is mainly used to directly configure a specific address for a single node device; the specific implementation process is as follows: Figure 4 As shown, the process includes: connecting the communication module of the node address configuration device to a single node device, manually inputting the node address through a touch screen, sending the written node address to the single connected node device through the main control module, and directly configuring the currently written node address into the currently connected node device.

[0030] like Figure 5 As shown, embodiments of the present invention also provide a controller local area network bus node address configuration device, comprising: The main control module is used to obtain the address range of the configuration address when at least one node device is detected on the controller LAN bus; wherein the address range includes a target start address and a target end address; configure a first node address for a first node device among the at least one node device according to the target start address of the address range, and determine the end address corresponding to the first node device; when a second node among the at least one node device accesses the controller LAN bus, configure the end address of the first node device as the start address of the second node device, and configure the address of the next node as the start address of the next node when the next node accesses the controller LAN bus, until the end address of the next node is equal to or greater than the target end address.

[0031] In an optional embodiment of the present invention, the controller local area network bus node address configuration device further includes at least one of the following: The storage module integrated within the main control module is used to store the address range, address offset, and upper and lower limit values ​​of the configuration address; The communication module, which is electrically connected to the main control module, is used to electrically connect to the node devices on the controller local area network bus; The power management module, which is electrically connected to the main control module, is used to provide stable power to the main control module and the communication module. The watchdog module integrated within the main control module is used to monitor the main control module's program.

[0032] A touchscreen electrically connected to the main control module, the touchscreen being used for data interaction with the main control module.

[0033] In this embodiment, during use, the communication module is electrically connected to the node devices on the controller's local area network bus. The main control module, based on the address configuration parameters in the storage module and the preset standard frame protocol, manually writes, automatically identifies, or intelligently configures the addresses of the currently connected node devices through the communication module. The core of the main control module is an HC32F460 microprocessor, powered by 3.3V, and the microprocessor integrates a CAN controller. The main control module connects to the communication module through the CAN controller to realize the identification, writing, and intelligent configuration of CAN node device addresses. Simultaneously, it connects to the touchscreen through the IIC interface to complete data interaction and realize functions such as function selection and address display. To reduce design costs and overall power consumption, both the storage module and the watchdog module are implemented as on-chip peripherals of the microprocessor, i.e., integrated within the microprocessor. The storage module is used to store the start address, end address, and other information. The device includes inherent parameters such as address, address offset, and address upper and lower limits. The watchdog module is used for program monitoring to improve the device's fault tolerance. Program monitoring refers to the automatic program reset and exit from an infinite loop. The communication module uses a TD331SCANH CAN transceiver to convert TTL levels to differential level signals for the controller's local area network (LAN) bus, achieving 2500VDC electrical isolation and remote communication. The power management module consists of an 18650 lithium battery pack and a TPS73633 power conversion chip. The 18650 lithium battery pack is connected in parallel to effectively extend the device's battery life. Since the lithium battery output voltage is approximately 3.7V, while all modules in the system use 3.3V power, the TPS73633 power conversion chip can convert the battery voltage to a standard 3.3V voltage, ensuring stable power supply to other modules.

[0034] In this embodiment, the touchscreen uses a 5-inch LCD screen from Shenzhen Hongda LCD Technology Co., Ltd. This type of LCD screen has a total power consumption of only 0.4W and can achieve data interaction with the main control module through the IIC interface. The touchscreen is designed to enable manual writing of node addresses to connected node devices. This function is only used when a single CAN node device is connected. The user manually inputs the address number through the touchscreen as needed and writes it to the node device. In this embodiment, the controller local area network (CAN) bus node address configuration device integrates multiple modules to simultaneously achieve three functions: automatic identification of CAN bus node addresses, manual writing of addresses to node devices, and intelligent address allocation. During use, different functions can be selected according to requirements. For automatic address identification, there are two types: when the device connects to a single CAN node device, it can automatically identify the address of the current node; secondly, when the device connects to multiple node devices, it can identify the addresses of installed and uninstalled devices based on preset address upper and lower limits, facilitating rapid troubleshooting in the field.

[0035] In an optional embodiment of the present invention, the preset standard frame protocol includes: Master / slave identifier, function code, and preset address information; The master-slave identifier is used to indicate the transmission and reception of signals; the preset address information is used to indicate the address information that the node device of the current controller LAN bus needs to write, set, or read; and the function code is used to indicate at least one of the following operations: address reading, address writing, and address setting, performed on the currently connected node device through the preset address information.

[0036] In this embodiment, the main control module communicates data through a preset standard frame protocol. The preset standard frame identifier is 11 bits long, and its specific definition is shown in Table 1, the preset standard frame protocol table. Table 1. Preset Standard Frame Protocol Table

[0037] The master / slave identifier is defined as follows: when ID10=1, it indicates that the device is sending data to the CAN node device; when ID10=0, it indicates that the CAN node device is sending data to the device. The function codes include: a first function code ID6, a second function code ID7, a third function code ID8, and a fourth function code ID9. When ID6=ID7=ID8=ID9=0, it indicates that the device is reading the address from the CAN node device. When ID6=1 and ID7=ID8=ID9=0, it indicates that the CAN node device has returned a successful address read, and the address information is contained in ID0~ID5. When ID6=1, ID7=0, ID8=1, and ID9=0, it indicates that the CAN node device has returned a failed address read, and the address information is contained in ID0~ID5. When ID6=1... When ID7=1, ID8=ID9=0, it indicates that the device is sending an address setting function to the CAN node device, and the address information is contained in ID0~ID5; when ID6=1, ID7=1, ID8=1, ID9=0, it indicates that the CAN node device is sending an address setting success function to the device, and the address information is contained in ID0~ID5; when ID6=1, ID7=1, ID8=1, ID9=1, it indicates that the CAN node device is sending an address setting failure function to the device, and ID0~ID5 are meaningless in this case; the address information includes: the first address information ID0 to the sixth address information ID5, which represent the address information to be written / set / read. For example, when ID5=ID4=ID3=ID2=ID1=0, it means that the address to be written or read is 0.

[0038] In an optional embodiment of the present invention, the communication module is provided with a CAN transceiver, the main control module is provided with a CAN controller, the first pin of the CAN transceiver is electrically connected to the power management module, the second pin is grounded, the eleventh pin is electrically connected to the receive data pin of the CAN controller of the main control module, the twelfth pin is electrically connected to the transmit data pin of the CAN controller of the main control module, and the fifth and sixth pins are electrically connected to the node devices on the controller local area network bus.

[0039] In this embodiment, as Figure 6 As shown, the communication module is a control circuit with a CAN transceiver as its core. The CAN transceiver is a Mornsun TD331SCANH type CAN transceiver. The first pin of the CAN transceiver is connected to the power management module VCC; the second pin is grounded (GND); the eleventh pin is connected to the main control module's receive data pin CANRX; the twelfth pin is connected to the main control module's transmit data pin CANTX; and the fifth and sixth pins are the CANL and CANH pins, respectively, used to connect to the controller's local area network bus node.

[0040] The controller local area network bus node address configuration device of the present invention implements the data storage module and watchdog module design through the on-chip function of the microprocessor, which reduces the overall power consumption and design cost of the device; by designing address recognition, address writing and intelligent address allocation functions, it realizes fault diagnosis and rapid configuration of controller local area network bus node addresses, and has the advantages of small size, easy portability and easy operation in confined spaces.

[0041] It should be noted that this device is the same as the method described above. All implementations of the method described above are applicable to the embodiments of this device and can achieve the same technical effect.

[0042] Embodiments of the present invention also provide a computing device, including: a memory and a processor storing a computer program, wherein the computer program, when executed by the processor, performs the above-described method. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.

[0043] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described method. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.

[0044] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0045] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0046] In the embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0047] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0048] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0049] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0050] Furthermore, it should be noted that in the apparatus and method of the present invention, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered equivalent solutions of the present invention. Moreover, the steps performing the above series of processes can naturally be executed in the order described, but are not necessarily required to be executed in chronological order; some steps can be executed in parallel or independently of each other. Those skilled in the art will understand that all or any step or component of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or network of computing devices, in hardware, firmware, software, or a combination thereof. This is something that those skilled in the art can achieve by using their basic programming skills after reading the description of the present invention.

[0051] Therefore, the object of the present invention can also be achieved by running a program or a set of programs on any computing device. The computing device can be a known general-purpose device. Therefore, the object of the present invention can also be achieved simply by providing a program product containing program code implementing the method or apparatus. That is, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any known storage medium or any storage medium developed in the future. It should also be noted that in the apparatus and method of the present invention, it is obvious that the components or steps can be decomposed and / or recombined. These decompositions and / or recombinations should be considered equivalent to the present invention. Furthermore, the steps performing the above series of processes can naturally be performed in the order described, but are not necessarily required to be performed in chronological order. Some steps can be performed in parallel or independently of each other.

[0052] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for configuring the address of a controller area network (Controller Area Network) bus node, characterized in that, Applied to a node address configuration device, the method includes: When at least one node device on the access controller's local area network bus is detected, the address range of the configuration address is obtained; wherein, the address range includes: the target start address and the target end address; Configure a first node address for the first node device in at least one node device according to the target start address of the address range, and determine the end address corresponding to the first node device; When a second node in at least one node device is connected to the controller LAN bus, the end address of the first node device is configured as the start address of the second node device. When the next node is connected to the controller LAN bus, the end address of the current node is configured as the start address of the next node device, until the end address of the next node is equal to or greater than the target end address.

2. The controller local area network bus node address configuration method according to claim 1, characterized in that, Configure a first node address for a first node device among at least one node device based on the target start address of the address range, and determine the end address corresponding to the first node device, including: Configure the target starting address of the address range as the first node address to the first node device; Determine the end address corresponding to the first node device based on the first node address and address offset.

3. The controller local area network bus node address configuration method according to claim 1, characterized in that, Configure the address of the next node by using the end address of the current node as the start address of the next node, including: Configure the address of the next node based on its starting address and address offset. The starting address of the next node = the ending address of the current node + address offset, and the ending address of the next node = the starting address of the next node + address offset.

4. The controller local area network bus node address configuration method according to claim 1, characterized in that, Also includes: Read the response frames returned by all node devices on the access controller's LAN bus; Based on the upper and lower limits of the address and the response frame, determine the node information corresponding to each node device on the accessed controller area network bus.

5. The controller local area network bus node address configuration method according to claim 4, characterized in that, Based on the address upper and lower limits and the response frame, determine the node information corresponding to each node device on the accessed controller area network bus, including: The response frames sent back by each node device are parsed to obtain the first target address corresponding to each node device; The first target address corresponding to each node device is compared with the upper and lower limits of the address to determine the node information corresponding to each node device.

6. The controller local area network bus node address configuration method according to claim 1, characterized in that, Also includes: When there is only one node device on the access controller's local area network bus, the second target address is received manually and configured to the node device.

7. A controller local area network (LAN) bus node address configuration device, characterized in that, include: The main control module is used to obtain the address range of the configuration address when at least one node device is detected on the controller LAN bus; wherein the address range includes a target start address and a target end address; configure a first node address for a first node device among the at least one node device according to the target start address of the address range, and determine the end address corresponding to the first node device; when a second node among the at least one node device accesses the controller LAN bus, configure the end address of the first node device as the start address of the second node device, and configure the address of the next node as the start address of the next node when the next node accesses the controller LAN bus, until the end address of the next node is equal to or greater than the target end address.

8. The controller local area network bus node address configuration device according to claim 7, characterized in that, It also includes at least one of the following: The storage module integrated within the main control module is used to store the address range, address offset, and upper and lower limit values ​​of the configuration address; The communication module, which is electrically connected to the main control module, is used to electrically connect to the node devices on the controller local area network bus; The power management module, which is electrically connected to the main control module, is used to supply power to the main control module and the communication module; The watchdog module integrated within the main control module is used to monitor the main control module's program.

9. A computing device, characterized in that, include: A memory, a processor storing a computer program, wherein the computer program, when executed by the processor, performs the method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, A storage instruction that, when executed on a computer, causes the computer to perform the method as described in any one of claims 1 to 6.