JPS6181233A - Car control device - Google Patents

Car control device

Info

Publication number
JPS6181233A
JPS6181233A JP20292384A JP20292384A JPS6181233A JP S6181233 A JPS6181233 A JP S6181233A JP 20292384 A JP20292384 A JP 20292384A JP 20292384 A JP20292384 A JP 20292384A JP S6181233 A JPS6181233 A JP S6181233A
Authority
JP
Japan
Prior art keywords
task
microcomputer
executed
data
activation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP20292384A
Other languages
Japanese (ja)
Inventor
Asaji Minagawa
源河 朝治
Rei Sekiguchi
玲 関口
Kyoichi Fujimori
藤森 恭一
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.)
Bosch Corp
Original Assignee
Diesel Kiki Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Diesel Kiki Co Ltd filed Critical Diesel Kiki Co Ltd
Priority to JP20292384A priority Critical patent/JPS6181233A/en
Publication of JPS6181233A publication Critical patent/JPS6181233A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the memory capacity by arranging an activation requirement initiation device which initiates an activation requirement at an interval of the specified time based on a memory device that stores information related to the preset activation period and order in programs, and on the content of the memory. CONSTITUTION:This device includes a memory system and a memory device: the memory system 401 divides the specified control program to control various car devices into numbers of programs (hereafter they are called tasks) and stores them, and the memory device 402 stores information related to an activation period and order of the activation of each task. Activation requirements are initiated by an activation requirement initiation device 403 so that the task which is determined in accordance with the memory in the memory device 402, is initiated at an interval of the specified time. Then, the task required is called from the memory system 401 in accordance with the activation requirement, and is performed by an operation device 404 by use of, if necessary, data stored in the operation device 404.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は車輌用制御装置に関し、更に詳細に述べると、
マイクロコンピュータを用いて内燃機関装置をはじめと
する種々の車輌用装置を制御する車輌用制御装置に関す
る。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to a vehicle control device, and more specifically, the present invention relates to a vehicle control device.
The present invention relates to a vehicle control device that uses a microcomputer to control various vehicle devices including an internal combustion engine device.

従来の技術 マイクロコンピュータにより内燃機関車輌の制御に行な
うことが従来から行なわれてきているが、その制御内容
は年々複雑となり、且つ高精度の制御を行なうことが要
求されてきている。従って、マイクロコンピュータによ
り実行される制御項目の増加によって入出力項目が増加
し、マイクロコンピュータの負担が増大する傾向にある
上、制御の高速化が要求されて来ている。これらの要求
を満たすためには、より高性能のマイクロコンピュータ
を使用すればよいが、このようなマイクロコンピュータ
は高価であp、装置の製造コストヲ押し上げる要因とな
る。
BACKGROUND OF THE INVENTION Microcomputers have traditionally been used to control internal combustion engine vehicles, but the content of the control has become more complex year by year, and more precise control has been required. Therefore, as the number of control items executed by the microcomputer increases, the number of input/output items increases, and the burden on the microcomputer tends to increase, and there is a demand for faster control. In order to meet these demands, a microcomputer with higher performance may be used, but such a microcomputer is expensive and increases the manufacturing cost of the device.

そこで、安価なマイクロコンピュータを効率よく使用す
るための方法が種々提案されており、例えばその1つと
して、プログラムを、タスクと呼ばれる小グロダラムに
分割し、ソフトタイマによって起動され、エンジン制御
機能に基づいて分類されたタスクの数だけのソフトタイ
マテーブル全RAMに設け、タスクの停止をそのソフト
タイマテーブルの内容をクリアすることにより行うよう
にしたものが提案されている(@開昭56−38541
号公報参照)。この方法は、各タスク毎に設けられたソ
フトタイマの値に応じて各タスクを起動するものであり
、各タスクには夫々優先度が定められており、成るタス
クの実行中により優先度の高ψタスクの起動要求が出さ
れると、現在実行中のタスクの情i4を、RAM内に一
1退赴させる。そして、より優先度の冒のタスクの実行
が終了した後、RAM内にストアされている情報を取り
出し、中断していたタスクの実行全再開するものである
Therefore, various methods have been proposed to efficiently use inexpensive microcomputers. For example, one of them is to divide a program into small programmable programs called tasks, which are started by a soft timer and based on engine control functions. It has been proposed that a soft timer table as many as the number of tasks classified as such is provided in all RAM, and tasks are stopped by clearing the contents of the soft timer table (@Kaisho 56-38541
(see publication). In this method, each task is started according to the value of a soft timer set for each task, and each task has its own priority. When a request to start the ψ task is issued, the information i4 of the task currently being executed is moved to the RAM. After the execution of the higher priority task is completed, the information stored in the RAM is retrieved and the execution of the suspended task is completely resumed.

発明が解決しようとする問題点 しかし、上述の方式では、タスクの優先度の数に応じて
メモリ内に退避領域金膜けなければならないため、大容
量のメモIJ ’に必要とするほか、タスクの数が多く
なると、タイマのセット、起!gl]要求のサーチ等、
ディス・母ツチャの9担が大きくなるという問題点を有
している。更に、タスクに優先順位を付し、且つ、割込
みによりより優先順位の高いタスクの優先処理を行なっ
ているので、優先順位の低いタスクは処理が完了するま
でに長い時間を要し、場合によっては、優先順位の低い
タスクは起動されないという不都合が生じる虞れがある
。また、タスクの数だけタイマが必要となり、タスクの
数が多いと、メモリの必要容量が大巾に増えるという問
題点も有している。
Problems to be Solved by the Invention However, in the above-mentioned method, it is necessary to create a save area in the memory according to the number of priorities of the tasks. When the number of is large, the timer is set and the timer is activated! gl] Request search, etc.
The problem is that the 9th holder of Dis/Mother Tsucha becomes larger. Furthermore, since tasks are prioritized and tasks with higher priority are prioritized by interrupts, tasks with lower priority may take a longer time to complete, and in some cases , there is a risk that a task with a low priority will not be activated. Another problem is that the number of timers required is equal to the number of tasks, and if the number of tasks is large, the required memory capacity increases significantly.

本発明の目的は、メモリ容量が少なくて済み、マイクロ
コンピュータの使用効率を著しく向上させ、制御性能の
改善を図ることができるようにした車輌用制御装置を提
供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a vehicle control device that requires less memory capacity, significantly improves the usage efficiency of a microcomputer, and improves control performance.

問題点を解決するための手段 本発明の構成は、車輌用装置を制御するだめの制御プロ
グラムがその制御機能に基づいて検数のプログラムに分
類されてなり、各プログラムに対して生じる起動要求に
従って各プログラムが選択的に実行されることにより車
輌の制御が行なわれるように構成された車輌用制御装置
において、各ゾログラムの予め定められた起動周期及び
起動順序に関する情報が記憶されているメモリ手段ト、
該メモリ手段の記憶内容に基づいてプログラムの起動要
求全一定時間毎に発する起動要求発生手段とを備えた点
に特徴?有する0 作用 上述の構成によると、各プログラムは、一定時間間隔で
順次実行され、実行されるプログラムの起動周期及び起
動順序は、メモリ手段のメモIJ内容に従うことになる
。従って、各プログラムに対して起動間隔を定めるだめ
のソフトタイマを設ける必要がなく、また、1つのプロ
グラムが実行中に他のプログラムの割込みを受けること
もないので、各プログラムは、結局、夫々に対1−て予
め定められた所定の周期で確実に実行される。また、各
プログラムが実行途中で中断しないので、演算の途中結
果をRAM内に退避させる必要がなく、演算時間の無駄
及び演算結果を退避させるために確保しておかなければ
ならなψメモリ容量が大巾に減少し、高効率にて制御プ
ログラムが実行される。
Means for Solving the Problems The present invention has a configuration in which control programs for controlling a vehicle device are classified into counting programs based on their control functions, and the program is divided into counting programs according to a start request generated for each program. In a vehicle control device configured to control a vehicle by selectively executing each program, a memory means storage unit stores information regarding a predetermined activation period and activation order of each zologram. ,
The feature is that it is provided with a startup request generating means that issues a program startup request at regular intervals based on the stored contents of the memory means. According to the above-described configuration, each program is executed sequentially at fixed time intervals, and the activation cycle and activation order of the executed programs follow the contents of the memo IJ of the memory means. Therefore, there is no need to provide a soft timer to determine the startup interval for each program, and one program is not interrupted by another program during execution, so each program can This is reliably executed at a predetermined period. In addition, since each program is not interrupted during execution, there is no need to save intermediate results of calculations in RAM, resulting in wasted calculation time and the amount of ψ memory that must be reserved to save calculation results. The control program is executed with high efficiency.

実施例 第1図には、本発明の基本概念を示す概略構成図が示さ
れている。車輌用制御装置400は、所要の車輌用装置
を、所定の制御プログラムに従って制御するだめの装置
である。所定の制御プログラムは、予め複数のプログラ
ム(以下タスクと称する)に分割されて、適宜の記憶装
置401内にストアされている。一方、各タスクの起動
周期及び起動順序に関する情報がメモリ手段402にス
トアされている。起動要求発生手段403は、タスクを
所定の一定時間間隔毎に起動するための起動要求を発生
するための手段であシ、どのタスクの起動を要求するか
は、メモリ手段402内のメモリ内容に従って定められ
る。
Embodiment FIG. 1 shows a schematic configuration diagram showing the basic concept of the present invention. The vehicle control device 400 is a device that controls required vehicle devices according to a predetermined control program. A predetermined control program is divided in advance into a plurality of programs (hereinafter referred to as tasks) and stored in an appropriate storage device 401. On the other hand, information regarding the activation cycle and activation order of each task is stored in the memory means 402. The activation request generation means 403 is a means for generating activation requests for starting tasks at predetermined fixed time intervals, and which task is requested to be activated is determined according to the memory contents in the memory means 402. determined.

起動要求発生手段403からの起動要求は、演算手段4
04に入力され、その起動要求に従って、所要のタスク
が記憶装置401から呼び出され、演算手段404にお
いて必要ならば演算手段404に入力されているデータ
を使用して、そのタスクが実行される。
The activation request from the activation request generation means 403 is sent to the calculation means 4.
04, and in accordance with the activation request, a required task is called from the storage device 401, and the task is executed in the calculation means 404, if necessary, using the data input to the calculation means 404.

このようにして、各タスクが所定の起動周期、起動順序
により順次一定時間間隔で実行されるととにより、車輌
の制御が行なわれる。
In this way, the vehicle is controlled by sequentially executing each task at constant time intervals according to a predetermined activation cycle and activation order.

」二連の制御装置は、ストアト・プログラム方式のディ
ジタル計算機であるマイクロコンピュータを用いて実現
することができ、以下、具体的な実施例について本発明
の詳細な説明する。
The dual control device can be realized using a microcomputer which is a stored program type digital computer, and the present invention will be described in detail below with reference to a specific embodiment.

第2図には、本発明をオートクルーズ機能付のディーゼ
ル機関車輌の制御装置に適用した場合の、車輌用制御装
置の一実施例の制御システムの全体構成図が示されてい
る。車輌用制御装置1は、燃料噴射ポンプ2力1ら燃料
の供給を受けるディーゼル機関3によって駆動される車
輌(図示せず)の制御を行なうだめの装置であり、第1
及び第2マイクロコンピュータ4,5を備えている。
FIG. 2 shows an overall configuration diagram of a control system of an embodiment of a vehicle control device in which the present invention is applied to a control device for a diesel locomotive with an auto-cruise function. The vehicle control device 1 is a device for controlling a vehicle (not shown) that is driven by a diesel engine 3 that receives fuel from a fuel injection pump 2 and a fuel injection pump 1.
and second microcomputers 4 and 5.

第1マイクロコンピユータ4は、燃料噴射ポンプ2の噴
射量の制御、燃料噴射ポンプ2の噴射タイミングの制御
及び車速制御のだめの制御演算を主として行ない、第2
マイクロコンピユータ5は第1マイクロコンピユータ4
で実行される制御演算に必要な各種の演算処理を主とし
て行なう構成となっている。第1及び第2マイクロコン
ピュータ4,5け、夫々、ROMを内蔵しているほか、
外部に設けられたランダム・アクセス・メモリ(RAM
)6と接続されており、RAM6は、後述するようにし
て、第1及び第2マイクロコンピュータ4,5のいずれ
小一方とRAM 6とを選択的に接続することができる
パスライン22を介して、第1又は第2マイクロコンピ
ュータ4,5により夫々アクセスできるように構成され
ている。
The first microcomputer 4 mainly performs control calculations for controlling the injection amount of the fuel injection pump 2, controlling the injection timing of the fuel injection pump 2, and controlling the vehicle speed.
The microcomputer 5 is the first microcomputer 4
The configuration is such that it mainly performs various arithmetic processing necessary for the control calculations executed in the . The first and second microcomputers have 4 and 5 pcs, each with built-in ROM,
External random access memory (RAM)
) 6, and the RAM 6 is connected to the RAM 6 via a pass line 22 that can selectively connect the RAM 6 to one of the first and second microcomputers 4 and 5, as will be described later. , the first or second microcomputers 4 and 5, respectively.

第1マイクロコンピユータ4には、パスライン7を介し
て、アナログ・ディジタルコンバータ(入/D)8が接
続されている。入/DBには、ディーゼル機関3の冷却
水温度を示す水温信号TWを出力するための水温センサ
9.吸気温度を示す吸気温信号TAを出力するための吸
気温センサ10.燃料温度を示す燃温信号TFを出力す
るための燃温センサ11及び吸気圧力を示す吸気圧信号
PI′1r、出力するだめの吸気圧センサ12が接続さ
れており、これらの各センサからの上述の信号けA/D
8においてディジタル信号に変換され、パスライン7を
介して第1マイクロコンピユータ4に入力される。
An analog/digital converter (input/D) 8 is connected to the first microcomputer 4 via a pass line 7 . A water temperature sensor 9. for outputting a water temperature signal TW indicating the cooling water temperature of the diesel engine 3 is connected to the input/DB. An intake air temperature sensor 10 for outputting an intake air temperature signal TA indicating the intake air temperature. A fuel temperature sensor 11 for outputting a fuel temperature signal TF indicating fuel temperature, an intake pressure signal PI'1r indicating intake pressure, and an intake pressure sensor 12 for outputting are connected, and the above-mentioned information from each of these sensors is connected. signal A/D
8, the signal is converted into a digital signal and input to the first microcomputer 4 via a path line 7.

ディーゼル機関3の出力軸に装着されている角度センサ
13からは、ディーゼル機関3内の各シリンダピストン
が上死点に到達するタイミング情報を有する交流信号A
Cが出力され、この交流信号ACは、波形処理回路14
においてディーゼル機関3の上死点タイミングを示すタ
イミング・ヤルスから成る上死点・臂ルス信号TNに変
換され、第1マイクロコンピユータ4に入力される。更
に、ディーゼル機関3への燃料噴射タイミングを検出す
るため、燃料噴射弁15に装着された針弁リフトセンサ
16ふらのリフト信号LSは、波形整形回路17におい
て波形整形され、所定の基準の気筒における実際の燃料
噴射タイミングを示す噴射タイミングノ9ルスTNLと
して第1マイクロコンピユータ4に入力される。
The angle sensor 13 attached to the output shaft of the diesel engine 3 sends an AC signal A having timing information when each cylinder piston in the diesel engine 3 reaches the top dead center.
C is output, and this alternating current signal AC is sent to the waveform processing circuit 14.
The signal is converted into a top dead center/earth signal TN consisting of a timing signal indicating the top dead center timing of the diesel engine 3, and is input to the first microcomputer 4. Furthermore, in order to detect the fuel injection timing to the diesel engine 3, the lift signal LS of the needle valve lift sensor 16 attached to the fuel injection valve 15 is waveform-shaped in a waveform shaping circuit 17, and the waveform of the lift signal LS of the needle valve lift sensor 16 attached to the fuel injection valve 15 is waveform-shaped to match the actual The injection timing signal TNL is inputted to the first microcomputer 4 as an injection timing signal TNL indicating the fuel injection timing.

アクセルセンサ18は、アクセルにダル19の操作量に
従ったアクセル信号APPを出力1〜、アクセル信号A
PPけ第1マイクロコンピユータ4に入力される。
The accelerator sensor 18 outputs an accelerator signal APP according to the operation amount of the dial 19 to the accelerator 1 to 1, and an accelerator signal A
PP is input to the first microcomputer 4.

一方、第2マイクロコンピユータ5には、車速を検出す
るための車速センサ23力)ら出力され、その時々の車
速を示す車速データTUSPが入力されると共に、オー
トクルーズ制御のためのクルーズスイッチ20が第2マ
イクロコンピユータ50入力ポートに接続されており、
クルーズスイッチ20の操作に応じた定速走行制御を行
なうことができる構成となっている。
On the other hand, the second microcomputer 5 receives vehicle speed data TUSP outputted from a vehicle speed sensor 23 for detecting the vehicle speed and indicating the vehicle speed at the time, and also inputs the cruise switch 20 for auto cruise control. It is connected to the second microcomputer 50 input port,
The configuration is such that constant speed driving control can be performed in accordance with the operation of the cruise switch 20.

尚、スタートスイッチ21は、ディーゼル機関3の始動
の際に始動信号STを第1マイクロコンピユータ4に供
給する◎ 第1マイクロコンピユータ4に取や込まれた情報は、パ
スライン22を介してRAM 6に一旦転送され、RA
M6への転送データの内容は、同じくパスライン22を
介して第2マイクロコンピユータ5内に更に転送するこ
とができる。尚、このデータ転送のためのパスライン2
2の接続の切換は、各マイクロコンピュータ4.5内に
おいて行なわれる。
Note that the start switch 21 supplies a starting signal ST to the first microcomputer 4 when starting the diesel engine 3 ◎ Information taken into the first microcomputer 4 is transferred to the RAM 6 via the pass line 22 . Once transferred to RA
The contents of the data transferred to M6 can also be further transferred into the second microcomputer 5 via the pass line 22. Note that path line 2 for this data transfer
The switching of the two connections is performed within each microcomputer 4.5.

第1マイクロコンピユータ4における噴射書割御演算結
果は、ディジタル・アナログ変換器(D/A)26’を
介して燃料噴射ポンプ2のコントロールラック270位
置制御を行なうためのサーが回路28に入力され、その
時々の機関の運転条件に見合った最適な噴射量がディー
ゼル機関3に供給されるよう、コントロールラック27
の位置が制御される。符号29で示されるのは、制御等
に異常が生じた時に点灯する警報ランプである。
The injection book allocation calculation result in the first microcomputer 4 is input to the circuit 28 for controlling the position of the control rack 270 of the fuel injection pump 2 via the digital/analog converter (D/A) 26'. , the control rack 27 is designed to supply the diesel engine 3 with the optimum injection amount that matches the engine operating conditions at the time.
The position of is controlled. Reference numeral 29 indicates an alarm lamp that lights up when an abnormality occurs in the control or the like.

第2マイクロコンピユータ5には、第1マイクロコンピ
ユータ4において実行される燃料噴射ボンf2の噴射時
期制御のための演算結果が与えられ、この演算結果に従
ってタイミング制御信号TC8が第2マイクロコンピユ
ータ5から出力され、増幅器30を介してタイマ31に
供給され、これにより、最適タイミング制御が行なわれ
る。
The second microcomputer 5 is given the calculation result for the injection timing control of the fuel injection cylinder f2 executed in the first microcomputer 4, and according to this calculation result, the timing control signal TC8 is output from the second microcomputer 5. is supplied to the timer 31 via the amplifier 30, thereby performing optimal timing control.

第3図には、第2図に示した第1マイクロコンピユータ
4のプログラム構成図が示されている。
FIG. 3 shows a program configuration diagram of the first microcomputer 4 shown in FIG.

既に述べたように、第1マイクロコンピユータ4は、主
として、噴射量及び噴射タイミングの制御演算を実行す
るようにそのプログラムが定められており、先ず、電源
の投入に応答して初期化処理41が行なわれ、ここで、
RAM6及び各レジスタの内容をクリアし、各入力情報
の読込みが行なわれ、他の割込処理がなければ、バック
グラウンドジョブの処理42が実行される。パックグラ
ウンドジョブは、後述する割込によって実行されるタス
ク等の処理のあい間に実行されるものであり、図示の実
施例では、回転速度の演算、タイマ31の駆動周波数の
演算が行なわれる。
As already mentioned, the first microcomputer 4 is programmed to mainly execute control calculations for the injection amount and injection timing, and first, the initialization process 41 is performed in response to turning on the power. done, here,
The contents of the RAM 6 and each register are cleared, each input information is read, and if there is no other interrupt processing, background job processing 42 is executed. The pack ground job is executed between processes such as tasks executed by interrupts, which will be described later, and in the illustrated embodiment, calculations of the rotational speed and the driving frequency of the timer 31 are performed.

第2マイクロコンピユータ5がRAM 6 kアクセス
する際に、パスリフニス)k出力すると、割込NMIが
かけられ、通常では第1マイクロコンビーータ4に接続
されているパスライン22がパスフリー処理43により
フリーとなり、第2マイクロコンピユータ5によるRA
M 6のアクセスが終了すると、パスライン22は再び
第1マイクロコンピユータ4に接続される。
When the second microcomputer 5 accesses the RAM 6k, an interrupt NMI is generated when the second microcomputer 5 accesses the RAM 6k, and an interrupt NMI is applied. becomes free, and the RA by the second microcomputer 5
When the access of M6 is completed, the pass line 22 is connected to the first microcomputer 4 again.

外部のタイマより発生する信号により割込TIMがかけ
られると、これにより警報ランフ″29の0N10FF
駆動を行なうための警報ランプ駆動処理44が実行され
る。
When an interrupt TIM is generated by a signal generated from an external timer, this causes an alarm ramp of 0N10FF of ``29''.
An alarm lamp drive process 44 for driving is executed.

フリーランニングカウンタの値が予め定められた所定値
に達した場合に出力されるモニタ信号により割込MON
が掛けられる。このモニタ信号により第1割込処理45
が実行され、一定時間Δを後に再びモニタ信号が出力さ
れるようフリーランニングカウンタのセットが行なわれ
る。次に、同期処理46(後述)が実行され、シ〃)る
後、いずれのタスクを実行するのふを決定するためのモ
ニタ処理47が実行される。ここで、タスクとは、第1
マイクロコンピユータ4において実行すべき制御演算を
分割した1つ1つの独立したプログラムを言い、各タス
クは、更に、制御サブルーチンプログラム群48に含ま
れている1つ又は複数の制御サブルーチングロダラムか
ら成り立っている。
An interrupt MON is generated by a monitor signal that is output when the value of the free running counter reaches a predetermined value.
is multiplied. This monitor signal causes the first interrupt processing 45
is executed, and the free running counter is set so that the monitor signal is output again after a certain period of time Δ. Next, a synchronization process 46 (described later) is executed, and after that, a monitor process 47 for determining which task is to be executed is executed. Here, the task is the first
Each task is an independent program divided into control operations to be executed in the microcomputer 4, and each task is further comprised of one or more control subroutine programs included in the control subroutine program group 48. There is.

そして、各タスクの実行時間は時間Δを以内であって、
且つばらつきがなるべく少なくなるように配慮して定め
である。従って、タスク処理49において行なわれる各
タスクの処理は、割込MONが掛けられた場合に、その
与えられた割込処理時間内に必ず終了するようになって
いる。
The execution time of each task is within the time Δ,
In addition, it is determined with consideration given to minimizing variations as much as possible. Therefore, when the interrupt MON is applied, the processing of each task performed in the task processing 49 is always completed within the given interrupt processing time.

モニタ処理47において定められるタスクの実行順序は
、各タスクの優先度に関連して定められており、優先度
の高いタスクは、実行頻度が高くなるように定められて
いる。タスクの実行順序は、第1マイクロコンピユータ
4内のROMにストアされているタスクテーブルの内容
に従って定められる。タスクテーブルは、後述するよう
に、各タスクの起動周期、起動順序を考慮して各タスク
を示すコードをマトリクス状に配列して成るテーブルで
ある。
The execution order of the tasks determined in the monitor process 47 is determined in relation to the priority of each task, and tasks with higher priorities are determined to be executed more frequently. The order of execution of tasks is determined according to the contents of a task table stored in the ROM within the first microcomputer 4. As will be described later, the task table is a table in which codes indicating each task are arranged in a matrix in consideration of the activation cycle and activation order of each task.

一般に、各タスクの起動周期及び起動順序は、機関の運
転状態によって異なるものであり、従って、本実施例で
は、後で詳しく述べるように、始動時(モードO)、低
速回転時(モード1)及び高速回転時(モード2)に対
する3枚のテーブルが用意されている。
In general, the startup cycle and startup order of each task differ depending on the operating state of the engine. Therefore, in this embodiment, as will be described in detail later, the startup cycle and startup order of each task are set at startup (mode O) and at low speed rotation (mode 1). and three tables for high-speed rotation (mode 2).

尚、これらのテーブルに従って、各タスクがどのように
起動されるの力1は、後述する。
Note that the force 1 for starting each task according to these tables will be described later.

タスク処理49の実行が終了すると、次の割込みが生じ
るまでパックグラウンドゾヨプの処理42が実行されて
いる。次のモニタ信号が出力されると、モニタ処理47
において、上述のタスクテーブルに従って定められる次
のタスクの処理がタスク処理49において行なわれる。
When the execution of the task process 49 is completed, the pack ground process 42 is executed until the next interrupt occurs. When the next monitor signal is output, monitor processing 47
In this step, processing of the next task determined according to the above-described task table is performed in task processing 49.

噴射タイミングパルスTNLの発生により、割込N L
が実行され、第3割込処理51が実行される。
Due to the generation of injection timing pulse TNL, interrupt N L
is executed, and the third interrupt process 51 is executed.

第3割込処理51け、噴射タイミング・ぐルスTNLの
発生タイミングにより噴射進角検出のためのソフトカウ
ンタを起動させる。そして、上死点・ぜルス信号TNの
発生により割込TDCが実行され、第2割込処理50に
よって、噴射タイミング・母ルスTNLに対応する上死
点・やルス信号TNによって上記ソフトカウンタの計数
動作を停止トさせ、その計数結果より噴射進角値に関連
したデータtNLの演算を行なう(第4図(&) # 
(b)参照)。第2割込処理50では、また、上死点・
臂ルス信号TNの連続した2つの・ぞルスの時間間隔に
関連したデータtNの演算を行なう(第4図(a)参照
)。
In the third interrupt process 51, a soft counter for detecting the injection advance angle is activated based on the injection timing and the generation timing of the gusset TNL. Then, the interrupt TDC is executed by the generation of the top dead center/zero signal TN, and the second interrupt processing 50 causes the above-mentioned soft counter to be activated by the top dead center/zerus signal TN corresponding to the injection timing/mother pulse TNL. The counting operation is stopped, and data tNL related to the injection advance angle value is calculated from the counting result (see Fig. 4 (&) #
(see (b)). In the second interrupt processing 50, the top dead center
Data tN related to the time interval between two consecutive pulses of the arm pulse signal TN is calculated (see FIG. 4(a)).

次に、第5図を参照して、第2マイクロコンピユータ5
のプログラム構成について説明する。
Next, referring to FIG. 5, the second microcomputer 5
The following describes the program structure.

電源の投入又は第1マイクロコンピユータ4が第2マイ
クロコンピユータ5に対してリセットをかけた場合に初
期化処理61が実行され、モニタ処理62及びタスク処
理63が実行されるが、ここでは、第1マイクロコンピ
ユータ4の制御演算に伴なう所要の演算処理のタスクが
実行される。
When the power is turned on or when the first microcomputer 4 resets the second microcomputer 5, an initialization process 61 is executed, and a monitor process 62 and a task process 63 are executed. Necessary arithmetic processing tasks associated with control arithmetic by the microcomputer 4 are executed.

この演算処理の内容については後で詳しく述べる。The content of this arithmetic processing will be described in detail later.

第1マイクロコンピユータ4からの演算リクエストがあ
ると、割込NMIが力1けられ、フラグセット処理64
において演算要求のフラグがセットされる。
When there is an arithmetic request from the first microcomputer 4, the interrupt NMI is cleared by 1, and the flag set processing 64
A computation request flag is set in .

外部タイマ信号に応答して割込TIMが乃\けられ、第
4割込処理65において、RAM6より、タイマ31の
駆動用パルス信号の周期とそのデー−ティ比データと全
読込み、デユーティ比に関連した時間データtDTYの
作成を行なう。そして、クルーズスイッチ20の状Bk
読み込みRAM 6にストアするスイッチ処理66が実
行される。
The interrupt TIM is triggered in response to the external timer signal, and in the fourth interrupt processing 65, the period of the drive pulse signal of the timer 31, its duty ratio data, all read, and the duty ratio are stored in the RAM 6. The related time data tDTY is created. And the shape of the cruise switch 20 is Bk.
A switch process 66 for storing in the read RAM 6 is executed.

車速センサ237b、ら車速に関連して出力される車速
データTUSPが出力されることに応答して、割込vs
pが乃\けられ、信号TUSPの発生周期の検出が行な
われる(周期読込処理67)。
In response to the vehicle speed sensor 237b outputting vehicle speed data TUSP related to the vehicle speed, an interrupt vs.
p is cleared, and the generation cycle of the signal TUSP is detected (cycle reading process 67).

フリーランニングカウンタの値が所定の値となることに
よって割込TCVがかけられ、タイマ31の駆動信号の
反転を行ない、これと同時に、駆動信号を反転すべき次
のタイミングまでの所要時間をセットする反転処理68
が実行される。これにより、所望の周期で所望のデユー
ティ比の駆動信号が出力されることになる。
When the value of the free running counter reaches a predetermined value, an interrupt TCV is applied, and the drive signal of the timer 31 is inverted, and at the same time, the required time until the next timing at which the drive signal should be inverted is set. Reversal process 68
is executed. As a result, a drive signal with a desired duty ratio is output at a desired period.

以下に、モニタ割込みによって実行される同期処理46
.モニタ処理47及びタスク処理49の各処理について
より詳細に説明するが、その前に、第1マイクロコンピ
ユータ4において実行される制御@を第61ツ1を参照
して酢、明する。
Below, synchronous processing 46 executed by monitor interrupt
.. Each process of the monitor process 47 and the task process 49 will be explained in more detail, but before that, the control executed by the first microcomputer 4 will be explained with reference to the 61st part 1.

第6図には、第1マイクロコンピユータ4により実行さ
れる、燃料噴射量の制御系統70と、噴射タイミングの
制御系統90とが示されており、先ず、燃料噴射量の制
御系統70ふら説明する。
FIG. 6 shows a fuel injection amount control system 70 and an injection timing control system 90 that are executed by the first microcomputer 4. First, the fuel injection amount control system 70 will be explained. .

制御系統70は、符号71乃至76で示される6種類の
噴射量演算部を有している。アクセルQ演算部71では
、アクセルペダル19の操作に従った噴射量を演算しそ
の結果がデータQAPPとして出力される。アイドルQ
演算部72は、アイドル運転時に必要な噴射量を演算し
その結果がデータQIDLとして出力される。クルーズ
Q演算部73は、定車速走行に必要な噴射量を演算し、
その結果がデータQcRとして出力される。フルQ演算
部74は、噴射量の最大値を機関速度の関数として定め
られている所定の最大噴射量特性を示すデータQFUL
 ’e演算出力する。スモークQ演算部75は、所定の
スモーク限界に従う噴射量を示すデータQ8MKを演算
出力し、スタートQ演算部76Ii始動増itを示す噴
射量データQ6T’!f演算出力する。
The control system 70 has six types of injection amount calculation sections indicated by symbols 71 to 76. The accelerator Q calculation section 71 calculates the injection amount according to the operation of the accelerator pedal 19, and outputs the result as data QAPP. Idol Q
The calculation unit 72 calculates the injection amount required during idling operation, and outputs the result as data QIDL. The cruise Q calculation unit 73 calculates the injection amount necessary for driving at a constant speed,
The result is output as data QcR. The full Q calculation unit 74 calculates data QFUL indicating a predetermined maximum injection amount characteristic in which the maximum value of the injection amount is determined as a function of engine speed.
'e Calculation output. The smoke Q calculation section 75 calculates and outputs data Q8MK indicating the injection amount according to a predetermined smoke limit, and the start Q calculation section 76Ii, injection amount data Q6T'! indicating the starting increase it! Output f calculation.

データQAPPとQIDLとは加舞部77にて加誹され
、その加算出力データとデータQCRとは、最大値選択
部(MAX ) 78に入力され、大きい方のデータが
出力される。r−タQFUL e Q工、及び最大値選
択部78からの選択データは最小値選択部(MIN )
 79に入力され、最も小さい値のデータが目標噴射智
データとして取り出される。この目標噴射量データは、
機関の始動時以外の場合に適用され、機関の始動時にお
いては、データQ8Tが目標噴射量データとなる。スイ
ッチ80けスタートスイッチ21の操作に応じて出力さ
れる始動信号S T ICより制御され、始動信号ST
が出力されている場合にはデータQ8Tヲ選択し、それ
以外の場合にはMIN 79 A−らの1uカデータを
選択するように作動する。
Data QAPP and QIDL are modified by a modifying section 77, and the added output data and data QCR are inputted to a maximum value selection section (MAX) 78, and the larger data is output. The selection data from the r-data QFUL e Q process and the maximum value selection section 78 is sent to the minimum value selection section (MIN).
79, and the data with the smallest value is taken out as target injection wisdom data. This target injection amount data is
This is applied to cases other than when starting the engine, and when starting the engine, data Q8T becomes the target injection amount data. The starting signal ST is controlled by the starting signal ST IC output in response to the operation of the start switch 21 of 80 switches.
When Q8T is output, the data Q8T is selected, and in other cases, the 1u data of MIN 79 A- is selected.

スイッチ80により選択されたデータは、燃温補正部8
1において、その時の燃料温度に応じた所定の補正係数
が采ぜられ、これにより、燃料温度が変化しても、目標
噴射量データに従う量の燃料が得られるように目標噴射
号データの補rEが行なわれる。燃温補正部81におい
て補正されたデータは、ポング特性演算部82に入力さ
れ、入力された噴射量データをその前ンゾ特性に従った
位置データに変換するボンf特性演算処理が行なわれた
後、出力部83から最終的な目標位置データP  が出
力され、このデータP。utは、第2図にnt 示されるように、D/A26’e介してサーボ回路28
に入力される。
The data selected by the switch 80 is stored in the fuel temperature correction section 8.
1, a predetermined correction coefficient is assembled according to the fuel temperature at that time, and thereby the target injection signal data is corrected so that the amount of fuel according to the target injection amount data can be obtained even if the fuel temperature changes. will be carried out. The data corrected in the fuel temperature correction section 81 is input to the Pong characteristic calculation section 82, where Bonn f characteristic calculation processing is performed to convert the input injection amount data into position data according to the pre-temperature characteristics. After that, the final target position data P is output from the output section 83, and this data P. ut is connected to the servo circuit 28 via the D/A 26'e as shown in FIG.
is input.

噴射タイミングの制御系統90は、機関の運転状態に従
った目標の噴射時期を演算しその結果を示すデータTL
Dヲ出力するためのロードタイマ特性演算部91と、機
関の冷却水温に従った噴射タイミングの補正を行なうだ
めの補正データを演算しその結果を示すデータTTwf
:出力するための水温補正値演算部92と、始動時にお
ける水温補正データを演算しその結果會示すデータTT
SV8に出力するための始動時水温補正値演算部93と
を有しており、データTLDは、r−タTTW又はTT
wsと加算部94において加算される。すなわち、デー
タ。
The injection timing control system 90 calculates a target injection timing according to the operating state of the engine and calculates data TL indicating the result.
A load timer characteristic calculation unit 91 for outputting D and data TTwf for calculating correction data for correcting injection timing according to engine cooling water temperature and showing the result.
: A water temperature correction value calculation unit 92 for output, and data TT that calculates water temperature correction data at the time of startup and displays the results.
It has a starting water temperature correction value calculating section 93 for outputting to the SV8, and the data TLD is r-ta TTW or TT.
ws and is added in the adding section 94. Namely, data.

TTV及びTTV8は、機関が始動状態にあるか否め\
を示す始動信号STにより切換制御されるスイッチ95
を介して、いずれか一方が加算部94に供給される構成
であり、始動時にはデータTTWI+が選択されてデー
タTLDと加算され、始動時以外の場合にはデータTT
Wが選択されデータTLDと加算される。
TTV and TTV8 check whether the engine is in the starting state.
A switch 95 whose switching is controlled by a starting signal ST indicating
The configuration is such that either one of them is supplied to the adder 94 via the .
W is selected and added to data TLD.

加算部94からの加算結果は、目標噴射タイミングデー
タとして、実際の噴射タイミングを示す信号が人力され
ている誤差演算部96に入力され、ここで噴射タイミン
グ(時期)の目標値と実際値との差分が演算され、その
結果を示す誤差データT6は、PTr)演算部97に入
力され、P■D制御のために必要なデータ処理が施され
た掃、その結果を示すデータは・ぐルス巾変調部(PW
M ) 98に入力妊れる。
The addition result from the addition section 94 is input as target injection timing data to an error calculation section 96 in which a signal indicating the actual injection timing is manually input, and here the difference between the target value and the actual value of the injection timing is calculated. The difference is calculated, and the error data T6 representing the result is input to the PTr calculation unit 97, where data processing necessary for P■D control is performed. Modulation section (PW
M) Enter 98 to become pregnant.

