JPS6181235A - Car control device - Google Patents

Car control device

Info

Publication number
JPS6181235A
JPS6181235A JP20292584A JP20292584A JPS6181235A JP S6181235 A JPS6181235 A JP S6181235A JP 20292584 A JP20292584 A JP 20292584A JP 20292584 A JP20292584 A JP 20292584A JP S6181235 A JPS6181235 A JP S6181235A
Authority
JP
Japan
Prior art keywords
task
program
data
executed
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
JP20292584A
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 JP20292584A priority Critical patent/JPS6181235A/en
Publication of JPS6181235A publication Critical patent/JPS6181235A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls For Constant Speed Travelling (AREA)
  • Combined Controls Of Internal Combustion Engines (AREA)
  • Control By Computers (AREA)

Abstract

PURPOSE:To reduce the memory capacity by arranging a memory device, in which codes representing each program are classified into groups based on the priority in their execution and are stored, enabling each program to be activated in order for the period of every 2<n> times of the activation requirement. 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 the activation period and order of each task as a task table. The above-mentioned task table is classified and arranged by the priority in its execution. To allow the task table to be activated at an interval of a constant time, the activation device 403 permits a task which belongs to a task level n of the task table, to be activated every 2<n> times of an activation signal in accordance with the signal from the activation requirement initiation device 404. This signal allows a control output to be initiated by the operation device 405 based on the required task called from the memory system 401.

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 that uses a microcomputer to control various vehicle devices including an internal combustion engine device.

従来の技術 マイクロコンビネータによシ内燃機関車輛の制御を行な
うことが従来から行なわれてきているが、その制御内容
は年々複雑となυ、且つ高yn!度の制御を行なうこと
が要求されてきている。従って、マイクロコンビエータ
により実行される制御項目の増加によって入出力項目が
増加し、マイクロコンピュータの負担が増大する傾向に
ある土、制御の高速化が要求されて来ている。これらの
要求を満たすためには、よシ高性能のマイクロコンピュ
ータを使用すればよいが、このようなマイクロコンビエ
ータは高価であり、装置の製造コヌトを押し上げる要因
となる。
Conventional Technology Microcombinators have been used to control internal combustion engine vehicles for a long time, but the control content has become more and more complex year by year, and has become increasingly expensive. It has become necessary to control the degree of Therefore, as the number of control items executed by the micro combinator increases, the number of input/output items increases, and the burden on the microcomputer tends to increase, creating a demand for faster control. In order to meet these demands, a high-performance microcomputer can be used, but such a microcombinator is expensive and becomes a factor that increases the cost of manufacturing the device.

そこで、安価なマイクロコンピュータを効率よく使用す
るための方法が種々提案されておシ、例えばその1つと
して、プログラムを、タスクと呼ばれる小プログラムに
分割し、ソフトタイマによって起動され、エン・シン制
御の制御機能に基づいて分類されたタスクの数だけのソ
フトタイマテーブルをRAMに設け、タスクの停止をそ
のソフトタイマテーブルの内容をクリアすることにより
行うようにしたものが提案されている(特開昭56−3
8541号公報参照)。この方法は、各タスク毎に設け
られたソフトタイマの値に応じて各タスクを起動するも
のであり、各タスクには夫々優先度が宇められており、
成るタスクの実行中にょシ優先度の高いタスクの起動要
求が出されると、現在実行中のタスクの情報を、RAM
内に一旦退避させる。そして、より優先度の高いタスク
の実行が終了した後、RAM内にストアされている情報
を取り出し、中断していたタスクの実行を再開するもの
である。
Therefore, various methods have been proposed to efficiently use inexpensive microcomputers. For example, one of them is to divide a program into small programs called tasks, which are started by a soft timer, and executed as engine control. It has been proposed that a RAM is provided with as many soft timer tables as the number of tasks classified based on their control functions, and tasks are stopped by clearing the contents of the soft timer tables (Japanese Patent Application Laid-Open No. Showa 56-3
(See Publication No. 8541). This method starts each task according to the value of a soft timer provided for each task, and each task has its own priority.
If a request to start a task with a high priority is issued while a task is being executed, the information of the currently executing task is stored in RAM.
Temporarily evacuate inside. After the execution of the task with higher priority is completed, the information stored in the RAM is retrieved and the execution of the suspended task is resumed.

発明が解決しようとする問題点 しかし、上述の方式では、タスクの優先度の数に応じて
メモリ内に退避領域を設けなければなら々いため、大容
量のメモリを必要とするほか、タスクの数が多くなると
、タイマのセット、起動要求のサーチ等、アイス・臂ッ
チャの負担が大きく々るという問題点を有している。更
に、タスクに優先順位を付し、且つ、割込みにょシより
優先順位の高いタスクの優先処理を行々っているので、
無駄時間が多く効率を高くすることが難しい上に、優先
順位の低いタスクは処理が完了するまでに長い時間を要
し、場合によっては、優先順位の低いタスクは起動され
々いという不都合が生じる虞れがある。
Problems to be Solved by the Invention However, in the above-mentioned method, it is necessary to provide a save area in memory according to the number of priorities of tasks, which requires a large amount of memory, and also because of the number of tasks. When the number of times increases, there is a problem in that the burden on the ice cream and armchair becomes large, such as setting timers and searching for activation requests. Furthermore, since tasks are prioritized and tasks with higher priority are prioritized than interrupts,
Not only is there a lot of wasted time, making it difficult to increase efficiency, but low-priority tasks take a long time to complete, and in some cases, low-priority tasks are often not activated. There is a risk.

本発明の目的は、各タスクを所定の優先順位に従って、
所要の起動周期で確実に実行させることができるように
し、マイクロコンピュータのオーバーヘット時間を大巾
に減少せしめることができるようにした車輛用制御装置
を提供することにある。
The purpose of the present invention is to perform each task according to a predetermined priority order.
To provide a vehicle control device which can be reliably executed at a required startup cycle and can greatly reduce the overhead time of a microcomputer.

問題点を解決するための手段 本発明の構成は、車輛用装置を制御するための制御プロ
グラムがその制御機能に基づいて複数のプログラムに分
割され、各ノログラムに対して生じる起動要求に従って
各プログラムが選択的に実行されることにより車輛の制
御が行なわれるように構成された車輛用制御装置におい
て、各プログラムを示すコードが各プログラムの実行優
先度に基づいたグループに分類されて記憶されているメ
モリ手段と、所定時間毎にプログラムの起動要求を発す
る起動要求発生手段と、上記起動要求の出力に応答し上
記メモリ手段のメモリ内容に従って第n番目のグループ
のプログラムの起動を2n回の起動要求毎に行なう手段
とを備えた点に特徴を有する。
Means for Solving the Problems The configuration of the present invention is such that a control program for controlling a vehicle device is divided into a plurality of programs based on its control function, and each program is divided into a plurality of programs based on the control function, and each program is divided into a plurality of programs according to a startup request generated for each nologram. In a vehicle control device configured to control a vehicle by being selectively executed, a memory in which codes indicating each program are stored and classified into groups based on the execution priority of each program. means for issuing a program startup request at predetermined time intervals; startup request generating means for issuing a program startup request at predetermined time intervals; and startup request generating means for issuing a program startup request at predetermined time intervals; It is characterized in that it is equipped with a means for performing the same.

作用 上述の構成によると、起動の優先順位に関してグループ
分けされて成る各プログラムが2”(n=1゜2、・・
・ )回毎の起動要求に対して順次起動されるので、各
プログラムはメモリ手段の記憶内容に従う所定の順序、
所定の起動周期にて確実に実行される。従って、1つの
プログラムの実行が終了してから次のプログラムの起動
が行々われるため、演算の無駄時間が少なくて済み、メ
モリの容量も従来に比して少なくて済むので経済的であ
る。
Operation According to the above configuration, each program grouped in terms of startup priority is 2" (n=1°2,...
・) Since each program is started sequentially in response to each start request, each program is executed in a predetermined order according to the contents stored in the memory means.
It is reliably executed at a predetermined activation cycle. Therefore, since the next program is started after the execution of one program is finished, there is less wasted time in calculations, and the memory capacity is also smaller than before, which is economical.

