The present invention belongs to the technical field of washing machine, and more particularly to a method for washing machine failure detection and processing.
Only the door open/closed status signal is considered in processing in the traditional washing machine detection program. In fact, two IO ports are used and the input ports receiving the signals are scanned and read every 10 ms; if the signal is not changed in 100 ms continuously, the result by logic operation of NAND of the two IO ports output is being assigned to a buffer register. If the door open signal is detected by at least one of the IO port, the door is regarded in an open state and then the display chip and the power controller are in communication. If the display chip receives the signal indicating the door is opened or the communication with the power controller is failed longer than 3 seconds by means of CRC8 (Cyclic Redundancy Check 8-bit), the motor of the washing machine is being stopped. However, in this method, other washing machine failures, such as the continuous one-way rotation of the motor, washing time exceeded, spin-dry time exceeded, water supply exceeded, or alarm fault under the particular circumstance that the door is being opened during filing up water, washing or drying and the like, could not be timely sensed, which results in potential safety risks for users.
In order to solve the technical problem that there is not a method well suited for detecting the runtime program faults, a detection and processing method for washing machine failure is disclosed in the present invention.
In order to solve the above technical problem, the present invention is implemented by the following technical solution.
A method for detecting and processing washing machine failure, comprising:
A PC pointer detection step, in which includes:
(11) detecting the programs which service various washing machine running procedures respectively, in which each of the program corresponds to a subroutine, and the value of a logic register is being assigned when each of the subroutine execution initiates, wherein the programs at least include water supply program, washing program and the spin-dry program;
(12) detecting whether the current value of the logic register is identical to the assigned value when each of the subroutine completes execution, if the current value and the assigned value are different, it is determined that the PC pointer error occurs, and the program in which the error occurred is stored according to the assigned value;
(13) when the PC pointer error is determined, delaying t1, and then continually detecting whether the current value of the logic register is same with the assigned value, if identical, executing the subroutine continually, otherwise resetting the system.
Further, in the step (13), after resetting the system, reading the current water level data from the water-level sensor and comparing the current water level against the preset water level data, if the current water level is higher than the preset water level, ignoring the water supply program and implementing the subsequent program; if the current water level is zero, implementing the spin-dry program.
Further, the method includes a zero-crossing interrupt detection step, in which includes:
(21) Setting the zero-crossing interrupt period T1 and detecting the actual period T of the zero-crossing interrupt of the motor signal.
(22) Determining whether the zero-crossing interrupt T belongs to the range of [T1-Δt1,T1+Δt1], if it is in the range, the zero-crossing interrupt is regular, otherwise the zero-crossing interrupt is irregular;
(23) If the zero interrupt is irregular, resetting the system.
Further, the method includes a fixed cycle interrupt detection step, in which includes:
When it is detected that the upper cover of the washing machine is opened while the alarm fails to properly function and/or the procedure for terminating the current running subroutine is not timely executed, the fixed cycle interrupt error occurs, resetting the system.
Further, the method includes a DC fault detection step of the RAM of the SCM (Single Chip Microcomputer), in which includes:
Detecting all of the addresses of the RAM of the SCM cyclically by the chessboard detection method;
Storing the data of addresses to be detected and disabling the interrupts before the detection; firstly assigning either 0x55 or 0xaa to the first address to be detected while assigning the other value to the sequent address to be detected, and then reading data from the two addresses and comparing them against the assigned written data respectively, if neither an exact match found, a RAM error occurs and the exceptional handling is executed; if the data are match, detecting the other addresses of the RAM cyclically with the same method until all of the addresses are detected.
Further, the method includes a SCM register error detection step, in which includes:
Detecting all registers cyclically by the chessboard detection method;
Writing either 0x55 or 0xaa in each of the register subsequently and then reading the output, comparing the written data against the data read out to confirm whether the output is same as the original written data; and then writing the other value of 0x55 or 0xaa in and then read the output, comparing the written data and the data read out to confirm whether the output is same as the original written data; if the exact match is found in both comparisons, the register is regular; otherwise a register error occurs.
Further, the method includes a ROM detection step, in which includes: calculating the CRC-16 checksum of the area code of ROM, and then comparing the result with the fixed CRC-16 checksum stored in the ROM, if a mismatch found, ROM error occurs and the exception handling is executed.
Further, in the ROM detection step, calculating the CRC16 check value of a 32-bit data extracted from the ROM every time, and the CRC16 check value of all of the ROM areas are produced until the calculation of all of the data in the ROM is completed.
Further, the method further includes the step for processing the special function register: periodically assigning set values repeatedly to the configuration registers of the functional modules used in the SCM.
Compared with the prior art, the advantages and the positive effects of the present invention are: the washing machine failure detection processing method of the present invention can prevent internal operation errors caused by the running programs algorithm of washing machine, and also prevent other faulty operation patterns such as water supply exceeded or washing time exceeded, thereby ensuring the safe operation of the washing machine and reducing the possibility of personal injury caused by the washing machine failures.
The other features and advantages of the present invention will become more apparent by reading of the detailed description of the embodiments of the present invention in conjunction with the accompanying drawings.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following drawings, which are to be used in the description of the embodiments or the prior art, will be briefly described. It will be apparent that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained by those skilled in the art without departing from the inventive work.
Referring to the drawings, the invention will now be described completely in detail, and it will be apparent that the described embodiments are merely part of the embodiments of the invention and are not intended to be exhaustive. All the other embodiments based on the embodiments of the present invention obtained by those of ordinary skill in the art without creative work are within the scope of the present invention.
Explanation of Terminology
PC: program counter, referred to as PC;
RAM: the abbreviation of Random Access Memory, referred to as RAM;
ROM: the abbreviation of Read Only Memory, referred to as ROM;
CRC: the abbreviation of Cyclic Redundancy Check, referred to as CRC; CRC-16 refers to 16-bit cyclic redundancy check code;
DC: analog to digital conversion.
As shown in
A PC pointer detection step, as shown in
S11, detecting the programs which service various washing machine running procedures respectively, in which each of the program corresponds to a subroutine, and the value of a logic register is being assigned when each of the subroutine initiates to execute, wherein the running programs at least include water supply program, washing program and the spin-dry program.
S12, detecting whether the current value of the logic register is identical to the assigned value when each of the subroutine completes its execution, if the current value and the assigned value are different, it is determined that the PC pointer error occurs, and the program in which the error occurred is stored according to the assigned value;
S13, when the PC pointer error is determined, delaying t1, and then continually detecting whether the current value of the logic register is same with the assigned value, if identical, executing the subroutine continually, otherwise executing system resetting.
The PC pointer value always vectors to the address of the current executed program. If the PC pointer error occurs in runtime, the washing machine may maintain the current operation patterns because of the control failure, leading to errors as washing time exceeded, spin-dry time exceeded, or water supply exceeded. Those faults do not only damage the motor or other components, but also may further result in accidents and risk the safety of user. The PC pointer detection can sense the runtime safety problems and implement proper process to correct, so that the errors as water supply exceeded or idling cased by internal operation algorithm error could be prevented, thereby ensuring the safety operation of washing machine and lower the possibility of personal injury.
In the present embodiment, after resetting the system in the step S13, in order to prevent repeatedly execute the same program, as example filling water, the present embodiment provides further procedures, in which including reading the current water level data from the water-level sensor and comparing the current water level with the preset water level, if the current water level is higher than the preset water level, ignoring the water supply program and implementing the subsequent program; if the current water level is zero, implementing the spin-dry program. Since at least one complete subroutine is executed through the step S11 and step S12, it is assumed that a complete water supply process is performed. If the current water level is zero, there is no need to perform the water supply program or the washing program repeatedly, the direct execution of the spin-dry program could save water and power and also shorten the operation time.
As preferred, the present embodiment also includes a zero-crossing interrupt detection step, in which includes:
S21, Setting the zero-crossing interrupt period T1 and detecting the actual period T of the zero-crossing interrupt of the motor signal;
S22, Determining whether the zero-crossing interrupt T belongs to the range of [T1−Δt1,T1+Δt1], if it belongs to the range, the zero-crossing interrupt is regular, otherwise the zero-crossing interrupt is irregular;
S23, If the zero interrupt is irregular, resetting the system.
The electricity power frequency is 50 Hz. The external interrupt port of the SCM receives the electricity power signal through extra electricity circuit. The interrupt generated is defined as the zero-crossing interrupt and the normal signal period is 20 ms. The comparison result between the signal period of the zero-crossing interrupt and the time set by the SCM timing controller is used in the program to determine whether the timing interrupt or the zero-crossing interrupt is regular. If a zero-crossing interrupt error occurs, the washing machine may be in a running pattern of continuous one-way rotation which is possibly neglect by the users. The zero-crossing interrupt detection step could sense this zero-crossing error timely and execute system resetting to ensure the safety operation.
The present embodiment also includes fixed cycle interrupt detection step, in which includes:
When it is detected that the upper cover of the washing machine is opened while the alarm fails to properly function and/or the procedure for terminating the current running subroutine is not timely executed, the fixed cycle interrupt error occurs, resetting the system.
During the runtime of the washing machine, the fixed cycle interrupt is used to detect sudden situations when the washing machine should be stopped, such as the upper cover of the washing machine is opened in normal operation, and also used to automatically terminate the running of the washing machine and send alarm signal for preventing users from hurting. The occurrence of the fixed cycle interrupt error results in the situation that the alarm fails to properly function while the washing machine is still running regardless the upper cover is opened, which is a potential safety risk for users. The embodiment is to use the fixed cycle interrupt to further ensure the safety of washing machine running.
If the RAM of the SCM has DC faults, it may results in inconsistency between the data written in and the data read out from the SCM, therefore the program may not be properly executed and the washing machine cannot work. Therefore a DC fault detection step of the RAM of the SCM is provided in this embodiment, in which including:
Detecting all addresses of the RAM of the SCM cyclically by the chessboard detection method;
Before the detection, the data of all the addresses to be detected are stored and the interrupts are disabled. That procedure, on one hand is to ensure that the program can be executed properly with the original written data once the detection completed, on the other hand, is to avoid generating interrupts, in which the detection data may be regarded and processed as program data, during the detection. Then, firstly assigning either 0x55 or 0xaa to the first address to be detected while assigning the other value to the sequent address to be detected, and then reading data from the two addresses respectively and comparing them against the assigned written data respectively, if neither an exact match found, a RAM error occurs and the exceptional handling is executed; if the data are match, detecting the other addresses of the RAM cyclically with the same method until all of the addresses are detected. Wherein the written data of 0x55 is namely 01010101 and the written data of 0xaa is namely 10101010. In this embodiment, 0x55 and 0xaa are respectively assigned to two adjacent RAM addresses at the same time, and therefore both of the addresses can be detected at the same time. Moreover, the different value could separate the addresses in order to avoid the address confusion in detecting the two addresses simultaneously, thereby improving the efficiency of detection. In order to ensure the correctness of the detection result, after the first round of detection, it initiates the following steps that, from the first address the other value which was not assigned to the first address is written again, as an example, if the value 0x55 is assigned to the first address for the first time, that means only parts of the bits are updated as 1. Therefore, 0xaa should be assigned to the first address repeatedly, namely all the bits of the first address written as 0 are updated as 1 in the replicated assignment, which is capable of implementing effective detection of all the bits.
Further, the embodiment includes a SCM register error detection step, in which includes:
Detecting all registers cyclically by the chessboard detection method;
Writing either 0x55 or 0xaa in each of the register subsequently and then reading the output, comparing the written data against the data read out to confirm whether the output is same as the original written data; and then writing the other value of 0x55 or 0xaa in and then read the output, comparing the written data and the data read out to confirm whether the output is same as the original written data; if the exact match is found in both comparisons, the register is regular; otherwise a register error occurs and the register error is reported, resetting the system. In the embodiment, each of the register could be detected respectively and the effectiveness of detection could be ensured by writing the value of 0x55 and 0xaa respectively.
The method further includes a ROM detection step, in which includes: calculating the CRC-16 checksum of the area code of ROM, and then comparing the result with the fixed CRC-16 checksum stored in the ROM, if a mismatch found, ROM error occurs and the exception handling is executed. CRC is an error check code and characterized in that the bit length of the message and the bit length of the validity are selective. In the CRC algorithm, the bits representing the input can be encoded by a polynomial selected and the result is appended with, in the receiving end, the same algorithm is executed to ensure the correctness and completeness of data communication. In this embodiment, the CRC-8 cannot meet the requirements for distributing the message length of the area code of ROM while the using of CRC-32 is redundant. Therefore, the CRC-16 is preferably selected to according to the requirements of the area code of ROM and the expected distribution of message length. The use of the CRC-16 can prevent errors written in the programs occurring, thereby ensuring the safe operation of washing machine with program correctness.
As described in this embodiment, in the ROM detection step, calculating the CRC16 check value of a 32-bit data extracted from the ROM each time, and the CRC16 check value of the ROM area is produced until calculation with all ROM data completed.
The washing machine failure detection processing method of the present embodiment further includes the step for processing the special function register, in which comprises: periodically assigning set values repeatedly to the configuration registers of the functional modules used in the SCM. The special function register typically used to control the input port and the output port of the SCM. In order to prevent runtime error of the program defined input port and output port, as the input port is wrongly regarded as the output port, or the output port is wrongly regarded as the input port, the repeated non-stop assignment is used in this step to timely correct the written value which may be mistakenly written, without affecting the safe operation of the program.
It is to be understood that the foregoing description is not intended to be limiting of the invention and that the invention is not limited to the above-described examples and that variations, modifications, additions or substitutions made by one of ordinary skill in the art within the true scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
201510209110.3 | Apr 2015 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2016/077510 | 3/28/2016 | WO | 00 |