CN114553829B - Automatic allocation method of multi-machine communication node address and multi-machine communication system - Google Patents

Automatic allocation method of multi-machine communication node address and multi-machine communication system Download PDF

Info

Publication number
CN114553829B
CN114553829B CN202011343210.2A CN202011343210A CN114553829B CN 114553829 B CN114553829 B CN 114553829B CN 202011343210 A CN202011343210 A CN 202011343210A CN 114553829 B CN114553829 B CN 114553829B
Authority
CN
China
Prior art keywords
extension
characteristic signal
broadcasting
assigning
feedback
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
CN202011343210.2A
Other languages
Chinese (zh)
Other versions
CN114553829A (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.)
Shandong University
Original Assignee
Shandong University
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 Shandong University filed Critical Shandong University
Priority to CN202011343210.2A priority Critical patent/CN114553829B/en
Publication of CN114553829A publication Critical patent/CN114553829A/en
Application granted granted Critical
Publication of CN114553829B publication Critical patent/CN114553829B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention provides an automatic address allocation method for a multi-machine communication node and a multi-machine communication system, wherein in a multi-machine communication system, a host is used for broadcasting to all extension machines, and then addresses are allocated quickly and conveniently through a dichotomy approach based on feedback.

Description

Automatic allocation method of multi-machine communication node address and multi-machine communication system
Technical Field
The invention relates to the field of communication, in particular to an automatic allocation method of multi-machine communication node addresses and a multi-machine communication system.
Background
RS-485 is as an electrical apparatus specification of multipoint differential data transmission, it adopts balanced sending and differential receiving mode to realize the communication, have the ability to restrain the common mode interference, the communication rate can reach 52Mbps at most, the transmission distance can reach 1200m (90 Kbps), RS-485 bus adopts the master-slave mode communication, the network deployment is simple, has become one of the standard communication interface of industry wide application.
In RS-485 bus multi-machine communication, in order to accurately transmit information to each extension in the system, each extension node is required to have a unique address, and two main current methods for allocating addresses are:
the first is a hardware method, which is realized by arranging a dial switch at the port of a singlechip, and the singlechip determines the address of the singlechip by reading the code of the dial switch. The mode occupies a plurality of I/O port lines of the singlechip, so that the originally scarce resources of the singlechip become tense. In addition, during debugging, the dial switch needs to be manually set, so that omission or repetition is likely to be generated. Furthermore, the dial switch is mechanical equipment, and after long-time use, the switch contact will produce the oxide layer, causes the dial switch contact failure to change the code numerical value, and then causes extension address conflict. In other words, the reliability is poor when the address is allocated by hardware method.
The second is a software method, which can be subdivided into two categories, the first category is to solidify the extension address into the program, which makes the program of each extension not common, and the program only differs from the stored extension address in the program code, and the second category is to solidify the common program into the extension, then to assign the address to the extension through some communication port, and to store the address in the EEROM. Both of these approaches have better reliability than the former method, but have the problem of possible address conflicts between extensions due to human error.
How to assign addresses to a plurality of extensions in a multi-node system is the most conceivable possible exhaustive method, that is, broadcasting all possible extension addresses of the host in sequence, and responding to a host reply signal when the physical address received by an extension matches its own address. This formulation is quite simple, but is not practical. For example, a 56-bit binary unique code composed of 7 eight-bit registers is preset on a macro-chip microcomputer which is widely applied at present when the macro-chip microcomputer leaves a factory, and the total code number is 56 times of 2. Assuming that only 1 microsecond is needed to complete one communication between the host and the extension (actually, the time needed is much longer than this), 2 power microseconds is needed to complete one exhaustion, which is about 2285 years.
Disclosure of Invention
An object of the present invention is to provide an automatic assignment method of addresses of a plurality of communication nodes and a plurality of communication systems, wherein the automatic assignment method is capable of completing the determination of addresses of extensions relatively quickly.
It is another object of the present invention to provide an automatic assignment method of addresses of a plurality of communication nodes and a plurality of communication systems, wherein the automatic assignment method assigns the addresses of the extension sets by dichotomy.
According to one aspect of the present invention, the present invention provides an automatic allocation method for addresses of a plurality of machine communication nodes, the automatic allocation method comprising the steps of:
broadcasting an Mx towards the extensions in a multi-extension communication system to determine the sizes of signature codes A and Mx of the extensions, wherein Mx is a quotient of (Hx + Lx)/2, hx > Mx > Lx, hx > A > Lx;
obtaining feedback from the extension based on the size relationship of A and Mx; and
based on the feedback, the following steps are performed: if the conclusion based on the feedback is a = Mx, an address corresponding to Mx is assigned to the extension corresponding to feature code a, if the conclusion based on the feedback is a > Mx, mx to Lx are assigned, and the broadcasting step is repeated to reacquire Mx and perform a new round of interrogation, if the conclusion based on the feedback is a < Mx, mx to Hx are assigned, and the broadcasting step is repeated to reacquire Mx and perform a new round of interrogation.
According to one embodiment of the invention, in the above method, if one of the extensions is assigned an address, the extension is rejected as an object of broadcasting.
According to one embodiment of the present invention, in the above method, mx is broadcasted by a host towards each of the extensions.
According to an embodiment of the present invention, wherein in the above method, the step after the broadcasting step is implemented as:
judging whether A is larger than Mx or not and sending feedback based on the judgment result;
assigning Mx to Lx upon receiving feedback to obtain a > Mx, and repeating the broadcasting step to retrieve Mx and perform a new round of interrogation;
repeating the broadcasting step to judge whether A is equal to Mx or not when A is not less than Mx based on the condition that the feedback is received, and sending the feedback based on the judgment result;
assigning an address to said extension of a = Mx based on the received feedback to obtain a = Mx; and
in the case of obtaining a less than Mx based on the received feedback, mx to Hx are assigned, and the broadcasting step is repeated to retrieve Mx and a new round of interrogation is made.
According to an embodiment of the present invention, wherein in the above method, the step after the broadcasting step is implemented as:
judging whether A is larger than Mx, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
if a signature signal is received, assigning Mx to Lx and repeating the broadcasting step to retrieve Mx and perform a new round of interrogation;
if the characteristic signal is not received within the preset time, repeating the broadcasting step to judge whether A is equal to Mx or not, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
in the case where a = Mx is obtained based on the characteristic signal, an address is assigned to the extension of a = Mx; and
in the case where a is less than Mx, obtained based on a preset time without receiving a signature signal, mx to Hx are assigned and the broadcasting step is repeated to retrieve Mx and a new round of interrogation is made.
According to an embodiment of the present invention, wherein in the above method, the broadcasting step is followed by the steps of:
judging whether A is larger than Mx, if so, feeding back one characteristic signal by the extension set, and if not, feeding back another characteristic signal by the extension set;
if the received characteristic signal obtains information A > Mx, assigning Mx to Lx, and repeating the broadcasting step to obtain Mx again and making a new round of inquiry;
if the information of A obtained by the received characteristic signal is not more than Mx, repeating the broadcasting step to judge whether A is equal to Mx or not, if yes, feeding back a characteristic signal by the extension set;
in the case where a = Mx is obtained based on the received characteristic signal, assigning an address to said extension of a = Mx; and
in the case where a is less than Mx, obtained based on a preset time without receiving a signature signal, mx to Hx are assigned and the broadcasting step is repeated to retrieve Mx and a new round of interrogation is performed.
According to an embodiment of the present invention, wherein in the above method, the step after the broadcasting step is implemented as:
judging whether A is equal to Mx, if yes, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
if a characteristic signal from the extension is received, assigning an address to the extension which sent the characteristic signal;
if the characteristic signal is not received within the preset time, repeating the broadcasting step to judge whether A is larger than Mx, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
in the case where A > Mx is obtained based on the characteristic signal, assigning Mx to Lx, and repeating the broadcasting step to retrieve Mx and perform a new round of interrogation; and
in the case where the characteristic signal is not received based on the preset time to obtain a < Mx, mx to Hx are assigned and the broadcasting step is repeated to retrieve Mx and a new round of inquiry is made.
According to an embodiment of the present invention, wherein in the above method, the broadcasting step is followed by the steps of:
judging whether A is smaller than Mx, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
if a characteristic signal is received from said extension, assigning Mx to Hx and repeating said broadcasting step to retrieve Mx and perform a new round of interrogation;
if the characteristic signal is not received within the preset time, repeating the broadcasting step to judge whether A is equal to Mx or not, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
in the case where a = Mx is obtained based on the feature signal, assigning an address to the corresponding extension; and
in the case where a > Mx is obtained based on a preset time without receiving the feature signal, mx to Lx are assigned and the broadcasting step is repeated to retrieve Mx and perform a new round of inquiry.
According to one embodiment of the invention, when the feature of the extension is coded as n-bit values, hx is the maximum of the n-bit values and Lx is the minimum of the n-bit values.
According to another aspect of the present invention, there is provided a multi-machine communication system x, wherein the multi-machine communication system comprises:
a host computer; and
at least one extension, wherein the host is communicably connected to each extension, and broadcasting, by the host, an Mx towards each extension to determine the size of feature codes a and Mx of the extension, wherein Mx is a quotient of (Hx + Lx)/2, hx > Mx > Lx, hx > a > Lx, then obtaining feedback from the extension based on the size relationship of a and Mx to determine the address of each extension, assigning an address corresponding to Mx to the extension corresponding to feature code a if the result based on the feedback is a = Mx, assigning Mx to Lx if the result based on the feedback is a > Mx, and repeating the broadcasting step to reacquire Mx and perform a new round of inquiries.
Drawings
Fig. 1 is a schematic diagram of a multi-machine communication system according to a preferred embodiment of the present invention.
FIG. 2 is a diagram illustrating a method for automatic address assignment for multiple communication nodes according to a preferred embodiment of the present invention.
Detailed Description
The following description is presented to disclose the invention so as to enable any person skilled in the art to practice the invention. The preferred embodiments in the following description are given by way of example only, and other obvious variations will occur to those skilled in the art. The basic principles of the invention, as defined in the following description, may be applied to other embodiments, variations, modifications, equivalents, and other technical solutions without departing from the spirit and scope of the invention.
It will be understood by those skilled in the art that in the present disclosure, the terms "longitudinal," "lateral," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," and the like are used in an orientation or positional relationship indicated in the drawings for ease of description and simplicity of description, and do not indicate or imply that the referenced devices or components must be in a particular orientation, constructed and operated in a particular orientation, and thus the above terms are not to be construed as limiting the present invention.
It is understood that the terms "a" and "an" should be interpreted as meaning that a number of one element or element is one in one embodiment, while a number of other elements is one in another embodiment, and the terms "a" and "an" should not be interpreted as limiting the number.
Referring to fig. 1 and 2, a multi-machine communication system 1000 and a multi-machine communication node address automatic allocation method according to a preferred embodiment of the present invention are respectively illustrated, wherein the multi-machine communication system 1000 includes at least one host 10 and at least one extension 20, the number of the extensions 20 may be one, two or more, wherein the accurate communication between the host 10 and the extension 20 depends on the address of the extension 20, by the automatic allocation method, the address can be automatically and conveniently allocated to the extension 20, and the whole process does not take too long time, and the address allocation to each of the extensions 20 can be completed with high efficiency.
Comparing the signature a and one Mx of each extension 20 of a multi-machine communication system 1000 to determine whether a relationship exists between signature a and Mx of at least one of said extensions 20, wherein Hx is greater than Mx, mx is greater than Lx, a is greater than Lx and less than Hx, mx is a quotient obtained by (Hx + Lx)/2, and the combination is between Mx and Hx;
in the case where there is one extension 20 whose feature code a is equal to Mx, assigning a node address corresponding to Mx to said extension 20 corresponding to feature code a, and repeating said comparing step after eliminating said extension 20 having obtained an address;
in the presence of at least one feature code a of said extension 20 greater than Mx, assigning Mx to Lx, where Mx is recalculated according to a quotient obtained in (Hx + Lx)/2 and repeating said comparison step; and
in the presence of at least one of said hierarchical feature codes A smaller than Mx, assigning Mx to Hx, where Mx is obtained by recalculation according to a quotient obtained by (Hx + Lx)/2 and repeating said comparison step.
According to an embodiment of the invention, the automatic allocation method further comprises the steps of:
and after the times of repeating the comparison step reach a preset value, ending the comparison.
According to an embodiment of the invention, the automatic allocation method further comprises the steps of:
the process is terminated when each extension set 20 in the multi-machine communication system 1000 obtains its own address.
In detail, in the multi-phone communication system 1000, each of the extensions 20 has a characteristic code a to enable the different extensions 20 to be identified. For the host 10, the host 10 is temporarily unable to distinguish the individual extensions 20 until each extension 20 has not been assigned an address. It can be understood that the code a of the feature of the extension 20 may be a self-contained number, for example, when the extension 20 is an STC series single chip microcomputer, a unique ID inside the extension is stored in a memory area inside a chip and can be read through a table look-up instruction, or a numeric value, a letter, or a string of codes obtained by converting the self-contained ID of the extension 20 through a certain program, for example, when the types of the extensions 20 are not the same, the self-contained ID may be a string of letters or a string of numbers, and may be converted into a uniform format through a preset program to facilitate subsequent comparison.
With the automatic allocation method, first, the host 10 may broadcast one Mx to each of the extensions 20, where Mx is greater than Lx and less than Hx. It can be understood that, when selecting Hx and Lx, a reasonable range needs to be selected based on the range of the feature code a of each extension 20 of the multi-machine communication system 1000, so as to reduce the number of subsequent judgments. When the feature of the extension 20 is coded as n-bit values, hx may be the maximum of the n-bit values and Lx may be the minimum of the n-bit values
Secondly, after the extension set 20 receives the broadcast of the host 10, mx and the feature codes a corresponding to each other are compared, and the comparison result is fed back to the host 10.
It will be appreciated that there are three possible relationships between Mx and a, the first being that Mx equals the signature a of one of said extensions 20, and that, because of the uniqueness of signature a of each of said extensions 20, it is not possible to have more than one signature a of said extension 20 equal Mx unless there is an error. A second possibility is that there is at least one signature a of said extension 20 greater than Mx, that is to say that there is at least one signature a of said extension 20 located between Hx and Mx. A third possibility is that there is at least one signature a of said extension 20 smaller than Mx, that is to say that there is at least one of said signature a located between Mx and Lx.
If there is an extension 20 with a signature a equal to Mx, then an address corresponding to Mx can be assigned to said extension 20, and when the host 10 makes the next broadcast, the extension 20 to which the address has been assigned can be dropped from the broadcast range to save time.
If there is one feature code A of said extension 20 greater than Mx, then values Mx to Lx are assigned, mx is recalculated based on the quotient obtained when Mx is (Hx + Lx)/2 and said comparison step is repeated until there is one feature code A of said extension 20 equal to Mx. If there is one feature code a of said extension 20 less than Mx, then Mx is assigned to Hx, mx is recalculated according to the quotient obtained when Mx is (Hx + Lx)/2 and said comparison step is repeated until there is one feature code a of said extension 20 equal to Mx.
It can be understood that, for one said multiple-machine communication system 1000, there may be at least one signature code a of said extension 20 greater than Mx and at least one signature code a of said extension 20 less than Mx, and there may be three processing manners, the first processing manner is to complete the address assignment for said extension 20 whose signature code a is greater than Mx, and assign Mx to Lx to make the value of Mx larger, thereby approaching continuously to signature code a corresponding to said extension 20, and thus completing the address assignment for said extension 20 whose signature code is greater. And then completing the address allocation of the extension set 20 with the feature code A smaller than Mx, and assigning Mx to Hx to make the value of Mx smaller, thereby continuously approaching the feature code A corresponding to the extension set 20, and completing the address allocation of the extension set 20 with smaller feature code. The second way of processing is to complete the address assignment for the extensions 20 with signature a less than Mx and then to process the address assignment for the extensions 20 with signature a greater than Mx. A third processing mode is to allocate addresses to the extension 20 with feature code a smaller than Mx and the extension 20 with feature code a larger than Mx at the same time.
The first method is taken as an example, and for convenience of introduction, the feature codes a, mx, hx, and Lx are decimal. The number of extensions 20 may be 5, and feature codes a are 70, 60, 50, 40 and 30, respectively. Initial Hx was 100, lx was 0, and then Mx was obtained as 50. Broadcasting Mx of 50 towards 5 of said extensions 20, it is concluded that there is at least one signature a of said extension 20 greater than Mx, there is also at least one signature a of said extension 20 less than Mx, and there is also at least one signature a of said extension 20 equal Mx. For said extensions 20 with a signature a equal to Mx, said extension 20 is given an address corresponding to Mx.
For the other extension sets 20, a new Mx may be received for re-comparison, for example, the host 10 may assign a value 50 of Mx to Lx, then recalculate to obtain a new Mx of 75, re-compare with the signature code a of 5 extension sets 20, and find that there is no signature code a of one extension set 20 that is greater than Mx. A value of Mx of 75 may be assigned to Hx, and then recalculated to obtain a quotient of Mx (75 + 50)/2 of 62. The above steps are repeated to obtain a quotient Mx of (75 + 62)/2, which is 68. The above steps are repeated to obtain a quotient Mx of (75 + 68)/2, which is 71. The above steps are repeated to obtain a quotient Mx of (71 + 68)/2, which is 69. The above steps are repeated to obtain Mx as (71 + 69)/2 =70. Equal to said extension 20 for which the feature code a is 70, so that this time the address corresponding to Mx is assigned to said extension 20. The assignment of addresses is done in a similar way for the other extensions 20 with feature codes 60, 40 and 30, respectively.
According to an embodiment of the invention, the automatic allocation method may be implemented to include the steps of:
broadcasting an Mx by said host 10 in said multi-machine communication system 1000 towards a plurality of said extensions 20 to determine if there is at least one signature code a of said extension 20 equal to Mx;
if yes, the node address corresponding to the Mx is allocated to the extension set 20 corresponding to the feature code A, and if no Mx = A exists, the next step is continued; and
and judging whether the characteristic code A is positioned between Mx and Hx, if so, assigning Mx to Lx to recalculate Mx, and repeating the judging step, and if not, assigning Mx to Hx to recalculate Mx and repeating the judging step until A = Mx exists or the cycle number reaches a preset value.
According to an embodiment of the invention, the automatic allocation method may be implemented to include the steps of:
broadcasting an Mx towards a plurality of said extensions 20 by said host 10 in said multi-machine communication system 1000 to determine if there is at least one said extension 20 having a signature code a greater than Mx;
if yes, assigning Mx to Lx to recalculate Mx and repeat the judging step, and if not, continuing the next step; and
and judging whether the feature code of at least one extension set 20 is smaller than Mx, if so, assigning Mx to Hx to recalculate Mx, and repeating the judging steps until A = Mx exists or the cycle number reaches a preset value, and if not, allocating the node address corresponding to Mx to the extension set 20 corresponding to the feature code A.
According to an embodiment of the invention, the automatic allocation method may be implemented to include the steps of:
broadcasting an Mx towards a plurality of said extensions 20 by said host 10 in said multi-machine communication system 1000 to determine if there is at least one said extension 20 with a signature code a less than Mx;
if yes, assigning Mx to Lx to recalculate Mx and repeat the judging step, and if not, continuing the next step; and
and judging whether the feature code of at least one extension set 20 is smaller than Mx, if so, assigning Mx to Hx to recalculate Mx, and repeating the judging steps until A = Mx exists or the cycle number reaches a preset value, and if not, allocating the node address corresponding to Mx to the extension set 20 corresponding to the feature code A.
A specific embodiment is given by taking an STC single chip as an example, and the automatic allocation method is as follows:
(1) Three sets of registers, namely a high-end register Hx, a middle register Mx, and a low-end register Lx, are set in the host 10, each set of registers is composed of 8 registers with 8 bits, and initial values of the Hx and Lx registers are set as:
Hx:0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Lx:0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
the high order is on the left and the low order is on the right.
(2) Hx and Lx are added according to a binary addition rule and divided by 2, the remainder is ignored, the quotient is stored in the Mx register, the value of which lower 7 registers defines the physical address of extension 20. (the unique ID number inside the STC single chip microcomputer is stored in the last 7 bytes of the memory area inside the chip and can be read by a table look-up instruction).
(3) The host 10, according to the instruction code defined by the user, sends the values in the lower 7 registers in the Mx register set to each extension 20 in a broadcast manner, and then switches to a time-limited listening mode.
(4) After receiving Mx transmitted from the host 10, the slave unit 20 correlates the address information with Mx and compares the information with its own ID number. That is, mx is compared with feature code a. If the ID number of the extension 20 itself is greater than the signal sent by the host 10, the extension 20 may respond with a low level to the host 10. The extension 20 can remain silent if the ID number of the extension 20 itself is less than or equal to the signal sent by the host 10. If there are several extensions 20 satisfying their ID numbers greater than Mx, the extension 20 satisfying the condition will respond to low signal at the same time, the extension 20 not satisfying the condition will remain silent, and the 485 bus will exhibit 0 state.
It is understood that the answering method of the extension 20 is only for illustration, and that the extension 20 may be kept silent when the ID number of the extension 20 itself is larger than that of the host 10.
(5) When the host 10 detects a 0 signal on the 485 bus, it knows that there is at least one of the extensions 20, whose own ID number is greater than Mx. The current value of Mx can then be assigned to Lx, and then go back to step (2) to start the next round of comparison.
(6) If the host 10 does not detect a reply from the extension 20 within a set time, it indicates that the ID of each of the extensions 20 of the current extension 20 is less than or equal to Mx. The host 10 may send a new command code, together with the values in the lower 7 Mx registers to each extension 20 in a broadcast manner, and continue to enter the time-limited listening mode.
(7) After receiving the Mx and address information sent by the host 10, each extension 20 compares its own ID number with its own ID number, and responds a low level signal if the ID number of the extension 20 itself is equal to the ID sent by the host 10, and if not, keeps silent.
(8) When the host 10 detects a 0 signal on the 485 bus, it indicates that there is an extension 20 with the same signature code and Mx in the extension 20, the host 10 can assign the desired address to the extension 20, and the extension 20 with the defined node address does not participate in the next round of address polling of the host 10, and at this time, the host 10 returns to step (1) again to start a new round of address polling; if the host 10 does not detect a 0 signal on the 485 bus, it indicates that the own IDs of the extensions 20 are all less than Mx, so the value of Mx is assigned to Hx, and the process returns to step (2) to start the next round of comparison.
It will be appreciated that it is not necessarily limited to the host 10 broadcasting towards each of the extensions 20, and that it may be broadcast towards the extensions 20 by an external device, which then obtains a feedback signal for the extension 20, and based on the feedback signal the external device may continue to broadcast towards the extension 20 to determine the assignment of addresses.
It will be appreciated that the extension 20 feeds back a signal based on the comparison result is not limited to a low level signal, and may be other types of characteristic signals. In addition, the feedback mode of the slave set 20 based on the comparison result is not limited to the low level signal and the silence maintaining mode, and the slave set 20 may feed back two different types of feature signals based on the comparison result.
It is understood that, in the process of assigning addresses to the extensions 20, not only the addresses of the extensions 20 may be assigned from large to small, but also the addresses of the extensions 20 may be assigned from small to large, for example, mx and Lx may be 100 and 0, respectively, and may be moved from the end 100 toward the end 0 continuously to assign addresses, or may be moved from the end 0 toward the end 100 continuously to assign addresses.
To illustrate in more detail, the automatic allocation method may be implemented as:
judging whether A is smaller than Mx, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
if a characteristic signal is received from the extension, assigning Mx to Hx and repeating the broadcasting step to retrieve Mx and perform a new round of interrogation;
if the characteristic signal is not received within the preset time, repeating the broadcasting step to judge whether A is equal to Mx or not, if yes, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
in the case where a = Mx is obtained based on the feature signal, assigning an address to the corresponding extension; and
in the case where a > Mx is obtained based on a preset time without receiving the characteristic signal, mx to Lx are assigned and the broadcasting step is repeated to retrieve Mx and a new round of inquiry is made. It will be appreciated by persons skilled in the art that the embodiments of the invention described above and shown in the drawings are given by way of example only and are not limiting of the invention. The objects of the present invention have been fully and effectively accomplished. The functional and structural principles of the present invention have been shown and described in the examples, and any variations or modifications of the embodiments of the present invention may be made without departing from the principles.

Claims (10)

1. An automatic distribution method for multi-machine communication node address is characterized by comprising the following steps:
broadcasting an Mx towards the extensions in a multi-extension communication system to determine the sizes of signature codes A and Mx of the extensions, wherein Mx is a quotient of (Hx + Lx)/2, hx > Mx > Lx, hx > A > Lx;
obtaining feedback from the extension based on the size relationship of A and Mx; and
based on the feedback, the following steps are performed: -if the conclusion based on the feedback is a = Mx, assigning an address corresponding to Mx to said extension corresponding to feature code a, -if the conclusion based on the feedback is a > Mx, assigning Mx to Lx, and repeating said broadcasting step to retrieve Mx and perform a new round of interrogation, -if the conclusion based on the feedback is a < Mx, assigning Mx to Hx, and repeating said broadcasting step to retrieve Mx and perform a new round of interrogation.
2. The automatic assignment method according to claim 1, wherein in the above method, if one of the extensions is assigned with an address, the extension is rejected as an object of broadcasting.
3. The automatic distribution method according to claim 1, wherein in said method Mx is broadcasted by a host towards each of said extensions.
4. The automatic distribution method according to claim 1, wherein in the above method, the step following the broadcasting step is implemented as:
judging whether A is larger than Mx or not and sending feedback based on the judgment result;
assigning Mx to Lx upon receiving feedback to obtain a > Mx, and repeating the broadcasting step to retrieve Mx and perform a new round of interrogation;
repeating the broadcasting step to judge whether A is equal to Mx or not when A is not less than Mx based on the condition that the feedback is received, and sending the feedback based on the judgment result;
-allocating an address to said extension of a = Mx, based on the received feedback, to obtain a = Mx; and
in the case of obtaining a less than Mx based on the received feedback, mx to Hx are assigned, and the broadcasting step is repeated to retrieve Mx and a new round of interrogation is made.
5. The automatic distribution method according to claim 1, wherein in the above method, the step following the broadcasting step is implemented as:
judging whether A is larger than Mx, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
if a signature signal is received, assigning Mx to Lx and repeating the broadcasting step to retrieve Mx and perform a new round of interrogation;
if the characteristic signal is not received within the preset time, repeating the broadcasting step to judge whether A is equal to Mx or not, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
in case a = Mx is obtained based on the characteristic signal, an address is assigned to said extension of a = Mx; and
in the case where a is less than Mx, obtained based on a preset time without receiving a signature signal, mx to Hx are assigned and the broadcasting step is repeated to retrieve Mx and a new round of interrogation is made.
6. The automatic distribution method according to claim 1, wherein in the above method, the step following the broadcasting step is implemented as:
judging whether A is larger than Mx, if so, feeding back one characteristic signal by the extension set, and if not, feeding back another characteristic signal by the extension set;
if the received characteristic signal obtains information of A > Mx, assigning Mx to Lx, and repeating the broadcasting step to obtain Mx again and making a new round of inquiry;
if the information of A obtained by the received characteristic signal is not more than Mx, repeating the broadcasting step to judge whether A is equal to Mx or not, if yes, feeding back a characteristic signal by the extension set;
in the case where a = Mx is obtained based on the received characteristic signal, assigning an address to said extension of a = Mx; and
in the case where a is less than Mx, obtained based on a preset time without receiving a signature signal, mx to Hx are assigned and the broadcasting step is repeated to retrieve Mx and a new round of interrogation is made.
7. The automatic distribution method according to claim 1, wherein in the above method, the step following the broadcasting step is implemented as:
judging whether A is equal to Mx, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
if a characteristic signal from the extension is received, assigning an address to the extension which sent the characteristic signal;
if the characteristic signal is not received within the preset time, repeating the broadcasting step to judge whether A is larger than Mx, if yes, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
in the case where A > Mx is obtained based on the characteristic signal, assigning Mx to Lx, and repeating the broadcasting step to retrieve Mx and perform a new round of interrogation; and
in the case where the characteristic signal is not received based on the preset time to obtain a < Mx, mx to Hx are assigned and the broadcasting step is repeated to retrieve Mx and a new round of inquiry is made.
8. The automatic distribution method according to claim 1, wherein in the above method, the step following the broadcasting step is implemented as:
judging whether A is smaller than Mx, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
if a characteristic signal is received from the extension, assigning Mx to Hx and repeating the broadcasting step to retrieve Mx and perform a new round of interrogation;
if the characteristic signal is not received within the preset time, repeating the broadcasting step to judge whether A is equal to Mx or not, if so, feeding back a characteristic signal by the extension, and if not, keeping the extension silent;
in the case where a = Mx is obtained based on the feature signal, assigning an address to the corresponding extension; and
in the case where a > Mx is obtained based on a preset time without receiving the feature signal, mx to Lx are assigned and the broadcasting step is repeated to retrieve Mx and perform a new round of inquiry.
9. The automatic allocation method according to any one of claims 1 to 8, wherein Hx is the maximum value of n-bit values and Lx is the minimum value of n-bit values when feature codes of said extensions are n-bit values.
10. A multi-machine communication system, comprising:
a host computer; and
at least one extension, wherein the host is communicatively connected to each extension, and broadcasting an Mx towards the extensions by the host to determine the size of feature codes a and Mx of the respective extensions, wherein Mx is a quotient of (Hx + Lx)/2, hx > Mx > Lx, hx > a > Lx, then obtaining feedback from the extensions based on the magnitude relation of a and Mx to determine the address of the respective extension, assigning an address corresponding to Mx to the extension corresponding to feature code a if the result based on the feedback is a = Mx, assigning Mx to Lx if the result based on the feedback is a > Mx, and repeating the broadcasting step to reacquire Mx and perform a new round of inquiries.
CN202011343210.2A 2020-11-26 2020-11-26 Automatic allocation method of multi-machine communication node address and multi-machine communication system Active CN114553829B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011343210.2A CN114553829B (en) 2020-11-26 2020-11-26 Automatic allocation method of multi-machine communication node address and multi-machine communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011343210.2A CN114553829B (en) 2020-11-26 2020-11-26 Automatic allocation method of multi-machine communication node address and multi-machine communication system