実施例 第1図には、本発明の基本概念を示す概略構成図が示さ
れている。車輛用制御装置400は、所要の車輛用装置
を、所定の制御プログラムに従って制御するための装置
である。所定の制御プログラムは、予め複数のノログラ
ム(以下タスクと称する)に分割されて、適宜の記憶装
置401内にストアされている。−力、各タスクの起動
周期及び起動順序に関する情報は、メモリ手段402に
タスクテーブルとしてストアされている。第1図に示さ
れるように、メモリ手段402内にストアされているタ
スクテーブルは、その実行優先度に基づいてタスクレベ
ル1乃至nに分類されて成るテーブルであシ、一般にタ
スクレベルkに属するタスクをT  、T  、・・・
と表示している。
Embodiment FIG. 1 shows a schematic configuration diagram showing the basic concept of the present invention. The vehicle control device 400 is a device for controlling required vehicle devices according to a predetermined control program. A predetermined control program is divided in advance into a plurality of nologograms (hereinafter referred to as tasks) and stored in an appropriate storage device 401. - Information regarding the power, activation period and activation order of each task is stored in the memory means 402 as a task table. As shown in FIG. 1, the task table stored in the memory means 402 is a table that is classified into task levels 1 to n based on their execution priority, and generally belongs to task level k. Tasks T , T ,...
is displayed.

kl     k2 起動手段403は、タスクを所定の一定時間間隔で起動
するため起動要求発生手段404から出力される起動信
号SSに応答して作動し、タスクテーブルのタスクレベ
ルnに属するタスクを起動信号SSの2n回の毎に起動
させるための起動制御を行なう。この起動制御動作によ
シ得られた起動情報は演算手段405に入力され、その
起動情報に従って、所要のタスクが記憶装置401から
呼び出される。演算手段405においては、必要ならば
演算手段405に入力されているデータが使用され、そ
のタスクが実行され、所要の制御出力が演算手段405
から得られる。
kl k2 The activation means 403 operates in response to the activation signal SS output from the activation request generation means 404 in order to activate the task at a predetermined constant time interval, and activates the task belonging to the task level n of the task table using the activation signal SS. Activation control is performed to activate the device every 2n times. The activation information obtained by this activation control operation is input to the calculation means 405, and a required task is called from the storage device 401 according to the activation information. In the calculation means 405, the data input to the calculation means 405 is used if necessary, the task is executed, and the required control output is sent to the calculation means 405.
obtained from.

このようにして、各タスクが、所望の起動周期、起動順
序で逐次実行されることにより、車輛の制御が適切に効
率よく行なわれる。
In this manner, each task is sequentially executed in a desired activation cycle and activation order, thereby appropriately and efficiently controlling the vehicle.

上述の制御装置は、ストアト・プログラム方式のディジ
タル計算機であるマイクロコンピュータを用いて実現す
ることができ、以下、具体的な実施例について本発明の
詳細な説明する。
The above-mentioned 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 specific embodiments.

第2図には、本発明をオートクルーズ機能付のディーゼ
ル機関車輛の制御装置に適用した場合の、車輛用制御装
置の一実施例の制御システムの全体構成図が示されてい
る。車輛用制御装置1は、燃料噴射ポンプ2から燃料の
供給を受けるディーゼル機関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 verbally transmitted) driven by a diesel engine 3 supplied with fuel from a fuel injection pump 2, and includes first and second microcontrollers 4. , 5.

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

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

ディーゼル機関3の出力軸に装着されている角度センサ
13からは、ディーゼル機関3内の各シリンダビヌトン
が上死点に到達するタイミング情報を有する交流信号A
Cが出力され、この交流信号ACは、波形処理回路14
においてディーゼル機関3の上死点タイミングを示すタ
イミングパルスから成る上死点・母ルス信号TNに変換
され、第1マイクロコンビーータ4に入力される。更に
、ディーゼル機関3への燃料噴射タイミングを検出する
ため、燃料噴射弁15に装着された針弁リフトセンサ1
6からのリフト信号LSは、波形整形回路17において
波形整形され、所定の基準の気筒における実際の燃料噴
射タイミングを示す噴射タイミングパルス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 binuton in the diesel engine 3 reaches top dead center.
C is output, and this alternating current signal AC is sent to the waveform processing circuit 14.
, it is converted into a top dead center/main pulse signal TN consisting of a timing pulse indicating the top dead center timing of the diesel engine 3, and is input to the first microcombeater 4. Further, in order to detect the timing of fuel injection into the diesel engine 3, a needle valve lift sensor 1 is attached to the fuel injection valve 15.
The lift signal LS from 6 is waveform-shaped in a waveform shaping circuit 17 and inputted to the first microconbeater 4 as an injection timing pulse TNL indicating the actual fuel injection timing in a predetermined reference cylinder.

