JP2011203965A - Self-diagnosis apparatus and self-diagnosis method - Google Patents

Self-diagnosis apparatus and self-diagnosis method Download PDF

Info

Publication number
JP2011203965A
JP2011203965A JP2010070041A JP2010070041A JP2011203965A JP 2011203965 A JP2011203965 A JP 2011203965A JP 2010070041 A JP2010070041 A JP 2010070041A JP 2010070041 A JP2010070041 A JP 2010070041A JP 2011203965 A JP2011203965 A JP 2011203965A
Authority
JP
Japan
Prior art keywords
processing
self
post
diagnosis
error
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2010070041A
Other languages
Japanese (ja)
Other versions
JP5521684B2 (en
Inventor
Koji Nishida
廣治 西田
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric 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 Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2010070041A priority Critical patent/JP5521684B2/en
Publication of JP2011203965A publication Critical patent/JP2011203965A/en
Application granted granted Critical
Publication of JP5521684B2 publication Critical patent/JP5521684B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Retry When Errors Occur (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve security, reliability, availability, and cost in a self-diagnosis.SOLUTION: A self-diagnosis apparatus executes processing more than once by a previously-set application in a certain period and compares a plurality of results of executed processing to perform the self-diagnosis. The apparatus includes a secure application processing unit for executing the application more than once under a condition set by a diverse diagnostic method, a memory for storing a plurality of processing results obtained by the secure application processing unit in a predetermined save area, and a first postprocessing unit for comparing the plurality of processing results stored in the memory to determine if any error is present depending on whether the compared results indicate coincidence or are within a predetermined error range, thus solving the problem.

Description

本発明は、自己診断装置及び自己診断方法に係り、特に、自己診断において安全かつ信頼性、可用性及びコスト面の改善を実現するための自己診断装置及び自己診断方法に関する。   The present invention relates to a self-diagnosis device and a self-diagnosis method, and more particularly, to a self-diagnosis device and a self-diagnosis method for realizing safety and reliability, availability, and cost improvement in self-diagnosis.

従来、例えば放射線等により生じるデータ処理後の一過性のソフトエラー現象を減少させるために処理後のデータに対して診断する技術が存在する。ここで、ソフトエラーとは、例えば、半導体チップの一部が壊れるのではなく、記憶しておいたデータの一部だけが反転してしまう不良であり、アルファ線や中性子線、陽子線、重イオン線等の粒子線が半導体チップに突入することで引き起こされ、粒子線が半導体チップを通過する時間は極めて短く、ほんの一瞬である等の特徴が知られている。   Conventionally, there is a technique for diagnosing data after processing in order to reduce a transient soft error phenomenon after data processing caused by, for example, radiation. Here, a soft error is a defect in which, for example, a part of a semiconductor chip is not broken, but only a part of stored data is inverted, and alpha, neutron, proton, heavy It is caused by the entry of a particle beam such as an ion beam into the semiconductor chip, and the characteristics that the time for the particle beam to pass through the semiconductor chip is extremely short and only a moment are known.

また、ソフトエラー対策としては、例えば、2bit以上のエラーに対応した複雑なECC(Error Correction Code)を搭載する例が知られている(例えば、非特許文献1参照)。また、他のソフトエラー対策としては、例えば、予め正データと反転データとを保存しておき、データをアクセスする時点でパリティのチェックや反転データの利用をする手法が知られている(例えば、特許文献1参照)。また、ソフトウェアエラーが生じたとき、そのソフトウェアの実行時に使用したハードウェアであるCPU(Central Processing Unit)やメモリに対して診断する手法が知られている(例えば、非特許文献2参照)。   As a countermeasure against soft errors, for example, an example of mounting a complex ECC (Error Correction Code) corresponding to an error of 2 bits or more is known (for example, see Non-Patent Document 1). As another soft error countermeasure, for example, a method is known in which positive data and inverted data are stored in advance, and parity is checked and inverted data is used when data is accessed (for example, Patent Document 1). Also, there is known a method of diagnosing a CPU (Central Processing Unit) and a memory that are hardware used when executing software when a software error occurs (see, for example, Non-Patent Document 2).

また、セキュリティデバイスの内部で実行する処理に利用するデータ値を所定のメモリアドレスから複数回読み出し、読み出した各々のデータ値を比較し、一致していないデータ値がある場合は、故障攻撃を検知した時に実施するエラー処理を実行する故障攻撃の検知方法についても知られている(例えば、特許文献2参照)。また、同じプログラムを複数回実行させ、結果格納領域にある複数の実行結果を比較し実行結果が等しい場合には次のプログラム処理を実行するプログラムアドレスを制御し、実行結果が等しくない場合には再度同じプログラムを実行するプログラムアドレスを制御するデータ処理手法が知られている(例えば、特許文献3参照)。   Also, the data value used for processing executed inside the security device is read from the predetermined memory address multiple times, and the read data values are compared. If there is a mismatched data value, a failure attack is detected. There is also known a failure attack detection method for executing error processing performed when a failure occurs (see, for example, Patent Document 2). Also, if the same program is executed multiple times and the execution results in the result storage area are compared and the execution results are equal, the program address for executing the next program process is controlled, and if the execution results are not equal A data processing method for controlling a program address for executing the same program again is known (see, for example, Patent Document 3).

更に、複数のプロセッサを有し、そのプロセッサによる演算経過/演算結果を逐次比較し、同一の場合にその処理は正当であると診断する比較装置を備えた制御装置において、複数の記憶装置内の内容を比較することにより記憶装置のエラー検知を行う手法についても知られている(例えば、特許文献4参照)。   Further, in a control device having a plurality of processors, and sequentially comparing the operation progress / results of the processing by the processors and diagnosing that the processing is valid in the same case, the control device includes a plurality of processors. A technique for detecting errors in a storage device by comparing the contents is also known (see, for example, Patent Document 4).

特開平5−216771号公報Japanese Patent Application Laid-Open No. 5-216671 特開2009−259126号公報JP 2009-259126 A 特開平11−306083号公報Japanese Patent Laid-Open No. 11-306083 特開2006−11576号公報JP 2006-11576 A

2008IPRSレポート[ソフトエラー編]、http://pc.watch.impress.co.jp/docs/2008/0502/irps03.htm2008 IPRS report [soft error edition], http: // pc. watch. impres. co. jp / docs / 2008/0502 / irps03. htm IEC61508 Functional safety of electrical/electronic/programmable electronic safety−related systems(IEC61508−7;A.5.7(Double RAM with hardware or software comparison and read/write test)、A.3.5(Reciprocal comparison by software))IEC61508 Functional safety of electrical / electronic / programmable electronic safety-related systems (IEC61508-7; A.5.7 (Double RAM with hardware or software comparison and read / write test), A.3.5 (Reciprocal comparison by software) )

しかしながら、上述した非特許文献1に記載されているように、複雑なECCを搭載するにはハードウェアコストが増大してしまう。また、特許文献1に記載されている技術は、メモリアクセス時にそれぞれの処理を行う必要があり、例えばOS(Operating System)等のブラックボックスになっているソフトウェアには適用できず、また既存ソフトウェアを使う場合もソフトウェア改造が必要となり、信頼性やコスト面で問題が発生する。   However, as described in Non-Patent Document 1 described above, mounting a complex ECC increases the hardware cost. Further, the technique described in Patent Document 1 needs to perform each process at the time of memory access. For example, it cannot be applied to software in a black box such as an OS (Operating System), and existing software is not used. When using it, software modification is required, which causes problems in terms of reliability and cost.

また、非特許文献2の「A.5.7 Double RAM」に記載されている技術についても同様に、メモリアクセス時にそれぞれの処理を行う必要があり、例えばOS等のブラックボックスになっているソフトウェアには適用できず、また既存ソフトウェアを使う場合もソフトウェア改造が必要となり、信頼性やコスト面で問題が発生する。また、「A.3.5 Reciprocal comparison by software」に記載されている技術は、最低2つのCPUが必要となり、またCPU間の通信負荷やデータ照合のための処理が複雑になり、信頼性やコスト面で問題が発生する。更に、多数決によるデータの可用性のためにはCPUが3つ以上必要となり、信頼性やコスト面で問題が発生する。   Similarly, for the technique described in “A.5.7 Double RAM” of Non-Patent Document 2, it is necessary to perform each process at the time of memory access. For example, software that is a black box such as an OS In addition, when using existing software, it is necessary to modify the software, which causes problems in terms of reliability and cost. In addition, the technology described in “A.3.5 Reciprocal comparison by software” requires at least two CPUs, and the communication load between the CPUs and the processing for data matching become complicated, and reliability and There is a problem in terms of cost. Furthermore, three or more CPUs are necessary for availability of data by majority vote, which causes problems in terms of reliability and cost.

また、特許文献2に記載されている技術は、セキュリティデバイスの内部で実行する処理に利用するデータ値を複数回読み出してそのデータ値を比較している。また、特許文献3に記載されている技術は、同じプログラムを複数回実行させ、その実行結果を比較する。したがって、何れの文献も、例えば複数回の処理の実行において、時間経過に伴って生じる入力値(アナログデータ等)の誤差に対しては何ら考慮されておらず、その誤差範囲を含めた高精度な自己診断をすることができない。更に、特許文献4に記載されている技術は、複数のプロセッサを用いて処理されているため、上述と同様に信頼性やコスト面で問題が発生する。   Further, the technique described in Patent Document 2 reads a data value used for processing executed inside the security device a plurality of times and compares the data value. The technique described in Patent Document 3 executes the same program a plurality of times and compares the execution results. Therefore, none of the documents takes into account errors in input values (analog data, etc.) that occur with the passage of time in the execution of multiple times of processing, for example, and includes high accuracy including the error range. Can not make a self-diagnosis. Furthermore, since the technique described in Patent Document 4 is processed using a plurality of processors, there are problems in terms of reliability and cost as described above.

本発明は、上述した課題に鑑みてなされたものであって、安全かつ信頼性、可用性及びコスト面の改善を実現し、高精度に自己診断するための自己診断装置及び自己診断方法を提供することを目的とする。   The present invention has been made in view of the above-mentioned problems, and provides a self-diagnosis device and a self-diagnosis method for realizing safety and reliability, availability and cost improvement, and performing self-diagnosis with high accuracy. For the purpose.

上述した課題を解決するために、本件発明は、以下の特徴を有する課題を解決するための手段を採用している。   In order to solve the above-described problems, the present invention employs means for solving the problems having the following characteristics.

本発明は、一定周期内において予め設定されたアプリケーションによる処理を複数回実行し、実行された複数の処理結果を比較して自己診断を行う自己診断装置であって、ダイバース診断手法により設定された条件で前記アプリケーションを複数回実行する安全アプリ処理部と、前記安全アプリ処理部により得られる複数の処理結果を所定の退避領域に格納するメモリと、前記メモリに格納された複数の処理結果を比較し、比較した結果が一致しているか又は所定の誤差範囲にあるかに基づいてエラーの有無を判断する第1後処理部とを有することを特徴とする。   The present invention is a self-diagnosis device that executes a process by a preset application a plurality of times within a fixed period and compares a plurality of executed process results to perform a self-diagnosis, and is set by a diversity diagnosis method. Comparing a plurality of processing results stored in the memory with a safety application processing unit that executes the application multiple times under conditions, a memory that stores a plurality of processing results obtained by the safety application processing unit in a predetermined save area And a first post-processing unit that determines whether or not there is an error based on whether the compared results match or are within a predetermined error range.

また本発明は、前記複数の処理結果を多数決することにより前記エラーの有無を判断する第2後処理部を有し、前記安全アプリ処理部は、前記第1後処理部においてエラーであると判断した場合に、更に前記ダイバース診断手法により設定された条件で1又は複数の前記アプリケーションを実行して処理結果を取得し、前記第2後処理部は、取得した前記処理結果と、前記メモリに格納された複数の処理結果とを用いて、前記多数決することにより処理結果を補正することが好ましい。   The present invention further includes a second post-processing unit that determines the presence / absence of the error by voting the plurality of processing results, and the safety application processing unit determines that there is an error in the first post-processing unit. In such a case, one or more applications are executed under the conditions set by the diversity diagnosis method to obtain a processing result, and the second post-processing unit stores the obtained processing result and the memory. It is preferable to correct the processing result by making a majority decision using the plurality of processing results.

また本発明において、前記安全アプリケーション処理部は、予め設定された複数のタスクを実行し、前記第1後処理部は、前記複数のタスクから得られた結果に対して多数決することにより前記エラーの有無を判断することが好ましい。   In the present invention, the safety application processing unit executes a plurality of tasks set in advance, and the first post-processing unit performs a majority decision on the result obtained from the plurality of tasks, thereby preventing the error. It is preferable to determine the presence or absence.

更に本発明は、一定周期内において予め設定されたアプリケーションによる処理を複数回実行し、実行された複数の処理結果を比較して自己診断を行う自己診断方法であって、ダイバース診断手法により設定された条件で前記アプリケーションを複数回実行する安全アプリ処理ステップと、前記安全アプリ処理ステップにより得られる複数の処理結果をメモリの所定の退避領域に格納する格納ステップと、前記メモリに格納された複数の処理結果を比較し、比較した結果が一致しているか又は所定の誤差範囲にあるかに基づいてエラーの有無を判断する第1後処理ステップとを有することを特徴とする。   Further, the present invention is a self-diagnosis method for executing a process by a preset application multiple times within a fixed period and performing a self-diagnosis by comparing a plurality of executed process results. A safety application processing step for executing the application a plurality of times under the above-mentioned conditions, a storage step for storing a plurality of processing results obtained by the safety application processing step in a predetermined save area of the memory, and a plurality of storage results stored in the memory And a first post-processing step of comparing the processing results and determining whether there is an error based on whether the compared results match or are within a predetermined error range.

また本発明は、前記複数の処理結果を多数決することにより前記エラーの有無を判断する第2後処理ステップを有し、前記安全アプリ処理ステップは、前記第1後処理ステップにおいてエラーであると判断した場合に、更に前記ダイバース診断手法により設定された条件で1又は複数の前記アプリケーションを実行して処理結果を取得し、前記第2後処理ステップは、取得した前記処理結果と、前記メモリに格納された複数の処理結果とを用いて、前記多数決することにより処理結果を補正することが好ましい。   The present invention further includes a second post-processing step for determining the presence or absence of the error by voting the plurality of processing results in majority, and the safety application processing step is determined to be an error in the first post-processing step. In this case, one or more of the applications are executed under the conditions set by the diversity diagnosis method to obtain a processing result, and the second post-processing step stores the obtained processing result and the memory. It is preferable to correct the processing result by making a majority decision using the plurality of processing results.

また本発明において、前記安全アプリケーション処理ステップは、予め設定された複数のタスクを実行し、前記第1後処理ステップは、前記複数のタスクから得られた結果に対して多数決することにより前記エラーの有無を判断することが好ましい。   In the present invention, the safety application processing step executes a plurality of preset tasks, and the first post-processing step determines the error by performing a majority decision on the results obtained from the plurality of tasks. It is preferable to determine the presence or absence.

なお、本発明の構成要素、表現又は構成要素の任意の組み合わせを、方法、装置、システム、コンピュータプログラム、記録媒体、データ構造等に適用したものも本発明の態様として有効である。   In addition, what applied the component, expression, or arbitrary combination of the component of this invention to a method, an apparatus, a system, a computer program, a recording medium, a data structure, etc. is also effective as an aspect of this invention.

本発明によれば、安全かつ信頼性、可用性及びコスト面の改善を実現し、高精度に自己診断することができる。   According to the present invention, safety and reliability, availability and cost can be improved, and self-diagnosis can be performed with high accuracy.

自己診断装置のブロック構成の一例を示す図である。It is a figure which shows an example of the block configuration of a self-diagnosis apparatus. 本実施形態における管理テーブルの一例を示す図である。It is a figure which shows an example of the management table in this embodiment. 処理結果領域の構成を説明するための図である。It is a figure for demonstrating the structure of a process result area | region. 本実施形態における前処理の一例を示すフローチャートである。It is a flowchart which shows an example of the pre-processing in this embodiment. 本実施形態における安全アプリ処理の一例を示すフローチャートである。It is a flowchart which shows an example of the safety application process in this embodiment. 本実施形態における中間処理の一例を示すフローチャートである。It is a flowchart which shows an example of the intermediate process in this embodiment. 本実施形態における第1後処理の一例を示すフローチャートである。It is a flowchart which shows an example of the 1st post-process in this embodiment. 本実施形態における第2後処理の一例を示すフローチャートである。It is a flowchart which shows an example of the 2nd post-process in this embodiment. 本実施形態における自己診断の各処理タイミングを説明するためのタイミングチャートである。It is a timing chart for demonstrating each process timing of the self-diagnosis in this embodiment.

<本発明について>
本発明は、一定周期内で同一安全機能を持つ安全アプリ処理を複数回実行し、その実行結果を基準として、例えば、CPUやメモリのソフトエラー等の一過性エラーを検出する。また、本発明では、上述の安全アプリ処理をダイバース(diverse)診断手法を用いて実施することで、同一出力であっても処理方式を別にすることにより一過性エラー以外のCPUやメモリの異常等を診断することができる。
<About the present invention>
In the present invention, a safety application process having the same safety function is executed a plurality of times within a certain period, and a transient error such as a CPU or memory soft error is detected based on the execution result. Further, in the present invention, the above-described safety application processing is performed using a divers diagnosis method, so that even if the output is the same, the processing method is different so that a CPU or memory abnormality other than a transient error is detected. Etc. can be diagnosed.

ここで、本発明における「ダイバース診断手法」を以下のように定義する。ダイバース診断手法とは、例えば、所定の入力データを読み込み、同一のデータを出力する場合に、その入力データの読み込む機器(計器等)や処理方式等を別にして得られる結果を診断するものである。更に具体的に説明すれば、例えば、ある固定位置から温度や圧力、電圧、流量等を計測する場合には、計測される計器の違い(ここで、計器の違いには、例えば同種類の2つの計器や他社製の異なる計器といった概念も含む)であったり、取得したデータに対して何らかのデータ処理を行う場合には、そのプログラム言語の違いやアルゴリズムの違い、バージョンの違い、コンパイラの違い、コンパイラのパラメータの違い、複数のタスクを実行する場合には、その実行順序の違い等といった、それぞれ異なる条件において処理された結果を用いて診断することをいう。なお、ダイバース診断手法における異なる条件については、本発明においてはこれに限定されるものではない。また、ダイバース診断手法により設定される条件は、上記の違いのうち何れか1つでもよく、複数を組み合わせてもよい。   Here, the “diversity diagnosis method” in the present invention is defined as follows. For example, the divers diagnosis method is for diagnosing the result obtained by separately reading the input data (instrument etc.) and processing method, etc., when predetermined input data is read and the same data is output. is there. More specifically, for example, when measuring temperature, pressure, voltage, flow rate, etc. from a certain fixed position, the difference in the measured instrument (here, the difference between the instruments is, for example, the same type of 2 (Including the concept of two instruments and different instruments from other companies), or when performing some kind of data processing on acquired data, differences in programming language, algorithms, versions, compilers, When a plurality of tasks are executed by different compiler parameters, diagnosis is performed using results processed under different conditions such as different execution orders. Note that the different conditions in the diversity diagnosis method are not limited to this in the present invention. Further, the condition set by the diversity diagnosis method may be any one of the above differences, or a plurality of conditions may be combined.

また、本発明では、ダイバースにより得られるそれぞれの誤差範囲やデータの誤差範囲について、予め設定しておき、その設定された範囲において一致か否かを判断したり、適宜多数決により、その処理結果が正常か異常かを判断することによりソフトウェアエラーの安全性を向上させる。   In the present invention, each error range and data error range obtained by diverse is set in advance, and it is determined whether or not they match within the set range. Improve the safety of software errors by judging whether it is normal or abnormal.

以下に、本発明における自己診断装置及び自己診断方法を好適に実施した形態について、図面を用いて説明する。なお、以下に示す実施形態では、一例として、プラント等で適用される自己診断装置の例について説明するが、本発明においてはこれに限定されるものではない。   Hereinafter, preferred embodiments of a self-diagnosis apparatus and a self-diagnosis method according to the present invention will be described with reference to the drawings. In the embodiment described below, an example of a self-diagnosis device applied in a plant or the like will be described as an example. However, the present invention is not limited to this.

<自己診断装置のブロック構成例>
図1は、自己診断装置のブロック構成の一例を示す図である。図1に示す自己診断装置1は、CPU10と、メモリ20とを有するように構成されている。CPU10における機能としては、前処理部11と、安全アプリ処理部12と、中間処理部13と、第1後処理部14と、第2後処理部15と、自己診断・他処理部16とを有している。なお、上記機能による各処理は、図1に示すように、予め設定された定周期起動により実行される。
<Example of block configuration of self-diagnosis device>
FIG. 1 is a diagram illustrating an example of a block configuration of the self-diagnosis apparatus. The self-diagnosis device 1 shown in FIG. 1 is configured to have a CPU 10 and a memory 20. As functions in the CPU 10, a pre-processing unit 11, a safety application processing unit 12, an intermediate processing unit 13, a first post-processing unit 14, a second post-processing unit 15, and a self-diagnosis / other processing unit 16 are provided. Have. In addition, each process by the said function is performed by the preset fixed period start, as shown in FIG.

また、本実施形態における安全アプリ処理部12は、後述するように3回の安全アプリ処理による多数決処理も含んでいるため、図1に示すように、それぞれの処理を行う安全アプリ処理部12−1〜12−3を有しているが、本発明においてはこれに限定されるものではなく、例えば1つの安全アプリ処理部12において所定のタイミングで複数の安全アプリ処理が実行されてもよい。   In addition, as described later, the safety application processing unit 12 in the present embodiment includes a majority process by three safety application processings. Therefore, as shown in FIG. However, the present invention is not limited to this. For example, one safety application processing unit 12 may execute a plurality of safety application processes at a predetermined timing.

また、図1に示すメモリ20は、管理テーブル21と、処理結果領域22と、処理結果初期退避領域23と、処理結果1次処理退避領域24と、処理結果2次処理退避領域25とを有するよう構成されている。   The memory 20 shown in FIG. 1 includes a management table 21, a processing result area 22, a processing result initial save area 23, a process result primary process save area 24, and a process result secondary process save area 25. It is configured as follows.

前処理部11は、安全アプリ処理部12による最初の安全アプリ処理が実行される前に、安全アプリ処理の結果により書き変えられてしまうデータを、予めメモリ20が有する処理結果初期退避領域23に退避する処理を行う。   The pre-processing unit 11 stores, in the processing result initial saving area 23 of the memory 20 in advance, data that is rewritten by the result of the safety application processing before the first safety application processing by the safety application processing unit 12 is executed. Performs evacuation processing.

また、安全アプリ処理部12−1〜12−3は、安全機能を実現する1又は複数の予め設定されたタスクからなるアプリケーション処理を実行する。なお、安全アプリ処理部12−1〜12−3におけるそれぞれの安全アプリ処理としては、例えば入力点や入力データ、実行プログラムや計器等の設備、タスク順序も完全に同一として同一処理を実行する場合と、上述したダイバース診断手法により、例えば入力点や入力データ等は同一として、その他の実行プログラムや計器等の設備、タスク順序等の少なくとも1つを変えて別処理を実行する場合、若しくは同一処理と別処理とを組み合わせる場合とがある。したがって、安全アプリ処理部12−1〜12−3は、実行するタスクの内容や順序により時間経過に伴う複数のアナログデータ(プロセスデータ)を取得することができる。   In addition, the safety application processing units 12-1 to 12-3 execute application processing including one or a plurality of preset tasks that realize the safety function. In addition, as each safety application process in the safety application processing units 12-1 to 12-3, for example, when input points, input data, equipment such as execution programs and instruments, and the task order are completely the same, the same process is executed. And the above-described divers diagnosis method, for example, when the input points and input data are the same, and other processes are executed by changing at least one of other execution programs, equipment such as instruments, task order, etc., or the same process And separate processing may be combined. Therefore, the safety application processing units 12-1 to 12-3 can acquire a plurality of analog data (process data) with the passage of time depending on the contents and order of tasks to be executed.

なお、安全アプリ処理部12−1〜12−3における各安全アプリ処理としては、例えばプラント等を例にすると、所定の位置に対して、あるタスクでは温度を計測し、またあるタスクでは圧力を計測したり、またあるタスクでは電圧を計測するといった場合に、安全アプリ処理毎に、例えば同一の温度計や圧力計を用いたり、計器のバーションを変えたり、他社メーカーの温度計や圧力計を用いたりして、上述のダイバース診断手法により設定される条件で複数の処理を実行することができ、その結果、所定の位置に対して各安全アプリ処理から時間経過に伴うアナログデータ(プロセスデータ)を取得することができる。   In addition, as each safety application processing in the safety application processing units 12-1 to 12-3, for example, in the case of a plant or the like, for a predetermined position, a temperature is measured for a certain task, and a pressure is determined for a certain task. For example, the same thermometer or pressure gauge is used for each safety application process, the version of the instrument is changed, or a thermometer or pressure gauge of another manufacturer is used when measuring a voltage or measuring a voltage in a certain task. Can be used to execute a plurality of processes under the conditions set by the above-described diversity diagnosis method. As a result, analog data (process data) over time from each safety application process to a predetermined position. ) Can be obtained.

また、本実施形態では、安全アプリ処理における入力値が、予め設定された上限値や下限値を超えているか等といった判断は行わず、安全アプリ処理により得られた実行結果をそのまま用いて後段の処理を行う。   Further, in this embodiment, it is not determined whether the input value in the safety application process exceeds a preset upper limit value or lower limit value, and the execution result obtained by the safety application process is used as it is. Process.

中間処理部13は、1回目の安全アプリ処理部12−1における安全アプリ処理の後に、その処理結果を処理結果1次処理退避領域24に退避する。また、中間処理部13は、処理結果初期退避領域23のデータにより初期状態を復元し、そのデータを用いて安全アプリ処理部12−2における2回目の安全アプリ処理を起動して実行させる。   The intermediate processing unit 13 saves the processing result in the processing result primary processing saving area 24 after the safety application processing in the first safety application processing unit 12-1. Further, the intermediate processing unit 13 restores the initial state based on the data in the processing result initial saving area 23, and uses the data to start and execute the second safety application process in the safety application processing unit 12-2.

第1後処理部14は、上述した安全アプリ処理部12−1における1回目の処理結果と、安全アプリ処理部12−2における2回目の処理結果とが一致しているか否かを判断する。第1後処理部14は、上述した判断の結果、1回目と2回目の処理結果が一致していれば、ソフトエラーは発生していないと判断する。   The first post-processing unit 14 determines whether or not the first processing result in the above-described safety application processing unit 12-1 matches the second processing result in the safety application processing unit 12-2. As a result of the determination described above, the first post-processing unit 14 determines that a soft error has not occurred if the first and second processing results match.

なお、通常、1回目と2回目の処理タイミングが異なるため、その時間の違いにより入力されるアナログデータ等に誤差が生じる。具体的に説明すると、例えば、プラント等であれば、最初の起動時と起動後においては、その温度や圧力に違いが生じる。更に、ダイバース診断手法により1回目と2回目で異なるプログラム等を用いて処理を実行した場合にも数値の有効桁数(固定小数点、浮動小数点等)による誤差が発生する。そのため、本実施形態では、誤差範囲を予め計算等により設定しておき、誤差の範囲内なら一致とみなす。   Since the first and second processing timings are usually different, an error occurs in input analog data or the like due to the difference in time. More specifically, for example, in the case of a plant or the like, a difference occurs in temperature and pressure at the time of initial startup and after startup. Further, even when processing is executed using different programs for the first time and the second time by the divers diagnosis method, an error due to the effective number of digits (fixed point, floating point, etc.) occurs. Therefore, in the present embodiment, an error range is set in advance by calculation or the like, and if it is within the error range, it is regarded as a match.

つまり、第1後処理部14は、1回目と2回目の処理結果とが一致していない場合、その誤差が所定の誤差範囲内であるか否かを判断する。なお、誤差範囲内であるか否かの判断は、例えば、管理テーブル21に予め設定されている処理結果誤差範囲のデータに基づいて判断することができる。また、ディジタルデータの入力についても誤差が発生するが、その場合には後述する3回目の安全アプリ処理を実行し、多数決により処理結果を確定することができる。   That is, when the first and second processing results do not match, the first post-processing unit 14 determines whether or not the error is within a predetermined error range. The determination as to whether or not the error is within the error range can be made based on, for example, processing result error range data set in advance in the management table 21. An error also occurs in the input of digital data. In this case, a third safety application process, which will be described later, is executed, and the processing result can be determined by majority vote.

ここで、上述した安全アプリ処理は、複数のタスクが実行される場合もある。そのため、1回目と2回目の処理結果には、それぞれ複数のタスクによる実行結果が含まれている場合がある。その場合、第1後処理部14は、1回目と2回目の安全アプリ処理によって得られた複数のタスクのそれぞれの実行結果に対して上述した一致の判断を行う。したがって、第1後処理部14は、例えば、処理結果が一致する場合又は所定の誤差範囲内である場合には「〇」とし、それ以外の場合には「×」として、全てのタスク毎の判断結果を多数決処理することで、安全アプリ処理における実行結果が一致しているか否かを判断することができる。   Here, in the above-described safety application process, a plurality of tasks may be executed. Therefore, the first and second processing results may include execution results from a plurality of tasks, respectively. In that case, the first post-processing unit 14 performs the above-described matching determination on the execution results of the plurality of tasks obtained by the first and second safety application processes. Therefore, the first post-processing unit 14 sets, for example, “◯” when the processing results match or within a predetermined error range, and “x” otherwise, for each task. By performing majority processing on the determination result, it is possible to determine whether or not the execution results in the safety application processing match.

また、第1後処理部14は、上述した判断の結果、1回目と2回目の処理結果が一致しておらず、また所定の誤差範囲内に含まれない場合に、第2後処理部15により多数決処理を行うために安全アプリ処理部12−3における3回目の安全アプリ処理を起動して実行させる。   Further, the first post-processing unit 14 determines that the second post-processing unit 15 when the first and second processing results do not match and is not included in the predetermined error range as a result of the determination described above. The third safety application process in the safety application processing unit 12-3 is activated and executed in order to perform the majority process.

第2後処理部15は、第1後処理部14において、1回目と2回目の処理結果が、一致しておらず、また所定の誤差範囲にない場合に、安全アプリ処理部12−3における処理結果に基づいて、上述した1回目及び2回目の処理結果と、3回目の処理結果とを用いて、多数決により処理結果を確定する。ここでの多数決処理としては、上述したように、その処理結果が一致している場合又は所定の誤差範囲内である場合には「○」とし、それ以外の場合には「×」として、「○」の数が多ければ処理結果が正常であると判断する。   The second post-processing unit 15 uses the safety application processing unit 12-3 when the first and second processing results in the first post-processing unit 14 do not match and are not within a predetermined error range. Based on the processing result, the processing result is determined by majority using the first and second processing results and the third processing result. As described above, the majority processing here is “◯” when the processing results are coincident or within a predetermined error range, and “x” in other cases, “ If the number of “◯” is large, it is determined that the processing result is normal.

なお、上述したように、安全アプリ処理部12−1〜12−3における処理には、複数のタスクを含む場合もあるため、その場合には、上述したように全てのタスク毎の判断結果を多数決することで、その結果が一致しているか否かを判断する。   As described above, the processes in the safety application processing units 12-1 to 12-3 may include a plurality of tasks. In this case, the determination results for all the tasks are displayed as described above. By voting the majority, it is determined whether the results match.

ここで、第2後処理部15は、1回目〜3回目の安全アプリ処理による処理結果が多数決に達しない場合、すなわち上記の例でいえば「×」の数が「〇」の数より多い場合には、修復できないソフトエラーであると判断して予め設定されたエラー処理を行う。なお、エラー処理としては、例えば、CPU10における動作を停止させたり、その後の自己診断・他処理部16における処理に制限を加えたりしてもよく、またエラーメッセージをメモリ20の処理結果領域22に格納したり、自己診断装置1が有する画面等に表示したり、警報を出力したりすることができる。   Here, the second post-processing unit 15 has a case where the result of the first to third safety application processes does not reach the majority, that is, in the above example, the number of “x” is larger than the number of “◯”. In this case, it is determined that the soft error cannot be repaired, and preset error processing is performed. As error processing, for example, the operation in the CPU 10 may be stopped, the processing in the subsequent self-diagnosis / other processing unit 16 may be restricted, and an error message is stored in the processing result area 22 of the memory 20. It can be stored, displayed on the screen of the self-diagnosis device 1 or an alarm can be output.

また、第2後処理部15は、1回目〜3回目の安全アプリ処理による処理結果が多数決に達した場合には、例えば1回目〜3回目の処理結果の1つに「×」の判断があったとしても、その処理結果を正常として補正する。   Further, when the processing result of the first to third safety application processing reaches a majority decision, the second post-processing unit 15 determines “x” as one of the first to third processing results, for example. If there is, correct the processing result as normal.

なお、上述したように第1後処理部14において、1回目と2回目の処理結果が一致した場合又は処理の誤差範囲である場合には、正常であるとして、その処理周期においては、図1に示すように上述した安全アプリ処理部12−3における安全アプリ処理や第2後処理部15の処理は行わない。   As described above, in the first post-processing unit 14, when the first and second processing results coincide with each other or within the error range of the processing, it is assumed that the processing is normal. As shown in FIG. 4, the safety application processing in the above-described safety application processing unit 12-3 and the processing of the second post-processing unit 15 are not performed.

自己診断・他処理部16は、例えば上述した安全アプリ処理による安全機能以外にける本装置の安全機能を果たす上で必要となるCPU10やメモリ20等の安全関連系についての自己診断処理や伝送処理、若しくは非安全機能等の処理を行う。具体的には、自己診断・他処理部16は、例えばRAM(Random Access Memory)の自己診断やROM(Read Only Memory)のCRC(Cyclic Redundancy Check)演算による自己診断の処理等が行われるが、本発明においてはこれに限定されるものではない。   The self-diagnosis / other processing unit 16 performs self-diagnosis processing and transmission processing on safety-related systems such as the CPU 10 and the memory 20 that are necessary for fulfilling the safety function of the apparatus other than the safety function by the safety application processing described above, for example. Or, process non-safety functions. Specifically, the self-diagnosis / other processing unit 16 performs, for example, a self-diagnosis process by a RAM (Random Access Memory) self-diagnosis or a ROM (Read Only Memory) CRC (Cyclic Redundancy Check) operation. The present invention is not limited to this.

また、本実施形態のメモリ20において、管理テーブル21は、本実施形態を実現するための各種データが格納する領域であり、例えばアナログ入力処理結果誤差や退避領域等のデータが管理される。なお、本実施形態における管理テーブルの詳細については後述する。   In the memory 20 of the present embodiment, the management table 21 is an area for storing various data for realizing the present embodiment. For example, data such as an analog input processing result error and a save area are managed. Details of the management table in the present embodiment will be described later.

処理結果領域22は、上述した安全アプリ処理部12−1〜12−3における安全アプリ処理の処理結果が書き込まれる領域である。なお、処理結果領域22は、連続した領域である必要はない。また、処理結果領域22に含まれるデータにおいては、処理中に一時的に発生する変数等のデータは、対象外とする。   The process result area 22 is an area in which the process results of the safety application process in the above-described safety application processing units 12-1 to 12-3 are written. Note that the processing result area 22 does not have to be a continuous area. In addition, in the data included in the processing result area 22, data such as variables temporarily generated during processing is excluded.

処理結果初期退避領域23は、処理周期開始時の処理結果領域のデータを退避する領域である。処理結果1次退避領域24は、安全アプリ処理部12−1における処理結果を退避する領域である。処理結果2次退避領域25は、安全アプリ処理部12−2における処理結果を退避する領域である。   The processing result initial saving area 23 is an area for saving data in the processing result area at the start of the processing cycle. The processing result primary saving area 24 is an area for saving the processing result in the safety application processing unit 12-1. The processing result secondary saving area 25 is an area for saving the processing result in the safety application processing unit 12-2.

ここで、本実施形態における自己診断処理では、3回の安全アプリ処理による処理結果を多数決処理する例を示している。つまり、本実施形態では、奇数回の実行により「〇」、「×」の何れかの数が必ず多くなるため、正常や異常かを容易に判断することができる。なお、本発明においてはこれに限定されるものではなく、偶数回実行されてもよい。偶数回実行される場合には、例えば「〇」、「×」の数が同一であれば、安全性を優先し「異常」とみなすといった処理を行うことで、適切に判断することもできる。また、安全アプリ処理の回数に応じて安全アプリ処理部12やメモリ20における処理結果の退避領域(処理結果初期退避領域21,処理結果1次退避領域22,処理結果2次退避領域22)の数も適宜調整される。   Here, in the self-diagnosis process in the present embodiment, an example is shown in which majority processing is performed on the processing results of three safety application processes. In other words, in the present embodiment, any number of “◯” and “×” always increases due to the odd number of executions, so it is possible to easily determine whether it is normal or abnormal. Note that the present invention is not limited to this, and may be executed an even number of times. When executed even times, for example, if the numbers of “◯” and “x” are the same, it is possible to make an appropriate determination by performing a process of giving priority to safety and considering “abnormal”. In addition, the number of save areas (process result initial save area 21, process result primary save area 22, process result secondary save area 22) in the safety application processing unit 12 and the memory 20 according to the number of safety application processes. Is adjusted as appropriate.

本実施形態では、上述した安全機能を実行する安全アプリ処理を、予め決めた一定の周期、一定の順序で動作させる方式を採用する。したがって、本実施形態では、一定の周期の間に正常時には2回、異常時には3回以上の安全アプリ処理が実行されることになる。   In the present embodiment, a system is adopted in which the safety application process for executing the above-described safety function is operated in a predetermined cycle and in a predetermined order. Therefore, in the present embodiment, the safety application process is executed twice during normal times and three times or more during abnormal times during a certain period.

また、本実施形態では、メモリ20に処理結果領域21と処理結果初期退避領域21と処理結果N次処理退避領域とを設ける。なお、Nは、N=M−1の関係とする。したがって、本実施形態では、3回目以上で最大M回まで安全アプリ処理を実行することも可能である。   In the present embodiment, the memory 20 is provided with a processing result area 21, a processing result initial saving area 21, and a processing result N-order processing saving area. Note that N has a relationship of N = M−1. Therefore, in the present embodiment, the safety application process can be executed up to M times at the third time or more.

ここで、M回目の当該処理の結果と、1回目からM−1回目のデータを処理結果1次処理退避領域から処理結果N次処理退避領域のデータにより多数決原理に従って判定し、多数決データを安全アプリの処理結果とする。また、安全アプリ処理の1回目からM回目の処理をダイバース診断手法により処理する場合は、その実施される安全アプリ処理の内容を適宜変更することで、ソフトエラーや発振によるエラーだけでなく、診断対象における固着や断線、ドリフトエラー等を検出することができる。   Here, the result of the M-th processing and the data from the first time to the (M-1) th time are determined according to the majority rule based on the data in the processing result primary process save area to the process result N-order process save area, and the majority data is safely The processing result of the application. In addition, when the first to Mth safety application processes are processed by the diversity diagnosis method, the contents of the safety application process to be executed are changed as appropriate to diagnose not only soft errors and errors due to oscillation, but also diagnosis. It is possible to detect sticking, disconnection, drift error, etc. in the object.

<管理テーブル21の具体例>
ここで、上述した本実施形態における管理テーブル21の具体例について説明する。図2は、本実施形態における管理テーブルの一例を示す図である。図2に示す管理テーブルは、(a)アナログ入力処理結果誤差、(b)退避領域管理テーブル、(c)後処理テーブルを含む各情報がテーブルとして格納されている。また、図2(a)〜(c)における「処理結果」の項目は、安全アプリ処理毎に実行される1又は複数のタスク処理に対する処理結果等を示している。
<Specific Example of Management Table 21>
Here, a specific example of the management table 21 in the above-described embodiment will be described. FIG. 2 is a diagram illustrating an example of a management table in the present embodiment. The management table shown in FIG. 2 stores information including (a) analog input processing result error, (b) save area management table, and (c) post-processing table. In addition, the item “processing result” in FIGS. 2A to 2C indicates a processing result for one or a plurality of task processes executed for each safety application process.

管理テーブル21において、(a)アナログ入力処理結果誤差は、予め安全アプリ処理の処理時刻のズレによるアナログ入力の誤差を設定しておくデータである。ここで、(a)アナログ入力処理結果誤差における具体的なデータ項目としては、例えば、「処理結果」、及び「処理結果誤差」等のデータが格納され、具体的には、「処理結果」と「処理結果誤差」との組で格納される。なお、図2(a)の例ではタスク1処理結果2に対する誤差を「0.1℃」とし、タスク3処理結果1に対する誤差を「0.1mV」としている。このように、タスク毎に上述した誤差範囲を詳細に設定することができる。   In the management table 21, (a) analog input processing result error is data in which an analog input error due to a shift in processing time of the safety application processing is set in advance. Here, (a) as specific data items in the analog input processing result error, for example, data such as “processing result” and “processing result error” are stored. Stored in a pair with “processing result error”. In the example of FIG. 2A, the error with respect to the task 1 processing result 2 is “0.1 ° C.”, and the error with respect to the task 3 processing result 1 is “0.1 mV”. In this way, the error range described above can be set in detail for each task.

また、管理テーブル21において、(b)退避領域管理テーブルは、処理結果領域の各データについてのアドレスとバイト数を予め設定し、それに対応する初期退避領域、1次処理退避領域、2次処理退避領域のアドレスを予め設定するテーブルである。ここで、(b)退避領域管理テーブルにおける具体的なデータ項目としては、例えば、「処理結果」、「処理結果領域数(アドレス)」、「処理結果領域数(バイト)」、「初期退避領域アドレス」、「1次処理退避領域アドレス」、「2次処理退避領域アドレス」等のデータが格納される。なお、格納されるデータの内容や形式については、特に制限されるものではなく、各アドレスに基づいて必要なデータを所定の退避領域から読み出したり、処理後のデータを所定の退避領域に書き込んだりするための管理情報であればよい。   Also, in the management table 21, (b) the save area management table presets the address and the number of bytes for each data in the process result area, and the corresponding initial save area, primary process save area, and secondary process save It is a table which presets the address of a field. Here, as specific data items in (b) save area management table, for example, “processing result”, “number of process result areas (address)”, “number of process result areas (bytes)”, “initial save area” Data such as “address”, “primary processing save area address”, and “secondary process save area address” are stored. The contents and format of the stored data are not particularly limited, and necessary data is read from a predetermined save area based on each address, or processed data is written to a predetermined save area. Any management information may be used.

また、管理テーブル21において、(c)後処理テーブルは、上述した第1後処理部14、及び第2後処理部15に示すような後処理で起動する各安全アプリの各タスクに対応して、例えばディジタル出力をしてフィードバックを確認する等の処理プロブラムを設置する。なお、第1後処理部14及び第2後処理部15における各後処理は、上述した安全アプリ処理部と同様に2回実施し結果の一致を確認する。また、一致しない場合は、安全アプリ処理を3回以上実施し、その結果に対して多数決処理を行う等のソフトエラー対策を行う。   Further, in the management table 21, (c) the post-processing table corresponds to each task of each safety application that is activated in the post-processing as shown in the first post-processing unit 14 and the second post-processing unit 15 described above. For example, a processing program for confirming feedback by digital output is installed. In addition, each post-process in the 1st post-process part 14 and the 2nd post-process part 15 is implemented twice similarly to the safety application process part mentioned above, and confirms a match of a result. If they do not match, the safety application process is performed three or more times, and soft error countermeasures such as majority processing are performed on the result.

<処理結果領域22の具体例>
次に、上述した本実施形態における処理結果領域22の具体例について説明する。図3は、処理結果領域の構成を説明するための図である。なお、図3に示す処理結果領域22では、実行された安全アプリ処理における各タスクの処理結果が格納される。なお、処理結果領域22は、連続領域である必要はない。また、図3に示すように処理結果領域22に格納される処理結果には、一定周期を管理するために処理周期毎に加算するカウンタ等も含まれる。
<Specific Example of Processing Result Area 22>
Next, a specific example of the processing result area 22 in the above-described embodiment will be described. FIG. 3 is a diagram for explaining the configuration of the processing result area. In the processing result area 22 shown in FIG. 3, the processing result of each task in the executed safety application processing is stored. Note that the processing result area 22 does not have to be a continuous area. Further, as shown in FIG. 3, the processing result stored in the processing result area 22 includes a counter or the like that is added every processing cycle in order to manage a certain cycle.

<前処理>
次に、本実施形態における前処理部11における処理の具体例についてフローチャートを用いて説明する。図4は、本実施形態における前処理の一例を示すフローチャートである。なお、図4に示すフローチャートは、所定の処理周期に対応して定周期で起動される。
<Pretreatment>
Next, a specific example of processing in the preprocessing unit 11 in the present embodiment will be described using a flowchart. FIG. 4 is a flowchart illustrating an example of preprocessing in the present embodiment. In addition, the flowchart shown in FIG. 4 is started with a fixed period corresponding to a predetermined process period.

本実施形態における前処理では、上述した管理テーブル21を読み込み(S01)、処理結果領域のデータを処理結果初期退避領域へ退避する(S02)。   In the preprocessing in this embodiment, the management table 21 described above is read (S01), and the data in the processing result area is saved in the processing result initial saving area (S02).

<安全アプリケーション処理>
次に、本実施形態の安全アプリ処理部12−1、安全アプリ処理部12−2、及び安全アプリ処理部12−3における処理の具体例についてフローチャートを用いて説明する。図5は、本実施形態における安全アプリ処理の一例を示すフローチャートである。図5に示す安全アプリ処理は、安全機能に対応して予め設定された1又は複数のタスク等で構成される。なお、図5の例では、i個のタスクを有する場合について説明する。
<Safe application processing>
Next, specific examples of processing in the safety application processing unit 12-1, the safety application processing unit 12-2, and the safety application processing unit 12-3 according to the present embodiment will be described with reference to flowcharts. FIG. 5 is a flowchart showing an example of the safety application process in the present embodiment. The safety application process shown in FIG. 5 includes one or a plurality of tasks set in advance corresponding to the safety function. In the example of FIG. 5, a case where i tasks are provided will be described.

まず、タスク1の処理を行う(S11)。S11の処理では、データ(例えば、ディジタル入力、アナログ入力、定数、可変データ、処理結果領域のデータ等)を入力し(S11−1)、次に、例えば入力データに対する所定のプログラムの実行(例えば、温度計算、圧力計算、その他の数値計算等)による処理を行い(S11−2)、その処理結果を処理結果領域へ出力する(S11−3)。   First, task 1 is processed (S11). In the process of S11, data (for example, digital input, analog input, constant, variable data, data in the processing result area, etc.) is input (S11-1), and then, for example, execution of a predetermined program for the input data (for example, , Temperature calculation, pressure calculation, other numerical calculation, etc.) (S11-2), and outputs the processing result to the processing result area (S11-3).

また、S11の処理の後、次のタスク2の処理を行う(S12)。なお、タスク2では、上述したタスク1に示すような処理が行われる。したがって、例えば、タスク1では温度チェックを行い、タスク2では圧力チェック処理を行うといった予め設定されたタスク処理が行われる。その後、予め設定されたタスク数(図5の例では、タスクi)まで、予め設定された順序で実行される(S1i)。   Further, after the process of S11, the process of the next task 2 is performed (S12). In task 2, the process shown in task 1 described above is performed. Therefore, for example, a preset task process is performed in which task 1 performs a temperature check and task 2 performs a pressure check process. Thereafter, up to a preset number of tasks (task i in the example of FIG. 5) is executed in a preset order (S1i).

なお、図5に示す安全アプリ処理は、例えば上述した安全アプリ処理部12−1及び安全アプリ処理部12−2、更には安全アプリ処理部12−3において、上述したダイバース診断手法を用いて設定された条件に基づいて処理が行われる。なお、どのようなタスクを実行するかについては、診断対象等により予め設定され、例えばメモリ20の管理テーブル21等に格納することができる。   The safety application process shown in FIG. 5 is set by using the above-described diversity diagnosis method in the above-described safety application processing unit 12-1, the safety application processing unit 12-2, and further, the safety application processing unit 12-3, for example. Processing is performed based on the determined conditions. In addition, what kind of task is to be executed is set in advance depending on the diagnosis target or the like, and can be stored in the management table 21 of the memory 20, for example.

<中間処理>
次に、本実施形態の中間処理部13における処理の具体例について、フローチャートを用いて説明する。図6は、本実施形態における中間処理の一例を示すフローチャートである。図6に示す処理では、上述した管理テーブル21を読み込み(S21)、次に、処理結果領域のデータを処理結果1次処理退避領域24へ退避させる(S22)。また、処理結果初期退避領域23のデータを処理結果領域へ復元する(S23)。これにより、後述する第1後処理において、安全アプリ処理部12−1と安全アプリ処理部12−2との間で比較させることができる。
<Intermediate processing>
Next, a specific example of processing in the intermediate processing unit 13 of the present embodiment will be described using a flowchart. FIG. 6 is a flowchart illustrating an example of intermediate processing in the present embodiment. In the process shown in FIG. 6, the above-described management table 21 is read (S21), and then the data in the process result area is saved in the process result primary process save area 24 (S22). Further, the data in the processing result initial save area 23 is restored to the processing result area (S23). Thereby, in the 1st post-processing mentioned later, it can be made to compare between the safety application process part 12-1 and the safety application process part 12-2.

<第1後処理>
次に、本実施形態の第1後処理における処理の具体例について、フローチャートを用いて説明する。図7は、本実施形態における第1後処理の一例を示すフローチャートである。図7に示す第1後処理では、上述した管理テーブル21を読み込み(S31)、次に、処理結果領域のデータとそれに対応する1次処理退避領域のデータを比較する(S32)。
<First post-processing>
Next, a specific example of processing in the first post-processing of this embodiment will be described using a flowchart. FIG. 7 is a flowchart illustrating an example of the first post-processing in the present embodiment. In the first post-process shown in FIG. 7, the management table 21 described above is read (S31), and the data in the processing result area is compared with the data in the primary process save area corresponding to the data (S32).

ここで、データが一致するか否かを判断し(S33)、データが一致しない場合(S33において、NO)、次に、その一致していないデータが予め設定された誤差範囲内か否かを判断する(S34)。なお、誤差範囲内か否かの判断は、例えば上述した図2に示す管理テーブル21の(a)アナログ入力処理結果誤差の誤差内か否かにより判定することができる。   Here, it is determined whether or not the data match (S33). If the data does not match (NO in S33), then whether or not the mismatched data is within a preset error range. Judgment is made (S34). Whether or not the error is within the error range can be determined based on whether or not the error is within the error of (a) analog input processing result of the management table 21 shown in FIG.

上述したS33の処理において、比較したデータが一致した場合(S33において、YES)、又はS34の処理において、誤差範囲内である場合(S34において、YES)、例えば、図2の(c)に示す後処理テーブルの後処理を実行する(S35)。   In the above-described processing of S33, when the compared data match (YES in S33), or in the processing of S34, within the error range (YES in S34), for example, as shown in FIG. Post-processing of the post-processing table is executed (S35).

ここで、各タスクの全データについて比較したか否かを判断し(S36)、全データについて比較していない場合(S36において、NO)、S32に戻り以降の処理を行う。また、S36の処理において、全データについて比較した場合(S36において、YES)、自己診断・他処理を呼び出して終了する(S37)。   Here, it is determined whether or not all data of each task have been compared (S36). If all data has not been compared (NO in S36), the process returns to S32 and the subsequent processing is performed. If all the data are compared in the process of S36 (YES in S36), the self-diagnosis / other process is called and the process ends (S37).

また、上述したS34の処理において、誤差範囲内でない場合(S34において、NO)、処理結果領域のデータを処理結果2次処理退避領域へ退避する(S38)。また、処理結果初期退避領域のデータを処理結果領域へ復元し(S39)、上述した安全アプリ処理を呼び出して終了する(S40)。   If the error is not within the error range in the process of S34 described above (NO in S34), the data in the process result area is saved in the process result secondary process save area (S38). In addition, the data in the processing result initial saving area is restored to the processing result area (S39), and the above-described safety application process is called and terminated (S40).

<第2後処理>
次に、本実施形態の第2後処理における処理の具体例について、フローチャートを用いて説明する。図8は、本実施形態における第2後処理の一例を示すフローチャートである。図8に示す第2後処理では、まず、退避領域管理テーブルを読み込み(S51)、次に、処理結果領域のデータと、それに対応する1次処理退避領域のデータと、2次処理退避領域のデータとを比較する(S52)。
<Second post-processing>
Next, a specific example of processing in the second post-processing of this embodiment will be described using a flowchart. FIG. 8 is a flowchart illustrating an example of the second post-processing in the present embodiment. In the second post-process shown in FIG. 8, first, the save area management table is read (S51), then the data of the process result area, the data of the primary process save area corresponding thereto, and the secondary process save area The data is compared (S52).

ここで、上述3データのうち、何れか2データが一致するか否かを判断する(S53)。3データのうち、何れか2データが一致しない場合(S53において、NO)、次に、3データのうち、何れか2データが予め設定された誤差範囲内であるか否かを判断する(S54)。なお、誤差範囲内か否かの判断は、例えば上述した図2に示す管理テーブル21の(a)アナログ入力処理結果誤差の誤差内か否かにより判断することができる。   Here, it is determined whether or not any two of the above three data match (S53). If any two of the three data do not match (NO in S53), it is next determined whether any two of the three data are within a preset error range (S54). ). Whether or not the error is within the error range can be determined based on whether or not the error is within the error of (a) analog input processing result of the management table 21 shown in FIG.

上述したS53の処理において、何れか2データが一致する場合(S53において、YES)、又は、S54の処理において、何れか2データが誤差範囲内である場合(S54において、YES)、当該データを処理結果領域へ格納し(S55)、後処理テーブルの後処理を実行する(S56)。なお、S55において格納する当該データは、一致した2データのうちの1データとする。   If any two data match in the process of S53 described above (YES in S53), or if any two data are within the error range in the process of S54 (YES in S54), the data is The data is stored in the processing result area (S55), and post-processing of the post-processing table is executed (S56). Note that the data stored in S55 is one of the two matched data.

ここで、全データの比較が終了したか否かを判断し(S57)、全データの比較が終了していない場合(S57において、NO)、S52に戻り以降の処理を行う。   Here, it is determined whether or not the comparison of all data has been completed (S57). If the comparison of all data has not been completed (NO in S57), the process returns to S52 to perform the subsequent processing.

また、上述したS54の処理において、3データのうち、2データが誤差範囲内でない場合(S54において、NO)、エラー処理を実行する(S58)。なお、エラー処理とは、CPU異常と判定し、CPUを停止する等のCPUエラー処理を実行する。
また、S58又はS59の処理が終了後、自己診断・他処理を呼び出して終了する(S59)。
Further, in the above-described processing of S54, when two of the three data are not within the error range (NO in S54), error processing is executed (S58). Note that the error processing is determined as CPU abnormality, and CPU error processing such as stopping the CPU is executed.
Further, after the process of S58 or S59 is completed, the self-diagnosis / other process is called and the process ends (S59).

<タイミングチャート>
上述したように、本実施形態における処理結果を用いた自己診断処理については、予め設定された処理周期で繰り返し行われる。ここで、図9は、本実施形態における自己診断の各処理タイミングを説明するためのタイミングチャートである。なお、図9に示す例では、上述した第1後処理部15における処理において異常と判断された場合のタイミングチャートを示している。
<Timing chart>
As described above, the self-diagnosis processing using the processing result in the present embodiment is repeatedly performed at a preset processing cycle. Here, FIG. 9 is a timing chart for explaining each processing timing of the self-diagnosis in the present embodiment. Note that the example shown in FIG. 9 shows a timing chart when it is determined that there is an abnormality in the processing in the first post-processing unit 15 described above.

本実施形態では、図9に示すように、所定の処理周期(図9の例では、処理周期1,処理周期2)において、時間の経過と共に、「前処理」、「安全アプリ処理(1回目)」、「中間処理」、「安全アプリ処理(2回目)」、「第1後処理」、「安全アプリ処理(3回目)」、「第2後処理」、「自己診断・他処理」の順で実行される。   In the present embodiment, as shown in FIG. 9, in a predetermined processing cycle (in the example of FIG. 9, processing cycle 1 and processing cycle 2), “pre-processing” and “safety application processing (first time) with the passage of time. ) ”,“ Intermediate processing ”,“ safety application processing (second time) ”,“ first post-processing ”,“ safety application processing (third time) ”,“ second post-processing ”,“ self-diagnosis / other processing ” It is executed in order.