・ぐルス巾変調部98には、タイマ31を駆動する・や
ルス信号の周波数全演算する駆動周波数演算部99から
の演轡データが供給されており、ノ母ルス巾変訓部98
からは、駆動周波数演算部99から供給されるデータに
従ッた周波数でそのデユーティ比がPID演算部9から
の出力データに従って変化する、タイマ31を駆動する
だめの駆動・9ルス信号が、出力される。この駆動・ぐ
ルヌ信号は、タイミング制飴1信号TC8と1−て増幅
器30を介してタイマ31内のIll ff1l用バル
ブ(図示せず)に印加される(第2図@照)。
The pulse width modulation unit 98 is supplied with operation data from a drive frequency calculation unit 99 that calculates the entire frequency of the pulse signal that drives the timer 31, and the pulse width modulation unit 98
From , a driving/9 pulse signal for driving the timer 31 whose duty ratio changes according to the output data from the PID calculating section 9 at a frequency according to the data supplied from the driving frequency calculating section 99 is output. be done. This drive/gurune signal is applied to the Ill ff1 l valve (not shown) in the timer 31 via the timing control candy 1 signal TC8 and the amplifier 30 (see FIG. 2).

第6図に示す制御のための各演算をマイクロコンピュー
タにより実行するため、これらの制御に必要な演算が、
制御サブルーチンプログラムとしてまとめられており、
第7図には、第6図に対応させて、それらの制御サブル
ーチンプログラムが示されて−る。第7図において、各
ブロックの上段に演算内容を示し、下段には制御サブル
ーチン名が表示されている。これらの制御サブルーチン
プログラムがサブルーチン群として第1マイクロコンピ
ユータ4のROM内にストアされている。
Since each calculation for control shown in Fig. 6 is executed by a microcomputer, the calculations necessary for these controls are as follows.
It is organized as a control subroutine program,
FIG. 7 shows these control subroutine programs corresponding to FIG. 6. In FIG. 7, the calculation contents are shown in the upper part of each block, and the control subroutine names are shown in the lower part. These control subroutine programs are stored in the ROM of the first microcomputer 4 as a subroutine group.

第1表に、各制御サブルーチンプログラムの一覧表を示
す〇 第  1  表 これらの制御サブルーチンプログラムの実行時間は様々
であり、1だ、開側1−ヒ要請される実行細度もまた異
なっている。このようなサブルーチンプログラムを効率
よく実行するため、これらの制御サブルーチンプログラ
ムの1つ又は複数から成る複数のタスクが定義され、そ
のタスクの実行優先度を考慮して、タスク単位に所定の
時間間隔でプログラムの起動が行なわれる構成となって
いる。
Table 1 shows a list of each control subroutine program.Table 1 The execution time of these control subroutine programs varies, and the required execution granularity also differs. . In order to efficiently execute such subroutine programs, multiple tasks consisting of one or more of these control subroutine programs are defined, and tasks are executed at predetermined time intervals for each task, taking into consideration the execution priority of the task. The configuration is such that the program is started.

タスクの起動時間間隔は、タスクテーブルに基づいて定
められるが、運転条件によっては起動不要のタスクもあ
る等の理由から、その実行・母ターンは機関の運転条件
によって変更するのが望ましいものである。このため、
本装置では、既述の如く、機関の運転条件を始動時(モ
ード0)、低回転域での運転時(モード1)及び高回転
域での運転時(モード2)の3つに分け、各モードに対
して夫々専用のタスクテーブルが用意されている。
The task start time interval is determined based on the task table, but since some tasks may not need to be started depending on the operating conditions, it is desirable to change the execution/mother turn depending on the engine operating conditions. . For this reason,
As mentioned above, this device divides the operating conditions of the engine into three types: when starting (Mode 0), when operating in a low rotation range (Mode 1), and when operating in a high rotation range (Mode 2). A dedicated task table is prepared for each mode.

各モードに対するタスクテーブルは第2表乃至第4表に
示されている。
Task tables for each mode are shown in Tables 2 through 4.

これらのタスクテーブルに掲げられているタスクの実行
順序について、モードOの場合を例にとって説明する。
The execution order of the tasks listed in these task tables will be explained using mode O as an example.

各タスクは、要求される実行頻度を考扉してタスクレ(
ルO〜8に分けられると共に、各タスクレベルにおいて
も、実行優先度の高い順に左側かう並べられている。こ
のように配列された各タスクの起動、実行は下記に示さ
れるところにより行なわれる。
Each task is created by considering the required execution frequency.
At each task level, they are arranged on the left in descending order of execution priority. The activation and execution of each task arranged in this way is performed as shown below.

(イ)各タスクは、一定時間間隔毎に発生するモニタ割
込み毎に1つだけ起動され、次のモニタ割込の発生まで
にその実行を終了するものとし、他のタスクの実行中に
おいては他のタスクの割込み処理は行なわない。
(b) Only one task shall be started for each monitor interrupt that occurs at regular time intervals, and its execution shall be completed by the time the next monitor interrupt occurs. Interrupt processing for this task is not performed.

(ロ) モニタ割込みにより実行されるタスクの順序は
、タスクレベルOの各タスクはモニタ割込の2回毎に行
なわれ、タスクレベル1の各タスクはモニタ割込の2回
毎に行なわれ、一般にタスクレベルにの各タスクはモニ
タ割込の2に+1回毎に行なわれる。
(b) The order of tasks executed by a monitor interrupt is that each task at task level O is executed every two monitor interrupts, each task at task level 1 is executed every two monitor interrupts, and Generally, each task at the task level is performed every 2+1 monitor interrupts.

(ハ) 同一タスクレベル内のタスクについては、その
タスクレベルに起動の順番が回ってくる毎に左側に配列
されているもの乃)ら)1次起動する。
(c) For tasks within the same task level, each time the task level comes to be activated, the tasks arranged on the left are activated primarily.

従って、タスクテーブルはタスクの実行順序を示すもの
であり、どのタスクをタスクテーブルのどこに配置する
かけ、そのタスクに対して要求される実行頻度と実行の
優先度とを考慮して適宜に定めることができる。
Therefore, the task table indicates the order in which tasks are executed, and which task should be placed where in the task table should be determined appropriately by considering the execution frequency and execution priority required for that task. I can do it.

