JPH09223025A - Real-time control device and method therefor - Google Patents

Real-time control device and method therefor

Info

Publication number
JPH09223025A
JPH09223025A JP3203896A JP3203896A JPH09223025A JP H09223025 A JPH09223025 A JP H09223025A JP 3203896 A JP3203896 A JP 3203896A JP 3203896 A JP3203896 A JP 3203896A JP H09223025 A JPH09223025 A JP H09223025A
Authority
JP
Japan
Prior art keywords
processing
priority
execution
storage unit
real
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.)
Pending
Application number
JP3203896A
Other languages
Japanese (ja)
Inventor
Takuya Sekiguchi
卓也 關口
Takashi Nawata
毅史 縄田
Kazutoshi Sumiya
和俊 角谷
Norio Sanada
紀男 眞田
Koichi Yasutake
剛一 安武
Hirohiko Tanaka
裕彦 田中
Kenji Ito
謙次 伊藤
Wataru Uchiyama
亘 内山
Emiko Ishizaki
恵美子 石崎
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP3203896A priority Critical patent/JPH09223025A/en
Publication of JPH09223025A publication Critical patent/JPH09223025A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To eliminate the need for dividing the processing of lower priority to finish it within a prescribed period and thereby to facilitate the design and development of a program by starting the processing of higher priority by means of the interruption accompanying occurrence of a single type of asynchronous events and carrying out again the processing of lower priority that is interrupted after the end of the processing of higher priority at the interruption time point. SOLUTION: A processing level management part 106a receives a processing switching request from a processing switching request part 105, discriminates the processing to be carried out after the processing is switched based on the contents stored in an executing processing storage part 102, a waiting processing storage part 103 and a processing level storage part 104, and instructs a processing state management part 106b for the processing to be carried out. Thus, the part 106b takes a necessary module out of a control processing module storage part 101 and carries out the instructed processing. Then, the part 106b detects the end of the processing and notifies the part 106a of this end.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、所定の周期ごとに
発生する一種類の割り込み要因による割り込みを利用し
て、家電製品等の機器の制御を行うマイコンシステムに
おけるリアルタイム制御装置及び方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a real-time control device and method in a microcomputer system for controlling appliances such as home electric appliances by utilizing an interrupt caused by one kind of interrupt factor generated at a predetermined cycle.

【0002】[0002]

【従来の技術】近年の、マイコンシステムを使用した家
電製品等の制御においては、ユーザによるキー押下情報
の取得、センサによる値の検知など、対応する処理をリ
アルタイムで行わなければならない場合が多く存在す
る。それらに対応するため、家電製品に組み込まれるマ
イコンのように限られた資源での、リアルタイム制御の
実現が必要不可欠となっている。
2. Description of the Related Art In recent years, in controlling home electric appliances and the like using a microcomputer system, there are many cases in which corresponding processing such as acquisition of key press information by a user and detection of a value by a sensor must be performed in real time. To do. In order to deal with them, real-time control is indispensable with limited resources such as microcomputers embedded in home appliances.

【0003】家電製品の分野における従来のリアルタイ
ム制御方法の一例として、プログラムのループによって
実現する方法(以下「ループ法」と呼ぶ)がある。以
下、ループ法について説明する。図21は、ループ法を
使用してリアルタイム制御を行うマイコンシステムに組
み込まれたプログラムの処理内容を示すフロ−チャ−ト
である。
As an example of a conventional real-time control method in the field of home electric appliances, there is a method realized by a program loop (hereinafter referred to as "loop method"). The loop method will be described below. FIG. 21 is a flow chart showing the processing contents of a program incorporated in a microcomputer system for performing real-time control using the loop method.

【0004】同図において、回路制御処理とは、ポート
の入出力等のハードウェア制御のことであり、制御する
ハードウェアごとに決められた時間間隔で起動し、限ら
れた時間内に終了しなければならない処理である。シー
ケンス制御処理とは、データ設定等ハードウェア以外の
制御のことであり、起動の決められた時間間隔や処理時
間の制限がなく、順次に進行させればよい処理である。
In the figure, the circuit control processing is hardware control such as input / output of a port, which is started at a time interval determined for each piece of hardware to be controlled and ended within a limited time. This is a process that must be done. The sequence control process is a control such as data setting other than hardware, and is a process that does not have a fixed time interval of start-up or a processing time limit and may be sequentially performed.

【0005】この例では、回路制御処理の起動のタイミ
ングとして割り込みを利用しており、回路制御処理の制
限時間は次の割り込みが発生するまでの間である。割り
込みを発生させるためには、タイマを使用してタイマ割
り込みを発生させる方法や、交流電源電圧を検知して等
間隔の割り込みを発生させる方法等がある。回路制御処
理の時間制限は、機器を正常に動作させるために厳守し
なければならないため、回路制御処理はシーケンス制御
処理よりも優先的に実行されなければならない。従っ
て、割り込みが発生するタイミング以前にシーケンス制
御処理を中断し、割り込み発生を待つように、予めシー
ケンス制御処理を分割してプログラムしている。そし
て、割り込み発生時(S211:Yes)には、まず回
路制御処理を行い(S212〜S214)、回路制御処
理終了後にシーケンス制御処理を行う(S215)。
In this example, an interrupt is used as the timing for starting the circuit control process, and the time limit for the circuit control process is until the next interrupt occurs. In order to generate an interrupt, there are a method of using a timer to generate a timer interrupt, a method of detecting an AC power supply voltage and generating interrupts at equal intervals, and the like. Since the time limit of the circuit control processing must be strictly adhered to in order for the device to operate normally, the circuit control processing must be executed prior to the sequence control processing. Therefore, the sequence control process is divided and programmed in advance so that the sequence control process is interrupted before the interrupt occurs and the interrupt is awaited. When an interrupt occurs (S211: Yes), the circuit control process is first performed (S212 to S214), and the sequence control process is performed after the circuit control process is completed (S215).

【0006】図22はシーケンス制御処理の詳細な処理
内容を示すフロ−チャ−トである。前述のとおり、シー
ケンス制御処理は、所定の回路制御処理が終了した後、
次の割り込みが発生するまでの時間内に実行可能な複数
の処理単位に分割してプログラムしている。従ってこの
例では、シーケンス制御1〜シーケンス制御4に分割
し、プログラム内部のカウンタ(CNT)の値を参照す
ることにより、どのシーケンス制御を行うかを決定して
いる。
FIG. 22 is a flowchart showing the detailed processing contents of the sequence control processing. As described above, the sequence control process is performed after the predetermined circuit control process is completed.
The program is divided into multiple processing units that can be executed within the time until the next interrupt occurs. Therefore, in this example, the sequence control is divided into sequence control 1 to sequence control 4, and the sequence control to be performed is determined by referring to the value of the counter (CNT) in the program.

【0007】[0007]

【発明が解決しようとする課題】しかしながら、上記の
ループ法を使用する場合においては、マイコンシステム
のプログラム開発に際してシーケンス制御処理の分割を
行うため、機器の動作を詳細に検討してプログラムを設
計しなければならなかった。即ち、シーケンス制御1〜
シーケンス制御4を、それぞれ回路制御処理の終了後、
次回の割り込み発生までに終了させるようにプログラム
を設計するには、次回の割り込み発生までの時間を計算
して、一回の実行ごとの処理内容を決定しなければなら
ないなど、プログラムの設計行程において非常に繁雑な
検討が必要であるという問題点を有していた。
However, when the above loop method is used, the sequence control processing is divided when the program of the microcomputer system is developed. Therefore, the operation of the equipment is studied in detail and the program is designed. I had to. That is, sequence control 1 to
After completing the circuit control processing, the sequence control 4
In order to design the program so that it will finish before the next interrupt occurs, the time until the next interrupt occurs must be calculated and the processing contents for each execution must be determined. It had a problem that it required a very complicated examination.

【0008】また、複数の優先度の処理を制御するため
には、多段階割り込み可能な回路によるリアルタイム制
御装置を利用することが考えられるが、その場合には、
マイコンシステムの製造コスト上昇の原因となるという
問題点を有していた。以上の問題点に鑑み、本発明の第
一の目的は、リアルタイム処理を行うためのプログラム
の設計、開発を容易にできるリアルタイム制御装置及び
方法を提供することである。また、本発明の第二の目的
は、マイコンシステムの製造コストを低く維持しつつ、
複数の優先度の処理の制御を行うことを可能とするリア
ルタイム制御装置及び方法を提供することである。
Further, in order to control the processing of a plurality of priorities, it is possible to use a real-time control device having a circuit capable of multistage interruption. In that case,
It has a problem that it causes an increase in manufacturing cost of the microcomputer system. In view of the above problems, a first object of the present invention is to provide a real-time control device and method that can easily design and develop a program for performing real-time processing. A second object of the present invention is to keep the manufacturing cost of the microcomputer system low,
An object of the present invention is to provide a real-time control device and method capable of controlling processing of a plurality of priorities.

【0009】[0009]

【課題を解決するための手段】上記の問題点を解決する
ために請求項1に記載の発明は、所定の周期ごとに発生
する一種類の割り込み要因による割り込みを利用して、
機器の制御を行うマイコンシステムにおけるリアルタイ
ム制御装置であって、前記所定の周期内に終了するよう
にプログラムされた最も優先度の高い処理と、それ以外
の優先度を持つ処理とについて、処理の識別子と優先度
とを記憶する処理優先度記憶手段と、実行中の処理の識
別子を記憶する実行処理記憶手段と、実行が中断された
処理の識別子と中断時の処理の状況を示す情報とを順次
記憶する待機処理記憶手段と、前記割り込みの発生を受
けて、処理切り換え要求を出力する処理切り換え要求手
段と、前記処理切り換え要求を受けて、実行中の処理を
中断し、最も高い優先度を付与された処理の実行を開始
するとともに、前記実行処理記憶手段および前記待機処
理記憶手段の内容を更新する第1の制御手段と、処理の
終了を検知したときに、終了した処理の次に優先度が高
い処理の優先度と、前記待機処理記憶手段に最後に記憶
された識別子を有する処理の優先度とを比較する比較手
段と、前記比較手段の比較において、前者の方が高い場
合に、前者の処理の実行を開始するとともに、前記実行
処理記憶手段の内容を更新する第2の制御手段と、前記
比較手段の比較において、前者の方が低いか、または両
者の優先度が等しい場合に、後者の処理を、前記待機処
理記憶手段に記憶された中断時の処理の状況を示す情報
に基づいて中断時点から再開するとともに、前記実行処
理記憶手段および前記待機処理記憶手段の内容を更新す
る第3の制御手段とを有する。
In order to solve the above-mentioned problems, the invention according to claim 1 uses an interrupt due to one kind of interrupt factor generated at every predetermined cycle,
A real-time control device in a microcomputer system for controlling equipment, which is a process identifier for the highest-priority process programmed to end within the predetermined cycle and the process having other priorities And a priority, a process priority storage unit, an execution process storage unit that stores an identifier of a process being executed, an identifier of a process whose execution is interrupted, and information indicating a status of the process at the time of interrupt. Standby processing storing means for storing, processing switching requesting means for outputting a processing switching request in response to the occurrence of the interrupt, and receiving the processing switching request, interrupting the processing being executed and giving the highest priority The first control means for starting the execution of the executed processing and updating the contents of the execution processing storage means and the standby processing storage means, and detecting the end of the processing. In the comparison between the comparison means and the comparison means for comparing the priority of the processing having the next highest priority after the completed processing with the priority of the processing having the identifier last stored in the standby processing storage means. When the former is higher, the second control means for starting the execution of the former processing and updating the contents of the execution processing storage means and the comparing means are compared with each other. Alternatively, when the priorities of the two are equal, the latter process is restarted from the interruption point based on the information indicating the status of the process at the time of interruption stored in the standby process storage unit, and the execution process storage unit and the And a third control means for updating the contents of the standby processing storage means.

【0010】[0010]

【発明の実施の形態】請求項1に記載の発明は、所定の
周期ごとに発生する一種類の割り込み要因による割り込
みを利用して、機器の制御を行うマイコンシステムにお
けるリアルタイム制御装置であって、前記所定の周期内
に終了するようにプログラムされた最も優先度の高い処
理と、それ以外の優先度を持つ処理とについて、処理の
識別子と優先度とを記憶する処理優先度記憶手段と、実
行中の処理の識別子を記憶する実行処理記憶手段と、実
行が中断された処理の識別子と中断時の処理の状況を示
す情報とを順次記憶する待機処理記憶手段と、前記割り
込みの発生を受けて、処理切り換え要求を出力する処理
切り換え要求手段と、前記処理切り換え要求を受けて、
実行中の処理を中断し、最も高い優先度を付与された処
理の実行を開始するとともに、前記実行処理記憶手段お
よび前記待機処理記憶手段の内容を更新する第1の制御
手段と、処理の終了を検知したときに、終了した処理の
次に優先度が高い処理の優先度と、前記待機処理記憶手
段に最後に記憶された識別子を有する処理の優先度とを
比較する比較手段と、前記比較手段の比較において、前
者の方が高い場合に、前者の処理の実行を開始するとと
もに、前記実行処理記憶手段の内容を更新する第2の制
御手段と、前記比較手段の比較において、前者の方が低
いか、または両者の優先度が等しい場合に、後者の処理
を、前記待機処理記憶手段に記憶された中断時の処理の
状況を示す情報に基づいて中断時点から再開するととも
に、前記実行処理記憶手段および前記待機処理記憶手段
の内容を更新する第3の制御手段とを有する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The invention according to claim 1 is a real-time control device in a microcomputer system for controlling a device by utilizing an interrupt due to one kind of interrupt factor generated at a predetermined cycle. Processing priority storage means for storing processing identifiers and priorities of the highest priority processing programmed to end within the predetermined cycle and the processing having other priorities; Execution process storage means for storing the identifier of the process being executed, standby process storage means for sequentially storing the identifier of the process whose execution has been interrupted and information indicating the status of the process at the time of interruption, and receiving the occurrence of the interrupt. A process switching request means for outputting a process switching request, and receiving the process switching request,
First control means for interrupting the processing being executed, starting the execution of the processing assigned the highest priority, updating the contents of the execution processing storage means and the standby processing storage means, and ending the processing And a comparison means for comparing the priority of the processing with the second highest priority after the completed processing with the priority of the processing having the identifier last stored in the standby processing storage means; In the comparison of the means, when the former is higher, in the comparison of the second control means for starting the execution of the former processing and updating the contents of the execution processing storage means and the comparison means, the former Is low or both have the same priority, the latter process is restarted from the interruption point based on the information indicating the status of the interruption process stored in the standby process storage means, and the execution process is performed. And a third control means for updating the 憶 means and the contents of the standby processing storage unit.

【0011】処理優先度記憶手段は、所定の割り込み発
生の周期内に終了するようにプログラムされた最も優先
度の高い処理と、それ以外の優先度を持つ処理とについ
て、処理の識別子と優先度とを記憶する。実行処理記憶
手段は、実行中の処理の識別子を記憶する。待機処理格
納手段は、実行が中断された処理の識別子と、中断時点
の処理の実行状況を示すレジスタの内容、プログラムの
アドレス等の情報を順次格納する。
The processing priority storing means stores the identifier and the priority of the processing for the highest priority processing programmed to end within a predetermined interrupt generation cycle and the processing having other priorities. And remember. The execution process storage means stores the identifier of the process being executed. The standby process storage means sequentially stores information such as an identifier of a process whose execution has been interrupted, the contents of a register indicating the execution status of the process at the time of interruption, and the address of the program.

【0012】処理切り換え要求手段は、一種類の割り込
み要因による割り込みの発生を受けて、処理切り換え要
求を出力する。第1の制御手段は、前記処理切り換え要
求を受けて、実行中の処理を中断し、最も高い優先度を
付与された処理の実行を開始するとともに、前記実行処
理記憶手段および前記待機処理格納手段の内容を更新す
る。前述のとおり、最も優先度が高い処理は所定の割り
込みの周期内に終了する。即ち、割り込みの発生前に終
了するようにプログラムされているため、第1の制御手
段により中断される処理は最も優先度が高い処理以外の
処理である。従って、処理切り換え要求の出力時には、
必ず最も優先度の高い処理が実行されることになる。
The processing switching request means outputs a processing switching request upon receipt of an interrupt due to one type of interrupt factor. In response to the process switching request, the first control unit interrupts the process being executed, starts executing the process assigned the highest priority, and the execution process storage unit and the standby process storage unit. Update the contents of. As described above, the process with the highest priority ends within a predetermined interrupt cycle. That is, since the program is programmed to end before the occurrence of the interrupt, the process interrupted by the first control means is a process other than the process having the highest priority. Therefore, when outputting the process switching request,
The highest priority process will always be executed.

【0013】比較手段は、処理の終了を検知したとき
に、終了した処理の次に優先度が高い処理の優先度と、
前記待機処理記憶手段に最後に記憶された識別子を有す
る処理の優先度とを比較する。第2の制御手段は、前記
比較手段による比較において、終了した処理の次に優先
度が高い処理の優先度の方が高い場合に、終了した処理
の次に優先度が高い処理の実行を開始するとともに、前
記実行処理格納手段の内容を更新する。
The comparing means, when detecting the end of the processing, compares the priority of the processing with the next highest priority with the processing that has ended,
The priority of the process having the identifier last stored in the standby process storage means is compared. The second control means, in the comparison by the comparison means, starts execution of a process having a higher priority next to the completed process when the process having a higher priority next to the completed process has a higher priority. At the same time, the contents of the execution process storage means are updated.

【0014】第3の実行手段は、前記比較手段による比
較において、終了した処理の次に優先度が高い処理の優
先度の方が低いか、または両者の優先度が等しい場合
に、前記待機処理記憶手段に最後に記憶された識別子を
付与された処理を、前記待機処理記憶手段に記憶された
中断時の処理の状況を示すレジスタの内容、プログラム
のアドレス等の情報に基づいて中断時点から再開すると
ともに、前記実行処理記憶手段および前記待機処理記憶
手段の内容を更新する。
The third execution means, in the comparison by the comparison means, when the priority of the processing having the next highest priority after the completed processing is lower or the priority of both is equal, the waiting processing is performed. The process given the identifier last stored in the storage means is restarted from the point of interruption based on the contents of the register indicating the status of the process at the time of interruption stored in the standby process storage means, the program address, etc. At the same time, the contents of the execution process storage means and the standby process storage means are updated.

【0015】上記のように、終了した処理の次に優先度
が高い処理の優先度と、前記待機処理記憶手段に最後に
記憶された識別子を付与された処理の優先度とを比較し
て、実行すべき処理を決定することにより、一種類の割
り込み要因で複数段階の優先度を付与された処理の制御
を可能とする。また、請求項2に記載の発明は、請求項
1に記載のリアルタイム制御装置においてさらに、処理
の終了を検知したときに、前記処理優先度記憶手段の内
容を参照し、終了した処理より優先度の低い処理が存在
するか否かを判定する判定手段を有し、前記比較手段
は、前記判定手段により存在すると判定された場合に、
終了した処理の次に優先度が高い処理の優先度と、前記
待機処理記憶手段に最後に記憶された識別子を有する処
理の優先度とを比較する。
As described above, the priority of the process having the second highest priority after the completed process is compared with the priority of the process to which the identifier last stored in the standby process storage means is compared, By determining the processing to be executed, it becomes possible to control the processing to which the priority is assigned in a plurality of stages by one type of interrupt factor. Further, in the invention according to claim 2, in the real-time control device according to claim 1, when the end of the process is detected, the contents of the process priority storage means are referred to, and the priority is given to the completed process. Has a determination means for determining whether or not there is a low process, the comparison means, when it is determined by the determination means,
The priority of the process having the second highest priority after the completed process is compared with the priority of the process having the identifier last stored in the standby process storage means.

【0016】判定手段は、処理の終了を検知したとき
に、前記処理優先度記憶手段の内容を参照し、終了した
処理より優先度の低い処理が存在するか否かを判定す
る。比較手段は、前記判定手段により存在すると判定さ
れた場合に処理の優先度を比較することにより、終了し
た処理より優先度の低い処理が存在しない場合に機器の
制御を終了するなどの制御を行うことが可能となる。
When the end of processing is detected, the determination means refers to the contents of the processing priority storage means and determines whether or not there is a processing having a lower priority than the completed processing. The comparing means performs control such as ending the control of the device when there is no processing having a lower priority than the ended processing by comparing the priorities of the processing when the judging means judges that the processing exists. It becomes possible.

【0017】また、請求項3に記載の発明は、請求項1
または2に記載のリアルタイム制御装置において、前記
機器の制御を行う処理は、制御の内容により2段階の優
先度に分類され、優先度が高い方に分類された処理が、
リアルタイム性が厳しく要求される処理を含み、優先度
が低い方に分類された処理が、それ以外の処理を含む。
The invention described in claim 3 is the first invention.
Alternatively, in the real-time control device according to 2, the process of controlling the device is classified into two levels of priority depending on the content of the control, and the process classified into the higher priority is
The processing classified into the one with lower priority includes the processing strictly required in real time, and the processing other than that is included.

【0018】また、請求項4に記載の発明は、請求項1
または2に記載のリアルタイム制御装置において、前記
機器の制御を行う処理は、制御の内容により3段階の優
先度に分類され、最も優先度が高いと分類された処理
が、ポートとの入出力処理と、タイマの計時の際の基本
単位となるカウンタのインクリメント処理とを含み、次
に優先度が高いと分類された処理が、タイマの計時処理
と、ポート出力のリフレッシュ処理と、ポートから入力
されたデータに対して施す必要のある処理と、ポートへ
出力するデータを作成する処理とを含む。
The invention described in claim 4 is the first invention.
Alternatively, in the real-time control device according to 2, the process of controlling the device is classified into three priority levels according to the control content, and the process classified as the highest priority is the input / output process with the port. And the increment process of the counter, which is the basic unit for counting the time of the timer, and the processes classified as the next highest priority are the timer timing process, the port output refresh process, and the input from the port. It includes a process that needs to be performed on the data and a process that creates data to be output to the port.

【0019】また、請求項5に記載の発明は、請求項1
乃至4の何れかに記載のリアルタイム制御装置におい
て、前記処理切り換え要求手段は、タイマ割り込みを受
けて処理切り換え要求を出力する。また、請求項6に記
載の発明は、請求項1乃至4の何れかに記載のリアルタ
イム制御装置において、さらに、交流電源電圧の周期を
検知することにより、割り込みを発生する割り込み発生
手段を備える。
The invention described in claim 5 is the same as claim 1.
In the real-time control device according to any one of items 1 to 4, the process switching request unit receives a timer interrupt and outputs a process switching request. The invention according to claim 6 is the real-time control device according to any one of claims 1 to 4, further comprising interrupt generating means for generating an interrupt by detecting a cycle of the AC power supply voltage.

【0020】また、請求項7に記載の発明は、請求項1
乃至6の何れかに記載のリアルタイム制御装置におい
て、前記第1の制御手段は、前記実行処理格納手段の内
容に、最も高い優先度を付与された処理の識別子を上書
きする。また、請求項8に記載の発明は、請求項1乃至
7の何れかに記載のリアルタイム制御装置において、前
記待機処理格納手段は、スタック構造を有し、前記第1
の制御手段は、前記待機処理格納手段に、中断された処
理の識別子と中断時の処理の状況を示す情報とを追加す
る。
The invention described in claim 7 is the first invention.
In the real-time control device according to any one of 1 to 6, the first control unit overwrites the content of the execution process storage unit with the identifier of the process having the highest priority. The invention according to claim 8 is the real-time control device according to any one of claims 1 to 7, wherein the standby process storage means has a stack structure, and
The control means adds the identifier of the interrupted processing and the information indicating the status of the processing at the time of interruption to the standby processing storage means.

【0021】また、請求項9に記載の発明は、請求項1
乃至8の何れかに記載のリアルタイム制御装置におい
て、家電製品の制御を行うマイコンシステムに備えられ
ることを特徴とする。また、請求項10に記載の発明
は、所定の周期ごとに発生する一種類の割り込み要因に
よる割り込みを利用して、機器の制御を行うマイコンシ
ステムにおけるリアルタイム制御方法であって、前記割
り込みの発生を受けて、処理切り換え要求を出力する処
理切り換え要求ステップと、前記処理切り換え要求を受
けて、実行中の処理を中断し、最も優先度の高い処理の
実行を開始する第1の実行ステップと、処理の終了を検
知したときに、終了した処理の次に優先度が高い処理が
存在する場合に、終了した処理の次に優先度が高い処理
の優先度と、最近に中断された処理の優先度とを比較す
る比較ステップと、前記比較ステップにおいて、前者の
方が高い場合に、前者の処理の実行を開始する第2の実
行ステップと、前記比較ステップにおいて、前者の方が
低いか、または両者の優先度が等しい場合に、後者の処
理を中断時点から再開する第3の実行ステップとを有す
る。
The invention described in claim 9 is the same as claim 1.
The real-time control device according to any one of items 1 to 8 is characterized by being provided in a microcomputer system for controlling home electric appliances. According to a tenth aspect of the present invention, there is provided a real-time control method in a microcomputer system for controlling a device by using an interrupt caused by one type of interrupt factor that occurs every predetermined period. A process switching request step for receiving and outputting a process switching request; a first execution step for receiving the process switching request, interrupting the process being executed, and starting the process of the highest priority; When the end of a process is detected, if there is a process with the next highest priority after the completed process, the priority of the process with the next highest priority after the completed process and the priority of the process that was interrupted recently And a second execution step of starting execution of the former process when the former is higher in the comparison step, and the comparison step. Or the former is lower, or if the same priority of both and a third execution step resumes latter processing from the interrupted time point.

【0022】以下、本発明の実施の形態について図面を
参照しながら説明する。 (実施の形態1)図1は、本発明の第一の実施の形態に
おけるリアルタイム制御装置の構成を示すブロック図で
ある。同図のリアルタイム制御装置は、制御処理モジュ
ール格納部101、実行処理格納部102、待機処理格
納部103、処理レベル格納部104、処理切り換え要
求部105、制御部106を備える。
Embodiments of the present invention will be described below with reference to the drawings. (Embodiment 1) FIG. 1 is a block diagram showing a configuration of a real-time control device according to a first embodiment of the present invention. The real-time control device in FIG. 1 includes a control processing module storage unit 101, an execution processing storage unit 102, a standby processing storage unit 103, a processing level storage unit 104, a processing switching request unit 105, and a control unit 106.

【0023】制御処理モジュール格納部101は、行程
制御処理モジュール格納部101a、優先回路制御処理
モジュール格納部101b、通常回路制御処理モジュー
ル格納部101cから構成される。行程制御処理モジュ
ール格納部101aには、行程制御処理を行うためのモ
ジュールが格納される。ここで、行程制御処理とは、従
来の技術を説明した際のシーケンス制御処理に相当する
ものであり、処理を起動する時間間隔や、処理時間の制
限がなく、予め決定された実行手順に従って進行させれ
ばよい処理のことである。
The control processing module storage unit 101 comprises a stroke control processing module storage unit 101a, a priority circuit control processing module storage unit 101b, and a normal circuit control processing module storage unit 101c. The process control processing module storage unit 101a stores a module for performing process control processing. Here, the stroke control process corresponds to the sequence control process when the conventional technique is described, and there is no time interval for activating the process or limitation of the process time, and the process proceeds according to a predetermined execution procedure. This is a process that can be performed.

【0024】行程制御処理の具体例としては、洗濯機の
場合であれば、洗濯の各種コースを設定する「設定行程
処理」、給水や攪拌等を行う「洗い行程処理」、すすぎ
を行う「すすぎ行程処理」、排水や脱水を行う「脱水行
程処理」などが、また、電子レンジの場合であれば、調
理のコースを選択する「設定行程処理」、各種の調理を
行う「調理行程処理」などが挙げられる。
As a concrete example of the stroke control processing, in the case of a washing machine, "setting stroke processing" for setting various washing courses, "washing stroke processing" for supplying water and stirring, and "rinsing for rinsing""Processprocessing","dewateringprocess" for draining and dehydrating, and in the case of a microwave oven, "setting process" for selecting a cooking course, "cooking process" for performing various types of cooking, etc. Is mentioned.

【0025】優先回路制御処理モジュール格納部101
bには、優先回路制御処理を行うためのモジュールが格
納される。ここで、優先回路制御制御処理とは、従来の
技術を説明した際の回路制御処理に相当するものであ
り、決められた時間間隔で起動し、限られた時間内で終
了させる必要がある処理のことである。従来の技術の説
明でも述べたとおり、優先回路制御処理の実行について
の時間制限は、機器を正常に動作させるために厳守しな
ければならないため、行程制御処理に比べて優先的に実
行されなければならない。
Priority circuit control processing module storage unit 101
A module for performing priority circuit control processing is stored in b. Here, the priority circuit control control process corresponds to the circuit control process when the conventional technique is described, and is a process that needs to be started at a predetermined time interval and ended within a limited time. That is. As described in the description of the prior art, the time limit for the execution of the priority circuit control process must be strictly adhered to in order for the device to operate normally, and therefore must be executed with priority over the stroke control process. I won't.

【0026】優先回路制御処理モジュール格納部101
bには、具体的には、ポートとの入出力に関する処理を
行うモジュールと、タイマの計時の際の基本単位となる
カウンタのインクリメントに関する処理を行うモジュー
ルとが格納される。ポートからの入力処理の具体例とし
ては、キーの押下の検知や、センサからの値の取得など
が挙げられる。
Priority circuit control processing module storage unit 101
Specifically, b stores a module that performs a process related to input / output to / from a port and a module that performs a process related to increment of a counter, which is a basic unit when the timer counts. Specific examples of input processing from the port include detection of key press and acquisition of a value from a sensor.

【0027】ポートへの出力処理の具体例としては、L
EDへの表示や、モータの起動、ヒータの起動などが挙
げられる。通常回路制御処理モジュール格納部101c
には、通常回路制御処理を行うためのモジュールが格納
される。ここで、通常回路制御処理とは、優先回路制御
処理ほど実行する周期について厳密な制御を行う必要は
ないが、行程制御処理よりは優先して行う必要のある処
理のことである。
As a concrete example of the output processing to the port, L
Examples include display on the ED, activation of the motor, activation of the heater, and the like. Normal circuit control processing module storage unit 101c
A module for performing normal circuit control processing is stored in. Here, the normal circuit control process is a process that does not require strict control of the cycle to be executed as much as the priority circuit control process, but needs to be executed with priority over the process control process.

【0028】通常回路制御処理モジュール格納部101
cには、具体的には、タイマの計時処理を行うモジュー
ルと、ポート出力のリフレッシュ処理を行うモジュール
と、ポートから入力してきたデータに対して施す必要の
ある処理を行うモジュールと、ポートへ出力するデータ
を作成する処理を行うモジュールとが格納される。タイ
マの計時処理とは、優先回路制御処理においてインクリ
メントされたカウンタの値に基づき、ユーザが用意した
タイマをインクリメントする処理である。例えば、カウ
ンタが1ミリ秒(1000分の1秒)間隔でインクリメ
ントされる場合に、1秒単位のタイマを計時するとき
は、カウンタが1000回インクリメントされた時点
で、タイマのインクリメントを一回行う。
Normal circuit control processing module storage unit 101
Specifically, c includes a module that performs timer timing processing, a module that performs port output refresh processing, a module that performs processing that needs to be performed on data input from the port, and an output to the port. A module that performs a process of creating data to be stored is stored. The timer timing process is a process of incrementing a timer prepared by the user based on the value of the counter incremented in the priority circuit control process. For example, when the counter is incremented at intervals of 1 millisecond (1 / 1000th of a second), when counting the timer in units of 1 second, the timer is incremented once when the counter is incremented 1000 times. .

