JPH02284248A - How to check memory contents - Google Patents
How to check memory contentsInfo
- Publication number
- JPH02284248A JPH02284248A JP1104436A JP10443689A JPH02284248A JP H02284248 A JPH02284248 A JP H02284248A JP 1104436 A JP1104436 A JP 1104436A JP 10443689 A JP10443689 A JP 10443689A JP H02284248 A JPH02284248 A JP H02284248A
- Authority
- JP
- Japan
- Prior art keywords
- data
- memory
- sum
- sum value
- processing part
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Detection And Correction Of Errors (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明はプログラマブルコントローラ等の電子制御装置
のメモリ内容(データ)のチェック方法に係り、特にデ
ータの置換によるデータ変化の検出に好適な正誤チェッ
ク方法に間する。[Detailed Description of the Invention] [Industrial Application Field] The present invention relates to a method for checking memory contents (data) of an electronic control device such as a programmable controller, and is particularly suitable for correctness checking suitable for detecting data changes due to data replacement. Find out how.
従来のこの種装置で行われているメモリ内容診断方法は
、特開昭56−68843号公報に記載のように、メモ
リ内の内容1バイトを8ビツトの2進数値として順次ア
ドレス順に加算して行き、指定されたバイト数を加算し
た時点での加算結果とあらかじめオフラインで計算し保
存されている診断用結果とを比較する。その結果が不一
致ならばメモリデータに変化があったものと判定してい
た。The conventional method for diagnosing the contents of memory in this type of device is as described in Japanese Patent Laid-Open No. 56-68843, in which one byte of contents in the memory is added as an 8-bit binary value in order of address. The result of adding the specified number of bytes is compared with the diagnostic result calculated offline and saved in advance. If the results do not match, it is determined that there has been a change in memory data.
上記従来技術では、特開昭56−68843号公報の第
1図のデータ1とデータNが入れかわった場合、入れか
えかない場合と加算結果が変わらず入れかわりを検知て
きないという問題があった。The above-mentioned prior art has a problem in that when data 1 and data N in FIG. 1 of Japanese Patent Application Laid-Open No. 56-68843 are swapped, the addition result is the same as when they are not swapped, and the swap is not detected.
プログラマブルコントローラでは、このようなデータの
入れかえをユーザの都合により行う場合がある。即ち、
ユーザの都合により入力端子、あるいは出力端子を変え
る場合があり、これに伴ってメモリ内のデータを入れか
えることになり、この場合のデータと端子の対応間係の
正誤が問題である。In a programmable controller, such data may be replaced at the convenience of the user. That is,
There are cases where the input terminal or the output terminal is changed due to the user's convenience, and the data in the memory is replaced accordingly, and the problem is whether the correspondence between the data and the terminal is correct or incorrect.
データの入れかえに誤りがあったことを発見できめまま
プログラマブルコントローラを動作させた場合、正しく
動作しないばかりか誤動作の仕方によっては非常に危険
なこともある。If a programmable controller is operated after discovering that there has been an error in replacing data, not only will it not operate correctly, but it may also be extremely dangerous depending on the manner in which it malfunctions.
本発明の目的は、この問題を解決するために、メモリ内
容の変化、特に単なるサム値(メモリデータの加算結果
)が同一なメモリデータの入れかわりがあった場合も、
検出できるようにしたことにある。The purpose of the present invention is to solve this problem, even when there is a change in memory contents, especially when memory data with the same sum value (result of addition of memory data) is replaced.
The reason is that it has been made detectable.
上記目的は、データを加算する場合、メモリデータが書
き込まれている場所毎に異なる固有の情報によりその場
所に書き込まれているデータを加工したのちに加算する
ことにより、達成される。The above object is achieved by, when adding data, processing the data written in each location using unique information that differs depending on the location where memory data is written, and then adding the data.
メモリデータが書き込まれている場所毎に異なる固有の
数は、メモリデータ固有の存在場所情報となる。そのた
め、あるメモリデータが池の場所に移れば、当然存在場
所情報も異なってしまうので、この固有の存在場所情報
により計算されろ加算値も異なり、同一になることはな
いので、正しく書き込みがなされなかったという書き込
みの誤動作を検出することが可能となる。The unique number, which differs for each location where memory data is written, becomes location information unique to the memory data. Therefore, if certain memory data is moved to the pond location, the location information will naturally change, so the added value will be calculated based on this unique location information and will never be the same, so it will not be written correctly. It becomes possible to detect malfunctions in writing.
以下、本発明の一実施例を第1図により説明する。 An embodiment of the present invention will be described below with reference to FIG.
プログラマブルコントローラのメモリ10はプログラマ
ブルコントローラの人出カモジュールに割り付けたI1
0ナンバーに対する110割り付は情報等を設定するた
めのデータエリア1と、データエリア1に設定した11
0割りけけにもとづいたI10ナンバーをオペランド部
に持ち、演算を行う命令のプログラムを記憶するための
ユーザープログラムエリア3と、データエリア3の正し
いサム値をあらかじめ記憶しておくサム記憶エリア2か
ら成る。20は演算処理ユニット(CPU)で、30は
CPU20とメモリ10の動作を制御するシステムプロ
グラムの記憶されたシステムメモリである。CPU20
は上記システムプログラムとユーザプログラムによって
シーケンス動作を実行する。The memory 10 of the programmable controller is I1 assigned to the person output module of the programmable controller.
The 110 allocation for the 0 number is data area 1 for setting information etc. and 11 set in data area 1.
It has an I10 number based on the 0 division in the operand section and consists of a user program area 3 for storing a program of instructions to perform calculations, and a sum storage area 2 for storing the correct sum value of the data area 3 in advance. . 20 is an arithmetic processing unit (CPU), and 30 is a system memory in which a system program for controlling the operations of the CPU 20 and the memory 10 is stored. CPU20
executes sequence operations using the system program and user program.
標準加算結果を標準加算結果記憶エリア2に書き込む場
合はメモリのデータエリア1のアドレスnからn+にの
メモリデータを順次読み出すためのアドレスカウンタI
(11)と、読み出したデータ格納場所毎に異なる固有
の数を掛は合わせるために固有の数を発生させるための
カウンタC(12)、加算の演算を行うためのサム演算
レジスタ14及び、これらカウンタ(11,12)とレ
ジスタ(14)およびサム値計算処理部13を用いて第
2図に示すフローチャートの処理手順の加算を行い、引
き続きサム値書き込み処理部21によってサム演算レジ
スタ14の内容をサム記憶エリア2に書き込む。第2図
でアドレスカウンタ■の内容とはメモリ10の各アドレ
スのデータで、カウンタの値とはl、2.・・・・・・
・・・という整数値である。When writing standard addition results to standard addition result storage area 2, address counter I is used to sequentially read memory data from addresses n to n+ of data area 1 of the memory.
(11), a counter C (12) for generating a unique number for multiplying or combining different unique numbers for each read data storage location, a sum calculation register 14 for performing an addition operation, and The counters (11, 12), the register (14), and the sum value calculation processing unit 13 are used to perform addition according to the processing procedure shown in the flowchart shown in FIG. Write to thumb memory area 2. In FIG. 2, the contents of the address counter ■ are data at each address in the memory 10, and the counter values are l, 2, .・・・・・・
... is an integer value.
上記動作はユーザプログラムエリア3に作成されたプロ
グラムによって制御される
データエリア1のアドレスnからn+にのメモリデータ
に対する加算値と記憶エリア2の内容の比較をする場合
はプログラマブルコントローラがユーザープログラムエ
リア3の内容に基づいて演算する時で、実際のシーケン
ス演算に入る前ここ上記サム計算処理部13で処理を行
い、サム値比較処理部22にて記憶エリア2の標準加算
結果とサム演算レジスタ14の内容の比較を行い、サム
値一致チェック(23)を行い結果を出力部24に出力
する。The above operation is controlled by the program created in the user program area 3. When comparing the added value for the memory data from addresses n to n+ of the data area 1 with the contents of the memory area 2, the programmable controller is controlled by the program created in the user program area 3. Before starting the actual sequence calculation, the sum calculation processing section 13 performs the processing, and the sum value comparison processing section 22 compares the standard addition result in the storage area 2 with the sum calculation register 14. The contents are compared, a sum value match check (23) is performed, and the result is output to the output section 24.
次に、上記チェック方式における効果を第3図、第4図
の具体例により説明する。Next, the effects of the above checking method will be explained using specific examples shown in FIGS. 3 and 4.
データエリア1のアドレスnからn+kにデータA(1
05)から順にデータK(106)まで設定した状態を
第3図とする。この時の加算値P(107)は第2図の
動作手順により
サム値P=nA+ (n+1)B+ (n+2)C+・
・・・・・・・・(n+k)K
=n (A+B+C+−・−・−・+IO十B+2C+
・・・・・・・・・十k K
となる。続いて第3図の状態からアドレスn+1のデー
タをC(109)、アドレスn+2のデータをB(11
0)に入れかえた状態を第3図とし、この時のサム値Q
(112)は第2図の動作手順により
サム値Q=nA+ (n+1)C+ (n+2)B+・
・・・・・+(n+k)K
=n (A+B+C+・・−・・・+K)+C+2B+
・・・・・・十k K
となる。Data A (1
FIG. 3 shows a state in which data K (106) is set sequentially from 05) to data K (106). The sum P=nA+ (n+1)B+ (n+2)C+ ·
・・・・・・・・・(n+k)K=n (A+B+C+−・−・−・+IO1B+2C+
......10k K. Next, from the state shown in FIG.
0) is shown in Figure 3, and the sum value Q at this time is
(112) is calculated by the operation procedure shown in Figure 2, and the sum value Q=nA+ (n+1)C+ (n+2)B+・
...+(n+k)K =n (A+B+C+...-...+K)+C+2B+
......10k K.
この結果、サム値P(107)とサム値Q(112)と
は異なるためデータの入れ替えがあったことが加算値に
確実に反映される。As a result, since the sum value P (107) and the sum value Q (112) are different, the fact that data has been replaced is surely reflected in the added value.
又、P=Qとなる条件は、上記計算式よりB=Cの時で
ある。しかし、BとCが等しければデータの入れ替りが
あっても、実質的には変わりがないため、サム値が変化
しなくても問題はない。Further, the condition for P=Q is when B=C according to the above calculation formula. However, if B and C are equal, there is no substantial change even if the data is swapped, so there is no problem even if the sum value does not change.
以上により、第1図のユーザプログラムエリア3に対し
、データエリア1にもとづいてプログラミングした時、
合わせてサム記憶エリア2に、上記方式に基づいて標準
加算結果をセットしておけばその後、データエリアIの
内容がいかに変更されようと、プログラマブルコントロ
ーラ演算前にデータエリア1のサム計算結果とサム記憶
エリア2の内容が一致していることによりデータの入れ
替えがないことを確認し演算を行うことにより、正しい
演算を行うことができる。As described above, when programming the user program area 3 in FIG. 1 based on the data area 1,
In addition, if the standard addition result is set in sum storage area 2 based on the above method, no matter how the contents of data area I are changed afterwards, the sum calculation result of data area 1 and the sum will be stored before the programmable controller calculation. Correct calculations can be performed by performing calculations after confirming that the contents of the storage areas 2 match and that no data has been replaced.
また、実施例を第5図により説明する。Further, an embodiment will be explained with reference to FIG.
前記実施例では、データ格納場所毎に異なる固有の数と
してカウンタ12のカウント値を用いたが、カウンタ値
の変わりにメモリ1oのデータを順次読み出すための既
存のPドレスカウンタ11】の値、即ちアドレスそのも
のを用い、前記実施例と同様の計算方式にて加算値を記
憶エリア2にセット、および比較のための現状のデータ
の加算をすることができる。本実施例では前記実施例と
比較して、データ格納場所毎に異なる固有の数を発生さ
せるためのカウンタC(12)が不要であること、カウ
ンタCが不要な分だけ加算値計算用プログラムが短くな
ること、及びサム値計算処理時間を短縮することができ
るなとの利点がある。In the above embodiment, the count value of the counter 12 is used as a unique number that differs for each data storage location, but instead of the counter value, the value of the existing P address counter 11] for sequentially reading out data from the memory 1o, i.e. Using the address itself, it is possible to set an addition value in the storage area 2 and add the current data for comparison using the same calculation method as in the previous embodiment. Compared to the previous embodiment, this embodiment does not require a counter C (12) for generating a unique number that differs for each data storage location, and the additional value calculation program is It has the advantage that it is shorter and the sum value calculation processing time can be shortened.
本発明によれば、メモリに格納されたデータの変化、デ
ータの入れかわりを確実にチェックを行うことができる
。According to the present invention, it is possible to reliably check changes in data stored in memory and replacement of data.
第1図は本発明の第一実施例のブロック図、第2図は本
発明実施例における加算手順を示すフローチャート、第
3図、第4図は本発明実施例における加算方式の具体例
説明図で、第3図はデータ入れかわり前の説明図、第4
図はデータ入れかわり後の説明図、第5図は第二実施例
における加算手順を示すフローチャートである。
1:データエリア、2:標準加算結果、3ニユーザブロ
グラムエリア、lO:メモリ、11:アトルスカウンタ
、12:カウンタ、13:サム計算処理部、14:サム
演算レジスタ、n、n+1゜・・・・・・n+k ニア
ドレス情報、順序を表わす情報。
第
図Fig. 1 is a block diagram of the first embodiment of the present invention, Fig. 2 is a flowchart showing the addition procedure in the embodiment of the present invention, and Figs. 3 and 4 are illustrations of specific examples of the addition method in the embodiment of the present invention. So, Figure 3 is an explanatory diagram before data replacement, Figure 4
The figure is an explanatory diagram after data replacement, and FIG. 5 is a flowchart showing the addition procedure in the second embodiment. 1: Data area, 2: Standard addition result, 3 User program area, lO: Memory, 11: Attle counter, 12: Counter, 13: Sum calculation processing unit, 14: Sum calculation register, n, n+1°・...n+k Near address information, information indicating order. Diagram
Claims (1)
じめ用意したチェック用の標準加算結果とを比較してメ
モリ内容の正誤をチェックする方法において、上記複数
データの加算に際し各データにその格納位置に対応する
固有情報の重み付をした状態で加算し、この加算結果と
上記あらかじめ用意したチェック用の標準加算結果とを
比較するようにしたことを特徴とするメモリ内容チェッ
ク方法。 2、上記標準加算結果は標準の複数データを構成する各
データにその格納位置に対応する固有情報の重み付けし
た状態で加算して用意されてなる請求項1記載のメモリ
内容チェック方法。 3、上記固有情報は上記各データの格納位置のアドレス
情報であることを特徴とする請求項1または2記載のメ
モリ内容チェック方法。 4、上記固有情報は上記各データの格納位置の順序を表
わす情報であることを特徴とする請求項1または2記載
のメモリ内容チェック方法。[Claims] 1. In a method for checking the correctness of memory contents by comparing the addition result of a plurality of data stored in a memory with a standard addition result for checking prepared in advance, each A memory content checking method characterized in that data is added with weighting of unique information corresponding to its storage location, and the addition result is compared with the standard addition result for checking prepared in advance. . 2. The memory content checking method according to claim 1, wherein the standard addition result is prepared by adding each data constituting the standard plurality of data weighted with unique information corresponding to its storage position. 3. The memory content checking method according to claim 1 or 2, wherein the unique information is address information of a storage location of each of the data. 4. The memory content checking method according to claim 1 or 2, wherein the unique information is information representing the order of storage positions of each of the data.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1104436A JPH02284248A (en) | 1989-04-26 | 1989-04-26 | How to check memory contents |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1104436A JPH02284248A (en) | 1989-04-26 | 1989-04-26 | How to check memory contents |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH02284248A true JPH02284248A (en) | 1990-11-21 |
Family
ID=14380614
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1104436A Pending JPH02284248A (en) | 1989-04-26 | 1989-04-26 | How to check memory contents |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH02284248A (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0713875A (en) * | 1993-06-28 | 1995-01-17 | Nec Corp | Method for checking write to rom |
| JPH087600A (en) * | 1994-06-22 | 1996-01-12 | Nec Corp | Checking circuit for writing in rom |
-
1989
- 1989-04-26 JP JP1104436A patent/JPH02284248A/en active Pending
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0713875A (en) * | 1993-06-28 | 1995-01-17 | Nec Corp | Method for checking write to rom |
| JPH087600A (en) * | 1994-06-22 | 1996-01-12 | Nec Corp | Checking circuit for writing in rom |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20080016415A1 (en) | Evaluation system and method | |
| JPS60159951A (en) | Tracing system in information processing device | |
| JPH04162300A (en) | Semiconductor memory | |
| JPS6049937B2 (en) | Microprogram controlled data processing device | |
| JP2600484B2 (en) | Programmable controller | |
| JPH0793505A (en) | Count integration device | |
| JP2007058450A (en) | Semiconductor integrated circuit | |
| JPH01162300A (en) | Rom checking circuit testing system | |
| JPH04342037A (en) | Operand checking system for program | |
| JP2906680B2 (en) | Microcomputer | |
| SU1524055A1 (en) | Device for checking programs | |
| JPH02207355A (en) | Memory readout system | |
| JPH03211619A (en) | Data processor | |
| JP2581214B2 (en) | Logic simulator | |
| EP0252042B1 (en) | Method and apparatus for determining in a computer which of a number of programmes are allowed to utilise a rapid access memory | |
| JPS59106017A (en) | Testing of input/output controller | |
| JPS61290585A (en) | Testing equipment for ic memory card simple substance | |
| JPH04286042A (en) | Protection method for data in memory test | |
| JPH04338847A (en) | Address conversion buffer diagnostic device | |
| JPH02108985A (en) | Counter test system | |
| JPH08235026A (en) | Cpu operation abnormality detection system | |
| JPS61210441A (en) | Bug detecting method for program | |
| JPH0359740A (en) | Memory fault detection system | |
| JPH01297733A (en) | System for diagnosing error detection circuit | |
| JPH02242436A (en) | Microprogram controller |