A method for BMS address allocation in a UPS system, wherein the UPS system comprises a UPS, a first built-in BMS, and a plurality of external BMSs, each of the external BMSs being configured with an input port and an output port, and the first built-in BMS being configured with an input port, wherein the plurality of external BMSs are serially connected, an output port of a previous external BMS is connected to an input port of a next external BMS, the input port of the first built-in BMS is connected to an output port of the last external BMS, an input port of a first external BMS is set to a first preset level, and the method comprises:
- S1:
- broadcasting, by the UPS, an address allocation start instruction;
- S2:
- setting, by each of the external BMSs, its output port to a second preset level and its address allocation flag as “uncompleted” according to the address allocation start instruction, and setting, by the first built-in BMS, its address allocation flag as “uncompleted” according to the address allocation start instruction;
- S3:
- broadcasting, by the UPS, an address allocation instruction;
- S4:
- performing, by a BMS whose input port is at the first preset level and whose address allocation flag is “uncompleted”, address setting according to the address allocation instruction, and after the address setting is completed, setting its address allocation flag as “completed” and replying address information to the UPS;
- S5:
- receiving, by the UPS, the address information replied by the BMS that have completed the address setting, and sending a port configuration instruction to the BMS according to the address information, so that the BMS sets its output port to the first preset level;
- and
- S6:
- repeating steps S3 to S5 until all the BMSs have completed address allocation.