CN109840075A - A kind of control panel general program frame and design method based on hierarchical design - Google Patents

A kind of control panel general program frame and design method based on hierarchical design Download PDF

Info

Publication number
CN109840075A
CN109840075A CN201811573852.4A CN201811573852A CN109840075A CN 109840075 A CN109840075 A CN 109840075A CN 201811573852 A CN201811573852 A CN 201811573852A CN 109840075 A CN109840075 A CN 109840075A
Authority
CN
China
Prior art keywords
layer
task
function
execution
control panel
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.)
Granted
Application number
CN201811573852.4A
Other languages
Chinese (zh)
Other versions
CN109840075B (en
Inventor
庄克成
刘冲文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Jingyuan Technology Co Ltd
Original Assignee
Ningbo Jingyuan Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ningbo Jingyuan Technology Co Ltd filed Critical Ningbo Jingyuan Technology Co Ltd
Priority to CN201811573852.4A priority Critical patent/CN109840075B/en
Publication of CN109840075A publication Critical patent/CN109840075A/en
Application granted granted Critical
Publication of CN109840075B publication Critical patent/CN109840075B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Stored Programmes (AREA)
  • Telephonic Communication Services (AREA)

Abstract

The present invention provides a kind of control panel general program frame based on hierarchical design, it is complicated to solve control panel process control in the prior art, the problem for being not easy to be isolated and transplant and maintenance is more difficult, based on the control panel general program frame of hierarchical design, including system layer, task layer and execution level;The system layer is on hardware, and system layer handles the corresponding generation system function definition of signal by receiving predetermined hardware trigger signal and predeterminable event;The task layer is in system layer, and task layer is defined by the function definition of system layer to write task function;The execution level is on task layer, and execution level is defined by the function of system layer to be defined with the function of task layer to write and execute function definition.Using this general program frame, the complexity of control system can reduce, each task layer and each execution level can be kept apart, and there is good program portability and maintainability.

Description

A kind of control panel general program frame and design method based on hierarchical design
Technical field
The invention belongs to small household appliances process control Frame Design technical field more particularly to a kind of controls based on hierarchical design Making sheet general program frame and design method.
Background technique
Small household electrical appliance in the prior art, wherein the setting of program is more complicated, each system to task and arrives Execution is all a continuous control flow, some inside a certain process is write when something goes wrong, is difficult to check and;
When certain task programs of small household appliances or execution program need to modify, more complicated, maintenance is changed It is more complicated.
In conclusion need to propose that a kind of Framework design is simple, program transportability and with No. two inspection and The control panel general program frame of maintainability solves the above problems.
Summary of the invention
The purpose of the present invention is there is the above problem in view of the prior art, a kind of control based on hierarchical design is proposed Plate general program frame and design method.
Object of the invention can be realized by the following technical scheme:
A kind of control panel general program frame based on hierarchical design, including system layer, task layer and execution level;
The system layer is on predetermined hardware, and system layer carries out system function definition according to predetermined system demand, described System layer handles signal triggering by received predetermined hardware trigger signal and predeterminable event;
The task layer is in system layer, the system function definition of task layer combination system layer and preset task demand Task function definition is carried out, the task layer is triggered by receiving the triggering of correspondence system layer;
The execution level is on task layer, and the system function of execution level combination system layer defines, the task function of task layer It can define and preset execution demand to carry out executing function definition, the execution level is carried out by receiving the triggering of corresponding task layer Triggering.
Further, task layer includes multiple subtask layers, and the multiple subtask layer is arranged according to preset task layer sequence Sequence, subtask layer carry out the definition of subtask function according to preset task demand and preset task layer sequence serial number.
Further, execution level includes multiple sub- execution levels, and the multiple sub- execution level is arranged according to default execution level sequence Sequence, sub- execution level carry out son according to default execution demand and default execution level sequence serial number and execute function definition.
Further, including clock layer, the clock layer, for when the ticking time is preset in the arrival of frame runing time, Control framework is run again.
A kind of control panel general program frame design method based on hierarchical design, comprising steps of
S1: system function definition is carried out to system layer according to predetermined system demand, and to predetermined hardware trigger signal and in advance If event handling signal carries out the definition of system trigger function;
S2: system function definition and preset task demand in conjunction with system layer carry out task function definition to task layer;
S3: in conjunction with system layer system function define, the definition of the task function of task layer and default execution demand are to holding Row layer carries out executing function definition.
Further, step S2 includes:
S21: system function definition and preset task demand in conjunction with system layer carry out task function to multiple subtask layers It can definition;
S22: multiple subtask layers are ranked up according to preset task sequence;
S23: multiple subtask layers are controlled and are switched over according to preset task sequence.
Further, step S23 includes:
S231: multiple subtask layers are controlled and are switched over according to preset task sequence;
S232: judge whether to receive predetermined hardware trigger signal;
S233: if so, return system layer.
Further, step S3 includes:
S31: in conjunction with system layer system function define, the task function of task layer definition and default execution demand to more A sub- execution level carries out executing function definition;
S32: multiple sub- execution levels are ranked up according to default execution sequence;
S33: the multiple sub- execution levels of control carry out triggering switching according to preset task sequence.
Further, step S33 includes:
S331: the multiple sub- execution levels of control are switched over according to default execution sequence;
S332: judge whether to receive predetermined hardware trigger signal;
S333: if so, return system layer.
Further, comprising steps of
Judge whether the runing time of frame reaches and presets the ticking time;
If so, operation frame again.
Based on the above-mentioned technical proposal, the embodiment of the present invention at least can produce following technical effect:
(1) control panel program is reduced using hierarchical design based on the control panel general program frame of hierarchical design Complexity, due to every layer be all it is relatively independent, every layer can all be implemented separately.
(2) by hierarchical design, each layer can be separated, when a certain layer changes, can individually by The layer of variation carries out independently, the layer of variation being allowed to will not influence the application of other layers frame Nei, realizes the purpose of isolation change layer;
(3): based on the control panel general program frame of hierarchical design, there is good transplantability;
(4): based on the control panel general framework of hierarchical design, there is good maintainability.
Detailed description of the invention
Specific embodiments of the present invention will be described in further detail with reference to the accompanying drawing, in which:
Fig. 1 is that the present invention is based on the hierarchical diagrams one of the control panel general framework of hierarchical design;
Fig. 2 is the hierarchical diagram two for the control panel general framework based on hierarchical design that the present embodiment one provides;
Fig. 3 is that the present invention is based on the design method flow charts one of the control panel general framework of hierarchical design;
Fig. 4 is the design method process two for the control panel general framework based on hierarchical design that the present embodiment one provides.
Specific embodiment
Following is a specific embodiment of the present invention in conjunction with the accompanying drawings, technical scheme of the present invention will be further described, However, the present invention is not limited to these examples.
Technical solution provided by the invention is illustrated in more detail below with reference to Fig. 1 to Fig. 4.
Embodiment one
Present embodiments provide a kind of control panel general framework based on hierarchical design, as shown in Figure 1 to Figure 2, this frame Include:
The system layer is on predetermined hardware, and system layer carries out system function definition according to predetermined system demand, described System layer handles signal triggering by received predetermined hardware trigger signal and predeterminable event;
The task layer is in system layer, the system function definition of task layer combination system layer and preset task demand Task function definition is carried out, the task layer is triggered by receiving the triggering of correspondence system layer;
The execution level is on task layer, and the system function of execution level combination system layer defines, the task function of task layer It can define and preset execution demand to carry out executing function definition, the execution level is carried out by receiving the triggering of corresponding task layer Triggering.
As shown in Figure 1, this control panel general program control framework defines three-tier architecture;
Wherein system layer, positioned at the top of program, for directly receiving at predetermined hardware trigger signal and predeterminable event Manage signal.
Wherein task layer is the task Distribution Layer under system layer, is located at program middle layer.
Wherein execution level is the implementation procedure under task layer, is located at the program bottom.
Further, task layer includes multiple subtask layers, and the multiple subtask layer is arranged according to preset task layer sequence Sequence, subtask layer carry out the definition of subtask function according to preset task demand and preset task layer sequence serial number.
Further, execution level includes multiple sub- execution levels, and the multiple sub- execution level is arranged according to default execution level sequence Sequence, sub- execution level carry out son according to default execution demand and default execution level sequence serial number and execute function definition.
Further, including clock layer, the clock layer, for when the ticking time is preset in the arrival of frame runing time, Control framework is run again.
As shown in Fig. 2, the present embodiment, provides a kind of control panel general program frame based on small household electrical appliance;
Wherein in the control panel general program frame of small household electrical appliance, system layer is commonly defined as four kinds of codes: standby, open Machine, work and alarm;For the functional requirement of different small household electrical appliances, the code of system layer can carry out cutting appropriate And increase.
For example, the system layer of coffee machine can system function be defined as four events, the corresponding code of each event: to Machine, booting, work and alarm;The system layer of soy bean milk making machine can system function be defined as six codes: booting, heat preservation, standby, work Make, alert and cleans;Therefore different definition can be carried out according to unused functional requirement.
Wherein when receiving predetermined hardware trigger signal or predeterminable event processing signal, program can be cut from a kind of event Change to another event;
Such as in push button signalling or work event, detect exception, it can directly jump directly to alarm event.
Wherein the corresponding system layer of each event is made of multiple tasks layer;
By taking the work event of system layer as an example, subtask 1, subtask 2 ... subtask N can be divided into.
Wherein the switching of task is switched over according to preset task sequence, is appointed when the task that executed 1 jumps at once Business 2.
In task layer, when receiving predetermined hardware trigger signal or predeterminable event processing signal, can return directly to be System layer.
Wherein each task layer multiple execution levels by being made of;
That is implementation procedure 1, implementation procedure 2, implementation procedure 3 ... implementation procedure N.
Wherein the switching of implementation procedure is switched over according to default execution sequence, when having executed implementation procedure 1 at once Jump to implementation procedure 2.
In task layer, when receiving predetermined hardware trigger signal or predeterminable event processing signal, can return directly to be System layer is back to task layer.
Wherein the setting of task layer and execution level is designed according to default needs.
Using the control panel general program frame based on hierarchical design, the complexity of control panel program is reduced, by It is all relatively independent in every layer, therefore every layer can all be implemented separately.By hierarchical design, each layer can be divided From when a certain layer changes, individually the layer of variation being carried out independent, the layer of variation is allowed to will not influence in frame other The application of layer realizes the purpose of isolation change layer;With good transplantability;Based on the general frame of the control panel of hierarchical design Frame has good maintainability.
Embodiment two
A kind of control panel general program frame design method based on hierarchical design is present embodiments provided, such as Fig. 3 to figure Shown in 4:
This method comprising steps of
S1: system function definition is carried out to system layer according to predetermined system demand, and to predetermined hardware trigger signal and in advance If event handling signal carries out the definition of system trigger function;
S2: system function definition and preset task demand in conjunction with system layer carry out task function definition to task layer;
S3: in conjunction with system layer system function define, the definition of the task function of task layer and default execution demand are to holding Row layer carries out executing function definition.
Such as coffee machine carries out system function to system layer and defines four events according to predetermined system demand: booting, to Machine, work, alarm, and the definition of system trigger function is carried out to predetermined hardware trigger signal and predeterminable event processing signal: for example When the starting key signal for receiving predetermined hardware, it is defined as being switched at this time;Such as when receive work event executes appearance When abnormal, it is defined as alerting at this time;
Further, step S2 includes:
S21: system function definition and preset task demand in conjunction with system layer carry out task function to multiple subtask layers It can definition;
S22: multiple subtask layers are ranked up according to preset task sequence;
S23: multiple subtask layers are controlled and are switched over according to preset task sequence.
Further, step S23 includes:
S231: multiple subtask layers are controlled and are switched over according to preset task sequence;
S232: judge whether to receive predetermined hardware trigger signal;
S233: if so, return system layer.
Wherein the task layer below each system layer can be divided into many task layers, such as under coffee machine work system layer Task layer, the tasks such as need to be timed, grind, filling the water, boiling, it can thus be seen that the task layer under work system layer have it is more A sub- task layer, plurality of subtask layer is to carry out task function according to preset task sequence to define, such as coffee machine After work, timed task layer is jumped first, then coffee bean is ground, then the coffee after grinding is filled the water, so The ground coffee for being mixed with water is boiled afterwards;It is switched over according to preset task sequence.
Wherein coffee machine is in water filling, when receiving predetermined hardware trigger signal, such as standby push button signalling, then coffee The standby system layer of the direct return system layer of machine.
Further, step S3 includes:
S31: in conjunction with system layer system function define, the task function of task layer definition and default execution demand to more A sub- execution level carries out executing function definition;
S32: multiple sub- execution levels are ranked up according to default execution sequence;
S33: the multiple sub- execution levels of control carry out triggering switching according to preset task sequence.
Further, step S33 includes:
S331: the multiple sub- execution levels of control are switched over according to default execution sequence;
S332: judge whether to receive predetermined hardware trigger signal;
S333: if so, return system layer.
Wherein the execution level below each task layer can be divided into many execution levels, such as under coffee machine work system layer Task layer, the tasks such as need to be timed, grind, filling the water, boiling;Wherein there are multiple sub- execution below abrasive tasks layer again Layer: such as grinding motor rotation mode, grinding motor speed;It can thus be seen that the execution level under abrasive tasks layer has multiple sons Execution level, plurality of sub- execution level is to carry out execution function according to default execution sequence to define, such as coffee machine carries out After grinding, motor rotation mode is selected first, then selects eye mask electrode revolving speed;Switched over according to preset task sequence.
Wherein coffee machine is in grinding, when receiving predetermined hardware trigger signal, such as standby push button signalling, then coffee The standby system layer of the direct return system layer of machine.
Further, comprising steps of
Judge whether the runing time of frame reaches and presets the ticking time;
If so, operation frame again.
Wherein this frame interrupts 20ms with alternating current zero passage, the ticking clock as frame operation.
Every 20ms is executed primary in major cycle, and the time of each frame circulation primary is less than 20ms, and as small as possible, Guarantee that program can timely respond to.
By the control panel general program frame design method based on hierarchical design, the complexity of control panel program is reduced Degree, due to every layer be all it is relatively independent, every layer can all be implemented separately.It, can be each layer by hierarchical design It is separated, when a certain layer changes, can individually carry out the layer of variation independently, the layer of variation being allowed to will not influence frame The application of other interior layers realizes the purpose of isolation change layer;With good transplantability;Based on the control panel of hierarchical design General framework has good maintainability.
Specific embodiment described herein is only an example for the spirit of the invention.The neck of technology belonging to the present invention The technical staff in domain can make various modifications or additions to the described embodiments or replace by a similar method In generation, however, it does not deviate from the spirit of the invention or beyond the scope of the appended claims.

Claims (10)

1. a kind of control panel general program frame based on hierarchical design, which is characterized in that including system layer, task layer and execution Layer;
The system layer is on predetermined hardware, and system layer carries out system function definition, the system according to predetermined system demand Layer handles signal triggering by received predetermined hardware trigger signal and predeterminable event;
The task layer is in system layer, and the system function definition of task layer combination system layer and preset task demand carry out Task function definition, the task layer are triggered by receiving the triggering of correspondence system layer;
The execution level is on task layer, and the system function of execution level combination system layer defines, the task function of task layer is fixed Adopted and default execution demand carries out executing function definition, and the execution level is touched by receiving the triggering of corresponding task layer Hair.
2. a kind of control panel general program frame based on hierarchical design according to claim 1, which is characterized in that task Layer includes multiple subtask layers, and the multiple subtask layer sorts according to preset task layer sequence, and subtask layer is appointed according to default Business demand and preset task layer sequence serial number carry out the definition of subtask function.
3. a kind of control panel general program frame based on hierarchical design according to claim 1, which is characterized in that execute Layer includes multiple sub- execution levels, and the multiple sub- execution level sorts according to default execution level sequence, and sub- execution level is held according to default Row demand and default execution level sequence serial number carry out son and execute function definition.
4. a kind of control panel general program frame based on hierarchical design according to claim 1, which is characterized in that including Clock layer, the clock layer, for when the ticking time is preset in the arrival of frame runing time, control framework to be run again.
5. a kind of control panel general program frame design method based on hierarchical design, which is characterized in that comprising steps of
S1: system function definition is carried out to system layer according to predetermined system demand, and to predetermined hardware trigger signal and default thing Part handles signal and carries out the definition of system trigger function;
S2: system function definition and preset task demand in conjunction with system layer carry out task function definition to task layer;
S3: in conjunction with system layer system function define, the task function of task layer definition and default execution demand to execution level It carries out executing function definition.
6. a kind of control panel general program frame design method based on hierarchical design according to claim 5, feature It is, step S2 includes:
S21: it is fixed that system function definition and preset task demand in conjunction with system layer carry out task function to multiple subtask layers Justice;
S22: multiple subtask layers are ranked up according to preset task sequence;
S23: multiple subtask layers are controlled and are switched over according to preset task sequence.
7. a kind of control panel general program frame design method based on hierarchical design according to claim 6, feature It is, step S23 includes:
S231: multiple subtask layers are controlled and are switched over according to preset task sequence;
S232: judge whether to receive predetermined hardware trigger signal;
S233: if so, return system layer.
8. a kind of control panel general program frame design method based on hierarchical design according to claim 5, feature It is, step S3 includes:
S31: in conjunction with system layer system function define, the task function of task layer definition and default execution demand to multiple sons Execution level carries out executing function definition;
S32: multiple sub- execution levels are ranked up according to default execution sequence;
S33: the multiple sub- execution levels of control carry out triggering switching according to preset task sequence.
9. a kind of control panel general program frame design method based on hierarchical design according to claim 8, feature It is, step S33 includes:
S331: the multiple sub- execution levels of control are switched over according to default execution sequence;
S332: judge whether to receive predetermined hardware trigger signal;
S333: if so, return system layer.
10. a kind of control panel general program frame design method based on hierarchical design according to claim 5, feature It is, comprising steps of
Judge whether the runing time of frame reaches and presets the ticking time;
If so, operation frame again.
CN201811573852.4A 2018-12-21 2018-12-21 Control panel based on layered design and design method Active CN109840075B (en)

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 true CN109840075A (en) 2019-06-04
CN109840075B 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 (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1618384A (en) * 2003-11-20 2005-05-25 韦吉斯斯坦纳股份公司 Coffee maker
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
US20180113696A1 (en) * 2016-10-24 2018-04-26 International Business Machines Corporation Executing Optimized Local Entry Points
CN107991930A (en) * 2017-12-15 2018-05-04 苏州咖博士咖啡系统科技有限公司 A kind of coffee machine system software controls method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1618384A (en) * 2003-11-20 2005-05-25 韦吉斯斯坦纳股份公司 Coffee maker
CN104991452A (en) * 2015-05-12 2015-10-21 广东瑞德智能科技股份有限公司 Design method for household electrical appliance control framework in object-oriented programming
US20180113696A1 (en) * 2016-10-24 2018-04-26 International Business Machines Corporation Executing Optimized Local Entry Points
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
CN109840075B (en) 2022-05-31

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
CN103339311B (en) Have control zone household electrical appliance and for selecting the method with setting program and programs option
JP2018518230A (en) Washing machine display system
CN106572769A (en) Processing a food on the basis of predetermined recipe data with an electrical kitchen appliance
CN106319837B (en) Method for setting washing program according to preset electric energy and washing machine
US11287941B2 (en) Method for operating a household appliance and household appliance
CN106662848A (en) Generic operating element for networked domestic appliances
DE102014214836B4 (en) Method and system for operating a household appliance
EP3506567A1 (en) Device of controlling related device based on operation situation, schedule bot and server controlling thereof
CN110209060A (en) A kind of control method and device, equipment and computer storage medium
CN108255596A (en) A kind of method and system for performing timed task
CN109840075A (en) A kind of control panel general program frame and design method based on hierarchical design
CN106480659A (en) A kind of washing machine and its control method
US20140156059A1 (en) Operating unit for an injection molding machine
CN108930126B (en) Display method and display system of washing effect, washing equipment and computer equipment
CN205443672U (en) Many drum type washing machine
JP2007050039A (en) Electric rice cooker
CN203436173U (en) Detachable, baking-free and super long-service life self-uncovering spherical egg steamer
CN108603321A (en) The operating method and its program of wash mill
CN108572566A (en) The cooperative control system and method for water equipment and water heater
CN108950980A (en) Washing machine and its steam washing method
CN109183357A (en) A kind of cleaning method and washing machine
CN211381213U (en) Stage feedback lighting device and dish washing machine
CN109508131A (en) Menu data display method, device and system and cooking appliance

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