Address competition method of multi-connected type control system
11336616 · 2022-05-17
Assignee
- Qingdao Haier Air-conditioning Electronic Co., Ltd (Qingdao, CN)
- Haier Smart Home Co., Ltd. (Qingdao, CN)
Inventors
- Baitian Zhuo (Qingdao, CN)
- Bin Shi (Qingdao, CN)
- Shaojiang Cheng (Qingdao, CN)
- Ruigang Zhang (Qingdao, CN)
- Jun Wang (Qingdao, CN)
- Wenjun Shao (Qingdao, CN)
Cpc classification
H04L61/5092
ELECTRICITY
F24F11/30
MECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
International classification
H04L61/5038
ELECTRICITY
H04L61/5092
ELECTRICITY
Abstract
An address competition method of a multi-connected type control system. The method aims at solving the problem of how to set an indoor machine communication address in the multi-connected type air conditioner system efficiently. For the purpose, a primary control device (such as an air conditioner outdoor machine) performs broadcasting on each address in a preset address section in sequence. A slave control device (such as the air conditioner indoor machine) responds to the primary control device on the basis of preset responding time and the number of currently broadcasting times of the primary control device. The primary control device to which a communication address is distributed temporarily is responded so as to finish address competition rapidly. Meanwhile, the primary control device can perform continuous broadcasting on one address for repeatedly, so that the competition success rate of the address is increased.
Claims
1. An address competition method of a multi-connection control system, the multi-connection control system comprising a master control device and a plurality of slave control devices, and the master control device being connected with the plurality of slave control devices respectively, the address competition method comprising: sequentially broadcasting, by the master control device, each address in a preset address segment by sending address broadcasting signals to the slave control devices; responding to, by all the slave control devices, the master control device according to a preset response time and the current number of broadcasting times of the master control device; and in a case where only one slave control device responded successfully, allocating an address specified by the address broadcasting signal as a communication address to the slave control device that responded successfully, wherein the preset response time depends on whether the corresponding slave control device has been temporarily allocated a communication address; wherein the master control device performs multiple times of consecutive broadcastings on each address in the preset address segment; or the master control device performs consecutive broadcastings on corresponding addresses only when multiple slave control devices responded successfully or all the slave control devices failed to respond during a first broadcasting; wherein a method of obtaining a response time of the slave control device in the first broadcasting comprises: judging whether the slave control device has been temporarily allocated a communication address: if yes, the response time is a time point delayed by a time T.sub.1 from when it is detected that a communication bus is idle; and if not, the response time is a time point delayed by a time T.sub.2 from when it is detected that the communication bus is idle, wherein T.sub.1<T.sub.2.
2. The address competition method according to claim 1, wherein the responding to, by all the slave control devices, the master control device according to a preset response time and the current number of broadcasting times of the master control device comprises: generating a random number by each slave control device upon receiving the address broadcasting signal, and sending the generated random number by each slave control device to the master control device.
3. The address competition method according to claim 1, wherein when the master control device performs multiple times of consecutive broadcastings on each address in the preset address segment, a method of obtaining a response time of the slave control device in a non-first broadcasting comprises: if one slave control device responded successfully in a previous broadcasting, the response time of the slave control device that responded successfully is a time point delayed by a time T.sub.10 from when it is detected that the communication bus is idle, and the response time of the slave control devices that failed to respond is a time point delayed by a time T.sub.20 from when it is detected that the communication bus is idle, wherein T.sub.10<T.sub.20; if multiple slave control devices responded successfully in the previous broadcasting, the response time of the slave control devices that responded successfully is a time point delayed by a time T.sub.100 from when it is detected that the communication bus is idle, and the response time of the slave control devices that failed to respond is a time point delayed by a time T.sub.200 from when it is detected that the communication bus is idle, wherein T.sub.100<T.sub.200; and if all the slave control devices failed to respond in the previous broadcasting, the response time of the slave control devices is the respective response time in said previous broadcasting.
4. The address competition method according to claim 1, wherein when the master control device performs consecutive broadcastings on corresponding addresses only when multiple slave control devices responded successfully or all the slave control devices failed to respond during the first broadcasting, a method of obtaining a response time of the slave control device in a non-first broadcasting comprises: if multiple slave control devices responded successfully in a previous broadcasting, the response time of the slave control devices that responded successfully is a time point delayed by a time T.sub.110 from when it is detected that the communication bus is idle, and the response time of the slave control devices that failed to respond is a time point delayed by a time T.sub.210 from when it is detected that the communication bus is idle, wherein T.sub.110<T.sub.210; and if all the slave control devices failed to respond in the previous broadcasting, the response time of the slave control devices is the respective response time in said previous broadcasting.
5. The address competition method according to claim 1, wherein when the master control device performs multiple times of consecutive broadcastings on a certain address in the preset address segment, the address competition method further comprises: obtaining an address category of each slave control device; and determining a response time of each slave control device in the current broadcasting according to the obtained address category, wherein the address category comprises a first address category, a second address category and a third address category; the first address category indicates that the slave control device has been permanently allocated a communication address and therefore no longer participates in broadcast responding; the second address category indicates that multiple slave control devices responded successfully in the multiple times of consecutive broadcastings and are therefore temporarily allocated communication addresses; and the third address category indicates that no slave control device responded or the slave control devices failed to respond during the multiple times of consecutive broadcastings.
6. The address competition method according to claim 5, wherein the step of determining a response time of each slave control device in the current broadcasting according to the obtained address category comprises: setting the response time of the slave control device of the second address category to be shorter than the response time of the slave control device of the third address category.
7. The address competition method according to claim 1, further comprising: if the master control device has performed multiple times of consecutive broadcastings on a certain address in the preset address segment, but eventually all the slave control devices failed to respond, broadcasting the next address according to a set sequence.
8. The address competition method according to claim 1, further comprising: when the master control device performs multiple times of consecutive broadcastings on a certain address in the preset address segment, if the number of successful responding of the same slave control device is greater than a preset threshold and the address has been initially allocated to the slave control device, setting a status flag of the slave control device as a device presence flag.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
DETAILED DESCRIPTION
(4) Preferred embodiments of the present disclosure will be described below with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are only used to explain the technical principles of the present disclosure, and are not intended to limit the scope of protection of the present disclosure.
(5) First, it should be noted that the multi-connection control system in the present disclosure includes a master control device and a plurality of slave control devices, and each master control device is connected with the plurality of slave control devices respectively. In addition, the master control device communicates with the slave control devices connected thereto using a master-slave bus communication method (i.e., the master control device serves as the master machine, and the slave control devices serve as the slave machines). For example, the multi-connection control system may be a multi-connection air-conditioning system, in which an outdoor unit of the air conditioner is connected to multiple indoor units of the air conditioner, and the outdoor unit communicates with all the indoor units of the air conditioner connected thereto using the master-slave bus communication method.
(6) In the following, an address competition method of a multi-connection control system in this embodiment will be described with reference to the accompanying drawings.
(7) Reference is made to
(8) Step S101: sequentially broadcasting, by the master control device, each address in a preset address segment by sending address broadcasting signals to the slave control devices.
(9) In this embodiment, the preset address segment refers to an address segment composed of multiple consecutive addresses. For example, the preset address segment may include address 1, address 2, address 3, address 4, and address 5. For another example, the address segment can also include address 6, address 7, address 8, address 9, and address 10.
(10) Specifically, in this embodiment, the master control device may perform multiple times of consecutive broadcastings on each address in the preset address segment to ensure that when the master control device communicates with the slave control devices normally, each address can be allocated successfully.
(11) In order to improve the efficiency of address allocation, in this embodiment, it is also possible that corresponding addresses are consecutively broadcasted only when multiple slave control devices responded successfully or all the slave control devices failed to respond during a first broadcasting. That is, after the competition for address succeeds, the master control device can broadcast the next address immediately or after waiting for a certain period of time, and the address is no longer broadcasted, thereby reducing the bus mediation time and improving the efficiency of address allocation.
(12) In a preferred implementation of this embodiment, if the master control device has performed multiple times of consecutive broadcastings on a certain address in the preset address segment, but eventually all the slave control devices failed to respond, the next address may be broadcasted according to a set sequence. In this embodiment, in order to improve the success rate of the competition for this address, it is also possible to wait until all addresses are broadcasted and then rebroadcast the addresses to which the responding failed.
(13) In another preferred implementation of this embodiment, when the master control device performs multiple times of consecutive broadcastings on a certain address in the preset address segment, if the number of successful responding of the same slave control device is greater than a preset threshold and the address has been initially allocated to the slave control device, a status flag of the slave control device is set as a device presence flag. In this embodiment, after the status flag of the slave control device is set as the device presence flag, it may no longer participate in the broadcast responding to the next address. The master control device may also perform new communication with the corresponding slave control device according to the device presence flag. For example, the master control device sends a status query command to the slave control device with the device presence flag, so that the slave control device can feedback status information to the master control device according to the status query command.
(14) Step S102: responding to, by all the slave control devices, the master control device according to a preset response time and the current number of broadcasting times of the master control device.
(15) Specifically, in this embodiment, the slave control device can respond to the master control device according to the following steps: generating a random number by the slave control device upon receiving the address broadcasting signal from the master control device, and sending the generated random number by each slave control device to the master control device. In a preferred implementation of this embodiment, the random number generated by the slave control device is a 2-byte random number composed of 16 digits, so that the difference of the random number can be improved.
(16) It can be seen from the above that the master control device can perform multiple times of consecutive broadcastings on each address in the preset address segment (for the brevity of description, hereinafter referred to as broadcasting scheme 1), or it can also perform consecutive broadcastings on corresponding addresses only when multiple slave control devices responded successfully or all the slave control devices failed to respond during a first broadcasting (for the brevity of description, hereinafter referred to as broadcasting scheme 2). In this embodiment, different methods can be used to obtain the response time of the slave control device according to different broadcasting schemes. The methods of obtaining the response time of the slave control device will be separately described below.
(17) 1. For the first broadcasting of the master control device in “broadcasting scheme 1” and “broadcasting scheme 2”, the response time depends on whether the corresponding slave control device has been temporarily allocated a communication address, and the response time of the slave control device can be specifically obtained according to the following steps: judging whether the slave control device has been temporarily allocated a communication address: if yes, the response time is a time point delayed by a time T.sub.1 from when it is detected that a communication bus is idle; and if not, the response time is a time point delayed by a time T.sub.2 from when it is detected that the communication bus is idle, wherein T.sub.1<T.sub.2; for example, T.sub.1=10 ms, and T.sub.2=20 ms.
(18) 2. For the non-first broadcasting of the master control device in “broadcasting scheme 1”, the response time of the slave control device can be obtained according to the following steps: determining the response time according to the response result of all the slave control devices in the previous broadcasting, specifically as follows.
(19) If one slave control device responded successfully in the previous broadcasting, the response time of the slave control device that responded successfully is a time point delayed by a time T.sub.10 from when it is detected that the communication bus is idle, and the response time of the slave control devices that failed to respond is a time point delayed by a time T.sub.20 from when it is detected that the communication bus is idle, wherein T.sub.10<T.sub.20; for example, T.sub.10=10 ms, and T.sub.20=20 ms.
(20) If multiple slave control devices responded successfully in the previous broadcasting, the response time of the slave control devices that responded successfully is a time point delayed by a time T.sub.100 from when it is detected that the communication bus is idle, and the response time of the slave control devices that failed to respond is a time point delayed by a time T.sub.200 from when it is detected that the communication bus is idle, wherein T.sub.100<T.sub.200; for example, T.sub.100=15 ms, and T.sub.200=20 ms.
(21) If all the slave control devices failed to respond in the previous broadcasting, the response time of the slave control devices is the respective response time in said previous broadcasting.
(22) 3. For the non-first broadcasting of the master control device in “broadcasting scheme 2”, the response time of the slave control device can be obtained according to the following steps: determining the response time according to the response result of all the slave control devices in the previous broadcasting, specifically as follows.
(23) If multiple slave control devices responded successfully in the previous broadcasting, the response time of the slave control devices that responded successfully is a time point delayed by a time T.sub.110 from when it is detected that the communication bus is idle, and the response time of the slave control devices that failed to respond is a time point delayed by a time T.sub.210 from when it is detected that the communication bus is idle, wherein T.sub.110<T.sub.210; for example, T.sub.110=15 ms, and T.sub.210=20 ms.
(24) If all the slave control devices failed to respond in the previous broadcasting, the response time of the slave control devices is the respective response time in said previous broadcasting.
(25) Next, reference is made to
(26) Step S201: obtaining an address category of each slave control device.
(27) The address category in this embodiment includes a first address category, a second address category and a third address category; the first address category indicates that the slave control device has been permanently allocated a communication address and therefore no longer participates in broadcast responding; the second address category indicates that multiple slave control devices successfully responded in the multiple times of consecutive broadcastings and are therefore temporarily allocated communication addresses; and the third address category indicates that no slave control device responded or the slave control devices failed to respond during the multiple times of consecutive broadcastings.
(28) Step S202: determining the response time of each slave control device in the current broadcasting according to the obtained address category. Specifically, the response time of the slave control device of the second address category may be set to be shorter than the response time of the slave control device of the third address category.
(29) For example, in the first broadcasting of multiple times of consecutive broadcastings, the slave control devices 1 to 3 responded successfully, and the slave control devices 4 to 5 failed to respond. In this case, the address categories of the slave control devices 1 to 3 are updated to the second address category, and the address categories of the slave control devices 4 to 5 are updated to the third address category. In the next broadcasting, the slave control devices 1 to 3 will respond preferentially, and the slave control devices 4 to 5 can respond only after the control devices 1 to 3 start to respond.
(30) When the address competition method shown in
(31) Step S103: in a case where only one slave control device responded successfully, allocating an address specified by the address broadcasting signal as a communication address to the slave control device that responded successfully.
(32) Reference is made to
(33) Time point T.sub.a (T.sub.a=10 ms): The master control device broadcasts address 1.
(34) Time point T.sub.b (T.sub.b=20 ms): The slave control devices 1 to 4 respond according to the broadcasting signal of address 1, and only the slave control device 1 responds successfully, so address 1 is used as the communication address of the slave control device 1.
(35) Time point T.sub.c (T.sub.c=40 ms): The master control device broadcasts address 2.
(36) Time point T.sub.d (T.sub.d=50 ms): The slave control devices 2 to 4 respond according to the broadcasting signal of address 2, the slave control devices 2 to 3 respond successfully, and the slave control device 4 fails to respond.
(37) Time point T.sub.e (T.sub.e=70 ms): The master control device broadcasts address 2 again.
(38) Time point T.sub.f (T.sub.f=85 ms): The slave control devices 2 to 3 respond according to the broadcasting signal of address 2, and the slave control device 2 responds successfully, so address 2 is used as the communication address of the slave control device 2.
(39) Time point T.sub.g (T.sub.g=90 ms): The slave control device 4 responds according to the broadcasting signal of address 2. After it is detected during the responding process that there is a slave control device starting to respond, the slave control device 4 immediately stops responding.
(40) Time point T.sub.h (T.sub.h=110 ms): The master control device broadcasts address 3.
(41) Time point T.sub.i (T.sub.i=120 ms): The slave control devices 3 to 4 respond according to the broadcasting signal of address 3, and the slave control device 3 responds successfully, so address 3 is used as the communication address of the slave control device 3.
(42) Time point T.sub.j (T.sub.j=140 ms): The master control device broadcasts address 4.
(43) Time point T.sub.k (T.sub.k=150 ms): The slave control device 4 responds according to the broadcasting signal of address 4, and responds successfully, so address 4 is used as the communication address of the slave control device 4.
(44) Time point T.sub.l (T.sub.l=190 ms): Broadcastings of all addresses are completed and a new communication process is started.
(45) In a non-first broadcasting, the slave control device may determine the response time according to the response result of the previous broadcasting. The responding time-sequence of all slave control devices is adjusted based on the response result, that is, the slave control device that has successfully responded in the current broadcasting will respond preferentially in the next broadcasting, so that the master control device can quickly complete address allocation.
(46) Although the various steps have been described in the above order in the foregoing embodiments, those skilled in the art can understand that in order to achieve the effects of the embodiments, different steps need not be executed in such an order. They can be executed simultaneously (in parallel) or in a reverse order, and these simple changes are all within the scope of protection of the present disclosure.
(47) Those skilled in the art can understand that although some embodiments described herein include certain features included in other embodiments rather than other features, the combination of features of different embodiments means that they are within the scope of the present disclosure and form different embodiments. For example, in the claims of the present disclosure, any one of the claimed embodiments can be used in any combination.
(48) It should be noted that the above embodiments illustrate the present disclosure rather than limit the present disclosure, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be constructed as a limitation to the claims. The word “comprising” does not exclude the presence of elements or steps not listed in the claims. The word “a” or “an” preceding an element does not exclude the presence of multiple such elements. The present disclosure can be implemented by means of hardware comprising several different elements and by means of a suitably programmed PC. In a unit claims enumerating several devices, several of these devices may be embodied by the same hardware item. The use of the words “first”, “second”, “third” and the like does not indicate any order. These words can be interpreted as names.
(49) Hitherto, the technical solutions of the present disclosure have been described in conjunction with the preferred embodiments shown in the accompanying drawings, but it is easily understood by those skilled in the art that the scope of protection of the present disclosure is obviously not limited to these specific embodiments. Without departing from the principle of the present disclosure, those skilled in the art can make equivalent changes or replacements to relevant technical features, and the technical solutions after these changes or replacements will fall within the scope of protection of the present disclosure.