CN112055096B - Method and device for automatically setting communication address of equipment - Google Patents

Method and device for automatically setting communication address of equipment Download PDF

Info

Publication number
CN112055096B
CN112055096B CN202010786383.5A CN202010786383A CN112055096B CN 112055096 B CN112055096 B CN 112055096B CN 202010786383 A CN202010786383 A CN 202010786383A CN 112055096 B CN112055096 B CN 112055096B
Authority
CN
China
Prior art keywords
address
command packet
slave
host
write address
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.)
Active
Application number
CN202010786383.5A
Other languages
Chinese (zh)
Other versions
CN112055096A (en
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 CLEVER ELECTRONIC CO Ltd
Original Assignee
SHENZHEN CLEVER ELECTRONIC 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 CLEVER ELECTRONIC CO Ltd filed Critical SHENZHEN CLEVER ELECTRONIC CO Ltd
Priority to CN202010786383.5A priority Critical patent/CN112055096B/en
Publication of CN112055096A publication Critical patent/CN112055096A/en
Application granted granted Critical
Publication of CN112055096B publication Critical patent/CN112055096B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Abstract

A method and device for automatically setting device communication address, the method includes: a. firstly, setting a communication address at a host, transmitting initial address information by the host, and transmitting a write address command packet set by the host to a slave through a communication bus; b. the master control chip of the slave machine waits for an address signal transmitted by the slave machine from the address identification signal line at the input port of the address identification signal line in sequence, and sets a local address according to the received write address command packet; c. the slave machine with the set local address sends a write address command packet to the next slave machine, and the next slave machine sets the local address after receiving the write address command packet, and the operation is sequentially carried out until the communication address setting of all the devices is automatically completed. The device comprises a device host and a plurality of slaves, wherein the host is connected and communicated with the slaves through a communication bus, and an address identification signal line is arranged between the device host and the slaves and is used for sequentially connecting the host with the slaves so as to inform the devices of automatically writing communication addresses in sequence.

Description

Method and device for automatically setting communication address of equipment
[ field of technology ]
The invention relates to a power distribution system oriented to environments such as a data center and a base station, in particular to a method and a device for automatically setting equipment communication addresses by the power distribution system.
[ background Art ]
With the development of computer and communication technologies, the construction demands of data centers, base stations and the like are increasing, and the effects on social and economic development are increasingly prominent. The normal power supply and uninterrupted operation of the data center and the base station equipment are ensured as basic requirements. Among them, a power distribution unit (Power Distribution Uint, abbreviated as PDU) used by the data center and the base station is an indispensable infrastructure for distributing the required power to all the devices.
In the actual use process, the operation and maintenance is finer and finer for the management of the data center, and the PDU is taken as an important component of the data center, so that the intelligentization is higher and higher. In order to save IP address and network port resources when managing PDU products, a master-slave mode is generally used for physical connection. That is, there is a master device, which may be a PDU or a gateway, connected to a network, and connected to an operation and maintenance management system through the network, and then connected to a plurality of PDU slave devices through the master device in a bus manner, so as to perform cascade management.
During communication, since different PDU slave devices are connected in a bus manner, different address codes need to be set to facilitate communication between the master and slave devices. The common address code setting is to manually perform address configuration one by one through hardware or software, and the manual mode is very complicated to operate, consumes time, and is easy to cause address confusion and errors, causes faults, is difficult to troubleshoot and other problems.
Therefore, it is an objective need to design a convenient and reliable method for automatically setting the communication address of the device.
[ invention ]
The invention aims to solve the problems, and provides a method for automatically setting the communication address of equipment, which has the advantages of simple and efficient communication address setting and operation, accurate and reliable set communication address and effective time and labor cost saving.
To achieve the above object, the present invention provides a method for automatically setting a communication address of a device, the method comprising:
a. firstly, setting a communication address at a host, transmitting initial address information by the host, and transmitting a write address command packet set by the host to a slave through a communication bus;
b. the master control chip of the slave machine waits for an address signal transmitted by the slave machine from the address identification signal line at the input port of the address identification signal line in sequence, and sets a local address according to the received write address command packet;
c. the slave machine with the set local address sends a write address command packet to the next slave machine, and the next slave machine sets the local address after receiving the write address command packet, and the operation is sequentially carried out until the communication address setting of all the devices is automatically completed.
The key fields for sending the write address command packet when the master and the slave set the communication address include:
(1) Write address command packet random number: the address writing operation is marked by a random number;
(2) A local address for transmitting the write address command packet: reserving an address for default for a host and assigning an address for a slave;
(3) Next available address: the slave that receives the write address command packet and should perform a write address operation takes the next available address as the local address.
The host address writing step is as follows:
(1) When the host starts address writing operation, the output port of the address identification signal line is set, and the first slave is set to be in an address writing state;
(2) Initializing the initial address of the slave machine of the current write address, sending the write address command packet by the parameter through a communication bus, and setting the local address as the default reserved address of the host machine;
(3) Then entering a monitoring cycle, receiving a write address command packet sent by a slave from a communication bus, analyzing the write address command packet to judge the progress state of the current write address, and obtaining the number of the slave machines which successfully finish the operation of the write address by extracting a random number in the write address command packet and a local address of a sender;
(4) If the write address command packet is not received from the communication bus after the timeout, the operation is ended, the host records the result information of the write address to inform a user or send a status report, and simultaneously sends a command for ending the write address through the communication bus to inform all the slaves that the operation is ended.
The slave address writing step comprises the following steps:
(1) After the slave receives the write address command packet from the communication bus, firstly checking whether the input port of the address identification signal line is set, if not, directly discarding the write address command packet, if so, continuing to analyze the data in the write address command packet, judging whether the data is a processed random number, if so, discarding the write address command packet, and ending the flow;
(2) If the command packet is not processed, the next available address in the command packet is fetched and used as the local address, and the next available address used by the next slave is calculated, and the random number is saved for checking whether the command packet is processed.
(3) Setting the output port of the address identification signal line to inform the next slave, and forming a write address command packet by the random number, the local address and the next available address, and sending the write address command packet through a communication bus.
The invention also provides a device for realizing the method, which comprises a device host and a plurality of slaves, wherein the host and the slaves are connected and communicated through a communication bus.
And in the plurality of slaves, the address identification signal wire is connected to an address identification signal wire input port and an address identification signal wire output port of a main control chip of the device, for a host, the address identification signal wire is connected to an address identification signal wire output port of the main control chip of the device, and for the extreme slaves, the address identification signal wire is connected to an address identification signal wire input port of the device.
The master and the slave are power distribution unit devices, one of the devices is the master, and the other devices are the slaves.
The invention effectively solves the problems of complicated operation, time and labor waste, easy address confusion and error, fault initiation and the like caused by manual configuration of the communication address in the prior art. The method of the invention can configure the communication address between the host computer and the plurality of slave computers of the PDU management equipment, and the configuration operation is simple and quick. The invention sets the address identifying signal line connecting the host and the slaves, so that the slaves can not only obtain the writing address command packet of the host in real time, but also identify the address signal of the last slave or the slave through the address identifying signal line, thus completing the communication address configuration of the host and the slaves in sequence very conveniently and rapidly, and the configuration and operation are simple and efficient, the set communication address is accurate and reliable, and the time and labor cost can be effectively saved.
[ description of the drawings ]
FIG. 1 is a flow chart of a host write address of the method of the present invention.
FIG. 2 is a flow chart of a slave write address of the method of the present invention.
Fig. 3 is a block diagram of the structure of the device of the present invention.
[ detailed description ] of the invention
The following examples are further illustrative and explanatory of the present invention and are not intended to be limiting thereof.
Referring to fig. 1 and 2, the method for automatically setting the communication address of the device of the present invention includes:
s10: firstly, setting a communication address at a host, and sending initial address information by the host, wherein a write address command packet set by the host is sent to a slave through a communication bus.
The key fields for sending the write address command packet when the master and the slave set the communication address include:
1. write address command packet random number: the address writing operation is marked by a random number;
2. the local address of the write address command packet is sent: reserving an address for default for a host and assigning an address for a slave;
3. the next available address: the slave that receives the write address command packet and should perform a write address operation takes the next available address as the local address.
S11: the host address writing step is as follows:
s111: as shown in fig. 1, when the host starts the write address operation, the address identification signal line output port is set.
S112: setting a write address random number and a start address, and setting the first slave to a write address state.
S113: and sending a write address command packet through the communication bus, wherein the write address command packet comprises a random number of the write address command packet, taking the local address as a default reserved address of the host, and filling in the next address according to the initial address.
S114: entering a monitoring cycle, receiving a write address command packet sent by a slave from a communication bus, analyzing the write address command packet to judge the progress state of the current write address, and obtaining the number of the slave machines which smoothly complete the operation of the write address by extracting a random number in the write address command packet and a local address of a sender;
s115: if the write address command packet is not received from the communication bus after the timeout, the operation is ended, the host records the result information of the write address to inform a user or send a status report, and simultaneously sends a command for ending the write address through the communication bus to inform all the slaves that the operation is ended.
S20: when the slave sets a communication address, the master control chip of the slave waits for an address signal transmitted by the slave address identification signal line of the last slave in turn at the input port of the address identification signal line, and sets a local address according to the received write address command packet.
The slave machine with the set local address sends a write address command packet to the next slave machine, and the next slave machine sets the local address after receiving the write address command packet, and the operation is sequentially carried out until the communication address setting of all the devices is automatically completed.
S21: the slave address writing step comprises the following steps:
s211: as shown in fig. 2, after receiving the write address command packet from the communication bus, the slave firstly checks whether the input port of the address identification signal line is set, if not, directly discards the write address command packet, if so, continues to analyze the data in the write address command packet, judges whether the data is a processed random number, and if so, discards the write address command packet, and ends the flow;
s212: if the command packet is not processed, the next available address in the command packet is fetched and used as the local address, and the next available address used by the next slave is calculated, and the random number is saved for checking whether the command is processed.
S213: and setting an output port of the address identification signal line to inform the next slave, and forming a write address command packet by the random number, the local address and the next available address, and sending the write address command packet out through a communication bus.
When receiving a write address command packet which is sent by the host and ends the write address, all the devices clear the operation of the write address, and the process is ended.
According to the method of the invention, when the communication address of the equipment is automatically set, the invention starts to set address operation from the host, the write address command packet set by the host is sent to the slave equipment through the communication bus, and the initial address information is sent through the communication bus; the MCU of the slave device waits for the address signal transmitted by the last device from the address identification signal line at the input port of the address identification signal line in turn, sets the local address according to the received write address command packet, then sets the address signal of the address identification signal line, adds up the communication address, then sends the write address command packet, and sets the address of the next device. And sequentially operating until the communication address setting of all the devices is automatically completed. Thus avoiding the problems of complicated operation of manually setting addresses, easy error and the like.
The method for automatically setting the communication address of the equipment can be realized by the following device.
As shown in fig. 3, the apparatus includes a device host a and a plurality of slaves B1 to Bn, in this embodiment, the host a and the slaves B1 to Bn are a host and a slave of a power distribution unit, one of which is a host, and the other devices are slaves. The master a and the slaves B1 to Bn are connected and communicate with each other through a communication bus DB, which is connected in parallel with the slaves B1 to Bn in this embodiment. An address identification signal line AB is also arranged between the equipment host A and the plurality of slaves B1-Bn, and the address identification signal line AB sequentially connects the host A with the slaves B1-Bn so as to inform each equipment to automatically write communication addresses in sequence. In this embodiment, the address identification signal line AB is connected in series with the master a and each slave B1 to Bn.
Among the plurality of slaves, the address identification signal line AB is connected to an address identification signal line input port and an address identification signal line output port of a main control chip of the device, for the host A, the address identification signal line AB is connected to an address identification signal line output port U2 of a main control chip MCU of the device, and for the terminal-most slave Bn, the address identification signal line AB is connected to an address identification signal line input port Un of the device.
Therefore, the method of the invention can conveniently and rapidly complete the communication address configuration of the host computer and the plurality of slaves between the host computer and the plurality of slaves of the PDU management equipment, and the configuration and the operation are simple and efficient, and the set communication address is accurate and reliable, thereby effectively saving time and labor cost.
Although the present invention has been disclosed by the above embodiments, the scope of the present invention is not limited thereto, and modifications, substitutions, etc. made to the above components will fall within the scope of the claims of the present invention without departing from the spirit of the present invention.

Claims (5)

1. A method for automatically setting a communication address of a device, the method comprising:
a. firstly, setting a communication address at a host, transmitting initial address information by the host, and transmitting a write address command packet set by the host to a slave through a communication bus;
b. the master control chip of the slave machine waits for an address signal transmitted by the slave machine from the address identification signal line at the input port of the address identification signal line in sequence, and sets a local address according to the received write address command packet;
c. the slave machine with the set local address sends a write address command packet to the next slave machine, the next slave machine sets the local address after receiving the write address command packet, and the operation is sequentially carried out until the communication address setting of all the devices is automatically completed;
the key fields for sending the write address command packet when the master and the slave set the communication address include:
(1) Write address command packet random number: the address writing operation is marked by a random number;
(2) A local address for transmitting the write address command packet: reserving an address for default for a host and assigning an address for a slave;
(3) Next available address: the slave machine which receives the write address command packet and should execute write address operation takes the next available address as a local address;
the host address writing step is as follows:
(1) When the host starts address writing operation, the output port of the address identification signal line is set, and the first slave is set to be in an address writing state;
(2) Initializing a slave initial address of the current write address, sending a write address command packet from the slave initial address through a communication bus, and setting the local address as a default reserved address of a host;
(3) Then entering a monitoring cycle, receiving a write address command packet sent by a slave from a communication bus, analyzing the write address command packet to judge the progress state of the current write address, and obtaining the number of the slave machines which successfully finish the operation of the write address by extracting a random number in the write address command packet and a local address of a sender;
(4) If the write address command packet is not received from the communication bus after the timeout, the operation is ended, the host records the result information of the write address to inform a user or send a status report, and simultaneously sends a command for ending the write address through the communication bus to inform all the slaves that the operation is ended.
2. The method of claim 1, wherein the slave writing address step is:
(1) After the slave receives the write address command packet from the communication bus, firstly checking whether the input port of the address identification signal line is set, if not, directly discarding the write address command packet, if so, continuing to analyze the data in the write address command packet, judging whether the data is a processed random number, if so, discarding the write address command packet, and ending the flow;
(2) If the command packet is not processed, the next available address in the command packet is taken out and used as a local address, the next available address used by the next slave is calculated, and a random number is saved for checking whether the command packet is processed or not;
(3) Setting the output port of the address identification signal line to inform the next slave, and forming a write address command packet by the random number, the local address and the next available address, and sending the write address command packet through a communication bus.
3. An apparatus for automatically setting communication address of device according to claim 1, comprising a device host and a plurality of slaves, wherein the host and the slaves are connected and communicated through a communication bus, and an address identification signal line is arranged between the device host and the slaves, which connects the host and the slaves in sequence to inform the slaves of automatically writing communication address in sequence.
4. The apparatus for automatically setting a communication address of a device according to claim 3, wherein among the plurality of slaves, the address recognition signal line is connected to an address recognition signal line input port and an address recognition signal line output port of a master control chip of the device, and for a master, the address recognition signal line is connected to an address recognition signal line output port of the master control chip of the device, and for an endmost slave, the address recognition signal line is connected to an address recognition signal line input port of the device.
5. The apparatus for automatically setting a communication address of a device according to claim 3, wherein the master and the slave are power distribution unit devices, one of the devices being a master, and the other devices being slaves.
CN202010786383.5A 2020-08-07 2020-08-07 Method and device for automatically setting communication address of equipment Active CN112055096B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010786383.5A CN112055096B (en) 2020-08-07 2020-08-07 Method and device for automatically setting communication address of equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010786383.5A CN112055096B (en) 2020-08-07 2020-08-07 Method and device for automatically setting communication address of equipment

Publications (2)

Publication Number Publication Date
CN112055096A CN112055096A (en) 2020-12-08
CN112055096B true CN112055096B (en) 2023-11-17

Family

ID=73602246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010786383.5A Active CN112055096B (en) 2020-08-07 2020-08-07 Method and device for automatically setting communication address of equipment

Country Status (1)

Country Link
CN (1) CN112055096B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113179338B (en) * 2021-05-13 2022-11-01 深圳市英威腾电气股份有限公司 Communication method, electronic device, and storage medium
CN113286015A (en) * 2021-06-10 2021-08-20 北京华威创联科技有限公司 Method for automatically allocating address
CN113852699B (en) * 2021-08-19 2022-09-02 依米康软件技术(深圳)有限责任公司 System and method for automatically distributing bus address
CN114531422A (en) * 2021-12-30 2022-05-24 如果新能源科技(江苏)股份有限公司 Bus address automatic allocation and identification method, electronic device, storage medium and program product
CN114640650A (en) * 2022-01-26 2022-06-17 珠海派诺科技股份有限公司 Automatic addressing method, equipment, medium and product for instrument equipment
CN117614940B (en) * 2024-01-24 2024-04-09 北京众谊越泰科技有限公司 Method and system for automatic configuration of serial communication equipment address

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399854A (en) * 2007-09-30 2009-04-01 杭州士兰微电子股份有限公司 Method for dynamically configuring address and system thereof
CN101610192A (en) * 2008-06-18 2009-12-23 华为技术有限公司 A kind of communication slave, bus cascade method and system
CN104079677A (en) * 2013-03-29 2014-10-01 上海开通数控有限公司 Automatic allocation method of RS485 communication port address
CN105049551A (en) * 2015-08-27 2015-11-11 赵忠义 System and method for automatically distributing address via bus
CN105812504A (en) * 2016-04-18 2016-07-27 常州格力博有限公司 Intelligent communication address coding method
CN106444713A (en) * 2016-10-20 2017-02-22 北京精密机电控制设备研究所 Multi-intelligent stand-alone servo control system based on dual redundant CAN bus communication
CN107070763A (en) * 2017-05-08 2017-08-18 北京航天发射技术研究所 One kind processing nonsynchronous method and system of dual CAN bus sequential
CN108317737A (en) * 2018-02-21 2018-07-24 付志昊 A kind of domestic intelligent water-heater system
CN110417930A (en) * 2019-06-19 2019-11-05 浙江天正电气股份有限公司 A kind of auto-allocation method of serial device mailing address
CN111711471A (en) * 2020-06-12 2020-09-25 江苏集能易新能源技术有限公司 Method for realizing power line carrier communication ad hoc network

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101399854A (en) * 2007-09-30 2009-04-01 杭州士兰微电子股份有限公司 Method for dynamically configuring address and system thereof
CN101610192A (en) * 2008-06-18 2009-12-23 华为技术有限公司 A kind of communication slave, bus cascade method and system
CN104079677A (en) * 2013-03-29 2014-10-01 上海开通数控有限公司 Automatic allocation method of RS485 communication port address
CN105049551A (en) * 2015-08-27 2015-11-11 赵忠义 System and method for automatically distributing address via bus
CN105812504A (en) * 2016-04-18 2016-07-27 常州格力博有限公司 Intelligent communication address coding method
CN106444713A (en) * 2016-10-20 2017-02-22 北京精密机电控制设备研究所 Multi-intelligent stand-alone servo control system based on dual redundant CAN bus communication
CN107070763A (en) * 2017-05-08 2017-08-18 北京航天发射技术研究所 One kind processing nonsynchronous method and system of dual CAN bus sequential
CN108317737A (en) * 2018-02-21 2018-07-24 付志昊 A kind of domestic intelligent water-heater system
CN110417930A (en) * 2019-06-19 2019-11-05 浙江天正电气股份有限公司 A kind of auto-allocation method of serial device mailing address
CN111711471A (en) * 2020-06-12 2020-09-25 江苏集能易新能源技术有限公司 Method for realizing power line carrier communication ad hoc network

Also Published As

Publication number Publication date
CN112055096A (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN112055096B (en) Method and device for automatically setting communication address of equipment
CN105117319A (en) Method for realizing real-time monitoring of multi-channel MDIO (Management Data Input Output) devices based on FPGA
CN110855353B (en) Error code tester and test system suitable for various types of optical modules
CN112698640B (en) ECU upgrading test system
CN113377701B (en) Serial port control system based on complex programmable logic device CPLD and communication method thereof
CN101667953A (en) Reporting method of rapid looped network physical link state and device therefor
CN113419983A (en) Serial server and implementation method thereof
CN101267350B (en) Debugging method and debugging system
CN101136756B (en) Electric self-checking method, system and BMC chip on network long-range control host machine
CN115657646B (en) Test method and device of CAN controller
CN116137603A (en) Link fault detection method and device, storage medium and electronic device
CN107769960B (en) BMC management architecture based on CAN bus
CN109714124B (en) Time synchronization system and method for test system
CN111475368A (en) Serial port cascade regulation and control method and serial port equipment
CN110753363A (en) Intelligent device wireless debugging system and method
CN113872826B (en) Network card port stability testing method, system, terminal and storage medium
CN1609819B (en) Test method for computer external equipment interface
CN109885420A (en) A kind of analysis method, BMC and the storage medium of PCIe link failure
CN108562805A (en) A kind of interactive mode break-make electric test device, system and method
CN114201439A (en) Server signal identification optimization method, system and storage medium
CN109981394B (en) Communication method and device based on enhanced CAN bus protocol analyzer
CN113722211A (en) BMC (baseboard management controller) debugging method, device and system and embedded equipment
CN113422756A (en) Verification data transmission method, rate conversion device and verification data transmission system
CN113992536B (en) Server testing method
CN115643223B (en) Interrupt signal transmission method and 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
GR01 Patent grant
GR01 Patent grant