【0029】ポート出力のリフレッシュ処理とは、LE
Dへの表示を行った後、表示のちらつき等を防止するた
めに定期的に再出力を行うなど、定期的に出力データを
ポートへ出力する処理である。ポートから入力してきた
データに対して施す必要のある処理としては、例えば、
電子レンジで、庫内温度が上がりすぎたと温度センサが
検知した場合に、すぐに冷却ファンを起動させる処理な
どがある。
The port output refresh processing is LE
After the display on D, the output data is periodically output to the port, for example, re-outputting is periodically performed to prevent the display from flickering. As the processing that needs to be performed on the data input from the port, for example,
In the microwave oven, when the temperature sensor detects that the temperature inside the refrigerator has risen excessively, the cooling fan is started immediately.

【0030】ポートへ出力するデータを作成する処理と
しては、文字列のスクロール処理を行う場合、限られた
表示領域で文字がスクロールしているように見せかける
ために、表示する文字データを作成する処理などが挙げ
られる。実行処理格納部102は、特許請求の範囲に記
載の発明における実行処理記憶手段に相当する。実行処
理格納部102には、実行中の処理の識別子(以下、
「実行識別子」と呼ぶ)が格納される。処理の識別子に
ついては後述する。
As the process of creating the data to be output to the port, in the case of scrolling the character string, the process of creating the character data to be displayed in order to make it look like the characters are scrolling in the limited display area. And so on. The execution process storage unit 102 corresponds to the execution process storage unit in the invention described in the claims. The execution process storage unit 102 stores the identifier of a process being executed (hereinafter,
"Execution identifier") is stored. The processing identifier will be described later.

【0031】待機処理格納部103は、特許請求の範囲
に記載の発明における待機処理記憶手段に相当する。待
機処理格納部103には、制御部106が処理切り換え
要求部105からの処理切り換え要求を受けた時点で、
実行処理格納部102に格納されていた実行識別子が退
避される形で格納される。また、処理中断時点のレジス
タ等の内容、プログラムのアドレスなど、処理の中断時
点の状況を示す各種情報も、同時に退避される形で格納
される。従って、待機処理格納部103はスタック構造
を有し、複数の識別子および前述の情報を順次格納でき
るように構成されている。
The standby process storage unit 103 corresponds to the standby process storage means in the invention described in the claims. When the control unit 106 receives a process switching request from the process switching requesting unit 105, the standby processing storing unit 103 stores
The execution identifier stored in the execution process storage unit 102 is stored in a saved form. In addition, various information indicating the status at the time of processing interruption, such as the contents of registers and the like at the time of processing interruption, the address of a program, etc., is also stored in the form of being saved at the same time. Therefore, the standby process storage unit 103 has a stack structure and is configured to be able to sequentially store a plurality of identifiers and the above-mentioned information.

【0032】処理レベル格納部104は、特許請求の範
囲に記載の発明における処理優先度記憶手段に相当す
る。処理レベル格納部104には、制御処理モジュール
格納部101を構成する行程制御処理モジュール格納部
101aと、優先回路制御処理モジュール格納部101
bと、通常回路制御処理モジュール格納部101cとに
それぞれ格納されているモジュールによって行われる処
理を表す識別子と、それぞれの識別子を有する処理の優
先度とが格納される。
The processing level storage unit 104 corresponds to the processing priority storage means in the invention described in the claims. The processing level storage unit 104 includes a process control processing module storage unit 101a that constitutes the control processing module storage unit 101 and a priority circuit control processing module storage unit 101.
b, the identifiers indicating the processes performed by the modules stored in the normal circuit control processing module storage unit 101c, and the priority of the processes having the respective identifiers are stored.

【0033】図5に、処理レベル格納部104のデータ
構造を示す。同図に示されるように、例えば、行程制御
処理モジュール格納部101aに格納されているモジュ
ールによって行われる処理には、「行程制御処理」とい
う識別子が付与され、処理の優先度と対応付けられて格
納されている。ここで、優先度については、数字が小さ
いほど高い優先度が付与されていることを意味してい
る。
FIG. 5 shows the data structure of the processing level storage unit 104. As shown in the figure, for example, the process performed by the module stored in the process control processing module storage unit 101a is given an identifier "process control process" and is associated with the priority of the process. It is stored. Here, as for the priority, the smaller the number, the higher the priority.

【0034】処理切り換え要求部105は、特許請求の
範囲に記載の発明における処理切り換え要求手段に相当
する。処理切り換え要求部105は、一種類の非同期事
象を受けて、制御部106に処理切り換え要求を出力す
る。非同期事象の例としては、タイマ割り込みや、電源
電圧の周期的な変化を検知して出力される割り込み信号
等がある。
The process switching request unit 105 corresponds to the process switching requesting means in the invention described in the claims. The process switching request unit 105 receives the one type of asynchronous event and outputs a process switching request to the control unit 106. Examples of asynchronous events include timer interrupts and interrupt signals that are output by detecting periodic changes in power supply voltage.

【0035】制御部106は、特許請求の範囲に記載の
発明における第1の制御手段、判定手段、比較手段、第
2の制御手段、第3の制御手段に相当する。制御部10
6は、処理レベル管理部106aと、処理状態管理部1
06bとを有する。処理レベル管理部106aは、処理
切り換え要求部105からの処理切り換え要求を受け
て、実行処理格納部102と、待機処理格納部103
と、処理レベル格納部104とに格納されている内容を
参照して、処理切り換え後に実行すべき処理を判別し、
判別結果に基づいて、処理状態管理部106bに対し
て、実行すべき処理の指示を行うとともに、実行処理格
納部102および待機処理格納部103の内容を更新す
る。
The control unit 106 corresponds to the first control means, the determination means, the comparison means, the second control means, and the third control means in the invention described in the claims. Control unit 10
6 is a processing level management unit 106a and a processing state management unit 1
06b and. Upon receiving the process switching request from the process switching requesting unit 105, the processing level management unit 106 a receives the execution process storing unit 102 and the standby process storing unit 103.
And the contents stored in the processing level storage unit 104 to determine the processing to be executed after the processing switching,
Based on the determination result, the processing state management unit 106b is instructed of the processing to be executed, and the contents of the execution processing storage unit 102 and the standby processing storage unit 103 are updated.

【0036】また、処理レベル管理部106aは、処理
が終了した場合には、処理状態管理部106bからの処
理終了の通知を受け、実行処理格納部102と、待機処
理格納部103と、処理レベル格納部104とに格納さ
れている内容を参照して、次に実行すべき処理を判別
し、判別結果に基づいて、処理状態管理部106bに対
して、実行すべき処理の指示を行うとともに、実行処理
格納部102および待機処理格納部103の内容を更新
する。
When the processing is completed, the processing level management unit 106a receives a notification of the processing completion from the processing state management unit 106b, and the execution processing storage unit 102, the standby processing storage unit 103, and the processing level. The content stored in the storage unit 104 is referred to, the next process to be executed is determined, and based on the result of the determination, the process state management unit 106b is instructed of the process to be executed. The contents of the execution process storage unit 102 and the standby process storage unit 103 are updated.

【0037】処理状態管理部106bは、処理レベル管
理部106aの、実行すべき処理の指示を受け、制御処
理モジュール格納部101から必要なモジュールを取り
出し、処理の実行を行う。また、処理状態管理部106
bは、処理の終了を検知し、処理レベル管理部106a
に処理の終了を通知する。
The processing state management unit 106b receives the instruction of the processing to be executed from the processing level management unit 106a, extracts the necessary module from the control processing module storage unit 101, and executes the processing. Further, the processing state management unit 106
b detects the end of processing, and the processing level management unit 106a
To notify the end of the process.

【0038】図2は制御部106が、処理切り換え要求
部105からの処理切り換え要求を受けたときの処理内
容を示すフローチャートである。まず、処理レベル管理
部106aが、処理切り換え要求部105からの処理切
り換え要求を受ける(S201)。処理レベル管理部1
06aは、実行処理格納部102に格納されている実行
識別子を取り出し、待機処理格納部103に格納する
(S202)。
FIG. 2 is a flowchart showing the processing contents when the control unit 106 receives a processing switching request from the processing switching requesting unit 105. First, the processing level management unit 106a receives a processing switching request from the processing switching requesting unit 105 (S201). Processing level management unit 1
06a extracts the execution identifier stored in the execution process storage unit 102 and stores it in the standby process storage unit 103 (S202).

【0039】次に、処理レベル管理部106aは、処理
レベル格納部104に格納されている、処理の優先度と
識別子とを参照し、最も優先度の高い処理の識別子を実
行処理格納部102に格納する(S203)。処理レベ
ル管理部106aは、実行識別子を有する処理の優先度
と、待機処理格納部103に最後に格納された処理の識
別子(以下、「最新待機識別子」と呼ぶ)を有する処理
の優先度とを比較する(S204)。実行識別子を有す
る処理の優先度が、最新待機識別子を有する処理の優先
度より高い場合には、処理レベル管理部106aは、実
行識別子を有する処理の実行を開始するように処理状態
管理部106bに対して指示を行う。処理状態管理部1
06bは、処理レベル管理部106aからの指示を受け
て、実行識別子を有する処理の実行を開始する(S20
5)。具体的には、実行中であった処理で使用していた
レジスタ等の内容を待機処理格納部103に退避した
後、実行識別子を有する処理を行うためのモジュール
を、制御処理モジュール格納部101から取り出し実行
を行う。
Next, the processing level management unit 106a refers to the processing priority and the identifier stored in the processing level storage unit 104, and stores the identifier of the highest priority processing in the execution processing storage unit 102. It is stored (S203). The processing level management unit 106a sets the priority of the processing having the execution identifier and the priority of the processing having the processing identifier last stored in the standby processing storage unit 103 (hereinafter, referred to as “latest standby identifier”). The comparison is made (S204). When the priority of the process having the execution identifier is higher than the priority of the process having the latest waiting identifier, the process level management unit 106a instructs the process state management unit 106b to start executing the process having the execution identifier. Give instructions to them. Processing state management unit 1
In response to the instruction from the processing level management unit 106a, 06b starts executing the processing having the execution identifier (S20).
5). Specifically, after saving the contents of registers and the like used in the process being executed in the standby process storage unit 103, a module for performing a process having an execution identifier is provided from the control process module storage unit 101. Take out and execute.

【0040】ここで、実行識別子を有する処理の実行中
に、制御部106が、処理切り換え要求部105からの
処理切り換え要求を受けた場合には、ステップS201
からの処理が行われる。制御部106が処理切り換え要
求部105からの処理切り換え要求を受ける前に、処理
状態管理部106bが実行された処理の終了を検知した
場合(S206:Yes)には、処理状態管理部106
bは、処理レベル管理部106aに対して処理の終了を
通知する。処理レベル管理部106aは、処理状態管理
部106bからの通知を受け、処理レベル格納部104
に格納されている内容を参照して、終了した処理よりも
優先度の低い処理が存在するか否かを調べる(S20
7)。終了した処理よりも優先度の低い処理が存在しな
い場合には、制御部106は制御を終了する(S20
7:No)。
Here, if the control unit 106 receives a process switching request from the process switching requesting unit 105 during execution of the process having the execution identifier, step S201.
Is performed. When the processing state management unit 106b detects the end of the executed processing before the control unit 106 receives the processing switching request from the processing switching request unit 105 (S206: Yes), the processing state management unit 106 is detected.
b notifies the processing level management unit 106a of the end of processing. The processing level management unit 106a receives the notification from the processing state management unit 106b and receives the processing level storage unit 104.
By referring to the contents stored in, it is checked whether or not there is a process having a lower priority than the completed process (S20).
7). If there is no process having a lower priority than the completed process, the control unit 106 ends the control (S20).
7: No).

【0041】終了した処理よりも優先度の低い処理が存
在する場合には、処理レベル管理部106aは、終了し
た処理の次に優先度の高い処理の識別子を、それまで格
納されていた実行識別子の代わりに実行処理格納部10
2に格納し(S208)、ステップS204へと進む。
一方、ステップS204において、実行識別子を有する
処理の優先度が最新待機識別子を有する処理の優先度よ
りも低いか、または両者の優先度が等しい場合には、処
理レベル管理部106aは、待機処理格納部103から
最新待機識別子を取り出し、それまで実行処理格納部1
02に格納されていた実行識別子の代わりに、最新待機
識別子を実行処理格納部102に格納し(S209)、
処理状態管理部106bに実行識別子を有する処理の実
行を指示する。この場合、待機処理格納部103に格納
されているレジスタの内容等に基づいて、最近に中断さ
れた処理が、中断時点から継続実行されることとなる。
処理状態管理部106bは、処理レベル管理部106a
からの指示に従い、処理の実行を開始する(S20
5)。
When there is a process having a lower priority than the completed process, the process level management unit 106a determines the identifier of the process having the next highest priority after the completed process as the execution identifier stored until then. Instead of the execution process storage unit 10
2 (S208), and the process proceeds to step S204.
On the other hand, in step S204, if the priority of the process having the execution identifier is lower than the priority of the process having the latest standby identifier, or if the two have the same priority, the process level management unit 106a stores the standby process storage. The latest standby identifier is extracted from the unit 103, and the execution processing storage unit 1 is used until then.
Instead of the execution identifier stored in 02, the latest standby identifier is stored in the execution process storage unit 102 (S209),
The processing state management unit 106b is instructed to execute the processing having the execution identifier. In this case, based on the contents of the register stored in the standby process storage unit 103, the most recently interrupted process will be continuously executed from the time of interruption.
The processing state management unit 106b is the processing level management unit 106a.
According to the instruction from (S20
5).

【0042】以上のように構成されたリアルタイム制御
装置について、以下、その動作を説明する。図3は、本
実施の形態のリアルタイム制御装置の動作を表すフロー
チャートである。図4は、本実施の形態のリアルタイム
制御装置の動作を表すタイミングチャートである。同図
においては、非同期事象としてタイマ割り込みを用いて
いる。また、図5は処理レベル格納部104に格納され
ている処理の識別子と優先度との一例である。前述のと
おり、同図において優先度の数字が小さい方が、高い優
先度が付与されていることを意味する。
The operation of the real-time control device configured as described above will be described below. FIG. 3 is a flowchart showing the operation of the real-time control device of this embodiment. FIG. 4 is a timing chart showing the operation of the real-time control device according to the present embodiment. In the figure, a timer interrupt is used as an asynchronous event. Further, FIG. 5 is an example of the identifiers and priorities of the processes stored in the processing level storage unit 104. As described above, in the figure, the smaller the priority number, the higher the priority.

【0043】なお、本実施の形態のリアルタイム制御装
置においては、動作開始時は、実行処理格納部102に
は、最も優先度の低い処理の識別子である「行程制御処
理」が格納されており、待機処理格納部103には何も
格納されていない。動作開始時の実行処理格納部102
および待機処理格納部103の内容を図6に示す。な
お、以後の図においても待機処理格納部103に格納さ
れるレジスタの内容等の情報については記載を省略す
る。
In the real-time control device of this embodiment, when the operation is started, the "process control process", which is the identifier of the process having the lowest priority, is stored in the execution process storage section 102, Nothing is stored in the standby process storage unit 103. Execution process storage unit 102 at the start of operation
FIG. 6 shows the contents of the standby process storage unit 103. It should be noted that also in the subsequent figures, description of information such as the contents of the registers stored in the standby process storage unit 103 will be omitted.

【0044】まず、機器の制御の開始時には、処理レベ
ル管理部106aが、実行処理格納部102に格納され
ている識別子を有する処理の実行を処理状態管理部10
6bに指示する。処理状態管理部106bは、処理レベ
ル管理部106aの指示を受け、処理の実行を開始する
(S301)。ここで、最初の実行識別子は前述のとお
り、「行程制御処理」であるので、処理状態管理部10
6bは、行程制御処理モジュール格納部101aからモ
ジュールを取り出し、行程制御処理の実行を開始する。
以後、非同期事象の発生まで行程制御処理を行い、非同
期事象が発生するとステップS304に進む。図4のタ
イミングチャートにおいて、n回目のタイマ割り込みが
このステップでの非同期事象に該当する。
First, when the control of the device is started, the processing level management unit 106a executes the processing having the identifier stored in the execution processing storage unit 102.
Instruct 6b. Upon receiving the instruction from the processing level management unit 106a, the processing state management unit 106b starts executing the processing (S301). Here, since the first execution identifier is the “process control process” as described above, the process state management unit 10
6b takes out the module from the stroke control processing module storage unit 101a and starts the execution of the stroke control processing.
After that, the stroke control process is performed until the asynchronous event occurs, and when the asynchronous event occurs, the process proceeds to step S304. In the timing chart of FIG. 4, the nth timer interrupt corresponds to the asynchronous event at this step.

