JP6787658B2 - Processing equipment, traffic signal equipment and information display equipment - Google Patents
Processing equipment, traffic signal equipment and information display equipment Download PDFInfo
- Publication number
- JP6787658B2 JP6787658B2 JP2015204139A JP2015204139A JP6787658B2 JP 6787658 B2 JP6787658 B2 JP 6787658B2 JP 2015204139 A JP2015204139 A JP 2015204139A JP 2015204139 A JP2015204139 A JP 2015204139A JP 6787658 B2 JP6787658 B2 JP 6787658B2
- Authority
- JP
- Japan
- Prior art keywords
- task
- monitored
- processing
- tasks
- watchdog timer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000012544 monitoring process Methods 0.000 claims description 45
- 230000005856 abnormality Effects 0.000 claims description 35
- 238000000034 method Methods 0.000 claims description 24
- 230000008569 process Effects 0.000 claims description 24
- 230000036541 health Effects 0.000 description 11
- 238000001514 detection method Methods 0.000 description 9
- 238000010586 diagram Methods 0.000 description 8
- 230000004913 activation Effects 0.000 description 6
- 230000002159 abnormal effect Effects 0.000 description 5
- 238000013500 data storage Methods 0.000 description 4
- 238000012423 maintenance Methods 0.000 description 2
- 238000003672 processing method Methods 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
Landscapes
- Safety Devices In Control Systems (AREA)
- Debugging And Monitoring (AREA)
Description
本発明は、複数のタスクが並列的に実行されるマルチタスク処理を行う処理装置、並びに、これを用いた交通信号装置及び情報表示装置に関するものである。 The present invention relates to a processing device that performs multitasking processing in which a plurality of tasks are executed in parallel, and a traffic signal device and an information display device using the same.
従来から、CPUやMPUなどによる処理装置のプログラムの暴走等の異常を検出するため、一般的に、ウォッチドッグタイマが用いられている。前記処理装置は、プログラムの暴走等がなく正常である場合には、前記ウォッチドッグタイマをリセットするウォッチドッグタイマクリア信号を所定周期で発生し、プログラムの暴走等の異常が生ずると、ウォッチドッグタイマクリア信号を発生しないようになっている。 Conventionally, a watchdog timer has been generally used in order to detect an abnormality such as a runaway of a program of a processing device by a CPU, an MPU, or the like. The processing device generates a watchdog timer clear signal for resetting the watchdog timer at a predetermined cycle when the program is normal without runaway, and when an abnormality such as program runaway occurs, the watchdog timer is generated. It is designed not to generate a clear signal.
例えば、下記特許文献1に開示された交通信号灯器を制御する交通信号制御機では、ウォッチドッグタイマを利用してMPUの異常を検出している。この交通信号制御機では、MPUと信号制御用LSIが存在して、通常時はMPUが信号制御用LSIを経由して信号制御を行って、MPU異常が発生した場合は、MPUをHALT状態にして信号制御LSIのみで信号制御を行うようになっている。
For example, in the traffic signal controller that controls the traffic signal lamp disclosed in
近年のCPUやMPUなどによる処理装置では、複数のタスクが並列的に実行されるマルチタスク処理方式が採用されてきている。 In recent years, processing devices such as CPUs and MPUs have adopted a multitasking processing method in which a plurality of tasks are executed in parallel.
このようなマルチタスク処理方式において、複数のタスクを周期的に起動させて実行させる場合、それらのタスクのうちの1つとして、周期的にウォッチドッグタイマクリア信号を出力させるタスク(ウォッチドッグタイマクリアタスク)を行うとすれば、他のタスクに異常動作が生じても、ウォッチドッグタイマクリアタスクが正常に動作すれば、周期的にウォッチドッグタイマクリア信号が出力されてしまい、当該処理装置の異常を検出することができない。 In such a multitasking processing method, when a plurality of tasks are periodically started and executed, one of the tasks is a task that periodically outputs a watchdog timer clear signal (watchdog timer clear). If the task) is performed, even if an abnormal operation occurs in another task, if the watchdog timer clear task operates normally, the watchdog timer clear signal will be output periodically, and the processing device will be abnormal. Cannot be detected.
本発明は、このような事情に鑑みてなされたもので、各々が周期的に起動される複数のタスクが並列的に実行されるマルチタスク処理を行う処理装置であってより適切に異常を検出することができる処理装置、並びに、これを用いた交通信号装置及び情報表示装置を提供することを目的とする。 The present invention has been made in view of such circumstances, and is a processing device that performs multitask processing in which a plurality of tasks, each of which is started periodically, are executed in parallel, and detects an abnormality more appropriately. It is an object of the present invention to provide a processing device capable of the above, and a traffic signal device and an information display device using the processing device.
前記課題を解決するための手段として、以下の各態様を提示する。第1の態様による処理装置は、各々が周期的に起動される複数のタスクが並列的に実行されるマルチタスク処理を行う処理装置であって、前記複数のタスクは、監視対象となる1つ以上の監視対象タスクと、前記1つ以上の監視対象タスクの監視を所定周期毎に行う監視タスクとを含み、前記1つ以上の監視対象タスクは、自身のタスクに対応する保持部に所定情報を所定周期毎に保持させる処理を含み、前記監視タスクは、前記1つ以上の監視対象タスクに対応する前記保持部に保持されている情報に基づいて、前記1つ以上の監視対象タスクのうちの少なくとも1つの監視対象タスクが所定時間以上正常に動作していない状態であるか否かを判定する処理を含み、前記監視タスクによって前記状態であると判定された場合に、それ以後のウォッチドッグタイマクリア信号の出力を停止する一方で、前記監視タスクによって前記状態ではないと判定された場合に、それ以後のウォッチドッグタイマクリア信号の定期的な出力を行うものである。 The following aspects are presented as means for solving the above problems. The processing device according to the first aspect is a processing device that performs multitasking processing in which a plurality of tasks, each of which is periodically started, are executed in parallel, and the plurality of tasks are one to be monitored. The above-mentioned monitored task and the monitoring task that monitors the one or more monitored tasks at predetermined intervals are included, and the one or more monitored tasks have predetermined information in a holding unit corresponding to their own task. Is included in each predetermined cycle, and the monitoring task is among the one or more monitored tasks based on the information held in the holding unit corresponding to the one or more monitored tasks. Includes a process of determining whether or not at least one of the monitored tasks in the above is in a state of not operating normally for a predetermined time or longer, and when the monitoring task determines that the state is in the above state, the watchdog thereafter. While the output of the timer clear signal is stopped, when it is determined by the monitoring task that the state is not the above state, the watchdog timer clear signal thereafter is periodically output.
この第1の態様によれば、1つ以上の監視対象タスクは、自身のタスクに対応する保持部に、所定情報を所定周期毎に保持させる処理を含んでいるので、当該監視対象タスクが正常に動作すれば、前記保持部に前記所定情報が保持されることになる。監視タスクは、前記1つ以上の監視対象タスクに対応する前記保持部に保持されている情報に基づいて、少なくとも1つの監視対象タスクが所定時間以上正常に動作していない状態であるか否かを判定する処理を含んでいる。そして、前記監視タスクによって前記状態であると判定された場合に、それ以後のウォッチドッグタイマクリア信号の出力が停止される一方で、前記監視タスクによって前記状態ではないと判定された場合に、それ以後のウォッチドッグタイマクリア信号の定期的な出力が行われる。 According to this first aspect, since one or more monitored tasks include a process of holding predetermined information in a holding unit corresponding to its own task at predetermined intervals, the monitored task is normal. If the above operation is performed, the predetermined information is held in the holding unit. The monitoring task is based on whether or not at least one monitoring target task is not operating normally for a predetermined time or longer based on the information held in the holding unit corresponding to the one or more monitoring target tasks. Includes processing to determine. Then, when the monitoring task determines that the state is the same, the subsequent output of the watchdog timer clear signal is stopped, while the monitoring task determines that the state is not the state. Subsequent periodic output of the watchdog timer clear signal is performed.
したがって、前記第1の態様によれば、各監視対象タスクが正常に動作しているか否かが監視タスクによって監視され、監視対象タスクが正常に動作していれば、ウォッチドッグタイマクリア信号が定期的に出力される一方で、いずれかの監視対象タスクが正常に動作していない場合には、ウォッチドッグタイマクリア信号の出力が停止される。このため、前記第1の態様によれば、各々が周期的に起動される複数のタスクが並列的に実行されるマルチタスク処理を行うにも拘わらず、より適切に異常を検出することができる。 Therefore, according to the first aspect, whether or not each monitored task is operating normally is monitored by the monitoring task, and if the monitored task is operating normally, the watchdog timer clear signal is periodically issued. On the other hand, if any of the monitored tasks is not operating normally, the output of the watchdog timer clear signal is stopped. Therefore, according to the first aspect, the abnormality can be detected more appropriately even though the multitasking process in which a plurality of tasks, each of which is periodically started, is executed in parallel is performed. ..
第2の態様による処理装置は、前記第1の態様において、前記監視タスクは、前記少なくとも1つの監視対象タスクの各々について、当該監視タスクの起動時に当該監視対象タスクに対応する前記保持部に保持されている情報が前記所定情報である場合には、当該監視対象タスクに対応する前記保持部に前記所定情報と異なる情報を保持させる処理を含むものである。 In the first aspect, the processing device according to the second aspect holds, for each of the at least one monitored task, in the holding unit corresponding to the monitored task when the monitored task is started. When the information is the predetermined information, the process includes a process of causing the holding unit corresponding to the monitored task to hold information different from the predetermined information.
この第2の態様は、監視対象タスクの動作状況を示す情報のいわばリセット動作を明示したものである。 In this second aspect, the so-called reset operation of the information indicating the operation status of the monitored task is clarified.
第3の態様による処理装置は、前記第1又は第2の態様において、前記ウォッチドッグタイマクリア信号に基づいて前記処理装置の異常を検出するウォッチドッグタイマを備えたものである。 The processing device according to the third aspect includes the watchdog timer that detects an abnormality of the processing device based on the watchdog timer clear signal in the first or second aspect.
第4の態様による交通信号装置は、交通信号灯器と、前記第1乃至第3のいずれかの態様による処理装置と、前記処理装置の制御下で又は自律的に、前記交通信号灯器を制御する制御回路と、を備えたものである。 The traffic signal device according to the fourth aspect controls the traffic signal light device, the processing device according to any one of the first to third aspects, and the traffic signal light device under the control of the processing device or autonomously. It is equipped with a control circuit.
第5の態様による情報表示装置は、表示パネルと、前記第1乃至第3のいずれかの態様による処理装置と、前記処理装置の制御下で又は自律的に、前記表示パネルを制御する制御回路と、を備えたものである。 The information display device according to the fifth aspect is a display panel, a processing device according to any one of the first to third aspects, and a control circuit that controls the display panel under the control of the processing device or autonomously. And, it is equipped with.
前記第4及び第5の態様は前記第1乃至第3の態様による処理装置の使用例をあげたものであるが、前記第1乃至第3の態様では、それらの例に限定されるものではない。 The fourth and fifth aspects give examples of use of the processing apparatus according to the first to third aspects, but the first to third aspects are not limited to those examples. Absent.
本発明によれば、各々が周期的に起動される複数のタスクが並列的に実行されるマルチタスク処理を行う処理装置であってより適切に異常を検出することができる処理装置、並びに、これを用いた交通信号装置及び情報表示装置を提供することができる。 According to the present invention, a processing device that performs multitasking processing in which a plurality of tasks, each of which is started periodically, is executed in parallel, and is capable of detecting an abnormality more appropriately, and a processing device thereof. It is possible to provide a traffic signal device and an information display device using the above.
以下、本発明による処理装置、交通信号装置及び情報表示装置について、図面を参照して説明する。 Hereinafter, the processing device, the traffic signal device, and the information display device according to the present invention will be described with reference to the drawings.
[第1の実施の形態] [First Embodiment]
図1は、本発明の第1の実施の形態による処理装置1の概略構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of a
本発明による処理装置1は、マイクロコンピュータ2と、ウォッチドッグタイマ3とを備えている。マイクロコンピュータ2は、CPU11と、ROM12と、RAM13と、EEPROM等の不揮発性メモリ14と、入出力インターフェース15と、これらを相互に接続するバス16とを有している。入出力インターフェース15には、必要に応じて周辺機器等が接続されるが、その図示は省略している。
The
ウォッチドッグタイマ3は、プログラムの暴走等がなくCPU11が正常に動作する場合には、後述するようにCPU11から周期的にウォッチドッグクリア信号を受け、そのウォッチドッグクリア信号を一定期間受けなくなった場合には、CPU11に異常が生じたことを示す異常検出信号を出力する。本実施の形態では、ウォッチドッグタイマ3からの異常検出信号は、CPU11をリセットするリセット信号として用いられている。もっとも、その異常検出信号によって、マイクロコンピュータ2の電源切断によるシステムの強制停止、あるいは電源切断後の再投入等を行うようにしてもよいし、単に異常を表示装置に表示させたり、他の管理機器に異常状態を通知するために用いたりしてもよい。なお、本実施の形態では、ウォッチドッグタイマ3は、マイクロコンピュータ2の外部に設けられているが、マイクロコンピュータ2に内蔵してもよい。
When the
図2は、図1に示す処理装置1におけるOS(オペレーティングシステム)20とタスク21−1〜21−n,22との関係を模式的に示す図である。ROM12にはOS20や所望の処理プログラムが格納されており、マイクロコンピュータ2が起動されると、OS20は、前記処理プログラムを適当な処理単位に分割したn個(nは2以上の整数)のタスク21−1〜21−nと、監視タスク22とを設定し、これらのタスク21−1〜21−n,22を管理してCPU11に実行させる。
FIG. 2 is a diagram schematically showing the relationship between the OS (operating system) 20 and tasks 21-1 to 21-n, 22 in the
本実施の形態では、OS20の管理下で、タイマ(図示せず)による割り込み等を利用して、各々が周期的に起動されるタスク21−1〜21−n,22が並列的に実行されるマルチタスク処理が実現される。本実施の形態では、タスク21−1は周期T1で起動され、タスク21−2は周期T2で起動され、・・・、タスク21−nは周期Tnで起動され、監視タスク22は周期T0で起動される。周期T1〜Tn,T0は互いに異なっていてもよいし、一部の周期が互いに異なるとともに一部の周期が互いに同一でもよいし、全部の周期が同一でもよい。例えば、n=5の場合、T1=100ミリ秒、T2=200ミリ秒、T3=100ミリ秒、T4=100ミリ秒、T5=500ミリ秒、T0=1秒とすることができる。
In the present embodiment, under the control of the
n個のタスク21−1〜21−nのうちの1つ以上のタスクが、正常に動作しているか否かの監視対象となる監視対象タスクとして予め設定されている。n個のタスク21−1〜21−nの全部を監視対象タスクとしてもよいし、そのうちの任意の一部のタスクのみを監視対象タスクとしてもよい。監視タスク22は、周期T0で起動され、監視対象タスクの監視を所定周期T0毎に行う。監視タスク22の処理内容は後に詳述する。
One or more of the n tasks 21-1 to 21-n are preset as monitored tasks to be monitored whether or not they are operating normally. All of the n tasks 21-1 to 21-n may be monitored tasks, or only any part of the tasks may be monitored tasks. The
図3は、監視タスク22で用いられるデータの構成の一例を模式的に示す図である。本実施の形態では、監視タスク22において、予め定められた最大タスク数(例えば、256個)の各々のタスクを識別するためのタスクIDと、各タスクIDにそれぞれ関連づけられ各タスクID毎に設けられたタスク起動番号、アライブチェックフラグF、ヘルスチェックカウント値C及びタスク名が、データとして用いられる。
FIG. 3 is a diagram schematically showing an example of the data configuration used in the
タスク起動番号は、当該タスクが監視対象であるか否かを示す番号であり、0であれば、当該タスクがn個のタスク21−1〜21−nのいずれでもなく実際には存在しないタスクであるか、あるいは、n個のタスク21−1〜21−nのいずれかであっても当該タスクは監視対象ではないことを示す。当該タスクがn個のタスク21−1〜21−nのうちの監視対象とされるタスクであれば、当該タスクのタスク起動番号は、0以外の番号とされる。タスク名は、後述するログの作成等に用いられるものである。本実施の形態では、タスクID、タスク起動番号及びタスク名は、予め定められ、後述する動作では書き換えられない。一方、アライブチェックフラグFは当該タスクに関する後述の動作で書き換えられるフラグであり、ヘルスチェックカウント値Cは当該タスクに関する後述の動作で書き換えられるカウント値である。 The task start number is a number indicating whether or not the task is to be monitored, and if it is 0, the task is neither of n tasks 21-1 to 21-n and does not actually exist. Or, even if any of n tasks 21-1 to 21-n, the task is not a monitoring target. If the task is a task to be monitored among n tasks 21-1 to 21-n, the task activation number of the task is a number other than 0. The task name is used for creating a log, which will be described later. In the present embodiment, the task ID, the task activation number, and the task name are predetermined and cannot be rewritten by the operation described later. On the other hand, the alive check flag F is a flag rewritten by the operation described later for the task, and the health check count value C is a count value rewritten by the operation described later for the task.
なお、本実施の形態では、タスクID毎のタスク起動番号及びタスク名は、設定情報として不揮発性メモリ14内に格納されており、マイクロコンピュータ2の起動時に不揮発性メモリ14からRAM13の所定のデータ領域に読み出される。各タスクID毎のアライブチェックフラグF及びヘルスチェックカウント値Cは、マイクロコンピュータ2の起動時にRAM13の所定のデータ領域に設定される。これにより、マイクロコンピュータ2が起動すると、RAM13内に、タスクID毎に図3に示すデータが格納されることになる。本実施の形態では、RAM13内のアライブチェックフラグFの記憶領域が、アライブチェックフラグFを保持する保持部を構成している。なお、マイクロコンピュータ2の起動時に、各タスクのアライブチェックフラグFは0に初期設定され、各タスクのヘルスチェックカウント値Cは後述する所定値Cmaxに初期設定される。
In the present embodiment, the task activation number and the task name for each task ID are stored in the
図4は、図1に示す処理装置1において監視対象タスクで所定周期毎に行われる処理を示す概略フローチャートである。本実施の形態では、各監視対象タスクは、自身のタスクで行う本来の処理(前記処理プログラムに基づいて定められた本来の処理)の他に、各監視対象タスク毎に設定された所定周期毎に各監視対象タスクで呼び出されるサブルーチンの処理として、自身のタスクのアライブチェックフラグFを1にセットする処理を行う。したがって、当該監視対象タスクがこの時点で正常に動作していれば、自身のタスクのアライブチェックフラグFが1にセットされ、当該監視対象タスクの動作がこの時点で異常であれば、自身のタスクのアライブチェックフラグFを1にセットすることができなくなる。
FIG. 4 is a schematic flowchart showing processing performed at predetermined intervals in the monitored task in the
例えば、タスク21−1が監視対象タスクであれば、タスク21−1において、タスク21−1が周期T1で起動される度に毎回前記サブルーチンを呼び出して、自身のタスク21−1のアライブチェックフラグFを1にセットする処理を行う。この場合、タスク21−1において、所定周期T1で、自身のタスク21−1のアライブチェックフラグFを1にセットする処理が行われることになる。これに限らず、タスク21−1において、タスク21−1が周期T1で起動される度(回)のうちm回(mは2以上の整数)に1回の割合で前記サブルーチンを呼び出して、自身のタスク21−1のアライブチェックフラグFを1にセットする処理を行ってもよい。この場合、タスク21−1において、所定周期m×T1で、自身のタスク21−1のアライブチェックフラグFを1にセットする処理が行われることになる。これらの点は、他のタスク21−2〜21−nのいずれかが監視対象タスクである場合も同様である。 For example, if task 21-1 is a monitored task, the subroutine is called every time task 21-1 is started in cycle T1 in task 21-1, and the alive check flag of own task 21-1 is called. The process of setting F to 1 is performed. In this case, in the task 21-1, the process of setting the alive check flag F of the own task 21-1 to 1 is performed in the predetermined cycle T1. Not limited to this, in task 21-1, the subroutine is called at a rate of once every m times (m is an integer of 2 or more) out of every time (times) when task 21-1 is started in cycle T1. A process of setting the alive check flag F of the own task 21-1 to 1 may be performed. In this case, in the task 21-1, the process of setting the alive check flag F of the own task 21-1 to 1 is performed in the predetermined cycle m × T1. These points are the same when any of the other tasks 21-2 to 21-n is a monitored task.
図5は、図1に示す処理装置1における監視タスク22の処理内容を示す概略フローチャートである。本実施の形態では、監視タスク22は、前述したように周期T0で起動される度に毎回、図5に示す処理を行う。
FIG. 5 is a schematic flowchart showing the processing contents of the
監視タスク22が起動されると、CPU11は、ウォッチドッグタイマクリア信号(WDTクリア信号)を出力する(ステップS1)。その後、CPU11は、ループ開始端R1でそれ以降の処理の対象となるタスクを最大タスク数のタスク(前記タスクIDが付与されている全てのタスク)まで順次変更しながら、ループ開始端R1以降の処理を行う。
When the
CPU11は、ループ開始端R1で処理対象となるタスク(タスクID)が設定されると、RAM13内の当該タスクのタスク起動番号を参照して、当該タスクが監視対象タスクであるか否かを判定し(ステップS2)、当該タスクが監視対象タスクでなければ(タスク起動番号が0であれば)ループ開始端R1に戻る一方、当該タスクが監視対象タスクであれば(タスク起動番号が0でなければ)ステップS3へ移行する。
When the task (task ID) to be processed is set at the loop start end R1, the
ステップS3において、CPU11は、ループ開始端R1で現在処理対象として設定されているタスクのアライブチェックフラグFが1である(すなわち、当該タスクが監視タスク22の前回の起動時よりも後に正常に動作した)か否かを判定する。
In step S3, the
ステップS3で当該タスクのアライブチェックフラグFが1であると判定されると、CPU11は、当該タスクのアライブチェックフラグFを0にリセットするとともに、当該タスクのヘルスチェックカウント値Cを所定値Cmax(Cmaxは1以上の整数)にリセットし(ステップS4)、その後、ループ開始端R1へ戻る。
When it is determined in step S3 that the alive check flag F of the task is 1, the
一方、ステップS3で当該タスクのアライブチェックフラグFが1ではない(0である)と判定されると、ステップS5へ移行する。 On the other hand, if it is determined in step S3 that the alive check flag F of the task is not 1 (0), the process proceeds to step S5.
ステップS5において、CPU11は、ループ開始端R1で現在処理対象として設定されているタスクのヘルスチェックカウント値Cを、1だけデクリメントする。
In step S5, the
その後、CPU11は、ループ開始端R1で現在処理対象として設定されているタスクのヘルスチェックカウント値Cが、0であるか否かを判定する(ステップS6)。当該ヘルスチェックカウント値Cが0でなければ、ループ終了端R2へ移行する一方、当該ヘルスチェックカウント値Cが0であれば、ステップS7へ移行する。ここで、当該ヘルスチェックカウント値Cが0であることは、監視タスク22が起動される度(回)うちの所定値Cmaxが示す連続回数に渡って、当該監視対象タスクのアライブチェックフラグFが1ではなかった(0であった)こと、すなわち、所定時間Cmax×T0以上当該監視対象タスクが正常に動作したことが確認できなかったことを意味している。本実施の形態では、各監視対象タスクについて、当該タスクが正常であれば、所定時間Cmax×T0内に必ず1回以上、当該タスクのアライブチェックフラグFが1にセットされる(当該タスクにおいて図)ように、当該タスクにおける当該タスクのアライブチェックフラグFを1にセットする周期や、所定値Cmaxや、監視タスク22の起動周期T0が設定されている。したがって、当該ヘルスチェックカウント値Cが0であることは、当該監視対象タスクが所定時間Cmax×T0以上正常に動作していない状態であることを意味している。
After that, the
ループ終了端R2において、ループ開始端R1で現在処理対象として設定されているタスクが最大タスク数のうちの最後のタスクでなければ、ループ開始端R1へ戻る一方、当該タスクが最後のタスクであれば、今回起動された監視タスク22の処理を終了する。
At the loop end end R2, if the task currently set as the processing target at the loop start end R1 is not the last task in the maximum number of tasks, the process returns to the loop start end R1 while the task is the last task. If so, the process of the
ステップS7において、CPU11は、ループ開始端R1で現在処理対象として設定されているタスクが異常である旨とそのタスクのタスク名と現在時刻を示すログを、不揮発性メモリ14に書き込ませるとともに、他のタスク(監視タスク22以外のタスク21−1〜21−n)を強制終了させるため通知(他タスク終了通知)を当該他のタスク宛てに発生させる。前記ログは、異常の解析等に利用することができる。前記タスク終了通知を受けた当該他タスクは、OS20に自身を強制終了させるよう要求し、OS20によって強制終了されることになる。
In step S7, the
ステップS7の後に、CPU11は、監視タスク22を終了しその後は周期T0毎の起動タイミングでも監視タスク22を起動しないようOS20に要求することによって、いわば自爆処理へ進行させる(ステップS8)。OS20は、この要求に応じて、監視タスク22を終了させ、その後も監視タスク22を起動させない。その結果、CPU11からWDTクリア信号が出力されなくなり、ウォッチドッグタイマ3によって、マイクロコンピュータ2の異常が検出されることにる。
After step S7, the
なお、ステップS7,S8によって、マイクロコンピュータ2のシステムは強制終了されることになる。
The system of the
なお、ステップS1の処理は、監視タスク22の起動直後に行う代わりに、ループ終了端R2の後でかつ当該監視タスク22を終了する直前に行ってもよい。
The process of step S1 may be performed after the loop end end R2 and immediately before the end of the
本実施の形態によれば、各監視対象タスクは、自身のタスクに対応する保持部(本実施の形態では、RAM13における当該タスクのアライブチェックフラグFの領域)に、所定情報である「1」を所定周期毎に保持させる処理(図4に示す処理)を含んでいるので、当該監視対象タスクが正常に動作すれば、前記保持部に前記所定情報「1」が保持されることになる。監視タスク22は、当該監視タスク22に対応するアライブチェックフラグFの情報に基づいて、少なくとも1つの監視対象タスクが所定時間Cmax×T0以上正常に動作していない状態であるか否かを判定する処理(図5中のステップS6等)を含んでいる。そして、監視タスク22によって前記状態であると判定された場合(図5中のステップS6でYESの場合)に、それ以後のWDTクリア信号の出力が停止される一方で、監視タスク22によって前記状態ではないと判定された場合(図5中のステップS6でNOの場合)に、それ以後のWDTクリア信号の定期的な出力が行われる。
According to the present embodiment, each monitored task has predetermined information "1" in the holding unit (in the present embodiment, the area of the alive check flag F of the task in the RAM 13) corresponding to its own task. Is included in each predetermined cycle (process shown in FIG. 4), so that if the monitored task operates normally, the predetermined information "1" is held in the holding unit. The
したがって、本実施の形態によれば、各監視対象タスクが正常に動作しているか否かが監視タスク22によって監視され、監視対象タスクが正常に動作していれば、WDTクリア信号が定期的に出力される一方で、いずれかの監視対象タスクが正常に動作していない場合には、WDTクリア信号の出力が停止される。このため、本実施の形態によれば、各々が周期的に起動される複数のタスク21−1〜21−n,22が並列的に実行されるマルチタスク処理を行うにも拘わらず、より適切に異常を検出することができる。
Therefore, according to the present embodiment, the
[第2の実施の形態] [Second Embodiment]
図6は、本発明の第2の実施の形態による交通信号装置の概略構成を示すブロック図である。図6において、図1中の要素と同一又は対応する要素には同一符号を付し、その重複する説明は省略する。 FIG. 6 is a block diagram showing a schematic configuration of a traffic signal device according to a second embodiment of the present invention. In FIG. 6, the same or corresponding elements as those in FIG. 1 are designated by the same reference numerals, and the duplicated description thereof will be omitted.
本実施の形態による交通信号装置は、前記第1の実施の形態による処理装置1と、交通信号灯器31と、処理装置1の制御下で又は自律的に交通信号灯器31を制御する制御回路としての制御用LSI32と、交通信号灯器31の制御に関するデータ(例えば、表示色や点灯パターンなど)を記憶したデータ記憶部33と、ウォッチドッグタイマ3からの異常検出信号に基づいて異常処理を行う異常処理回路34と、を備えている。
The traffic signal device according to the present embodiment is a control circuit that controls the
前記第1の実施の形態と異なり、ウォッチドッグタイマ3からの異常検出信号は、CPU11をリセットするリセット信号として用いられる代わりに、異常処理回路34に供給されている。CPU11は、異常処理回路34からリセット信号を受けている時間(第1の所定時間TA)継続してリセット状態に保たれるようになっている。
Unlike the first embodiment, the abnormality detection signal from the
制御用LSI32は、データ記憶部33のデータを参照しつつ、交通信号灯器31を直接制御する信号を、点灯出力として出力する。制御用LSI32は、異常処理回路34からの動作モード指令に応じて、CPU11の制御下で交通信号灯器31を制御する通常動作モード、又は、CPU11から独立して自律的に交通信号灯器31を制御するフェイル動作モードを行う。通常動作モードでは、CPU11は、制御用LSI32の状態を示す信号を、制御用LSI32から入出力インターフェース15を介して受け取り、その信号に基づいて、制御用LSI32を制御して制御用LSI32を介して交通信号灯器31を制御する。本実施の形態では、この制御は、タスク21−1〜21−nによって実現されるようになっている。フェイル動作モードでは、CPU11は、交通信号灯器31の制御に関与しない。
The
異常処理回路34は、ウォッチドッグタイマ3からの異常検出信号を受けると、制御用LSI32にフェイル動作モードを開始させる動作モード指令を与える。また、異常処理回路34は、ウォッチドッグタイマ3からの異常検出信号を受けると、第1の所定時間TAだけCPU11にリセット信号を供給する。その後、異常処理回路34は、ウォッチドッグタイマ3からの信号(あるいは、CPU11からのWDTクリア信号でもよい。)に基づいて、第2の所定時間TB内にCPU11がリセット後に正常状態に復旧した否かを判定する。異常処理回路34は、第2の所定時間TB内にCPU11が正常状態に復旧すれば、制御用LSI32に通常動作モードを開始させる動作モード指令を与える。一方、第2の所定時間TB内にCPU11が正常状態に復旧しなければ、制御用LSI32にフェイル動作モードを継続させる。
Upon receiving the abnormality detection signal from the
本実施の形態によれば、前記第1の実施の形態による処理装置1が用いられているので、各々が周期的に起動される複数のタスク21−1〜21−n,22が並列的に実行されるマルチタスク処理を行うにも拘わらず、より適切に異常を検出することができ、ひいては、交通信号灯器31をより適切に制御することができる。
According to the present embodiment, since the
また、本実施の形態によれば、ウォッチドッグタイマ3により異常検出信号が出力された場合に、フェイル動作モードとなるが、CPU11が第1の所定時間TA継続してリセット状態に保たれ、このCPU11のリセット後に、CPU11が第2の所定時間TB内に正常状態に復旧したか否かが判定され、CPU11が第2の所定時間TB内に正常状態に復旧したと判定された場合に、通常動作モードに、自動的に復旧する。したがって、本実施の形態によれば、外来ノイズの影響などの一過性の要因でCPU11の異常が一時的に発生した場合、通常動作モードに自動的に復旧する。このため、本実施の形態によれば、本来必要のない保守・点検作業を行わずに済み、維持管理費用を低減することができる。
Further, according to the present embodiment, when the
もっとも、本発明では、異常処理回路34は、CPU11にリセット信号を供給せずに、ウォッチドッグタイマ3から一旦異常検出信号を受けた場合には、フェイル動作モードを継続させるようにしてもよい。
However, in the present invention, the
[第3の実施の形態] [Third Embodiment]
図7は、本発明の第3の実施の形態による情報表示装置の概略構成を示すブロック図であり、図6に対応している。図7において、図6中の要素と同一又は対応する要素には同一符号を付し、その重複する説明は省略する。 FIG. 7 is a block diagram showing a schematic configuration of an information display device according to a third embodiment of the present invention, and corresponds to FIG. In FIG. 7, the same or corresponding elements as the elements in FIG. 6 are designated by the same reference numerals, and duplicate description thereof will be omitted.
本実施の形態による情報表示装置は、例えば道路交通情報等を表示する装置として構成され、制御対象として、交通信号灯器31に代えて、の表示パネル(例えば、2次元状に配置された多数のLEDを有する表示パネル)41を備えている。
The information display device according to the present embodiment is configured as, for example, a device for displaying road traffic information and the like, and as a control target, instead of the
本実施の形態では、制御用LSI32は、CPU11の制御下で又は自律的に表示パネル41を制御する制御回路となっている。また、本実施の形態では、データ記憶部33には、表示パネル41の制御に関するデータ(例えば、表示色や表示パターンなど)を記憶している。さらに、本実施の形態では、制御用LSI32は、データ記憶部33のデータを参照しつつ、表示パネル41を直接制御する信号を、表示出力として出力する。
In the present embodiment, the
本実施の形態によっても、前記第2の実施の形態と同様の利点が得られる。 The present embodiment also provides the same advantages as the second embodiment.
以上、本発明の各実施の形態について説明したが、本発明はこれらの実施の形態に限定されるものではない。例えば、本発明による処理装置の用途は、前述した交通信号装置や情報表示装置に限定されるものではない。 Although each embodiment of the present invention has been described above, the present invention is not limited to these embodiments. For example, the application of the processing device according to the present invention is not limited to the above-mentioned traffic signal device and information display device.
1 処理装置
2 マイクロコンピュータ
3 ウォッチドッグタイマ
21−1〜21−n タスク
22 監視タスク
31 交通信号灯器
32 制御用LSI
41 表示パネル
1
41 Display panel
Claims (4)
前記複数のタスクは、監視対象となる1つ以上の監視対象タスクと、前記1つ以上の監視対象タスクの監視を所定周期毎に行う監視タスクとを含み、
前記1つ以上の監視対象タスクは、自身のタスクの処理が正常に実行されているか否かをチェックすることなく、自身のタスクに対応する保持部に毎回同じ所定情報を所定周期毎に保持させる処理を含み、
前記監視タスクは、前記1つ以上の監視対象タスクに対応する前記保持部に保持されている情報に基づいて、前記1つ以上の監視対象タスクのうちの少なくとも1つの監視対象タスクが所定時間以上正常に動作していない状態であるか否かを判定する処理を含み、
前記監視タスクによって前記状態であると判定された場合に、それ以後のウォッチドッグタイマクリア信号の出力を停止する一方で、前記監視タスクによって前記状態ではないと判定された場合に、それ以後のウォッチドッグタイマクリア信号の定期的な出力を行い、
前記監視タスクは、前記少なくとも1つの監視対象タスクの各々について、当該監視タスクの起動時に当該監視対象タスクに対応する前記保持部に保持されている情報が前記所定情報である場合には、当該監視対象タスクに対応する前記保持部に前記所定情報と異なる情報を保持させる処理を含む、
ことを特徴とする処理装置。 It is a processing device that performs multitasking processing in which multiple tasks, each of which is started periodically, are executed in parallel.
The plurality of tasks include one or more monitored tasks to be monitored and a monitoring task that monitors the one or more monitored tasks at predetermined intervals.
The one or more monitored tasks cause the holding unit corresponding to the own task to hold the same predetermined information every predetermined cycle without checking whether or not the processing of the own task is normally executed. Including processing
In the monitoring task, at least one of the one or more monitored tasks has a predetermined time or more based on the information held in the holding unit corresponding to the one or more monitored tasks. Includes processing to determine whether or not the system is not operating normally.
When the monitoring task determines that the state is in the above state, the output of the watchdog timer clear signal after that is stopped, while when the monitoring task determines that the state is not the state, the watch after that is stopped. There row regular output of the watchdog timer clear signal,
For each of the at least one monitored tasks, the monitoring task monitors the predetermined information when the information held in the holding unit corresponding to the monitored task at the time of starting the monitoring task is the predetermined information. Including a process of causing the holding unit corresponding to the target task to hold information different from the predetermined information.
A processing device characterized by that.
請求項1又は2記載の処理装置と、
前記処理装置の制御下で又は自律的に、前記交通信号灯器を制御する制御回路と、
を備えたことを特徴とする交通信号装置。 Traffic light and
The processing apparatus according to claim 1 or 2 ,
A control circuit that controls the traffic signal lamp under the control of the processing device or autonomously.
A traffic signal device characterized by being equipped with.
請求項1又は2記載の処理装置と、
前記処理装置の制御下で又は自律的に、前記表示パネルを制御する制御回路と、
を備えたことを特徴とする情報表示装置。 Display panel and
The processing apparatus according to claim 1 or 2 ,
A control circuit that controls the display panel under the control of the processing device or autonomously.
An information display device characterized by being equipped with.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015204139A JP6787658B2 (en) | 2015-10-16 | 2015-10-16 | Processing equipment, traffic signal equipment and information display equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015204139A JP6787658B2 (en) | 2015-10-16 | 2015-10-16 | Processing equipment, traffic signal equipment and information display equipment |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020108293A Division JP6788145B2 (en) | 2020-06-24 | 2020-06-24 | Processing equipment, traffic signal equipment and information display equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2017076294A JP2017076294A (en) | 2017-04-20 |
JP6787658B2 true JP6787658B2 (en) | 2020-11-18 |
Family
ID=58551330
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015204139A Active JP6787658B2 (en) | 2015-10-16 | 2015-10-16 | Processing equipment, traffic signal equipment and information display equipment |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6787658B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107943575A (en) * | 2017-12-07 | 2018-04-20 | 北京兆易创新科技股份有限公司 | Multitask monitoring and managing method and device in SPI NAND |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2793993B2 (en) * | 1990-04-05 | 1998-09-03 | 株式会社ゼクセル | Program runaway detection method in microcomputer |
JP2829183B2 (en) * | 1992-03-13 | 1998-11-25 | 横河電機株式会社 | Microprocessor device |
JP2000099480A (en) * | 1998-09-28 | 2000-04-07 | Toshiba Corp | Digital arithmetic processor |
JP5444852B2 (en) * | 2009-05-28 | 2014-03-19 | 住友電気工業株式会社 | Traffic signal controller and traffic signal controller abnormality determination method |
JP6060584B2 (en) * | 2012-09-19 | 2017-01-18 | 富士電機株式会社 | Program abnormality detection device and program thereof |
-
2015
- 2015-10-16 JP JP2015204139A patent/JP6787658B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2017076294A (en) | 2017-04-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10146626B2 (en) | Detecting and handling an expansion card fault during system initialization | |
US20180102003A1 (en) | Vehicular information communication system and vehicular information communication method | |
TWI521340B (en) | Programmable logic controller | |
JP2014081700A (en) | Programmable controller, data backup method of programmable controller, and starting method of programmable controller | |
JP5041290B2 (en) | PROGRAMMABLE CONTROLLER AND ITS ERROR RECOVERY METHOD | |
JP4886558B2 (en) | Information processing device | |
JP6787658B2 (en) | Processing equipment, traffic signal equipment and information display equipment | |
JP6788145B2 (en) | Processing equipment, traffic signal equipment and information display equipment | |
JP5445572B2 (en) | Computer system, standby power reduction method, and program | |
US20130332925A1 (en) | Computer system | |
JP2004338883A (en) | Elevator controller | |
JP2008040698A (en) | Emergency supervisory system for programmable controller | |
JP6049961B1 (en) | CPU monitoring device | |
JP6504610B2 (en) | Processing device, method and program | |
JP5365875B2 (en) | Industrial controller | |
US9829874B2 (en) | Numerical control device | |
JP6051545B2 (en) | PLC system, status display method, PLC, and programmable display | |
US10540222B2 (en) | Data access device and access error notification method | |
JP6270369B2 (en) | Traffic signal controller, traffic signal device, display control device, and information display device | |
JP4983806B2 (en) | System monitoring apparatus and monitoring method using dual timer | |
JP2000347758A (en) | Information processor | |
JP2009020545A (en) | Anomaly monitoring device for computer | |
JP2011008494A (en) | Module resetting and system failure display system by watchdog timer | |
JP5906807B2 (en) | Arithmetic processing device and stall monitoring method | |
JP2006285321A (en) | Safe instrumentation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20181005 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20190719 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20190820 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20191018 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20200331 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20200624 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20200727 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20201006 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20201029 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6787658 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |