introduction

There are two factors that restrict the success of automatic address assignment technology: one is whether the logic (or algorithm) of automatic address assignment is efficient; the other is whether there is an efficient mediation mechanism in the case of bus competition. The principle and logic of automatic address assignment have been described in detail in “Application of automatic address assignment technology in multi split air conditioning system”. In this paper, the bus mediation mechanism is introduced in detail from the principle, examples and experimental results.

Research on effective methods to solve bus contention in automatic address assignment

1. The necessity of bus mediation mechanism

The connection diagram of the multi online system is shown in Figure 1. At this time, the indoor unit is not assigned an address temporarily, and the address is in an unknown state. When the outdoor unit sends the address reset command, all indoor units receive the outdoor unit address reset command almost at the same time. After all indoor units reset the current address, the indoor units upload address application data to the bus. If there is no bus mediation mechanism, all the data superimposed on the bus will cause the bus waveform distortion, and finally destroy the normal communication. Fig. 2 shows the measured waveforms of data sent by multiple devices and bus data under the condition of non adjustable shutdown. Among them, channel 1 is the data waveform measured at the sending end of an indoor unit, and channel 2 is the data waveform of the bus received at the receiving end. It can be seen from Figure 2 that the bus level logic and data baud rate are obviously disordered. In other words, without bus mediation mechanism, the direct result of bus data superposition is to destroy the bus level. It can be seen that bus mediation is an essential link to ensure the normal bus communication, and also the key method to ensure the success of communication.

Research on effective methods to solve bus contention in automatic address assignment

2. Basic principle of bus mediation mechanism

The mediation mechanism is simply to formulate a competition rule. That is, when the bus is idle, in order to prevent multiple devices from sending data at the same time, it is necessary to determine which device obtains the bus usage right. The result of this rule is that only one device can send data at a certain time, while the other failed devices are waiting. Figure 3 shows the mediation mechanism of bus competition between two devices. The detailed regulations are as follows.

Research on effective methods to solve bus contention in automatic address assignment

Rule 1: all devices monitor the bus level before sending data. If the bus level is low, it will not start sending data. According to rule 1, the bus level rule in application is: when idle, the bus level is high, and when any data is sent, the low level is taken as the starting bit. When the bus is low level, it is defined as bus busy. This rule resolves the bus conflict at the physical level.

Rule 2: the communication status on the bus is confirmed by judging the communication status flag of the main control chip at the beginning of transmission. When the communication status flag is true, it indicates that there is communication data on the bus, and the bus is busy and does not start sending data; otherwise, it means that there is no communication data on the bus.

Rule 3: every time a unit data is received, the timer is reset to zero. If the timer has not passed one unit of data time, there is the possibility of receiving the next unit of data, and the data will not be sent. For practical project flexible processing, a unit of data can be bits, bytes, etc.

If any one of the above three rules is satisfied, the data cannot be sent; only when none of the above rules are met can the data be sent.

3. Practical application and effect of bus mediation

Based on the above mediation mechanism, the control logic of bus monitoring, data processing and data return is designed when the address is automatically assigned. As shown in Figure 4, the bus is successfully mediated, that is, at a certain time, only one device occupies the bus.

Research on effective methods to solve bus contention in automatic address assignment

As shown on the right side of Figure 4, the sending time is within 10ms when the outdoor unit host sends data, and then the return data time of indoor unit. In the definition of 10 ms after the start of sending the outdoor unit, the timing starts, and the indoor unit starts to send data to the bus, and the time between them is the bus tuning time. As can be seen from Figure 4, the bus tuning time is 4.5ms (14.5 – 10ms). Fig. 5 is the statistical chart of bus mediation time for 100 times of experimental test. Because of neglecting the time of receiving bus data, decoding and coding and operation time of indoor unit, the actual mediation time is slightly reduced. In the case of neglecting the measurement error, it can be seen that the shortest bus tuning time is about 3MS and the longest time is less than 5ms. From the test data distribution, it can be concluded that most of the bus tuning time is about 4ms, which can meet the requirements of practical engineering.

It should be noted that if the entire address allocation time needs to be further shortened, the defined communication transmission time can be shortened (as described above in 10 ms time). The time of bus competition is determined by the actual time of all indoor units competing, and decreases with the decrease of the number of competition.

Research on effective methods to solve bus contention in automatic address assignment

4. Conclusion

This paper describes the bus contention mediation mechanism in the process of automatic address assignment from the principle and practical engineering application. Combined with the automatic address assignment method introduced above, it can realize the automatic address assignment efficiently and quickly. Although it is based on the application of multi on-line system, this technology is not limited to multi line system, and its method and principle can be extended to other similar occasions. From the analysis of the test results of practical engineering application, the bus mediation mechanism based on this method is an efficient mediation mechanism, which can effectively solve the problem of bus competition.

Editor in charge: GT

Leave a Reply

Your email address will not be published. Required fields are marked *