【0045】なお、非同期事象が発生しないまま行程制
御処理が終了した場合にはそのまま機器の制御を終了す
る(S302:Yes)。ステップS304では、図2
のフローチャートで説明した制御部106の処理が行わ
れる。ここで図2に戻り、具体的な動作について説明す
る。n回目のタイマ割り込みの発生を受けた処理切り換
え要求部105が、制御部106に処理切り換え要求を
出力する。処理レベル管理部106aは、処理切り換え
要求を受け(S201)、実行識別子を取り出して、待
機処理格納部103に格納する(S202)。さらに、
処理レベル管理部106aは処理レベル格納部104を
参照して、最も優先度の高い処理の識別子を実行処理格
納部102に格納する(S203)。最も優先度の高い
処理の識別子は、図5に示されるとおり優先回路制御処
理の識別子であるので、優先回路制御処理の識別子が実
行処理格納部102に格納される。従って、このときの
実行処理格納部102と待機処理格納部103の内容
は、図7に示すようなものとなる。
When the stroke control process ends without the occurrence of the asynchronous event, the device control ends (S302: Yes). In step S304, FIG.
The processing of the control unit 106 described in the flowchart of FIG. Now, returning to FIG. 2, a specific operation will be described. The process switching request unit 105, which has received the n-th timer interrupt, outputs a process switching request to the control unit 106. The processing level management unit 106a receives the processing switching request (S201), extracts the execution identifier, and stores it in the standby processing storage unit 103 (S202). further,
The processing level management unit 106a refers to the processing level storage unit 104 and stores the identifier of the process having the highest priority in the execution process storage unit 102 (S203). Since the identifier of the process with the highest priority is the identifier of the priority circuit control process as shown in FIG. 5, the identifier of the priority circuit control process is stored in the execution process storage unit 102. Therefore, the contents of the execution process storage unit 102 and the standby process storage unit 103 at this time are as shown in FIG.

【0046】処理レベル管理部106aは、実行識別子
を有する処理の優先度と、最新待機識別子を有する処理
の優先度とを比較する(S204)。即ち、実行識別子
を有する優先回路制御処理と、最新待機識別子を有する
行程制御処理との優先度を比較する。この場合、実行識
別子を有する優先回路制御処理の方が優先度が高いの
で、処理レベル管理部106aは、処理状態管理部10
6bに対して、優先回路制御処理の実行を指示する。処
理状態管理部106bは、処理レベル管理部106aか
らの指示を受け、優先回路制御処理モジュール格納部1
01bからモジュールを取り出し、優先回路制御処理の
実行を開始する(S205)。
The processing level management unit 106a compares the priority of the processing having the execution identifier with the priority of the processing having the latest standby identifier (S204). That is, the priority of the priority circuit control process having the execution identifier and the priority of the process control process having the latest standby identifier are compared. In this case, since the priority circuit control processing having the execution identifier has a higher priority, the processing level management unit 106a causes the processing state management unit 10 to operate.
6b is instructed to execute the priority circuit control process. The processing state management unit 106b receives the instruction from the processing level management unit 106a and receives the priority circuit control processing module storage unit 1
The module is taken out from 01b and the execution of the priority circuit control process is started (S205).

【0047】前述のとおり、最も優先度の高い一連の処
理は、非同期事象の発生周期内に終了するように設計さ
れる。従って、優先回路制御処理はn+1回目のタイマ
割り込みの発生より前に処理が終了する。処理状態管理
部106bは、優先回路制御処理の終了を検知すると
(S206:Yes)、処理レベル管理部106aに対
し優先回路制御処理の終了を通知する。処理レベル管理
部106aは、処理状態管理部106bからの通知を受
け、処理レベル格納部104を参照して、優先回路制御
処理よりも優先度の低い処理が存在するか否かを調べる
(S207)。
As described above, the series of processes having the highest priority is designed so as to be completed within the generation cycle of the asynchronous event. Therefore, the priority circuit control process ends before the (n + 1) th timer interrupt occurs. When the processing state management unit 106b detects the end of the priority circuit control process (S206: Yes), it notifies the processing level management unit 106a of the end of the priority circuit control process. Upon receiving the notification from the processing state management unit 106b, the processing level management unit 106a refers to the processing level storage unit 104 to check whether or not there is a process having a lower priority than the priority circuit control process (S207). .

【0048】図5に示されるように、優先回路制御処理
よりも優先度の低い処理として、通常回路制御処理と行
程制御処理とが存在する。従って、処理レベル管理部1
06aは、終了した処理の次に優先度の高い処理の識別
子、即ち通常回路制御処理の識別子を実行処理格納部1
02に格納する(S208)。その後、処理レベル管理
部106aは、実行識別子を有する処理の優先度と、最
新待機識別子を有する処理の優先度とを比較する(S2
04)。図8は、このときの実行処理格納部102と待
機処理格納部103の内容を示す図である。同図に示さ
れるように、実行識別子を有する処理である通常回路制
御処理の方が優先度が高いので、処理レベル管理部10
6aは、実行識別子に従い、通常回路制御処理の実行を
処理状態管理部106bに指示する。処理状態管理部1
06bは、処理レベル管理部106aからの指示を受
け、通常回路制御処理モジュール格納部101cからモ
ジュールを取り出し通常回路制御処理の実行を開始する
(S205)。
As shown in FIG. 5, there are a normal circuit control process and a stroke control process as processes having lower priority than the priority circuit control process. Therefore, the processing level management unit 1
Reference numeral 06a denotes the identifier of the process having the next highest priority after the completed process, that is, the identifier of the normal circuit control process.
No. 02 (S208). After that, the processing level management unit 106a compares the priority of the processing having the execution identifier with the priority of the processing having the latest standby identifier (S2).
04). FIG. 8 is a diagram showing the contents of the execution process storage unit 102 and the standby process storage unit 103 at this time. As shown in the figure, since the normal circuit control process, which is a process having an execution identifier, has a higher priority, the process level management unit 10
6a instructs the processing state management unit 106b to execute the normal circuit control processing according to the execution identifier. Processing state management unit 1
In response to the instruction from the processing level management unit 106a, the module 06b takes out the module from the normal circuit control processing module storage unit 101c and starts execution of the normal circuit control processing (S205).

【0049】図4のタイミングチャートに示されるよう
に、n+1回目のタイマ割り込みが、通常回路制御処理
の実行中に発生する。タイマ割り込みの発生を受けて、
処理切り換え要求部105は処理切り換え要求を出力す
る。処理レベル管理部106aは、処理切り換え要求部
105の出力した処理切り換え要求を受けて(S20
1)、実行識別子を取り出し待機処理格納部103に格
納する(S202)。さらに、処理レベル管理部106
aは、処理レベル格納部104を参照して、分類された
処理の中で最も優先度の高い処理の識別子を実行処理格
納部102に格納する(S203)。即ち、処理レベル
管理部106aは、優先回路制御処理の識別子を実行処
理格納部102に格納する。
As shown in the timing chart of FIG. 4, the (n + 1) th timer interrupt occurs during execution of the normal circuit control process. In response to the timer interrupt,
The process switching request unit 105 outputs a process switching request. The processing level management unit 106a receives the processing switching request output from the processing switching requesting unit 105 (S20).
1), the execution identifier is extracted and stored in the standby process storage unit 103 (S202). Further, the processing level management unit 106
The a refers to the processing level storage unit 104 and stores the identifier of the process having the highest priority among the classified processes in the execution process storage unit 102 (S203). That is, the processing level management unit 106a stores the identifier of the priority circuit control process in the execution process storage unit 102.

【0050】図9はこのときの実行処理格納部102お
よび待機処理格納部103の内容を示す図である。同図
においては、待機処理格納部103に複数の識別子が格
納されているが、一番下の識別子が最新待機識別子であ
る。同図に示されるように、実行識別子を有する処理で
ある優先回路制御処理の優先度が、最新待機識別子を有
する処理である通常回路制御処理の優先度より高いため
(S204:Yes)、実行識別子に従って、処理状態
管理部106bが優先回路制御処理の実行を開始する
(S205)。
FIG. 9 is a diagram showing the contents of the execution process storage unit 102 and the standby process storage unit 103 at this time. In the figure, a plurality of identifiers are stored in the standby process storage unit 103, but the lowest identifier is the latest standby identifier. As shown in the figure, since the priority of the priority circuit control process which is the process having the execution identifier is higher than the priority of the normal circuit control process which is the process having the latest standby identifier (S204: Yes), the execution identifier Accordingly, the processing state management unit 106b starts execution of the priority circuit control processing (S205).

【0051】前述のとおり、優先回路制御処理はn+2
回目のタイマ割り込みの発生よりも前に終了するように
設計されている。処理状態管理部106bは、優先回路
制御処理の終了を検知し(S206)、処理レベル管理
部106aに処理の終了を通知する。処理レベル管理部
106aは、処理レベル格納部104を参照して、優先
回路制御処理よりも優先度の低い処理が存在するか否か
を調べる(S207)。その結果、優先回路制御処理の
次に優先度の高い処理である通常回路制御処理の識別子
が、実行処理格納部102に格納される(S208)。
As described above, the priority circuit control process is n + 2.
It is designed to finish before the occurrence of the second timer interrupt. The processing state management unit 106b detects the end of the priority circuit control processing (S206) and notifies the processing level management unit 106a of the end of the processing. The processing level management unit 106a refers to the processing level storage unit 104 to check whether or not there is a process having a lower priority than the priority circuit control process (S207). As a result, the identifier of the normal circuit control process, which is the process having the second highest priority after the priority circuit control process, is stored in the execution process storage unit 102 (S208).

【0052】図10はこのときの実行処理格納部102
と待機処理格納部103の内容を示す図である。同図に
示されるように、このとき、実行識別子を有する処理の
優先度と、最新待機識別子を有する処理の優先度とは等
しい。従って、処理レベル管理部106aは、最新待機
識別子を取り出し、それまで実行処理格納部102に格
納されていた実行識別子の代わりに実行処理格納部10
2に格納する(S209)。即ち、待機処理格納部10
3から最新待機識別子「通常回路制御処理」を取り出
し、実行処理格納部102に格納する。
FIG. 10 shows the execution process storage unit 102 at this time.
3 is a diagram showing the contents of a standby process storage unit 103. FIG. As shown in the figure, at this time, the priority of the process having the execution identifier is equal to the priority of the process having the latest waiting identifier. Therefore, the processing level management unit 106 a extracts the latest standby identifier and replaces the execution identifier stored in the execution process storage unit 102 up to that point with the execution process storage unit 10.
2 (S209). That is, the standby processing storage unit 10
The latest standby identifier “normal circuit control process” is taken out from No. 3 and stored in the execution process storage unit 102.

【0053】図11はこのときの実行処理格納部102
および待機処理格納部103の内容を示す図である。こ
こで実行処理格納部102に格納されている通常回路制
御処理は、図4におけるn+1回目のタイマ割り込みの
際に中断された処理であり、プログラムの実行中断時点
の位置のアドレス、レジスタの内容等の情報が退避され
ているため、中断時点から、再度継続実行されることに
なる。
FIG. 11 shows the execution process storage unit 102 at this time.
3 is a diagram showing the contents of a standby process storage unit 103. FIG. Here, the normal circuit control processing stored in the execution processing storage unit 102 is processing interrupted at the time of the (n + 1) th timer interrupt in FIG. 4, and the address of the position at the time of execution suspension of the program, the contents of the register, etc. Since the information of is saved, it will be continuously executed again from the point of interruption.

【0054】図4のタイミングチャートに示されるよう
に、本実施の形態のリアルタイム制御装置においては、
この通常回路制御処理はn+2回目のタイマ割り込みの
発生の前に終了する。処理状態管理部106bは処理の
終了を検知し(S206)、処理レベル管理部106a
に処理終了の通知を行う。処理終了の通知を受けた処理
レベル管理部106aは、処理レベル格納部104を参
照し、通常回路制御処理より優先度の低い処理が存在す
るか否かを調べる(S207)。図5に示されるよう
に、通常回路制御処理より優先度が低い処理として行程
制御処理が存在するので、処理レベル管理部106a
は、識別子「行程制御処理」を実行処理格納部102に
格納する(S208)。
As shown in the timing chart of FIG. 4, in the real-time control device of this embodiment,
This normal circuit control process ends before the (n + 2) th timer interrupt occurs. The processing state management unit 106b detects the end of processing (S206), and the processing level management unit 106a.
Notify the end of processing. The processing level management unit 106a, which has received the notification of the processing end, refers to the processing level storage unit 104 and checks whether or not there is a processing having a lower priority than the normal circuit control processing (S207). As shown in FIG. 5, since the process control process exists as a process having a lower priority than the normal circuit control process, the process level management unit 106a.
Stores the identifier “stroke control process” in the execution process storage unit 102 (S208).

【0055】図12はこのときの実行処理格納部102
および待機処理格納部103の内容を示す図である。こ
の場合も実行識別子を有する処理の優先度と、最新待機
識別子を有する処理の優先度とは等しいので(S20
4)、処理レベル管理部106aは最新待機識別子を取
り出し、実行処理格納部102に格納する(S20
9)。従って実行識別子は「行程制御処理」となり、こ
のときの実行処理格納部102および待機処理格納部1
03の内容は図6に示される如くとなる。従って、処理
状態管理部106bは、実行識別子に従って、前述の動
作と同様の動作により行程制御処理の実行を行う。この
処理は、図4において、n回目のタイマ割り込みのとき
に中断された処理であるので、中断された場所から継続
実行されることになる。
FIG. 12 shows the execution process storage unit 102 at this time.
3 is a diagram showing the contents of a standby process storage unit 103. FIG. Also in this case, the priority of the process having the execution identifier is equal to the priority of the process having the latest waiting identifier (S20).
4), the processing level management unit 106a extracts the latest standby identifier and stores it in the execution process storage unit 102 (S20).
9). Therefore, the execution identifier becomes “stroke control processing”, and the execution processing storage unit 102 and the standby processing storage unit 1 at this time
The contents of 03 are as shown in FIG. Therefore, the processing state management unit 106b executes the stroke control process by the same operation as the above-described operation according to the execution identifier. Since this process is a process interrupted at the n-th timer interrupt in FIG. 4, it is continuously executed from the interrupted place.

【0056】以後、図4に示されるように、n+2回目
のタイマ割り込みが発生したときも、これまでに説明し
た処理と同様の処理により、優先回路制御処理が実行さ
れる。なお、以後、タイマ割り込みの発生前に行程制御
処理が終了した場合には(S206)、行程制御処理よ
り優先度の低い処理は存在しない(S207:No)た
め、制御部106の処理を終了し、図3に戻ってマイコ
ンシステムによる機器の制御が終了する。
Thereafter, as shown in FIG. 4, even when the (n + 2) th timer interrupt occurs, the priority circuit control process is executed by the same process as the process described above. If the stroke control process ends before the timer interrupt occurs (S206), there is no process having a lower priority than the stroke control process (S207: No), and the process of the control unit 106 ends. Returning to FIG. 3, the control of the device by the microcomputer system ends.

【0057】以上のように本実施の形態のリアルタイム
制御装置においては、非同期事象の発生時に、実行中の
処理の優先度と、最も優先度の高い処理の優先度とを比
較し、割り込み処理を利用して、常に優先度の高い処理
から実行されるように制御することによって、プログラ
ムの設計、開発時点で行う必要のあった繁雑な実行時間
の計算等の作業を除去することができる。
As described above, in the real-time control device of this embodiment, when an asynchronous event occurs, the priority of the process being executed is compared with the priority of the process having the highest priority, and the interrupt process is executed. By using the control so that the processing is always executed from the highest priority processing, it is possible to eliminate the work such as the complicated execution time calculation which is required at the time of designing the program and at the time of development.

