JP3438270B2 - Data backup device and vehicle failure diagnosis device in electronic control system - Google Patents

Data backup device and vehicle failure diagnosis device in electronic control system

Info

Publication number
JP3438270B2
JP3438270B2 JP27099793A JP27099793A JP3438270B2 JP 3438270 B2 JP3438270 B2 JP 3438270B2 JP 27099793 A JP27099793 A JP 27099793A JP 27099793 A JP27099793 A JP 27099793A JP 3438270 B2 JP3438270 B2 JP 3438270B2
Authority
JP
Japan
Prior art keywords
data
storage area
abnormality
updating
diagnostic
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.)
Expired - Lifetime
Application number
JP27099793A
Other languages
Japanese (ja)
Other versions
JPH07129202A (en
Inventor
浩 近藤
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP27099793A priority Critical patent/JP3438270B2/en
Publication of JPH07129202A publication Critical patent/JPH07129202A/en
Application granted granted Critical
Publication of JP3438270B2 publication Critical patent/JP3438270B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Safety Devices In Control Systems (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、電子制御システムにお
けるデータバックアップ装置に係り、例えば車載機器の
異常解析に必要な診断データを記憶保持する故障診断装
置に用いられるバックアップ装置及び車両用故障診断装
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data backup device in an electronic control system, for example, a backup device and a vehicle failure diagnostic device used in a failure diagnostic device for storing and retaining diagnostic data necessary for abnormality analysis of in-vehicle equipment.
It is about the table .

【0002】[0002]

【従来の技術】この種のデータバックアップ装置は、従
来から、車載機器の異常解析に必要な診断データを記憶
保持して故障診断を実施する故障診断装置等に用いられ
ている。即ち、車両各部の診断データが、電源遮断時に
もその内容を保持するバックアップメモリに一定周期毎
に順次更新され、この更新されたデータを用いて異常の
診断が行われるようになっている(例えば、特開昭62
−142849号公報)。
2. Description of the Related Art This type of data backup device has been conventionally used in a failure diagnosis device or the like for storing and holding diagnostic data necessary for analyzing an abnormality of an on-vehicle device to carry out a failure diagnosis. That is, the diagnostic data of each part of the vehicle is sequentially updated at regular intervals in a backup memory that retains the contents even when the power is cut off, and the updated data is used to diagnose an abnormality (for example, , JP-A-62
No. 142849).

【0003】[0003]

【発明が解決しようとする課題】しかし、上記の故障診
断装置では、バックアップメモリのデータ更新途中に電
源が遮断された場合、メモリ内容は更新前の診断データ
と更新後の診断データとが混在した状態になる。そし
て、電源投入時において、更新前と更新後のデータが混
在した状態のメモリ内容を故障診断に用いることで、故
障診断の精度が悪化するおそれが生じる。
However, in the above-mentioned failure diagnosing device, when the power is cut off during the data updating of the backup memory, the memory contents are mixed with the diagnostic data before the updating and the diagnostic data after the updating. It becomes a state. Then, when the power is turned on, the memory content in a state where the pre-updated data and the post-updated data are mixed is used for the failure diagnosis, which may deteriorate the accuracy of the failure diagnosis.

【0004】要するに、この種の電子制御システムで
は、バックアップメモリに更新前の制御データと更新後
の制御データとが混在して記憶されていると、その制御
データの精度が著しく低下してしまい、同データをバッ
クアップメモリから読み出して用いることができないと
いう問題が生じていた。
In short, in this type of electronic control system, if the control data before update and the control data after update are mixedly stored in the backup memory, the accuracy of the control data will be significantly reduced, There is a problem that the same data cannot be read from the backup memory and used.

【0005】本発明は上記の問題に着目してなされたも
のであって、その目的とするところは、制御データの更
新途中に電源が遮断されても、電源投入時には更新前及
び更新後の制御データを混在させることなく用いて電源
投入時の制御を確実に行うことができる電子制御システ
ムにおけるデータバックアップ装置及び車両用故障診断
装置を提供することにある。
The present invention has been made in view of the above problems, and an object of the present invention is to perform control before and after updating at the time of power-on even if the power is cut off during updating of control data. A data backup device and a vehicle failure diagnosis in an electronic control system that can surely perform control at power-on without using mixed data
To provide a device .

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
に、請求項1に記載の電子制御システムにおけるデータ
バックアップ装置は、図10に示すように、第1,第
2,第3の記憶領域を有し、電源遮断時にもデータを記
憶保持するバックアップメモリM1と、所定のタイミン
グにて開始されるルーチンにて、前記バックアップメモ
リM1の第1の記憶領域の制御データを順次更新するデ
ータ更新手段M2と、前記データ更新手段M2による制
御データの更新開始時にチェックデータを前記バックア
ップメモリM1の第3の記憶領域にセットし、同更新終
了時に当該チェックデータをリセットするチェックデー
タ設定手段M3と、前記データ更新手段M2による制御
データの更新開始以前に、前回の更新時に前記バックア
ップメモリM1の第1の記憶領域に記憶した制御データ
を前記第2の記憶領域に転送するデータ転送手段M4
と、電源投入時において、前記第3の記憶領域にチェッ
クデータがセットされていれば、前記第2の記憶領域の
制御データを前記第1の記憶領域に復帰させるデータ復
帰手段M5とを備えたことを要旨とするものである。
た、請求項2に記載の車両用故障診断装置は、車載機器
の異常解析に必要な診断データを記憶保持して故障診断
を実施する装置であって、第1,第2,第3の記憶領域
を有し、電源遮断時にも前記診断データを記憶保持する
バックアップメモリと、前記車載機器の異常を検出する
異常検出手段と、該異常検出手段にて前記車載機器の異
常が検出された場合に、前記バックアップメモリの第1
の記憶領域に記憶保持されている前記診断データを順次
更新するデータ更新手段と、前記データ更新手段による
診断データの更新開始時にチェックデータを前記バック
アップメモリの第3の記憶領域にセットし、同更新終了
時に当該チェックデータをリセットするチェックデータ
設定手段と、前記異常検出手段による前記車載機器の異
常検出後であって、前記データ更新手段による前記診断
データの更新開始以前に、前回の更新時に前記バックア
ップメモリの第1の記憶領域に記憶した前記診断データ
を前記第2の記憶領域に転送するデータ転送手段と、電
源投入時において、前記第3の記憶領域にチェックデー
タがセットされていれば、前記第2の記憶領域の制御デ
ータを前記第1の記憶領域に復帰させるデータ復帰手段
とを 備えたことを要旨とする。また、請求項3に記載の
車両用故障診断装置は、請求項2に記載の車両用故障診
断装置において、前記チェックデータは、前記データ更
新手段により前記診断データが更新途中か否かを示すと
ともに、前記診断データの種類を識別するデータである
ことを要旨とする。
In order to achieve the above object, a data backup device in an electronic control system according to claim 1 has a first, a second and a third storage area as shown in FIG. A backup memory M1 for storing and holding data even when the power is cut off, and a data updating means for sequentially updating the control data in the first storage area of the backup memory M1 in a routine started at a predetermined timing. M2, check data setting means M3 for setting check data in the third storage area of the backup memory M1 at the start of updating the control data by the data updating means M2, and resetting the check data at the end of the update, Prior to the start of updating the control data by the data updating means M2, the backup memory M1 of the backup memory M1 Data transfer means M4 for transferring control data stored in the storage area of the second storage area
And a data restoring means M5 for restoring the control data of the second storage area to the first storage area when the check data is set in the third storage area when the power is turned on. This is the summary. Well
The vehicle failure diagnosis device according to claim 2 is an in-vehicle device.
Fault diagnosis by storing and holding diagnostic data necessary for abnormality analysis of
A first, second, and third storage areas
And has the diagnostic data stored and retained even when the power is cut off.
Detects an abnormality in the backup memory and the in-vehicle device
The abnormality detecting means and the difference between the in-vehicle device by the abnormality detecting means.
If the constant is detected, the first of the backup memory
The diagnostic data stored and stored in the storage area of the
Data updating means for updating and the data updating means
Check data is backed up at the start of updating diagnostic data.
Set in the third storage area of the up memory and end the update
Check data that sometimes resets the check data
Difference between the setting means and the in-vehicle device by the abnormality detecting means
After normal detection, the diagnosis by the data updating means
Before starting the data update, the backup
Diagnostic data stored in the first storage area of the backup memory
Data transfer means for transferring data to the second storage area,
When the power is turned on, the check data is stored in the third storage area.
Data is set, the control data for the second storage area is set.
Data restoring means for restoring the data to the first storage area
The point is to have and. In addition, according to claim 3,
The vehicle failure diagnosis device is a vehicle failure diagnosis device according to claim 2.
In the disconnection device, the check data is
If the new means indicates whether or not the diagnostic data is being updated
Both are data for identifying the type of the diagnostic data.
That is the summary.

【0007】[0007]

【作用】データ更新手段M2は、所定のタイミングにて
開始されるルーチンにて、バックアップメモリM1の第
1の記憶領域の制御データを順次更新する。チェックデ
ータ設定手段M3は、データ更新手段M2による制御デ
ータの更新開始時にチェックデータをバックアップメモ
リM1の第3の記憶領域にセットし、同更新終了時に当
該チェックデータをリセットする。データ転送手段M4
は、データ更新手段M2による制御データの更新開始以
前に、前回の更新時にバックアップメモリM1の第1の
記憶領域に記憶した制御データを第2の記憶領域に転送
する。データ復帰手段M5は、電源投入時において、第
3の記憶領域にチェックデータがセットされていれば、
第2の記憶領域の制御データを第1の記憶領域に復帰さ
せる。
The data updating means M2 sequentially updates the control data in the first storage area of the backup memory M1 in a routine started at a predetermined timing. The check data setting means M3 sets the check data in the third storage area of the backup memory M1 at the start of updating the control data by the data updating means M2, and resets the check data at the end of the update. Data transfer means M4
Transfers the control data stored in the first storage area of the backup memory M1 at the time of the previous update to the second storage area before the update of the control data by the data updating means M2 is started. If the check data is set in the third storage area when the power is turned on, the data restoration means M5
The control data in the second storage area is returned to the first storage area.

【0008】即ち、データ更新手段M2による制御デー
タの更新途中において、電源供給が遮断された場合、第
3の記憶領域のチェックデータはセット状態で保持され
る。このとき、第1の記憶領域の制御データは更新前の
データと更新後のデータとが混在する状態であるのに対
し、第2の記憶領域の制御データは全て前回のルーチン
での制御データに統一された状態で記憶されている。そ
して、電源投入された時には、チェックデータのセット
状態によって制御データの更新途中での電源遮断が判別
される。この場合、電源遮断であると確認されれば、第
2の記憶領域の制御データが第1の記憶領域に復帰され
ることで、電源投入時に更新前及び更新後の制御データ
が混在した情報を用いることなく制御が行われる。さら
に、更新前及び更新後の制御データが混在した第1の記
憶領域は全て混在のない制御データに書き換えられるた
め、制御が再開される際に、混在した制御データが使わ
れ制御に悪影響を及ぼすおそれはない。
That is, if the power supply is cut off while the control data is being updated by the data updating means M2, the check data in the third storage area is held in the set state. At this time, the control data in the first storage area is a state in which the pre-update data and the post-update data are mixed, whereas the control data in the second storage area are all the control data in the previous routine. It is stored in a unified state. Then, when the power is turned on, it is determined whether or not the power is cut off while the control data is being updated, depending on the set state of the check data. In this case, if it is confirmed that the power is cut off, the control data in the second storage area is restored to the first storage area, so that the information including the control data before and after the update is mixed when the power is turned on. Control is performed without using. Furthermore, since the first storage area in which the control data before and after the update is mixed is rewritten to the control data without the mixture, the mixed control data is used when the control is restarted, and the control is adversely affected. There is no fear.

【0009】[0009]

【実施例】以下、本発明の電子制御システムにおけるデ
ータバックアップ装置を車両用の故障診断装置に具体化
した一実施例について図面に従って説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment in which a data backup device in an electronic control system of the present invention is embodied in a vehicle failure diagnosis device will be described below with reference to the drawings.

【0010】図1には、本実施例における故障診断装置
の電気的構成を示す。制御ユニット1はCPU(中央処
理装置)4、ROM(リードオンリメモリ)5、RAM
(ランダムアクセスメモリ)6、入出力(I/O)回路
7等により構成されている。CPU4、ROM5、RA
M6、I/O回路7にはイグニションスイッチ2を経て
バッテリ3より電源が供給されている。RAM6の一部
にはバッテリ3より直接電源が供給されており、イグニ
ションスイッチ2による電源遮断時にも記憶内容が保持
されるバックアップRAMとなっている。
FIG. 1 shows the electrical construction of the failure diagnosis apparatus in this embodiment. The control unit 1 includes a CPU (central processing unit) 4, a ROM (read only memory) 5, a RAM
(Random access memory) 6, input / output (I / O) circuit 7 and the like. CPU4, ROM5, RA
Power is supplied to the M6 and I / O circuit 7 from the battery 3 via the ignition switch 2. Power is directly supplied from the battery 3 to a part of the RAM 6 and serves as a backup RAM that retains stored contents even when the ignition switch 2 shuts off the power.

【0011】I/O回路7にはスロットルセンサ8、エ
アフローメータ9、クランク角センサ10、水温センサ
11等の車両各部に設けたセンサからのセンサ信号が入
力される。CPU4はROM5内の制御プログラムを用
いて前記各センサ信号に応じた燃料噴射量を算出し、こ
の燃料噴射量に応じた出力信号をI/O回路7を介して
燃料噴射弁12に出力する。なお、これら各センサ信号
によってエンジンの運転状態(エンジン回転数NE,吸
入空気量GN等)が求められ、異常検出時には同データ
が診断データとしてバックアップRAMに書き込まれる
ようになっている。
Sensor signals from sensors provided in various parts of the vehicle such as a throttle sensor 8, an air flow meter 9, a crank angle sensor 10 and a water temperature sensor 11 are input to the I / O circuit 7. The CPU 4 calculates the fuel injection amount according to each sensor signal using the control program in the ROM 5, and outputs an output signal according to this fuel injection amount to the fuel injection valve 12 via the I / O circuit 7. The engine operating condition (engine speed NE, intake air amount GN, etc.) is obtained from these sensor signals, and the same data is written in the backup RAM as diagnostic data when an abnormality is detected.

【0012】又、本故障診断装置において、I/O回路
7の図示しない接続ポートにはダイアグチェッカー13
が接続されるようになっている。そして、ダイアグチェ
ッカー13がI/O回路7に接続されると、同ダイアグ
チェッカー13は制御ユニット1に対して診断データ等
の出力をリクエストし、RAM6のバックアップRAM
内に書き込まれている各種診断データ(エンジン回転数
NE,吸入空気量GN,故障コード等)を読み出して異
常診断を実施する。
Further, in this failure diagnosis apparatus, the diagnostic checker 13 is connected to a connection port (not shown) of the I / O circuit 7.
Are connected. When the diagnostic checker 13 is connected to the I / O circuit 7, the diagnostic checker 13 requests the control unit 1 to output diagnostic data, etc.
Various diagnostic data (engine speed NE, intake air amount GN, failure code, etc.) written in the table are read out to perform abnormality diagnosis.

【0013】一方、図2にはバックアップRAMの記憶
領域の構成を示す。バックアップRAMは1語長16ビ
ットにて構成され、同図に示す如くn番地から(n+5
+α+α)番地において領域201〜213を有してい
る。なお、このバックアップRAMはメモリ内容によっ
て、バックアップRAM識別値の記憶領域をなすn番地
と、各種データの一時回避領域をなす(n+1)〜(n
+2+α)番地と、各種データのアクセス領域をなす
(n+3+α)〜(n+5+α+α)番地とに大別され
ている。
On the other hand, FIG. 2 shows the structure of the storage area of the backup RAM. The backup RAM has a word length of 16 bits, and as shown in FIG.
+ Α + α) has areas 201 to 213. Depending on the memory contents, this backup RAM forms an address n, which is a storage area for the backup RAM identification value, and (n + 1) to (n) which are temporary avoidance areas for various data.
The address is roughly divided into an address of + 2 + α and an address of (n + 3 + α) to (n + 5 + α + α) forming an access area for various data.

【0014】具体的に説明すると、n番地に相当する領
域201には、当該バックアップRAMのデータ更新途
中であるか否かを識別するためのバックアアップRAM
識別値が記憶される。即ち本実施例では、初期状態又は
バックアップRAMのデータ更新期間外であれば更新完
了を示すデータ(A5H)がセットされ、期間内であれ
ば前記(A5H)とは異なる所定のチェックデータがセ
ットされる。
More specifically, in the area 201 corresponding to the address n, a backup RAM for identifying whether or not the data of the backup RAM is being updated.
The identification value is stored. That is, in the present embodiment, data (A5H) indicating update completion is set if it is in the initial state or outside the data update period of the backup RAM, and if it is within the period, predetermined check data different from the above (A5H) is set. It

【0015】又、一時回避領域である(n+1)番地の
領域202,203には、各々異常判定フラグA,異常
判定回数Aが記憶される。同じく、(n+2+0)〜
(n+2+α)番地の領域204〜206には、各々エ
ンジン回転数NE,吸入空気量GN,故障コード等の診
断データが記憶される。これらの領域202〜206に
記憶されるデータは、前回の更新時のデータになる。
Further, the abnormality determination flag A and the abnormality determination number A are stored in the areas 202 and 203 at the address (n + 1) which is the temporary avoidance area, respectively. Similarly, (n + 2 + 0) ~
In regions (204) to (206) of the address (n + 2 + α), diagnostic data such as engine speed NE, intake air amount GN, and failure code are stored. The data stored in these areas 202 to 206 becomes the data at the time of the previous update.

【0016】さらに、データアクセス領域である(n+
3+α),(n+4+α)番地の領域207〜210に
は、各々スロットルセンサ8,水温センサ11の異常発
生を判断するための異常判定フラグ及び異常判定回数が
記憶される。又、同じく、(n+5+α+0)〜(n+
5+α+α)番地の領域211〜213は、前記領域2
04〜206と同バイト数を有しており、各領域には各
々、その時々の診断データ(エンジン回転数NE,吸入
空気量GN,故障コード等)が記憶される。
Further, it is a data access area (n +
Areas 207 to 210 of addresses 3 + α) and (n + 4 + α) store an abnormality determination flag and an abnormality determination count for determining whether the throttle sensor 8 and the water temperature sensor 11 are abnormal. Similarly, (n + 5 + α + 0) to (n +
The areas 211 to 213 at the address 5 + α + α) are the areas 2
It has the same number of bytes as 04 to 206, and the diagnostic data (engine speed NE, intake air amount GN, failure code, etc.) at each time is stored in each area.

【0017】なお、本実施例では、CPU4によりデー
タ更新手段、チェックデータ設定手段、データ転送手段
及びデータ復帰手段が構成されている。又、バックアッ
プRAMによりバックアップメモリが構成されており、
同バックアップRAMの領域201が第3の記憶領域
に、領域202〜206が第2の記憶領域(一時回避領
域)に、さらに領域207〜213が第1の記憶領域
(データアクセス領域)に相当している。
In this embodiment, the CPU 4 constitutes a data updating means, a check data setting means, a data transferring means and a data restoring means. Moreover, the backup memory is configured by the backup RAM,
The area 201 of the backup RAM corresponds to the third storage area, the areas 202 to 206 correspond to the second storage area (temporary avoidance area), and the areas 207 to 213 correspond to the first storage area (data access area). ing.

【0018】次に、本実施例における故障診断装置の作
用について、図3〜図9を用いて説明する。なお、図
3,図4のフローチャートは、各々スロットルセンサ
8,水温センサ11の異常時における処理ルーチンを示
し、図5,図6のフローチャートは前記図3,図4のサ
ブルーチンを示している。又、図7のタイムチャート
は、図4の所定ステップ間におけるバックアップRAM
のデータ書き換え動作を示している。さらに、図8のフ
ローチャートは電源投入時におけるデータ復帰処理ルー
チンを、図9のフローチャートはダイアグチェッカー1
3へのデータ出力ルーチンを示している。図3,図4,
図9の各ルーチンは所定周期毎(本実施例では、8.2
msec毎)にCPU4によって順次実行され、図8の
ルーチンは電源投入時に1回だけCPU4によって実行
されるようになっている。
Next, the operation of the failure diagnosis apparatus according to this embodiment will be described with reference to FIGS. The flowcharts of FIGS. 3 and 4 show the processing routines when the throttle sensor 8 and the water temperature sensor 11 are abnormal, and the flowcharts of FIGS. 5 and 6 show the subroutines of FIGS. 3 and 4. Further, the time chart of FIG. 7 shows the backup RAM during the predetermined steps of FIG.
The data rewriting operation of is shown. Further, the flowchart of FIG. 8 shows the data restoration processing routine at the time of power-on, and the flowchart of FIG. 9 shows the diagnostic checker 1
3 shows a data output routine to 3. Figure 3, Figure 4,
Each routine of FIG. 9 is performed at a predetermined cycle (in this embodiment, 8.2.
Every msec), the CPU 4 sequentially executes the routine, and the routine of FIG. 8 is executed by the CPU 4 only once when the power is turned on.

【0019】各ルーチンの処理を略述すると、図3,図
4のルーチンによってスロットルセンサ8又は水温セン
サ11の異常が検出されるととともに、バックアップR
AMの諸データの書き換えが行われる。つまり、バック
アップRAMには、図3,図4のルーチンによってスロ
ットルセンサ8又は水温センサ11の異常に関するデー
タが記憶される。そして、図8のルーチンによって電源
遮断時におけるバックアップRAMデータの復帰処理が
行われる。さらに、図9のルーチンによってバックアッ
プRAMのデータがダイアグチェッカー13に読み出さ
れ異常解析が行われる。
The processing of each routine will be briefly described. When an abnormality of the throttle sensor 8 or the water temperature sensor 11 is detected by the routines of FIGS.
Rewriting of AM data is performed. That is, the backup RAM stores data relating to the abnormality of the throttle sensor 8 or the water temperature sensor 11 according to the routines of FIGS. Then, the routine of FIG. 8 performs a process of restoring the backup RAM data when the power is shut off. Furthermore, the routine of FIG. 9 reads the data in the backup RAM to the diagnostic checker 13 and analyzes the abnormality.

【0020】以下には、上記各ルーチンの制御内容つい
て図3から順に詳細に説明する。さて、図3のルーチン
がスタートすると、CPU4は、先ずステップ(以下、
Sとする)301,S302でスロットルセンサ8の出
力信号(以下、HA信号とする)が0.1V〜4.9V
の範囲にあるか否かを判別する。そして、HA信号がこ
の範囲内にあれば、CPU4はスロットルセンサ8が正
常に機能していると判別しS312に移行する。CPU
4は、S312でHA異常継続カウンタをクリアした
後、本ルーチンを終了する。ここで、HA異常継続カウ
ンタはクロック信号にてカウントされるようになってい
る。
The control contents of the above-mentioned routines will be described in detail below in order from FIG. Now, when the routine of FIG. 3 starts, the CPU 4 first executes the steps (hereinafter,
S) 301 and S302, the output signal of the throttle sensor 8 (hereinafter referred to as HA signal) is 0.1V to 4.9V.
It is determined whether or not it is within the range. If the HA signal is within this range, the CPU 4 determines that the throttle sensor 8 is functioning normally and proceeds to S312. CPU
4 clears the HA abnormality continuation counter in S312 and then ends this routine. Here, the HA abnormality continuation counter is adapted to be counted by the clock signal.

【0021】一方、HA信号が0.1V〜4.9Vの範
囲外であれば、CPU4はS303に移行してHA異常
継続カウンタの値が所定値(本実施例では、500ms
に対応する値)以上になっているか否かを判別する。そ
して、S303が肯定判別されれば、CPU4はスロッ
トルセンサ8に異常が生じた(HA異常)と判断してS
304に移行する。CPU4はS304でHA異常が第
1回目であるか否かを判別する。この場合、当初(HA
異常の判定1回目)はS305に移行し、HA異常の判
定2回目以降はそのままルーチンを終了する。
On the other hand, if the HA signal is out of the range of 0.1 V to 4.9 V, the CPU 4 proceeds to S303 to set the value of the HA abnormality continuation counter to a predetermined value (500 ms in this embodiment).
It is determined whether or not it is equal to or more than the value corresponding to. If the determination in S303 is affirmative, the CPU 4 determines that an abnormality has occurred in the throttle sensor 8 (HA abnormality) and S
Move to 304. The CPU 4 determines in S304 whether the HA abnormality is the first time. In this case, initially (HA
The abnormality determination first time) proceeds to S305, and the HA abnormality determination second time and thereafter ends the routine as it is.

【0022】CPU4は、S305で図5のバックアッ
プRAM書き換え開始処理ルーチンをコールする。図5
のサブルーチンにおいて、CPU4はS501で、バッ
クアップRAMの領域207,208(図2参照)に記
憶されている書き換え対象となる異常判定フラグ,異常
判定回数を一時回避用の領域202,203に複写す
る。即ち、HA異常の場合、前回までのHA異常判定フ
ラグ及びHA異常判定回数が異常判定フラグA及び異常
判定回数Aとして記憶される。又、CPU4はS502
で、領域211〜213に記憶されている前回の更新時
の診断データ0(NE),1(GN),・・・α(故障
コード)を一時回避用の領域204〜206に複写し、
診断データ0’(NE),1’(GN),・・・α’
(故障コード)として記憶する。即ち、S501,50
2では、後述するデータ更新処理(図3のS306〜3
10)の事前処理として、前回の更新時における各種デ
ータが一時回避領域に転送される。
In step S305, the CPU 4 calls the backup RAM rewriting start processing routine shown in FIG. Figure 5
In the subroutine of step S501, the CPU 4 copies the abnormality determination flag and the number of abnormality determinations to be rewritten, which are stored in the backup RAM areas 207 and 208 (see FIG. 2), to the temporary avoidance areas 202 and 203 in step S501. That is, in the case of HA abnormality, the HA abnormality determination flag and the HA abnormality determination number up to the previous time are stored as the abnormality determination flag A and the abnormality determination number A. Also, the CPU 4 executes S502
Then, the diagnostic data 0 (NE), 1 (GN), ... α (fault code) stored in the areas 211 to 213 at the time of the previous update are copied to the areas 204 to 206 for temporary avoidance,
Diagnostic data 0 '(NE), 1' (GN), ... α '
It is stored as (fault code). That is, S501,50
2, the data update process described later (S306 to S3 in FIG. 3).
As the preprocessing of 10), various data at the time of the previous update is transferred to the temporary avoidance area.