第8図には、第2表乃至第4表に示されるタスクテーブ
ルに基づいて各タスクを順次実行するため、第1マイク
ロコンピユータ4において実行されるモニタ割込のプロ
グラムの詳細フローチャートが示されている。モニタ割
込の実行が開始されると、先ず時間Δtの周期でモニタ
割込みを発生させるための処理として、フリーランニン
グカウンタの値YのΔtを加えたものをXにセットする
(ステップ110)。フリーランニングカウンタは、そ
のときの値Yが所定値Xになったときモニタ割込みを力
・ける構成であるふら、結局、上述の操作により、Δを
時間後に再びモニタ割込みがかけられることになり、以
後、Δtr¥F間毎にモニタ割込みが掛けられることに
なる。
FIG. 8 shows a detailed flowchart of a monitor interrupt program executed in the first microcomputer 4 to sequentially execute each task based on the task tables shown in Tables 2 to 4. There is. When execution of the monitor interrupt is started, first, as a process for generating a monitor interrupt at a period of time Δt, the value Y of the free running counter plus Δt is set to X (step 110). The free running counter is configured to issue a monitor interrupt when the current value Y reaches a predetermined value Thereafter, a monitor interrupt will be applied every Δtr\F.

次いで、ステラf111において、タスクの起動がオー
パラツノして掛けられているか否ムのチェックが行なわ
れ、オーバーラツプしている場合には、現在実行中のタ
スクがそのまま継続して実行される。一方、オーバーラ
ツプしていない場合には、ステラ7°112に進む。尚
、オーバーラツプしているム否かの判別は、後述するフ
ラグOLによって行なわれる。
Next, in Stella f111, a check is made to see if the tasks are started in parallel or not, and if they overlap, the task currently being executed continues to be executed. On the other hand, if there is no overlap, the process proceeds to Stella 7°112. Note that whether or not there is an overlap is determined by a flag OL, which will be described later.

ステップ112においては、外部事象が発生してお9、
同期処理の必要性があるか否かの判別を行ない、同期処
理要求がある場合にはステップ113において同期処理
を行ない、ステップ114に進む。ステップ112の判
別結果がNoの場合には、ステラ7’113に実行する
ことなく、ステラf114に進む。
In step 112, if an external event has occurred,
It is determined whether or not there is a need for synchronous processing, and if there is a synchronous processing request, synchronous processing is performed in step 113, and the process proceeds to step 114. If the determination result in step 112 is No, the process proceeds to Stella f114 without executing Stella 7'113.

ステップ114では、現在タスクが実行されていること
を示すフラグOLf、「1」とし、ソフトカウンタTC
TRの値を1だけ増加させる。そして以後のステップで
は、このソフトカウンタTCTRの内容に従って、前述
のタスクテーブルを参照して、各タスクを所定の順序で
実行する。
In step 114, the flag OLf indicating that the task is currently being executed is set to "1", and the soft counter TC is set to "1".
Increase the value of TR by 1. In subsequent steps, each task is executed in a predetermined order with reference to the task table described above according to the contents of the soft counter TCTR.

ソフトカウンタTCTRld 2進の8ビツトの出力を
有し、2°の桁力)ら27の桁までの8つの出力を有し
ている。ステラf 115−0乃至115−7は、夫夫
カウンタTCTRの各ビットの値が「o」か否かの判別
を行なうステップであり、これらのステップ115−0
乃至115−’7において、各ビットがrOJふ否かの
判別が、最下位の桁から順々に最上位まで行なわれる。
Soft counter TCTRld has a binary 8-bit output, and has eight outputs from 2° digit to 27 digit. Stella f 115-0 to 115-7 are steps for determining whether the value of each bit of the husband counter TCTR is "o", and these steps 115-0
In steps 115-'7 to 115-'7, it is determined whether each bit is rOJ or not in order from the least significant digit to the most significant digit.

ステップ115−0の判別結果はモニタ割込みが2回行
なわれる毎にYESとなり、一般・にステラfl15−
nについてけ2n+1回毎にYESトナル。マタ、ステ
ップ115−0から115−7壕での判別結果が全てN
oとなるのは、換言すれば、カウンタTCTRの各ビッ
トが全て「1」となるのは、29回毎である。
The determination result in step 115-0 becomes YES every time the monitor interrupt is performed twice, and generally Stella fl15-
YES tonal every 2n+1 times for n. Mata, all discrimination results from step 115-0 to 115-7 trench are N.
In other words, each bit of the counter TCTR becomes "1" every 29 times.

ステツノ115−0乃至115−7においては、各タス
クテーブルのどのレベルのタスクを選択すべきかの判別
を行なうものであり、−F記説明から判るように、タス
クレベル0,1,0.2,0,1.0,3.・・・が順
次選択されるととになる。
In the STETSUNO 115-0 to 115-7, it is determined which level of the task should be selected in each task table, and as can be seen from the explanation of -F, task levels 0, 1, 0.2, 0,1.0,3. . . . are selected one after another.

このようにして、タスクレベルの選択操作が実行された
のち、タスクテーブルの列の選択が行なわれるが、これ
を説明するに先だって、各タスクテーブルに示されてい
るタスクのアト9レスがRAM6及びマイクロコンピュ
ータのROM内においてどのようにストア、管理されて
いるのかを説明する。
In this way, after the task level selection operation is executed, the columns of the task table are selected, but before explaining this, it is important to note that the address 9 address of the task shown in each task table is stored in RAM 6 and How it is stored and managed in the ROM of the microcomputer will be explained.

第9図には、ROM及びRAM内におけるメモリ構造が
示されている。第1マイクロコンピユータのROM内に
は、アドレスA000からA099までのアドレス領域
内に第2表に示すタスクのアドレスがデータとして図示
の如くストアされている。第2表の各欄の上段に示され
ているのはそのタスクの番号であり、第9図では、タス
クを特定するためにこの番号が用いられている。第3表
及び第4表に示されるタスクについても、同様にして、
ROM内のアドレス領域A100乃至A1’99落びA
200乃至A299に夫々ストアされている。
FIG. 9 shows the memory structure within the ROM and RAM. In the ROM of the first microcomputer, the addresses of the tasks shown in Table 2 are stored as data in the address area from addresses A000 to A099 as shown in the figure. Shown at the top of each column in Table 2 is the number of the task, and in FIG. 9, this number is used to identify the task. Similarly, for the tasks shown in Tables 3 and 4,
Address area A100 to A1'99 in ROM falls A
200 to A299, respectively.

このアドレスの管理を行なうため、RAM6内には、変
数PTRO乃至PTR8が設けられており、この変数に
よって、第2表乃至第4表の任意の1列管理を行なって
いる。
In order to manage these addresses, variables PTRO to PTR8 are provided in the RAM 6, and any one column in Tables 2 to 4 is managed using these variables.

更に、タスクテーブルの選択を管理するため、RAM 
6内には、変数TBLPTRが設けられておシ、TBL
PTRがTBLTOP Oの場合には第2表に示される
モードOのテーブルを選択し、TBLPTRがTBI、
TOPlの場合に、第3表に示されるモード1のテーブ
ルを選択し、TBLPTRがTBLTOP 2の場合に
は第4表に示されるモード2のテーブルを選択するよう
になっている。更に、各テーブルの任意のi行の管理を
行なうため、RAM6内には変数TCTRが設けられて
おり、TCTRの値に従って、i行の指定を行なう構成
となっている。
Furthermore, to manage task table selection, RAM
6 is provided with a variable TBLPTR.
If PTR is TBLTOP O, select the mode O table shown in Table 2, and if TBLPTR is TBI,
If TOP1, the mode 1 table shown in Table 3 is selected, and if TBLPTR is TBLTOP 2, the mode 2 table shown in Table 4 is selected. Further, in order to manage arbitrary i rows of each table, a variable TCTR is provided in the RAM 6, and the i row is specified according to the value of TCTR.