【0058】また、非同期事象の発生に伴う割り込み処
理を行う場合に、実行中の処理を表す識別子を退避し、
優先度の高い処理が終了したときに、終了した処理の次
に優先度の高い処理の優先度と、退避された処理の優先
度とを比較することにより、一種類の割り込み要因で、
複数の優先度に分類された処理を制御することが可能と
なるため、マイコンの製造コストを低く維持したまま、
多段階の割り込みと同様の結果を得ることが可能とな
る。 (実施の形態2)以下、本発明の第二の実施の形態につ
いて説明する。
Further, when performing an interrupt process accompanying the occurrence of an asynchronous event, the identifier representing the process being executed is saved,
When a high-priority process is completed, by comparing the priority of the process with the next highest priority after the completed process with the priority of the saved process, one type of interrupt factor
Since it is possible to control the processing classified into multiple priorities, while keeping the manufacturing cost of the microcomputer low,
It is possible to obtain the same result as the multi-step interrupt. (Second Embodiment) A second embodiment of the present invention will be described below.

【0059】図13は、本発明のリアルタイム制御装置
の一適用例としての電子レンジの一部の構成を示すもの
である。この電子レンジにおけるリアルタイム制御装置
は、制御処理モジュール格納部1301、実行処理格納
部1302、待機処理格納部1303、処理レベル格納
部1304、処理切り換え要求部1305、制御部13
06を備える。
FIG. 13 shows a partial configuration of a microwave oven as an application example of the real-time control device of the present invention. The real-time control device in this microwave oven includes a control processing module storage unit 1301, an execution processing storage unit 1302, a standby processing storage unit 1303, a processing level storage unit 1304, a process switching request unit 1305, and a control unit 13.
06.

【0060】制御処理モジュール格納部1301は、行
程制御処理モジュール格納部1301a、優先回路制御
処理モジュール格納部1301b、通常回路制御処理モ
ジュール格納部1301cから構成される。行程制御処
理モジュール格納部1301aには、行程制御処理を行
うためのモジュールが格納される。行程制御処理とは、
第一の実施の形態で説明したように、処理を起動する時
間間隔や、処理時間の制限がなく、予め決定された実行
手順に従って進行させればよい処理のことである。
The control processing module storage unit 1301 comprises a stroke control processing module storage unit 1301a, a priority circuit control processing module storage unit 1301b, and a normal circuit control processing module storage unit 1301c. The process control processing module storage unit 1301a stores a module for performing the process control processing. What is stroke control processing?
As described in the first embodiment, this is a process that does not have a time interval for activating the process or a process time limit and can be made to proceed in accordance with a predetermined execution procedure.

【0061】本実施の形態では、行程制御処理モジュー
ル格納部1301aに格納されるモジュールは、メイン
処理モジュールと、調理行程処理モジュール群と、設定
行程処理モジュール群と、管理処理モジュール群とに分
類される。メイン処理モジュールは、調理行程処理モジ
ュール群と、設定行程処理モジュール群と、管理処理モ
ジュール群とに含まれるモジュールの中から必要なモジ
ュールを呼び出し、実行させる。
In the present embodiment, the modules stored in the stroke control processing module storage section 1301a are classified into a main processing module, a cooking stroke processing module group, a set stroke processing module group, and a management processing module group. It The main processing module calls and executes a necessary module from the modules included in the cooking process processing module group, the setting process processing module group, and the management processing module group.

【0062】調理行程処理モジュール群が行う具体的な
処理内容としては、パワー調理、グリル調理、コンビネ
ーション調理、自動重量調理や自動重量解凍調理などの
センサー調理、タイマー調理などが挙げられる。設定行
程処理モジュール群が行う具体的な処理内容としては、
各種調理コースの設定、調理内容をユーザの好みに合わ
せるモアレスキー等による各種設定、時計の設定、キー
操作を無効にするチャイルドロックの設定などが挙げら
れる。
Specific processing contents performed by the cooking process module group include power cooking, grill cooking, combination cooking, sensor cooking such as automatic weight cooking and automatic weight defrosting, and timer cooking. As the specific processing contents performed by the setting process module group,
Examples include setting of various cooking courses, various settings using a moireless key or the like for adjusting cooking contents to the user's preference, setting of a clock, and setting of a child lock that disables key operation.

【0063】管理処理モジュール群が行う具体的な処理
内容としては、テストモード、デモモードなどが挙げら
れる。優先回路制御処理モジュール格納部1301bに
は、ポート入力処理モジュール、ポート出力処理モジュ
ール、カウンタ処理モジュールが格納される。ポート入
力処理モジュールが行う処理内容としては、具体的に
は、各種の調理コースを設定するキーの検知や、スター
トキー、ストップキー、時計設定用キーなどのキーの押
下、ダイヤルの回転、スライダー等、設定に使用する様
々なインタフェースの検知や、温度センサや重量セン
サ、光センサなど、各種センサからの値の取得などが挙
げられる。
Specific processing contents performed by the management processing module group include a test mode and a demo mode. The priority circuit control processing module storage unit 1301b stores a port input processing module, a port output processing module, and a counter processing module. Specifically, the contents of processing performed by the port input processing module include detection of keys for setting various cooking courses, pressing of keys such as start key, stop key, and clock setting key, dial rotation, slider, etc. , Detection of various interfaces used for setting, acquisition of values from various sensors such as a temperature sensor, a weight sensor, and an optical sensor.

【0064】ポート出力処理モジュールが行う処理内容
としては、具体的には、液晶やLEDへの表示やモータ
の起動、ヒータの起動などが挙げられる。カウンタ処理
モジュールは、タイマの計時の際の基本単位となるカウ
ンタのインクリメント処理を行う。通常回路制御処理モ
ジュール格納部1301cには、タイマ処理モジュー
ル、リフレッシュ処理モジュール、ポート入力対応処理
モジュール、ポート出力対応処理モジュールが格納され
る。
Specifically, the contents of processing performed by the port output processing module include display on a liquid crystal or LED, activation of a motor, activation of a heater, and the like. The counter processing module performs increment processing of the counter, which is a basic unit when the timer measures time. The normal circuit control processing module storage unit 1301c stores a timer processing module, a refresh processing module, a port input corresponding processing module, and a port output corresponding processing module.

【0065】タイマ処理モジュールは、上記カウンタ処
理モジュールによってインクリメントされたカウンタの
値に基づき、ユーザが用意したタイマをインクリメント
する。例えば、カウンタが1ミリ秒間隔であった場合
に、1秒単位のカウンタを計時するときは、カウンタが
1000回インクリメントされた時点で、タイマを1回
インクリメントする。
The timer processing module increments the timer prepared by the user based on the value of the counter incremented by the counter processing module. For example, when the counter has a 1-millisecond interval, when counting the counter in units of 1 second, the timer is incremented once when the counter is incremented 1000 times.

【0066】リフレッシュ処理モジュールは、LED表
示や、モータ出力などにおいて、ポートに対して出力し
たデータを定期的に再出力して、LEDの再表示やモー
タの再起動等を行う。ポート入力対応処理モジュールが
行う処理としては、庫内温度が高温であると温度センサ
が検知した場合に、すぐに冷却ファンを起動させる処理
などが例として挙げられる。
The refresh processing module periodically re-outputs the data output to the port in LED display, motor output, etc. to re-display the LED and restart the motor. An example of the process performed by the port input handling process module is a process of immediately activating the cooling fan when the temperature sensor detects that the temperature inside the refrigerator is high.

【0067】ポート出力対応処理モジュールが行う処理
としては、文字列のスクロール処理等を行う場合に、限
られた表示領域で文字がスクロールしているように見せ
かけるために表示文字を作成する処理などが例として挙
げられる。実行処理格納部1302、待機処理格納部1
303、処理レベル格納部1304、処理切り換え要求
部1305、制御部1306(処理レベル管理部130
6aおよび処理状態管理部1306bを含む)について
は、第一の実施の形態で説明したものと同一であるの
で、ここでの詳しい説明は省略する。
The process performed by the port output support processing module is, for example, a process of creating a display character in order to make a character appear to be scrolling in a limited display area when performing a character string scrolling process. Take as an example. Execution process storage unit 1302, standby process storage unit 1
303, processing level storage unit 1304, processing switching request unit 1305, control unit 1306 (processing level management unit 130
6a and the processing state management unit 1306b) are the same as those described in the first embodiment, and detailed description thereof is omitted here.

【0068】以上のように構成された電子レンジにおけ
るリアルタイム制御装置について、以下、その動作を説
明する。図14は、本実施の形態における電子レンジの
リアルタイム制御装置の動作を示すタイミングチャート
である。本実施の形態では、非同期事象としてタイマ割
り込みを用いている。なお、制御部等の処理内容につい
ては、第一の実施例とほぼ同一であるので、以下、図
2、図3および図5〜図14を参照しながら説明を行
う。
The operation of the real-time control device in the microwave oven configured as described above will be described below. FIG. 14 is a timing chart showing the operation of the real-time control device for a microwave according to the present embodiment. In this embodiment, a timer interrupt is used as an asynchronous event. Since the processing contents of the control unit and the like are almost the same as those of the first embodiment, the description will be given below with reference to FIGS. 2, 3 and 5 to 14.

【0069】行程制御処理と、優先回路制御処理と、通
常回路制御処理との優先順位は、図5に示したものと同
一である。この場合も、数字が小さいものほど高い優先
順位が付与されていることを意味している。まず、図3
のステップS301で、本実施の形態の電子レンジの制
御を開始する。この状態における実行処理格納部130
2と待機処理格納部1303の内容は図6で示される。
従って、処理レベル管理部1306aは、実行識別子に
従って、行程制御処理の実行を処理状態管理部1306
bに指示し、当該指示に基づいて、処理状態管理部13
06bが行程制御処理の実行を開始する。
The priority order of the process control process, the priority circuit control process, and the normal circuit control process is the same as that shown in FIG. Also in this case, the smaller the number, the higher the priority. First, FIG.
In step S301, control of the microwave oven according to the present embodiment is started. The execution process storage unit 130 in this state
2 and the contents of the standby process storage unit 1303 are shown in FIG.
Therefore, the processing level management unit 1306a executes the process control processing according to the execution identifier.
b, and based on the instruction, the processing state management unit 13
06b starts executing the stroke control process.

【0070】行程制御処理の実行開始後、行程制御処理
の一部であるグリル調理処理を行っているときに、n回
目のタイマ割り込み処理が発生したものと想定する。こ
れにより、非同期事象発生時の制御部1306の処理が
開始される(S304)。図2に移り、まず、処理切り
換え要求部1305が、タイマ割り込みの発生を検知
し、制御部1306に対して処理切り換え要求を出力す
る。処理レベル管理部1306aは、処理切り換え要求
部1305からの処理切り換え要求を受け(S20
1)、実行識別子「行程制御処理」を実行処理格納部1
302から取り出し、待機処理格納部1303に格納す
る(S202)。
It is assumed that the n-th timer interrupt process occurs during the grill cooking process, which is a part of the stroke control process, after the stroke control process is started. As a result, the processing of the control unit 1306 when an asynchronous event occurs is started (S304). Turning to FIG. 2, first, the process switching request unit 1305 detects the occurrence of a timer interrupt and outputs a process switching request to the control unit 1306. The processing level management unit 1306a receives the processing switching request from the processing switching requesting unit 1305 (S20).
1), the execution identifier “stroke control process” is stored in the execution process storage unit 1
It is taken out of the storage unit 302 and stored in the standby processing storage unit 1303 (S202).

【0071】さらに、処理レベル管理部1306aは、
処理レベル格納部1304を参照し、最も優先度の高い
処理の識別子を実行処理格納部1302に格納する(S
203)。即ち、識別子「優先回路制御処理」が実行処
理格納部1302に格納される。このときの実行処理格
納部1302および待機処理格納部1303の内容は図
7の如くとなる。従って、実行識別子を有する処理の優
先度と、最新待機識別子を有する処理の優先度との比較
(S204)において、実行識別子を有する処理の優先
度の方が、最新待機識別子を有する処理の優先度より高
いため、処理レベル管理部1306aは実行識別子を有
する処理である優先回路制御処理の実行を処理状態管理
部1306bに指示し、処理状態管理部1306bが当
該指示に従って優先回路制御処理の実行を開始する(S
205)。
Further, the processing level management unit 1306a is
By referring to the processing level storage unit 1304, the identifier of the process having the highest priority is stored in the execution process storage unit 1302 (S
203). That is, the identifier “priority circuit control process” is stored in the execution process storage unit 1302. The contents of the execution process storage unit 1302 and the standby process storage unit 1303 at this time are as shown in FIG. Therefore, in the comparison between the priority of the process having the execution identifier and the priority of the process having the latest standby identifier (S204), the priority of the process having the execution identifier is higher than that of the process having the latest standby identifier. Since it is higher, the processing level management unit 1306a instructs the processing state management unit 1306b to execute the priority circuit control process which is a process having the execution identifier, and the processing state management unit 1306b starts the execution of the priority circuit control process according to the instruction. Do (S
205).

【0072】具体的には、処理状態管理部1306b
が、優先回路制御処理モジュール格納部1301bに格
納されているモジュールを取り出し、ポート入力処理、
ポート出力処理、およびカウンタ処理を順次実行する。
優先回路制御処理は、次回の処理切り換え要求の発生の
前に終了するように設計されている。従って、処理状態
管理部1306bが優先回路制御処理の終了を検知し、
以後、第一の実施の形態で説明した動作と同様の処理が
行われる。即ち、処理状態管理部1306bからの処理
終了の通知を受けた処理レベル管理部1306aが、優
先回路制御処理の次に優先度の高い処理の識別子である
「通常回路制御処理」を実行処理格納部1302に格納
する(S208)。
Specifically, the processing state management unit 1306b
Takes out the module stored in the priority circuit control processing module storage unit 1301b, performs the port input processing,
Port output processing and counter processing are sequentially executed.
The priority circuit control process is designed to end before the next process switching request is issued. Therefore, the processing state management unit 1306b detects the end of the priority circuit control processing,
After that, the same processing as the operation described in the first embodiment is performed. That is, the processing level management unit 1306a, which has received the notification of the processing end from the processing state management unit 1306b, executes the “normal circuit control processing” which is the identifier of the processing having the second highest priority after the priority circuit control processing, It is stored in 1302 (S208).

【0073】このときの実行処理格納部1302および
待機処理格納部1303の内容は図8の如くである。従
って、実行識別子を有する処理である通常回路制御処理
の優先度の方が、最新待機識別子を有する処理である行
程制御処理の優先度より高いため、実行識別子を有する
処理である通常回路制御処理の実行が開始される(S2
05)。具体的には、処理状態管理部1306bが、通
常回路制御処理モジュール格納部1301cに格納され
ているモジュールを取り出し、タイマ処理、リフレッシ
ュ処理、ポート入力対応処理、ポート出力対応処理を順
次実行する。
The contents of the execution process storage unit 1302 and the standby process storage unit 1303 at this time are as shown in FIG. Therefore, since the priority of the normal circuit control processing which is the processing having the execution identifier is higher than the priority of the stroke control processing which is the processing having the latest standby identifier, the priority of the normal circuit control processing which is the processing having the execution identifier is Execution is started (S2
05). Specifically, the processing state management unit 1306b takes out the modules stored in the normal circuit control processing module storage unit 1301c and sequentially executes the timer process, the refresh process, the port input handling process, and the port output handling process.

【0074】ここで、図14のタイミングチャートに示
されるように、ポート入力対応処理を行っているときに
n+1回目のタイマ割り込みが発生する(S201)。
処理レベル管理部1306aは、実行識別子である「通
常回路制御処理」を取り出し、待機処理格納部1303
に格納した後(S202)、最も優先度の高い処理の識
別子である「優先回路制御処理」を実行処理格納部13
02に格納する(S203)。
Here, as shown in the timing chart of FIG. 14, the (n + 1) th timer interrupt occurs during the port input handling process (S201).
The processing level management unit 1306a extracts the “normal circuit control processing” that is the execution identifier, and stores it in the standby processing storage unit 1303.
(S202), the "priority circuit control process" which is the identifier of the process having the highest priority is stored in the execution process storage unit 13
No. 02 (S203).