なお、第1後処理において、正常と判断された場合には、「安全アプリ処理(3回目)」及び「第2後処理」における処理は行わず、「第1後処理」の処理直後に「自己診断・他処理」が所定周期における残りの時間で行われる。   If it is determined that the first post-process is normal, the processes in the “safe application process (third time)” and the “second post-process” are not performed. The “self-diagnosis / other processing” is performed for the remaining time in the predetermined cycle.

なお、図9の例では、各処理周期においては、処理が終了してから次の周期が始まるまでの時間誤差等を吸収するための余裕時間が設けられている。また、本実施形態における処理周期は、図9に示すように2回に限定されるものではない。   In the example of FIG. 9, each processing cycle is provided with a margin time for absorbing a time error or the like from the end of the processing to the start of the next cycle. Further, the processing cycle in the present embodiment is not limited to twice as shown in FIG.

上述したように本発明によれば、安全かつ信頼性、可用性及びコスト面の改善を実現し、高精度に自己診断することができる。   As described above, according to the present invention, safety and reliability, availability, and cost can be improved, and self-diagnosis can be performed with high accuracy.

具体的には、本発明によれば、例えば、RAM等のソフトエラー(α線等によるデータ化けエラー)について、安全アプリ処理を複数回実行することによりCPUの冗長化やハードウェアの検出機構を用いずに低コストで検出することができる。また、安全アプリ処理を、ダイバース診断手法により処理することによりソフトエラー以外のCPUやメモリのエラーを検出することができ、自己診断処理を軽減することができる。また、本発明によれば、例えばCPUやメモリのソフトエラーを検知し多数決により補正することで、安全かつ信頼性、可用性及びコスト面を改善することができる。   Specifically, according to the present invention, for example, with respect to a soft error such as RAM (data corruption error due to α-rays, etc.), the CPU redundancy or hardware detection mechanism is implemented by executing the safety application process multiple times. It can be detected at low cost without using it. Further, by processing the safety application process using the diversity diagnosis method, it is possible to detect CPU and memory errors other than software errors, and to reduce the self-diagnosis process. Further, according to the present invention, for example, by detecting a soft error in the CPU or memory and correcting it by majority vote, it is possible to improve safety, reliability, availability, and cost.