再び第8図に戻って説明を行なう。カウンタTCTR(
7)値ニ基づき、ステップ115−0乃至115−7に
よりタスクテーブルの1行の指定が順次行なわれること
については既蒼説明した0従うて、今、1=1が選択さ
れた場合の1列の選択動作について説明する。上述の3
つのタスクテーブルのどれを選択するかは、モード判断
のタスクにより定められているTBLPTRの内容に従
うこととなる。今、モードOで作動しているとすると、
TBLPTR=TBLTOP Oであり、PTR1= 
Oとすれば、Aの値は第9図からAoloとなる(ステ
ラ7’116−1)。
The explanation will be given by returning to FIG. 8 again. Counter TCTR (
7) Based on the value 2, one row of the task table is specified sequentially in steps 115-0 to 115-7. The selection operation will be explained. 3 above
Which of the two task tables is selected depends on the contents of TBLPTR determined by the mode determination task. Assuming that it is currently operating in mode O,
TBLPTR=TBLTOP O and PTR1=
If it is O, the value of A will be Aolo from FIG. 9 (Stella 7'116-1).

(AO10+2 )番地の内容は、T0041のアドレ
スであるから、0000Hとは異なり(ステップ117
−1 )、従って、PTRI←+2の操作が実行される
(ステラ7’1.18−1)。若し、A+2番地の内容
が0000Hであれば、ステ、、7°119−1に進み
、PTRI←0とされる。
The content of the address (AO10+2) is the address of T0041, so it is different from 0000H (step 117).
-1), therefore, the operation PTRI←+2 is executed (Stella 7'1.18-1). If the content of address A+2 is 0000H, the process proceeds to step 7°119-1 and PTRI←0 is set.

このようにしてA番地の内容が定められたならば、ステ
ップ120においてその番地ヘジャンプする(ステップ
120)。従って、上述の例では、TQOO40のアド
レスにジャンプし、タスクTOOO40が起動され、実
行される(ステップ121)。しかる後、フラグOLが
「0」とされ(ステップ122Lモニタ一割込が終了す
ることになる。上記では、i=1の場合について説明し
たが(、i=l以外の場合における動作も同様であるの
で、他のステップについては符号のみを付し、説明を省
略する。
Once the contents of address A have been determined in this way, a jump is made to that address (step 120). Therefore, in the above example, a jump is made to the address of TQOO40, and task TOOO40 is activated and executed (step 121). After that, the flag OL is set to "0" (step 122L monitor interrupt ends). In the above, the case where i=1 was explained (although the operation is the same in cases other than i=l). Therefore, only the reference numerals are given to the other steps and the explanation thereof will be omitted.

上述のモニター割込動作は、Δを時間毎に力1けられ、
その度に、所要のタスクテーブルにて定められたところ
に従い所要のタスクが起動さh1実行される。
The monitor interrupt operation described above is calculated by subtracting Δ by 1 per time,
Each time, the required task is activated and executed h1 according to what is determined in the required task table.

以上では、第1マイクロコンピユータ4のモニター割込
プログラムについて説明したが、次に、第2マイクロコ
ンピユータ5におけるタスクの起動について第10図及
び第11図を参照して説明する。
The monitor interrupt program of the first microcomputer 4 has been described above. Next, the activation of tasks in the second microcomputer 5 will be described with reference to FIGS. 10 and 11.

第2マイクロコンピユータ5には、演算用ザブルーチン
プログラムがストアされており、これらの各プログラム
は、第1マイクロコンピユータ5からの指令により起動
され、実行される構成である。図示の実施例では、演算
用サブルーチンプログラムとして第5表に示す4つのも
のが用意されており、第1マイクロコンピユータ4で制
御サブルーチンプログラムが実行される際に必要な計算
処理が、第2マイクロコンビーータ5で実行される。
The second microcomputer 5 stores calculation subroutine programs, and each of these programs is started and executed by a command from the first microcomputer 5. In the illustrated embodiment, four calculation subroutine programs shown in Table 5 are prepared, and the calculation processing necessary when the control subroutine program is executed by the first microcomputer 4 is carried out by the second microcomputer 4. Executed by beater 5.

第5表 第1マイクロコンピユータ4において、成るタスクが実
行されている場合において、先ず、そのタスクの実行に
必要な演算データをサーチする(ステップ200)。次
にステップ201においてRAM 60指令コードバツ
フアが空いているか否かを判別し、空バッファがなけれ
ば、カウンタTCTRe 1つだけ減算しくステップ2
02 )、タスクを終了する。従って、次のモニタ割込
みでは再び同一のタスクが起動される。このようにして
、バッファ領域が空くのを待つことになる。
When a task is being executed in the first microcomputer 4 of Table 5, first, calculation data necessary for executing the task is searched for (step 200). Next, in step 201, it is determined whether the RAM 60 command code buffer is empty or not. If there is no empty buffer, the counter TCTRe is decremented by one.
02), end the task. Therefore, the same task is activated again at the next monitor interrupt. In this way, it will wait until the buffer area becomes free.

ステップ201の判別結果がYESとなると、指令コー
ドi RAM 6に転送し、データが格納されていない
ブロックの先頭アドレスETopffi更新fる(ステ
ップ203)。ステップ203におけるデータの転送前
において、バッファが全て空であったか否か(従うて、
現在の状態でいえばバッファが1つだけデータを格納し
ているか否かがステップ204において判別される。判
別結果がYESならば、第2マイクロコンピユータ5は
アイドル状態を保っているので、演算開始信号を第2マ
イクロコンピユータに送り、第2マイクロコンピユータ
5に割込みNMI f:かける(ステップ205)。
If the determination result in step 201 is YES, the command code i is transferred to RAM 6, and the start address ETopffi of the block where no data is stored is updated (step 203). Whether or not the buffers were all empty before the data transfer in step 203 (therefore,
In the current state, it is determined in step 204 whether or not only one buffer stores data. If the determination result is YES, since the second microcomputer 5 is in an idle state, a computation start signal is sent to the second microcomputer 5, and an interrupt NMI f: is applied to the second microcomputer 5 (step 205).

ステップ2040判別結果がNOの場合には、ステラf
205に実行することなく、そのタスクの処理を終了す
る。第2マイクロコンピユータ5は、割込NMIの実行
により、バッファが空いていることを示す空フラグをO
とし、バッファにデータがあることを示す(ステップ3
01)。
If the determination result in step 2040 is NO, Stella f
205, the processing of the task is ended without being executed. The second microcomputer 5 sets the empty flag indicating that the buffer is empty by executing the interrupt NMI.
to indicate that there is data in the buffer (step 3
01).

第2マイクロコンピユータは、バッファが全て空ならば
、アイドル状態を保っており、割込NMIにより空フラ
グが0となったことに応答して(ステツノ302 )、
第1マイクロコンピユータ4に割込みNMI i掛けて
パス要求を出し、共通メモリであるRAM 6をパスに
よって第2マイクロコンピユータ5に接続する(ステッ
プ3o3)。即ち、割込みNMIにより、第1マイクロ
コンビーータ4はパスライン22を切離し、これにより
第2マイクロコンピユータ5は・々クライン22を介し
てRAM 6と接続される。尚、この間、第1マイクロ
コンピユータ4は待ち状態となっている。し力\る後、
所要のデータが転送されているRAM 6内のアドレス
BUFiよりデータを読み込み、BTOP Oの更新を
行なう(ステラ7’304)。即ち、BUFlのブロッ
クのデータを読み出した場合、BTOP4−BUF(1
+1 )とする。しかし、第11図から判るように、バ
ッファブロックは4つがリング状にリンクされているた
め、i+1=4ならば、BTOP 4− BUFOとす
ることになる。
If all the buffers are empty, the second microcomputer remains in an idle state, and in response to the empty flag being set to 0 by the interrupt NMI (Stetsuno 302),
An interrupt NMI i is applied to the first microcomputer 4 to issue a path request, and the common memory RAM 6 is connected to the second microcomputer 5 via the path (step 3o3). That is, the first microcomputer 4 disconnects the pass line 22 due to the interrupt NMI, and thereby the second microcomputer 5 is connected to the RAM 6 via the line 22. Note that during this time, the first microcomputer 4 is in a waiting state. After doing so,
Data is read from address BUFi in RAM 6 to which the required data has been transferred, and BTOP O is updated (Stella 7'304). That is, when reading the data of the block of BUF1, BTOP4-BUF(1
+1). However, as can be seen from FIG. 11, four buffer blocks are linked in a ring shape, so if i+1=4, then BTOP 4-BUFO.

このようKして、データが読み込まれた結果、バッファ
が全て空になったか否ふの判別が行なわしくステラ7°
305)、その判別結果がYESであれば、空フラグを
「1」にセットしくステップ306)、パスライン22
の切離しを行なう(ステップ307)。この場合には再
び割込みNMIがかかるのを待つ状態となる。一方、ス
テップ305の判別結果がNoの場合には、ステラf3
06け実行されず、ステップ307に進み、パスライン
22の切離しのみを行なう。
As a result of reading the data in this way, it is difficult to determine whether the buffer is completely empty or not.
305), if the determination result is YES, set the empty flag to "1".Step 306), pass line 22
(step 307). In this case, the system waits for an interrupt NMI to be issued again. On the other hand, if the determination result in step 305 is No, Stella f3
06 is not executed, and the process proceeds to step 307, in which only the path line 22 is separated.

次に、ステップ308においてバッフアカ1ら読み込ん
だ演算コードの解読を行ない、その結果に従って、割算
処理(ステップ309)、2次元補曲処理(ステップ3
10)、3次元補間処理(ステップ311)又はPID
処理(ステップ312)のいずれかの演算が実行される
Next, in step 308, the operation code read from buffer address 1 is decoded, and according to the result, division processing (step 309) and two-dimensional complementation processing (step 3) are performed.
10), three-dimensional interpolation processing (step 311) or PID
Any operation in the process (step 312) is performed.

所要の演算が終了すると、再び第1マイクロコンピユー
タ4に対して割込みNMI をかけてパスの要求を行な
い(ステップ313)、演算結果をRAM 6内のデー
タブロックBUF 4に格納しくステラ7’314 )
、ステップ302に戻り、第1マイクロコンピユータ4
力1ら割込みNMIがふけられるのを待つことになる。
When the required calculation is completed, an interrupt NMI is issued to the first microcomputer 4 again to request a pass (step 313), and the calculation result is stored in the data block BUF 4 in the RAM 6 (Stella 7'314).
, the process returns to step 302 and the first microcomputer 4
It will wait for the interrupt NMI from power 1 to be issued.

以上のようにして、各タスクがタスクテーブルに基づい
て順次起動され、各タスクを構成する所要の制御サブル
ーチンプログラムが第1マイクロコンピユータ4におい
て実行され、その時必要な演算用のサブルーチンが第2
マイクロコンピユータ5にて実行されることになる。上
述の如くして、各タスクが順次実行されることにより、
所望の車輌制御が達成されることになる。
As described above, each task is sequentially started based on the task table, the required control subroutine program constituting each task is executed in the first microcomputer 4, and the subroutine for calculations required at that time is executed in the second microcomputer 4.
It will be executed by the microcomputer 5. By sequentially executing each task as described above,
The desired vehicle control will be achieved.

効果 本発明によれば、各プログラムは、一定時間間隔で順次
実行され、実行されるプログラムの起動周期及び起動順
序は、メモリ手段のメモリ内容に従うことになる。従っ
て、各プロ?ラムに対して起動間隔を定めるためのソフ
トタイマを設ける必要がなく、また、1つのプログラム
が実行中に他のプログラムの割込みを受けることもない
ので、各グログラムは、結局、夫々に対して予め定めら
れた所定の周期で確実に実行される。また、各グログラ
ムが実行途中で中断しないので、演算の途中結果’iR
AM内に退避させる必要がなく、演算時間の無駄及び演
算結果を退避させるために確保しく41) ておふなければならないメモリ容量が大巾に減少し、高
効率にて制御プログラムが実行される優れた効果を奏す
る。
Effects According to the present invention, each program is executed sequentially at regular time intervals, and the activation cycle and activation order of the executed programs follow the memory contents of the memory means. Therefore, each professional? Since there is no need to provide a soft timer to determine the startup interval for the program, and since one program is not interrupted by another program while it is running, each program ultimately It is reliably executed at a predetermined period. In addition, since each program is not interrupted during execution, the intermediate result of the operation 'iR
There is no need to save it in the AM, and the memory capacity that must be reserved to avoid wasting calculation time and saving calculation results41) is greatly reduced, and the control program can be executed with high efficiency. It has excellent effects.

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

第1図は本発明の基本概念を示す概略構成図、第2図は
本発明による車輌用制御装置の一実施例の制御システム
の全体構成図、第3図は第2図に示した第1マイクロコ
ンビーータのプログラム構成図、第4図(、)及び第4
図(b)は第2図に示す装置の波形図、第5図は第2図
に示した第2マイクロコンビーータのプログラム構成図
、第6図は第1マイクロコンピユータにより実行される
制御の内容を示すだめの制御系統図、第7図は第6図に
示す制御系統の各部の制御演算を行なう制御サブルーチ
ンプログラムを第6図に対比させて示した制御サブルー
チンプログラムの謂明図、第8図は第3図に示されるモ
ニタ割込プログラムの詳細フローチャート、第9図は第
4図に示される装置の各メモリ内のメモリ構造を示す図
、第10図は第2マイクロコンピユータの作動を説明す
るための第1及び第2マイクロコンピユータのフローチ
ャート、第11図は第1及び第2マイクロコンピユータ
の作動を説明するためのメモリ構造を示す図である0 1.400・・・車輌用制御装置、4・・・第1マイク
ロコンピユータ、5・・・第2マイクロコンピユータ、
6・・・ランダム・アクセス・メモリ(RAM ) 、
401・・・記憶装置、402・・・メモリ手段、40
3・・・起動要求発生手段、404・・・演算手段。 特許出願人  ヂーゼル機器株式会社 代理人 弁理士   高  野  昌  俊第 1 図
FIG. 1 is a schematic configuration diagram showing the basic concept of the present invention, FIG. 2 is an overall configuration diagram of a control system of an embodiment of a vehicle control device according to the present invention, and FIG. Microcombeater program configuration diagram, Figure 4 (,) and Figure 4
Figure (b) is a waveform diagram of the device shown in Figure 2, Figure 5 is a program configuration diagram of the second microcomputer shown in Figure 2, and Figure 6 is a diagram of the control executed by the first microcomputer. Fig. 7 is a control system diagram showing the contents, and Fig. 8 is an explanatory diagram of the control subroutine program that shows the control subroutine program that performs control calculations for each part of the control system shown in Fig. 6 in comparison with Fig. 6. The figure is a detailed flowchart of the monitor interrupt program shown in Fig. 3, Fig. 9 is a diagram showing the memory structure in each memory of the device shown in Fig. 4, and Fig. 10 explains the operation of the second microcomputer. FIG. 11 is a diagram showing a memory structure for explaining the operation of the first and second microcomputers. 0 1.400...Vehicle control device; 4... first microcomputer, 5... second microcomputer,
6...Random access memory (RAM),
401...Storage device, 402...Memory means, 40
3... Startup request generation means, 404... Calculation means. Patent applicant: Diesel Kiki Co., Ltd. Agent: Patent attorney: Masatoshi Takano Figure 1

Claims (1)

【特許請求の範囲】[Claims] 1、車輌用装置を制御するための制御プログラムがその
制御機能に基づいて複数のプログラムに分類されてなり
、各プログラムに対して生じる起動要求に従って各プロ
グラムが選択的に実行されることにより車輌の制御が行
なわれるように構成された車輌用制御装置において、各
プログラムの予め定められた起動周期及び起動順序に関
する情報が記憶されているメモリ手段と、該メモリ手段
の記憶内容に基づいてプログラムの起動要求を一定時間
毎に発する起動要求発生手段とを備えたことを特徴とす
る車輌用制御装置。
1. Control programs for controlling vehicle equipment are classified into multiple programs based on their control functions, and each program is selectively executed according to a startup request generated for each program, thereby controlling the vehicle. In a vehicle control device configured to perform control, there is provided a memory means in which information regarding a predetermined starting cycle and starting order of each program is stored, and starting of the program based on the stored contents of the memory means. 1. A vehicle control device comprising: activation request generation means for issuing a request at regular intervals.
JP20292384A 1984-09-29 1984-09-29 Car control device Pending JPS6181233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20292384A JPS6181233A (en) 1984-09-29 1984-09-29 Car control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20292384A JPS6181233A (en) 1984-09-29 1984-09-29 Car control device

Publications (1)

Publication Number Publication Date
JPS6181233A true JPS6181233A (en) 1986-04-24

Family

ID=16465395

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20292384A Pending JPS6181233A (en) 1984-09-29 1984-09-29 Car control device

Country Status (1)

Country Link
JP (1) JPS6181233A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62276604A (en) * 1986-05-26 1987-12-01 Nissan Motor Co Ltd Sequence controller
JPS6341252A (en) * 1986-08-06 1988-02-22 Honda Motor Co Ltd Method and device for controlling vehicle

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5458116A (en) * 1977-10-19 1979-05-10 Hitachi Ltd Engine controller
JPS60151775A (en) * 1984-01-19 1985-08-09 Chiyuushiyou Kigyo Shinko Jigyodan Multiprocessor system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5458116A (en) * 1977-10-19 1979-05-10 Hitachi Ltd Engine controller
JPS60151775A (en) * 1984-01-19 1985-08-09 Chiyuushiyou Kigyo Shinko Jigyodan Multiprocessor system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62276604A (en) * 1986-05-26 1987-12-01 Nissan Motor Co Ltd Sequence controller
JPS6341252A (en) * 1986-08-06 1988-02-22 Honda Motor Co Ltd Method and device for controlling vehicle

Similar Documents

Publication Publication Date Title
US6260058B1 (en) Process for controlling technological operations or processes
US4099495A (en) Method and apparatus to determine the timing of a periodically repetitive event with respect to the position of a rotating body, and more particularly ignition timing, fuel injection timing, and the like, in automotive internal combustion engines
US4355360A (en) Method for program control of components of an automotive vehicle
JPH0238791B2 (en)
JPS6027964A (en) Memory access control circuit
JP2000047883A (en) Task controlling method and storage medium
US20040148606A1 (en) Multi-thread computer
JP4241462B2 (en) Control unit and microcomputer
JPS6181233A (en) Car control device
US5892348A (en) Matrix interpolation
CN110284980A (en) A kind of method for correcting oil quantity and device based on main jet angle
JPH0256250B2 (en)
JPS6181235A (en) Car control device
JPH0782363B2 (en) Vehicle control device
JPS6181232A (en) Car control device
JPH0991154A (en) Stack allocating method and control equipment
JPS6181236A (en) Car control device
US6516265B1 (en) Method and device for controlling processes in conjunction with an internal combustion engine
US8095743B2 (en) Memory access control in a multiprocessor system
JP7263746B2 (en) Information processing equipment
JPH1139172A (en) Electronic controller
JPS63197236A (en) Control device for automobile
JPH082727Y2 (en) Programmable sequencer
JP2663600B2 (en) Control table relocation processing method
CN1019336B (en) Microprocessor vectored interrupts