Publications (2)

Publication Number Publication Date
CN114553829A CN114553829A (en) 2022-05-27
CN114553829B true CN114553829B (en) 2023-02-28

Family

ID=81659209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011343210.2A Active CN114553829B (en) 2020-11-26 2020-11-26 Automatic allocation method of multi-machine communication node address and multi-machine communication system

Country Status (1)

Country Link
CN (1) CN114553829B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115955460B (en) * 2023-03-10 2023-07-11 中山大洋电机股份有限公司 Address allocation method for multi-motor networking control system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101197855B (en) * 2007-12-25 2010-08-18 三一重工股份有限公司 Equipment node address code distribution method and distributing system, and address configuration node
CN103780340B (en) * 2013-11-07 2018-03-06 福建睿能科技股份有限公司 A kind of communication means, control device, electric ballast and system
CN107005496B (en) * 2014-12-27 2021-06-29 英特尔公司 Techniques for scalable local addressing in high performance network architectures
EP3333714B1 (en) * 2016-12-07 2020-02-12 Commissariat A L'energie Atomique Et Aux Energies Alternatives A computer-implemented method and a system for encoding a stack application memory state using shadow memory
CN111835882B (en) * 2020-07-01 2023-03-03 上海橙群微电子有限公司 Device address list acquisition method, network device and readable storage medium