アクセルセンサ18は、アクセルペダル19の操作量に
従ったアクセス信号APPを出力し、アクセル(i 号
APP ハ第1マイクロコンピュータ4に入力される。
The accelerator sensor 18 outputs an access signal APP according to the amount of operation of the accelerator pedal 19, and the access signal APP is inputted to the first microcomputer 4.

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

尚、ヌタートスイッチ21は、ディーゼル機関3の始動
の際に始動信号STを第1マイクロコンビーータ4に供
給する。
Note that the nutart switch 21 supplies a starting signal ST to the first microcombeater 4 when the diesel engine 3 is started.

第1マイクロコンピユータ4に屯り込まれた情鰻け、パ
スライン22を介してRAM 6に1旦転送され、RA
M’6への転送データの内容は、同じくパスライン22
を介して第2マイクロコンビーータ5内に更に転送する
ことができる。尚、このデータ転送のためのパスライン
22の接続の切換は、各マイクロコンピュータ4.5内
において行なわれる。
The information stored in the first microcomputer 4 is once transferred to the RAM 6 via the pass line 22, and then
The contents of the data transferred to M'6 are the same as those of the pass line 22.
can be further transferred into the second microconbeater 5 via. Note that switching of the connection of the pass line 22 for data transfer is performed within each microcomputer 4.5.

第1マイクロコンビーータ4における噴射量制御演算結
果は、ディジタル・アナログ変換器(I)/A )26
を介して燃料噴射ポンプ2のコントロールラック27の
位置制御を行なうためのサーが回路28に入力され、そ
の時々の機関の運転条件に見合った最適が噴射量がディ
ーゼル機関3に供給されるよう、コントロールラック2
7の位置が制御される。符号29で示されるのは、制御
等に異常が生じた時に点灯する警報ランプである。
The injection amount control calculation result in the first microconbeater 4 is transferred to the digital/analog converter (I/A) 26
A signal for controlling the position of the control rack 27 of the fuel injection pump 2 is input to the circuit 28 via the circuit 28, so that the optimum injection amount is supplied to the diesel engine 3 according to the engine operating conditions at the time. control rack 2
7 position 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において実行される燃料噴射ポンプ2の噴射時
期制御のための演算結果が与えられ、この演算結果に従
ってタイミング制御信号TC8が第2マイクロコンピユ
ータ5から出力され、増幅器30を介してタイマ31に
供給され、これにより、最適タイミング制御が行なわれ
る。
The second microconbeater 5 is given the calculation result for the injection timing control of the fuel injection pump 2 executed in the first microconbeater 4, and according to this calculation result, the timing control signal TC8 is sent to the second microconbeater 5. The signal is output from the computer 5 and 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 tasks and other processes executed by interrupts, which will be described later. In the illustrated embodiment, the calculation of the rotational speed and the driving frequency of the timer 31 are performed. .

第2マイクロコンピユータ5がRAM 6をアクセスす
る際に、パスリクエストを出力すると、割込NMIがか
けられ、通常では第1マイクロコンピユータ4に接続さ
れているパスライン22がパスフリー処理43によりフ
リーとなり、第2マイクロコンビーータ5によるRAM
 6のアクセスが終了すると、パスライン22け再び第
1マイクロコンピユータ4に接続される。
When the second microcomputer 5 outputs a path request when accessing the RAM 6, an interrupt NMI is applied, and the pass line 22, which is normally connected to the first microcomputer 4, is freed by the path free processing 43. , RAM by the second microconbeater 5
When the access of 6 is completed, the pass line 22 is connected to the first microcomputer 4 again.

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

フリーランニングカウンタの値が予め定められた所定値
に達した場合に出力されるモニタ信号により割込MON
が掛けられる。このモニタ信号により第1割込処理45
が実行され、一定時間Δを後に再びモニタ信号が出力さ
れるようフリーランニングカウンタのセットが行なわれ
る。次に、同期処理46(後述)が実行され、しかる後
、いずれのタスクを実行するのかを決定するためのモニ
タ処理47が実行される。ここで、タスクとは、第1マ
イクロコンピユータ4において実行すべき制御演算を分
割しfClつ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 then a monitor process 47 for determining which task is to be executed is executed. Here, the term "task" refers to one independent program that divides the control calculations to be executed in the first microcomputer 4, and each task further includes one or more programs included in the control subroutine program group 48. It consists of multiple control subroutine programs.

そして、各タスクの実行時間は時間Δを以内であって、
且つばらつきがなるべく少なくなるように配慮して定め
である。従って、タスク処理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 the tasks is determined according to the contents of the task table stored in the ROM in the first microcombinator 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 example, as will be described in detail in the section on Three tables are prepared for 1) and high speed rotation (mode 2).

尚、これらのテーブルに従って、各タスクがどのように
起動されるのかは、後述する。
Note that how each task is activated 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 job process 42 is executed until the next interrupt occurs. When the next monitor signal is output, in monitor processing 47, processing of the next task determined according to the above-mentioned task table is performed in task processing 49.

噴射タイミングi4ルヌTNLの発生によシ、割込NL
が実行され、第3割込処理51が実行される。
Injection timing i4 Due to the occurrence of TNL, interrupt NL
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)参照)。
The third interrupt process 51 activates a soft counter for detecting the injection advance angle based on the generation timing of the injection timing pulse TNL. Then, the interrupt TDC is executed by the generation of the top dead center pulse signal TN, and the counting operation of the soft counter is stopped by the second interrupt processing 50 by the top dead center pulse signal TN corresponding to the injection timing pulse TNL. Then, data tNL related to the injection advance value is calculated from the counting result (see FIGS. 4(a) and (b)). In the second interrupt process 50, data tN related to the time interval between two consecutive pulses of the top dead center pulse signal TN is also 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の制御演算に伴なう所要1の演算処理のタスク
が実行される。
When the power is turned on or when the first microconbeater 4 resets the second microconbeater 5, an initialization process 61 is executed, and a monitor process 62 and a task process 63 are executed. Then, one required calculation task associated with the control calculation of the first microconbeater 4 is executed.

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

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

