CN108234684A - The method and system of configuration address - Google Patents
The method and system of configuration address Download PDFInfo
- Publication number
- CN108234684A CN108234684A CN201611189507.1A CN201611189507A CN108234684A CN 108234684 A CN108234684 A CN 108234684A CN 201611189507 A CN201611189507 A CN 201611189507A CN 108234684 A CN108234684 A CN 108234684A
- Authority
- CN
- China
- Prior art keywords
- address
- slave computer
- configuration
- computer
- slave
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5046—Resolving address allocation conflicts; Testing of addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
This application discloses a kind of method and system of configuration address, wherein, bus connects between host computer and several slave computers, and using the output of previous item slave computer as the input of latter slave computer, the method for the configuration address includes:The address of each slave computer is reset, and disables the output of each slave computer;The input of the first slave computer is enable to be used, the address of the first slave computer is configured, the output of the first slave computer is enable to be used;The address of latter slave computer is configured, the output of latter slave computer is enable to be used;Recycle current procedures.It is unified to slave computer cycle assignment address by host computer according to technical solution provided by the embodiments of the present application, it can solve the problems, such as that address easily repetition and workload that traditional manual writing address is brought are heavy.
Description
Technical field
The disclosure relates generally to network communication field more particularly to the method and system of configuration address.
Background technology
Field is sorted in logistics, is related to multiple slave computers.It is write manually in advance for most use of address configuration of slave computer
Enter the mode of address, aforesaid way easily leads to address repetition.The repetition of address in order to prevent when setting address, needs to unite in advance
The address of each slave computer is counted, this brings no small workload again.
Invention content
In view of drawbacks described above of the prior art or deficiency, it is unified to slave computer distribution address to be intended to provide a kind of host computer
Method, to achieve these goals, provide a kind of method and system of configuration address.
In a first aspect, providing a kind of method of configuration address, bus connects between host computer and several slave computers, by before
Input of the output of one slave computer as latter slave computer, method include:
The address of each slave computer is reset, and disables the output of each slave computer;
The input of the first slave computer is enable to be used, the address of the first slave computer is configured, the output of the first slave computer is enable to be used;
The address of latter slave computer is configured, the output of latter slave computer is enable to be used;Recycle current procedures.
Second aspect provides a kind of system of configuration address, and bus connects between host computer and several slave computers, by before
Input of the output of one slave computer as latter slave computer, system include:
Initialization unit:It is configured to reset the address of each slave computer, and disables the output of each slave computer;
Configuration address unit:It is configured to that the input of the first slave computer is enable to be used, the address of the first slave computer is configured, make the
The output of one slave computer can be used;
Loop configuration unit:The address of configuration latter slave computer is configured to, the output of latter slave computer is enable to be used;
Recycle current procedures.
It is unified to slave computer cycle assignment address, energy by host computer according to technical solution provided by the embodiments of the present application
Enough solve the problems, such as that address easily repetition and workload that traditional manual writing address is brought are heavy.Further, according to the application
Some embodiments judge whether the address information of first slave computer is empty and whether input is available by setting and are configured ground
Location condition, moreover it is possible to solve that a slave computer is only configured every time, obtain the effect of no repeat to address (RA).In addition, according to the application certain
A little embodiments, by way of returning to response after slave computer configuration address, moreover it is possible to solve inquiry slave computer failure problems, be matched
The effect of the failure of slave computer can be detected while putting address.
Description of the drawings
By reading the detailed description made to non-limiting example made with reference to the following drawings, the application's is other
Feature, objects and advantages will become more apparent upon:
Fig. 1 shows the exemplary system architecture that can apply the embodiment of the present application;
Fig. 2 shows the exemplary process diagrams of the method for the configuration address according to the embodiment of the present application;
Fig. 3 shows the exemplary block diagram of the system of the configuration address according to the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, illustrated only in attached drawing with inventing relevant part.
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
For the ease of understanding the method for the configuration address of the application, 1 application scenarios explanation below in conjunction with the accompanying drawings.
It please refers to Fig.1, shows the exemplary system architecture that can apply the embodiment of the present application.
As shown in Figure 1, system includes a host computer 11 and three slave computers, slave computer includes slave computer 12a, slave computer
12b and slave computer 12c, using 485 bus communication modes between host computer 11 and slave computer, slave computer can be used MAX485 or
MAX489 chips export the characteristic of Enable Pin and driver output Enable Pin using receiver, by the output of previous item slave computer
As the input of latter slave computer, so that previous item slave computer can control whether the input of latter slave computer can be used.
Then, it please refers to Fig.2, shows the exemplary process diagram of the method for configuration address according to the embodiment of the present application.
As shown in Fig. 2, in a step 101, resetting the address of each slave computer, and disable the output of each slave computer.
The starting stage of configuration address, the address of each slave computer is reset, while disable the output of each slave computer, to carry out
Subsequent address configuration.Its generation initialization program code is referring to table 1.
Table 1
Then, in a step 102, the input of the first slave computer is enable to be used, the address of the first slave computer is configured, makes under first
The output of position machine can be used.
After initialization, the input of the first slave computer is enable to be used, which is slave computer 12A.Its program code
Referring to table 2.
Table 2
Slave computer 12A | Slave computer 12B | Slave computer 12C | |
Open state | Pin_in:H | Pin_in:L | Pin_in:L |
Then, the address of slave computer 12A is configured in host computer 11, and the output of the first slave computer is set as available.Its program
Code is referring to table 3, and because slave computer 12A meets configuration address condition in table 3, address 0x01 is allocated to itself by slave computer 12A.
Preferably, include before the address of slave computer is configured:Whether the address information for judging slave computer is empty and input is
It is no available, if meeting simultaneously, the address of slave computer is configured.After the setting of initialized and table 2, in this configuration, only under
Position machine 12A meets the condition of above-mentioned configuration address, and the input of slave computer 12B and slave computer 12C are unavailable, are unsatisfactory for configuration ground
Location condition must not be into the configuration of row address.
Table 3
In some preferred embodiments, the address that slave computer is configured includes later:Answering for configuration address is sent to host computer
Answer information.
In the present embodiment, after slave computer 12A configuration address, configuration result is returned into host computer 11, so as to host computer 11
Subsequent configuration or processing are carried out according to response message.
Preferably, host computer repeats with sending the current-configuration of preset times when preset time does not receive response message
Location, it is still unresponsive, then stop the configuration of this address, show the fault message of slave computer.
Specifically, it when host computer 11 does not receive the successful response of address configuration in preset time, sends currently match again
Address is put, does not receive the response in preset time, aforesaid operations are repeated to preset times, it is still unresponsive, then stop this ground
The configuration of location prompts slave computer 12A to break down.Staff replaces failure slave computer in time according to prompting;Match if receiving
When putting successful response, by the configuration to latter slave computer 12B into row address.
Then, in step 103, the address of latter slave computer is configured, the output of latter slave computer is enable to be used;Cycle
Current procedures.
After slave computer 12A addresses are configured in success, slave computer 12B and slave computer 12C is configured in host computer 11.Its program code is joined
4 are shown in Table, as shown in table 4 in this configuration, only slave computer 12B meets this configuration address condition, and address 0x02 is paid down
Position machine 12B, and the input of slave computer 12C is enable to be used using the available mode of output of setting slave computer 12B.At this point, slave computer
The address of 12A is not sky, and the input of slave computer 12C is unavailable, and therefore, slave computer 12A and slave computer 12C are unsatisfactory for configuration address
Condition and without the configuration of address.The address of similar fashion configuration slave computer 12C.As it can be seen that each address configuration only has one
A slave computer meets the condition of configuration address, avoids the problem of address is repeated configuration.
Similarly, after slave computer 12A and slave computer 12C configuration address, response message is returned into host computer, so that host computer 11
Address configuration situation information is obtained in time, the slave computer quantity including counting configuration address.
Table 4
Preferably, each slave computer is provided with power-fail memory function battery, and the address information of configuration can be kept under power blackout situation.
Address is lost during device looses power in order to prevent, can power-fail memory function battery be set in slave computer.It eliminates power-off and gives whole system band
The harmful effect come.
On the other hand, disclosed herein as well is the systems of configuration address.
It please refers to Fig.3, shows the exemplary block diagram of the system of configuration address according to the embodiment of the present application.
As shown in figure 3, a kind of system 200 of configuration address, bus connects between host computer and several slave computers, will
Input of the output of previous item slave computer as latter slave computer, system include:
Initialization unit 210:It is configured to reset the address of each slave computer, and disables the output of each slave computer;
Configuration address unit 220:It is configured to that the input of the first slave computer is enable to be used, the address of the first slave computer is configured,
The output of the first slave computer is enable to be used;
Loop configuration unit 230:The address of configuration latter slave computer is configured to, makes the output of latter slave computer can
With;Recycle current procedures.
Preferably, configuration address unit 220 includes:Judging unit 221:The address information for being configured to judge slave computer is
It is no whether to can be used for empty and input, if meeting simultaneously, the address of slave computer is configured.
In some preferred embodiments, configuration address unit 220 includes:Response unit 222:It is configured to send out to host computer
Send the response message of configuration address.
Similarly, it before the latter slave computer configuration address of loop configuration unit 230, needs to judge whether to meet configuration address
Condition, be also equipped with judging unit 231.In addition, after the latter slave computer configuration address of loop configuration unit 230, also will
Response message is returned, therefore, is provided with response unit 232.
Preferably, host computer further includes alarm unit:Host computer is configured to when preset time does not receive response message,
The current-configuration address of transmission preset times is repeated, it is still unresponsive, then stop the configuration of this address, show the failure of slave computer
Information.The slave computer that staff judges to break down by the fault message, and replaced.
In some preferred embodiments, each slave computer is provided with power-fail memory function battery, may insure to match under power blackout situation
The address information put it is effective.
Flow chart and block diagram in attached drawing, it is illustrated that according to the system of various embodiments of the invention, method and computer journey
Architectural framework in the cards, function and the operation of sequence product.In this regard, each box in flow chart or block diagram can generation
The part of one module of table, program segment or code, a part for the module, program segment or code include one or more
The executable instruction of logic function as defined in being used to implement.It should also be noted that in some implementations as replacements, institute in box
The function of mark can also be occurred with being different from the sequence marked in attached drawing.For example, two boxes succeedingly represented are practical
On can perform substantially in parallel, they can also be performed in the opposite order sometimes, this is depended on the functions involved.Also
It is noted that the combination of each box in block diagram and/or flow chart and the box in block diagram and/or flow chart, Ke Yiyong
The dedicated hardware based systems of functions or operations as defined in execution is realized or can be referred to specialized hardware and computer
The combination of order is realized.
The preferred embodiment and the explanation to institute's application technology principle that above description is only the application.People in the art
Member should be appreciated that invention scope involved in the application, however it is not limited to the technology that the specific combination of above-mentioned technical characteristic forms
Scheme, while should also cover in the case where not departing from the inventive concept, it is carried out by above-mentioned technical characteristic or its equivalent feature
The other technical solutions for arbitrarily combining and being formed.Such as features described above has similar work(with (but not limited to) disclosed herein
The technical solution that the technical characteristic of energy is replaced mutually and formed.
Claims (10)
- A kind of 1. method of configuration address, which is characterized in that bus connects between host computer and several slave computers, by previous item Input of the output of slave computer as latter slave computer, the method includes:The address of each slave computer is reset, and disables the output of each slave computer;The input of the first slave computer is enable to be used, the address of the first slave computer is configured, the output of the first slave computer is enable to be used;The address of latter slave computer is configured, the output of latter slave computer is enable to be used;Recycle current procedures.
- 2. the method according to claim 1, which is characterized in that further included before the address of slave computer is configured:Whether the address information for judging the slave computer is empty and whether input can be used, if meeting simultaneously, the bottom is configured The address of machine.
- 3. the method according to claim 2, which is characterized in that include after the address of the configuration slave computer:The response message of configuration address is sent to host computer.
- 4. the method according to claim 3, which is characterized in that the host computer does not receive the response in preset time During information, repeat to send the current-configuration address of preset times, it is still unresponsive, then stop the configuration of this address, described in display The fault message of slave computer.
- 5. the method according to claim 1, which is characterized in that each slave computer is provided with power-fail memory function battery, The address information of configuration can be kept under power blackout situation.
- 6. a kind of system of configuration address, which is characterized in that bus connects between host computer and several slave computers, by previous item Input of the output of slave computer as latter slave computer, the system comprises:Initialization unit:It is configured to reset the address of each slave computer, and disables the output of each slave computer;Configuration address unit:It is configured to that the input of the first slave computer is enable to be used, the address of the first slave computer is configured, makes under first The output of position machine can be used;Loop configuration unit:The address of configuration latter slave computer is configured to, the output of latter slave computer is enable to be used;Cycle Current procedures.
- 7. the system according to claim 6, which is characterized in that the configuration address unit includes:Judging unit:Whether the address information for being configured to judge the slave computer is empty and whether input can be used, if full simultaneously The address of the slave computer is then configured in foot.
- 8. the system according to claim 7, which is characterized in that the configuration address unit includes:Response unit:It is configured to send the response message of configuration address to host computer.
- 9. the system according to claim 8, which is characterized in that the host computer includes alarm unit:It is configured to institute Host computer is stated when preset time does not receive the response message, repeat send preset times current-configuration address, still without answer It answers, then stops the configuration of this address, show the fault message of the slave computer.
- 10. the system according to claim 6, which is characterized in that each slave computer is provided with power-fail memory function battery, It may insure the effective of the address information of configuration under power blackout situation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611189507.1A CN108234684A (en) | 2016-12-21 | 2016-12-21 | The method and system of configuration address |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611189507.1A CN108234684A (en) | 2016-12-21 | 2016-12-21 | The method and system of configuration address |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108234684A true CN108234684A (en) | 2018-06-29 |
Family
ID=62651889
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611189507.1A Pending CN108234684A (en) | 2016-12-21 | 2016-12-21 | The method and system of configuration address |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108234684A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109474711A (en) * | 2018-10-31 | 2019-03-15 | 华霆(合肥)动力技术有限公司 | Address distribution method and battery management system |
CN109711143A (en) * | 2018-12-11 | 2019-05-03 | 北京云测信息技术有限公司 | A method of Android device is identified based on adb |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101355482A (en) * | 2008-09-04 | 2009-01-28 | 中兴通讯股份有限公司 | Equipment, method and system for implementing identification of embedded device address sequence |
CN101635637A (en) * | 2008-07-21 | 2010-01-27 | 江森自控楼宇设备科技(无锡)有限公司 | Method and system for distributing intelligent addresses based on serial bus |
JP4626349B2 (en) * | 2005-03-18 | 2011-02-09 | コニカミノルタホールディングス株式会社 | Hardware configuration device |
CN102354181A (en) * | 2011-08-03 | 2012-02-15 | 韦自力 | Control system based on field bus and method for addressing addresses for bus equipment |
CN105049551A (en) * | 2015-08-27 | 2015-11-11 | 赵忠义 | System and method for automatically distributing address via bus |
-
2016
- 2016-12-21 CN CN201611189507.1A patent/CN108234684A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4626349B2 (en) * | 2005-03-18 | 2011-02-09 | コニカミノルタホールディングス株式会社 | Hardware configuration device |
CN101635637A (en) * | 2008-07-21 | 2010-01-27 | 江森自控楼宇设备科技(无锡)有限公司 | Method and system for distributing intelligent addresses based on serial bus |
CN101355482A (en) * | 2008-09-04 | 2009-01-28 | 中兴通讯股份有限公司 | Equipment, method and system for implementing identification of embedded device address sequence |
CN102354181A (en) * | 2011-08-03 | 2012-02-15 | 韦自力 | Control system based on field bus and method for addressing addresses for bus equipment |
CN105049551A (en) * | 2015-08-27 | 2015-11-11 | 赵忠义 | System and method for automatically distributing address via bus |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109474711A (en) * | 2018-10-31 | 2019-03-15 | 华霆(合肥)动力技术有限公司 | Address distribution method and battery management system |
CN109711143A (en) * | 2018-12-11 | 2019-05-03 | 北京云测信息技术有限公司 | A method of Android device is identified based on adb |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103186466B (en) | Information interactive testing device and method based on association automatic generating test case | |
CN104598513B (en) | A kind of method of data flow control and system based on web page frame | |
CN103530186B (en) | Realize that camera applications support the method and system of multiposition storage | |
CN105786606A (en) | Data transferring method and system for intelligent terminals | |
CN109388562A (en) | Debug method and device, the system, storage medium, electronic device of pos machine | |
CN108052094A (en) | A kind of extension card identification method, device and frequency converter | |
CN104735176A (en) | PXE booting method and device and server single board | |
CN108234684A (en) | The method and system of configuration address | |
CN112184144A (en) | Intelligent equipment delivery method and system in network-free environment | |
CN111756858B (en) | Remote development processing system, method and device for embedded equipment | |
CN104112206A (en) | Method and device for processing ticket information | |
CN106598530A (en) | Display panel configuration method and device | |
CN104065742A (en) | Picking-up person information processing method and device for safe kindergarten picking up | |
CN103678125A (en) | Method and system for debugging codes | |
CN108632211A (en) | A kind of binding method and device of smart machine | |
CN107181825A (en) | The on-line processing method of terminal device data | |
CN104484211B (en) | The method and device of shared image file | |
CN207367004U (en) | A kind of unmanned plane plug-in device recognition process unit | |
CN108694629A (en) | Method and Related product are recommended in the broadcasting of elevator card | |
CN107766070A (en) | A kind of service card upgrade method, device, equipment and computer-readable recording medium | |
CN106484417A (en) | A kind of the application list methods of exhibiting and device | |
CN103488549B (en) | Roll-back processing system and roll-back processing method for multi-mirror-image data | |
CN107463524A (en) | A kind of method and relevant device for accessing data | |
CN215814164U (en) | Chain loading module and chain loading equipment | |
CN110717752B (en) | Electronic resource processing method, device, server and readable storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180629 |
|
RJ01 | Rejection of invention patent application after publication |