【0075】このときの実行処理格納部1302および
待機処理格納部1303の内容は図9の如くである。従
って、実行識別子を有する処理の優先度と最新待機識別
子を有する処理の優先度とを比較すると(S204)、
実行識別子を有する処理の方が優先度が高いため、実行
識別子を有する処理である優先回路制御処理の実行が開
始される(S205)。即ち、処理状態管理部1306
bが、優先回路制御処理モジュール格納部1301bに
格納されているモジュールを取り出し、ポート入力処
理、ポート出力処理、およびカウンタ処理を順次実行す
る。
The contents of the execution process storage unit 1302 and the standby process storage unit 1303 at this time are as shown in FIG. Therefore, when the priority of the process having the execution identifier and the priority of the process having the latest waiting identifier are compared (S204),
Since the process having the execution identifier has a higher priority, the execution of the priority circuit control process, which is the process having the execution identifier, is started (S205). That is, the processing state management unit 1306
The module b stores the modules stored in the priority circuit control processing module storage unit 1301b, and sequentially executes the port input processing, the port output processing, and the counter processing.

【0076】優先回路制御処理は、次の処理切り換え要
求の発生の前に終了するように設計されている。優先回
路制御処理の終了を検知した処理状態管理部1306b
は、処理レベル管理部1306aに優先回路制御処理の
終了を通知する(S206)。処理レベル管理部130
6aは、当該処理終了の通知を受け、優先回路制御処理
の次に優先度の高い処理である通常回路制御処理の識別
子を実行処理格納部1302に格納する(S208)。
The priority circuit control process is designed to be completed before the next process switching request is issued. Processing state management unit 1306b that has detected the end of the priority circuit control processing
Notifies the processing level management unit 1306a of the end of the priority circuit control processing (S206). Processing level management unit 130
6a receives the notification of the end of the process, and stores the identifier of the normal circuit control process, which is the process having the second highest priority after the priority circuit control process, in the execution process storage unit 1302 (S208).

【0077】このときの実行処理格納部1302および
待機処理格納部1303の内容は図10の如くとなり、
実行識別子を有する処理の優先度と、最新待機識別子を
有する処理の優先度との比較(S204)の結果、両処
理の優先度は等しくなる。従って、処理レベル管理部1
306aは、待機処理格納部1303から最新待機識別
子を取り出し、実行処理格納部1302に格納する(S
209)。
The contents of the execution process storage unit 1302 and the standby process storage unit 1303 at this time are as shown in FIG.
As a result of the comparison between the priority of the process having the execution identifier and the priority of the process having the latest waiting identifier (S204), the priorities of both processes become equal. Therefore, the processing level management unit 1
The 306a retrieves the latest standby identifier from the standby process storage unit 1303 and stores it in the execution process storage unit 1302 (S
209).

【0078】このときの実行処理格納部1302および
待機処理格納部1303の内容は図11の如くとなり、
実行識別子に従って通常回路制御処理の実行が開始され
るが、これはn+1回目のタイマ割り込みの際に中断さ
れた処理であるので、その中断時点から継続して実行さ
れる(S205)。具体的には、ポート入力対応処理が
継続実行され、さらに、ポート出力対応処理が実行され
る。
The contents of the execution process storage unit 1302 and the standby process storage unit 1303 at this time are as shown in FIG.
The execution of the normal circuit control process is started according to the execution identifier. Since this process is interrupted at the (n + 1) th timer interrupt, it is continuously executed from the interrupt point (S205). Specifically, the port input corresponding process is continuously executed, and further the port output corresponding process is executed.

【0079】図14に示されるように、本実施の形態に
おいては、通常回路制御処理はn+2回目のタイマ割り
込みの発生前に終了する。処理状態管理部1306bは
通常回路制御処理の終了を検知し、処理レベル管理部1
306aに対して処理の終了を通知する(S206)。
処理レベル管理部1306aは処理終了の通知を受け
て、処理レベル格納部1304を参照し、通常回路制御
処理よりも優先度の低い処理が存在するか否かを調べる
(S207)。図5に示されるように、通常回路制御処
理よりも優先度の低い処理として、行程制御処理が存在
するので、処理レベル管理部1306aは行程制御処理
の識別子を実行処理格納部1302に格納する(S20
8)。
As shown in FIG. 14, in the present embodiment, the normal circuit control process ends before the (n + 2) th timer interrupt occurs. The processing state management unit 1306b detects the end of the normal circuit control processing, and the processing level management unit 1306b
The end of processing is notified to 306a (S206).
The processing level management unit 1306a receives the processing end notification, refers to the processing level storage unit 1304, and checks whether or not there is processing having a lower priority than the normal circuit control processing (S207). As shown in FIG. 5, since the process control process exists as a process having a lower priority than the normal circuit control process, the process level management unit 1306a stores the process control process identifier in the execution process storage unit 1302 ( S20
8).

【0080】このときの実行処理格納部1302および
待機処理格納部1303の内容は図12に示す如くであ
り、実行識別子を有する処理の優先度と、最新待機識別
子を有する処理の優先度とは等しい。従って、処理レベ
ル管理部1306aは最新待機識別子である「行程制御
処理」を取り出して、それまで実行処理格納部1302
に格納されていた実行識別子の代わりに実行処理格納部
1302に格納し(S209)、処理状態管理部130
6bに行程制御処理の実行を指示する。処理状態管理部
1306bは処理レベル管理部1306aからの指示を
受け、行程制御処理の実行を開始する(S205)。
The contents of the execution process storage unit 1302 and the standby process storage unit 1303 at this time are as shown in FIG. 12, and the priority of the process having the execution identifier is equal to the priority of the process having the latest standby identifier. . Therefore, the processing level management unit 1306a takes out the latest process identifier “stroke control process” and stores the execution process storage unit 1302 until then.
It is stored in the execution process storage unit 1302 instead of the execution identifier stored in (S209).
6b is instructed to execute the stroke control process. The processing state management unit 1306b receives the instruction from the processing level management unit 1306a and starts execution of the stroke control process (S205).

【0081】これは、n回目のタイマ割り込みにより中
断された処理であるので、中断時点から継続して実行さ
れる。具体的には、グリル調理処理の途中から継続して
実行される。以上のように、本発明のリアルタイム制御
方法および装置を電子レンジの制御に適用することが可
能である。
Since this processing is interrupted by the n-th timer interrupt, it is continuously executed from the interruption point. Specifically, it is continuously executed from the middle of the grill cooking process. As described above, the real-time control method and device of the present invention can be applied to the control of a microwave oven.

【0082】なお、本実施の形態においては、優先回路
制御処理に含まれる処理の実行順序を、ポート入力処
理、ポート出力、カウンタ処理の順とし、通常回路制御
処理に含まれる処理の実行順序を、タイマ処理、リフレ
ッシュ処理、ポート入力対応処理、ポート出力対応処理
の順としたが、実行順序はこれに限定されるものではな
く、実施の形態に応じて適切な順序で実行することが可
能である。
In the present embodiment, the execution order of the processing included in the priority circuit control processing is the order of port input processing, port output, and counter processing, and the execution order of the processing included in the normal circuit control processing is the same. The order of the timer processing, the refresh processing, the port input corresponding processing, and the port output corresponding processing is described above, but the execution order is not limited to this, and it is possible to execute in an appropriate order according to the embodiment. is there.

【0083】また、モジュールを分割もしくは統合して
同一の処理を行わしめることも可能であり、制御処理モ
ジュール格納部に格納されるモジュールの名称、構成等
についても、本実施の形態の例に限定されるものではな
い。 (実施の形態3)次に、本発明の第三の実施の形態につ
いて説明する。
It is also possible to divide or integrate the modules to perform the same processing, and the names and configurations of the modules stored in the control processing module storage section are also limited to the example of the present embodiment. It is not something that will be done. (Third Embodiment) Next, a third embodiment of the present invention will be described.

【0084】図15は、本発明のリアルタイム制御処理
を備えた食器洗い機の一部の構成を示すブロック図であ
る。この食器洗い機におけるリアルタイム制御装置は、
制御処理モジュール格納部1501、実行処理格納部1
502、待機処理格納部1503、処理レベル格納部1
504、処理切り換え要求部1505、制御部1506
を備える。
FIG. 15 is a block diagram showing a part of the construction of the dishwasher provided with the real-time control processing of the present invention. The real-time control device in this dishwasher is
Control processing module storage unit 1501, execution processing storage unit 1
502, standby processing storage unit 1503, processing level storage unit 1
504, processing switching request unit 1505, control unit 1506
Is provided.

【0085】制御処理モジュール格納部1501は、行
程制御処理モジュール格納部1501aと、回路制御処
理モジュール格納部1501bとから構成される。行程
制御処理モジュール格納部1501aには、行程制御処
理を行うためのモジュールが格納される。行程制御処理
とは、処理を起動する時間間隔や、処理時間の制限がな
く、予め決定された実行手順に従って進行させればよい
処理のことである。
The control processing module storage unit 1501 comprises a stroke control processing module storage unit 1501a and a circuit control processing module storage unit 1501b. The process control processing module storage unit 1501a stores a module for performing the process control processing. The process control process is a process that does not have a time interval for activating the process or a process time and may be performed according to a predetermined execution procedure.

【0086】本実施の形態においては、行程制御処理モ
ジュール格納部1501aに格納されるモジュールは、
メイン処理モジュールと、洗浄行程処理モジュール群
と、設定行程処理モジュール群と、管理モジュール群と
に分類される。メイン処理モジュールは、洗浄行程処理
モジュール群と、設定行程処理モジュール群と、管理処
理モジュール群とに含まれるモジュールの中から必要な
モジュールを呼び出し、実行させる。
In the present embodiment, the modules stored in the stroke control processing module storage unit 1501a are
It is classified into a main processing module, a cleaning process processing module group, a setting process processing module group, and a management module group. The main processing module calls and executes a necessary module from the modules included in the cleaning process processing module group, the setting process processing module group, and the management processing module group.

【0087】洗浄行程処理モジュール群が行う具体的な
処理内容としては、通常に食器を洗浄し乾燥する通常洗
浄行程処理や、早急に食器を洗浄して乾燥する特急洗浄
行程処理、丁寧に洗浄し乾燥する念入り洗浄行程処理な
どが挙げられる。設定行程処理モジュール群が行う具体
的な処理内容としては、各種洗浄コースの設定、洗浄内
容をユーザの好みに合わせる時間設定キーなどによる各
種設定、時計の設定などが挙げられる。
The specific processing contents performed by the cleaning process module group include a normal cleaning process for cleaning and drying dishes normally, an express cleaning process for cleaning and drying dishes immediately, and a careful cleaning process. Examples include a thorough cleaning process such as drying. Specific processing contents performed by the setting process module group include setting of various cleaning courses, various settings using a time setting key for adjusting the cleaning contents to the user's preference, and setting of a clock.

【0088】管理処理モジュール群が行う管理処理の具
体的な処理内容としては、テストモード、デモモードな
どが挙げられる。回路制御処理モジュール格納部150
1bには、ポート入出力処理モジュールと、カウンタ処
理モジュールと、タイマ処理モジュールと、リフレッシ
ュ処理モジュールと、ポート入出力対応モジュールとが
格納される。
Specific processing contents of the management processing performed by the management processing module group include a test mode and a demo mode. Circuit control processing module storage unit 150
A port input / output processing module, a counter processing module, a timer processing module, a refresh processing module, and a port input / output compatible module are stored in 1b.

【0089】ポート入出力処理モジュールが行う処理と
しては、各種の洗浄コースを設定するキーやスタートキ
ー、ストップキー、時計設定用キーなどのキーの押下の
検知や、ダイヤルの回転やスライダーなど設定に使用す
る様々なインタフェースの検知、温度センサや重量セン
サ、光センサなどの各種センサからの値の取得、液晶や
LEDへの表示やモータの起動、ヒータの起動などが挙
げられる。
The processing performed by the port input / output processing module includes detection of key presses such as keys for setting various cleaning courses, start keys, stop keys, and clock setting keys, and settings such as dial rotation and slider settings. Examples include detection of various interfaces used, acquisition of values from various sensors such as a temperature sensor, a weight sensor, and an optical sensor, display on a liquid crystal or LED, activation of a motor, activation of a heater, and the like.

【0090】カウンタ処理モジュールは、タイマの計時
の際の基本単位となるカウンタのインクリメント処理を
行う。タイマ処理とは、インクリメントされたカウンタ
の値に基づき、ユーザが用意したタイマをインクリメン
トする処理である。例えば、カウンタが1ミリ秒間隔で
あった場合に、1秒単位のタイマを計時するときは、カ
ウンタが1000回で一回のインクリメントが行われ
る。
The counter processing module performs the increment processing of the counter, which is the basic unit when the timer counts. The timer process is a process of incrementing a timer prepared by the user based on the incremented counter value. For example, when the counter has a 1-millisecond interval, when the timer of the unit of 1 second is timed, the counter is incremented once every 1000 times.

【0091】リフレッシュ処理モジュールは、LED表
示や、モータ出力などにおいて、ポートに対して出力し
たデータを定期的に再出力して、LEDの再表示やモー
タの再起動等を行う。ポート入出力対応処理モジュール
が行う処理としては、ヒータの温度が異常に高温になっ
たと温度センサが検知した場合にすぐにヒータを停止さ
せる処理や、7セグメントのLEDの組み合わせにより
数字を表現する場合に、LEDの点灯パタンを作成する
処理などが挙げられる。
The refresh processing module periodically re-outputs the data output to the port in LED display, motor output, etc. to re-display the LED and restart the motor. The processing performed by the port input / output support processing module is to immediately stop the heater when the temperature sensor detects that the temperature of the heater has become abnormally high, or to express a number by combining 7-segment LEDs. Examples include a process of creating an LED lighting pattern.

【0092】実行処理格納部1502、待機処理格納部
1503、処理レベル格納部1504、処理切り換え要
求部1505、制御部1506(処理レベル管理部15
06aおよび処理状態管理部1506bを含む)につい
ては、第一の実施の形態で説明したものと同一であるの
でここでの詳しい説明は省略する。以上のように構成さ
れた食器洗い機について以下その動作を説明する。
The execution process storage unit 1502, the standby process storage unit 1503, the process level storage unit 1504, the process switching request unit 1505, the control unit 1506 (the process level management unit 15).
(Including the processing state management unit 1506b and the processing state management unit 1506b) is the same as that described in the first embodiment, and thus detailed description thereof is omitted here. The operation of the dishwasher configured as above will be described below.

【0093】図16は、本実施の形態における食器洗い
機に備えられたリアルタイム制御装置の動作を表すタイ
ミングチャートである。この例では、非同期事象として
タイマ割り込みを用いている。制御部1506の処理内
容については、第一の実施の形態で説明したものとほぼ
同一であるので、以下図2、図3、図15〜図20を参
照しながら説明する。なお、処理レベル格納部1504
の内容については図17に示す。同図において、数字が
小さい方が、高い優先度を付与されていることを表して
いる。
FIG. 16 is a timing chart showing the operation of the real-time control device provided in the dishwasher according to this embodiment. In this example, a timer interrupt is used as an asynchronous event. Since the processing content of the control unit 1506 is almost the same as that described in the first embodiment, it will be described below with reference to FIGS. 2, 3, and 15 to 20. The processing level storage unit 1504
The contents of the above are shown in FIG. In the figure, the smaller the number, the higher the priority.

【0094】まず、図3で機器の制御を開始する。制御
開始時の実行処理格納部1502および待機処理格納部
1503の内容は図18に示す如くであるので、処理レ
ベル管理部1506aは実行識別子に従い、行程制御処
理の実行を処理状態管理部1506bに指示する。処理
状態管理部1506bは当該指示を受け、行程制御処理
の実行を開始する(S301)。
First, control of the equipment is started in FIG. Since the contents of the execution process storage unit 1502 and the standby process storage unit 1503 at the start of control are as shown in FIG. 18, the process level management unit 1506a instructs the process state management unit 1506b to execute the process control process according to the execution identifier. To do. Upon receiving the instruction, the processing state management unit 1506b starts executing the stroke control process (S301).