外部タイマ信号に応答して割込TIMがかけられ、第4
割込処理65において、R,AM6より、タイマ31の
駆動用パルス信号の周期とそのデエーティ比データとを
読込み、デー−ティ比に関連した時間データtDTYの
作成を行なう。そして、クルーズスイッチ20の状態を
読み込みRAM 6にストアするスイッチ処理66が実
行される。
An interrupt TIM is applied in response to an external timer signal, and the fourth
In interrupt processing 65, the period of the driving pulse signal of the timer 31 and its duty ratio data are read from R, AM6, and time data tDTY related to the duty ratio is created. Then, a switch process 66 is executed to read the state of the cruise switch 20 and store it in the RAM 6.

車速センサ23から車速に関連して出力される車速デー
タTUSPが出力されることに応答して、割込vspが
かけられ、信号TUSPの発生周期の検出が行なわれる
(周期読込処理67)。
In response to the vehicle speed data TUSP being output from the vehicle speed sensor 23 in relation to the vehicle speed, an interrupt vsp is applied and the generation cycle of the signal TUSP is detected (period 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. This allows the desired data to be read at the desired period.
A drive signal with a tee ratio will be output.

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

第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 microconbeater 4. The control system 70 will be explained first.

制御系統70は、符号71乃至76で示される6種類の
噴射量演算部を有している。アクセルQ演算部71では
、アクセルペダル19の操作に従った噴射量を演算しそ
の結果がデータQAPPとして出力される。アイドルQ
演算部72は、アイドル運転時に必要な噴射量を演算し
その結果がデータQIDLとして出力される。クルーズ
Q演算部73は1、定車速走行に必要な噴射量を演算し
、その結果がデータQCRとして出力される。フルQm
算部74は、噴射量の最大値を機関速度の関数として定
められている所定の最大噴射量特性を示すデータQ F
ULを演算出力する。スモークQ演算部75は、所定の
スモーク限界に従う噴射量を示すデータQ 8MKを演
算出力し、スタートQ演算部76は始動増址を示す噴射
量データQ8Tを演算出力する。
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 calculating section 73 calculates the injection amount necessary for traveling at a constant speed, and outputs the result as data QCR. Full Qm
The calculation unit 74 calculates data QF indicating a predetermined maximum injection amount characteristic in which the maximum value of the injection amount is determined as a function of engine speed.
Compute and output UL. The smoke Q calculating section 75 calculates and outputs data Q8MK indicating the injection amount according to a predetermined smoke limit, and the start Q calculating section 76 calculates and outputs the injection amount data Q8T indicating the starting boost.

データQAPPとQIDLとは加算部77にて加算され
、その加算出力データとデータQ。Rとは、最大値選択
部(MAX) 78に入力され、大きい方のデータが出
力される。データQFtlL I qsMK及び最大値
選択部78からの選択データは最小値選択部(MIN)
 79に入力され、最も小さい値のデータが目標噴射量
データとして取出される。この目標噴射肝データは、機
関の始動時以外の場合に適用され、機関の始動時におい
ては、データQaTが目標噴射量データとなる。スイッ
チ80はスタートスイッチ21の操作に応じて出力され
る始動信号STにより制御され、始動信号STが出力さ
れている場合にはr−タQ8Tを選択し、それ以外の場
合にはMIN79からの出力データを選択するように作
動する。
Data QAPP and QIDL are added in an adder 77, and the added output data and data Q. R is input to a maximum value selection unit (MAX) 78, and the larger data is output. The selected data from the data QFtlL I qsMK and the maximum value selection section 78 is the minimum value selection section (MIN).
79, and the data with the smallest value is taken out as target injection amount data. This target injection amount data is applied at times other than when the engine is started, and when the engine is started, the data QaT becomes the target injection amount data. The switch 80 is controlled by the start signal ST output in response to the operation of the start switch 21, and when the start signal ST is output, selects the r-taper Q8T, and otherwise selects the output from the MIN79. Operates to select data.

スイッチ80により選択されたデータは、燃温補正部8
1において、その時の燃料温度に応じた所定の補正係数
が乗ぜられ、これにより、燃料温度が変化しても、目標
噴射量データに従う量の燃料が得られるように目標噴射
量データの補正が行なわれる。燃温補正部81において
補正されたデータは、ポンプ特性演算部82に入力され
、入力された噴射量データをそのポンプ特性に従った位
置データに変換するポンプ特性演算処理が行なわれた後
、出力部83から最終的な目標位置量データP。utが
出力され、このデータP。utは、第2図に示されるよ
うに、D/A26を介してす〜が回路28に入力される
The data selected by the switch 80 is stored in the fuel temperature correction section 8.
1, the target injection amount data is multiplied by a predetermined correction coefficient according to the fuel temperature at that time, thereby correcting the target injection amount data so that even if the fuel temperature changes, the amount of fuel according to the target injection amount data is obtained. It will be done. The data corrected in the fuel temperature correction section 81 is input to the pump characteristic calculation section 82, and after a pump characteristic calculation process is performed to convert the input injection amount data into position data according to the pump characteristics, the data is output. The final target position amount data P is sent from section 83. ut is output, and this data P. As shown in FIG. 2, ut is input to the circuit 28 via the D/A 26.

噴射タイミングの制御系統90は、機関の運転状態に従
った目標の噴射時期を演算しその結果を示すデータTL
Dを出力するためのローPタイマ特性演算部91と、機
関の冷却水温に従った噴射タイミングの補正を行なうた
めの補正データを演算しその結果を示すデータTTVを
出力するための水温補正値演算部92と、始動時におけ
る水温補正データを演算しその結果を示すデータTTW
ilを出力するための始動時水温補正値演算部93とを
有しておす、データTLDは、データTTw又けTTw
llと加算部94において加算される。すなわち、デー
タTTV及びTTwBは、機関が始動状態にあるか否か
を示す始#h信号STによシ切換制御されるスイッチ9
5を介して、いずれか一方が加算部94に供給される構
成であり、始動時にはデータT’IW8が選択されてデ
ータTLDと加算され、始動時以外の場合にはデータT
Twが選択されデータTLDと加算される。
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 low P timer characteristic calculation section 91 for outputting D, and a water temperature correction value calculation unit for calculating correction data for correcting the injection timing according to the engine cooling water temperature and outputting data TTV indicating the result. part 92, and data TTW that calculates the water temperature correction data at the time of starting and shows the result.
The data TLD has a starting water temperature correction value calculation unit 93 for outputting the data TTw and the data TTw.
ll and is added in an adder 94. That is, the data TTV and TTwB are switched by the switch 9 which is controlled by the start #h signal ST indicating whether or not the engine is in the starting state.
Data T'IW8 is selected and added to data TLD at the time of startup, and data T'IW8 is selected and added to data TLD at the time of startup.
Tw is selected and added to data TLD.

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

パルス巾変調部98には、タイマ31を駆動する・臂ル
ス信号の周波数を演算する駆動周波数演算部99からの
演算データが供給されており、ノ母ルス巾変調部98か
らは、駆動周波数演算部99から供給されるデータに従
った周波数でそのデユーティ比がPID演算部9からの
出力データに従って変化する、タイマ31を駆動するた
めの駆動ノ9ルヌ信号が出力される。この駆動パルス信
号は、タイミング制御信号TC8として増幅器30を介
してタイマ31内の制御用パルプ(図示せず)に印加さ
れる(第2図参照)。
The pulse width modulation unit 98 is supplied with calculation data from a drive frequency calculation unit 99 that calculates the frequency of the pulse signal that drives the timer 31. A drive signal for driving the timer 31 is outputted at a frequency according to the data supplied from the section 99 and whose duty ratio changes according to the output data from the PID calculation section 9. This drive pulse signal is applied as a timing control signal TC8 to a control pulse (not shown) in a timer 31 via an amplifier 30 (see FIG. 2).

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

第1表に、各制御サブルーチンプログラムの−覧表を示
す。
Table 1 shows a list of each control subroutine program.

第 1 表 これらの制御サブルーチンプログラムの実行時間は様々
であシ、また、制御上要請される実行頻度もまた異なっ
ている。このようなサブルーチンプ日グラムを効率よく
実行するため、これらの制御サラルーチンプログラムの
1つ又は複数から成る複数のタスクが定義され、そのタ
スクの実行優先度を考慮して、タスク単位に所定の時間
間隔でプログラムの起動が行表われる構成となっている
Table 1 The execution times of these control subroutine programs vary, and the frequency of execution required for control purposes also differs. In order to efficiently execute such a subroutine program, multiple tasks consisting of one or more of these control subroutine programs are defined, and a predetermined task is assigned to each task in consideration of the execution priority of the task. The configuration is such that the program launches occur at time intervals.

タスクの起動時間間隔は、タスクテーブルに基づいて定
められるが、運転条件によっては起動不要のタスクもあ
る等の理由から、その実行ノ9ターンは機関の運転条件
によって変更するのが望ましいものである。このため、
本装置では、既述の如く、機関の運転条件を始動時(モ
ードO)、低回転域での運転時(モード1)及び高回転
域での運転時(モード2)の3つに分け、各モードに対
して夫々専用のタスクテーブルが用意されている。
The task activation time interval is determined based on the task table, but because some tasks may not require activation depending on the operating conditions, it is desirable to change the execution nine turns 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 O), 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.

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

各タスクは、要求される実行頻度を考慮l〜てタスクレ
ベルO〜8に分けられると共に、各タスクレベルにおい
ても、実行優先度の高い順に左側から並べられている。
Each task is divided into task levels 0 to 8 in consideration of the required execution frequency, and each task level is also arranged from 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の各タスクはモニタ割込の21回毎に行
なわれ、タスクレベル1の各タスクはモニタ割込の22
回毎に行なわれ、一般にタスクレベルにの各タスクはモ
ニタ割込の2に+1  回毎に行なわれる。
(b) The order of tasks executed by monitor interrupts is
Each task at task level O is executed every 21 monitor interrupts, and each task at task level 1 is executed every 22 monitor interrupts.
Generally, each task at the task level is performed every 2+1 monitor interrupts.

(ハ) 同一タスクレベル内のタスクについては、その
タスクレベルに起動の順番が回ってくる毎に左側に配列
されているものから順次起動する。
(c) Tasks within the same task level are activated in order from those arranged on the left every time it is their turn to activate at that task level.

従って、タスクテーブルはタスクの実行順序を示すもの
であシ、どのタスクをタスクテーブルのどこに配置する
かは、そのタスクに対して要求される実行頻度と実行の
優先度とを考慮して適宜に定めることができる。
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 taking into consideration the execution frequency and execution priority required for that task. can be determined.

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

次いで、ステップ111において、タスクの起動がオー
バーラツプして掛けられているか否かのチェックが行が
われ、オーバーラツプしている場合には、現在実行中の
タスクがそのまま継続して実行される。一方、オーバー
ラツプしていない場合には、ステップ112に進む。尚
、オーバーラッ7’ しているか否かの判別は、後述す
るフラグ0■、によって行なわれる。
Next, in step 111, a check is made to see if the activations of tasks overlap. If they overlap, the task currently being executed continues to be executed. On the other hand, if there is no overlap, the process advances to step 112. It should be noted that the determination as to whether or not there is an overlap 7' is made by a flag 02, which will be described later.

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

f114に進む。Proceed to f114.

ステップ114では、現在タスクが実行されていること
を示すフラグOLを11」とし、ソフトカウンタTCT
Rの値を1だけ増加させる。そして以後のステップでは
、このソフトカウンタTCTRの内容に従って、前述の
タスクテーブルを参照して、各タスクを所定の順序で実
行する。
In step 114, the flag OL indicating that the task is currently being executed is set to 11'', and the soft counter TCT
Increase the value of R 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.