また、本発明は、OSや市販ソフトウェア等、ブラックボックスのソフトウェアについても適用することができる。また、既存ソフトウェアを適用する場合にDouble RAM対応等のために処理に変更を加えることなく当該ソフトウェアを適用できる。また、自己診断や他の非安全関連処理は重複して処理する必要はなく、CPUの負荷を小さくすることができる。   The present invention can also be applied to black box software such as an OS and commercially available software. In addition, when existing software is applied, the software can be applied without changing the processing in order to support Double RAM. In addition, self-diagnosis and other non-safety related processes do not need to be repeated, and the load on the CPU can be reduced.

なお、本発明における自己診断装置は、例えば安全インバータや安全コントローラ、その他各種プラント等に適宜組み込んで実施することができる。   In addition, the self-diagnosis apparatus in the present invention can be implemented by being appropriately incorporated in, for example, a safety inverter, a safety controller, and other various plants.

以上本発明の好ましい実施例について詳述したが、本発明は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形、変更が可能である。   The preferred embodiments of the present invention have been described in detail above, but the present invention is not limited to such specific embodiments, and various modifications, within the scope of the gist of the present invention described in the claims, It can be changed.

1 自己診断装置
10 CPU
11 前処理部
12 安全アプリ処理部
13 中間処理部
14 第1後処理部
15 第2後処理部
16 自己診断・他処理部
20 メモリ
21 管理テーブル
22 処理結果領域
23 処理結果初期退避領域
24 処理結果1次処理退避領域
25 処理結果2次処理退避領域
1 Self-diagnosis device 10 CPU
DESCRIPTION OF SYMBOLS 11 Pre-processing part 12 Safety application processing part 13 Intermediate processing part 14 1st post-processing part 15 2nd post-processing part 16 Self-diagnosis and other processing part 20 Memory 21 Management table 22 Process result area 23 Process result initial save area 24 Process result Primary process save area 25 Process result secondary process save area

