CN115550312A - Battery address allocation method, device, equipment and medium - Google Patents

Battery address allocation method, device, equipment and medium Download PDF

Info

Publication number
CN115550312A
CN115550312A CN202211030604.1A CN202211030604A CN115550312A CN 115550312 A CN115550312 A CN 115550312A CN 202211030604 A CN202211030604 A CN 202211030604A CN 115550312 A CN115550312 A CN 115550312A
Authority
CN
China
Prior art keywords
equipment
slave
battery
address
bms
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211030604.1A
Other languages
Chinese (zh)
Inventor
张家斌
张家武
田昊
覃国喜
赵怀坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Chaosiwei Electronics Co ltd
Original Assignee
Shenzhen Chaosiwei Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Chaosiwei Electronics Co ltd filed Critical Shenzhen Chaosiwei Electronics Co ltd
Priority to CN202211030604.1A priority Critical patent/CN115550312A/en
Publication of CN115550312A publication Critical patent/CN115550312A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/403Bus networks with centralised control, e.g. polling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Abstract

The invention relates to the technical field of battery management, and discloses a method, a device, equipment and a medium for allocating battery addresses, wherein the method comprises the following steps: receiving BMS codes corresponding to a preset number of battery devices; judging the equipment type of the current battery equipment based on the BMS code; if the current battery equipment is preset host equipment, generating a corresponding slave address based on the BMS code through the host equipment; and allocating the slave addresses to corresponding slave equipment based on a preset communication system CAN. The invention distributes the generated slave machine address to the corresponding slave machine equipment through the preset communication system CAN to realize the automatic setting of the slave machine address, thereby facilitating the installation and maintenance of the battery equipment, reducing the difficulty of setting and modifying the address, ensuring the stability of the system and reducing the difficulty of dynamic address distribution of the battery management system BMS.

Description