ソフトカウンタTCTRけ2進の8ビツトの出力を有し
、2°の桁から27の桁までの8つの出力を有している
。ステップ115−0乃至115−7i:、夫々カウン
タT CT Rの各ビットの値が「0」か否かの判別を
行なうステップであり、これらのステッfl15−0乃
至115−7において、各ビットが「0」か否かの判別
が、最下位の桁から順々に最上位まで行なわれる。ステ
ップ115−0の判別結果はモニタ割込みが2回行なわ
れる毎にYESとなシ、一般にステップ115−nにつ
いては2n+1回毎にYESとなる。また、ステップ1
15−0から115−7までの判別結果が全てNoとな
るのは、換言すれば、カウンタTCTRの各ビットが全
て「1」と力るのは、29回毎である。
The soft counter TCTR has a binary 8-bit output, and has eight outputs from the 2° digit to the 27th digit. Steps 115-0 to 115-7i: This is a step of determining whether the value of each bit of the counter TCTR is "0" or not, and in these steps fl15-0 to fl15-7, each bit is Determination as to whether it is "0" or not is performed sequentially from the lowest digit to the highest digit. The determination result in step 115-0 becomes YES every two monitor interrupts, and generally becomes YES in step 115-n every 2n+1 times. Also, step 1
The determination results from 15-0 to 115-7 are all No, in other words, each bit of the counter TCTR is all set to "1" every 29 times.

ステップ115−0乃至115−7においては、各タス
クテーブルのどのレベルのタスクを選択すべきかの判別
を行なうものであり、上記説明から判るように、タスク
レベル0,1,0,2,0゜1,0.3.・・・が順次
選択されることになる。
In steps 115-0 to 115-7, it is determined which level of the task in each task table should be selected, and as can be seen from the above description, task levels 0, 1, 0, 2, and 1,0.3. ... will be selected in sequence.

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

第9図には、ROM及び1<AM内におけるメモリ構造
が示されている。第1マイクロコンビーータのROM内
には、アドレスA (100からA099捷でのアドレ
ス領域内に第2 f、<に示すタスクのアドレスがデー
タとして財1示の如くストアされている。
FIG. 9 shows the memory structure in ROM and 1<AM. In the ROM of the first microcombinator, the address of the task shown in the second f, < is stored as data in the address area from address A (100 to A099) as shown in Figure 1.

第2衣の各+tNの1段に示されているのはそのタスク
の番号であり、第9図では、タスクを特定するためにこ
の番号が用いられている。第3表及び第4衣に示される
タスクについても、同様にして、ROM内のアドレス領
域A100乃至A199及びA200乃至A299に夫
々ストアされている。
What is shown in the first row of each +tN in the second column is the number of the task, and in FIG. 9, this number is used to identify the task. The tasks shown in Tables 3 and 4 are similarly stored in address areas A100 to A199 and A200 to A299 in the ROM, respectively.

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

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

再び第8図に戻って説明を行なう。カウンタTCTHの
値に基づき、ステップ115−0乃至115−7により
タスクテーブルの1行の指定が順次行なわれることにつ
いては既に説明した。従って、今、i=1が選択された
場合の1列の選択動作について説明する。上述の3つの
タスクテーブルのどれを選択するかは、モード判断のタ
スクにより定められているTBLPTHの内容に従うこ
ととなる。今、モードOで作動しているとすると、TB
LPTR= TBLTOP Oであり、PTRI= O
とすれば、Aの値はm)9図からAoloとなる(ステ
ップ116−1)。
The explanation will be given by returning to FIG. 8 again. It has already been explained that one row of the task table is sequentially specified in steps 115-0 to 115-7 based on the value of the counter TCTH. Therefore, the selection operation for one column when i=1 is selected will now be explained. Which of the three task tables mentioned above is selected depends on the contents of TBLPTH determined by the mode determination task. Assuming that it is currently operating in mode O, TB
LPTR= TBLTOP O and PTRI= O
Then, the value of A becomes Aolo from m)9 (step 116-1).

