JP2006258453A - Encoder device, its parameter destruction self resetting device and parameter destruction self resetting method - Google Patents

Encoder device, its parameter destruction self resetting device and parameter destruction self resetting method Download PDF

Info

Publication number
JP2006258453A
JP2006258453A JP2005072659A JP2005072659A JP2006258453A JP 2006258453 A JP2006258453 A JP 2006258453A JP 2005072659 A JP2005072659 A JP 2005072659A JP 2005072659 A JP2005072659 A JP 2005072659A JP 2006258453 A JP2006258453 A JP 2006258453A
Authority
JP
Japan
Prior art keywords
data
memory device
external memory
encoder
microcomputer
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
JP2005072659A
Other languages
Japanese (ja)
Other versions
JP4640697B2 (en
Inventor
Takuya Okawa
拓也 大川
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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Corp
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 Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP2005072659A priority Critical patent/JP4640697B2/en
Publication of JP2006258453A publication Critical patent/JP2006258453A/en
Application granted granted Critical
Publication of JP4640697B2 publication Critical patent/JP4640697B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Transmission And Conversion Of Sensor Element Output (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an encoder device and its parameter destruction self resetting device and method for the same capable of recovering the parameter destruction caused by generated by malfunction of asoftware and capable of preventing a needless system stop without a countermeasure against the erroneous operation of an external memory device at the hardware side. <P>SOLUTION: The parameter destruction self resetting method is provided with a microcomputer 2 and external memory device 1, in which the microcomputer 2 is provided with the RAM part 3 for temporally storing the data read from the external memory device, and the backup part 6 for storing the backup of the external memory device 1. When the destruction of recorded information is detected, the information recorded in the external memory device 1 processes with the procedure for self resetting. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、回転体の回転量及び移動体の移動量を検出するエンコーダ装置およびそのパラメータ破壊自己復帰装置並びにパラメータ破壊自己復帰方法に関する。   The present invention relates to an encoder device that detects the amount of rotation of a rotating body and the amount of movement of a moving body, its parameter destruction self-recovery device, and a parameter destruction self-recovery method.

従来、回転体の回転量及び移動体の移動量を検出するエンコーダ装置には、製造出荷時において、製品毎に識別情報となるID、動作するための固有情報、アラーム検出対象情報等のパラメータ(内部データ)を記憶するためのEEPROM等の不揮発性メモリが搭載されている(例えば、特許文献1を参照)。
このようなエンコーダ装置に搭載のパラメータ記憶用EEPROMは、電源変動に弱い場合があり、イレギュラーな電源が印加された場合、内部データが破壊され、システム構成上、動作不可能となる場合があった。
上記エンコーダ装置のパラメータ破壊を防止する対策として、ハードウェア側で入出力端子部及び外部メモリデバイスの動作を制御するチップセレクト信号端子部において、電源が不確定状態となった際、各端子の入出力レベルが不安定状態とならない様、プルダウン抵抗を介して基準電位に接続する事によって、各端子の信号レベルが確実なレベルとなる様にしたものがある。
図3は従来技術の方法を適用したエンコーダ装置のマイクロコンピュータと外部メモリデバイスとの構成を示すブロック図である。
図3において、Eはエンコーダ装置、1は外部メモリデバイス、2はマイクロコンピュータ、3はRAM部、4はプログラム部である。
外部メモリデバイス1は、エンコーダが動作するための固有情報、識別情報等が記憶されたものであり、その入出力は図3に示すごとく、制御データラインを介してマイクロコンピュータ2の入出力ポートに接続されている。また、マイクロコンピュータ2は、エンコーダが動作するために必要なプログラム部4と、外部メモリデバイス1から記憶されているデータを読み出し、一時的に保管する為のRAM部3から構成される。
このような構成において、外部メモリデバイス1のチップセレクト信号端子に適当な値のプルダウン抵抗5を基準電位に接続して、電源が不確定状態においても確実にLレベルが印加され、外部メモリデバイス1がハードウェア面で誤動作、すなわち内部に記憶されているデータが破壊されない様にしている。
このように上記のエンコーダでは、外部メモリデバイス1が誤動作によって内部記憶データが破壊されない様、ハードウェア側にて、回路状態に左右される事無く入出力端子のレベルが確実に決まったレベルを印加するようにする事で誤動作、すなわちパラメータ破壊を防止するという手順がとられていた。
特許第3130069号
Conventionally, an encoder device that detects the amount of rotation of a rotating body and the amount of movement of a moving body includes parameters (such as ID as identification information for each product, unique information for operation, alarm detection target information, etc. at the time of manufacture and shipment). A nonvolatile memory such as an EEPROM for storing (internal data) is mounted (see, for example, Patent Document 1).
The parameter storage EEPROM installed in such an encoder device may be vulnerable to fluctuations in the power supply. When an irregular power supply is applied, internal data may be destroyed and the system configuration may become inoperable. It was.
As a measure to prevent parameter destruction of the encoder device, when the power is indeterminate in the input / output terminal section and the chip select signal terminal section that controls the operation of the external memory device on the hardware side, In order to prevent the output level from becoming unstable, there is a circuit in which the signal level at each terminal is ensured by connecting to a reference potential via a pull-down resistor.
FIG. 3 is a block diagram showing the configuration of the microcomputer and the external memory device of the encoder apparatus to which the method of the prior art is applied.
In FIG. 3, E is an encoder device, 1 is an external memory device, 2 is a microcomputer, 3 is a RAM section, and 4 is a program section.
The external memory device 1 stores specific information for operating the encoder, identification information, and the like, and its input / output is input to an input / output port of the microcomputer 2 via a control data line as shown in FIG. It is connected. The microcomputer 2 includes a program unit 4 necessary for the operation of the encoder, and a RAM unit 3 for reading out data stored from the external memory device 1 and temporarily storing the data.
In such a configuration, the pull-down resistor 5 having an appropriate value is connected to the reference potential at the chip select signal terminal of the external memory device 1, and the L level is reliably applied even when the power source is indeterminate. However, this prevents malfunctions in hardware, that is, prevents data stored inside from being destroyed.
As described above, in the above encoder, the level of the input / output terminal is applied on the hardware side without being affected by the circuit state so that the internal memory data is not destroyed by the malfunction of the external memory device 1. By doing so, a procedure was taken to prevent malfunction, that is, parameter destruction.
Japanese Patent No. 3130069

ところが、従来技術におけるハードウェア側で施したパラメータ破壊防止方法では、入出力端子にプルダウン抵抗を追加する構成にしているため、部品点数増加によりエンコーダ本体の小型化を妨げると共に、高価になるという問題があった。
また、半導体メモリの性格上、エンコーダに印加される電圧の条件によっては、ハードウェア側で施した対策のみではパラメータ破壊を完全に防げることはできないという問題もあった。
本発明はこのような問題点に鑑みてなされたものであり、ハードウェア側で外部メモリデバイスの誤動作防止対策を施さなくても、ソフトウェアにて誤動作によって発生したパラメータ破壊を自己復旧するが可能で、不要なシステム停止を防止することができるエンコーダ装置およびそのパラメータ破壊自己復帰装置並びにパラメータ破壊自己復帰方法を提供することを目的とする。
However, in the parameter destruction prevention method performed on the hardware side in the prior art, a configuration in which a pull-down resistor is added to the input / output terminals prevents the encoder body from being downsized due to an increase in the number of components, and is expensive. was there.
In addition, due to the nature of the semiconductor memory, depending on the condition of the voltage applied to the encoder, there is also a problem that parameter destruction cannot be completely prevented only by measures taken on the hardware side.
The present invention has been made in view of such problems, and it is possible to self-recover parameter destruction caused by malfunction in software without taking measures to prevent malfunction of the external memory device on the hardware side. An object of the present invention is to provide an encoder device, a parameter destruction self-recovery device, and a parameter destruction self-recovery method that can prevent an unnecessary system stop.

上記問題を解決するため、本発明は、次のようにしたのである。
請求項1に記載の発明は、回転体の回転量及び移動体の移動量を検出するエンコーダ装置において、エンコーダを動作させるための固有情報あるいは識別情報等が記憶された外部メモリデバイスと、前記外部メモリデバイスの入出力部との間で制御データラインを介して接続されたマイクロコンピュータと、を備え、前記マイクロコンピュータは、該エンコーダが動作するために必要なプログラム部と、前記外部メモリデバイスから記憶されているデータを読み出し、一時的に保管する為のRAM部と、前記外部メモリデバイスのバックアップを記憶するバックアップ部と、から構成されたことを特徴とする。
In order to solve the above problem, the present invention is as follows.
The invention according to claim 1 is an encoder device that detects the amount of rotation of a rotating body and the amount of movement of a moving body, an external memory device that stores unique information or identification information for operating the encoder, and the external device A microcomputer connected to an input / output unit of the memory device via a control data line, and the microcomputer stores a program unit necessary for the encoder to operate and stores from the external memory device It is characterized by comprising a RAM part for reading out and temporarily storing the stored data and a backup part for storing a backup of the external memory device.

また、請求項2に記載の発明は、エンコーダ装置のパラメータ破壊自己復帰装置に係るものであり、回転体の回転量及び移動体の移動量を検出するエンコーダ装置において、エンコーダを動作させるための固有情報あるいは識別情報等を記憶するための外部メモリデバイスからデータを読み出す手段と、前記外部メモリデバイスから読み出したデータを前記外部メモリデバイスの入出力部との間で接続されたマイクロコンピュータ内のRAM部へ一時的に記憶する手段と、データ照合処理対象となる照合データに今回読み出したデータを累積加算し、その結果を照合データとして更新する手段と、前記外部メモリデバイスの全ての領域を読み出したか否かの判定する手段と、前記外部メモリデバイスの全領域を読み出した場合には、該累積された照合データと、前記マイクロコンピュータ内に設けられて該エンコーダが動作するために必要なプログラム部上で規定されている規定値とが一致しているかの判定を行う手段と、前記外部メモリデバイスから読み出したデータで算出された照合データと、前記マイクロコンピュータにて規定された規定値を用いて、該規定値から該照合データを減算した値を、破棄された本来の値として定義すると共に、前記外部メモリデバイスに記録されている情報の破壊の有無を検出する手段と、前記マイクロコンピュータ内に設けられ、前記外部メモリデバイスのバックアップを記憶するバックアップ部のデータと、マイクロコンピュータ内のRAM部のデータを読み出す手段と、該バックアップ部のデータと、該RAM部のデータを比較する手段と、読み出した情報を前記外部メモリデバイスにエンコーダ自身で書き込み処理を行い、外部メモリデバイス内に記録された情報を自己復帰させる手段と、を備えたことを特徴とする。   The invention according to claim 2 relates to a parameter destruction self-recovery device for an encoder device, and is an inherent feature for operating an encoder in an encoder device that detects the amount of rotation of a rotating body and the amount of movement of a moving body. A RAM unit in the microcomputer in which data is read from an external memory device for storing information or identification information and the data read from the external memory device is connected to an input / output unit of the external memory device Means for temporarily storing data, means for cumulatively adding the data read this time to the collation data to be subjected to data collation processing, and updating the result as collation data, and whether all areas of the external memory device have been read And when the entire area of the external memory device is read out, A means for determining whether the collation data matches a specified value provided in the microcomputer and defined on a program unit required for the operation of the encoder; and from the external memory device Using the collation data calculated from the read data and the prescribed value prescribed by the microcomputer, the value obtained by subtracting the matching data from the prescribed value is defined as the original value discarded, and Means for detecting the presence or absence of destruction of information recorded in the external memory device, data in a backup unit provided in the microcomputer and storing a backup of the external memory device, and data in a RAM unit in the microcomputer Means for comparing the data in the backup unit and the data in the RAM unit The read information to write processing at the encoder itself in the external memory device, characterized by comprising means for the information recorded in the external memory device is self-resetting, the.

また、請求項3に記載の発明は、エンコーダ装置のパラメータ破壊自己復帰方法に係るものであり、回転体の回転量及び移動体の移動量を検出するエンコーダ装置において、エンコーダを動作させるための固有情報あるいは識別情報等を記憶するための外部メモリデバイスからデータを読み出すステップと、前記外部メモリデバイスから読み出したデータを前記外部メモリデバイスの入出力部との間で接続されたマイクロコンピュータ内のRAM部へ一時的に記憶するステップと、データ照合処理対象となる照合データに今回読み出したデータを累積加算し、その結果を照合データとして更新するステップと、前記外部メモリデバイスの全ての領域を読み出したか否かの判定するステップと、前記外部メモリデバイスの全領域を読み出した場合には、該累積された照合データと、前記マイクロコンピュータ内に設けられて該エンコーダが動作するために必要なプログラム部上で規定されている規定値とが一致しているかの判定を行うステップと、前記外部メモリデバイスから読み出したデータで算出された照合データと、前記マイクロコンピュータにて規定された規定値を用いて、該規定値から該照合データを減算した値を、破棄された本来の値として定義すると共に、前記外部メモリデバイスに記録されている情報の破壊の有無を検出するステップと、前記マイクロコンピュータ内に設けられ、前記外部メモリデバイスのバックアップを記憶するバックアップ部のデータと、マイクロコンピュータ内のRAM部のデータを読み出すステップと、該バックアップ部のデータと、該RAM部のデータを比較するステップと、読み出した情報を前記外部メモリデバイスにエンコーダ自身で書き込み処理を行い、外部メモリデバイス内に記録された情報を自己復帰するようにしたステップと、を備えたことを特徴とする。   The invention according to claim 3 relates to a parameter destruction self-recovery method of an encoder device, and is an inherent feature for operating an encoder in an encoder device that detects the amount of rotation of a rotating body and the amount of movement of a moving body. A RAM unit in a microcomputer connected between the step of reading data from an external memory device for storing information or identification information, and the data read from the external memory device between the input / output unit of the external memory device A step of temporarily storing the data, a step of accumulating the data read this time to the collation data to be subjected to data collation processing, and updating the result as collation data, and whether or not all areas of the external memory device have been read Determining whether or not all areas of the external memory device have been read Determining whether the accumulated collation data matches a specified value provided in the microcomputer and required for the operation of the encoder. The collation data calculated from the data read from the external memory device and the prescribed value prescribed by the microcomputer are used to subtract the value obtained by subtracting the matching data from the prescribed value. And detecting whether or not the information recorded in the external memory device is destroyed, data in a backup unit provided in the microcomputer and storing a backup of the external memory device, and the microcomputer A step of reading out the data of the RAM part in the internal memory, the data of the backup part, and the R A step of comparing the data in the M section, and a step of writing the read information into the external memory device by the encoder itself so as to self-recover the information recorded in the external memory device. It is characterized by.

請求項1に記載の発明によると、前記外部メモリデバイスに記憶されたデータが破壊された場合、前記マイクロコンピュータに記憶されたバックアップデータを用い、双方を照合する事により確実に破壊個所及び復旧するべきデータを求める事が出来、且つ、バックアップデータの信憑性も確認できる。   According to the first aspect of the present invention, when the data stored in the external memory device is destroyed, the destruction location and the recovery can be reliably performed by using the backup data stored in the microcomputer and comparing the two. The data that should be obtained can be obtained, and the authenticity of the backup data can also be confirmed.

更に、請求項2および3に記載の発明によると、前記破壊個所に復旧するべきデータをエンコーダ装置自身で書き換える事で、ハードウェア側でのデータ破壊対策を施さなくてもデータ破壊を防止することができる。   Furthermore, according to the inventions of claims 2 and 3, by rewriting data to be restored to the destruction location by the encoder device itself, data destruction can be prevented without taking measures against data destruction on the hardware side. Can do.

以下、本発明の実施例を図に基づいて具体的に説明する。なお、本発明の構成要素が従来技術と同じものついてはその説明を省略し、異なる点について説明する。   Embodiments of the present invention will be specifically described below with reference to the drawings. Note that the description of the same constituent elements of the present invention as those of the prior art will be omitted, and different points will be described.

図1は本発明の方法を実施するエンコーダ装置のマイクロコンピュータと外部メモリデバイスとの構成を示すブロック図である。
図1において、6はバックアップ部である。
本発明が従来技術と異なる点は以下のとおりである。
すなわち、マイクロコンピュータ2には、RAM部3とプログラム部4の他に、外部メモリデバイス1に記憶されているデータのバックアップを記録するバックアップ部6が設けられている点である。
FIG. 1 is a block diagram showing the configuration of a microcomputer and an external memory device of an encoder apparatus that implements the method of the present invention.
In FIG. 1, 6 is a backup unit.
The present invention is different from the prior art as follows.
That is, the microcomputer 2 is provided with a backup unit 6 for recording a backup of data stored in the external memory device 1 in addition to the RAM unit 3 and the program unit 4.

電源投入時に外部メモリデバイス1からエンコーダが動作するためのデータを読み出す。読み出す際、読み出し時にエンコーダが外乱ノイズ等により読み出し経路でデータが異常となる場合及び前記外部メモリデバイスが半導体デバイスである性格上、内部誤動作により予期しないデータに書き換わっている可能性があるため、データの整合性チェックとして、例えば読み出しデータ全ての和を求め、その結果がある決まった値(例えば、読み出したデータの総和が0になる等。)であれば読み出しに成功若しくは記憶データに異常が無いとして判定する。その後、マイクロコンピュータ2のRAM部3に記憶し、このRAM部3に記憶されたデータを用いてエンコーダが規定の動作を行えるようになる。
前記のデータの整合性チェックにおいて、何らかの原因で整合性が取れなかった場合においては、前記外部メモリデバイスに記憶されたデータをそのまま使用すると、エンコーダの動作に悪影響を及ぼす恐れがあるため、記憶されたデータが異常である旨をアラーム出力の形で外部に知らせるようにしている。
Data for operating the encoder is read from the external memory device 1 when the power is turned on. When reading, when the data becomes abnormal in the read path due to disturbance noise etc. at the time of reading and because the external memory device is a semiconductor device, there is a possibility that it has been rewritten to unexpected data due to internal malfunction. As a data consistency check, for example, the sum of all read data is obtained, and if the result is a certain value (for example, the sum of the read data becomes 0), the read is successful or the stored data is abnormal. Judge that there is no. Thereafter, the data is stored in the RAM unit 3 of the microcomputer 2, and the encoder can perform a prescribed operation using the data stored in the RAM unit 3.
In the data consistency check, if consistency is not achieved for some reason, using the data stored in the external memory device as it is may cause an adverse effect on the operation of the encoder. The alarm data is reported to the outside in the form of an alarm output.

図2のフローチャートを使って動作を説明する。
まず、ステップST1で外部メモリデバイス1からデータを読み出す。読み出す際のデータサイズは、搭載される外部メモリデバイスの仕様により異なる為、仕様にあったサイズで読み出しを行う。
The operation will be described with reference to the flowchart of FIG.
First, data is read from the external memory device 1 in step ST1. Since the data size at the time of reading varies depending on the specifications of the external memory device to be mounted, reading is performed with a size that meets the specifications.

ステップST2において、ステップST1で読み出したデータをマイクロコンピュータ2内のRAM部3へ記憶する。   In step ST2, the data read in step ST1 is stored in the RAM unit 3 in the microcomputer 2.

ステップST3において、データ照合処理として、照合データに今回読み出したデータを加算し、その結果を照合データに更新する。ここで、照合データとは、読み出したデータを累積加算した値を示す。   In step ST3, as the data collation process, the data read this time is added to the collation data, and the result is updated to the collation data. Here, the collation data indicates a value obtained by accumulating the read data.

ステップST4において、外部メモリデバイス1の全ての領域を読み出したか否かの判定を行う。全ての領域を読み出していない場合、ステップST1に戻り、外部メモリデバイス1の全領域を読み出すまで、前記一連の読み出し、照合データ演算、全領域読み出し判定を繰り返す。全ての領域を読み出した場合は、次のステップST5に移り、ステップST3の演算にて累積された照合データと、プログラム上で規定されている照合値が一致しているかの判定を行う。ここで、プログラム上で規定された照合値は、全ての読み出し値を加算した結果が、どのようなデータが外部メモリデバイス1に記憶されていたとしても、全てある特定の値となる様になっている必要がある。ステップST5の判定において、外部メモリデバイス1から読み出したデータで算出された照合データと、マイクロコンピュータ2にて規定された照合値が一致していれば、外部メモリデバイス1から、正しくデータ読み出しが完了し、且つ、正しいデータが記憶されているとして、本処理を終了する。前記照合データと、前記値が一致しなかった場合は、外部メモリデバイス1からの読み出しに失敗したか、外部メモリデバイス1の記憶データのうち、何れかのデータが破壊されていると判断し、ステップST6へ移る。   In step ST4, it is determined whether or not all areas of the external memory device 1 have been read. If all the areas have not been read, the process returns to step ST1, and the series of reading, collation data calculation, and all area reading determination are repeated until all the areas of the external memory device 1 are read. When all the areas have been read, the process proceeds to the next step ST5, where it is determined whether the collation data accumulated in the calculation of step ST3 matches the collation value defined in the program. Here, the collation values specified in the program are such that the result of adding all the read values becomes a specific value regardless of what data is stored in the external memory device 1. Need to be. If the collation data calculated from the data read from the external memory device 1 matches the collation value defined by the microcomputer 2 in the determination of step ST5, the data reading from the external memory device 1 is completed correctly. In addition, assuming that correct data is stored, this processing is terminated. If the collation data and the value do not match, it is determined that reading from the external memory device 1 has failed, or any of the stored data in the external memory device 1 has been destroyed, Move on to step ST6.

ステップST6以降にて、異常となった外部メモリデバイス1のデータ復旧を実施する。ステップST6にて、データを復旧する為、ステップST5で求まった照合データと、マイクロコンピュータ2にて規定された値を用いて、外部メモリデバイス1に記憶されている破壊されたデータの本来の値を求める。本来の値は、マイクロコンピュータ2にて規定されたデータから、ステップST5で求まった照合データを減算した結果が、破壊されたデータの本来の値として求まる。   After step ST6, data recovery of the abnormal external memory device 1 is performed. In step ST6, in order to recover the data, the original value of the destroyed data stored in the external memory device 1 using the collation data obtained in step ST5 and the value defined by the microcomputer 2 is used. Ask for. The original value is obtained as the original value of the destroyed data by subtracting the collation data obtained in step ST5 from the data defined by the microcomputer 2.

次にステップST7にて、マイクロコンピュータ2内のバックアップ部6のデータと、ステップST2にて記憶されたマイクロコンピュータ2内のRAM部3のデータを読み出す。   Next, in step ST7, the data in the backup unit 6 in the microcomputer 2 and the data in the RAM unit 3 in the microcomputer 2 stored in step ST2 are read.

ステップST8にて、ステップST6にて読み出したそれぞれのデータを比較する。それぞれのデータが一致すれば、マイクロコンピュータ2内のRAM部3に記憶されたデータは正しいとして、ステップST12に移る。それぞれのデータが不一致であった場合、その番地のデータが破壊されている可能性が高いとして、ステップST9へ移る。   In step ST8, the data read in step ST6 are compared. If the respective data match, the data stored in the RAM unit 3 in the microcomputer 2 is assumed to be correct, and the process proceeds to step ST12. If the data do not match, it is determined that there is a high possibility that the data at the address is destroyed, and the process proceeds to step ST9.

ステップST9にて、まず、ステップST5で求まった外部メモリデバイス1に記憶される本来の値と、マイクロコンピュータ2内のバックアップ部6のデータが合致しているかを比較する。合致していれば、ステップST10へ移り、外部メモリデバイス1の当該番地に、ステップST5で求まった本来の値を書き込む。合致していなければ、1番地のみならず、複数番地での破壊の可能性があるとして、ステップST11に移る。   In step ST9, first, the original value stored in the external memory device 1 obtained in step ST5 is compared with the data of the backup unit 6 in the microcomputer 2. If they match, the process moves to step ST10, and the original value obtained in step ST5 is written in the corresponding address of the external memory device 1. If they do not match, it is determined that there is a possibility of destruction not only at address 1 but also at a plurality of addresses, and the process moves to step ST11.

ステップST11では、マイクロコンピュータ2に搭載されるバックアップ部6のデータ信憑性を確認することを目的として、マイクロコンピュータ2内のバックアップ部6に記憶されているデータから、ステップST5で求まった照合データを減算し、この結果を仮の真の値として保持し、ステップST9へ戻る。そして、ステップST11で求まった仮の真の値と、バックアップ値と一致しているかを比較し、一致していればステップST10へ移る。一致していなければこの動作を繰り返し行い、複数番地でデータ破壊が起きた場合に対しても、各番地に対する真の値を算出し、その結果データ破壊の復旧を確実に行う事が可能となる。   In step ST11, for the purpose of confirming the data authenticity of the backup unit 6 mounted on the microcomputer 2, the verification data obtained in step ST5 is obtained from the data stored in the backup unit 6 in the microcomputer 2. Subtraction is performed, the result is held as a temporary true value, and the process returns to step ST9. Then, the provisional true value obtained in step ST11 is compared with the backup value. If they match, the process proceeds to step ST10. If they do not match, this operation is repeated, and even if data corruption occurs at multiple addresses, it is possible to calculate the true value for each address, and as a result, it is possible to reliably restore data corruption .

ステップST10にて真のデータを外部メモリデバイスに書き込んだ後、ステップST12にて、マイクロコンピュータ2内のバックアップ部6全ての領域をチェックしたかの判定を行い、全ての領域をチェックしていれば本処理を終了し、チェックしていなければ再度ステップST7に戻り、一連のデータ復旧処理を繰り返す。   After writing the true data to the external memory device in step ST10, it is determined in step ST12 whether all areas of the backup unit 6 in the microcomputer 2 have been checked, and if all areas have been checked. This process is terminated, and if not checked, the process returns to step ST7 again, and a series of data recovery processes are repeated.

この一連の処理を実施する事により、外部メモリデバイス1に記憶されたデータが、何らかの要因でデータ破壊が発生したとしても、マイクロコンピュータ2内のバックアップ部6のデータを用いてデータ破壊番地の特定を行い、且つデータ照合の為に算出された累積読み出しデータと、マイクロコンピュータ2で規定したデータを用いる事により、データ破壊が発生した番地の真のデータを求める事が出来る。求められた真のデータをデータ破壊発生個所に書き込む事により、ハードウェアでデータ破壊防止対策が無くともデータ破壊の復旧が可能となる。   By carrying out this series of processing, even if the data stored in the external memory device 1 is destroyed due to some reason, the data destruction address is specified using the data of the backup unit 6 in the microcomputer 2. By using the accumulated read data calculated for data collation and the data defined by the microcomputer 2, the true data at the address where the data destruction has occurred can be obtained. By writing the required true data to the location where the data destruction occurred, it is possible to recover from the data destruction even if there is no data destruction prevention measure by hardware.

本発明の方法を適用するエンコーダのマイクロコンピュータと外部メモリデバイスとの構成を示すブロック図The block diagram which shows the structure of the microcomputer of the encoder which applies the method of this invention, and an external memory device 本発明の第1の方法の処理手順を示すフローチャートThe flowchart which shows the process sequence of the 1st method of this invention. 従来の方法を適用したエンコーダ装置のマイクロコンピュータと外部メモリデバイスとの構成を示すブロック図Block diagram showing the configuration of the microcomputer and the external memory device of the encoder apparatus to which the conventional method is applied

符号の説明Explanation of symbols

1 外部メモリデバイス
2 マイクロコンピュータ
3 RAM部
4 プログラム部
5 プルダウン抵抗
6 バックアップ記憶部
1 External memory device 2 Microcomputer 3 RAM section 4 Program section 5 Pull-down resistor 6 Backup storage section

Claims (3)

回転体の回転量及び移動体の移動量を検出するエンコーダ装置(E)において、
エンコーダを動作させるための固有情報あるいは識別情報等が記憶された外部メモリデバイス(1)と、前記外部メモリデバイス(1)の入出力部との間で制御データラインを介して接続されたマイクロコンピュータ(2)と、を備え、
前記マイクロコンピュータ(2)は、該エンコーダが動作するために必要なプログラム部(4)と、前記外部メモリデバイス(1)から記憶されているデータを読み出し、一時的に保管する為のRAM部(3)と、前記外部メモリデバイス(1)のバックアップを記憶するバックアップ部(6)と、から構成されたことを特徴とするエンコーダ装置。
In the encoder device (E) for detecting the amount of rotation of the rotating body and the amount of movement of the moving body,
A microcomputer connected via a control data line between an external memory device (1) storing unique information or identification information for operating the encoder and the input / output unit of the external memory device (1) (2)
The microcomputer (2) includes a program unit (4) necessary for the operation of the encoder and a RAM unit (for reading and storing data stored from the external memory device (1)). 3) An encoder apparatus comprising: a backup unit (6) for storing a backup of the external memory device (1).
回転体の回転量及び移動体の移動量を検出するエンコーダ装置(E)において、
エンコーダを動作させるための固有情報あるいは識別情報等を記憶するための外部メモリデバイス(1)からデータを読み出す手段(ST1)と、
前記外部メモリデバイス(1)から読み出したデータを前記外部メモリデバイス(1)の入出力部との間で接続されたマイクロコンピュータ(2)内のRAM部(3)へ一時的に記憶する手段(ST2)と、
データ照合処理対象となる照合データに今回読み出したデータを累積加算し、その結果を照合データとして更新する手段(ST3)と、
前記外部メモリデバイス(1)の全ての領域を読み出したか否かの判定する手段(ST4)と、
前記外部メモリデバイス(1)の全領域を読み出した場合には、該累積された照合データと、前記マイクロコンピュータ(2)内に設けられて該エンコーダが動作するために必要なプログラム部(4)上で規定されている規定値とが一致しているかの判定を行う手段(ST5)と、
前記外部メモリデバイス(1)から読み出したデータで算出された照合データと、前記マイクロコンピュータ(2)にて規定された規定値を用いて、該規定値から該照合データを減算した値を、破棄された本来の値として定義すると共に、前記外部メモリデバイス(1)に記録されている情報の破壊の有無を検出する手段(ST6)と、
前記マイクロコンピュータ(2)内に設けられ、前記外部メモリデバイス(1)のバックアップを記憶するバックアップ部(6)のデータと、マイクロコンピュータ(2)内のRAM部(3)のデータを読み出す手段(ST7)と、
該バックアップ部(6)のデータと、該RAM部(3)のデータを比較する手段(ST8)と、
読み出した情報を前記外部メモリデバイス(1)にエンコーダ自身で書き込み処理を行い、外部メモリデバイス(1)内に記録された情報を自己復帰させる手段(ST9〜ST12)と、
を備えたことを特徴とするエンコーダ装置のパラメータ破壊自己復帰装置。
In the encoder device (E) for detecting the amount of rotation of the rotating body and the amount of movement of the moving body,
Means (ST1) for reading data from an external memory device (1) for storing unique information or identification information for operating the encoder;
Means for temporarily storing data read from the external memory device (1) in a RAM unit (3) in a microcomputer (2) connected to the input / output unit of the external memory device (1) ( ST2)
Means (ST3) for accumulatively adding the data read this time to the collation data to be subjected to data collation processing and updating the result as collation data;
Means (ST4) for determining whether or not all areas of the external memory device (1) have been read;
When the entire area of the external memory device (1) is read out, the accumulated collation data and a program unit (4) provided in the microcomputer (2) and necessary for the operation of the encoder Means (ST5) for determining whether or not the specified value defined above matches.
Using the verification data calculated from the data read from the external memory device (1) and the specified value specified by the microcomputer (2), the value obtained by subtracting the verification data from the specified value is discarded. Means (ST6) for detecting whether or not the information recorded in the external memory device (1) is destroyed,
Means (4) provided in the microcomputer (2) for reading the data of the backup unit (6) for storing the backup of the external memory device (1) and the data of the RAM unit (3) in the microcomputer (2). ST7)
Means (ST8) for comparing the data of the backup unit (6) with the data of the RAM unit (3);
Means (ST9-ST12) for writing the read information into the external memory device (1) by the encoder itself, and for self-recovering the information recorded in the external memory device (1);
A parameter destruction self-return device for an encoder device, comprising:
回転体の回転量及び移動体の移動量を検出するエンコーダ装置(E)において、
エンコーダを動作させるための固有情報あるいは識別情報等を記憶するための外部メモリデバイス(1)からデータを読み出すステップ(ST1)と、
前記外部メモリデバイス(1)から読み出したデータを前記外部メモリデバイス(1)の入出力部との間で接続されたマイクロコンピュータ(2)内のRAM部(3)へ一時的に記憶するステップ(ST2)と、
データ照合処理対象となる照合データに今回読み出したデータを累積加算し、その結果を照合データとして更新するステップ(ST3)と、
前記外部メモリデバイス(1)の全ての領域を読み出したか否かの判定するステップ(ST4)と、
前記外部メモリデバイス(1)の全領域を読み出した場合には、該累積された照合データと、前記マイクロコンピュータ(2)内に設けられて該エンコーダが動作するために必要なプログラム部(4)上で規定されている規定値とが一致しているかの判定を行うステップ(ST5)と、
前記外部メモリデバイス(1)から読み出したデータで算出された照合データと、前記マイクロコンピュータ(2)にて規定された規定値を用いて、該規定値から該照合データを減算した値を、破棄された本来の値として定義すると共に、前記外部メモリデバイス(1)に記録されている情報の破壊の有無を検出するステップ(ST6)と、
前記マイクロコンピュータ(2)内に設けられ、前記外部メモリデバイス(1)のバックアップを記憶するバックアップ部(6)のデータと、マイクロコンピュータ(2)内のRAM部(3)のデータを読み出すステップ(ST7)と、
該バックアップ部(6)のデータと、該RAM部(3)のデータを比較するステップ(ST8)と、
読み出した情報を前記外部メモリデバイス(1)にエンコーダ自身で書き込み処理を行い、外部メモリデバイス(1)内に記録された情報を自己復帰するようにしたステップ(ST9〜ST12)と、
を備えたことを特徴とするエンコーダ装置のパラメータ破壊自己復帰方法。
In the encoder device (E) for detecting the amount of rotation of the rotating body and the amount of movement of the moving body,
A step (ST1) of reading data from an external memory device (1) for storing unique information or identification information for operating the encoder;
A step of temporarily storing data read from the external memory device (1) in a RAM unit (3) in a microcomputer (2) connected to an input / output unit of the external memory device (1) ( ST2)
A step of cumulatively adding the data read this time to the collation data to be subjected to data collation processing, and updating the result as collation data (ST3);
Determining whether all areas of the external memory device (1) have been read (ST4);
When the entire area of the external memory device (1) is read out, the accumulated collation data and a program unit (4) provided in the microcomputer (2) and necessary for the operation of the encoder A step (ST5) of determining whether or not the specified value specified above matches.
Using the verification data calculated from the data read from the external memory device (1) and the specified value specified by the microcomputer (2), the value obtained by subtracting the verification data from the specified value is discarded. A step (ST6) of detecting whether or not information recorded in the external memory device (1) is destroyed,
A step of reading data of a backup unit (6) provided in the microcomputer (2) and storing a backup of the external memory device (1) and data of a RAM unit (3) in the microcomputer (2) ( ST7)
A step of comparing the data of the backup unit (6) and the data of the RAM unit (3) (ST8);
Steps (ST9 to ST12) in which the read information is written in the external memory device (1) by the encoder itself, and the information recorded in the external memory device (1) is self-recovered;
A parameter destruction self-returning method for an encoder device, comprising:
JP2005072659A 2005-03-15 2005-03-15 Encoder device, parameter destruction self-reset device, and parameter destruction self-reset method Expired - Fee Related JP4640697B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005072659A JP4640697B2 (en) 2005-03-15 2005-03-15 Encoder device, parameter destruction self-reset device, and parameter destruction self-reset method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005072659A JP4640697B2 (en) 2005-03-15 2005-03-15 Encoder device, parameter destruction self-reset device, and parameter destruction self-reset method

