ID configuration system and method for devices in CAN bus network

By adding I/O interfaces to devices in the CAN bus network and using power modules to control their power acquisition to generate data addresses, the problem of device ID configuration errors and low efficiency is solved, and the automatic configuration and efficient configuration of device ID are realized.

CN115277293BActive Publication Date: 2025-02-18JIANGSU HENGLI HYDRAULIC TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210884219.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2025-02-18
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

In CAN bus network, the device's ID configuration is prone to configuration errors and low configuration efficiency, especially when the device fails to replace, due to insufficient understanding of the bus by market personnel, there may be ID configuration errors.

Method used

By adding a first I/O interface and a second I/O interface to the device, the power supply module is used to control the power supply of the interface pins, and the data address is generated, and transmitted to the upper computer through the CAN bus, which allocates the device according to the data address. ID.

Benefits of technology

Automatic configuration of device ID is realized, which improves configuration efficiency and accuracy, and reduces the possibility of ID configuration errors when device replacement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115277293B_ABST
    Figure CN115277293B_ABST
Patent Text Reader

Abstract

The present invention provides an ID configuration system and method for devices in a CAN bus network, the system comprising: a host computer, a CAN bus, a plurality of devices and a power module, the host computer is connected to each device via the CAN bus, each device comprises a first I / O interface, the first I / O interface comprises a plurality of pins, wherein the power module is used to control whether each pin of the first I / O interface is powered or not powered; the device is used to generate a first data address according to the power supply status of its first I / O interface, and transmit the first data address to the host computer via the CAN bus; the host computer is used to receive the first data address from the device, obtain the ID of the device according to the first data address, and send the ID to the device via the CAN bus. Thus, the ID of the device is automatically configured according to the power supply status of the I / O interface, which is conducive to more conveniently realizing the automatic configuration of the ID when replacing the device, and can improve the configuration efficiency and configuration accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of CAN bus, and in particular to an ID configuration system for equipment in a CAN bus network and an ID configuration method for equipment in a CAN bus network. Background Art

[0002] At present, when multiple devices are connected to a host computer through a CAN (Controller Area Network) bus, in order to configure different ID (Identifier) ​​addresses for different CAN devices, the relevant technology relies on the host computer to configure the ID addresses one by one. At the same time, when one or more devices fail and need to be replaced during market applications, there may be problems such as ID configuration errors and low configuration efficiency due to insufficient understanding of the bus by market personnel. Summary of the invention

[0003] The present invention proposes the following technical solution to solve the problem of easy configuration errors and low configuration efficiency in ID configuration in the related art.

[0004] The first aspect of the present invention proposes an ID configuration system for devices in a CAN bus network, comprising: a host computer, a CAN bus, multiple devices and a power module, wherein the host computer is connected to each of the devices through the CAN bus, each of the devices comprises a first I / O interface, the first I / O interface comprises multiple pins, wherein the power module is used to control whether each pin of the first I / O interface is powered or not; the device is used to generate a first data address according to the power status of its own first I / O interface, and transmit the first data address to the host computer through the CAN bus; the host computer is used to receive the first data address from the device, obtain the ID of the device according to the first data address, and send the ID to the device through the CAN bus.

[0005] In addition, the ID configuration system for devices in a CAN bus network according to the above-mentioned embodiment of the present invention may also have the following additional technical features.

[0006] According to one embodiment of the present invention, when the power module is connected to the pins of the first I / O interface through the first wiring harness, the pins of the first I / O interface are powered, and when the power module is not connected to the pins of the first I / O interface, the pins of the first I / O interface are not powered.

[0007] According to one embodiment of the present invention, each of the devices further includes a second I / O interface, the second I / O interface includes a plurality of pins, the number of pins of the second I / O interface is the same as the number of pins of the first I / O interface, and the power module is further used to control whether each pin of the second I / O interface is powered or not, wherein the power supply condition of the second I / O interface is the same as the power supply condition of the first I / O interface; when the device transmits the first data address to the host computer through the CAN bus, it is specifically used to: generate a second data address according to the power supply condition of its own second I / O interface, and determine whether its own first data address is the same as the second data address; if the first data address is the same as the second data address, transmit the first data address to the host computer through the CAN bus; if the first data address is not the same as the second data address, issue a fault prompt.

[0008] According to one embodiment of the present invention, when the device generates a first data address according to the power supply status of its own first I / O interface, it is specifically used to: generate a first binary code according to the power supply status of all pins of its own first I / O interface, and all values ​​of the first binary code correspond one-to-one to all pins of the first I / O interface, wherein when the pins of the first I / O interface are powered, the corresponding value of the first binary code is assigned to a first preset value; when the pins of the first I / O interface are not powered, the corresponding value of the first binary code is assigned to a second preset value, and the first preset value is different from the second preset value.

[0009] According to one embodiment of the present invention, when the device generates a second data address according to the power supply status of its own second I / O interface, it is specifically used to: generate a second binary code according to the power supply status of all pins of its own second I / O interface, and all values ​​of the second binary code correspond one-to-one to all pins of the second I / O interface, wherein when the pins of the second I / O interface are powered, the corresponding value of the second binary code is assigned to the first preset value; when the pins of the second I / O interface are not powered, the corresponding value of the second binary code is assigned to the second preset value.

[0010] According to an embodiment of the present invention, when obtaining the ID of the device according to the first data address, the host computer is specifically configured to: convert the first binary code into a one-bit octal code to obtain the ID of the device.

[0011] According to an embodiment of the present invention, the number of pins of the first I / O interface and the number of pins of the second I / O interface are 3, and the first binary code and the second binary code are 3-bit binary codes.

[0012] According to an embodiment of the present invention, the number of pins of the first I / O interface and the number of pins of the second I / O interface are 4, and the first binary code and the second binary code are four-bit binary codes.

[0013] The second aspect of the present invention proposes an ID configuration method for a device in a CAN bus network, which is applied to the ID configuration system for a device in a CAN bus network proposed in the first aspect of the present invention. The method includes the following steps: a power module controls whether each pin of the first I / O interface is powered or not; the device generates a first data address according to the power status of its own first I / O interface, and transmits the first data address to a host computer through the CAN bus; the host computer receives the first data address from the device, obtains the ID of the device according to the first data address, and sends the ID to the device through the CAN bus.

[0014] Furthermore, before transmitting the first data address to the host computer via the CAN bus, it also includes: the power module controls whether each pin of the second I / O interface is powered or not, wherein the power supply condition of the second I / O interface is the same as the power supply condition of the first I / O interface; transmitting the first data address to the host computer via the CAN bus includes: the device generates a second data address according to the power supply condition of its own second I / O interface, and determines whether its own first data address is the same as the second data address; if the first data address is the same as the second data address, transmitting the first data address to the host computer via the CAN bus; if the first data address is not the same as the second data address, a fault prompt is given.

[0015] The technical solution of the embodiment of the present invention controls each pin of the first I / O interface to be powered or not powered through the power module, the device generates a first data address according to the power supply status of its own first I / O interface, and transmits the first data address to the host computer through the CAN bus, the host computer obtains the ID of the device according to the first data address, and sends the ID to the device through the CAN bus. Thus, the ID of the device is automatically configured according to the power supply status of the I / O interface, which is conducive to more conveniently realizing the automatic configuration of the ID when replacing the device, and can improve the configuration efficiency and configuration accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 The present invention is a block diagram of an ID configuration system for a device in a CAN bus network according to an embodiment of the present invention.

[0017] Figure 2 The present invention is a block diagram of a device connected in a CAN network according to an embodiment of the present invention.

[0018] Figure 3 This is a diagram for comparing and reading dual redundant I / O port address data according to an embodiment of the present invention.

[0019] Figure 4 This is a schematic diagram of the installation of an 8-bus valve group according to an example of the present invention.

[0020] Figure 5 The present invention is a flowchart of a method for configuring an ID of a device in a CAN bus network according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0022] Figure 1 The present invention is a block diagram of an ID configuration system for a device in a CAN bus network according to an embodiment of the present invention.

[0023] like Figure 1 As shown, the ID configuration system of the device in the CAN bus network includes a host computer 1, a CAN bus 2, multiple devices 3 and a power module 4. The host computer 1 is connected to each device 3 through the CAN bus 2. Each device 3 includes a first I / O interface 31. The first I / O interface 31 includes multiple pins 1.1 to 1.n, where n is an integer greater than 1. For example, when n is 2, the first I / O interface 31 includes two pins 1.1 and 1.2. When n is 3, the first I / O interface 31 includes three pins 1.1, 1.2 and 1.3.

[0024] Among them, the power module 4 is used to control whether each pin of the first I / O interface 31 is powered or not; the device 3 is used to generate a first data address according to the power supply status of its own first I / O interface 31, and transmit the first data address to the host computer 1 through the CAN bus 2; the host computer 1 is used to receive the first data address from the device 3, obtain the ID of the device 3 according to the first data address, and send the ID to the device 3 through the CAN bus 2.

[0025] Specifically, in actual applications, first, the power module 4 controls whether each pin of the first I / O interface 31 of each device is powered or not, and then each device 3 obtains the power status of its own first I / O interface 31, that is, whether all pins are powered. After that, the device 3 generates its own first data address according to the power status, and transmits the first data address to the host computer 1 through the CAN bus 2. After receiving the first data address from the device 3, the host computer 1 obtains the ID corresponding to the device 3 according to the first data address, and sends the ID to the device through the CAN bus 2.

[0026] Among them, when the power module 4 is connected to the pins of the first I / O interface 31 through the first wiring harness, the pins of the first I / O interface 31 are powered, and when the power module is not connected to the pins of the first I / O interface 31, the pins of the first I / O interface 31 are not powered.

[0027] Based on the above description, it can be known that compared with the related art, the embodiment of the present invention adds a first I / O interface to form a data address pin, generates a first data address according to the power supply status of the interface, and allocates the current ID address through the first data address, thereby avoiding the work of the upper computer changing the ID address alone when used in large quantities. After repairing or replacing equipment or programs in the market, you only need to plug in the original plug to realize the original address allocation, and there is no need to change the ID again.

[0028] It should be noted that with the rapid development of construction machinery, the application safety requirements of construction machinery are becoming higher and higher, and functional safety and logical safety have become the main indicators for the safe use of construction machinery. As a new field of safe application of construction machinery, CAN bus valves can quickly respond to valve core displacement instructions, monitor valve core displacement in real time, and adjust input and output displacement signal errors in real time. Especially in application fields such as high-altitude operations and precise position control operations, bus control valves are favored by users for their safety and accuracy. When multiple bus valves are used together to form a bus valve group, the functional requirements for automatic addressing / matching of bus valve ID addresses are becoming increasingly urgent.

[0029] Most of the existing bus valve control technologies do not have the function of automatic ID address matching. They rely on a dedicated host computer to change the ID address. When a bus valve group consists of multiple bus valves, the ID of each bus valve needs to be changed one by one to complete the communication between the valve group and the vehicle PLC. At the same time, when one or more bus valves fail and need to be replaced during market applications, there may be problems such as ID configuration errors due to the market personnel's lack of understanding of the bus.

[0030] Therefore, the device of the embodiment of the present invention can be a CAN bus valve, and the current bus valve ID address is configured through the power supply of the I / O interface. First, the bus valve group and the bus valve group wiring harness are designed according to the required number of bus valves, and the designed valve group and wiring harness are matched and installed to realize the automatic allocation of the ID address of the entire valve group. No matter which bus valve is removed, the PLC immediately detects that there is no corresponding bus valve, alarms and prompts the lack of corresponding valve information, arbitrarily swaps the valve receivers in the bus valve group, plugs in the bus wiring harness plug, and the I / O interface of the bus valve forms a data address according to the power supply situation and sends it to the host computer, and then the ECU (Electronic Control Unit) processor in the host computer allocates the current ID according to the data address, ensuring automatic and efficient matching of the ID. The built-in CPU of the bus valve calls the built-in ID according to the first data address and allocates the current bus valve address.

[0031] The ID configuration system of the device in the CAN bus network of the embodiment of the present invention realizes automatic configuration of the ID of the device according to the power supply status of the I / O interface, which is conducive to more convenient automatic configuration of the ID when replacing the device, and can improve configuration efficiency and configuration accuracy.

[0032] In one embodiment of the present invention, Figure 2 As shown, each device also includes a second I / O interface 32, the second I / O interface 32 includes multiple pins 2.1 to 2.n, the number of pins of the second I / O interface 32 is the same as the number of pins of the first I / O interface 31, wherein the power module 4 is also used to control whether each pin of the second I / O interface 32 is powered or not, and the power supply condition of the second I / O interface 32 is the same as the power supply condition of the first I / O interface; when the device 3 transmits the first data address to the host computer through the CAN bus, it is specifically used to: generate a second data address according to the power supply condition of its own second I / O interface 32, and determine whether its own first data address is the same as the second data address; if the first data address is the same as the second data address, transmit the first data address to the host computer 1 through the CAN bus; if the first data address is not the same as the second data address, a fault prompt is given.

[0033] It should be noted that, in the embodiment of the present invention, the two I / O interfaces in the device 3 are respectively referred to as the first I / O interface and the second I / O interface, the wiring harness corresponding to the first I / O interface is referred to as the first wiring harness, the wiring harness corresponding to the second I / O interface is referred to as the second wiring harness, the data address obtained according to the power supply status of the first I / O interface is referred to as the first data address, and the data address obtained according to the power supply status of the second I / O interface is referred to as the second data address.

[0034] Specifically, in order to fully ensure the safety and reliability of the automatic configuration of the ID configuration, a second I / O interface 32 is added to realize a dual redundant I / O interface. The second I / O interface 32 is used for redundancy comparison with the second I / O interface 31 to prevent the interface fault address error. Each group of I / O includes multiple pins, and all the pins of the two groups of I / O interfaces together constitute the data address, and the internal program ID address is called according to the final output data.

[0035] In one embodiment of the present invention, when device 3 generates a first data address according to the power supply status of its own first I / O interface, it is specifically used to: generate a first binary code according to the power supply status of all pins of its own first I / O interface, and all values ​​of the first binary code correspond one-to-one to all pins of the first I / O interface, wherein, when the pins of the first I / O interface are powered, the corresponding value of the first binary code is assigned to a first preset value; when the pins of the first I / O interface are not powered, the corresponding value of the first binary code is assigned to a second preset value, and the first preset value is different from the second preset value.

[0036] In an example, when device 3 generates a second data address according to the power supply status of its own second I / O interface, it can be specifically used to: generate a second binary code according to the power supply status of all pins of its own second I / O interface, and all values ​​of the second binary code correspond one-to-one to all pins of the second I / O interface, wherein, when the pins of the second I / O interface are powered, the corresponding value of the second binary code is assigned to a first preset value; when the pins of the second I / O interface are not powered, the corresponding value of the second binary code is assigned to a second preset value.

[0037] Furthermore, when obtaining the ID of the device according to the first data address, the host computer 1 can be specifically configured to: convert the first binary code into a one-bit octal code to obtain the ID of the device.

[0038] The first preset value may be 1, and the second preset value may be 0.

[0039] Specifically, when the power module 4 is connected to the pins of the first I / O interface 31 through the first wiring harness, the pins of the first I / O interface 32 are powered, and when the power module 4 is not connected to the pins of the first I / O interface 31, the pins of the first I / O interface 31 are not powered; when the power module 4 is connected to the pins of the second I / O interface 32 through the second wiring harness, the pins of the second I / O interface 32 are powered, and when the power module 4 is not connected to the pins of the second I / O interface 32, the pins of the second I / O interface 32 are not powered.

[0040] When a pin of the first I / O interface 31 of the device 3 is powered, the value of the first binary code corresponding to the pin is assigned to 1, and when a pin of the first I / O interface 31 of the device 3 is not powered, the value of the first binary code corresponding to the pin is assigned to 0, thereby generating a first binary code; similarly, when a pin of the second I / O interface 32 of the device 3 is powered, the value of the second binary code corresponding to the pin is assigned to 1, and when a pin of the second I / O interface 32 of the device 3 is not powered, the value of the second binary code corresponding to the pin is assigned to 0, thereby generating a second binary code. Afterwards, the device 3 compares the two binary codes, that is, determines whether the first binary code is consistent with the second binary code. If they are consistent, the first binary code is transmitted to the host computer 1; if they are inconsistent, an alarm maintenance is prompted in time to prevent the first I / O interface from having an ID matching error due to wiring or port failure.

[0041] After receiving the first binary code, the host computer 1 converts the first binary code into an octal code to obtain the ID of the corresponding device.

[0042] That is to say, the second I / O interface can read the current bus valve data address in real time and compare it with the first I / O interface. When the two data are inconsistent, timely alarm maintenance is performed to prevent the first I / O interface from having ID matching errors due to wiring or port failures, greatly reducing the matching error rate. Redundant comparison effectively improves the functional safety level. The process can be as follows: Figure 3 shown.

[0043] In an example of the present invention, the number of pins of the first I / O interface 31 and the number of pins of the second I / O interface 32 are 3, and the first binary code and the second binary code are 3-bit binary codes.

[0044] like Figure 4 As shown, when the number of pins is 3, that is, the bus valve group is 8-connected, the corresponding first binary code and second binary code are three-bit binary codes, such as 001, 010, etc.

[0045] In another example of the present invention, the number of pins of the first I / O interface and the number of pins of the second I / O interface are 4, and the first binary code and the second binary code are four-bit binary codes.

[0046] Specifically, the built-in CPU of the bus valve calls the built-in ID according to the first data address, and allocates the current bus valve address. When the number of pins is 4, that is, the bus valve group is 16-connected, the pin power supply, the first data address and the ID are shown in Table 1:

[0047] Table 1: I / O and data address table

[0048]

[0049] To summarize, the ID configuration system of the equipment in the CAN bus network of the embodiment of the present invention has the function of automatic addressing / matching of the bus valve ID address when multiple bus valves are used together to form a bus valve group. It forms a data address and reads the bus address through the I / O interface power-on form, allocates the current bus valve control end ID address, and uses dual redundant I / O interfaces to form data comparison, thereby increasing the security of bus valve ID address allocation.

[0050] Corresponding to the ID configuration system for devices in a CAN bus network of the above embodiment, the present invention further proposes an ID configuration method for devices in a CAN bus network, which is applied to the ID configuration system for devices in a CAN bus network of the above embodiment.

[0051] Figure 5 The present invention is a flowchart of a method for configuring an ID of a device in a CAN bus network according to an embodiment of the present invention.

[0052] like Figure 5 As shown, the ID configuration method of the device in the CAN bus network includes the following steps S1 to S3.

[0053] S1, the power module controls each pin of the first I / O interface to be powered or not powered.

[0054] S2, the device generates a first data address according to the power supply status of its first I / O interface, and transmits the first data address to the host computer through the CAN bus.

[0055] Specifically, images of workpieces to be inspected may be acquired from industrial production lines.

[0056] In practical applications, step S1 may be performed first and then step S2, or step S2 may be performed first and then step S1, or step S1 and step S2 may be performed simultaneously.

[0057] S3, the host computer receives the first data address from the device, obtains the ID of the device according to the first data address, and sends the ID to the device through the CAN bus.

[0058] In one embodiment, before transmitting the first data address to the host computer through the CAN bus, the method further includes: a power module controls each pin of the second I / O interface to be powered or not powered, wherein the power supply condition of the second I / O interface is the same as the power supply condition of the first I / O interface;

[0059] The first data address is transmitted to the host computer via the CAN bus, including: the device generates a second data address according to the power supply status of its own second I / O interface, and determines whether its own first data address is the same as the second data address; if the first data address is the same as the second data address, the first data address is transmitted to the host computer via the CAN bus; if the first data address is not the same as the second data address, a fault prompt is issued.

[0060] It should be noted that the specific implementation and implementation principle of the ID configuration method for the device in the CAN bus network can be found in the specific implementation of the ID configuration system for the device in the CAN bus network mentioned above. To avoid redundancy, they will not be described in detail here.

[0061] The ID configuration method of a device in a CAN bus network of an embodiment of the present invention realizes automatic configuration of the ID of the device according to the power supply status of the I / O interface, which is conducive to more convenient automatic configuration of the ID when replacing the device, and can improve configuration efficiency and configuration accuracy.

[0062] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.

[0063] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0064] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0065] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0066] A person of ordinary skill in the art can understand that all or part of the steps carried by the method of the above-mentioned embodiment can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, and the program, when executed, includes one or a combination of the steps of the method embodiment. In addition, each functional unit in each embodiment of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0067] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A system for configuring the ID of a device in a CAN bus network, characterized in that: include: A host computer, a CAN bus, a plurality of devices and a power module, wherein the host computer is connected to each of the devices via the CAN bus, each of the devices comprises a first I / O interface, and the first I / O interface comprises a plurality of pins, wherein: The power module is used to control each pin of the first I / O interface to be powered or not powered; The device is used to generate a first data address according to the power supply status of its first I / O interface, and transmit the first data address to the host computer through the CAN bus; The host computer is used to receive a first data address from the device, obtain an ID of the device according to the first data address, and send the ID to the device through the CAN bus, Each of the devices further includes a second I / O interface, the second I / O interface includes a plurality of pins, the number of pins of the second I / O interface is the same as the number of pins of the first I / O interface, and the power module is further used to control whether each pin of the second I / O interface is powered or not, wherein the power-on condition of the second I / O interface is the same as the power-on condition of the first I / O interface; When the device transmits the first data address to the host computer via the CAN bus, it is specifically used to: generate a second data address according to the power supply status of its own second I / O interface, and determine whether its own first data address is the same as the second data address; if the first data address is the same as the second data address, transmit the first data address to the host computer via the CAN bus; if the first data address is not the same as the second data address, issue a fault prompt.

2. The ID configuration system for devices in a CAN bus network according to claim 1, characterized in that: When the power module is connected to the pin of the first I / O interface through the first wiring harness, the pin of the first I / O interface is powered, and when the power module is not connected to the pin of the first I / O interface, the pin of the first I / O interface is not powered.

3. The ID configuration system for devices in a CAN bus network according to claim 1, characterized in that: When the device generates the first data address according to the power supply status of the first I / O interface of the device, it is specifically used to: A first binary code is generated according to the power supply status of all pins of the first I / O interface, and all values ​​of the first binary code correspond to all pins of the first I / O interface one by one. When the pins of the first I / O interface are powered, the corresponding value of the first binary code is assigned to a first preset value; when the pins of the first I / O interface are not powered, the corresponding value of the first binary code is assigned to a second preset value, and the first preset value is different from the second preset value.

4. The ID configuration system for devices in a CAN bus network according to claim 3, characterized in that: When the device generates the second data address according to the power supply status of the second I / O interface, it is specifically used to: A second binary code is generated according to the power supply status of all pins of the second I / O interface, and all values ​​of the second binary code correspond to all pins of the second I / O interface one by one, wherein when the pins of the second I / O interface are powered, the corresponding value of the second binary code is assigned to the first preset value; when the pins of the second I / O interface are not powered, the corresponding value of the second binary code is assigned to the second preset value.

5. The ID configuration system for devices in a CAN bus network according to claim 4, characterized in that: When the host computer obtains the ID of the device according to the first data address, it is specifically used to: The first binary code is converted into a one-bit octal code to obtain the ID of the device.

6. The ID configuration system for devices in a CAN bus network according to claim 4, characterized in that: The number of pins of the first I / O interface and the number of pins of the second I / O interface are 3, and the first binary code and the second binary code are 3-bit binary codes.

7. The ID configuration system for devices in a CAN bus network according to claim 4, characterized in that: The number of pins of the first I / O interface and the number of pins of the second I / O interface are 4, and the first binary code and the second binary code are four-bit binary codes.

8. A method for configuring an ID of a device in a CAN bus network, applied to an ID configuration system for a device in a CAN bus network according to any one of claims 1 to 7, characterized in that: The method comprises the following steps: The power module controls each pin of the first I / O interface to be powered or not powered; The device generates a first data address according to the power supply status of its first I / O interface, and transmits the first data address to the host computer through the CAN bus; The host computer receives a first data address from the device, obtains an ID of the device according to the first data address, and sends the ID to the device via the CAN bus.

9. The ID configuration method of a device in a CAN bus network according to claim 8, characterized in that: Before transmitting the first data address to the host computer through the CAN bus, the method further includes: The power module controls each pin of the second I / O interface to be powered or not powered, wherein the power supply condition of the second I / O interface is the same as the power supply condition of the first I / O interface; The transmitting the first data address to the host computer via the CAN bus includes: The device generates a second data address according to the power supply status of its second I / O interface, and determines whether its first data address is the same as the second data address; If the first data address is the same as the second data address, transmitting the first data address to the host computer via the CAN bus; If the first data address is different from the second data address, a fault prompt is given.

Citation Information

Patent Citations

  • Test method and circuit for chip pin of DTU (Date Transfer Unit)

    CN104198911A

  • Node access automatic identifying method and device based on CAN (controller area network) communication and air conditioner

    CN104618199A

  • CAN bus node ID distribution method and CAN bus system

    CN112887443A

  • An on-board hardware addressing system for a modular reconfigurable robot and a method thereof

    IN202041046707A