【0023】その後、CPU4はS503で、バックア
ップRAMの領域201にHA異常に対応するチェック
データ(00H)を書き込む。即ち、この領域201の
バックアップRAM識別値には、当初、初期状態又はバ
ックアップRAM更新完了を示す値として(A5H)が
書き込まれているが、S503ではこの(A5H)とは
異なるチェックデータ(00H)が書き込まれる。同チ
ェックデータはサブルーチン引数として受け渡される。
Thereafter, the CPU 4 writes the check data (00H) corresponding to the HA abnormality in the area 201 of the backup RAM in S503. That is, in the backup RAM identification value of this area 201, (A5H) is initially written as a value indicating the initial state or backup RAM update completion, but in S503, the check data (00H) different from this (A5H) is written. Is written. The check data is passed as a subroutine argument.

【0024】その後、CPU4は、図3のS306〜3
10で今回のHA異常に伴う諸データをバックアップR
AMのデータアクセス領域に書き込む。詳しくは、CP
U4は、図3のS306でバックアップRAMの領域2
07にHA異常判定フラグを「1」にセットし、S30
7で領域208のHA異常判定回数をカウントアップす
る。なお、HA異常判定フラグはHA異常の発生に伴い
セット状態に保持され、HA異常判定回数は処理毎に
「1」ずつインクリメントされる。
After that, the CPU 4 executes steps S306 to S3 of FIG.
Backup various data associated with this HA abnormality at 10 R
Write to the data access area of AM. Specifically, CP
U4 is the area 2 of the backup RAM in S306 of FIG.
The HA abnormality determination flag is set to "1" in 07, and S30
At 7, the number of HA abnormality determinations in the area 208 is counted up. The HA abnormality determination flag is held in the set state when the HA abnormality occurs, and the HA abnormality determination count is incremented by "1" for each process.

