CN109840075B - Control panel based on layered design and design method - Google Patents
Control panel based on layered design and design method Download PDFInfo
- Publication number
- CN109840075B CN109840075B CN201811573852.4A CN201811573852A CN109840075B CN 109840075 B CN109840075 B CN 109840075B CN 201811573852 A CN201811573852 A CN 201811573852A CN 109840075 B CN109840075 B CN 109840075B
- Authority
- CN
- China
- Prior art keywords
- layer
- task
- preset
- execution
- function definition
- 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
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Telephonic Communication Services (AREA)
- Stored Programmes (AREA)
Abstract
The utility model provides a control panel based on hierarchical design and a design method thereof, which are used for solving the problems that the control panel program in the prior art is complex to control, difficult to isolate and transplant and difficult to maintain; the system layer is positioned on hardware and generates system function definition correspondingly by receiving a preset hardware trigger signal and a preset event processing signal; the task layer is positioned on the system layer, and writes task function definitions through the function definitions of the system layer; the execution layer is positioned on the task layer, and the execution layer writes the execution function definition through the function definition of the system layer and the function definition of the task layer. By adopting the general program framework, the complexity of a control system can be reduced, each task layer and each execution layer can be isolated, and the general program framework has good program portability and maintainability.
Description
Technical Field
The utility model belongs to the technical field of small household appliance program control framework design, and particularly relates to a control panel general program framework based on hierarchical design and a design method.
Background
In the small household appliance in the prior art, the setting of programs is complex, each system is a continuous control flow from task to execution, and when one writing in a certain flow has a problem, the program is difficult to check;
when some task programs or executive programs of the small household appliances need to be modified, the change is complex, and the maintenance is also complex.
In view of the foregoing, it is desirable to provide a universal program framework for control panels with simple system framework design, program portability, and two-number inspection and maintenance capabilities to solve the above problems.
Disclosure of Invention
The utility model aims to provide a control board general program framework based on hierarchical design and a design method aiming at the problems in the prior art.
The purpose of the utility model can be realized by the following technical scheme:
a control panel general program framework based on hierarchical design comprises a system layer, a task layer and an execution layer;
the system layer is positioned on preset hardware, the system layer defines system functions according to preset system requirements, and the system layer is triggered by received preset hardware trigger signals and preset event processing signals;
the task layer is positioned on the system layer, the task layer performs task function definition by combining system function definition of the system layer and preset task requirements, and the task layer is triggered by receiving trigger of the corresponding system layer;
the execution layer is located on the task layer, the execution layer performs execution function definition by combining system function definition of the system layer, task function definition of the task layer and preset execution requirements, and the execution layer performs triggering by receiving triggering of the corresponding task layer.
Further, the task layer comprises a plurality of subtask layers, the plurality of subtask layers are ordered according to a preset task layer sequence, and the subtask layers perform subtask function definition according to a preset task requirement and a preset task layer sequence number.
Furthermore, the execution layer comprises a plurality of sub-execution layers, the sub-execution layers are sorted according to a preset execution layer sequence, and the sub-execution layers perform sub-execution function definition according to a preset execution requirement and a preset execution layer sequence number.
Further, a clock layer is included for controlling the framework to run again when the framework running time reaches the preset tick time.
A control panel general program framework design method based on hierarchical design comprises the following steps:
s1: performing system function definition on a system layer according to preset system requirements, and performing system trigger function definition on a preset hardware trigger signal and a preset event processing signal;
s2: performing task function definition on the task layer by combining system function definition of the system layer and preset task requirements;
s3: and executing function definition on the execution layer by combining the system function definition of the system layer, the task function definition of the task layer and the preset execution requirement.
Further, step S2 includes:
s21: performing task function definition on the plurality of subtask layers by combining system function definition of the system layer and preset task requirements;
s22: sequencing the plurality of subtask layers according to a preset task sequence;
s23: and controlling the plurality of subtask layers to switch according to a preset task sequence.
Further, step S23 includes:
s231: controlling a plurality of subtask layers to switch according to a preset task sequence;
s232: judging whether a preset hardware trigger signal is received or not;
s233: if yes, returning to the system layer.
Further, step S3 includes:
s31: executing function definitions are carried out on the multiple sub-execution layers by combining the system function definitions of the system layer, the task function definitions of the task layer and preset execution requirements;
s32: sequencing the multiple sub-execution layers according to a preset execution sequence;
s33: and controlling the plurality of sub-execution layers to trigger and switch according to a preset task sequence.
Further, step S33 includes:
s331: controlling the plurality of sub-execution layers to switch according to a preset execution sequence;
s332: judging whether a preset hardware trigger signal is received or not;
s333: if yes, returning to the system layer.
Further, comprising the steps of:
judging whether the running time of the framework reaches a preset tick time or not;
if so, the framework is run again.
Based on the technical scheme, the embodiment of the utility model can at least produce the following technical effects:
(1) the control panel general program framework based on the layered design adopts the layered design, reduces the complexity of control panel programs, and can be realized independently because each layer is relatively independent.
(2) Each layer can be separated through a layered design, and when a certain layer changes, the changed layer can be independent independently, so that the changed layer does not influence the application of other layers in the frame, and the purpose of isolating the changed layer is realized;
(3): the control panel general program framework based on the layered design has good portability;
(4): the control panel universal framework based on the layered design has good maintainability.
Drawings
Embodiments of the utility model are described in further detail below with reference to the attached drawing figures, wherein:
FIG. 1 is a first hierarchical structure diagram of a control panel universal framework based on hierarchical design according to the present invention;
fig. 2 is a second hierarchical structure diagram of a control board universal framework based on a hierarchical design according to the first embodiment;
FIG. 3 is a first flowchart of a design method of a control panel universal framework based on a hierarchical design according to the present invention;
fig. 4 is a second flow of a design method of a control board universal framework based on a hierarchical design according to the first embodiment.
Detailed Description
The following are specific embodiments of the present invention and are further described with reference to the accompanying drawings, but the present invention is not limited to these embodiments.
The technical solution provided by the present invention is explained in more detail with reference to fig. 1 to 4.
Example one
The present embodiment provides a control panel universal framework based on a hierarchical design, as shown in fig. 1 to fig. 2, the framework includes:
the system layer is positioned on preset hardware, the system layer defines system functions according to preset system requirements, and the system layer is triggered by received preset hardware trigger signals and preset event processing signals;
the task layer is positioned on the system layer, the task layer performs task function definition by combining system function definition of the system layer and preset task requirements, and the task layer is triggered by receiving trigger of the corresponding system layer;
the execution layer is located on the task layer, the execution layer performs execution function definition by combining system function definition of the system layer, task function definition of the task layer and preset execution requirements, and the execution layer performs triggering by receiving triggering of the corresponding task layer.
As shown in fig. 1, the general program control framework of the control board defines a three-layer architecture;
the system layer is located at the topmost end of the program and used for directly receiving preset hardware trigger signals and preset event processing signals.
The task layer is a work task allocation layer below the system layer and is positioned in the program middle layer.
The execution layer is an execution process under the task layer and is positioned at the lowest layer of the program.
Further, the task layer comprises a plurality of subtask layers, the plurality of subtask layers are ordered according to a preset task layer sequence, and the subtask layers perform subtask function definition according to a preset task requirement and a preset task layer sequence number.
Furthermore, the execution layer comprises a plurality of sub-execution layers, the sub-execution layers are sequenced according to a preset execution layer sequence, and the sub-execution layers perform sub-execution function definition according to a preset execution requirement and a preset execution layer sequence number.
Further, a clock layer is included for controlling the framework to run again when the framework running time reaches the preset tick time.
As shown in fig. 2, the present embodiment provides a general program framework for a control panel based on small home appliances;
in a control panel general program framework of a small household appliance, a system layer is generally defined as four codes: standby, startup, working and warning; the system layer code can be properly cut and added according to the functional requirements of different small household electrical appliance products.
For example, the system level of a coffee machine may define the system functionality as four events, one for each code: standby, power-on, working and warning; the system layer of the soybean milk maker can define system functions into six codes: starting up, preserving heat, standby, working, alarming and cleaning; therefore, different definitions can be made according to different functional requirements.
When a preset hardware trigger signal or a preset event processing signal is received, the program can be switched from one event to another event;
for example, in a key signal or a work event, an anomaly is detected and a jump can be made directly to an alarm event.
The system layer corresponding to each event consists of a plurality of task layers;
taking the working events of the system layer as an example, the working events can be divided into subtask 1 and subtask 2 … subtask N.
The task switching is carried out according to a preset task sequence, and when the task 1 is executed, the task 2 is immediately jumped to.
In the task layer, when a preset hardware trigger signal or a preset event processing signal is received, the system layer can be directly returned to the task layer.
Wherein each task layer is composed of a plurality of execution layers;
namely, execution of procedure 1, execution of procedure 2, execution of procedure 3 …, and execution of procedure N.
Wherein, the switching of the execution process is switched according to a preset execution sequence, and when the execution process 1 is finished, the execution process 2 is immediately jumped to.
In the task layer, when a preset hardware trigger signal or a preset event processing signal is received, the system layer can be directly returned to the system layer or the task layer.
The setting of the task layer and the execution layer is designed according to preset requirements.
The control panel general program framework based on the layered design is adopted, the complexity of the control panel program is reduced, and each layer is relatively independent, so that each layer can be realized independently. Each layer can be separated through a layered design, and when a certain layer changes, the changed layer can be independent independently, so that the changed layer does not influence the application of other layers in the frame, and the purpose of isolating the changed layer is realized; the transplanting performance is good; the control panel universal framework based on the layered design has good maintainability.
Example two
The embodiment provides a control panel general program framework design method based on hierarchical design, as shown in fig. 3 to 4:
the method comprises the following steps:
s1: performing system function definition on a system layer according to preset system requirements, and performing system trigger function definition on a preset hardware trigger signal and a preset event processing signal;
s2: performing task function definition on the task layer by combining system function definition of the system layer and preset task requirements;
s3: and executing function definition on the execution layer by combining the system function definition of the system layer, the task function definition of the task layer and the preset execution requirement.
For example, the coffee machine performs system function definition on a system layer according to preset system requirements to define four events: starting up, standby, working and alarming, and performing system trigger function definition on a preset hardware trigger signal and a preset event processing signal: for example, when a startup key signal of preset hardware is received, the startup is defined at the moment; for example, when the execution of the received work event is abnormal, the alarm is defined at the moment;
further, step S2 includes:
s21: performing task function definition on the plurality of subtask layers by combining system function definition of the system layer and preset task requirements;
s22: sequencing the plurality of subtask layers according to a preset task sequence;
s23: and controlling the plurality of subtask layers to switch according to a preset task sequence.
Further, step S23 includes:
s231: controlling a plurality of subtask layers to switch according to a preset task sequence;
s232: judging whether a preset hardware trigger signal is received or not;
s233: and if so, returning to the system layer.
The task layer below each system layer can be divided into a plurality of task layers, for example, the task layer below the working system layer of the coffee machine needs to perform tasks such as timing, grinding, water injection, boiling and the like, so that the task layer below the working system layer can be seen to have a plurality of sub-task layers, wherein the plurality of sub-task layers perform task function definition according to a preset task sequence, for example, after the coffee machine works, the timing task layer is skipped first, then coffee beans are ground, then the ground coffee is injected with water, and then coffee powder mixed with water is boiled; and switching according to a preset task sequence.
When the coffee machine receives a preset hardware trigger signal, such as a standby key signal, in water injection, the coffee machine directly returns to a standby system layer of the system layer.
Further, step S3 includes:
s31: executing function definitions are carried out on the multiple sub-execution layers by combining the system function definitions of the system layer, the task function definitions of the task layer and preset execution requirements;
s32: sequencing the multiple sub-execution layers according to a preset execution sequence;
s33: and controlling the plurality of sub-execution layers to trigger and switch according to a preset task sequence.
Further, step S33 includes:
s331: controlling the plurality of sub-execution layers to switch according to a preset execution sequence;
s332: judging whether a preset hardware trigger signal is received or not;
s333: if yes, returning to the system layer.
The execution layer below each task layer can be divided into a plurality of execution layers, for example, the task layer below the working system layer of the coffee machine needs to perform tasks such as timing, grinding, water injection, boiling and the like; wherein, a plurality of sub-execution layers are arranged below the grinding task layer: such as grinding motor rotation mode, grinding motor rotation speed, etc.; therefore, the execution layer below the grinding task layer is provided with a plurality of sub-execution layers, wherein the sub-execution layers perform execution function definition according to a preset execution sequence, for example, after the coffee machine grinds, a motor rotation mode is selected firstly, and then the rotating speed of the eye membrane electrode is selected; i.e. switching according to a preset task order.
When the coffee machine is grinding and receives a preset hardware trigger signal, such as a standby key signal, the coffee machine directly returns to a standby system layer of the system layer.
Further, comprising the steps of:
judging whether the running time of the framework reaches a preset tick time or not;
if so, the framework is run again.
The frame uses the commercial power zero-crossing interruption for 20ms as the tick clock for the frame operation.
The method is executed once every 20ms in the main loop, and the time of frame loop once is less than 20ms and as small as possible, so that the program can respond in time.
The control panel general program framework design method based on the layered design reduces the complexity of the control panel program, and each layer can be realized independently because each layer is relatively independent. Each layer can be separated through a layered design, and when a certain layer changes, the changed layer can be independent independently, so that the changed layer does not influence the application of other layers in the frame, and the purpose of isolating the changed layer is realized; the transplanting performance is good; the control panel universal framework based on the layered design has good maintainability.
The specific embodiments described herein are merely illustrative of the spirit of the utility model. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the utility model as defined in the appended claims.
Claims (6)
1. A control panel based on a layered design is characterized by comprising a system layer, a task layer and an execution layer;
the system layer is positioned at the top end of the program, performs system function definition according to preset system requirements, and is triggered by a received preset hardware trigger signal and a preset event processing signal;
the task layer is a work task allocation layer below the system layer and is positioned in the program middle layer, the task layer performs task function definition by combining system function definition of the system layer and preset task requirements, and the task layer performs triggering by receiving triggering of the corresponding system layer;
the execution layer is an execution process under the task layer, is positioned at the bottommost layer of a program, performs execution function definition by combining system function definition of the system layer, task function definition of the task layer and a preset execution requirement, and triggers by receiving triggering of the corresponding task layer;
the task layer below the system layer comprises a plurality of subtask layers, the plurality of subtask layers are ordered according to a preset task layer sequence, and the subtask layers perform subtask function definition according to a preset task requirement and a preset task layer sequence number;
the execution layer below the task layer comprises a plurality of sub-execution layers, the sub-execution layers are sequenced according to a preset execution layer sequence, and the sub-execution layers perform sub-execution function definition according to a preset execution requirement and a preset execution layer sequence number.
2. The control board based on the hierarchical design according to claim 1, comprising a clock layer for controlling the framework to operate again when the framework operation time reaches the preset tick time.
3. A control panel design method based on hierarchical design is characterized by comprising the following steps:
s1: performing system function definition on a system layer according to preset system requirements, and performing system trigger function definition on a preset hardware trigger signal and a preset event processing signal;
s2: performing task function definition on the task layer by combining system function definition of the system layer and preset task requirements;
s3: executing function definition on the executing layer by combining system function definition of the system layer, task function definition of the task layer and preset execution requirements;
the system layer is positioned at the top end of the program; the task layer is a work task distribution layer below the system layer and is positioned in the program middle layer; the execution layer is an execution process under the task layer and is positioned at the bottommost layer of the program;
step S2 includes:
s21: the task layer below the system layer comprises a plurality of subtask layers, and the task function definition is carried out on the plurality of subtask layers by combining the system function definition of the system layer and the preset task requirement;
s22: sequencing the plurality of subtask layers according to a preset task sequence;
s23: controlling a plurality of subtask layers to switch according to a preset task sequence;
step S3 includes:
s31: the execution layer below the task layer comprises a plurality of sub-execution layers, and the plurality of sub-execution layers are subjected to execution function definition by combining the system function definition of the system layer, the task function definition of the task layer and a preset execution requirement;
s32: sequencing the multiple sub-execution layers according to a preset execution sequence;
s33: and controlling the plurality of sub-execution layers to trigger and switch according to a preset task sequence.
4. The control board design method based on hierarchical design according to claim 3, wherein the step S23 includes:
s231: controlling a plurality of subtask layers to switch according to a preset task sequence;
s232: judging whether a preset hardware trigger signal is received or not;
s233: if yes, returning to the system layer.
5. The control board design method based on hierarchical design according to claim 3, wherein the step S33 includes:
s331: controlling the plurality of sub-execution layers to switch according to a preset execution sequence;
s332: judging whether a preset hardware trigger signal is received or not;
s333: if yes, returning to the system layer.
6. The control panel design method based on the hierarchical design as set forth in claim 3, comprising the steps of:
judging whether the running time of the framework reaches a preset tick time or not;
if so, the framework is run again.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811573852.4A CN109840075B (en) | 2018-12-21 | 2018-12-21 | Control panel based on layered design and design method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811573852.4A CN109840075B (en) | 2018-12-21 | 2018-12-21 | Control panel based on layered design and design method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109840075A CN109840075A (en) | 2019-06-04 |
CN109840075B true CN109840075B (en) | 2022-05-31 |
Family
ID=66883230
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811573852.4A Active CN109840075B (en) | 2018-12-21 | 2018-12-21 | Control panel based on layered design and design method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109840075B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104991452A (en) * | 2015-05-12 | 2015-10-21 | 广东瑞德智能科技股份有限公司 | Design method for household electrical appliance control framework in object-oriented programming |
CN107157330A (en) * | 2017-06-27 | 2017-09-15 | 广州康宏科技股份有限公司 | A kind of full-automatic coffee machine and its method of work |
CN107991930A (en) * | 2017-12-15 | 2018-05-04 | 苏州咖博士咖啡***科技有限公司 | A kind of coffee machine system software controls method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP1533748A1 (en) * | 2003-11-20 | 2005-05-25 | Steiner AG Weggis | Arrangement for electronic registration of specific data, particularly for different functional units of a coffee maker |
US10169016B2 (en) * | 2016-10-24 | 2019-01-01 | International Business Machines Corporation | Executing optimized local entry points |
-
2018
- 2018-12-21 CN CN201811573852.4A patent/CN109840075B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104991452A (en) * | 2015-05-12 | 2015-10-21 | 广东瑞德智能科技股份有限公司 | Design method for household electrical appliance control framework in object-oriented programming |
CN107157330A (en) * | 2017-06-27 | 2017-09-15 | 广州康宏科技股份有限公司 | A kind of full-automatic coffee machine and its method of work |
CN107991930A (en) * | 2017-12-15 | 2018-05-04 | 苏州咖博士咖啡***科技有限公司 | A kind of coffee machine system software controls method |
Also Published As
Publication number | Publication date |
---|---|
CN109840075A (en) | 2019-06-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10711381B2 (en) | Washing machine and controlling method therefor | |
CN105266740B (en) | A kind of dish-washing machine water-saving method and dish-washing machine | |
CN104881019A (en) | Appliance fault network maintenance system and method | |
CN109932911A (en) | A kind of customizing method and household electrical appliance, storage medium of keypress function | |
CN102634961A (en) | Power consumption display control system and method for washing machine | |
CN110007608B (en) | Device for controlling related device based on operation condition, scheduling robot and server | |
CN104133612A (en) | Method and system for displaying functions of intelligent terminal application program | |
CN103019766B (en) | A kind of dynamic wallpaper method to set up based on Android device, device and terminal | |
CN109840075B (en) | Control panel based on layered design and design method | |
CN104735264A (en) | Mobile terminal and control method thereof | |
CN101202027B (en) | Control system and control method for display screen | |
CN107918567A (en) | Method and system for restoring factory settings, readable storage medium and electronic device | |
CN110543266A (en) | Interface display method and terminal equipment | |
CN108937806B (en) | Dispenser control method, dishwasher, and computer-readable storage medium | |
CN109507916B (en) | Method, device, server and storage medium for controlling recovery work of household appliance | |
CN108930126B (en) | Display method and display system of washing effect, washing equipment and computer equipment | |
CN103092118A (en) | Household appliance safety detection system and method | |
WO2006097676A3 (en) | Monitoring computer-controlled processes | |
RU2012149582A (en) | DEVICE, METHOD, COMPUTER PROGRAM AND USER INTERFACE | |
CN112626794B (en) | Display control method and device for multiple washing machine, computer equipment and storage medium | |
CN109998436A (en) | A kind of dish-washing machine and its control method of individual palpation key operation | |
CN110016780A (en) | Urgent control method for washing machine | |
CN105578228B (en) | A kind of control method and device of smart home | |
CN108603321A (en) | The operating method and its program of wash mill | |
TW201005578A (en) | Control apparatus and related method for a computer system |
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 |