【0095】ここで、行程制御処理の一部である通常洗
浄制御処理を行っている最中にn回目のタイマ割り込み
が発生したものと想定する。これにより図2に示される
制御部1506の処理に移行する(S304)。処理切
り換え要求部1505は、タイマ割り込みの発生を受け
て、制御部1506に対して処理切り換え要求を出力す
る。処理レベル管理部1506aは処理切り換え要求を
受けて(S201)、実行識別子を取り出し待機処理格
納部1503に格納する(S202)。さらに、処理レ
ベル管理部1506aは、処理レベル格納部1504を
参照して、最も優先度の高い処理の識別子を実行処理格
納部1502に格納する(S203)。
Here, it is assumed that the n-th timer interrupt is generated during the normal cleaning control processing which is a part of the stroke control processing. As a result, the processing shifts to the processing of the control unit 1506 shown in FIG. 2 (S304). Upon receiving the timer interrupt, the process switching request unit 1505 outputs a process switching request to the control unit 1506. The processing level management unit 1506a receives the processing switching request (S201), and extracts the execution identifier and stores it in the standby processing storage unit 1503 (S202). Further, the processing level management unit 1506a refers to the processing level storage unit 1504 and stores the identifier of the process having the highest priority in the execution process storage unit 1502 (S203).

【0096】図17に示されるように、本実施の形態に
おいて最も優先度の高い処理は回路制御処理であるの
で、識別子「回路制御処理」が実行処理格納部1502
に格納される。このときの、実行処理格納部1502お
よび待機処理格納部1503の内容を図19に示す。処
理レベル管理部1506aは、実行識別子を有する処理
の優先度と、最新待機識別子を有する処理の優先度とを
比較する(S204)。この場合には、実行識別子を有
する処理である回路制御処理の優先度の方が高いので、
ステップS205に進み、処理状態管理部1506b
が、実行識別子を有する処理である回路制御処理の実行
を開始する。具体的には、ポート入出力処理、カウンタ
処理、リフレッシュ処理、ポート入出力対応処理を順次
行う。
As shown in FIG. 17, since the process with the highest priority in this embodiment is the circuit control process, the identifier “circuit control process” is assigned to the execution process storage unit 1502.
Stored in. The contents of the execution process storage unit 1502 and the standby process storage unit 1503 at this time are shown in FIG. The processing level management unit 1506a compares the priority of the process having the execution identifier with the priority of the process having the latest standby identifier (S204). In this case, since the circuit control process, which is a process having the execution identifier, has a higher priority,
The process proceeds to step S205, and the processing state management unit 1506b
Starts execution of the circuit control process which is a process having the execution identifier. Specifically, port input / output processing, counter processing, refresh processing, and port input / output corresponding processing are sequentially performed.

【0097】前述のとおり、本発明のリアルタイム制御
装置では、最も優先度の高い処理は非同期事象の発生周
期内に終了するように設計される。従って、回路制御処
理は、次回のタイマ割り込みの発生より前に終了する。
回路制御処理が終了すると、処理状態管理部1506b
は処理の終了を検知し、処理レベル管理部1506aに
処理の終了を通知する。処理レベル管理部1506a
は、処理レベル格納部1504を参照して、回路制御処
理より優先度の低い処理が存在するか否かを調べる(S
207)。
As described above, the real-time control device of the present invention is designed so that the process with the highest priority is completed within the asynchronous event generation cycle. Therefore, the circuit control process ends before the next timer interrupt occurs.
When the circuit control processing ends, the processing state management unit 1506b
Detects the end of the process and notifies the process level management unit 1506a of the end of the process. Processing level management unit 1506a
Refers to the processing level storage unit 1504 and checks whether or not there is a process having a lower priority than the circuit control process (S).
207).

【0098】図17に示されるように、回路制御処理よ
り優先度の低い処理として行程制御処理が存在するの
で、回路制御処理の次に優先度の高い処理として行程制
御処理の識別子が、終了した回路制御処理の識別子の代
わりに実行処理格納部1502に格納される(S20
8)。処理レベル管理部1506aは、実行識別子を有
する処理の優先度と、最新待機識別子を有する処理の優
先度との比較を行う(S204)。図20は、このとき
の実行処理格納部1502および待機処理格納部150
3の内容を示す。同図に示されるように、実行識別子を
有する処理の優先度と、最新待機識別子を有する処理の
優先度とは等しいので、処理レベル管理部1506aは
最新待機識別子を取り出して実行処理格納部1502に
格納し(S209)、処理状態管理部1506bに対し
て、実行識別子を有する処理である行程制御処理の実行
を指示する。処理状態管理部1506bは当該指示を受
けて、行程制御処理の実行を開始する(S205)。こ
の処理はn回目のタイマ割り込みの際に中断された処理
であるので、中断時点から継続実行される。具体的に
は、通常洗浄行程処理の継続実行が行われる。
As shown in FIG. 17, since the process control process exists as a process having a lower priority than the circuit control process, the identifier of the process control process as the process having the second highest priority after the circuit control process is completed. It is stored in the execution process storage unit 1502 instead of the circuit control process identifier (S20).
8). The processing level management unit 1506a compares the priority of the process having the execution identifier with the priority of the process having the latest standby identifier (S204). FIG. 20 shows the execution process storage unit 1502 and the standby process storage unit 150 at this time.
3 is shown. As shown in the figure, since the priority of the process having the execution identifier is equal to the priority of the process having the latest standby identifier, the processing level management unit 1506a extracts the latest standby identifier and stores it in the execution process storage unit 1502. It is stored (S209), and the processing state management unit 1506b is instructed to execute the stroke control process that is a process having the execution identifier. Upon receiving the instruction, the processing state management unit 1506b starts executing the stroke control processing (S205). Since this process was interrupted at the time of the nth timer interrupt, it is continuously executed from the interrupted point. Specifically, the normal cleaning process is continuously executed.

【0099】以後、通常洗浄行程処理の実行中に再びタ
イマ割り込みが発生した場合には、n回目のタイマ割り
込み発生時と同様の動作により再び回路制御処理が行わ
れる。即ち、通常洗浄行程処理の終了前にn+1回目の
タイマ割り込みが発生した場合には、図16のタイミン
グチャートに示されるように回路制御処理が行われ、回
路制御処理の終了後、通常洗浄行程処理が中断時点から
継続実行される。
After that, when a timer interrupt occurs again during execution of the normal cleaning process, the circuit control process is performed again by the same operation as when the nth timer interrupt occurs. That is, when the (n + 1) th timer interrupt occurs before the end of the normal cleaning process, the circuit control process is performed as shown in the timing chart of FIG. 16, and after the circuit control process is completed, the normal cleaning process process is performed. Is continuously executed from the point of interruption.

【0100】さらに、通常洗浄行程処理の終了前にn+
2回目のタイマ割り込みが発生した場合も同様であるの
で、ここでの詳しい説明は省略する。タイマ割り込みの
発生以前に行程制御処理が終了した場合には、図17に
示されるように行程制御処理より優先度の低い処理が存
在しないため、図3へと戻り(S207:No)、マイ
コンシステムによる機器の制御が終了する。
Furthermore, before the end of the normal cleaning process, n +
The same applies when the second timer interrupt occurs, so a detailed description is omitted here. If the stroke control process is completed before the timer interrupt is generated, there is no process with a lower priority than the stroke control process as shown in FIG. 17, and therefore the process returns to FIG. 3 (S207: No), and the microcomputer system returns. The control of the device by is ended.

【0101】なお、本実施の形態においては、回路制御
処理に含まれる処理の実行順序を、ポート入出力処理、
カウンタ処理、リフレッシュ処理、ポート入出力対応処
理の順としたが、実行順序はこれに限定されるものでは
なく、実施の形態に応じて適切な順序で実行することが
可能である。また、モジュールを分割もしくは統合して
同一の処理を行わしめることも可能であり、制御処理モ
ジュール格納部に格納されるモジュールの名称、構成等
についても、本実施の形態の例に限定されるものではな
い。
In the present embodiment, the order of execution of the processes included in the circuit control process is the port input / output process,
Although the order of the counter process, the refresh process, and the port input / output corresponding process has been described, the execution order is not limited to this, and the processes can be executed in an appropriate order according to the embodiment. It is also possible to divide or integrate the modules to perform the same processing, and the names and configurations of the modules stored in the control processing module storage unit are also limited to the example of this embodiment. is not.

【0102】また、本実施の形態では、本発明のリアル
タイム制御方法及び装置の適用例として電子レンジおよ
び食器洗い機の例を示したが、適用可能な機器の種類に
ついては、これらに限定されるものではく、例えば、洗
濯機、テレビ、炊飯器、形態端末等、マイコンシステム
で制御される機器であって、リアルタイム制御の必要な
ものであれば適用は可能である。
Further, in the present embodiment, an example of a microwave oven and a dishwasher is shown as an application example of the real-time control method and device of the present invention, but the types of applicable equipment are not limited to these. However, for example, it is applicable to a device controlled by a microcomputer system, such as a washing machine, a television, a rice cooker, a portable terminal, etc., which requires real-time control.

【0103】[0103]

【発明の効果】請求項1の発明によれば、一種類の非同
期事象の発生に伴う割り込みを利用して、より優先度の
高い処理を起動し、優先度の高い処理の終了後に、中断
された優先度の低い処理を中断時点から再度実行するた
め、優先度の低い処理を所定の周期内に終了するために
分割する必要がなくなり、プログラムの設計、開発が容
易になるという効果がある。
According to the first aspect of the present invention, an interrupt associated with the occurrence of one type of asynchronous event is used to activate a process with a higher priority, and interrupt the process after the process with a higher priority is completed. Since the low-priority processing is re-executed from the interruption point, it is not necessary to divide the low-priority processing to finish it within a predetermined cycle, and there is an effect that the program design and development are facilitated.

【0104】また、同一の優先度を付与された一連の処
理が終了した際に、終了した処理の次に優先度が高い処
理と、中断されている処理の優先度とを比較することに
より一種類の割り込み要因を利用して複数の優先度を持
つ処理の制御を行うことが可能となり、多段階割り込み
可能な回路を使用することによるマイコンシステムの製
造コストの上昇を防げるという効果がある。
When a series of processes having the same priority is completed, the process having the next highest priority after the completed process is compared with the priority of the interrupted process. It is possible to control processing having a plurality of priorities by using different types of interrupt factors, and it is possible to prevent an increase in manufacturing cost of a microcomputer system due to the use of a circuit capable of multistage interrupt.

【0105】請求項2の発明においては、請求項1の発
明による効果に加え、終了した処理よりも優先度の低い
処理が存在しない場合に、機器の制御を終了するなどの
制御を行うことが可能となるという効果がある。請求項
3の発明においては、請求項1または2に記載の発明に
よる効果に加え、リアルタイム性が厳しく要求される処
理を確実に実行できるという効果がある。
In the invention of claim 2, in addition to the effect of the invention of claim 1, when there is no process having a priority lower than that of the completed process, control such as ending the control of the device can be performed. There is an effect that it becomes possible. According to the invention of claim 3, in addition to the effect according to the invention of claim 1 or 2, there is an effect that a process that requires strict real-time property can be surely executed.

【0106】請求項4の発明においては、請求項3の発
明と同様の効果が得られる。請求項5の発明において
は、請求項1乃至4の何れかに記載の発明による効果に
加え、簡易な構成により割り込みを発生させることがで
きるという効果がある。請求項6の発明においては、請
求項5の発明と同様の効果が得られる。
According to the invention of claim 4, the same effect as that of the invention of claim 3 can be obtained. According to the invention of claim 5, in addition to the effect of the invention of any one of claims 1 to 4, there is an effect that an interrupt can be generated with a simple configuration. In the invention of claim 6, the same effect as that of the invention of claim 5 can be obtained.

【0107】請求項7の発明においては、請求項1乃至
6に記載の発明による効果に加え、実行中の処理の識別
子の判別が容易になるという効果がある。請求項8の発
明においては、請求項1乃至7に記載の発明による効果
に加え、複数の優先度を付与された処理の制御を確実に
行えるという効果がある。請求項9の発明においては、
請求項1乃至8に記載の発明による効果を、家電製品等
に備えられるマイコンシステムのように資源の限られた
状況で得ることができるという効果がある。
According to the invention of claim 7, in addition to the effects of the inventions of claims 1 to 6, there is an effect that the identifier of the process being executed can be easily determined. According to the invention of claim 8, in addition to the effects of the inventions of claims 1 to 7, there is an effect that it is possible to reliably control the processing to which a plurality of priorities are assigned. In the invention of claim 9,
The effects of the invention described in claims 1 to 8 can be obtained in a situation where resources are limited, such as a microcomputer system provided for home electric appliances.

【0108】請求項10の発明においては、請求項2の
発明と同様の効果が得られる。
According to the invention of claim 10, the same effect as that of the invention of claim 2 can be obtained.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の第一の実施の形態のリアルタイム制御
装置の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a real-time control device according to a first embodiment of the present invention.

【図2】本発明の第一の実施の形態のリアルタイム制御
装置における制御部の処理内容を示すフローチャートで
ある。
FIG. 2 is a flowchart showing processing contents of a control unit in the real-time control device according to the first embodiment of the present invention.

【図3】本発明の第一の実施の形態のリアルタイム制御
装置の動作を表すフローチャートである。
FIG. 3 is a flowchart showing an operation of the real-time control device according to the first embodiment of the present invention.

【図4】本発明の第一の実施の形態のリアルタイム制御
装置の動作を示すタイミングチャートである。
FIG. 4 is a timing chart showing the operation of the real-time control device according to the first embodiment of the present invention.

【図5】本発明の第一の実施の形態のリアルタイム制御
装置における処理レベル格納部の内容の一例を示す図で
ある。
FIG. 5 is a diagram showing an example of contents of a processing level storage unit in the real-time control device according to the first embodiment of the present invention.

【図6】本発明の第一の実施の形態のリアルタイム制御
装置の動作中における実行処理格納部および待機処理格
納部の内容の一例を示す図である。
FIG. 6 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the first embodiment of the present invention.

【図7】本発明の第一の実施の形態のリアルタイム制御
装置の動作中における実行処理格納部および待機処理格
納部の内容の一例を示す図である。
FIG. 7 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the first embodiment of the present invention.

【図8】本発明の第一の実施の形態のリアルタイム制御
装置の動作中における実行処理格納部および待機処理格
納部の内容の一例を示す図である。
FIG. 8 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the first embodiment of the present invention.

【図9】本発明の第一の実施の形態のリアルタイム制御
装置の動作中における実行処理格納部および待機処理格
納部の内容の一例を示す図である。
FIG. 9 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the first embodiment of the present invention.

【図10】本発明の第一の実施の形態のリアルタイム制
御装置の動作中における実行処理格納部および待機処理
格納部の内容の一例を示す図である。
FIG. 10 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the first embodiment of the present invention.

【図11】本発明の第一の実施の形態のリアルタイム制
御装置の動作中における実行処理格納部および待機処理
格納部の内容の一例を示す図である。
FIG. 11 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the first embodiment of the present invention.

【図12】本発明の第一の実施の形態のリアルタイム制
御装置の動作中における実行処理格納部および待機処理
格納部の内容の一例を示す図である。
FIG. 12 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the first embodiment of the present invention.

【図13】本発明の第二の実施の形態のリアルタイム制
御装置の構成を示すブロック図である。
FIG. 13 is a block diagram showing a configuration of a real-time control device according to a second embodiment of the present invention.

【図14】本発明の第二の実施の形態のリアルタイム制
御装置の動作を示すタイミングチャートである。
FIG. 14 is a timing chart showing the operation of the real-time control device according to the second embodiment of the present invention.

【図15】本発明の第三の実施の形態のリアルタイム制
御装置の構成を示すブロック図である。
FIG. 15 is a block diagram showing a configuration of a real-time control device according to a third embodiment of the present invention.

【図16】本発明の第三の実施の形態のリアルタイム制
御装置の動作を示すタイミングチャートである。
FIG. 16 is a timing chart showing the operation of the real-time control device according to the third embodiment of the present invention.