Also Published As

Publication number Publication date
CN114553829A (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN107133188B (en) Daisy chain connected master-slave communication address distributing method, system and slave computer and master computer
KR920004131B1 (en) Information transmission system having collective devices
CN111083026A (en) Method for performing host-slave communication by using Modbus RTU standard protocol
CN106603735B (en) Method, device and system for distributing communication addresses of intelligent instrument
KR101951485B1 (en) Method for assigning network addresses for fans
US4313196A (en) Priority system with low speed request bus
CN114553829B (en) Automatic allocation method of multi-machine communication node address and multi-machine communication system
EP0537814B1 (en) Multi-station bus system having means for polling and updating of globally relevant information, in particular a station address, and station for use in such system
EP3422655B1 (en) Method for managing address of meter device, and acquisition terminal and meter device
US4794516A (en) Method and apparatus for communicating data between a host and a plurality of parallel processors
CN113114793A (en) Slave node address competition method and device and electrical appliance system
CN111371659B (en) Method for automatically allocating RS485 slave equipment address
US7539206B2 (en) Communication apparatus and method for supporting carrier sense multiple access/collision detection
US8929395B2 (en) Multicast system and multicast method using shortened address and apparatus applied to the same
CN105282263A (en) Address configuration method and device and equipment
CN113612868A (en) Equipment address allocation method, device and system
KR20040027886A (en) Methods for detecting and polling downstream modems
US6894603B2 (en) Packet communication method of powerline communication system
JPS5848593A (en) Polling transmission system
CN108628796A (en) A kind of serial communication method and system
US20240056418A1 (en) Method for address configuration for a master-slave system
CN117424775A (en) Data interaction method and device, electronic equipment and storage medium
US20240134808A1 (en) Polling scheme with priority in an industrial network system
RU57533U1 (en) DEVICE FOR AUTOMATIC ADDRESSING OF ADDRESSES TO SUBSCRIBERS TO MULTIPLEX DATA EXCHANGE CHANNEL
CN117614940B (en) Method and system for automatic configuration of serial communication equipment address

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