Claims (6)

一定周期内において予め設定されたアプリケーションによる処理を複数回実行し、実行された複数の処理結果を比較して自己診断を行う自己診断装置であって、
ダイバース診断手法により設定された条件で前記アプリケーションを複数回実行する安全アプリ処理部と、
前記安全アプリ処理部により得られる複数の処理結果を所定の退避領域に格納するメモリと、
前記メモリに格納された複数の処理結果を比較し、比較した結果が一致しているか又は所定の誤差範囲にあるかに基づいてエラーの有無を判断する第1後処理部とを有することを特徴とする自己診断装置。
A self-diagnosis device that executes a process by a preset application multiple times within a certain period and performs a self-diagnosis by comparing a plurality of executed process results,
A safety application processing unit that executes the application multiple times under conditions set by a divers diagnosis method;
A memory for storing a plurality of processing results obtained by the safety application processing unit in a predetermined save area;
A first post-processing unit that compares a plurality of processing results stored in the memory and determines whether there is an error based on whether the compared results match or are within a predetermined error range. Self-diagnosis device.
前記複数の処理結果を多数決することにより前記エラーの有無を判断する第2後処理部を有し、
前記安全アプリ処理部は、前記第1後処理部においてエラーであると判断した場合に、更に前記ダイバース診断手法により設定された条件で1又は複数の前記アプリケーションを実行して処理結果を取得し、
前記第2後処理部は、取得した前記処理結果と、前記メモリに格納された複数の処理結果とを用いて、前記多数決することにより処理結果を補正することを特徴とする請求項1に記載の自己診断装置。
A second post-processing unit that determines the presence or absence of the error by deciding a majority of the plurality of processing results;
When the safety application processing unit determines that there is an error in the first post-processing unit, the safety application processing unit further executes one or a plurality of the applications under the conditions set by the divers diagnosis method, and acquires a processing result,
The said 2nd post-processing part correct | amends a process result by the said majority decision using the acquired said process result and the several process result stored in the said memory, The said process result is characterized by the above-mentioned. Self-diagnosis device.
前記安全アプリケーション処理部は、予め設定された複数のタスクを実行し、
前記第1後処理部は、前記複数のタスクから得られた結果に対して多数決することにより前記エラーの有無を判断することを特徴とする請求項1又は2に記載の自己診断装置。
The safety application processing unit executes a plurality of preset tasks,
3. The self-diagnosis apparatus according to claim 1, wherein the first post-processing unit determines the presence or absence of the error by voting on a result obtained from the plurality of tasks.
一定周期内において予め設定されたアプリケーションによる処理を複数回実行し、実行された複数の処理結果を比較して自己診断を行う自己診断方法であって、
ダイバース診断手法により設定された条件で前記アプリケーションを複数回実行する安全アプリ処理ステップと、
前記安全アプリ処理ステップにより得られる複数の処理結果をメモリの所定の退避領域に格納する格納ステップと、
前記メモリに格納された複数の処理結果を比較し、比較した結果が一致しているか又は所定の誤差範囲にあるかに基づいてエラーの有無を判断する第1後処理ステップとを有することを特徴とする自己診断方法。
A self-diagnosis method for executing a process by a preset application multiple times within a certain period and performing a self-diagnosis by comparing a plurality of executed process results,
A safety application processing step of executing the application multiple times under conditions set by a divers diagnosis method;
A storage step of storing a plurality of processing results obtained by the safety application processing step in a predetermined save area of the memory;
A first post-processing step of comparing a plurality of processing results stored in the memory and determining whether or not there is an error based on whether the compared results match or are within a predetermined error range. Self-diagnosis method.
前記複数の処理結果を多数決することにより前記エラーの有無を判断する第2後処理ステップを有し、
前記安全アプリ処理ステップは、前記第1後処理ステップにおいてエラーであると判断した場合に、更に前記ダイバース診断手法により設定された条件で1又は複数の前記アプリケーションを実行して処理結果を取得し、
前記第2後処理ステップは、取得した前記処理結果と、前記メモリに格納された複数の処理結果とを用いて、前記多数決することにより処理結果を補正することを特徴とする請求項4に記載の自己診断方法。
A second post-processing step of determining the presence or absence of the error by deciding the majority of the plurality of processing results;
When the safety application processing step determines that there is an error in the first post-processing step, the safety application processing step further executes one or a plurality of the applications under conditions set by the divers diagnosis method, and acquires a processing result,
The said 2nd post-processing step correct | amends a process result by the said majority decision using the acquired said process result and the several process result stored in the said memory, The said process result is characterized by the above-mentioned. Self-diagnosis method.
前記安全アプリケーション処理ステップは、予め設定された複数のタスクを実行し、
前記第1後処理ステップは、前記複数のタスクから得られた結果に対して多数決することにより前記エラーの有無を判断することを特徴とする請求項4又は5に記載の自己診断方法。
The safety application processing step executes a plurality of preset tasks,
6. The self-diagnosis method according to claim 4, wherein the first post-processing step determines the presence or absence of the error by voting on a result obtained from the plurality of tasks.
JP2010070041A 2010-03-25 2010-03-25 Self-diagnosis device and self-diagnosis method Active JP5521684B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010070041A JP5521684B2 (en) 2010-03-25 2010-03-25 Self-diagnosis device and self-diagnosis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010070041A JP5521684B2 (en) 2010-03-25 2010-03-25 Self-diagnosis device and self-diagnosis method