【0025】又、CPU4は、S308,309,・・
・310で該当HA異常の解析に有用な診断データ0,
1,・・・αを求め、バックアップRAMに順次ストア
する。即ち、CPU4は、その時のエンジンの運転状態
に応じたエンジン回転数NE,吸入空気量GN等と、異
常の種類により定められた故障コード(HA異常の場合
には、01H)とを求め、バックアップRAMの領域2
11〜213に順次ストアする。
Further, the CPU 4 executes steps S308, 309, ...
・ At 310, diagnostic data 0 useful for analysis of the relevant HA abnormality,
1, ... α are obtained and sequentially stored in the backup RAM. That is, the CPU 4 obtains the engine speed NE, the intake air amount GN, etc. according to the operating state of the engine at that time, and the failure code (01H in the case of HA abnormality) determined by the type of abnormality, and backs it up. RAM area 2
The data are sequentially stored in 11 to 213.

【0026】最後に、CPU4は、S311で図6のバ
ックアップRAM書き換え完了処理ルーチンをコール
し、本ルーチンを終了する。図6のサブルーチンにおい
て、CPU4はS601で、前記領域201のバックア
ップRAM識別値に更新完了を示す値(A5H)を書き
込む。
Finally, the CPU 4 calls the backup RAM rewriting completion processing routine of FIG. 6 in S311, and terminates this routine. In the subroutine of FIG. 6, the CPU 4 writes a value (A5H) indicating update completion in the backup RAM identification value of the area 201 in S601.

【0027】以上のように、HA異常が検出された場
合、S305(図5のS503)からS311(図6の
S601)までの期間で、領域201にチェックデータ
(00H)がセットされる。従って、同期間中に電源が
遮断されるとバックアップRAMにはチェックデータ
(00H)が保持され、電源が遮断されないとバックア
ップRAMには、バックアップRAM更新完了を示す値
(A5H)が保持されることになる。
As described above, when the HA abnormality is detected, the check data (00H) is set in the area 201 during the period from S305 (S503 in FIG. 5) to S311 (S601 in FIG. 6). Therefore, if the power is cut off during the same period, the backup RAM holds the check data (00H), and if the power is not cut off, the backup RAM holds the value (A5H) indicating the completion of the backup RAM update. become.

【0028】次に、図4の水温センサ11の異常時処理
ルーチンについて説明する。図4において、CPU4は
S401,S402で、水温センサ11の出力信号(以
下、TW信号という)が0.1V〜4.9Vの範囲にあ
るか否かを判別する。そして、TW信号がこの範囲内に
あれば、CPU4は水温センサ11が正常に機能してい
ると判別しS412に移行する。CPU4は、S412
でTW異常継続カウンタをクリアした後、本ルーチンを
終了する。
Next, an abnormal condition processing routine of the water temperature sensor 11 of FIG. 4 will be described. In FIG. 4, the CPU 4 determines in S401 and S402 whether or not the output signal of the water temperature sensor 11 (hereinafter referred to as TW signal) is in the range of 0.1V to 4.9V. Then, if the TW signal is within this range, the CPU 4 determines that the water temperature sensor 11 is functioning normally, and proceeds to S412. CPU4 is S412
After clearing the TW abnormality continuation counter in step 1, this routine ends.

【0029】一方、TW信号が0.1V〜4.9Vの範
囲外であれば、CPU4はS403に移行してTW異常
継続カウンタの値が所定値(本実施例では、500ms
に対応する値)以上になっているか否かを判別する。そ
して、S403が肯定判別されれば、CPU4は水温セ
ンサ11に異常が生じた(TW異常)と判断してS40
4に移行する。CPU4はS404でTW異常が第1回
目であるか否かを判別する。この場合、当初(TW異常
の判定1回目)はS405に移行し、TW異常の判定2
回目以降はルーチンを終了する。
On the other hand, if the TW signal is out of the range of 0.1 V to 4.9 V, the CPU 4 proceeds to S403 and sets the value of the TW abnormality continuation counter to a predetermined value (500 ms in this embodiment).
It is determined whether or not it is equal to or more than the value corresponding to. If the determination in S403 is affirmative, the CPU 4 determines that an abnormality has occurred in the water temperature sensor 11 (TW abnormality) and S40.
Go to 4. The CPU 4 determines in S404 whether the TW abnormality is the first one. In this case, initially (first TW abnormality determination), the process proceeds to S405, and TW abnormality determination 2 is performed.
The routine is ended after the first time.

【0030】CPU4は、S405で前述の図5のバッ
クアップRAM書き換え開始ルーチンをコールする。図
5のサブルーチンにおいて、CPU4はS501で、バ
ックアップRAMの領域209,210のTW異常判定
フラグ,TW異常判定回数の前回データを一時回避用の
領域202,203に複写し、異常判定フラグA及び異
常判定回数Aとして記憶する。又、CPU4はS502
で、領域211〜213の更新前の診断データ0(N
E),1(GN),・・・α(故障コード)を一時回避
用の領域204〜206に複写し、診断データ0’(N
E),1’(GN),・・・α’(故障コード)として
記憶する。さらに、CPU4はS503で、領域201
に記憶されているバックアップRAM識別値にサブルー
チン引数として受け渡されたTW異常のチェックデータ
(01H)を書き込む。
In step S405, the CPU 4 calls the backup RAM rewriting start routine shown in FIG. In the subroutine of FIG. 5, in step S501, the CPU 4 copies the TW abnormality determination flag of the backup RAM areas 209 and 210 and the previous data of the number of times of TW abnormality determination to the temporary avoidance areas 202 and 203, and determines the abnormality determination flag A and the abnormality. The number of determinations is stored as A. Also, the CPU 4 executes S502
Then, the diagnostic data 0 (N
E), 1 (GN), ... α (fault code) are copied to the temporary avoidance areas 204 to 206, and diagnostic data 0 ′ (N
E), 1 '(GN), ... α' (fault code) are stored. Further, the CPU 4 determines the area 201 in S503.
The check data (01H) of the TW abnormality passed as a subroutine argument is written in the backup RAM identification value stored in.

【0031】その後、CPU4は図4のS406で、領
域209のTW異常判定フラグを「1」にセットし、S
407で領域210のTW異常判定回数をカウントアッ
プする。又、CPU4はS408、409、・・・41
0で前記HA異常検出処理と同様に異常解析に有用な現
時点でのエンジン回転数NE,吸入空気量GN,故障コ
ード(TW異常の場合には、02H)等を領域211〜
213の診断データ0,1,・・・,αに順次ストアす
る。
Thereafter, the CPU 4 sets the TW abnormality determination flag of the area 209 to "1" in S406 of FIG.
In 407, the number of times of TW abnormality determination of the area 210 is counted up. Also, the CPU 4 uses S408, 409, ... 41.
When the value is 0, the engine speed NE, the intake air amount GN, the failure code (02H in the case of TW abnormality), etc. at the present time, which is useful for the abnormality analysis like the HA abnormality detection processing, are stored in the areas 211 to 211.
The diagnostic data of 213 are sequentially stored in 0, 1, ..., α.

【0032】最後に、CPU4は、S411で前述の図
6のサブルーチンをコールして領域201にバックアッ
プRAM更新完了を示す値(A5H)を書き込み、本ル
ーチンを終了する。
Finally, the CPU 4 calls the above-mentioned subroutine of FIG. 6 in S411 to write the value (A5H) indicating the completion of updating the backup RAM in the area 201, and terminates this routine.

【0033】ここで、上記図4のS405(図5のS5
01)〜S411(図6のS601)の処理時における
実際のバックアップRAMのデータ書き換え動作につい
て、図7のタイムチャートを用いて説明する。なお、図
7の時間t1〜t2はデータの更新期間を示している。
又、この図7では、前回の図3のルーチンによってHA
異常が検出され、バックアップRAMの領域211〜2
13にHA異常時の解析用データが記憶されているもの
とする(NE=1000rpm,GN=1.0g/re
v,故障コード=01Hとしている)。
Here, S405 of FIG. 4 (S5 of FIG. 5)
The actual data rewriting operation of the backup RAM during the processing of (01) to S411 (S601 of FIG. 6) will be described with reference to the time chart of FIG. It should be noted that times t1 to t2 in FIG. 7 indicate a data update period.
In addition, in FIG. 7, HA is executed by the routine of FIG.
Abnormality is detected, backup RAM areas 211 to 2
It is assumed that the data for analysis at the time of HA abnormality is stored in 13 (NE = 1000 rpm, GN = 1.0 g / re
v, failure code = 01H).

【0034】図7では、時間t1以前に、領域209,
210のTW異常判定フラグ及びTW異常判定回数が領
域202,203に転送され、さらに、領域211〜2
13の診断データが領域204〜206に転送されてい
る(S501,502)。又、時間t1において、TW
異常に関するチェックデータ(01H)が領域201に
セットされ(S503)、以降、このセット状態で各種
データの更新が行われる(S406〜S410)。な
お、図7では、TW異常時の解析用データとして、領域
211〜213にNE=2000rpm,GN=1.5
g/rev,故障コード=02Hが書き込まれている。
データ更新が完了する時間t2においては、領域201
に識別値(A5H)が書き込まれている。
In FIG. 7, before time t1, the area 209,
The TW abnormality determination flag of 210 and the number of times of TW abnormality determination are transferred to the areas 202 and 203.
13 pieces of diagnostic data have been transferred to the areas 204 to 206 (S501, 502). Also, at time t1, TW
Check data (01H) regarding abnormality is set in the area 201 (S503), and thereafter, various data are updated in this set state (S406 to S410). In FIG. 7, NE = 2000 rpm and GN = 1.5 are stored in the areas 211 to 213 as analysis data when the TW is abnormal.
g / rev and failure code = 02H are written.
At the time t2 when the data update is completed, the area 201
The identification value (A5H) is written in.

【0035】そして、同図7から分かるように、データ
更新途中(時間t1〜t2の期間)に電源遮断が発生し
た場合、領域201のバックアップRAM識別値はチェ
ックデータ(この場合は、01H)がセットされたまま
になる。従って、同識別値がバックアップ更新完了を示
す値以外のチェックデータであるか否かを判別すること
により、診断データの更新途中か否かが検出可能にな
る。
As can be seen from FIG. 7, when the power is cut off during the data update (time t1 to t2), the backup RAM identification value of the area 201 is the check data (01H in this case). It remains set. Therefore, by determining whether or not the same identification value is check data other than the value indicating the completion of backup update, it is possible to detect whether or not the diagnostic data is being updated.

【0036】次には、電源投入時におけるバックアップ
RAMのデータ復帰処理ルーチンについて、図8に従い
説明する。さて、電源投入(イグニションスイッチ:オ
ン)に伴い図8のルーチンがスタートし、CPU4は、
先ずS801で領域201に記憶されている識別値がバ
ックアップRAM更新完了を示す値(A5H)に一致す
るか否かを判別する。一致した場合、CPU4は、バッ
クアップRAMのデータ更新が正常に終了したか、又は
バックアップRAMに対する書き込みがなかったものと
判断し、本ルーチンを終了する。
Next, the data recovery processing routine of the backup RAM when the power is turned on will be described with reference to FIG. Now, when the power is turned on (ignition switch: on), the routine of FIG. 8 is started, and the CPU 4
First, in step S801, it is determined whether the identification value stored in the area 201 matches the value (A5H) indicating that the backup RAM has been updated. When they match, the CPU 4 determines that the update of the data in the backup RAM has been normally completed or that the backup RAM has not been written, and terminates this routine.

【0037】又、一致しなかった場合、CPU4はバッ
クアップRAMのデータ更新途中に電源が遮断されたと
判断し、S802〜805の処理を実行する。即ち、C
PU4はS802,803で、領域201の識別値に基
づいて、一時回避しておいた異常判定フラグ,異常判定
回数を復帰させるためのバックアップRAMの指定アド
レスを求める。具体的には、CPU4はS802で、H
A異常判定フラグ及びHA異常判定回数が記憶されてい
る、(n+3+α)番地を基準にして、同(n+3+
α)番地と復帰先の指定アドレスとのオフセット(差)
を算出する。なお、本実施例の場合、HA,TW異常時
の各々のチェックデータ(00H),(01H)が上記
オフセットに合致しており、オフセットは「0」又は
「1」のいずれかになる。
If they do not match, the CPU 4 determines that the power supply is cut off during the data updating of the backup RAM, and executes the processing of S802 to 805. That is, C
In S802 and 803, the PU 4 obtains the abnormality determination flag and the designated address of the backup RAM for restoring the number of abnormality determinations that have been temporarily avoided, based on the identification value of the area 201. Specifically, the CPU 4 sets the H
Based on the address (n + 3 + α) in which the A abnormality determination flag and the HA abnormality determination count are stored, the same (n + 3 +)
α) Offset (difference) between the address and the specified address of the return destination
To calculate. In the case of this embodiment, the check data (00H) and (01H) at the time of HA and TW abnormalities match the above offset, and the offset is either "0" or "1".

【0038】その後、CPU4はS803で、アドレス
(n+3+α)にS802でのオフセットを加算して指
定アドレスを求め、当該アドレスに、一時回避用の領域
202,203に記憶されている異常判定フラグA及び
異常判定回数Aを書き込む。この場合、HA異常時であ
ればS803のRAM指定アドレスは、(n+3+α)
+0=(n+3+α)となり、TW異常時であればS8
03のRAM指定アドレスは、(n+3+α)+1=
(n+4+α)となる。
After that, in S803, the CPU 4 obtains the designated address by adding the offset in S802 to the address (n + 3 + α), and at that address, the abnormality determination flag A and the abnormality determination flag A stored in the temporary avoidance areas 202 and 203 are stored. Write the abnormality determination count A. In this case, if the HA is abnormal, the RAM designated address in S803 is (n + 3 + α).
+ 0 = (n + 3 + α), and if the TW is abnormal, S8
The RAM designated address of 03 is (n + 3 + α) + 1 =
(N + 4 + α).

【0039】その後、CPU4はS804で、一時回避
用の領域204〜206に記憶されている診断データ
0’(NE),1’(GN),・・・α’(故障コー
ド)を領域211〜213に複写し、読み出しの対象と
なる診断データ0(NE),1(GN),・・・α(故
障コード)とする。さらに、CPU4はS805で、領
域201のチェックデータをバックアップRAM更新完
了を示す値(A5H)に書き換える。即ち、チェックデ
ータが初期状態の識別値に戻される。そして、CPU4
は本ルーチンを終了する。
Thereafter, in step S804, the CPU 4 stores the diagnostic data 0 '(NE), 1' (GN), ... α '(fault code) stored in the temporary avoidance areas 204 to 206 in the areas 211 to 211. It is copied to 213 and set as diagnostic data 0 (NE), 1 (GN), ... α (fault code) to be read. Further, in S805, the CPU 4 rewrites the check data in the area 201 with a value (A5H) indicating the completion of updating the backup RAM. That is, the check data is returned to the initial identification value. And CPU4
Ends this routine.

【0040】ここで、電源遮断のタイミングとバックア
ップRAMの保持データとの関係について前述の図7を
用いて説明する。図7において、例えば時間ta(S4
08直後)にて電源が遮断された場合、領域211の診
断データ0(NE)には今回のTW異常に関するデータ
が記憶されているのに対し、領域212,213の診断
データ1(GN),・・・α(故障コード)には前回の
HA異常に関するデータが保持されているという事態が
生じる。又、時間tb(S406直後)にて電源が遮断
された場合、領域209のTW異常判定フラグが「1」
に、領域210のTW異常判定回数が「0回」になると
いう、不整合な事態が生じる。即ちデータの更新期間で
ある時間t1〜t2に電源が遮断されると、データアク
セス領域において、更新前のデータと更新後のデータと
が混在するという事態が生じる。
Now, the relationship between the power-off timing and the data held in the backup RAM will be described with reference to FIG. In FIG. 7, for example, time ta (S4
If the power is shut off immediately after (08), the diagnostic data 0 (NE) in the area 211 stores the data regarding the current TW abnormality, whereas the diagnostic data 1 (GN) in the areas 212 and 213, .. .alpha. (Fault code) holds the data about the previous HA abnormality. When the power is cut off at time tb (immediately after S406), the TW abnormality determination flag in the area 209 is "1".
In addition, an inconsistent situation occurs in which the number of times of TW abnormality determination in the area 210 becomes “0”. That is, when the power is cut off during the time t1 to t2 which is the data update period, a situation occurs in which the data before update and the data after update coexist in the data access area.

【0041】しかし、図8の復帰処理によれば、データ
更新途中で電源が遮断されたか否かがチェックデータに
より判別され、データ更新途中であれば混在のない前回
の更新データがデータアクセス領域に転送される。従っ
て、更新前及び更新後の混在データがCPU4によりア
クセス(読み出し)されるおそれはない。さらに、この
とき、データアクセス領域の混在データは全て一時回避
領域のデータにより書き換えられるため、前記図3,図
4のルーチンが再開された際に、混在データが複写され
混乱を招くことはない。
However, according to the restoration process of FIG. 8, whether or not the power is cut off during the data update is determined by the check data, and if the data update is in progress, the previous update data that is not mixed is stored in the data access area. Transferred. Therefore, there is no possibility that the CPU 4 accesses (reads) the mixed data before and after the update. Further, at this time, since all the mixed data in the data access area is rewritten by the data in the temporary avoidance area, the mixed data is not copied and confused when the routines of FIGS. 3 and 4 are restarted.

【0042】そして、図8のルーチン実施後、図9のル
ーチンがスタートし、機器異常に関するバックアップR
AM内の各種データがダイアグチェッカー13に出力さ
れる。
After the routine shown in FIG. 8 is executed, the routine shown in FIG.
Various data in the AM is output to the diagnostic checker 13.

【0043】図9のルーチンにおいて、CPU4は、S
901でダイアグチェッカー13よりデータ出力リクエ
ストがあったか否かを確認する。リクエストがあった場
合、CPU4は、S902でバックアップRAMのデー
タアクセス領域に記憶されているアドレス毎の異常判定
フラグ,異常判定回数をI/O回路7を介してダイ
チェッカー13に出力する。そして、S903が肯定判
別される迄、即ち異常判定のフラグ,回数に関する全て
のアドレスの諸データが出力される迄、S902,90
3を繰り返し実行する。このとき、バックアップRAM
の領域207,208に記憶されているHA異常に関す
るデータと、領域209,210に記憶されているTW
異常に関するデータとが順次出力される。その後、CP
U4は、S904にてバックアップRAMの領域211
〜213に記憶されている診断データをI/O回路7を
介してダイグチェッカー13に出力し、本ルーチンを
終了する。
In the routine of FIG. 9, the CPU 4 executes S
At 901, it is confirmed whether or not there is a data output request from the diag checker 13. If requested, CPU 4 outputs the abnormality determination flag of each address stored in the data access region of the backup RAM in S902, the abnormality determination count the die A grayed checker 13 via the I / O circuit 7. Until S903 is affirmatively determined, that is, until the abnormality determination flag and data of all addresses regarding the number of times are output, S902, 90
Repeat step 3. At this time, backup RAM
Of the HA abnormality stored in the areas 207 and 208 of the TW and the TW stored in the areas 209 and 210
The data relating to the abnormality are sequentially output. Then CP
U4 is an area 211 of the backup RAM in S904.
The diagnostic data stored in ~213 output to the die A grayed checker 13 via the I / O circuit 7, the routine ends.

【0044】以上詳述したように、本実施例の故障診断
装置では、スロットルセンサ8又は水温センサ11の異
常が検出されると、先ず、前回の更新時にバックアップ
RAMのデータアクセス領域(領域207〜213)に
記憶した諸データを同RAMの一時回避領域(領域20
2〜206)に転送し(図5のS501,502)、そ
の後、データアクセス領域の諸データを順次更新するよ
うにした(図3のS306〜310,図4のS406〜
410)。又、データ更新期間には、所定のチェックデ
ータ(00H又は01H)をバックアップRAMの所定
領域(領域201)にセットするようにした(図5のS
503)。さらに、電源投入時において、前記チェック
データがセットされていれば、一時回避領域の諸データ
をデータアクセス領域に復帰させるようにした(図8の
S803,804)。
As described above in detail, in the failure diagnosis apparatus of this embodiment, when an abnormality of the throttle sensor 8 or the water temperature sensor 11 is detected, first, the data access area (areas 207 ... 213) stores various data stored in the RAM in the temporary avoidance area (area 20).
2 to 206) (S501 and 502 in FIG. 5), and then various data in the data access area are sequentially updated (S306 to 310 in FIG. 3 and S406 in FIG. 4).
410). Further, during the data update period, predetermined check data (00H or 01H) is set in a predetermined area (area 201) of the backup RAM (S in FIG. 5).
503). Further, when the check data is set when the power is turned on, various data in the temporary avoidance area is restored to the data access area (S803, 804 in FIG. 8).

【0045】即ち、データ更新途中に電源が遮断された
場合、所定領域のチェックデータがセット状態で保持さ
れ、電源投入時にはこのチェックデータによって電源遮
断を容易に識別することができる。そして、この場合、
一時回避領域のデータがデータアクセス領域に復帰され
ることで、更新前及び更新後の混在データを用いること
なく電源投入時の処理を行うことができる。即ち、従来
のように更新途中のデータを用いて異常診断の精度を悪
化させるおそれはなく、常に高精度の異常診断を行うこ
とができる。又、データアクセス領域の更新前後の混在
データを全て混在のないデータに書き換えることができ
るため、以降の処理の際に、混在データを用いることに
よる制御の混乱を防止することができる。
That is, when the power is cut off during the data update, the check data in the predetermined area is held in a set state, and the power cut can be easily identified by the check data when the power is turned on. And in this case,
By returning the data in the temporary avoidance area to the data access area, it is possible to perform the processing at power-on without using the mixed data before and after the update. That is, unlike the conventional case, there is no fear of degrading the accuracy of the abnormality diagnosis by using the data in the middle of updating, and the abnormality diagnosis can be always performed with high accuracy. Further, since all the mixed data before and after the update of the data access area can be rewritten to the data without mixing, it is possible to prevent confusion of control due to the use of the mixed data in the subsequent processing.

【0046】なお、本発明は上記実施例に限定されるも
のではなく、次に示す様態にて具体化することができ
る。上記実施例の故障診断装置では、スロットルセンサ
8及び水温センサ11に関する異常を検出したが、他の
センサや機器の異常を検出する構成とすることもでき
る。この場合、図3,図4のルーチンに相当するルーチ
ンを新たに設定し、バックアップRAMの記憶領域に該
当する領域を設ければよい。
The present invention is not limited to the above embodiments, but can be embodied in the following modes. Although the failure diagnosis device of the above-described embodiment detects an abnormality regarding the throttle sensor 8 and the water temperature sensor 11, it may be configured to detect an abnormality of another sensor or device. In this case, a routine corresponding to the routines of FIGS. 3 and 4 may be newly set to provide an area corresponding to the storage area of the backup RAM.

【0047】上記実施例では、本発明を車両用の故障診
断装置に具体化したが、他の電子制御システムに具体化
してもよい。
In the above embodiment, the present invention is embodied as a vehicle failure diagnosis device, but it may be embodied as another electronic control system.

【0048】[0048]

【発明の効果】以上の如く本発明によれば、制御データ
の更新途中に電源が遮断されても、更新前及び更新後の
制御データを混在させることなく記憶保持することがで
き、当該制御データを用いることにより電源投入時の制
御を確実に行うことができるという優れた効果を発揮す
る。
As described above, according to the present invention, even if the power is cut off during the update of the control data, the control data before and after the update can be stored and held without being mixed, and the control data can be stored. By using, the excellent effect that the control when the power is turned on can be surely performed is exhibited.

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

【図1】一実施例における故障診断装置の電気的構成を
示すブロック図である。
FIG. 1 is a block diagram showing an electrical configuration of a failure diagnosis device according to an embodiment.

【図2】バックアップRAMの記憶領域を示す構成図で
ある。
FIG. 2 is a configuration diagram showing a storage area of a backup RAM.

【図3】スロットルセンサ異常時の処理ルーチンを示す
フローチャートである。
FIG. 3 is a flowchart showing a processing routine when a throttle sensor is abnormal.

【図4】水温センサ異常時の処理ルーチンを示すフロー
チャートである。
FIG. 4 is a flowchart showing a processing routine when the water temperature sensor is abnormal.

【図5】図3,図4のサブルーチンであって、バックア
ップRAM書き換え開始処理ルーチンを示すフローチャ
ートである。
FIG. 5 is a flowchart showing a backup RAM rewriting start processing routine which is a subroutine of FIGS. 3 and 4;

【図6】図3,図4のサブルーチンであって、バックア
ップRAM書き換え完了処理ルーチンを示すフローチャ
ートである。
FIG. 6 is a flowchart showing a backup RAM rewriting completion processing routine, which is a subroutine of FIGS. 3 and 4;

【図7】バックアップRAMのデータ書き換え動作を示
すタイムチャートである。
FIG. 7 is a time chart showing a data rewriting operation of the backup RAM.

【図8】電源投入時におけるバックアップRAMのデー
タ復帰処理を示すフローチャートである。
FIG. 8 is a flowchart showing a data recovery process of the backup RAM when the power is turned on.

【図9】ダイアグチェッカーに異常解析に関するデータ
を出力するルーチンを示すフローチャートである。
FIG. 9 is a flowchart showing a routine for outputting data regarding abnormality analysis to a diagnostic checker.

【図10】クレームに対応したブロック図である。FIG. 10 is a block diagram corresponding to a claim.

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

1…制御ユニット、4…データ更新手段,チェックデー
タ設定手段,データ転送手段,データ復帰手段としての
CPU、6…バックアップRAMを備えたRAM。
1 ... Control unit, 4 ... Data updating means, check data setting means, data transfer means, CPU as data restoring means, 6 ... RAM provided with backup RAM.

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G05B 9/02 ─────────────────────────────────────────────────── ─── Continuation of front page (58) Fields surveyed (Int.Cl. 7 , DB name) G05B 9/02

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 第1,第2,第3の記憶領域を有し、電
源遮断時にもデータを記憶保持するバックアップメモリ
と、 所定のタイミングにて開始されるルーチンにて、前記バ
ックアップメモリの第1の記憶領域の制御データを順次
更新するデータ更新手段と、 前記データ更新手段による制御データの更新開始時にチ
ェックデータを前記バックアップメモリの第3の記憶領
域にセットし、同更新終了時に当該チェックデータをリ
セットするチェックデータ設定手段と、 前記データ更新手段による制御データの更新開始以前
に、前回の更新時に前記バックアップメモリの第1の記
憶領域に記憶した制御データを前記第2の記憶領域に転
送するデータ転送手段と、 電源投入時において、前記第3の記憶領域にチェックデ
ータがセットされていれば、前記第2の記憶領域の制御
データを前記第1の記憶領域に復帰させるデータ復帰手
段とを備え 前記チェックデータは、前記データ更新手段により前記
制御データが更新途中か否かを示すとともに、前記制御
データの種類を識別するデータであることを特徴とする
電子制御システムにおけるデータバックアップ装置。
1. A backup memory having first, second, and third storage areas, which stores and holds data even when power is cut off, and a backup memory which is stored in a routine started at a predetermined timing. Data updating means for sequentially updating the control data in the first storage area; check data is set in the third storage area of the backup memory at the start of updating the control data by the data updating means; And a check data setting unit for resetting the control data, and the control data stored in the first storage area of the backup memory at the time of the previous update before the update of the control data by the data updating unit is transferred to the second storage area. If the check data is set in the third storage area when the power is turned on and the data transfer means, And a data restoration means for restoring the control data of the serial second memory area in the first storage area, said check data, the by the data updating means
It indicates whether the control data is being updated, and
A data backup device in an electronic control system, which is data for identifying the type of data.
【請求項2】 車載機器の異常解析に必要な診断データ
を記憶保持して故障診断を実施する車両用故障診断装置
であって、 第1,第2,第3の記憶領域を有し、電源遮断時にも前
記診断データを記憶保持するバックアップメモリと、 前記車載機器の異常を検出する異常検出手段と、 該異常検出手段にて前記車載機器の異常が検出された場
合に、前記バックアップメモリの第1の記憶領域に記憶
保持されている前記診断データを順次更新するデータ更
新手段と、 前記データ更新手段による前記診断データの更新開始時
にチェックデータを前記バックアップメモリの第3の記
憶領域にセットし、同更新終了時に当該チェックデータ
をリセットするチェックデータ設定手段と、 前記異常検出手段による前記車載機器の異常検出後であ
って、前記データ更新手段による前記診断データの更新
開始以前に、前回の更新時に前記バックアップメモリの
第1の記憶領域に記憶した前記診断データを前記第2の
記憶領域に転送するデータ転送手段と、 電源投入時において、前記第3の記憶領域にチェックデ
ータがセットされていれば、前記第2の記憶領域の診断
データを前記第1の記憶領域に復帰させるデータ復帰手
段とを備えたことを特徴とする車両用故障診断装置。
2. Diagnostic data necessary for abnormality analysis of in-vehicle equipment
Vehicle failure diagnosis device that stores and holds the
In addition, it has the first, second, and third storage areas, and even when the power is cut off,
A backup memory that stores and holds diagnostic data, an abnormality detecting unit that detects an abnormality of the vehicle-mounted device, and a case where the abnormality detection unit detects an abnormality of the vehicle-mounted device.
In the first storage area of the backup memory
Data update that sequentially updates the retained diagnostic data
At the start of updating the diagnostic data by the new means and the data updating means
Check data in the third section of the backup memory
Storage area and check data at the end of the update
Check data setting means for resetting, and after the abnormality detection of the in-vehicle device by the abnormality detection means.
Then, updating the diagnostic data by the data updating means
Before starting, the backup memory of
The diagnostic data stored in the first storage area is stored in the second storage area.
Data transfer means for transferring data to the storage area, and a check data in the third storage area when the power is turned on.
If the data is set, the diagnosis of the second storage area
Data recovery means for recovering data to the first storage area
A failure diagnosis device for a vehicle, comprising: a step.
【請求項3】 前記チェックデータは、前記データ更新
手段により前記診断データが更新途中か否かを示すとと
もに、前記診断データの種類を識別するデータであるこ
とを特徴とする請求項2に記載の車両用故障診断装置。
3. The check data is the data update.
By means of indicating whether or not the diagnostic data is being updated by means
Mostly, it is data that identifies the type of diagnostic data.
The vehicle failure diagnosis device according to claim 2.
JP27099793A 1993-10-28 1993-10-28 Data backup device and vehicle failure diagnosis device in electronic control system Expired - Lifetime JP3438270B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP27099793A JP3438270B2 (en) 1993-10-28 1993-10-28 Data backup device and vehicle failure diagnosis device in electronic control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP27099793A JP3438270B2 (en) 1993-10-28 1993-10-28 Data backup device and vehicle failure diagnosis device in electronic control system

Publications (2)

Publication Number Publication Date
JPH07129202A JPH07129202A (en) 1995-05-19
JP3438270B2 true JP3438270B2 (en) 2003-08-18

Family

ID=17493970

Family Applications (1)

Application Number Title Priority Date Filing Date
JP27099793A Expired - Lifetime JP3438270B2 (en) 1993-10-28 1993-10-28 Data backup device and vehicle failure diagnosis device in electronic control system

Country Status (1)

Country Link
JP (1) JP3438270B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102328570B1 (en) * 2020-06-24 2021-11-19 현대자동차주식회사 Ethernet switch unit and method for controlling thereof

Also Published As

Publication number Publication date
JPH07129202A (en) 1995-05-19

Similar Documents

Publication Publication Date Title
EP0631213B1 (en) Vehicle diagnosis system
JP3505760B2 (en) Vehicle self-diagnosis device
JP3758356B2 (en) Electronic control device for vehicle, electronic control unit and recording medium
JP3491419B2 (en) Electronic control unit
JP3430579B2 (en) Abnormality detection device for vehicle communication system
WO1994004809A1 (en) Self-diagnosing apparatus of vehicle
US8190321B2 (en) Electronic control unit with permission switching
JP2000097810A (en) Vehicular control device equipped with self-diagnosis device
US4532593A (en) Electronic control method and apparatus for internal combustion engine
JP2006291730A (en) Diagnosis device for vehicle
JP3438270B2 (en) Data backup device and vehicle failure diagnosis device in electronic control system
JP2639287B2 (en) Vehicle self-diagnosis device
JP2502968B2 (en) Vehicle control device
JP2002334024A (en) Electronic controller
JPH07262099A (en) Data backup device and method in electronic control system
JP3419060B2 (en) Diagnostic device for vehicles
JP3149558B2 (en) Vehicle self-diagnosis device
JP3203884B2 (en) Vehicle diagnostic system
JPH07175501A (en) Data backup device for electronic control system
JP2004306624A (en) Information rewriting system for electronic control device
US6295589B1 (en) Apparatus and method prohibiting RAM diagnosis when other units may access RAM
JPH11232181A (en) Abnormally detector for battery backup ram
JPH0674085A (en) Self-diagnostic device for vehicle
JPH05171999A (en) Failure diagnosing system for vehicle
JP2804031B2 (en) Engine control device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090613

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140613

Year of fee payment: 11

EXPY Cancellation because of completion of term