Battery address allocation method, device, equipment and medium
Technical Field
The present invention relates to the field of battery management technologies, and in particular, to a method, an apparatus, a device, and a medium for allocating a battery address.
Background
The battery management system BMS is used as an important link between a battery and electric equipment, and can perform functions of real-time monitoring on physical parameters of the battery, real-time evaluation on the state of the battery, charging, discharging and pre-charging control, balanced management of the battery, thermal management and the like. Generally, the battery management system BMS includes a corresponding master and a preset number of slaves, each of the master and the slaves has a corresponding local address, and the battery management system BMS manages the batteries by implementing communication connection between the batteries through the local addresses corresponding to the master and the slaves.
On one hand, when the local addresses corresponding to the master machine and the slave machine in the battery management system BMS are set, the setting switches of the corresponding dial-up devices are generally adjusted manually, and the local addresses of the master machine and the slave machine are required to be adjusted manually individually, so that the local address setting of the whole battery management system BMS is realized, and the programs are complex and the operation is inconvenient in the process of setting and modifying the addresses; on the other hand, when the master is damaged or shut down, the slave cannot automatically complement the master, so that the master is lost, and the whole battery management system BMS is paralyzed and the system is unstable. Therefore, the conventional battery management system BMS has a great difficulty in performing dynamic address allocation.
Disclosure of Invention
The invention mainly aims to provide a battery address allocation method, a battery address allocation device, equipment and a medium, and aims to reduce the difficulty of dynamic address allocation of a Battery Management System (BMS).
In order to achieve the above object, the present invention provides a battery address allocation method, including:
receiving BMS codes corresponding to a preset number of battery devices;
judging the equipment type of the current battery equipment based on the BMS code;
if the current battery equipment is preset host equipment, generating a corresponding slave address based on the BMS code through the host equipment;
and allocating the slave addresses to corresponding slave equipment based on a preset communication system CAN.
Preferably, the determining of the device type of the current battery device based on the BMS code includes:
arranging BMS codes received from a preset number of battery devices and BMS codes of current battery devices in a preset sequence;
if the BMS code of the current battery equipment reaches a first preset standard of the preset sequence, the current battery equipment is host equipment;
and if the BMS code of the current battery equipment reaches a second preset standard of the preset sequence, the current battery equipment is slave equipment.
Preferably, after the step of determining the device type of the current battery device based on the BMS encoding, the method further includes:
if no host equipment exists in the preset number of battery equipment, arranging the preset number of battery equipment in a preset sequence according to the BMS codes;
and selecting the slave equipment reaching the preset secondary position in the preset sequence, and taking the slave equipment reaching the preset secondary position as the current host equipment.
Preferably, the generating, by the host device, the corresponding slave address based on the BMS encoding includes:
acquiring a base address of the slave device;
and generating a slave address corresponding to the slave device according to the BMS code and the base address through the master device.
Preferably, after the step of allocating the slave address to the corresponding slave device based on the preset communication system CAN, the battery address allocation method further includes:
if the current battery equipment is preset slave equipment, judging whether the slave equipment receives a slave address allocated by the host equipment;
if the slave address is not received, sending an address request to the host equipment;
sending, by the master device, a slave address to the slave device based on the address request until the slave device receives a corresponding slave address.
Preferably, the step of allocating the slave addresses to corresponding slave devices based on a preset communication system CAN includes:
acquiring a communication connection node of the host equipment and the slave equipment based on the communication system CAN;
allocating the slave address from the master device to a corresponding slave device based on the communication connection node.
Preferably, before the step of receiving BMS codes corresponding to the preset number of battery devices, the method further includes:
generating a BMS code corresponding to the battery device through a preset encoder;
and storing the BMS code corresponding to the battery equipment into a storage medium corresponding to the battery equipment.
In addition, to achieve the above object, an embodiment of the present invention further provides an address allocating apparatus, where the address allocating apparatus includes:
the receiving module is used for receiving BMS codes corresponding to a preset number of battery devices;
the equipment type determining module is used for judging the equipment type of the current battery equipment based on the BMS code;
the slave address generating module is used for generating a corresponding slave address based on the BMS code through the host equipment if the current battery equipment is preset host equipment;
and the slave address allocation module is used for allocating the slave addresses to corresponding slave equipment based on a preset communication system CAN.
Preferably, the receiving module further includes:
generating a BMS code corresponding to the battery device through a preset encoder;
and storing the BMS code corresponding to the battery equipment into a storage medium corresponding to the battery equipment.
Preferably, the device type determining module further includes:
arranging BMS codes received from a preset number of battery devices and the BMS codes of the current battery devices in a preset sequence;
if the BMS code of the current battery equipment reaches a first preset standard of the preset sequence, the current battery equipment is host equipment;
and if the BMS code of the current battery equipment reaches a second preset standard of the preset sequence, the current battery equipment is slave equipment.
Preferably, the device type determining module further includes:
if no host equipment exists in the preset number of battery equipment, arranging the preset number of battery equipment in a preset sequence according to the BMS codes;
and selecting the slave equipment reaching the preset secondary position in the preset sequence, and taking the slave equipment reaching the preset secondary position as the current host equipment.
Preferably, the slave address generation module includes:
acquiring a base address of the slave device;
and generating a slave address corresponding to the slave device according to the BMS code and the basic address through the master device.
Preferably, the slave address allocating module includes:
acquiring a communication connection node of the host equipment and the slave equipment based on the communication system CAN;
and allocating the slave address from the master device to a corresponding slave device based on the communication connection node.
Preferably, the slave address allocating module further includes:
if the current battery equipment is preset slave equipment, judging whether the slave equipment receives a slave address allocated by the host equipment;
if the slave address is not received, an address request is sent to the host equipment;
sending, by the master device, a slave address to the slave device based on the address request until the slave device receives a corresponding slave address.
In addition, in order to achieve the above object, an embodiment of the present invention further provides an apparatus, where the apparatus includes a memory, a processor, and an address allocation program stored in the memory and executable on the processor, and the address allocation program is executed by the processor to implement the steps of the battery address allocation method described above.
In addition, to achieve the above object, the present invention also provides a medium which is a computer readable storage medium having an address assignment program stored thereon, the address assignment program, when executed by a processor, implementing the steps of the battery address assignment method as described above.
The invention provides a battery address allocation method, a device, equipment and a medium, wherein the battery address allocation method comprises the following steps: receiving BMS codes corresponding to a preset number of battery devices; judging the equipment type of the current battery equipment based on the BMS code; if the current battery equipment is preset host equipment, generating a corresponding slave address based on the BMS code through the host equipment; and allocating the slave addresses to corresponding slave equipment based on a preset communication system CAN.
Compared with the prior art that the setting of the addresses of the battery equipment is realized by manually adjusting the dial-up switch, the method and the device judge the equipment types through the preset BMS codes, generate the slave addresses of each slave equipment through the host equipment after confirming the equipment types of the battery equipment, and send the generated slave addresses to the corresponding slave equipment through the preset communication system CAN to realize the automatic setting of the addresses of the slave equipment. This scheme need not to make things convenient for battery equipment to install and maintain through manual adjustment code dialing device, has reduced the degree of difficulty that sets up the modification address, has ensured the stability of system, has reduced the degree of difficulty that battery management system BMS carries out dynamic address allocation.
Drawings
Fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of a battery address allocation method of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a method for allocating a battery address according to the present invention;
FIG. 3 is a flowchart illustrating a first embodiment of a method for allocating a battery address according to the present invention;
FIG. 4 is a flowchart illustrating a battery address allocation method according to a second embodiment of the present invention;
FIG. 5 is a flowchart illustrating a battery address allocation method according to a third embodiment of the present invention;
FIG. 6 is a flowchart illustrating a battery address allocation method according to a fourth embodiment of the present invention;
fig. 7 is a functional block diagram of an address allocation apparatus of the battery address allocation method of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
Specifically, referring to fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the battery address allocation method of the present invention.
As shown in fig. 1, the apparatus may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. The communication bus 1002 is used to implement connection communication among these components. The user interface 1003 may include a Display (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory such as a disk memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an address assignment program. The operating system is a program for managing and controlling hardware and software resources of the equipment and supports the operation of an address allocation program and other software or programs; the network communication module is used for managing and controlling the network interface 1002; the user interface 1003 is mainly used for data communication with the client; the network interface 1004 is mainly used for establishing communication connection with a server; and the processor 1001 may be used to call an address assignment routine stored in the memory 1005.
When executed by a processor, the address assignment program stored in the memory 1005 implements the following steps:
receiving BMS codes corresponding to a preset number of battery devices;
judging the equipment type of the current battery equipment based on the BMS code;
if the current battery equipment is preset host equipment, generating a corresponding slave address based on the BMS code through the host equipment;
and allocating the slave addresses to corresponding slave equipment based on a preset communication system CAN.
Further, the address assignment program stored in the memory 1005, when executed by the processor, further implements the steps of:
arranging BMS codes received from a preset number of battery devices and the BMS codes of the current battery devices in a preset sequence;
if the BMS code of the current battery equipment reaches a first preset standard of the preset sequence, the current battery equipment is host equipment;
and if the BMS code of the current battery equipment reaches a second preset standard of the preset sequence, the current battery equipment is slave equipment.
Further, the address assignment program stored in the memory 1005, when executed by the processor, further implements the steps of:
if no host equipment exists in the preset number of battery equipment, arranging the preset number of battery equipment in a preset sequence according to the BMS codes;
and selecting the slave equipment reaching the preset secondary position in the preset sequence, and taking the slave equipment reaching the preset secondary position as the current host equipment.
Further, the address assignment program stored in the memory 1005, when executed by the processor, further implements the steps of:
acquiring a base address of the slave device;
and generating a slave address corresponding to the slave device according to the BMS code and the basic address through the master device.
Further, the address assignment program stored in the memory 1005, when executed by the processor, further implements the steps of:
if the current battery equipment is preset slave equipment, judging whether the slave equipment receives a slave address allocated by the host equipment;
if the slave address is not received, sending an address request to the host equipment;
sending, by the master device, a slave address to the slave device based on the address request until the slave device receives a corresponding slave address.
Further, the address assignment program stored in the memory 1005, when executed by the processor, further implements the steps of:
acquiring a communication connection node of the host equipment and the slave equipment based on the communication system CAN;
and allocating the slave address from the master device to a corresponding slave device based on the communication connection node.
Further, the address assignment program stored in the memory 1005, when executed by the processor, further performs the steps of:
generating a BMS code corresponding to the battery device through a preset encoder;
and storing the BMS code corresponding to the battery equipment into a storage medium corresponding to the battery equipment.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below 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 embodied in various forms and should not be limited by 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.
Based on the above terminal device architecture but not limited to the above architecture, embodiments of the battery address allocation method of the present invention are provided.
Specifically, referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of a battery address allocation method according to the present invention, where the battery address allocation method includes:
step S10, receiving BMS codes corresponding to a preset number of battery devices;
step S20, judging the equipment type of the current battery equipment based on the BMS code;
step S30, if the current battery equipment is preset host equipment, generating a corresponding slave address based on the BMS code through the host equipment;
and S40, distributing the slave addresses to corresponding slave equipment based on a preset communication system CAN.
According to the battery address allocation method, the device type is judged through the preset BMS code, after the device type of the battery device is confirmed, the slave address of each slave device is generated through the host device, and the generated slave address is sent to the corresponding slave device through the preset communication system CAN, so that the automatic setting of the slave device address is realized. This scheme need not to have made things convenient for battery equipment to install and maintain through manual adjustment dial indicator, has reduced the degree of difficulty that sets up the modification address, has ensured the stability of system, has reduced the degree of difficulty that battery management system BMS carries out dynamic address allocation.
The respective steps will be described in detail below:
step S10, BMS codes corresponding to a preset number of battery devices are received;
further, before the step of receiving BMS codes corresponding to the preset number of battery devices, the method further includes:
generating a BMS code corresponding to the battery equipment through a preset encoder;
and storing the BMS code corresponding to the battery equipment into a storage medium corresponding to the battery equipment.
In one embodiment, the BMS management system unit is commonly referred to as a battery caregiver or a battery manager, and mainly manages and maintains each battery unit intelligently, prevents overcharge and overdischarge of the battery, prolongs the service life of the battery, and monitors the state of the battery.
Further, the master battery device and the slave battery devices in the battery pack have corresponding BMS codes, and the BMS codes, as unique identifiers of the battery devices in the battery pack, may exist together with the battery devices in the form of bar codes, that is, each battery device has its corresponding BMS code, and the BMS codes are generated correspondingly for each battery device through a preset encoder, and the bar codes may be generated according to the current time or through a random number mechanism of the encoder.
Furthermore, the master battery device and the slave battery devices included in the battery pack in the BMS battery management system are connected through the CAN bus, and when the dynamic address allocation is started for the battery devices in the BMS battery management system, each battery device sends its corresponding BMS code to all the battery devices except the battery device in a broadcast manner, and meanwhile, each battery device as the current battery device also receives the BMS codes sent by all the battery devices except the battery device in a broadcast manner.
Step S20, judging the equipment type of the current battery equipment based on the BMS code;
in a specific embodiment, after receiving the BMS codes sent by all the battery devices except the current battery device, the current battery device determines the device type of the current battery device by judging the device type of the current battery device through the BMS codes.
Further, the determining of the device type of the current battery device through the BMS coding may be to arrange the BMS coding in a preset order, determine whether the BMS coding of the current battery device is a maximum value after arrangement, and if the BMS coding is not the maximum value, determine that the current battery device is a slave battery device; and if the BMS code is the maximum value, the current battery equipment is the host equipment.
Step S30, if the current battery equipment is preset host equipment, generating a corresponding slave address based on the BMS code through the host equipment;
further, the step of generating, by the host device, a corresponding slave address based on the BMS encoding includes:
acquiring a base address of the slave device;
and generating a slave address corresponding to the slave device according to the BMS code and the basic address through the master device.
In a specific embodiment, if the current device is a master device, the slave address corresponding to the slave device needs to be generated according to all received BMS codes. Specifically, the slave devices and the master device are connected in parallel, the master device obtains slave parameters of each slave device through the parallel state, and the master device communicates with an upper computer to control the slave devices, so that slave addresses corresponding to the slave devices are generated through the master device.
Further, the manner of generating the slave address corresponding to the slave device by the master device may be to acquire a base address of the slave device and generate the slave address of the slave device based on the BMS code corresponding to the slave device.
And S40, distributing the slave addresses to corresponding slave equipment based on a preset communication system CAN.
Further, the step of allocating the slave addresses to corresponding slave devices based on a preset communication system CAN includes:
acquiring a communication connection node of the host equipment and the slave equipment based on the communication system CAN;
and allocating the slave address from the master device to a corresponding slave device based on the communication connection node.
In a specific embodiment, the master device and the slave device in the BMS battery management system are operated in parallel, that is, data connection of the communication system CAN is realized between each battery device, and data transmission between each battery device is realized through a communication connection node between the communication system CANs. Specifically, the slave device transmits the BMS code to the battery device other than the own device, receives the BMS code transmitted by the battery device other than the own device, and transmits the slave address to the other slave device.
Referring to fig. 3, fig. 3 is a specific flowchart of the present embodiment. When the battery management system BMS starts to carry out dynamic address allocation, the bar code BMS codes of the battery management system BMS are sent to the battery devices except the battery device through the preset CAN communication, the bar code BMS codes of the battery devices except the battery device are received at the same time, and the battery management system BMS determines that the battery device is the slave device or the host device by judging whether the bar code of the battery device is the maximum value or not. If the local computer is the master computer equipment, distributing corresponding slave computer addresses to the slave computer equipment, and respectively sending the corresponding slave computer addresses to the slave computer equipment based on the CAN communication connection; and if the local device is the slave device, detecting whether the slave device receives the slave address allocated by the master device or not until the slave device receives the corresponding slave address, and ending the dynamic address allocation of the battery management system BMS.
In this embodiment, the device type is determined by a preset BMS code, after the device type of the battery device is confirmed, a slave address of each slave device is generated by the master device, and the generated slave address is sent to the corresponding slave device by a preset communication system CAN, so that the automatic setting of the slave device address is realized. This scheme need not to make things convenient for battery equipment to install and maintain through manual adjustment code dialing device, has reduced the degree of difficulty that sets up the modification address, has ensured the stability of system, has reduced the degree of difficulty that battery management system BMS carries out dynamic address allocation.
Further, a second embodiment of the battery address allocation method according to the embodiment of the present application is proposed based on the first embodiment of the battery address allocation method according to the embodiment of the present application.
The second embodiment of the battery address allocation method is different from the first embodiment of the battery address allocation method in that this embodiment is a refinement of "determining the device type of the current battery device based on the BMS coding" in step S20, and specifically includes, with reference to fig. 4:
step S21, arranging BMS codes received from a preset number of battery devices and the BMS codes of the current battery devices in a preset sequence;
step S22, if the BMS code of the current battery equipment reaches a first preset standard of the preset sequence, the current battery equipment is host equipment;
and step S23, if the BMS code of the current battery equipment reaches a second preset standard of the preset sequence, the current battery equipment is slave equipment.
In a specific embodiment, after the current battery device receives the BMS codes sent by all the battery devices except the battery device, the device type of the current battery device is determined by judging the device type of the current battery device through the BMS codes.
Further, the determining of the device type of the current battery device through the BMS code may be arranging the BMS code in a preset order, determining whether the BMS code of the current battery device is a maximum value after arrangement, and if the BMS code is not the maximum value, determining that the current battery device is a slave battery device; and if the BMS code is the maximum value, the current battery equipment is the host equipment.
Further, the preset sequence may be that the BMS codes are arranged in a descending or descending order, and then it is determined whether the BMS code of the current battery device is the largest BMS code, if so, the current battery device is the host device; if not, the current battery equipment is the slave equipment.
In the embodiment, the device type of the current battery device is judged through the BMS code, the accurate judgment of the host device and the slave device is realized through the BMS code, the slave address is automatically allocated to the slave device through the host device, the difficulty of battery management of a battery management system is reduced, and the accuracy of management of the battery device is improved.
Further, a third embodiment of the battery address allocation method according to the embodiment of the present application is proposed based on the first embodiment and the second embodiment of the battery address allocation method according to the embodiment of the present application.
The third embodiment of the battery address allocation method is different from the first, second and third embodiments of the diagnosis teaching method in that, in step S20, after "determining the device type of the current battery device based on the BMS code", the method further includes a scheme of replacing the host, and with reference to fig. 5, specifically includes:
step S201, if no host equipment exists in the preset number of battery equipment, arranging the preset number of battery equipment according to the BMS code;
step S202, selecting the slave equipment reaching the preset secondary position in the preset sequence, and taking the slave equipment reaching the preset secondary position as the current host equipment.
In a specific embodiment, when the master device is turned off or damaged, that is, there is no corresponding master device in the current battery management system BMS, the slave devices whose BMS codes reach the maximum value are selected from all the slave devices by sorting the BMS codes corresponding to all the slave devices, and the slave devices are used as the current master device to perform slave address allocation.
Further, the slave address allocation using the slave device as the current master device realizes BMS coding transmission between the battery devices through a preset communication system CAN, generates the slave address of the slave device through the BMS coding, and realizes allocation and transmission of the dynamic address based on the slave address.
In the embodiment, the master machine is actively supplemented by the slave machine, and the dynamic battery allocation of the battery management system BMS is realized by the supplemented master machine, so that the safety of the battery management system is improved, and the system stability of the battery management system is enhanced.
Further, a fourth embodiment of the battery address allocation method according to the embodiment of the present application is proposed based on the first embodiment, the second embodiment, and the third embodiment of the battery address allocation method according to the embodiment of the present application.
The fourth embodiment of the battery address allocation method is different from the first, second, and third embodiments of the diagnosis teaching method in that, in step S40, "the slave address is allocated to the corresponding slave device based on the preset communication system CAN", and then the method further includes a scheme of determining whether the slave device receives the slave address, and with reference to fig. 6, the method specifically includes:
step S401, if the current battery equipment is preset slave equipment, judging whether the slave equipment receives a slave address allocated by the host equipment;
step S402, if the slave address is not received, an address request is sent to the host equipment;
step S403, sending, by the master device, a slave address to the slave device based on the address request until the slave device receives a corresponding slave address.
In a specific embodiment, if it is determined that the current battery device is a slave device after being sorted by the BMS coding, it is necessary to determine whether the current battery device receives a slave address from the host device, and if the slave address sent by the host device is not received, it is necessary to send an address request to the corresponding host device, and accordingly, the slave address may want to change the slave device to send the corresponding slave address according to the address request sent by the bay-based device until the slave device receives the corresponding slave address.
In the embodiment, the slave device judges whether the slave address sent by the host device is received, and if the slave address is not received, a corresponding address request is sent to the host device until the slave device receives the corresponding slave address, so that each slave device can receive the corresponding slave address, and the stability and the integrity of the battery management system are guaranteed.
In addition, an address allocation apparatus is further provided in an embodiment of the present invention, referring to fig. 7, and fig. 7 is a schematic diagram of functional modules of the address allocation apparatus according to the solution of the embodiment of the battery address allocation method in the present invention. As shown in fig. 7, the address assigning apparatus includes:
a receiving module 10, configured to receive BMS codes corresponding to a preset number of battery devices;
a device type determining module 20, configured to determine a device type of the current battery device based on the BMS code;
a slave address generating module 30, configured to generate, by the host device, a corresponding slave address based on the BMS code if the current battery device is a preset host device;
and the slave address allocation module 40 is configured to allocate the slave addresses to corresponding slave devices based on a preset communication system CAN.
Preferably, the receiving module further includes:
a code generation unit for generating a BMS code corresponding to the battery device through a preset encoder;
and the code storage unit is used for storing the BMS code corresponding to the battery equipment into a storage medium corresponding to the battery equipment.
Preferably, the device type determining module further includes:
the battery management system comprises a code sorting unit, a code sorting unit and a management unit, wherein the code sorting unit is used for sorting BMS codes received from a preset number of battery devices and the BMS codes of the current battery devices in a preset sequence;
a host device determining unit, configured to determine that the current battery device is a host device if the BMS code of the current battery device meets a first preset standard of the preset sequence;
and the slave equipment determining unit is used for determining that the current battery equipment is the slave equipment if the BMS code of the current battery equipment reaches a second preset standard of the preset sequence.
Preferably, the device type determining module further includes:
the equipment sorting unit is used for arranging the preset number of battery equipment in a preset sequence according to the BMS codes if the host equipment does not exist in the preset number of battery equipment;
and the host successive compensation unit is used for selecting the slave equipment reaching the preset secondary position in the preset sequence and taking the slave equipment reaching the preset secondary position as the current host equipment.
Preferably, the slave address generating module includes:
a base address acquisition unit configured to acquire a base address of the slave device;
and the slave address generating unit is used for generating a slave address corresponding to the slave equipment according to the BMS code and the base address through the master equipment.
Preferably, the slave address allocation module includes:
a communication node confirmation unit, configured to acquire a communication connection node between the host device and the slave device based on the communication system CAN;
and the equipment address allocation unit is used for allocating the slave addresses from the master equipment to corresponding slave equipment based on the communication connection nodes.
Preferably, the slave address allocating module further includes:
the slave address confirming unit is used for judging whether the slave equipment receives the slave address allocated by the host equipment or not if the current battery equipment is the preset slave equipment;
an address request sending unit, configured to send an address request to the host device if a slave address is not received;
an address sending unit, configured to send, by the master device, a slave address to the slave device based on the address request until the slave device receives a corresponding slave address.
For the principle and implementation process of logistics transportation, please refer to the above embodiments, which are not described herein again.
In addition, an embodiment of the present invention further provides an apparatus, where the apparatus includes a memory, a processor, and an address allocation program stored in the memory and executable on the processor, and the address allocation program, when executed by the processor, implements the steps of the battery address allocation method according to the foregoing embodiment.
In addition, to achieve the above object, the present invention also provides a medium which is a computer readable storage medium having an address assignment program stored thereon, the address assignment program, when executed by a processor, implementing the steps of the battery address assignment method as described above.
Since the local address allocation program is executed by the processor, all technical solutions of all the foregoing embodiments are adopted, so that at least all the beneficial effects brought by all the technical solutions of all the foregoing embodiments are achieved, and details are not repeated herein.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of other like elements in a process, method, article, or system comprising the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention essentially or contributing to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all equivalent structures or equivalent processes performed by the present specification and the attached drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A battery address allocation method, characterized in that the battery address allocation method comprises:
receiving BMS codes corresponding to a preset number of battery devices;
judging the equipment type of the current battery equipment based on the BMS code;
if the current battery equipment is preset host equipment, generating a corresponding slave address based on the BMS code through the host equipment;
and allocating the slave addresses to corresponding slave equipment based on a preset communication system CAN.
2. The battery address allocation method according to claim 1, wherein the step of determining the device type of the current battery device based on the BMS code comprises:
arranging BMS codes received from a preset number of battery devices and BMS codes of current battery devices in a preset sequence;
if the BMS code of the current battery equipment reaches a first preset standard of the preset sequence, the current battery equipment is host equipment;
and if the BMS code of the current battery equipment reaches a second preset standard of the preset sequence, the current battery equipment is slave equipment.
3. The battery address allocation method according to claim 1, wherein after the step of determining the device type of the current battery device based on the BMS encoding, the method further comprises:
if no host equipment exists in the preset number of battery equipment, arranging the preset number of battery equipment in a preset sequence according to the BMS codes;
and selecting the slave equipment reaching the preset secondary position in the preset sequence, and taking the slave equipment reaching the preset secondary position as the current host equipment.
4. The battery address allocation method of claim 1, wherein the step of generating, by the host device, the corresponding slave address based on the BMS encoding comprises:
acquiring a base address of the slave device;
and generating a slave address corresponding to the slave device according to the BMS code and the base address through the master device.
5. The battery address assigning method according to claim 2, wherein after the step of assigning the slave address to the corresponding slave device based on a preset communication system CAN, the battery address assigning method further comprises:
if the current battery equipment is preset slave equipment, judging whether the slave equipment receives a slave address distributed by the host equipment;
if the slave address is not received, sending an address request to the host equipment;
sending, by the master device, a slave address to the slave device based on the address request until the slave device receives a corresponding slave address.
6. The battery address allocation method according to claim 1, wherein the step of allocating the slave addresses to the corresponding slave devices based on a preset communication system CAN includes:
acquiring a communication connection node of the host equipment and the slave equipment based on the communication system CAN;
allocating the slave address from the master device to a corresponding slave device based on the communication connection node.
7. The battery address allocation method of claim 1, wherein, prior to the step of receiving BMS codes corresponding to a preset number of battery devices, the method further comprises:
generating a BMS code corresponding to the battery device through a preset encoder;
and storing the BMS code corresponding to the battery equipment into a storage medium corresponding to the battery equipment.
8. An address assigning apparatus, characterized in that the address assigning apparatus comprises:
the receiving module is used for receiving BMS codes corresponding to a preset number of battery devices;
the equipment type determining module is used for judging the equipment type of the current battery equipment based on the BMS code;
the slave address generating module is used for generating a corresponding slave address based on the BMS code through the host equipment if the current battery equipment is preset host equipment;
and the slave address allocation module is used for allocating the slave addresses to corresponding slave equipment based on a preset communication system CAN.
9. An apparatus comprising a memory, a processor, and an address assignment program stored on the memory and executable on the processor, the address assignment program when executed by the processor implementing the battery address assignment method of any of claims 1 to 7.
10. A medium which is a computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon an address assignment program which, when executed by a processor, implements the steps of the battery address assignment method as claimed in any one of claims 1 to 7.
CN202211030604.1A 2022-08-25 2022-08-25 Battery address allocation method, device, equipment and medium Pending CN115550312A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211030604.1A CN115550312A (en) 2022-08-25 2022-08-25 Battery address allocation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211030604.1A CN115550312A (en) 2022-08-25 2022-08-25 Battery address allocation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115550312A true CN115550312A (en) 2022-12-30

Family

ID=84725136

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211030604.1A Pending CN115550312A (en) 2022-08-25 2022-08-25 Battery address allocation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115550312A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026393A (en) * 2007-02-12 2007-08-29 雷柏元 Method and device for realizing communication between peer devices
CN104964399A (en) * 2015-07-21 2015-10-07 珠海格力电器股份有限公司 Address allocation method and device for air conditioning equipment
CN109150680A (en) * 2018-08-30 2019-01-04 青岛科技大学 A kind of adaptive determining address networking circuit and method suitable for RS485 bus
CN215682333U (en) * 2021-02-05 2022-01-28 杭州惟领科技有限公司 Automatic address allocation equipment based on CAN communication

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101026393A (en) * 2007-02-12 2007-08-29 雷柏元 Method and device for realizing communication between peer devices
CN104964399A (en) * 2015-07-21 2015-10-07 珠海格力电器股份有限公司 Address allocation method and device for air conditioning equipment
CN109150680A (en) * 2018-08-30 2019-01-04 青岛科技大学 A kind of adaptive determining address networking circuit and method suitable for RS485 bus
CN215682333U (en) * 2021-02-05 2022-01-28 杭州惟领科技有限公司 Automatic address allocation equipment based on CAN communication

Similar Documents

Publication Publication Date Title
US20160250942A1 (en) Charging state management method, charging state management device, and program
JP3114695B2 (en) Wireless portable information terminal and wireless data transmission / reception system
JP6037013B2 (en) CHARGE STATE MANAGEMENT METHOD, CHARGE STATE MANAGEMENT DEVICE, AND PROGRAM
CN103516690A (en) Service processing state information query method and apparatus thereof
CN112165413B (en) Equipment state reporting method and device and electronic device
CN103517243A (en) Emergency call establishment method, network equipment and communication system
CN111969263B (en) Method and device for updating SOH of battery pack in charging and replacing power station
CN116207830B (en) Power distribution method, system, equipment and storage medium for battery-changing cabinet
US20150165918A1 (en) Charging system control apparatus, program, and control method
CN115632422A (en) Power supply and demand adjustment method and power supply and demand management device
CN112492618A (en) Network sharing method and device, electronic equipment and storage medium
CN115550312A (en) Battery address allocation method, device, equipment and medium
CN107517493A (en) Connection method, device and the terminal of radio resource control RRC
CN110366194B (en) Resource calling method, device and system
CN112959915A (en) Charging power adjusting method and device, storage medium and charging pile
US20180317175A1 (en) Method for securing availability of mobile terminal device and information processing device
JP2004214893A (en) Mobile radio communication system and radio base station selection means
CN115664932A (en) Energy block parallel communication method and device
JP2020018153A (en) Power supply device, device for controlling power supply device, method for controlling power supply device, and power supply system
CN114597967A (en) Method and device for distributing output power of power supply, storage medium and equipment
CN113050958A (en) Terminal upgrading method, terminal and server
JP2018186426A (en) Communication method with network and portable terminal device
CN110970948A (en) Charging control method and device, storage medium and split type electronic equipment
WO2023218764A1 (en) Aid management server
CN117098095B (en) Single-station-end and multi-station-end power conversion interaction method and power conversion interaction device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination