Disclosure of Invention
In order to solve the above problems in the prior art, that is, to solve the problems that when the line controller of the existing air conditioner analyzes the data returned by the indoor unit, an interference signal is easily analyzed and the communication is unstable, the present invention provides a data transmission method for the line controller of the air conditioner, wherein the data transmission method comprises: analyzing and storing the returned data of the indoor unit once every preset time; and taking the data stored at any time in a preset time period in all the stored data as the data replied by the indoor unit, wherein the preset time period is positioned at the rear section of the data receiving period of the line controller.
In a preferred embodiment of the data transmission method, the step of analyzing and storing the returned data of the indoor unit at predetermined intervals includes: detecting whether a data receiving environment in a set time is in a stable state; and if the data receiving environment is in a stable state, analyzing and storing the returned data of the indoor unit once every preset time. .
In a preferred embodiment of the data transmission method, the step of "detecting whether the data reception environment is in a stable state within a set time" includes: and detecting whether the pulse waveform of the pulse signal of the data received by the line controller within the set time is stable.
In a preferred embodiment of the data transmission method, the step of "detecting whether or not a pulse waveform of a pulse signal of the data received by the line controller within the set time is stable" includes: acquiring a return signal of the indoor unit; and if the return signal of the indoor unit is acquired, detecting whether the pulse waveform of the pulse signal of the data received by the wire controller within the set time is stable.
In a preferred embodiment of the data transmission method, the step of "detecting whether or not a pulse waveform of a pulse signal of the data received by the line controller within the set time is stable" includes: whether the pulse width of the pulse signal of the data received by the line controller within the set time is not less than the set pulse width is detected, and whether the pulse level of the pulse signal of the data received by the line controller within the set time is stable is detected.
In a preferred technical solution of the data transmission method, the step of "obtaining a return signal of the indoor unit" includes: and acquiring a falling edge signal of the zero-crossing point pulse signal.
In a preferred technical solution of the data transmission method, the set time is 100 microseconds after the falling edge signal of the zero-crossing point pulse signal is acquired.
In a preferred embodiment of the data transmission method, the step of analyzing and storing the returned data of the indoor unit at predetermined intervals includes: analyzing and storing the returned data of the indoor unit every 1 millisecond; the step of using the data stored at any time within the preset time period in all the stored data as the data replied by the indoor unit comprises the following steps: and taking the data stored when the last 3 milliseconds of the data receiving period of the wire controller in all the stored data as the data replied by the indoor unit.
The technical personnel in the field can understand that the data transmission method for the wire controller of the air conditioner can avoid a high-transmission section of the interference signal by taking the analyzed data in the preset time period as the reply data, so that the analyzed, stored and replied data are effective data returned by the indoor unit, the communication failure of the wire controller and the indoor unit caused by the communication based on the interference signal is avoided, the communication stability of the wire controller and the indoor unit is improved, and the air conditioner can run more reliably.
Further, in the case of analyzing and storing the returned data of the indoor unit once every 1 millisecond, the data stored at the 3 rd millisecond from the data reception cycle of the line controller among all the stored data is taken as the data replied by the indoor unit. Through the time setting, the action of the data analyzed and stored at the time point can adapt to domestic communication frequency and foreign communication frequency, namely, in a communication section without interference signals, a time point which can adapt to domestic and foreign communication environments at the same time is selected as a node for analyzing, storing and replying the data, so that the universality of the data transmission method is improved, an air conditioner executing the data transmission method can adapt to domestic and foreign communication environments at the same time, the air conditioner does not need to be adjusted according to the communication environments when the country of use changes, the use is convenient, and the debugging process of the air conditioner is reduced.
Detailed Description
It will be appreciated by those skilled in the art that in the description of the invention, although the steps of the control method of the invention are described in a particular order in the present application, the order is not limiting and that the steps may be performed in a different order by those skilled in the art without departing from the basic principles of the invention.
Based on the problems that the wire controller of the existing air conditioner easily resolves interference signals and communication is unstable when resolving data returned by the indoor unit, which are pointed out in the background art, the invention provides a data transmission method for the wire controller of the air conditioner, aiming at improving the data transmission stability of the wire controller and the indoor unit and avoiding the abnormal data transmission of the wire controller and the indoor unit caused by the interference signals.
Referring to fig. 1, fig. 1 is a pulse line of a line controller when the line controller and an indoor unit of the present invention transmit data. As shown in fig. 1, fig. 1 shows three pulse lines related to data transmission when the line controller and the indoor unit perform communication, which are, from top to bottom: the line controller sends a pulse line, namely the pulse line when the line controller sends data to the indoor unit, and the pulse information of the pulse line indicates that the line controller sends data to the indoor unit; when a pulse signal appears on the pulse line, the rising edge of the pulse signal indicates that the line controller starts to send data to the indoor unit, and the falling edge of the pulse signal indicates that the line controller starts to receive the data returned by the indoor unit; the wire controller receives the pulse line, namely the pulse line when the wire controller receives the data returned by the indoor unit, and the pulse information appearing on the pulse line indicates that the wire controller receives the returned data of the indoor unit. The line controller in fig. 1 receives a spike signal in a circle position on a pulse line, that is, an interference signal when the line controller communicates with the indoor unit, the interference signal is mostly a voltage signal of non-communication data formed by analyzing and judging different voltage values of data due to incomplete voltage release on a communication line between the indoor units or different types of main chips of the line controller, and the duration of the interference signal is less than the duration of a normal communication signal.
Based on the above situation, the present invention provides a data transmission method capable of preventing a line controller from replying to returned data of an indoor unit based on an interference signal.
Referring next to fig. 2 and continuing to fig. 1, fig. 2 is a flow chart illustrating the main steps of the data transmission method for the line controller and the indoor unit of the air conditioner according to the present invention. As shown in fig. 2, the data transmission method for the line controller of the air conditioner of the present invention includes:
step S1: analyzing and storing the returned data of the indoor unit once every preset time;
step S2: and taking the data stored at any time in a preset time period in all the stored data as the data replied by the indoor unit, wherein the preset time period is positioned at the rear section of the data receiving period of the line controller.
In the above step, the "data receiving period of the line controller" specifically refers to a process in which the line controller analyzes and stores the data returned by the indoor unit once. The "rear section" of the data receiving period of the line controller refers to a period from any time node in the latter half period of the data receiving period of the line controller to the end of the latter half period. For example, when the data receiving period of the line controller is 10 ms, the subsequent period may be any time node (including 5 ms) to 10 ms after 5 ms. Specifically, as can be seen from fig. 1, during the communication period, the line controller parses and stores the data once every time the indoor unit returns data. As can be seen from the pulse line reception of the line controller shown in fig. 1, each time the indoor unit transmits data, the line controller receives a pulse signal from the pulse line. The duration of the pulse signal is a data receiving period (from the occurrence of a rising edge of the pulse signal to the end of a falling edge of the pulse signal) of the line controller, and in the data receiving period, the line controller analyzes and stores data returned by the indoor unit once every preset time, so that a plurality of data received in sequence form a data set with a plurality of time nodes. Since the duration of the interference signal is shorter than that of the normal communication pulse signal, even if the interference signal is erroneously received as the normal communication signal, the interference signal is difficult to continue to the latter stage of one data reception period. In view of this, by selecting the data located at the rear segment of the data receiving period of the line controller in the data set as the data replied by the indoor unit, the returned data received at this stage can be excluded as the interference data, thereby avoiding the line controller from erroneously communicating with the indoor unit based on the interference signal, and effectively preventing the interference signal from causing the normal communication between the line controller and the indoor unit to be abnormal.
Further, the step S1 "analyzing and storing the returned data of the indoor unit once every preset time" specifically includes:
detecting whether a data receiving environment in a set time is in a stable state;
and if the data receiving environment is in a stable state, analyzing and storing the returned data of the indoor unit once every preset time.
In the above steps, before receiving data (i.e. analyzing and storing the indoor unit return data), it is first detected whether the data receiving environment is stable, so as to check in advance whether the current communication signal is an interference signal in the early stage of receiving data.
Further, the step of detecting whether the data receiving environment is in a stable state within the set time includes:
and detecting whether the pulse waveform of the pulse signal of the data received by the line controller within the set time is stable.
In the above steps, the detected data receiving environment is a signal condition of the detected communication data. As can be seen from the waveforms of the interference signal and the normal impulse communication signal shown in fig. 1, the waveform width and height of the normal impulse communication signal are both fixed shapes, while the waveform of the interference signal is in the shape of a peak, and the height of the peak may be higher or lower than the height of the normal impulse communication signal, that is, because the duration of the interference signal is short, the interference signal is difficult to stably continue after the rising edge occurs, and the peak height may change continuously to form the shape of the peak, so that a fast stability determining process is arranged before receiving data, which can eliminate the interference signal before receiving data, thereby performing a preliminary screening on the interference signal.
Further, the step of detecting whether the pulse waveform of the pulse signal of the data received by the line controller within the set time is stable includes:
acquiring a return signal of the indoor unit;
and if the return signal of the indoor unit is acquired, detecting whether the pulse waveform of the pulse signal of the data received by the wire controller within the set time is stable.
In the above steps, the feedback signal refers to a pulse signal which is returned by the indoor unit and represents the data returned by the indoor unit. The stability judgment process is arranged between the detection of the return signal and the analysis of the return signal, so that the wire controller does not need to be in a stability judgment environment all the time, and the unnecessary operation process of the controller is reduced.
In a specific embodiment, the step of obtaining a return signal of the indoor unit includes:
and acquiring a falling edge signal of the zero-crossing point pulse signal.
In the above steps, when the pulse signal on the zero-crossing point pulse line has a falling edge, it means that the indoor unit starts to return data, and at this time, the line controller starts to perform signal stability judgment.
In a specific embodiment, the step of detecting whether the pulse waveform of the pulse signal of the data received by the line controller within the set time is stable includes:
whether the pulse width of the pulse signal of the data received by the line controller within the set time is not less than the set pulse width is detected, and whether the pulse level of the pulse signal of the data received by the line controller within the set time is stable is detected.
Since the pulse duration and the level value of the normal pulse communication signal are stable, if it is detected that the current communication signal is hard to continue or the level value is continuously changed after the rising edge, it indicates that the current communication signal is an interference signal.
In a preferred embodiment, the set time is 100 microseconds after the falling edge signal of the pulse signal that acquires the zero-crossing point pulse line. That is, after the falling edge signal of the pulse signal of the zero-crossing pulse line is acquired, the current communication signal is continuously judged to be stable within 100 microseconds, and the duration time and the level value of the current communication signal are detected, so that the interference signal is preliminarily screened before the return data of the indoor unit is analyzed. It is known from trial and error that the 100 microsecond time limit can not only screen out the interference signal in advance, but also avoid delaying the reception of the returned data.
Preferably, the step of "analyzing and storing the returned data of the indoor unit once every preset time" includes:
analyzing and storing the returned data of the indoor unit every 1 millisecond;
the step of using the data stored at any time within the preset time period in all the stored data as the data replied by the indoor unit comprises the following steps:
and taking the data stored at the last 3 milliseconds of the data receiving period of the wire controller in all the stored data as the data replied by the indoor unit.
In the above steps, the data is analyzed and stored once every 1 millisecond, and the data analyzed and stored when the last 3 milliseconds before the rising edge of the pulse of the zero-crossing pulse line occurs (i.e. the wire controller starts to recover the return data of the indoor unit) (i.e. the rising edge of the pulse of the zero-crossing pulse line occurs after 3 milliseconds from the time node) is used as the data recovered by the indoor unit, so as to enable the above communication process to simultaneously accommodate 50HZ and 60HZ power supplies while eliminating interference signals, thereby enabling the air conditioner in domestic and foreign use environments to execute the data transmission method of the invention without adjustment, even if the duration of the pulse waveform of the normal communication signal is changed when the power supply is changed, the normal data transmission between the wire controller of the air conditioner and the indoor unit is not influenced.
In the above embodiment, the preset time for analyzing and storing the interval between the data, the time node when replying the data, and the set time when determining the stability are not limited to the examples of 1 millisecond, 3 milliseconds, and 100 microseconds, and any one of the above times can be adjusted without affecting the data transmission. For example, among all the stored data, data stored at the 2 nd millisecond from the data reception cycle of the line controller may be regarded as data replied by the indoor unit, or data may be analyzed and stored once every 0.5 milliseconds.
Referring to fig. 3, fig. 3 is a flowchart illustrating detailed steps of a data transmission method for a line controller of an air conditioner according to the present invention. As shown in fig. 3, a preferred embodiment of the present invention comprises the steps of:
step S100: acquiring a falling edge signal of a zero crossing point pulse signal;
step S101: judging whether a falling edge signal of the zero crossing point pulse signal is acquired, if so, executing the step 102, otherwise, returning to the step S100;
step S102: detecting whether the pulse width of a pulse signal of data received by the line controller within set time is not less than the set pulse width, and simultaneously detecting whether the pulse level of the pulse signal of the data received by the line controller within the set time is stable;
step S103: under the condition that the pulse width of the pulse signal is not less than the set pulse width and the pulse level is stable, analyzing and storing the returned data of the indoor unit once every preset time, and if any one of the pulse width and the pulse level of the pulse signal does not meet the stable condition, not processing the current communication signal;
step S104: and taking the data stored at any time within a preset time period in all the stored data as the data replied by the indoor unit.
In summary, the data transmission method for the line controller of the air conditioner of the present invention can avoid the line controller from communicating with the indoor unit based on the interference signal by a way of determining stability in advance and avoiding the high-power section of the interference signal from processing the reply data, thereby avoiding the situation that the communication based on the interference signal fails to cause the communication between the line controller and the indoor unit, improving the stability of the communication between the line controller and the indoor unit, and enabling the air conditioner to operate more reliably.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.