Publications (2)

Publication Number Publication Date
JP2011203965A true JP2011203965A (en) 2011-10-13
JP5521684B2 JP5521684B2 (en) 2014-06-18

Family

ID=44880549

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010070041A Active JP5521684B2 (en) 2010-03-25 2010-03-25 Self-diagnosis device and self-diagnosis method

Country Status (1)

Country Link
JP (1) JP5521684B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60198645A (en) * 1984-03-22 1985-10-08 Fujitsu Ltd Data processing system
JPH05216771A (en) * 1991-09-18 1993-08-27 Internatl Business Mach Corp <Ibm> Method and apparatus for ensuring recovery possibility of important data in data processing apparatus
JPH11306083A (en) * 1998-04-21 1999-11-05 Fujitsu Ltd Data processor to deal with single event upset and its method
JP2006011576A (en) * 2004-06-23 2006-01-12 Hitachi Ltd High-reliability controller
JP2006252548A (en) * 2005-03-09 2006-09-21 Hewlett-Packard Development Co Lp Variable delay instruction for implementation of temporal redundancy
JP2009259126A (en) * 2008-04-18 2009-11-05 Dainippon Printing Co Ltd Method for detecting fault attack and security device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60198645A (en) * 1984-03-22 1985-10-08 Fujitsu Ltd Data processing system
JPH05216771A (en) * 1991-09-18 1993-08-27 Internatl Business Mach Corp <Ibm> Method and apparatus for ensuring recovery possibility of important data in data processing apparatus
JPH11306083A (en) * 1998-04-21 1999-11-05 Fujitsu Ltd Data processor to deal with single event upset and its method
JP2006011576A (en) * 2004-06-23 2006-01-12 Hitachi Ltd High-reliability controller
JP2006252548A (en) * 2005-03-09 2006-09-21 Hewlett-Packard Development Co Lp Variable delay instruction for implementation of temporal redundancy
JP2009259126A (en) * 2008-04-18 2009-11-05 Dainippon Printing Co Ltd Method for detecting fault attack and security device