(An 10+2 )番地の内容は、T(’)04’l
のアドレスであるから、0000Hとは異なシ(ステッ
プ117−1)、従って、PTR←+2の操作が実行さ
れる(ステップ118−1)。若し、A+2番地の内容
が00(’IOHであれば、ステップ119−1に進み
、PTR1←0とされる。
The contents of address (An 10+2) are T(')04'l
Since the address is different from 0000H (step 117-1), the operation PTR←+2 is executed (step 118-1). If the content of address A+2 is 00 ('IOH), the process proceeds to step 119-1 and PTR1←0 is set.

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

上述のモニター割込動作け、Δを時間毎にかけられ、そ
の度に、所要のタスクテーブルにて定められたところに
従い所要のタスクが起動され、実行される。
In the above-mentioned monitor interrupt operation, Δ is multiplied by time, and each time a required task is activated and executed according to what is defined in the required task table.

上記説明から判るように、あるタスクレベルkに、E個
のタスクをおくと、このレベルのタスクは、Δt・2に
+1・E時間毎に起動されることとなり、タスクの起動
周期は一義的に定まることになる。
As can be seen from the above explanation, if E tasks are placed in a certain task level k, the tasks at this level will be activated every +1·E time to Δt·2, and the task activation period is unique. It will be determined as follows.

例えば、実施例のモードOで噴射量信号出力タスクはT
OOO20とTOOO26との2つなので、噴射量信号
出力の起動周期はΔt×21×8/2=Δt・8となり
、Δt・8毎に行なわれることになる。従って、各タス
クレベルの各タスクは、個別にソフトタイマが設けられ
てその起動周期が管理されているのと同じ効果が得られ
ることになる。
For example, in mode O of the embodiment, the injection amount signal output task is T.
Since there are two, OOO20 and TOOO26, the activation cycle of the injection amount signal output is Δt×21×8/2=Δt·8, and is performed every Δt·8. Therefore, the same effect can be obtained as if each task at each task level is individually provided with a soft timer and its activation cycle is managed.

以上では、第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 arithmetic subroutine programs, and each of these programs is started and executed by a command from the first microcomputer 5. In the illustrated embodiment, four subroutine programs shown in Table 5 are prepared as calculation subroutine programs, and the calculation processing necessary when the subroutine program controlled by the first microcomputer 4 is executed is prepared. , is executed by the second microconbeater 5.

第1マイクロコンビーータ4において、成るタスクが実
行されている場合において、先ず、そのタスクの実行に
必要な演算データをサーチする(ステップ200)。次
にステ、f201においてRAM 6の指令コ〜ドパッ
ファが空いているが否かを判別し、空バッファが々けれ
ば、カウンタTCTRを1つだけ減算しくステップ2o
2)、タスクを終了する。従って、次のモニタ割込みで
は再び同一のタスクが起動される。このようにして、バ
ッファ領域が空くのを待つことになる。
When a task is being executed in the first microcomputer 4, first, calculation data necessary for executing the task is searched for (step 200). Next, in step f201, it is determined whether the command code buffer in RAM 6 is empty or not. If there are many empty buffers, the counter TCTR is decremented by one.
2), Finish 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となると、指令コー
ドをRAM 6に転送し、データが格納されていないブ
ロックの先頭アドレスETOPを更新する(ステップ2
03)。ステップ203におけるデータの転送前におい
て、バッファが全て空であったか否か(従って、現在の
状態でいえばバッファが1つだけデータを格納している
が否か)がステップ204において判別される。判別結
果がYESならば、第2マイクロコンビーータ5はアイ
ドル状態を保っているので、演算開始信号を第2マイク
ロコンピユータに送り、第2マイクロコンピユータ5に
割込みNMIをかける(ステップ205)。
If the determination result in step 201 is YES, the command code is transferred to the RAM 6, and the start address ETOP of the block where no data is stored is updated (step 2
03). Before the data is transferred in step 203, it is determined in step 204 whether all the buffers are empty (therefore, in the current state, only one buffer stores data). If the determination result is YES, since the second microcomputer 5 is kept in an idle state, a computation start signal is sent to the second microcomputer 5, and an interrupt NMI is applied to the second microcomputer 5 (step 205).

ステップ204の判別結果がNoの場合には、ステラ7
’205を実行することなく、そのタスクの処理を終了
する。第2マイクロコンビーータ5は、割込■■の実行
によシ、バッファが空いていることを示す空フラグを0
とし、バッファにデータがあることを示す(ステップ3
01)。
If the determination result in step 204 is No, Stella 7
'Terminate the processing of the task without executing 205. The second micro converter 5 sets the empty flag to 0, which indicates that the buffer is empty, by executing the interrupt
to indicate that there is data in the buffer (step 3
01).

第2マイクロコンピユータは、ノ々ッファが全て空なら
ば、アイドル状態を保っており、割込NMIにより空フ
ラグが0と々っだことに応答して(ステップ302)、
第1マイクロコンピユータ4に割込みNMIを掛けてパ
ス要求を出し、共通メモリであるRAM 6をパスによ
って第2マイクロコンピユータ5に接続する(ステップ
303)。即ち、割込みNMIにより、第1マイクロコ
ンピユータ4はパスライン22を切離し、これによシ第
2マイクロコンピュータ5はパスライン22を介してR
AM 6と接続される。尚、この間、第1マイクロコン
ビーータ4は待ち状態となっている。しかる後、所要の
データが転送されているRAM 6内のアドレスBUF
 iよりデータを読み込み、BTOP Oの更新を行な
う(ステップ304)。即ち、BUFiのブロックのデ
ータを読み出した場合、BTOP←BUF(1+1)と
する。しかし、第11図から判るように、パ、ファブロ
ックは4つがリング状にリンクされているため、i+1
=4ならば、BTOP←BUF Oとすることになる。
If all buffers are empty, the second microcomputer remains in an idle state, and in response to the empty flag becoming 0 due to an interrupt NMI (step 302),
An interrupt NMI 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 303). That is, the first microcomputer 4 disconnects the pass line 22 due to the interrupt NMI, and the second microcomputer 5 disconnects the R via the pass line 22.
Connected to AM6. Note that during this time, the first microconbeater 4 is in a waiting state. After that, the address BUF in RAM 6 where the required data is transferred
Data is read from i and BTOP O is updated (step 304). That is, when data of a block of BUFi is read, BTOP←BUF(1+1). However, as can be seen from Fig. 11, four fabric blocks are linked in a ring shape, so i+1
If =4, then BTOP←BUFO.

このようにして、データが読込まれた結果、バッファが
全て空になったか否かの判別が行なわれ(ステップ30
5)、その判別結果がYESであれば、空フラグを「1
」にセットしくステップ306)、パスライン22の切
離、しを行なう(ステラf 307 )。
In this way, as a result of reading the data, it is determined whether or not the buffer is completely empty (step 30).
5) If the determination result is YES, set the empty flag to “1”.
'' (Step 306), the pass line 22 is cut off (Stella f 307).

この場合には再び割込みNMIがかかるのを待つ状態と
なる。一方、ステップ305の判別結果がNOの場合に
は、ステラf306は実行されず、ステ、プ307に進
み、パスライン22の切離しのみを行なう。
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 f306 is not executed, and the process proceeds to step 307, where only the path line 22 is separated.

次に、ステッ7D308においてバッファカラ読込んだ
演算コドの解、稗を行ない、その結果に従って、割算処
理(ステップ309)、2次元補間処理(ステッ7’3
10)、3次元補間処理(ステラf311 )又はPT
D処理(ステッ7’312 )のいずれかの演算が実行
される。
Next, in step 7D308, the solution of the arithmetic code read in the buffer is calculated, and according to the result, division processing (step 309) and two-dimensional interpolation processing (step 7'3) are carried out.
10), 3D interpolation processing (Stella f311) or PT
One of the operations in the D process (step 7'312) is executed.

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

以上のようにして、各タスクが、その時の車輛の運転状
態に見合ったタスクテーブルに基づいて所要のタスクが
所定の起動周期、起動順序で順次起動され、各タスクを
構成する所要の制御サブルーチンプログラムが第1マイ
クロコンピユータ4において実行され、その時必要な演
算用のサブルーチンが第2マイクロコンピユータ5にて
実行されることになる。1述の如くして各タスクが順次
実行されることにより、所望の車輛制御が達成されるこ
とになる。
As described above, each task is sequentially activated in a predetermined activation cycle and activation order based on the task table that matches the driving state of the vehicle at that time, and the required control subroutine program that constitutes each task is activated. is executed by the first microcomputer 4, and a subroutine for calculations required at that time is executed by the second microcomputer 5. By sequentially executing each task as described above, desired vehicle control is achieved.

効果 本発明によれば、各プログラム(タスク)の起動周期及
び起動順序は、メモリ手段内にストアされているテーブ
ルのどのタスクレベルに配列されているかに従って定め
られる。そして、タスクレベルk(k=1.2.・・・
)のタスクは 2に回毎の起動にて実行されるので、各
タスクの実行優先度に従って、適宜のタスクレベルに配
列しておけば、各タスクは、所定の順序、起動周期で確
実に実行される。この場合、各タスクレベルの各タスク
は、個別にソフトタイマが設けられてその起動周期が管
理されているのと同じ効果を得ることができ、演算時間
の無駄時間は従来よシ減少し、またタスクの増減によシ
モニタプログラムに大巾な変更を与えることもないので
、極めて効率のよい制御を、手軽に実行することができ
る優れた効果を奏する。
Effects According to the present invention, the activation cycle and activation order of each program (task) are determined according to which task level of the table stored in the memory means it is arranged. Then, task level k (k=1.2...
) tasks are executed every second startup, so by arranging each task at an appropriate task level according to its execution priority, each task will be executed reliably in the predetermined order and startup cycle. be done. In this case, each task at each task level can obtain the same effect as if a soft timer is individually provided and its activation cycle is managed, and the wasted time of calculation time is reduced compared to the conventional method. Since there is no need to make major changes to the monitor program due to an increase or decrease in the number of tasks, an excellent effect is achieved in that extremely efficient control can be easily executed.

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

第1図は本発明の基本概念を示す概略構成図、第2図は
本発明による車輛用制御装置の一実施例の制御システム
の全体構成図、第3図は第2図に示した第1マイクロコ
ンビーータのプログラム構成図、第4図(、)及び第4
図(b)は第2図に示す装置の波形図、第5図は第2図
に示した第2マイクロコンピユータのプログラム構成図
、第6図は第1マイクロコンビーータにより実行される
制御の内容を示すための制御系統図、第7図は第6図に
示す制御系統の各部の制御演算を行なう制御サブルーチ
ンプログラムを第6図に対比させて示した制御サブルー
チンプログラムの説明図、第8図は第3図に示されるモ
ニタ割込プログラムの詳細フロルチャート、第9図は第
2図に示される装置の各メモリ内のメモリ構造を示す図
、第10図は第2マイクロコンビーータの作動を説明す
るための第1及び@2マイクロコンピュータのフローチ
ャート、第11図は第1及び第2マイクロコンビーータ
の作動を説明するためのメモリ構造を示す図である。 1.400・・・車輛用制御装置、4・・・第1マイク
ロコンピユータ、5・・・第2マイクロコンピユータ、
6・・・ランダム・アクセタ・メモリ(RAM) 、4
01・・・記憶装置。402・・・メモリ手段、403
・・・起動手段、404・・・起動要求発生手段、40
5・・・演算手段。
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 to show 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. 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. 2, and FIG. 10 is a diagram showing the operation of the second microconbeater. FIG. 11 is a flowchart of the first and @2 microcomputers to explain the operation of the first and second microcomputers. 1.400... Vehicle control device, 4... First microcomputer, 5... Second microcomputer,
6...Random accessor memory (RAM), 4
01...Storage device. 402...Memory means, 403
... Starting means, 404 ... Starting request generating means, 40
5... Calculation means.

Claims (1)

【特許請求の範囲】[Claims] 1、車輛用装置を制御するための制御プログラムがその
制御機能に基づいて複数のプログラムに分割され、各プ
ログラムに対して生じる起動要求に従って各プログラム
が選択的に実行されることにより車輛の制御が行なわれ
るように構成された車輛用制御装置において、各プログ
ラムを示すコードが各プログラムの実行優先度に基づい
たグループに分類されて記憶されているメモリ手段と、
所定時間毎にプログラムの起動要求を発する起動要求発
生手段と、前記起動要求の出力に応答し前記メモリ手段
のメモリ内容に従って第n番目のグループのプログラム
の起動を2^n回の起動要求毎に行なう手段とを備えた
ことを特徴とする車輛用制御装置。
1. A control program for controlling a vehicle device is divided into multiple programs based on its control function, and each program is selectively executed according to a startup request generated for each program, thereby controlling the vehicle. In the vehicle control device configured to execute the program, a memory means stores codes indicating each program classified into groups based on the execution priority of each program;
startup request generation means for issuing a program startup request at predetermined time intervals; and responsive to the output of the startup request, startup of the nth group of programs according to the memory contents of the memory means every 2^n startup requests. 1. A vehicle control device characterized by comprising means for controlling the vehicle.
JP20292584A 1984-09-29 1984-09-29 Car control device Pending JPS6181235A (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (1)

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

Family

ID=16465426

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JPS6181235A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216031B2 (en) 2004-04-19 2007-05-08 Denso Corporation Electronic control unit for vehicles

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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7216031B2 (en) 2004-04-19 2007-05-08 Denso Corporation Electronic control unit for vehicles

Similar Documents

Publication Publication Date Title
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
US4425890A (en) Spark timing control apparatus for use with a internal combustion engine
JPH01177431A (en) Electronic throttle control device for internal combustion engine
JPS6232343B2 (en)
JP2000047883A (en) Task controlling method and storage medium
JPS6181235A (en) Car control device
JPS6313011B2 (en)
JPS6181233A (en) Car control device
JPS6181234A (en) Car control device
JPH02118831A (en) Microprogram type timer processor
EP0106366A2 (en) Control Method for internal combustion engines
JPS6181232A (en) Car control device
JPH0782363B2 (en) Vehicle control device
JPH03258957A (en) Engine control device
JPS6181236A (en) Car control device
JPH1193760A (en) Engine control device and its control method
JPH0245030B2 (en)
JP3328319B2 (en) Throttle opening control method for internal combustion engine
EP2793141A1 (en) Engine control device
JPS6217343A (en) Fuel injection control system
JP4082096B2 (en) Torque control device for internal combustion engine
JPS60128027A (en) Controlling method of power train
JPH02155072A (en) Table retrieving system
JPH0814096A (en) Vehicle control device
JPH0527956A (en) Processor for controlling engine