Publications (2)

Publication Number Publication Date
JP2006258453A true JP2006258453A (en) 2006-09-28
JP4640697B2 JP4640697B2 (en) 2011-03-02

Family

ID=37097901

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005072659A Expired - Fee Related JP4640697B2 (en) 2005-03-15 2005-03-15 Encoder device, parameter destruction self-reset device, and parameter destruction self-reset method

Country Status (1)

Country Link
JP (1) JP4640697B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7804427B1 (en) 2009-03-20 2010-09-28 Honda Motor Co., Ltd. Device and method for automatic reset of encoder
CN109633244A (en) * 2019-01-29 2019-04-16 苏州工业职业技术学院 A kind of Self-resetting ammeter

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04364551A (en) * 1991-06-12 1992-12-16 Yokogawa Electric Corp Memory duplicating device
JPH0612909U (en) * 1992-07-17 1994-02-18 株式会社ニコン Data backup device for surveying instrument
JP2004318439A (en) * 2003-04-15 2004-11-11 Sendai Nikon:Kk Encoder device and robot system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04364551A (en) * 1991-06-12 1992-12-16 Yokogawa Electric Corp Memory duplicating device
JPH0612909U (en) * 1992-07-17 1994-02-18 株式会社ニコン Data backup device for surveying instrument
JP2004318439A (en) * 2003-04-15 2004-11-11 Sendai Nikon:Kk Encoder device and robot system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7804427B1 (en) 2009-03-20 2010-09-28 Honda Motor Co., Ltd. Device and method for automatic reset of encoder
CN109633244A (en) * 2019-01-29 2019-04-16 苏州工业职业技术学院 A kind of Self-resetting ammeter