【図17】本発明の第三の実施の形態のリアルタイム制
御装置における処理レベル格納部の内容の一例を示す図
である。
FIG. 17 is a diagram showing an example of contents of a processing level storage unit in the real-time control device according to the third embodiment of the present invention.

【図18】本発明の第三の実施の形態のリアルタイム制
御装置の動作中における実行処理格納部および待機処理
格納部の内容の一例を示す図である。
FIG. 18 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the third embodiment of the present invention.

【図19】本発明の第三の実施の形態のリアルタイム制
御装置の動作中における実行処理格納部および待機処理
格納部の内容の一例を示す図である。
FIG. 19 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the third embodiment of the present invention.

【図20】本発明の第三の実施の形態のリアルタイム制
御装置の動作中における実行処理格納部および待機処理
格納部の内容の一例を示す図である。
FIG. 20 is a diagram showing an example of contents of an execution process storage unit and a standby process storage unit during operation of the real-time control device according to the third embodiment of the present invention.

【図21】従来のリアルタイム制御方法である「ループ
法」の、処理内容を示すフロ−チャ−トである。
FIG. 21 is a flowchart showing the processing contents of a conventional “loop method” which is a real-time control method.

【図22】「ループ法」におけるシーケンス制御処理の
詳細な処理内容を示すフロ−チャ−トである。
FIG. 22 is a flowchart showing detailed processing contents of sequence control processing in the “loop method”.

【符号の説明】[Explanation of symbols]

101 制御処理モジュール格納部 101a 行程制御処理モジュール格納部 101b 優先回路制御処理モジュール格納部 101c 通常回路制御処理モジュール格納部 102 実行処理格納部 103 待機処理格納部 104 処理レベル格納部 105 処理切り換え要求部 106 制御部 106a 処理レベル管理部 106b 処理状態管理部 1301 制御処理モジュール格納部 1301a 行程制御処理モジュール格納部 1301b 優先回路制御処理モジュール格納部 1301c 通常回路制御処理モジュール格納部 1302 実行処理格納部 1303 待機処理格納部 1304 処理レベル格納部 1305 処理切り換え要求部 1306 制御部 1306a 処理レベル管理部 1306b 処理状態管理部 1501 制御処理モジュール格納部 1501a 行程制御処理モジュール格納部 1501b 回路制御処理モジュール格納部 1502 実行処理格納部 1503 待機処理格納部 1504 処理レベル格納部 1505 処理切り換え要求部 1506 制御部 1506a 処理レベル管理部 1506b 処理状態管理部 101 Control Processing Module Storage Unit 101a Process Control Processing Module Storage Unit 101b Priority Circuit Control Processing Module Storage Unit 101c Normal Circuit Control Processing Module Storage Unit 102 Execution Process Storage Unit 103 Standby Processing Storage Unit 104 Processing Level Storage Unit 105 Process Switching Request Unit 106 Control unit 106a Processing level management unit 106b Processing state management unit 1301 Control processing module storage unit 1301a Process control processing module storage unit 1301b Priority circuit control processing module storage unit 1301c Normal circuit control processing module storage unit 1302 Execution processing storage unit 1303 Standby processing storage Unit 1304 Processing level storage unit 1305 Processing switching request unit 1306 Control unit 1306a Processing level management unit 1306b Processing state management unit 1501 Control processing module storage unit 1 501a Process control processing module storage section 1501b Circuit control processing module storage section 1502 Execution processing storage section 1503 Standby processing storage section 1504 Processing level storage section 1505 Processing switching request section 1506 Control section 1506a Processing level management section 1506b Processing state management section

───────────────────────────────────────────────────── フロントページの続き (72)発明者 眞田 紀男 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 安武 剛一 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 田中 裕彦 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 伊藤 謙次 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 内山 亘 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 (72)発明者 石崎 恵美子 大阪府門真市大字門真1006番地 松下電器 産業株式会社内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Norio Sanada 1006 Kadoma, Kadoma City, Osaka Prefecture Matsushita Electric Industrial Co., Ltd. (72) Inventor Goichi Abu 1006, Kadoma, Kadoma City, Osaka Prefecture 72) Inventor Hirohiko Tanaka 1006, Kadoma, Kadoma-shi, Osaka Prefecture Matsushita Electric Industrial Co., Ltd. (72) Inventor Kenji Ito Osaka, Kadoma City 1006 Kadoma, Matsushita Electric Industrial Co., Ltd. 1006 Kadoma, Kadoma-shi, Matsushita Electric Industrial Co., Ltd. (72) Inventor, Emiko Ishizaki 1006 Kadoma, Kadoma-shi, Osaka Prefecture Matsushita Electric Industrial Co., Ltd.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】 所定の周期ごとに発生する一種類の割り
込み要因による割り込みを利用して、機器の制御を行う
マイコンシステムにおけるリアルタイム制御装置であっ
て、 前記所定の周期内に終了するようにプログラムされた最
も優先度の高い処理と、それ以外の優先度を持つ処理と
について、処理の識別子と優先度とを記憶する処理優先
度記憶手段と、 実行中の処理の識別子を記憶する実行処理記憶手段と、 実行が中断された処理の識別子と中断時の処理の状況を
示す情報とを順次記憶する待機処理記憶手段と、 前記割り込みの発生を受けて、処理切り換え要求を出力
する処理切り換え要求手段と、 前記処理切り換え要求を受けて、実行中の処理を中断
し、最も高い優先度を付与された処理の実行を開始する
とともに、前記実行処理記憶手段および前記待機処理記
憶手段の内容を更新する第1の制御手段と、 処理の終了を検知したときに、終了した処理の次に優先
度が高い処理の優先度と、前記待機処理記憶手段に最後
に記憶された識別子を有する処理の優先度とを比較する
比較手段と、 前記比較手段の比較において、前者の方が高い場合に、
前者の処理の実行を開始するとともに、前記実行処理記
憶手段の内容を更新する第2の制御手段と、 前記比較手段の比較において、前者の方が低いか、また
は両者の優先度が等しい場合に、後者の処理を、前記待
機処理記憶手段に記憶された中断時の処理の状況を示す
情報に基づいて中断時点から再開するとともに、前記実
行処理記憶手段および前記待機処理記憶手段の内容を更
新する第3の制御手段とを有することを特徴とするリア
ルタイム制御装置。
1. A real-time control device in a microcomputer system for controlling a device by using an interrupt caused by one kind of interrupt factor generated at a predetermined cycle, and a program for ending the program within the predetermined cycle. Processing priority storing means for storing processing identifiers and priorities for the processed highest priority processing and processings having other priorities, and execution processing storage for storing the identifier of the processing being executed. Means, standby processing storage means for sequentially storing the identifier of the processing whose execution has been interrupted and information indicating the status of the processing at the time of interruption, and processing switching request means for outputting a processing switching request in response to the occurrence of the interrupt. And receiving the process switching request, interrupting the process being executed, starting execution of the process assigned the highest priority, and storing the execution process storage A first control means for updating the contents of the stage and the standby processing storage means; and when the end of the processing is detected, the priority of the processing having the second highest priority after the completed processing and the standby processing storage means Comparing means for comparing the priority of the process with the last stored identifier, and in the comparison of the comparing means, when the former is higher,
In the comparison between the second control means for starting the execution of the former processing and updating the contents of the execution processing storage means, and the comparison means, when the former is lower or the priority of both is equal. , The latter process is restarted from the point of interruption based on the information indicating the status of the process at the time of interruption stored in the standby process storage unit, and the contents of the execution process storage unit and the standby process storage unit are updated. A real-time control device comprising: a third control means.
【請求項2】 前記リアルタイム制御装置はさらに、 処理の終了を検知したときに、前記処理優先度記憶手段
の内容を参照し、終了した処理より優先度の低い処理が
存在するか否かを判定する判定手段を有し、 前記比較手段は、 前記判定手段により存在すると判定された場合に、終了
した処理の次に優先度が高い処理の優先度と、前記待機
処理記憶手段に最後に記憶された識別子を有する処理の
優先度とを比較することを特徴とする請求項1記載のリ
アルタイム制御装置。
2. The real-time control device further refers to the contents of the process priority storage means when detecting the end of the process, and determines whether or not there is a process having a lower priority than the completed process. The comparing unit stores the priority of the process having the second highest priority next to the process that has ended and the last storing process in the standby process storing unit when the comparing unit determines that the process exists. The real-time control device according to claim 1, wherein the priority of the process having the identified identifier is compared.
【請求項3】 前記機器の制御を行う処理は、 制御の内容により2段階の優先度に分類され、 優先度が高い方に分類された処理が、リアルタイム性が
厳しく要求される処理を含み、 優先度が低い方に分類された処理が、それ以外の処理を
含むことを特徴とする請求項1または2記載のリアルタ
イム制御装置。
3. The process for controlling the device is classified into two levels of priority according to the content of the control, and the process classified into the higher priority includes a process requiring strict real-time processing, The real-time control device according to claim 1 or 2, wherein the processing classified into the one with lower priority includes other processing.
【請求項4】 前記機器の制御を行う処理は、 制御の内容により3段階の優先度に分類され、 最も優先度が高いと分類された処理が、ポートとの入出
力処理と、タイマの計時の際の基本単位となるカウンタ
のインクリメント処理とを含み、 次に優先度が高いと分類された処理が、タイマの計時処
理と、ポート出力のリフレッシュ処理と、ポートから入
力されたデータに対して施す必要のある処理と、ポート
へ出力するデータを作成する処理とを含むことを特徴と
する請求項1または2記載のリアルタイム制御装置。
4. The process for controlling the device is classified into three priority levels according to the control content, and the process classified as the highest priority is the input / output process with the port and the timer timing. Including the increment process of the counter which is the basic unit in the case of, the process classified as the next highest priority is the timer timing process, the port output refresh process and the data input from the port. 3. The real-time control device according to claim 1, further comprising a process that needs to be performed and a process that creates data to be output to a port.
【請求項5】 前記処理切り換え要求手段は、 タイマ割り込みを受けて処理切り換え要求を出力するこ
とを特徴とする請求項1乃至4の何れかに記載のリアル
タイム制御装置。
5. The real-time control device according to claim 1, wherein the processing switching requesting means outputs a processing switching request in response to a timer interrupt.
【請求項6】 前記リアルタイム制御装置はさらに、 交流電源電圧の周期を検知することにより、割り込みを
発生する割り込み発生手段を備えることを特徴とする請
求項1乃至4に何れかに記載のリアルタイム制御装置。
6. The real-time control device according to claim 1, further comprising an interrupt generation unit that generates an interrupt by detecting a cycle of an AC power supply voltage. apparatus.
【請求項7】 前記第1の制御手段は、 前記実行処理格納手段の内容に、最も高い優先度を付与
された処理の識別子を上書きすることを特徴とする請求
項1乃至6の何れかに記載のリアルタイム制御装置。
7. The method according to claim 1, wherein the first control unit overwrites the content of the execution process storage unit with the identifier of the process having the highest priority. The real-time control device described.
【請求項8】 前記待機処理格納手段は、 スタック構造を有し、 前記第1の制御手段は、 前記待機処理格納手段に、中断された処理の識別子と中
断時の処理の状況を示す情報とを追加することを特徴と
する請求項1乃至7の何れかに記載のリアルタイム制御
装置。
8. The standby processing storage means has a stack structure, and the first control means stores in the standby processing storage means an identifier of the interrupted processing and information indicating a status of the processing at the time of interruption. The real-time control device according to any one of claims 1 to 7, further comprising:
【請求項9】 前記リアルタイム制御装置は、 家電製品の制御を行うマイコンシステムに備えられるこ
とを特徴とする請求項1乃至8の何れかに記載のリアル
タイム制御装置。
9. The real-time control device according to claim 1, wherein the real-time control device is provided in a microcomputer system that controls a home electric appliance.
【請求項10】 所定の周期ごとに発生する一種類の割
り込み要因による割り込みを利用して、機器の制御を行
うマイコンシステムにおけるリアルタイム制御方法であ
って、 前記割り込みの発生を受けて、処理切り換え要求を出力
する処理切り換え要求ステップと、 前記処理切り換え要求を受けて、実行中の処理を中断
し、最も優先度の高い処理の実行を開始する第1の実行
ステップと、 処理の終了を検知したときに、終了した処理より優先度
の低い処理が存在する場合に、終了した処理の次に優先
度が高い処理の優先度と、最近に中断された処理の優先
度とを比較する比較ステップと、 前記比較ステップにおいて、前者の方が高い場合に、前
者の処理の実行を開始する第2の実行ステップと、 前記比較ステップにおいて、前者の方が低いか、または
両者の優先度が等しい場合に、後者の処理を中断時点か
ら再開する第3の実行ステップとを有することを特徴と
するリアルタイム制御方法。
10. A real-time control method in a microcomputer system for controlling a device by utilizing an interrupt caused by one type of interrupt factor generated in a predetermined cycle, wherein a process switching request is received in response to the occurrence of the interrupt. And a first execution step of interrupting the process being executed and starting the execution of the process having the highest priority in response to the process switching request, and when the end of the process is detected. In the case where there is a process having a lower priority than the completed process, a comparison step of comparing the priority of the process having the next highest priority with the completed process and the priority of the process that was interrupted recently, A second execution step of starting execution of the former process when the former is higher in the comparing step, and the former is lower in the comparing step Or when both priority are equal, real-time control method characterized by having a third execution step resumes latter processes from the point of interruption.
JP3203896A 1996-02-20 1996-02-20 Real-time control device and method therefor Pending JPH09223025A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3203896A JPH09223025A (en) 1996-02-20 1996-02-20 Real-time control device and method therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3203896A JPH09223025A (en) 1996-02-20 1996-02-20 Real-time control device and method therefor

Publications (1)

Publication Number Publication Date
JPH09223025A true JPH09223025A (en) 1997-08-26

Family

ID=12347708

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3203896A Pending JPH09223025A (en) 1996-02-20 1996-02-20 Real-time control device and method therefor

Country Status (1)

Country Link
JP (1) JPH09223025A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100337083B1 (en) * 2000-05-18 2002-05-16 송재인 Programmer's External Equipment Control Method
JP2003296133A (en) * 2002-04-05 2003-10-17 Fuji Electric Co Ltd Controller
CN105159217A (en) * 2015-08-31 2015-12-16 南京福瑞德机电科技有限公司 Control system of window cleaning machine

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100337083B1 (en) * 2000-05-18 2002-05-16 송재인 Programmer's External Equipment Control Method
JP2003296133A (en) * 2002-04-05 2003-10-17 Fuji Electric Co Ltd Controller
CN105159217A (en) * 2015-08-31 2015-12-16 南京福瑞德机电科技有限公司 Control system of window cleaning machine

Similar Documents

Publication Publication Date Title
JP2762670B2 (en) Data processing device
KR950005217B1 (en) Clock signal control method and data processing system
US6327653B1 (en) Technique for easily changing operating systems of a digital computer system using at least two pushbuttons
JP2003050571A (en) Method and apparatus for updating display frame buffer
JP2001331242A (en) Information processor and method for controlling its power consumption
JPH09223025A (en) Real-time control device and method therefor
CN105496331A (en) Dish washer and control method thereof
JPH0844594A (en) Data processor
JP2003296133A (en) Controller
KR100626361B1 (en) Computer system including multi operating system and method for changing into other operating system without reboot of the same
US5704136A (en) Drying operation adjusting method for washing machine
JP3758477B2 (en) Microcomputer
JP3603752B2 (en) Display with control function
JP2000076081A (en) Task manager and program recording medium
JPH0689121A (en) Information processor facilitating change of using environment
JPH10143274A (en) Clock controller for cpu
JPH11184828A (en) Test system for multiprocessor system
JPH076155A (en) Single chip microcomputer
JP2002333946A (en) Programmable display unit
JPS62293331A (en) Data processor
JPH06337739A (en) Computer system
JP2002229663A (en) Information processor
JP2000122900A (en) Method for monitoring runaway for microcontroller
JP2010165209A (en) Multi-thread processor system
JPH10283219A (en) Information processor start system