Also Published As

Publication number Publication date
JP5521684B2 (en) 2014-06-18

Similar Documents

Publication Publication Date Title
US20130317780A1 (en) Probability of failure on demand calculation using fault tree approach for safety integrity level analysis
CN107463516B (en) Control device
US20190171197A1 (en) Automation System and Method for Error-Protected Acquisition of a Measured Value
US8255769B2 (en) Control apparatus and control method
CN110825561B (en) Control system and control device
CN115831213A (en) Detection method and device for checking processor, electronic equipment and storage medium
JP2013175118A (en) Control device, memory failure detection method thereof and self-diagnostic method thereof
KR20200062443A (en) Method for self diagnosis of ram error detection logic in powertrain ecu system and apparatus thereof
JP2012104064A (en) Failure diagnostic device for ram and program thereof
JP5521684B2 (en) Self-diagnosis device and self-diagnosis method
EP2624255B1 (en) Control device, and nuclear power plant control system
US11030028B2 (en) Failure detection apparatus, failure detection method, and non-transitory computer readable recording medium
JP6332134B2 (en) Memory diagnostic circuit
US10684908B2 (en) Method for fault detection in an operating system
WO2013094754A1 (en) Programmable control device, method and program
WO2020109252A1 (en) Test system and method for data analytics
WO2016103229A1 (en) A method for verifying a safety logic in an industrial process
JP5563700B2 (en) Control device
CN113986142B (en) Disk fault monitoring method, device, computer equipment and storage medium
JP5352815B2 (en) Control apparatus and control method
JP2018013816A (en) Memory diagnostic device
JP2011227646A (en) Computer diagnosis device and diagnosis method
JP2007257395A (en) Fault monitoring method for application
JP6405966B2 (en) Electronic control unit
JP2010211391A (en) Method and device for monitoring operation of cpu

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120313

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140212

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: 20140311

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140324

R150 Certificate of patent or registration of utility model

Ref document number: 5521684

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250