Also Published As

Publication number Publication date
JP4640697B2 (en) 2011-03-02

Similar Documents

Publication Publication Date Title
JP4475320B2 (en) Vehicle memory management device
US8140940B2 (en) Method and apparatus for controlling memory
US8984379B2 (en) MRAM field disturb detection and recovery
KR20130031888A (en) Method for monitoring a data memory
JPH03248251A (en) Information processor
JP6290303B2 (en) Circuit and method for testing error correction capability
JP5176405B2 (en) Computer error detection and recovery method
JP4640697B2 (en) Encoder device, parameter destruction self-reset device, and parameter destruction self-reset method
US8074120B2 (en) Method for recognizing a power failure in a data memory and recovering the data memory
JP2002062956A (en) Service interruption processing method and service interruption processing device
US7979736B2 (en) Method for updating nonvolatile memory
CN111552930A (en) Integrated circuit and embedded system with such an integrated circuit
JP6332134B2 (en) Memory diagnostic circuit
US11379310B2 (en) Anomaly detector
CN106940666B (en) Memory data detection method
JP3556649B2 (en) Memory abnormal operation detection circuit, integrated circuit, and abnormal operation detection method
US8612777B2 (en) Apparatus and method for writing data to be stored to a predetermined memory area
CN112151104B (en) Memory storage device and dynamic data restoration method thereof
WO2024018684A1 (en) State determination device
JP4853083B2 (en) Computer system, data normality confirmation method, and program
WO2016042751A1 (en) Memory diagnosis circuit
JP2023104466A (en) In-vehicle electronic control device and memory control method
KR19980036534A (en) Memory Diagnosis Method of Electronic Control Unit
JP2009199515A (en) Vehicle control device
JPH0954710A (en) Ic card

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100720

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100804

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100930

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

R150 Certificate of patent (=grant) or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20101121

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131210

Year of fee payment: 3

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141210

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees