JPH083740B2 - Control device - Google Patents

Control device

Info

Publication number
JPH083740B2
JPH083740B2 JP62151456A JP15145687A JPH083740B2 JP H083740 B2 JPH083740 B2 JP H083740B2 JP 62151456 A JP62151456 A JP 62151456A JP 15145687 A JP15145687 A JP 15145687A JP H083740 B2 JPH083740 B2 JP H083740B2
Authority
JP
Japan
Prior art keywords
mode
self
signal
microcomputer
output
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
JP62151456A
Other languages
Japanese (ja)
Other versions
JPS63316215A (en
Inventor
玲 関口
正雄 中島
Original Assignee
株式会社ゼクセル
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 株式会社ゼクセル filed Critical 株式会社ゼクセル
Priority to JP62151456A priority Critical patent/JPH083740B2/en
Priority to KR1019880000061A priority patent/KR920000822B1/en
Priority to US07/201,962 priority patent/US5182755A/en
Priority to DE3820534A priority patent/DE3820534A1/en
Publication of JPS63316215A publication Critical patent/JPS63316215A/en
Publication of JPH083740B2 publication Critical patent/JPH083740B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/14Time supervision arrangements, e.g. real time clock

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)
  • Testing And Monitoring For Control Systems (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)
  • Debugging And Monitoring (AREA)

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、マイクロコンピュータを備えた制御装置に
関する。
TECHNICAL FIELD The present invention relates to a control device including a microcomputer.

(従来の技術) マイクロコンピュータを備えた制御装置は、製品出荷
時に、性能が正常か否かを検査している。従来では、マ
イクロコンピュータの通常制御のプログラムを利用して
この検査を行なっている。しかし、この方法では、通常
制御に擬して入出力を行なうため、検査に多大な時間と
労力を費やしてしまう。
(Prior Art) A control device equipped with a microcomputer inspects whether or not the performance is normal at the time of product shipment. Conventionally, this inspection is carried out using a normal control program of a microcomputer. However, in this method, since the input / output is performed imitating the normal control, a great amount of time and labor is spent on the inspection.

そこで、特開昭57-13520号公報に記載されている制御
装置では、通常制御モードとは別に自己診断モードを実
行できるように、マイクロコンピュータのプログラムが
作られており、製品出荷時には、自己診断モードを実行
して検査の簡略化を図っている。
Therefore, in the control device described in Japanese Patent Laid-Open No. 57-13520, a program for the microcomputer is created so that the self-diagnosis mode can be executed separately from the normal control mode. The mode is executed to simplify the inspection.

(発明が解決しようとする問題点) しかし、上記公報の制御装置では、製品出荷後の通常
制御モード実行中の時に、ノイズ等によりプログラムが
暴走して自己診断モードに突入してしまうことがあり、
この自己診断モードから抜けられなくなって、通常制御
に支障をきたす欠点があった。
(Problems to be Solved by the Invention) However, in the control device of the above publication, the program may run away due to noise or the like and enter the self-diagnosis mode during execution of the normal control mode after product shipment. ,
There is a drawback that the normal control is hindered because the self-diagnosis mode cannot be exited.

(問題点を解決するための手段) 本発明は上記問題点を解決するためになされたもの
で、(イ)通常制御モード実行手段と、自己診断モード
実行手段と、リセット信号を受けた時に通常モード,自
己診断モードのいずれかを選択する選択手段とを含むマ
イクロコンピュータと、(ロ)上記マイクロコンピュー
タからプログラムラン信号を受けている時にはマイクロ
コンピュータにリセット信号を出力せず、マイクロコン
ピュータから所定時間プログランラン信号を受けなかっ
た時にマイクロコンピュータにリセット信号を出力する
ウオッチドックタイマと、を備え、上記通常制御モード
実行手段は、通常制御を実行している最中に上記所定時
間より短い時間間隔でプログラムラン信号を出力し、上
記自己診断モード実行手段は、自己診断を複数段階に分
割して実行し、各段階の最終ステップでプログラムラン
信号を出力しない状態を維持して上記ウオッチドックタ
イマからのリセット信号を待つことを特徴とする制御装
置にある。
(Means for Solving Problems) The present invention has been made to solve the above problems, and (a) the normal control mode executing means, the self-diagnosis mode executing means, and the normal operation when receiving a reset signal. A microcomputer including a selection means for selecting one of a mode and a self-diagnosis mode, and (b) a reset signal is not output to the microcomputer when a program run signal is received from the microcomputer, and the microcomputer does not output a predetermined time. A watchdog timer that outputs a reset signal to the microcomputer when it does not receive a proclan run signal, and the normal control mode execution means is at a time interval shorter than the predetermined time during execution of normal control. A program run signal is output, and the self-diagnosis mode execution means performs self-diagnosis. The control device is characterized in that it is divided into several stages and executed, and in the final step of each stage, the state in which the program run signal is not output is maintained and the reset signal from the watchdog timer is waited for.

(作用) 通常制御モードを実行している時に、ノイズ等により
プログラムが暴走して自己診断モードに突入してしまっ
た時には、自己診断モードのいずれかの段階の最終ステ
ップでプログラムラン信号を出力しない状態が維持され
るので、ウオッチドックタイマがマイクロコンピュータ
をリセットし、この後、マイクロコンピュータの選択手
段により、通常制御モードを選択する。したがって、自
己診断モードから即座に抜け出て通常制御モードに復帰
することができる。
(Operation) When the program runs into the self-diagnosis mode due to noise or the like while executing the normal control mode, the program run signal is not output at the final step of any stage of the self-diagnosis mode. Since the state is maintained, the watchdog timer resets the microcomputer, and thereafter, the normal control mode is selected by the selection means of the microcomputer. Therefore, it is possible to immediately exit the self-diagnosis mode and return to the normal control mode.

(実施例) 以下、本発明の一実施例を第1図から第4図までの図
面に基づいて説明する。第1図中10は例えば車両の燃料
噴射制御に用いられるコントロールユニット(制御装
置)であり、このコントロールユニット10には、マイク
ロコンピュータ11およびこれに接続されたウオッチドッ
クタイマ12が内蔵されるとともに、A/D変換器等のハー
ドウエア(図示しない)が内蔵されている。コントロー
ルユニット10は、例えば8つのアナログ信号入力端子13
…、6つのデジタル信号入力端子14…、エンジン回転を
検出する回転センサからの信号を入力する入力端子15を
有するとともに、3つの制御用出力端子16…、表示制御
用出力端子17を有している。さらに、その他の図示しな
い多数の入力端子および出力端子を有している。これら
コントロールユニットの端子13〜17は、マイクロコンピ
ュータ11の入出力ポートに、直接またはA/D変換器やそ
の他のハードウエアを介して接続されている。
(Embodiment) An embodiment of the present invention will be described below with reference to the drawings from FIG. 1 to FIG. Reference numeral 10 in FIG. 1 denotes a control unit (control device) used, for example, for fuel injection control of a vehicle. The control unit 10 includes a microcomputer 11 and a watchdog timer 12 connected to the microcomputer 11, and Built-in hardware (not shown) such as A / D converter. The control unit 10 has, for example, eight analog signal input terminals 13
..., six digital signal input terminals 14, ..., an input terminal 15 for inputting a signal from a rotation sensor for detecting engine rotation, and three control output terminals 16 ..., a display control output terminal 17 There is. Further, it has a large number of other input terminals and output terminals not shown. The terminals 13 to 17 of these control units are connected to the input / output ports of the microcomputer 11 directly or via an A / D converter or other hardware.

マイクロコンピュータ11は、後述するように通常制御
モードと、自己診断モードとを実行することができるよ
うになっており、入力条件からいずれのモードを実行す
べきかを判断する選択手段を有している。
The microcomputer 11 can execute a normal control mode and a self-diagnosis mode as will be described later, and has a selection means for judging which mode should be executed based on the input condition. .

また、マイクロコンピュータ11は、ウオッチドックタ
イマ12へモード判別信号Smを出力する出力手段を備えて
いる。すなわち、通常制御モードを実行している時に
は、マイクロコンピュータ11からプログラムランを示す
パルスが短時間毎に間欠的に出力され、自己診断モード
を実行している時には、このパルスは出力されずLレベ
ルのままである。このパルス群およびLレベルからなる
出力がそれぞれモード判別信号Smとなるのである。
The microcomputer 11 also includes an output unit that outputs a mode determination signal Sm to the watchdog timer 12. That is, when the normal control mode is being executed, a pulse indicating a program run is intermittently output from the microcomputer 11 at short time intervals, and when the self-diagnosis mode is being executed, this pulse is not output and is at the L level. It remains. The output consisting of this pulse group and the L level becomes the mode discrimination signal Sm.

ウオッチドックタイマ12は、通常制御モードにおいて
間欠的にパルスを受けた時には、このパルスにより短時
間おきにリセットされるため、マイクロコンピュータ11
にリセット信号Srを出力せず、自己診断モードにおいて
パルスを受けなくなった時には、所定時間毎にリセット
信号Srを出力する。
When the watchdog timer 12 receives pulses intermittently in the normal control mode, the watchdog timer 12 is reset at short intervals by the pulses.
When no pulse is received in the self-diagnosis mode without outputting the reset signal Sr, the reset signal Sr is output every predetermined time.

上記構成のコントロールユニット10は、製品出荷前
に、自己診断を行なう。この場合、第1図のように、自
己診断用のハードウエアを接続する。詳述すると、コン
トロールユニット10のアナログ信号入力端子13…に入力
装置20を接続する。また、接続装置21により、制御用出
力端子16…の各1つとデジタル信号入力端子14の各2つ
とをそれぞれ接続する。さらに、表示装置22を表示制御
用出力端子17に接続する。なお、入力端子15は回転セン
サに接続されずに、接地しておく。
The control unit 10 having the above configuration performs self-diagnosis before shipping the product. In this case, as shown in FIG. 1, hardware for self-diagnosis is connected. More specifically, the input device 20 is connected to the analog signal input terminals 13 of the control unit 10. Further, the connection device 21 connects each one of the control output terminals 16 ... And each of the two digital signal input terminals 14. Further, the display device 22 is connected to the display control output terminal 17. The input terminal 15 is not connected to the rotation sensor but is grounded.

表示装置22は第2図に示すように、8つの数値表示窓
25と、モードランプ26と、故障コード表示窓27とを有し
ている。なお、各数値表示窓25は各アナログ信号入力端
子13に対応している。
As shown in FIG. 2, the display device 22 has eight numerical display windows.
25, a mode lamp 26, and a failure code display window 27. Each numerical value display window 25 corresponds to each analog signal input terminal 13.

次に、自己診断制御について概略的に説明する。入力
装置20で、各アナログ信号入力端子13へ規定のアナログ
入力データを送る。このアナログ入力データは各アナロ
グ信号入力端子13毎に異なる。コントロールユニット10
では、このアナログ入力データがデジタルに変換されて
マイクロコンピュータ11に送られる。マイクロコンピュ
ータ11では、デジタルに変換された各アナログ入力デー
タが各規定値に対して許容誤差範囲にあるかどうかすな
わち実質的に等しいかどうかを判断する。これらアナロ
グ入力データの全てがそれぞれ規定値に等しいことが、
自己診断モードへの突入条件の一つである。したがっ
て、A/D変換器等のハードウエアの故障や接続不良等が
ある場合には、自己診断モードに突入しない。
Next, the self-diagnosis control will be schematically described. The input device 20 sends specified analog input data to each analog signal input terminal 13. This analog input data differs for each analog signal input terminal 13. Control unit 10
Then, this analog input data is converted to digital and sent to the microcomputer 11. The microcomputer 11 determines whether or not each analog input data converted into digital data is within an allowable error range with respect to each specified value, that is, is substantially equal. If all of these analog input data are equal to the specified value,
This is one of the conditions for entering the self-diagnosis mode. Therefore, if there is a hardware failure such as an A / D converter or a connection failure, the self-diagnosis mode is not entered.

なお、マイクロコンピュータ11では、入力端子15への
入力信号に基づいてエンジン回転数を演算するが、第1
図のハードウエア装着状態では、入力端子15は接地され
ているため、回転数の演算結果はゼロである。この回転
数ゼロも自己診断モードへの突入条件の一つである。
In the microcomputer 11, the engine speed is calculated based on the input signal to the input terminal 15.
In the hardware mounted state in the figure, the input terminal 15 is grounded, and therefore the result of calculation of the rotation speed is zero. This zero rotation speed is also one of the conditions for entering the self-diagnosis mode.

また、予め選択された1つの制御用出力端子16を介し
てマイクロコンピュータ11から信号を発し、この時、制
御用出力端子16と接続関係にある1つのデジタル入力端
子14を介してマイクロコンピュータ11に入力する信号
が、上記出力信号のレベルと一致するか否かを判断す
る。この入出力の一致も、自己診断モード突入の条件の
一つである。
In addition, a signal is issued from the microcomputer 11 via one control output terminal 16 selected in advance, and at this time, the signal is sent to the microcomputer 11 via one digital input terminal 14 connected to the control output terminal 16. It is determined whether the input signal matches the level of the output signal. This coincidence of input and output is also one of the conditions for entering the self-diagnosis mode.

マイクロコンピュータ11では、上述した突入条件を全
て満足している時に、選択手段でこれを判別して自己診
断モードに突入する。この時、表示装置22のモードラン
プ26を点灯させる。検査者は、このモードランプ26の点
灯で、自己診断モードを実行中であることを確認でき
る。また自己診断モードに突入しない場合すなわちモー
ドランプ26が点灯しない場合には、上述したようにA/D
変換器等が故障したものと知ることができる。なお、デ
ジタルに変換された各アナログ入力データはマイクロコ
ンピュータ11から表示装置22に送られ、数値表示窓25に
表示される。したがって、検査者は表示された各データ
と各規定値とを比較することにより、どこが故障したか
を大まかに知ることができる。
In the microcomputer 11, when all the rush conditions described above are satisfied, the selection means determines this and enters the self-diagnosis mode. At this time, the mode lamp 26 of the display device 22 is turned on. The inspector can confirm that the self-diagnosis mode is being executed by turning on the mode lamp 26. If the self-diagnosis mode is not entered, that is, if the mode lamp 26 does not light up, as described above, the A / D
It can be known that the converter etc. has failed. The analog input data converted into digital data is sent from the microcomputer 11 to the display device 22 and displayed in the numerical value display window 25. Therefore, the inspector can roughly know where a failure has occurred by comparing each displayed data with each specified value.

自己診断モードでは、マイクロコンピュータ11の各出
力ポートから制御用出力端子16を介して順に信号を発し
た時、対応する各2つのデジタル信号入力端子14を経て
マイクロコンピュータ11に入力する信号のレベルを判断
する。出力がHレベルの時に対応する入力がHレベルで
あり、出力がLレベルの時に対応する入力がLレベルで
あれば、マイクロコンピュータ11の入出力機能、マイク
ロコンピュータ11と端子14,16との間の接続不良、ハー
ドウエアの故障等がないと診断する。出力と入力のレベ
ルが異なる場合には、故障があるものと診断する。そし
て、その診断結果を、表示装置22の故障コード表示窓27
にコード番号で表示させる。例えば、故障がない場合に
は「00」を表示し、いずれかに故障があれば「01」〜
「06」で表示する。この故障コードにより、検査者は故
障箇所を大まかに推定できる。
In the self-diagnosis mode, when a signal is sequentially output from each output port of the microcomputer 11 via the control output terminal 16, the level of the signal input to the microcomputer 11 via the corresponding two digital signal input terminals 14 is set. to decide. When the output is at the H level, the corresponding input is at the H level, and when the output is at the L level, if the corresponding input is at the L level, the input / output function of the microcomputer 11, between the microcomputer 11 and the terminals 14 and 16. It is diagnosed that there is no connection failure or hardware failure. If the output and input levels are different, diagnose that there is a failure. Then, the diagnosis result is displayed in the failure code display window 27 of the display device 22.
To display the code number. For example, if there is no failure, "00" is displayed, and if there is any failure, "01" ...
Display as "06". This failure code allows the inspector to roughly estimate the failure location.

上記自己診断モードを実行している時には、前述した
ようにモード判別信号SmはLベルであり、所定時間毎
に、ウオッチドックタイマ12からマイクロコンピュータ
11にリセット信号Srを出力する。マイクロコンピュータ
11では、リセットされる毎に、モードの選択をして自己
診断モードを実行する。なお、1回のリセット毎に、各
数値表示窓25へのデータ表示を1つずつ行ない、さらに
この表示が終了した後では、上記入出力のチェックを1
つずつ行なう。
When the self-diagnosis mode is being executed, the mode discrimination signal Sm is at L-level as described above, and the watchdog timer 12 causes the microcomputer to change at predetermined intervals.
The reset signal Sr is output to 11. Microcomputer
In 11, the mode is selected and the self-diagnosis mode is executed each time it is reset. It should be noted that each time the data is reset, data is displayed in the numerical display windows 25 one by one, and after this display is completed, the input / output check is performed once.
Do each one.

上記構成のコントロールユニット10は、上記自己診断
の後、異常がなければ入力装置20、接続装置21、表示装
置22を取り外した状態で出荷され、例えば自動車の燃料
噴射装置の制御等に用いられる。燃料噴射装置は、燃料
噴射ポンプとガバナを備え、ガバナではアクチュエータ
によりコントロール部材の位置を制御し、燃料噴射ポン
プからの燃料供給量を調節するものである。
After the self-diagnosis, the control unit 10 configured as described above is shipped with the input device 20, the connection device 21, and the display device 22 removed if there is no abnormality, and is used, for example, for controlling a fuel injection device of an automobile. The fuel injection device includes a fuel injection pump and a governor, and the governor controls the position of a control member by an actuator to adjust the amount of fuel supplied from the fuel injection pump.

以下、上記の燃料噴射等の制御すなわち通常制御につ
いて簡単に説明する。アナログ信号入力端子13…には、
アクセルセンサからのアクセル踏み込み量や、エンジン
の水温、上記コントロール部材の位置等に関するアナロ
グ情報が入力される。これら情報はA/D変換器によりデ
ジタル化されてマイクロコンピュータ11に入力される。
また、デジタル信号入力端子14…には、スタータスイッ
チ等の各種スイッチからのオン,オフ信号が入力され、
マイクロコンピュータ11に至る。また、制御用出力端子
16からは、通常制御時の故障表示ランプや、エンジンの
予熱プラグ等へのオン,オフ信号が出力される。入力端
子15には、回転センサからのエンジン回転信号が入力さ
れる。また、図示しない出力端子からは、上記エンジン
回転数やアクセル踏み込み量等に基づいて、コントロー
ル部材制御用アクチュエータ等への制御信号が出力され
る。なお、表示用制御端子17は通常制御では使用されな
い。
Hereinafter, the control of the fuel injection or the like, that is, the normal control will be briefly described. The analog signal input terminal 13 ...
Analog information about the amount of accelerator depression from the accelerator sensor, the water temperature of the engine, the position of the control member, etc. is input. These pieces of information are digitized by the A / D converter and input to the microcomputer 11.
Further, ON / OFF signals from various switches such as a starter switch are input to the digital signal input terminals 14 ...
To the microcomputer 11. Also, control output terminal
The 16 outputs a failure indicator lamp during normal control and an on / off signal to the engine preheating plug. The engine rotation signal from the rotation sensor is input to the input terminal 15. In addition, a control signal to an actuator for controlling the control member or the like is output from an output terminal (not shown) based on the engine speed, the accelerator pedal depression amount, and the like. The display control terminal 17 is not used in normal control.

上記通常制御モードを実行している時には、マイクロ
コンピュータ11からのモード判別信号Smが、間欠的なパ
ルスからなり、ウオッチドックタイマ12がこのパルスに
より短時間でリセットされるため、このウオッチドック
タイマ12からマイクロコンピュータ11へリセット信号Sr
は出力されない。したがって、この通常制御モードの実
行中にマイクロコンピュータ11がリセットされることは
なく、安定した通常制御を行なうことができる。
When the normal control mode is being executed, the mode discrimination signal Sm from the microcomputer 11 consists of intermittent pulses, and the watchdog timer 12 is reset in a short time by this pulse. To microcomputer 11 reset signal Sr
Is not output. Therefore, the microcomputer 11 is not reset during execution of the normal control mode, and stable normal control can be performed.

通常制御モードを実行している時に、ノイズ等により
プログラムが暴走して自己診断モードに突入してしまっ
た時には、Lレベルのモード判別信号Smに基づいて所定
時間経過後に、ウオッチドックタイマ12によりマイクロ
コンピュータ11をリセットし、この後、回転数がゼロか
否かの判断や、各アナログ入力データが規定値と一致す
るか否かの判断や、選択された1つの制御用出力端子16
からの出力とこれに対応する1つのデジタル信号入力端
子16への入力が一致するか否かの判断により、通常制御
モードを選択する。通常モードではエンジン回転数がゼ
ロではないのが普通であり、また回転数ゼロであったと
しても全てのアナログ入力データが規定値に一致するこ
とはなく、さらに上記通常モードでは何の関係もない出
力と入力が一致することも極めて少ないから、この選択
により、自己診断モードから即座に抜け出て通常制御モ
ードに復帰することができる。なお、上記入出力の一致
を判断する場合、例えば、出力として通常時の故障表示
ランプを制御するための出力を用い、入力としてスター
タスイッチからの入力を用いる。
When the program runs into the self-diagnosis mode due to noise or the like while executing the normal control mode, after a predetermined time has elapsed based on the L-level mode determination signal Sm, the watchdog timer 12 causes the micro The computer 11 is reset, and thereafter, it is determined whether the number of revolutions is zero, whether each analog input data matches the specified value, and one selected control output terminal 16 is selected.
The normal control mode is selected by determining whether or not the output from the input terminal and the input to the corresponding one digital signal input terminal 16 match. Normally, the engine speed is not zero in normal mode, and even if the engine speed is zero, all analog input data does not match the specified value, and there is nothing to do with the normal mode. Since the output and the input rarely coincide with each other, this selection allows the user to immediately exit the self-diagnosis mode and return to the normal control mode. In the case of determining the coincidence of the input and output, for example, the output for controlling the failure indicator lamp in the normal state is used as the output and the input from the starter switch is used as the input.

次に、マイクロコンピュータ11でのプログラムについ
て、第3図、第4図を参照して説明する。まず、スター
ト信号またはリセット信号を受けた時に、ステップ100
で入出力ポートを初期化する。次のステップ101でチェ
ック用RAMが第1設定値か第2設定値かを判断する。第
2設定値であれば、通常制御モード実行中であるとし
て、ステップ102で表示用ポインタをリセットし、ステ
ップ103でチェック用カウンタをリセットし、ステップ1
04で故障表示用レジスタをリセットした後、ステップ10
5でシステムイニシャライズしてプログラムを終了し、
タスク管理プログラムに移行する。
Next, the program in the microcomputer 11 will be described with reference to FIGS. 3 and 4. First, when the start signal or reset signal is received, step 100
Initialize the I / O port with. In the next step 101, it is determined whether the check RAM is the first set value or the second set value. If it is the second set value, it is determined that the normal control mode is being executed, the display pointer is reset in step 102, the check counter is reset in step 103, and step 1
After resetting the failure display register in 04, step 10
Initialize the system with 5 and finish the program,
Move to task management program.

チェック用RAMが第1設定値であれば、自己診断モー
ド実行中であると一応判断して、ステップ106で表示用
ポインタの数値を判断する。この数値が「10」以上であ
れば自己診断モード中に採りうる数値ではなく、通常制
御モード実行中であるとして、上記ステップ102〜105を
実行する。この数値が「9」以下であれば、一応自己診
断モード実行中であると判断して、次のステップ107で
チェック用カウンタの数値を判断する。この数値が
「4」以上であれば自己診断モード実行中に採りうる数
値ではないとして、上記ステップ102〜105を実行する。
この数値が「3」以下であれば、一応自己診断モード中
であると判断して、次のステップ108〜111で入出力チェ
ックを実行する。
If the check RAM has the first set value, it is temporarily determined that the self-diagnosis mode is being executed, and the numerical value of the display pointer is determined in step 106. If this numerical value is "10" or more, it is not a numerical value that can be taken during the self-diagnosis mode, and it is determined that the normal control mode is being executed, and steps 102 to 105 are executed. If the value is "9" or less, it is determined that the self-diagnosis mode is being executed, and the value of the check counter is determined in the next step 107. If this numerical value is "4" or more, it is determined that the numerical value cannot be taken during execution of the self-diagnosis mode, and the above steps 102 to 105 are executed.
If this numerical value is "3" or less, it is temporarily determined that the self-diagnosis mode is in progress, and the input / output check is executed in the following steps 108-111.

詳述すると、ステップ108で予め選択された1つの制
御用出力端子16にHレベルの信号を出力する。そして、
ステップ109で,この制御用出力端子16に対応する1つ
のデジタル信号入力端子14を経た入力信号が、Hレベル
かLレベルかを判断する。この入力が出力レベルと異な
りLレベルであれば、通常制御モード実行中であるとし
て、上記ステップ102〜105を実行する。入力がHレベル
であれば、一応自己診断モードであるとして、ステップ
110で上記制御用出力端子16にLレベルの信号を出力す
る。そして、ステップ111で対応するデジタル信号入力
端子14を経た入力信号のレベルを判断する。入力信号が
出力レベルと異なりHレベルであれば、通常モード実行
中であるとして上記ステップ102から105を実行する。入
力レベルがLレベルであれば、自己診断モード実行中で
あると最終的に判断し、次のステップ112でシステムイ
ニシャライズして終了し、タスク管理プログラムに移行
する。したがって、自己診断モード実行中である時に
は、この自己診断に用いられる表示用ポインタ、チェッ
ク用カウンタ、故障表示用レジスタはリセットされな
い。
More specifically, in step 108, an H level signal is output to one control output terminal 16 selected in advance. And
In step 109, it is determined whether the input signal that has passed through one digital signal input terminal 14 corresponding to the control output terminal 16 is at the H level or the L level. If this input is at the L level unlike the output level, it is determined that the normal control mode is being executed, and steps 102 to 105 are executed. If the input is at H level, it is assumed that the self-diagnosis mode is set,
At 110, an L level signal is output to the control output terminal 16. Then, in step 111, the level of the input signal passed through the corresponding digital signal input terminal 14 is determined. If the input signal is at the H level unlike the output level, it is determined that the normal mode is being executed, and steps 102 to 105 are executed. If the input level is the L level, it is finally determined that the self-diagnosis mode is being executed, the system is initialized in the next step 112, the processing is terminated, and the task management program is entered. Therefore, during execution of the self-diagnosis mode, the display pointer, check counter, and failure display register used for this self-diagnosis are not reset.

上記イニシャライズのプログラムが終了すると、タス
ク管理プログラムでタスク起動信号が発生する。する
と、最も起動周期の短い第4図のタスク(TASK1)が実
行される。詳述すると、ステップ120でエンジン回転数
がゼロか否か判断する。前述したように、自己診断モー
ド時には、入力端子15には回転センサから信号が入力さ
れず回転数はゼロである。したがって、ゼロでない時は
通常の制御モードを実行していると判断し、ステップ12
1でチェック用RAMを通常制御モード実行中であることを
表わす第2設定値にして、タスクを終了するとともに、
通常制御モードを実行するプログラムへジャンプする。
When the initialization program ends, a task start signal is generated in the task management program. Then, the task (TASK1) of FIG. 4 having the shortest activation cycle is executed. More specifically, in step 120, it is determined whether the engine speed is zero. As described above, in the self-diagnosis mode, no signal is input to the input terminal 15 from the rotation sensor, and the rotation speed is zero. Therefore, when it is not zero, it is determined that the normal control mode is being executed, and step 12
When 1 is set to the check RAM as the second set value indicating that the normal control mode is being executed, the task is ended, and
Jump to the program that executes the normal control mode.

エンジン回転数がゼロの時には、一応自己診断モード
実行中であると判断して、次のステップ122で、入力さ
れた各アナログ入力データが設定値と実質的に一致する
か否かを判断する。一致していないのは、A/D変換器等
の故障かあるいは通常制御モード実行中の場合であるか
ら、この時にもステップ121を実行した後、通常制御モ
ードに移行する。
When the engine speed is zero, it is temporarily determined that the self-diagnosis mode is being executed, and in the next step 122, it is determined whether or not each input analog input data substantially matches the set value. If they do not match, it means that the A / D converter or the like has failed or the normal control mode is being executed. Therefore, at this time also, step 121 is executed, and then the normal control mode is entered.

ステップ122で、各アナログ入力データが設定値と一
致した場合には、一応自己診断モード実行中であると判
断して、ステップ123〜126で入出力チェックを実行す
る。詳述すると、ステップ123で予め選択された1つの
制御用出力端子16にHレベルの信号を出力する。そし
て、ステップ124で、この制御用出力端子16に対応する
1つのデジタル信号入力端子14を経た入力信号がHレベ
ルかLレベルかを判断する。この入力が出力レベルと異
なりLレベルであれば、通常制御モード実行中であると
して、上記ステップ121を実行する。入力がHレベルで
あれば、一応自己診断モードであるとし、次のステップ
125で上記制御用出力端子16にLレベルの信号を出力す
る。そして、ステップ126で対応するデジタル信号入力
端子14を経た入力信号のレベルを判断する。入力信号が
出力レベルと異なりHレベルであれば、通常モード実行
中であるとして上記ステップ121を実行する。
If each analog input data matches the set value in step 122, it is determined that the self-diagnosis mode is being executed, and the input / output check is executed in steps 123 to 126. More specifically, in step 123, an H level signal is output to one control output terminal 16 selected in advance. Then, in step 124, it is determined whether the input signal via one digital signal input terminal 14 corresponding to the control output terminal 16 is at the H level or the L level. If this input is at the L level unlike the output level, it is determined that the normal control mode is being executed, and the above step 121 is executed. If the input is at H level, it is assumed that the self-diagnosis mode is set, and the next step
At 125, an L level signal is output to the control output terminal 16. Then, in step 126, the level of the input signal passed through the corresponding digital signal input terminal 14 is determined. If the input signal is at the H level, unlike the output level, the step 121 is executed assuming that the normal mode is being executed.

上記入力信号がLレベルであれば、自己診断モード実
行中であると最終的に判断してステップ130でチェック
用RAMを自己診断モード実行中を表わす第1設定値に
し、以下、自己診断モードを実行する。すなわち、ステ
ップ131でガバナアクチュエータによりコントロール部
材をプルダウンする(エンジンを停止させる)制御信号
を出力する。これは通常制御中すなわち車両走行中にプ
ログラム暴走により自己診断モードに突入してしまった
時の安全確保のためのものである。
If the input signal is at the L level, it is finally determined that the self-diagnosis mode is being executed, and in step 130 the check RAM is set to the first set value indicating that the self-diagnosis mode is being executed. Run. That is, in step 131, a control signal for pulling down the control member (stopping the engine) by the governor actuator is output. This is for ensuring safety when the self-diagnosis mode is entered due to a program runaway during normal control, that is, while the vehicle is traveling.

次に、ステップ132で、入出力の全チェック終了か否
か、すなわちチェック用カウンタが制御用出力端子16の
数と等しい値すなわち「3」になっているか否かを判別
する。
Next, in step 132, it is determined whether or not all the input / output checks have been completed, that is, whether the check counter has a value equal to the number of control output terminals 16, that is, "3".

チェック終了でない場合にはステップ133でアナログ
入力データ表示が終了しているか否か、すなわち、表示
用ポインタがアナログ信号入力端子13の数すなわち
「9」になっているか否かを判断する。終了していない
場合には、次のステップ134〜138を実行する。これらス
テップ134〜138は、モードランプ26を点灯させ、表示装
置22の各数値表示窓25にアナログ入力データを順に表示
するためのものである。詳述すると、ステップ134で表
示用ポインタがゼロか否かを判断する。ゼロの時にはス
テップ135でモードランプ26を点灯させる。したがっ
て、自己診断モード実行の初期からモードランプ26が点
灯して自己診断モードであることを表示することができ
る。表示用ポインタがゼロでない場合には、ステップ13
6で表示用ポインタに書き込まれている数値に対応した
入力端子13からのアナログ入力データを数値表示窓25に
表示させる。ステップ135またはステップ136の実行後
に、ステップ137で表示用ポインタをインクリメントす
る。これらステップ134〜137を繰り返すことにより、数
値表示窓25に順にアナログ入力データを表示することが
できる。
If the check is not completed, it is determined in step 133 whether the analog input data display is completed, that is, whether the display pointer has the number of analog signal input terminals 13, that is, "9". If not finished, the following steps 134 to 138 are executed. These steps 134 to 138 are for turning on the mode lamp 26 and sequentially displaying the analog input data on each numerical display window 25 of the display device 22. More specifically, in step 134, it is determined whether the display pointer is zero. When it is zero, the mode lamp 26 is turned on in step 135. Therefore, the mode lamp 26 lights up from the beginning of execution of the self-diagnosis mode to indicate that the self-diagnosis mode is in effect. If the display pointer is not zero, step 13
In step 6, the analog input data from the input terminal 13 corresponding to the numerical value written in the display pointer is displayed in the numerical value display window 25. After execution of step 135 or step 136, the display pointer is incremented in step 137. By repeating these steps 134 to 137, the analog input data can be sequentially displayed on the numerical display window 25.

次のステップ138はノーオペレーションであり、無限
ループを形成して、ウオッチドックタイマ12からのリセ
ット信号Srの出力を待つ。したがって、1つの数値表示
窓25にアナログ入力データを表示する毎にマイクロコン
ピュータ11がリセットされる。
The next step 138 is a no-operation, which forms an infinite loop and waits for the output of the reset signal Sr from the watchdog timer 12. Therefore, the microcomputer 11 is reset every time the analog input data is displayed in the one numerical value display window 25.

入出力の全チェックが終了せず、アナログ入力データ
の表示が終了した時には、ステップ140〜147で入出力チ
ェックが実行される。詳述すると、ステップ140でチェ
ック用カウンタで指示された制御用出力端子16にHレベ
ルの信号を出力する。そして、ステップ141で、この制
御用出力端子16に対応する2つのデジタル信号入力端子
14を経た入力信号がHレベルかLレベルかを判断する。
2つの入力のいずれかが出力レベルと異なりLレベルで
あれば、故障であるとして、ステップ142で故障表示用
レジスタの対応ビットをセットする。2つの入力がHレ
ベルであれば、ステップ143でチェック用カウンタで指
示された制御用出力端子16にLレベルの信号を出力す
る。そして、ステップ144でこの制御用出力端子16に対
応する2つのデジタル信号入力端子14を経た入力信号の
レベルを判断する。入力信号が出力レベルと異なりHレ
ベルであれば、ステップ145で故障表示用レジスタの対
応ビットをセットする。次のステップ146でチェック用
カウンタをインクリメントする。これらステップ140〜1
46を繰り返すことにより、入出力チェックを順に行なう
ことができる。
When all the input / output checks are not completed and the analog input data display is completed, the input / output check is executed in steps 140 to 147. More specifically, in step 140, an H level signal is output to the control output terminal 16 designated by the check counter. Then, in step 141, two digital signal input terminals corresponding to the control output terminal 16
It is determined whether the input signal passing through 14 is at H level or L level.
If either of the two inputs is at the L level, which is different from the output level, it is determined that there is a failure and the corresponding bit of the failure display register is set at step 142. If the two inputs are H level, an L level signal is output to the control output terminal 16 designated by the check counter in step 143. Then, in step 144, the level of the input signal passed through the two digital signal input terminals 14 corresponding to the control output terminal 16 is judged. If the input signal is at the H level unlike the output level, the corresponding bit of the failure display register is set at step 145. In the next step 146, the check counter is incremented. These steps 140-1
By repeating 46, input / output checks can be performed in order.

次のステップ147はノーオペレーションであり、無限
ループを形成して、ウォッチドックタイマ12からのリセ
ット信号Srの出力を待つ。したがって、1回の入出力チ
ェックを行なう度にマイクロコンピュータ11がリセット
される。
The next step 147 is no operation, forming an infinite loop and waiting for the output of the reset signal Sr from the watchdog timer 12. Therefore, the microcomputer 11 is reset each time one input / output check is performed.

入出力チェックが全部終了した時には、ステップ132
でこれを判断して、ステップ150〜152を実行する。すな
わち、ステップ150で故障表示用レジスタの各ビットの
セット,リセット状態に基づいて、表示装置22へ故障コ
ード信号を出力して、故障コード表示窓27に故障コード
を表示させる。次のステップ151で表示用ポインタおよ
びチェック用カウンタをリセットし、ステップ152でノ
ーオペレーションにして無限ループを形成し、ウオッチ
ドックタイマ12からのリセット信号Srを待つ。
When all I / O checks are complete, step 132
Then, this is judged and steps 150 to 152 are executed. That is, in step 150, a failure code signal is output to the display device 22 based on the set or reset state of each bit of the failure display register to display the failure code in the failure code display window 27. In the next step 151, the display pointer and the check counter are reset, and in step 152, no operation is performed to form an infinite loop, and the reset signal Sr from the watchdog timer 12 is waited for.

第4図のタスクは最も起動周期が短いから、第3図の
イニシャライズ実行後に常に優先的にこのタスクを実行
するため、マイクロコンピュータ11のリセット毎に、自
己診断モードを繰り返し実行し続ける。
Since the task shown in FIG. 4 has the shortest activation cycle, the task shown in FIG. 3 is always executed with priority after the initialization. Therefore, the self-diagnosis mode is repeatedly executed every time the microcomputer 11 is reset.

なお、通常制御モードを実行している時に、ノイズ等
により自己診断モードに突入した時には、ステップ138,
147,152のいずれかで無限ループを形成してリセット信
号を待ち、リセットされた時には、第3図のプログラム
を実行した後第4図のプログラムのステップ120,122,12
4,またはステップ126で、通常モードを選択するから、
自己診断モードから即座に抜け出すことができる。
If the self-diagnosis mode is entered due to noise or the like while executing the normal control mode, step 138,
An infinite loop is formed in any of 147 and 152 to wait for a reset signal, and when reset, the program of FIG. 3 is executed and then steps 120, 122 and 12 of the program of FIG. 4 are executed.
4, or in step 126, select the normal mode,
You can immediately exit the self-diagnosis mode.

本発明は上記実施例に制約されず種々の態様が可能で
ある。
The present invention is not limited to the above-mentioned embodiment and various modes are possible.

(発明の効果) 以上説明したように、本発明では、通常制御モードと
は別に自己診断モードを実行できるように、マイクロコ
ンピュータのプログラムが作られており、製品出荷時に
は自己診断モードを実行することにより、検査の簡略化
を図ることができる。しかも、通常制御の時に、ノイズ
等によりプログラムが暴走して自己診断モードに突入し
ても、この自己診断モードから即座に抜け出ることがで
き、通常制御に支障をきたすのを防止できる。
(Effects of the Invention) As described above, in the present invention, the microcomputer program is created so that the self-diagnosis mode can be executed separately from the normal control mode, and the self-diagnosis mode should be executed when the product is shipped. Therefore, the inspection can be simplified. In addition, even if the program runs into the self-diagnosis mode due to noise or the like during the normal control, it is possible to immediately exit the self-diagnosis mode and prevent the normal control from being disturbed.

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

第1図から第4図までの図面は本発明の一実施例を示す
ものであり、第1図は自己診断モード実行中の制御装置
および周辺ハードウエアのブロック図、第2図は表示装
置の正面図、第3図はイニシャライズ処理プログラムを
示すフローチャート図、第4図は自己診断モードを実行
するためのプログラムのフローチャート図である。 10……コントロールユニット(制御装置)、11……マイ
クロコンピュータ、12……ウオッチドックタイマ、Sm…
…モード判別信号、Sr……リセット信号。
1 to 4 show an embodiment of the present invention. FIG. 1 is a block diagram of a control device and peripheral hardware during execution of a self-diagnosis mode, and FIG. 2 is a display device. A front view, FIG. 3 is a flowchart showing an initialization processing program, and FIG. 4 is a flowchart showing a program for executing a self-diagnosis mode. 10 ... Control unit (control device), 11 ... Microcomputer, 12 ... Watchdog timer, Sm ...
… Mode discrimination signal, Sr …… Reset signal.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】(イ)通常制御モード実行手段と、自己診
断モード実行手段と、リセット信号を受けた時に通常モ
ード,自己診断モードのいずれかを選択する選択手段と
を含むマイクロコンピュータと、 (ロ)上記マイクロコンピュータからプログラムラン信
号を受けている時にはマイクロコンピュータにリセット
信号を出力せず、マイクロコンピュータから所定時間プ
ログランラン信号を受けなかった時にマイクロコンピュ
ータにリセット信号を出力するウオッチドックタイマ
と、 を備え、上記通常制御モード実行手段は、通常制御を実
行している最中に上記所定時間より短い時間間隔でプロ
グラムラン信号を出力し、上記自己診断モード実行手段
は、自己診断を複数段階に分割して実行し、各段階の最
終ステップでプログラムラン信号を出力しない状態を維
持して上記ウオッチドックタイマからのリセット信号を
待つことを特徴とする制御装置。
(A) A microcomputer including a normal control mode execution means, a self-diagnosis mode execution means, and a selection means for selecting one of a normal mode and a self-diagnosis mode when a reset signal is received, B) A watchdog timer that does not output a reset signal to the microcomputer when receiving a program run signal from the microcomputer, and outputs a reset signal to the microcomputer when it does not receive a prog run signal from the microcomputer for a predetermined time. The normal control mode executing means outputs a program run signal at a time interval shorter than the predetermined time while executing the normal control, and the self-diagnosis mode executing means performs self-diagnosis in a plurality of stages. Divide and execute the program run signal at the final step of each stage While maintaining the state in which no force control apparatus characterized by waiting for a reset signal from the watchdog timer.
JP62151456A 1987-06-19 1987-06-19 Control device Expired - Lifetime JPH083740B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP62151456A JPH083740B2 (en) 1987-06-19 1987-06-19 Control device
KR1019880000061A KR920000822B1 (en) 1987-06-19 1988-01-08 Controller
US07/201,962 US5182755A (en) 1987-06-19 1988-06-03 Malfunction checking system for controller
DE3820534A DE3820534A1 (en) 1987-06-19 1988-06-16 Equipment for the detection of faults in a controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62151456A JPH083740B2 (en) 1987-06-19 1987-06-19 Control device

Publications (2)

Publication Number Publication Date
JPS63316215A JPS63316215A (en) 1988-12-23
JPH083740B2 true JPH083740B2 (en) 1996-01-17

Family

ID=15518961

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62151456A Expired - Lifetime JPH083740B2 (en) 1987-06-19 1987-06-19 Control device

Country Status (2)

Country Link
JP (1) JPH083740B2 (en)
KR (1) KR920000822B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2743850B2 (en) * 1994-12-28 1998-04-22 日本電気株式会社 Data processing device
JP6540561B2 (en) * 2016-03-14 2019-07-10 オムロン株式会社 Evaluation system, evaluation program and evaluation method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4107542A (en) * 1975-02-19 1978-08-15 Westinghouse Electric Corp. Time delayed relay sequencer and alarm reset for a gas turbine local maintenance controller
JPS5552106A (en) * 1978-10-09 1980-04-16 Hitachi Ltd Managing unit for process input and output
JPS5985445A (en) * 1982-11-08 1984-05-17 Nippon Denso Co Ltd Self-diagnostic method in engine control device
JPS60154930A (en) * 1984-01-25 1985-08-14 Hitachi Ltd Electronic car controller

Also Published As

Publication number Publication date
KR920000822B1 (en) 1992-01-30
KR890000984A (en) 1989-03-17
JPS63316215A (en) 1988-12-23

Similar Documents

Publication Publication Date Title
KR100627984B1 (en) Control device for a system and operating method thereof
US7134049B2 (en) System and method for sequencing and performing very high speed software downloads concurrent with system testing in an automated production environment
JP4509098B2 (en) Apparatus and method for on-board diagnosis based on model
JPH1195803A (en) Controller for system and driving method for controller
JP2002202001A (en) Vehicular control device provided with self-diagnostic function, and recording medium
JPS5813140A (en) Electronic engine control device with external adjustment function
JPH03288942A (en) Program run-away detecting method for microcomputer
JPH09305412A (en) Microcomputer having maximum interruption inhibition period mesuring function
JPH083740B2 (en) Control device
JPS62161038A (en) Electronic controller for vehicle
JP2002227662A (en) Electronic control device
JPH09120368A (en) Cpu monitor device
US20230176882A1 (en) Method for simulating a control unit on a computer based on the autosar standard, and computer therefor
JP2004069643A (en) Control unit for vehicle
JPS6045453B2 (en) multiprocessor
JPH1124703A (en) Automatic operation system
JPH0791310A (en) Self-diagnosing device for on-vehicle control device
JPS60164846A (en) Hardware inspecting device of microcomputer
JPH03189738A (en) Memory contents comparing device
JPH1083355A (en) Memory checking mechanism for vehicle controller
JPH09126955A (en) Fault diagnostic apparatus for automobile
JPH0679277B2 (en) Control unit inspection device
JPS62258831A (en) Abnormality diagnosis device
JPS5936786B2 (en) Failure detection device for weighing machine control
JP2753251B2 (en) Engine control device