CN108270883A - Can automatic dispensing device address code method, breaker and storage medium - Google Patents

Can automatic dispensing device address code method, breaker and storage medium Download PDF

Info

Publication number
CN108270883A
CN108270883A CN201810120379.8A CN201810120379A CN108270883A CN 108270883 A CN108270883 A CN 108270883A CN 201810120379 A CN201810120379 A CN 201810120379A CN 108270883 A CN108270883 A CN 108270883A
Authority
CN
China
Prior art keywords
slave
address
main equipment
level
puts
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.)
Granted
Application number
CN201810120379.8A
Other languages
Chinese (zh)
Other versions
CN108270883B (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 Municipal Science And Technology Co Ltd
Original Assignee
Shenzhen Municipal Science And Technology 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 Municipal Science And Technology Co Ltd filed Critical Shenzhen Municipal Science And Technology Co Ltd
Priority to CN201810120379.8A priority Critical patent/CN108270883B/en
Publication of CN108270883A publication Critical patent/CN108270883A/en
Application granted granted Critical
Publication of CN108270883B publication Critical patent/CN108270883B/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 or network protocols for addressing or naming
    • H04L61/20Address allocation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements or network protocols for addressing or naming
    • H04L61/20Address allocation
    • H04L61/2038Address allocation for local use, e.g. on local area networks [LAN] or on universal serial bus [USB] networks

Abstract

The invention discloses it is a kind of can automatic dispensing device address code method, applied to breaker, the breaker includes main equipment and multiple slave devices;It the described method comprises the following steps:Main equipment sends addressable broadcast to each slave device;After the slave device of unallocated device address receives the addressable broadcast, whether the incoming level for judging the current identification signal that puts in order of itself is vacant state or predetermined level state;If so, Address Recognition in the addressable broadcast is own device address by the slave device;If it is not, then the slave device waits for the addressable broadcast of main equipment transmission next address.The invention also discloses a kind of breaker and computer readable storage mediums.The present invention is realized distributes slave device address automatically under principal and subordinate's serial ports pattern, improves flexibility and the convenience of multiple slave device address distribution.

Description

Can automatic dispensing device address code method, breaker and storage medium
Technical field
The present invention relates to device address technical field more particularly to it is a kind of can automatic dispensing device address code side Method, breaker and computer readable storage medium.
Background technology
Slave device address distribution generally use under existing principal and subordinate's serial ports pattern be user be configured manually or Person sets in default in advance, and if slave device is more, is manually operated comparatively laborious, and default setting is then relatively fixed, more ineffective It is living.
Invention content
It is a primary object of the present invention to provide it is a kind of can automatic dispensing device address code method, breaker and meter Calculation machine readable storage medium storing program for executing, it is intended to solve the inconvenient flexible technology of distribution of the slave device address under existing principal and subordinate's serial ports pattern and ask Topic.
To achieve the above object, the present invention provide it is a kind of can automatic dispensing device address code method, applied to disconnected Road device, the breaker include a main equipment and multiple slave devices;It the described method comprises the following steps:
Main equipment sends addressable broadcast to each slave device;
After the slave device of unallocated device address receives the addressable broadcast, the current identification letter that puts in order of itself is judged Number incoming level whether be vacant state or predetermined level state;
If so, Address Recognition in the addressable broadcast is own device address by the slave device;
If it is not, then the slave device waits for the addressable broadcast of main equipment transmission next address.
Optionally, when the predetermined level state is high level, the method further includes:
After each slave device receives the first frame addressable broadcast of main equipment transmission, by the current identification that puts in order of itself The output level of signal becomes low level;
After slave device recognizes own device address, the output level of the current identification signal that puts in order of itself is become For high level;
Wherein, the output level of the identification signal that puts in order of any slave device is the identification that puts in order of next slave device The incoming level of signal.
Optionally, when the predetermined level state is low level, the method further includes:
After each slave device receives the first frame addressable broadcast of main equipment transmission, by the current identification that puts in order of itself The output level of signal becomes high level;After slave device recognizes own device address, by the current knowledge that puts in order of itself The output level of level signal becomes low level;
Wherein, the output level of the identification signal that puts in order of any slave device is the identification that puts in order of next slave device The incoming level of signal.
Optionally, the method further includes:
After slave device recognizes own device address, the response frame of the addressable broadcast is fed back to main equipment;
After main equipment receives the response frame, the addressable broadcast of next address is sent to each slave device.
Optionally, the method further includes:
Before main equipment initiating equipment addressing of address flow, each slave device generates the identification signal that puts in order respectively, and The incoming level of the current identification signal that itself puts in order is set as vacant state.
Optionally, the method further includes:
Before main equipment sends addressable broadcast, slave device detects whether the edit instruction there are own device address;
If so, in the addressable broadcast for receiving main equipment transmission, Address Recognition in the addressable broadcast is set for itself Standby address.
Optionally, the method further includes:
Main equipment is after the addressable broadcast of preset times is continuously transmitted, if not receiving the response of slave device feedback addressable broadcast Frame, it is determined that the current device address distribution for having completed all slave devices.
Further, to achieve the above object, the present invention also provides a kind of breaker, the breaker includes:One master Equipment and multiple slave devices, the main equipment include first memory, first processor and are stored in the first memory Device address distribution program that is upper and being run in the second processor;The slave device includes second memory, second Processor and it is stored in the device address distribution program that can be run on the second memory and in the second processor; The device address distribution program is realized when being performed by the first processor or second processor as described in any one of the above embodiments Can automatic dispensing device address code method the step of.
Optionally, main equipment is attached by contact pin with each slave device and is arranged according to physical sequential and use string Row bus communicates;The main equipment have communication function simultaneously can will respectively from the device data upload internet terminal;It is described Slave device for control electrical circuit break-make and acquisition electricity consumption loop data and analyze electricity consumption situation with electrical circuit;Its In, different slave devices, which corresponds to, controls the different break-makes with electrical circuit.
Optionally, the edit instruction is as produced by manually pressing device address editing key, and the device address is edited Key be located at physical arrangement sequence for it is primary from the device.
Further, to achieve the above object, the present invention also provides a kind of computer readable storage medium, the computers Device address distribution program is stored on readable storage medium storing program for executing, is realized such as when the device address distribution program is executed by processor It is described in any one of the above embodiments can automatic dispensing device address code method the step of.
The present invention realizes the automatic distribution of slave device address by the way of the automatic identification of device address, is specially set by master Preparation plays addressing flow, and sends addressable broadcast to each slave device;The slave device of unallocated device address is receiving addressable broadcast Afterwards, whether the incoming level for judging the identification signal that puts in order of itself is vacant state or high level state;If hanging shape State or high level state, then slave device address in current addressable broadcast is automatically recognized as own device address, and then realize Slave device address is distributed automatically under principal and subordinate's serial ports pattern, improves flexibility and the convenience of multiple slave device address distribution.
Description of the drawings
Fig. 1 is the high-level schematic functional block diagram of one embodiment of breaker of the present invention;
Fig. 2 is the structure diagram of device hardware running environment that the embodiment of the present invention is related to;
Fig. 3 be the present invention can automatic dispensing device address code method first embodiment flow diagram;
Fig. 4 be the present invention can automatic dispensing device address code one embodiment of method the signal of address distribution principle Figure;
Fig. 5 be the present invention can automatic dispensing device address code method second embodiment flow diagram;
Fig. 6 be the present invention can automatic dispensing device address code method 3rd embodiment flow diagram.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that specific embodiment described herein is not intended to limit the present invention only to explain the present invention.
With reference to Fig. 1, Fig. 1 is the high-level schematic functional block diagram of one embodiment of breaker of the present invention.
In the present embodiment, breaker includes a main equipment 10 and multiple slave devices 20, main equipment 10 and each slave device 20 And it is attached by contact pin between each slave device 20 and is arranged according to physical sequential;Such as according to from left to right or from The right side to a left side being ranked sequentially, wherein, it is unlimited for position of the main equipment 10 in each slave device 20, either be arranged in respectively from It before equipment 20 or is arranged between each slave device 20, can also be and be arranged in after each slave device 20.
It is communicated between main equipment 10 and each slave device 20 using universal serial bus;Main equipment 10 has communication function and simultaneously may be used Data in each slave device 20 are uploaded into internet terminal;Slave device 20 is returned for the break-make of control electrical circuit and acquisition electricity consumption Circuit-switched data simultaneously analyzes electricity consumption situation with electrical circuit;Such as electric current, voltage, power in acquisition electrical circuit etc., and then analyze With the presence or absence of over current fault, over-voltage fault, short trouble lamp.Wherein, the control of different slave devices 20 correspondence is different uses electrical circuit Break-make.
In the present invention, since breaker is there are multiple slave devices 20, to it is different be managed with electrical circuit when, It needs to distinguish different slave devices 20 by device address, thus needs to each 20 distributing equipment address of slave device.
Further, Fig. 2 is the structure diagram of device hardware running environment that the embodiment of the present invention is related to, and is such as schemed Shown in 2,10/ slave device 20 of main equipment can include:Processor 1001, such as CPU, communication bus 1002, user interface 1003, Network interface 1004, memory 1005.Wherein, communication bus 1002 is used to implement the connection communication between these components.User Interface 1003 can include display screen (Display), input unit such as keyboard (Keyboard), and optional user interface 1003 is also It can include standard wireline interface and wireless interface.Network interface 1004 can optionally include the wireline interface, wireless of standard Interface (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory or the memory (non-of stabilization Volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 Storage device.It should be noted that processor 1001 is mounted on 10/ slave device 20 of main equipment using embedded chip mode It is interior.
It will be understood by those skilled in the art that the hardware configuration of 10/ slave device 20 of main equipment shown in Figure 2 is not formed Restriction to 10/ slave device 20 of main equipment, can include than illustrate more or fewer components or the certain components of combination or The different component arrangement of person.
As shown in Fig. 2, as operating system, net can be included in a kind of memory 1005 of computer readable storage medium Network communication module, Subscriber Interface Module SIM and device address distribution program.Wherein, operating system is management and control main equipment 10/ slave device 20 and the program of software resource, support network communication module, Subscriber Interface Module SIM, device address distribution program with And the operation of other programs or software;Network communication module is used to managing and controlling network interface 1002;Subscriber Interface Module SIM is used In management and control user interface 1003.
In 10/ slave device of main equipment, 20 hardware configuration shown in Fig. 2, after network interface 1004 is mainly used for connection system Platform, with system background into row data communication;User interface 1003 is mainly used for connecting client (user terminal), is carried out with client Data communicate;10/ slave device 20 of main equipment calls the device address stored in memory 1005 to distribute journey by processor 1001 Sequence, and perform following operate:
Main equipment sends addressable broadcast to each slave device;
After the slave device of unallocated device address receives the addressable broadcast, the current identification letter that puts in order of itself is judged Number incoming level whether be vacant state or predetermined level state;
If so, Address Recognition in the addressable broadcast is own device address by the slave device;
If it is not, then the slave device waits for the addressable broadcast of main equipment transmission next address.
Further, when the predetermined level state is high level, 10/ slave device 20 of main equipment passes through processor The device address distribution program stored in 1001 calling memories 1005 also performs following operation:
After each slave device receives the first frame addressable broadcast of main equipment transmission, by the current identification that puts in order of itself The output level of signal becomes low level;
After slave device recognizes own device address, the output level of the current identification signal that puts in order of itself is become For high level;
Wherein, the output level of the identification signal that puts in order of any slave device is the identification that puts in order of next slave device The incoming level of signal.
Further, when the predetermined level state is low level, 10/ slave device 20 of main equipment passes through processor The device address distribution program stored in 1001 calling memories 1005 also performs following operation:
After each slave device receives the first frame addressable broadcast of main equipment transmission, by the current identification that puts in order of itself The output level of signal becomes high level;
After slave device recognizes own device address, the output level of the current identification signal that puts in order of itself is become For low level;
Wherein, the output level of the identification signal that puts in order of any slave device is the identification that puts in order of next slave device The incoming level of signal.
Further, 10/ slave device 20 of main equipment calls what is stored in memory 1005 to set by processor 1001 Standby address assignment routine also performs following operation:
After slave device recognizes own device address, the response frame of the addressable broadcast is fed back to main equipment;
After main equipment receives the response frame, the addressable broadcast of next address is sent to each slave device.
Further, 10/ slave device 20 of main equipment calls what is stored in memory 1005 to set by processor 1001 Standby address assignment routine also performs following operation:
Before main equipment initiating equipment addressing of address flow, each slave device generates the identification signal that puts in order respectively, and The incoming level of the current identification signal that itself puts in order is set as vacant state.
Further, 10/ slave device 20 of main equipment calls what is stored in memory 1005 to set by processor 1001 Standby address assignment routine also performs following operation:
Before main equipment sends addressable broadcast, slave device detects whether the edit instruction there are own device address;
If so, in the addressable broadcast for receiving main equipment transmission, Address Recognition in the addressable broadcast is set for itself Standby address.
Further, 10/ slave device 20 of main equipment calls what is stored in memory 1005 to set by processor 1001 Standby address assignment routine also performs following operation:
Main equipment is after the addressable broadcast of preset times is continuously transmitted, if not receiving the response of slave device feedback addressable broadcast Frame, it is determined that the current device address distribution for having completed all slave devices.
Based on above-mentioned hardware configuration, propose the present invention can automatic dispensing device address code method following each reality Apply example.
With reference to Fig. 3, Fig. 3 be the present invention can automatic dispensing device address code method first embodiment flow signal Figure.In the present embodiment, it is described can the method for automatic dispensing device address code include the following steps:
Step S10, main equipment send addressable broadcast to each slave device;
In the present embodiment, main equipment is by universal serial bus, each slave device addressable broadcast being handed down on universal serial bus, with It finds and the corresponding slave device in address in current addressable broadcast.
The present embodiment is unlimited for the concrete form and content of addressable broadcast.It should be noted that it is carried in addressable broadcast There is addressable address, and the addressable address is to need to distribute to the device address of slave device, and an addressable broadcast corresponds to distribution one The device address of a slave device.
Step S20, after the slave device of unallocated device address receives the addressable broadcast, judge it is current itself arrangement it is suitable Whether the incoming level of sequence identification signal is vacant state or predetermined level state;
In the present embodiment, the slave device of distributing equipment address need not do any processing after receiving addressable broadcast, and right In unallocated device address slave device after the addressable broadcast for receiving main equipment transmission, need further again to judge it is current from Whether the incoming level of the identification signal that puts in order of body is vacant state or is predetermined level state, such as high level state Or low level state.
Wherein, preferably using vacant state as the mark for being arranged in primary slave device identification own device address, and The mark of own device address is identified using high level or low level state as other the non-primary slave devices that sort.
Optionally, after the slave device of unallocated device address recognizes own device address, to the current arrangement of itself The output level of sequence identification signal changes, and then the slave device to change the unallocated device address of arrangement behind Incoming level state.For example low and high level or low level state are changed to by vacant state or is changed by low level state Low level state is changed to for high level state or by high level state.
Step S30, if vacant state or predetermined level state, then the slave device knows address in the addressable broadcast It Wei not own device address;If not vacant state or predetermined level state, then the slave device does not process and master is waited for set Preparation send the addressable broadcast of next address.
In the present embodiment, if the slave device of unallocated device address determines the input electricity of the identification signal that puts in order of itself It puts down as vacant state or predetermined level state, then by the addressable address carried in current addressable broadcast with being identified as equipment of itself Location., whereas if being not vacant state or predetermined level state, then it is not distribution to illustrate the device address in current addressable broadcast To this slave device, because without carrying out any processing, only needing to wait for the addressable broadcast that main equipment sends next address.
The present embodiment realizes the automatic distribution of slave device address by the way of the automatic identification of device address, specially by leading Equipment initiates addressing flow, and sends addressable broadcast to each slave device;The slave device of unallocated device address is receiving addressing extensively After broadcasting, whether the incoming level for judging the identification signal that puts in order of itself is vacant state or high level state;If hanging State or high level state, then address in current addressable broadcast is automatically recognized as own device address by slave device, and then is realized Under principal and subordinate's serial ports pattern distribute slave device address automatically, improve the flexibilities of multiple slave device addresses distribution with it is convenient Property.
In an embodiment of the present invention, to realize that the device address of multiple slave devices is distributed, therefore automatically in each slave device Middle to introduce the identification signal that puts in order, the output level of the identification signal that puts in order of any slave device is the row of next slave device The incoming level of row sequence identification signal, as shown in Figure 4.This put in order identification signal either external equipment generate, Can be that slave device itself generates, wherein, TX represents to upload data, RX expression reception data.
Embodiment one:It is vacant state based on incoming level, to sorting, primary slave device distributes address
Before main equipment initiating equipment addressing of address flow namely main equipment is sending first frame addressing to each slave device Before broadcast, each slave device generates the identification signal that puts in order respectively, and by the incoming level for the identification signal that itself puts in order It is set as vacant state.
Each slave device receive main equipment transmission first frame addressable broadcast after, and recognize own device address it Before, the output level of the identification signal that puts in order of itself is become into low level or high level, so that sequence is primary The incoming level of other each slave devices after slave device sequence all accordingly becomes low level or high level.
When sort primary incoming level of the slave device based on the identification signal that itself puts in order for vacant state incite somebody to action Address Recognition is after own device address in first frame addressable broadcast, by the output level of the identification signal that puts in order of itself by Low level or high level, correspondence becomes high level or low level, so that the incoming level phase for the deputy slave device that sorts It strains as high level or low level, and the incoming level of other each slave devices after the second that sorts is still maintained as low level Or high level.
Embodiment two:It is high level based on incoming level, to sorting, non-primary slave device distributes address
When predetermined level state is high level, each slave device of unallocated device address is receiving main equipment transmission After addressable broadcast, whether the output level for judging the current identification signal that puts in order of itself is high level, if so, will be current Address Recognition in the addressable broadcast received is own device address, and the output of the identification signal that puts in order of itself is electric It is flat that high level is become from low level, so that the incoming level of the slave device after the sequence of this slave device accordingly becomes high electricity It is flat.
Embodiment three:It is low level based on incoming level, to sorting, non-primary slave device distributes address
When predetermined level state is low level, each slave device of unallocated device address is receiving main equipment transmission After addressable broadcast, whether the output level for judging the current identification signal that puts in order of itself is low level, if so, will be current Address Recognition in the addressable broadcast received is own device address, and the output of the identification signal that puts in order of itself is electric It is flat that low level is become from high level, so that the incoming level of the slave device after the sequence of this slave device accordingly becomes low electricity It is flat.
With reference to Fig. 5, Fig. 5 be the present invention can automatic dispensing device address code method second embodiment flow signal Figure.In the present embodiment, it is described can the method for automatic dispensing device address code include the following steps:
After slave device recognizes own device address, the response of the addressable broadcast is fed back to main equipment by step S40 Frame;
After main equipment receives the response frame, the addressable broadcast of next address is sent to each slave device by step S50.
In the present embodiment, slave device is by Address Recognition in current addressable broadcast after own device address, to be sent out to main equipment The response frame of current addressable broadcast is sent, main equipment continues to send seeking for next address to each slave device after response frame is received It broadcasts location.
Optionally, main equipment is after the addressable broadcast of preset times is continuously transmitted, if it is wide not receive slave device feedback addressing The response frame broadcast, it is determined that the current device address distribution for having completed all slave devices.For example, main equipment is receiving response frame Afterwards, when retransmiting the addressable broadcast of next address, if after continuously transmitting 5 identical or different addressable broadcasts, not receiving and appointing The response frame of what slave device feedback, it is determined that the current device address distribution for having completed all slave devices.
For example, be illustrated by high level state of predetermined level, wherein, breaker includes 1 main equipment and 3 According to the slave device of physical sequential arrangement connection, then the device address assigning process of each slave device is as follows:
(1) each slave device generates the identification signal that puts in order respectively, and the input for the identification signal that itself puts in order is electric It is flat to be set as vacant state, for example slave device is powered on into generated signal as the identification signal that puts in order;
(2) main equipment sends first frame addressable broadcast to each slave device, and each slave device enters automatic address after receiving and sets State, and the output level of the current identification signal that puts in order of itself is set as low level state, so that in addition to sequence The incoming level of the identification signal that puts in order of other slave devices except primary slave device is all changed to low level;
(3) each slave device judges whether the incoming level of the current identification signal that puts in order of itself is vacant state respectively Or predetermined level state (high level state), wherein, its current identification signal that puts in order of the primary slave device that sorts Incoming level is vacant state, and the incoming level for its current identification signal that puts in order of second and third slave device that sorts For low level state, therefore, the primary slave device that sorts automatically sets the Address Recognition in first frame addressable broadcast for itself Standby address, and to the response frame of main equipment feedback first frame addressable broadcast;
The primary slave device that sorts simultaneously is by the output level of the current identification signal that puts in order of itself by low level Status Change is high level state, so that the identification signal incoming level also phase that puts in order for the deputy slave device that sorts It should be changed to high level state and the identification signal incoming level that puts in order of the slave device for third position of sorting remains as low electricity It is flat;
(4) after main equipment receives the response frame of first frame addressable broadcast, continue to send the addressing of the second frame to each slave device Broadcast;
(5) the primary slave device of sorting receives without any processing after the second frame addressable broadcast, and sorts second and third After the slave device of position receives the second frame addressable broadcast, the incoming level of the current identification signal that puts in order of itself is judged respectively Whether it is vacant state or predetermined level state (high level state);Wherein, its current arrangement of the deputy slave device that sorts The incoming level of sequence identification signal is high level state, and the slave device for third position of sorting its current identification letter that puts in order Number incoming level for low level state, therefore, the deputy slave device that sorts is automatically by the address in the second frame addressable broadcast Own device address is identified as, and the response frame of the second frame addressable broadcast is fed back to main equipment;
The deputy slave device that sorts simultaneously is by the output level of the current identification signal that puts in order of itself by low level Status Change is high level state namely so that the identification signal incoming level also phase that puts in order of the slave device of sequence third position It should be changed to high level state;
(6) after main equipment receives the response frame of the second frame addressable broadcast, continue to send the addressing of third frame to each slave device Broadcast;
(7) slave device of first and second of sorting receives without any processing after third frame addressable broadcast, and the third that sorts After the slave device of position receives third frame addressable broadcast, whether the incoming level of the current identification signal that puts in order of itself of judgement For vacant state or predetermined level state (high level state);Wherein, the slave device of sequence third position its current put in order The incoming level of identification signal is high level state, and therefore, the slave device of sequence third position automatically will be in third frame addressable broadcast Address Recognition for own device address, and to the response frame of main equipment feedback third frame addressable broadcast.
By above-mentioned each process flow, and then complete the device address distribution of each slave device.And for more than 3 or more from The device address method of salary distribution of equipment and so on, it is distributed automatically.
With reference to Fig. 6, Fig. 6 be the present invention can automatic dispensing device address code method 3rd embodiment flow signal Figure.In the present embodiment, it is described can the method for automatic dispensing device address code include the following steps:
Step S01, before main equipment sends addressable broadcast, slave device detects whether the editor there are own device address Instruction;
Step S02, if so, in the addressable broadcast for receiving main equipment transmission, by Address Recognition in the addressable broadcast For own device address.
The preferred edit instruction of the present embodiment is as produced by manually pressing device address editing key, and the device address is edited Key be located at physical arrangement sequence for it is primary from the device.
In the present embodiment, multiple slave devices specifically according to the physical arrangement sequential system between slave device, are sequentially completed and set The automatic distribution of standby address, for the device address method of salary distribution for the primary slave device that sorts, either by manually It completes or by slave device itself automatic identification completion according to the level state of input signal.
The present invention also provides a kind of computer readable storage mediums.
Device address distribution program, the device address distribution program are stored on computer readable storage medium of the present invention When being executed by processor realize as described in above-mentioned any embodiment can automatic dispensing device address code method step Suddenly.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme of the present invention substantially in other words does the prior art Going out the part of contribution can be embodied in the form of software product, which is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), used including some instructions so that a station terminal (can be mobile phone, computer services Device, air conditioner or network equipment etc.) perform method described in each embodiment of the present invention.
The embodiment of the present invention is described above in conjunction with attached drawing, but the invention is not limited in above-mentioned specific Embodiment, above-mentioned specific embodiment is only schematical rather than restricted, those of ordinary skill in the art Under the enlightenment of the present invention, present inventive concept and scope of the claimed protection are not being departed from, can also made very much Form, every equivalent structure or equivalent flow shift made using description of the invention and accompanying drawing content, directly or indirectly Other related technical areas are used in, these are belonged within the protection of the present invention.

Claims (10)

1. it is a kind of can automatic dispensing device address code method, applied to breaker, which is characterized in that the breaker packet Include a main equipment and multiple slave devices;It the described method comprises the following steps:
Main equipment sends addressable broadcast to each slave device;
After the slave device of unallocated device address receives the addressable broadcast, the current identification signal that puts in order of itself is judged Whether incoming level is vacant state or predetermined level state;
If so, Address Recognition in the addressable broadcast is own device address by the slave device;
If it is not, then the slave device waits for the addressable broadcast of main equipment transmission next address.
2. the method as described in claim 1, which is characterized in that when the predetermined level state is high level, the method It further includes:
After each slave device receives the first frame addressable broadcast of main equipment transmission, by the current identification signal that puts in order of itself Output level become low level;After slave device recognizes own device address, by the current identification letter that puts in order of itself Number output level become high level;
When the predetermined level state is low level, the device address distribution method further includes:
After each slave device receives the first frame addressable broadcast of main equipment transmission, by the current identification signal that puts in order of itself Output level become high level;After slave device recognizes own device address, by the current identification letter that puts in order of itself Number output level become low level;
Wherein, the output level of the identification signal that puts in order of any slave device is the identification signal that puts in order of next slave device Incoming level.
3. the method as described in claim 1, which is characterized in that the method further includes:
After slave device recognizes own device address, the response frame of the addressable broadcast is fed back to main equipment;
After main equipment receives the response frame, the addressable broadcast of next address is sent to each slave device.
4. method as claimed in claim 2, which is characterized in that the method further includes:
Before main equipment initiating equipment addressing of address flow, each slave device generates the identification signal that puts in order respectively, and ought The preceding incoming level for itself putting in order identification signal is set as vacant state.
5. the method as described in claim 1, which is characterized in that the method further includes:
Before main equipment sends addressable broadcast, slave device detects whether the edit instruction there are own device address;
If so, in the addressable broadcast for receiving main equipment transmission, by Address Recognition in the addressable broadcast for equipment of itself Location.
6. the method as described in claim 1, which is characterized in that the method further includes:
Main equipment is after the addressable broadcast of preset times is continuously transmitted, if not receiving the response frame of slave device feedback addressable broadcast, Then determine the current device address distribution for having completed all slave devices.
7. a kind of breaker, which is characterized in that the breaker includes:One main equipment and multiple slave devices, the main equipment Including first memory, first processor and it is stored on the first memory and can be run in the second processor Device address distribution program;The slave device includes second memory, second processor and is stored in second storage On device and the device address distribution program that can be run in the second processor;The device address distribution program is by described Realized when one processor or second processor perform as described in any one of claim 1-6 can automatic dispensing device communicatively The step of method of location code.
8. breaker as claimed in claim 7, which is characterized in that main equipment and each slave device be attached by contact pin and by It is arranged according to physical sequential and is communicated using universal serial bus;The main equipment has communication function simultaneously can be by each slave device Middle data upload internet terminal;The slave device is used for the break-make of control electrical circuit and acquires electricity consumption loop data and divide The electricity consumption situation of analysis electrical circuit;Wherein, different slave devices, which corresponds to, controls the different break-makes with electrical circuit.
9. breaker as claimed in claim 7, which is characterized in that the edit instruction is by manually pressing device address editing key It is produced, and the device address editing key be located at physical arrangement sequence for it is primary from the device.
10. a kind of computer readable storage medium, which is characterized in that on the computer readable storage medium with being stored with equipment Location distribution program is realized when the device address distribution program is executed by processor as described in any one of claim 1-6 Can automatic dispensing device address code method the step of.
CN201810120379.8A 2018-02-02 2018-02-02 Can automatic dispensing device address code method, breaker and storage medium Active CN108270883B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810120379.8A CN108270883B (en) 2018-02-02 2018-02-02 Can automatic dispensing device address code method, breaker and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810120379.8A CN108270883B (en) 2018-02-02 2018-02-02 Can automatic dispensing device address code method, breaker and storage medium
PCT/CN2018/080982 WO2019148623A1 (en) 2018-02-02 2018-03-29 Method capable of automatically assigning device communication address code, circuit breaker, and storage medium

Publications (2)

Publication Number Publication Date
CN108270883A true CN108270883A (en) 2018-07-10
CN108270883B CN108270883B (en) 2019-11-15

Family

ID=62773693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810120379.8A Active CN108270883B (en) 2018-02-02 2018-02-02 Can automatic dispensing device address code method, breaker and storage medium

Country Status (2)

Country Link
CN (1) CN108270883B (en)
WO (1) WO2019148623A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377871A (en) * 2019-06-12 2019-10-25 深圳市智莱科技股份有限公司 Determine the method and system of secondary cabinet position in Intelligent storage cabinet system
CN111131542A (en) * 2019-12-26 2020-05-08 上海派能能源科技股份有限公司 Battery address management method and battery management system
CN111225081A (en) * 2020-01-08 2020-06-02 南方电网科学研究院有限责任公司 Address allocation method of gas density monitoring system and gas density monitoring system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102006018163A1 (en) * 2006-04-19 2007-10-25 Siemens Ag Method for automatic address assignment
CN101625670A (en) * 2009-07-30 2010-01-13 深圳市中联创新自控系统有限公司 Serial bus device, serial bus transmission system and method
CN102354181A (en) * 2011-08-03 2012-02-15 韦自力 Control system based on field bus and method for addressing addresses for bus equipment
CN103500154A (en) * 2013-09-11 2014-01-08 深圳市摩西尔电子有限公司 Serial bus interface chip, serial bus transmission system and method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10498319B2 (en) * 2015-09-11 2019-12-03 Skyworks Solutions, Inc. Device including multi-mode input pad

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102006018163A1 (en) * 2006-04-19 2007-10-25 Siemens Ag Method for automatic address assignment
CN101625670A (en) * 2009-07-30 2010-01-13 深圳市中联创新自控系统有限公司 Serial bus device, serial bus transmission system and method
CN102354181A (en) * 2011-08-03 2012-02-15 韦自力 Control system based on field bus and method for addressing addresses for bus equipment
CN103500154A (en) * 2013-09-11 2014-01-08 深圳市摩西尔电子有限公司 Serial bus interface chip, serial bus transmission system and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110377871A (en) * 2019-06-12 2019-10-25 深圳市智莱科技股份有限公司 Determine the method and system of secondary cabinet position in Intelligent storage cabinet system
CN110377871B (en) * 2019-06-12 2021-04-13 深圳市智莱科技股份有限公司 Method and system for determining position of auxiliary cabinet in intelligent locker system
CN111131542A (en) * 2019-12-26 2020-05-08 上海派能能源科技股份有限公司 Battery address management method and battery management system
CN111225081A (en) * 2020-01-08 2020-06-02 南方电网科学研究院有限责任公司 Address allocation method of gas density monitoring system and gas density monitoring system
WO2021139110A1 (en) * 2020-01-08 2021-07-15 南方电网科学研究院有限责任公司 Address allocation method for gas density monitoring system and gas density monitoring system

Also Published As

Publication number Publication date
WO2019148623A1 (en) 2019-08-08
CN108270883B (en) 2019-11-15

Similar Documents

Publication Publication Date Title
CN108270883A (en) Can automatic dispensing device address code method, breaker and storage medium
US6990379B2 (en) Method and apparatus for providing a dynamic resource role model for subscriber-requester based protocols in a home automation and control system
CN105759937A (en) Method for lowering terminal power consumption and terminal
CN102571996B (en) IP (Internet Protocol) address assignment method, IP address assignment device and network system
CN101438258A (en) Adapter to convert USB device into WUSB device
CN203278883U (en) Protocol conversion device
CN108234220A (en) The distribution method, apparatus and system of smart machine
CN101951665A (en) Routing method of double-card mobile terminal and double-card mobile terminal
CN103179636A (en) Mobile internet access node, system and partner finding method of system
CN103166765A (en) Power over ethernet (PoE) power gating switchover method and device
CN105848235A (en) Communication control method and device
CN105357664A (en) Wireless control system and data communication method thereof
CN208015725U (en) Multi-line system
CN103533668B (en) The method of the concurrent networked data transmission passage of orderly management multi-channel A PN
CN109981360A (en) Internet of things equipment website activating method, device, system and storage medium
CN105451215A (en) Communication method and electronic device
CN107181653A (en) Intelligent home device match somebody with somebody network method and intelligent domestic system
CN108418606A (en) Data transmission method for uplink and device, multi-line system
CN103376369B (en) The method of testing of communication load and device
CN103974224A (en) Credit control method and equipment
CN110784365A (en) Standby device of station control layer and entity device of transformer substation and automatic online method thereof
CN106997179A (en) The method and intelligence control system of intelligent control platform management equipment
CN109788325A (en) Video task distribution method and server
CN108709290A (en) Network-building method and device, the storage medium and processor of air-conditioning system
CN108055660A (en) The method and internet-of-things terminal of data are transmitted in network channel

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