JPH08265880A - Communication system - Google Patents

Communication system

Info

Publication number
JPH08265880A
JPH08265880A JP7064285A JP6428595A JPH08265880A JP H08265880 A JPH08265880 A JP H08265880A JP 7064285 A JP7064285 A JP 7064285A JP 6428595 A JP6428595 A JP 6428595A JP H08265880 A JPH08265880 A JP H08265880A
Authority
JP
Japan
Prior art keywords
message
response message
identification value
control device
communication
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
JP7064285A
Other languages
Japanese (ja)
Inventor
Shuichi Fujisawa
秀一 藤沢
Takahide Abe
孝秀 阿部
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Corp
Original Assignee
NipponDenso 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 NipponDenso Co Ltd filed Critical NipponDenso Co Ltd
Priority to JP7064285A priority Critical patent/JPH08265880A/en
Publication of JPH08265880A publication Critical patent/JPH08265880A/en
Pending legal-status Critical Current

Links

Landscapes

  • Selective Calling Equipment (AREA)
  • Testing Electric Properties And Detecting Electric Faults (AREA)
  • Small-Scale Networks (AREA)

Abstract

PURPOSE: To allow a slave equipment with a lower priority than a slave equipment whose reply is disabled to send its own reply message without collision with other message even when any slave equipment among plural slave equipments is disable of its reply. CONSTITUTION: When a fault diagnostic tester 5 sends a connection confirmation request message, controllers 2, 1, 6, 7 send a reply message sequentially. When the controller 6 is in reply disable state, the fault diagnostic tester 5 sends the same message as the reply message that is to be sent substantially by the controller 6 in a time P2X after the end of reception of the reply message from the controller 1 as dummy data. Thus, the controller 7 sends its own reply message after the dummy data.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、複数のスレーブ装置
(例えばエンジン制御装置、トランスミッション制御装
置のような電子制御装置)と、これに外部接続されるマ
スタ装置(例えばテスタのような外部装置)との間で1
対nデータ通信を行う通信システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a plurality of slave devices (for example, electronic control devices such as an engine control device and a transmission control device) and a master device externally connected thereto (for example, an external device such as a tester). Between and 1
The present invention relates to a communication system for performing data communication with respect to n.

【0002】[0002]

【従来の技術】近年の車両のエレクトロニクス化は目ざ
ましく、エンジンやトランスミッションをはじめとする
車両各部の車載機器が、マイクロコンピュータによって
高度に電子制御化されている。このため、これら車載機
器の制御性は飛躍的に高められるに至っているが、その
反面、これら車載機器の故障診断はますます複雑なもの
になってきている。
2. Description of the Related Art In recent years, the electronics of vehicles has been remarkably changed, and in-vehicle devices such as an engine and a transmission are highly electronically controlled by a microcomputer. For this reason, the controllability of these in-vehicle devices has been dramatically improved, but on the other hand, the failure diagnosis of these in-vehicle devices has become more and more complicated.

【0003】このため多くの車載電子制御装置には自己
診断機能が付加されて、その対象とする車載機器を制御
するとともに、車載機器や制御装置自らの故障診断をも
行うように改良されたり、あるいは、(イ)これら車載
電子制御装置をスレーブ装置とし、このスレーブ装置
を、故障診断テスタと称されるマスタ装置としての外部
装置に共通接続し、この故障診断テスタによる支援のも
とに、より高度な故障診断や診断データの解析を行う、
(ロ)これら車載電子制御装置間で、1つをマスタ、他
をスレーブとする通信路を形成し、このマスタとなる電
子制御装置を通じて、他の全ての電子制御装置の故障診
断等を集中して行う、等のシステムとして改良される
等、ますます複雑になりつつある車両システムの診断に
対処するための様々な工夫が講じられている。
For this reason, many on-vehicle electronic control units have a self-diagnosis function added thereto, which is improved so as to control the in-vehicle device as a target thereof and also perform a failure diagnosis of the in-vehicle device or the control unit itself. Alternatively, (a) these on-vehicle electronic control devices are used as slave devices, and this slave device is commonly connected to an external device as a master device called a failure diagnosis tester, and with the assistance of this failure diagnosis tester, Performs advanced failure diagnosis and analysis of diagnostic data,
(B) A communication path is formed between these vehicle-mounted electronic control devices, one of which serves as a master and the other serves as a slave, and failure diagnosis of all other electronic control devices is centralized through this master electronic control device. Various measures have been taken to deal with the diagnosis of vehicle systems, which are becoming more and more complicated, for example, by improving the system.

【0004】ところで、上記(イ)のような、故障診断
テスタを用いて車両システムの診断を行う場合、故障診
断テスタと車載電子制御装置との間における通信手順と
して、一般的に国際規格ISO−9141−2で規定さ
れた通信手順を用いる場合が多い。この国際規格におけ
る通信手順を図11を用いて説明すると、 (1)故障診断テスタが第1〜第n電子制御装置に対
し、診断要求メッセージRM1を送信する。 (2)優先順位の最も高い第1電子制御装置が、この診
断要求メッセージRM1に対する応答の準備を開始す
る。 (3)第1電子制御装置が故障診断テスタに対し、要求
メッセージRM1に対する応答メッセージAM11を送
信する。 (4)次に優先順位の高い第2電子制御装置は、上記第
1電子制御装置の応答を確実に完了させるために、一旦
同期が外され、同要求メッセージRM1に対する自分の
応答の準備を開始する。 (5)第2電子制御装置が故障診断テスタに対し、要求
メッセージRM1に対する応答メッセージAM12を送
信する。 (6)これら(2)と(3)、および(4)と(5)の
処理が、優先順位の最も低い第n電子制御装置まで順次
繰り返される。 (7)その後、故障診断テスタは、上記各電子制御装置
の応答を確実に完了させるために、一旦同期が外され、
次の診断要求メッセージRM2のための準備を開始す
る。 (8)故障診断テスタが第1〜第n電子制御装置に対
し、同要求メッセージRM2を送信する。 といった態様でデータの授受が繰り返される。
By the way, in the case of diagnosing a vehicle system using the failure diagnosis tester as described in (a) above, generally, the international standard ISO-is used as a communication procedure between the failure diagnosis tester and the on-vehicle electronic control unit. In many cases, the communication procedure defined by 9141-2 is used. The communication procedure in this international standard will be described with reference to FIG. 11. (1) The failure diagnosis tester transmits a diagnosis request message RM1 to the first to nth electronic control units. (2) The first electronic control unit with the highest priority starts preparing for a response to this diagnosis request message RM1. (3) The first electronic control unit sends a response message AM11 to the request message RM1 to the failure diagnosis tester. (4) The second electronic control unit having the next highest priority is temporarily desynchronized and starts preparing its own response to the request message RM1 in order to surely complete the response of the first electronic control unit. To do. (5) The second electronic control unit sends a response message AM12 to the request message RM1 to the failure diagnosis tester. (6) The processes (2) and (3) and (4) and (5) are sequentially repeated until the n-th electronic control unit having the lowest priority. (7) After that, the failure diagnosis tester is once out of synchronization in order to surely complete the response of each of the electronic control devices,
Start preparation for the next diagnostic request message RM2. (8) The failure diagnosis tester transmits the request message RM2 to the first to nth electronic control units. The exchange of data is repeated in this manner.

【0005】このように通常は、スレーブ装置である第
1〜第n電子制御装置に対して優先順位を持たせ、これ
ら各電子制御装置が自分の応答メッセージを送信する順
番を決めておく。例えば上記第2電子制御装置は、自分
よりも優先順位の高い第1電子制御装置からの応答メッ
セージの送信完了を確認して初めて、自分の応答メッセ
ージを送信する。
As described above, normally, the first to nth electronic control units, which are slave units, are given priority, and the order in which each of these electronic control units transmits its own response message is determined. For example, the second electronic control unit transmits its own response message only after confirming the completion of transmission of the response message from the first electronic control unit having a higher priority than the second electronic control unit.

【0006】このような調停が行われることによって、
これら応答メッセージが上記通信路上で衝突しないよう
にし、ひいてはデータが破壊されるといった事態も回避
できるようにしている。また、上記メッセージを構成す
る各データバイトのビットフォーマットには、例えば図
12に示されるような8ビットからなるNRZ(ノンリ
ターンゼロ)方式が採用されている。そして、その先頭
に論理L(ロー)レベルのスタートビットが、またその
末尾に論理H(ハイ)レベルのストップビットがそれぞ
れ付加されて、これらデータバイトの存在が認識される
ようになっている。
By performing such arbitration,
These response messages are prevented from colliding with each other on the above-mentioned communication path, and eventually the situation where data is destroyed can be avoided. Further, as the bit format of each data byte forming the above message, for example, an NRZ (non-return zero) system consisting of 8 bits as shown in FIG. 12 is adopted. Then, a logical L (low) level start bit is added to the beginning thereof, and a logical H (high) level stop bit is added to the end thereof so that the existence of these data bytes can be recognized.

【0007】なお、上記国際規格によれば、1つの電子
制御装置からの応答メッセージを構成するデータバイト
のうち、あるバイトのストップビットが完了してから次
のバイトのスタートビットの先端が来るまでの時間を、
図11に示される時間P1(0〜20ms)と規定して
いる。従って、あるバイトのストップビットが完了して
から20ms以内には、次のバイトのスタートビットの
先端が来ることになる。
According to the above international standard, of the data bytes constituting the response message from one electronic control unit, after the stop bit of a certain byte is completed until the start bit of the next byte comes. The time of
It is defined as time P1 (0 to 20 ms) shown in FIG. Therefore, the end of the start bit of the next byte comes within 20 ms after the stop bit of a certain byte is completed.

【0008】また上記国際規格によれば、あるメッセー
ジの最後に付加されるチェックサムバイト(以下、CS
という)のストップビットが完了し、次のメッセージの
スタートビットの先端が来るまでの時間を、図11に示
される時間P2(0〜50msまたは25〜50ms、
P2>P1)と規定している。従って、ある電子制御装
置からの応答メッセージのCSのストップビットが完了
してから50ms以内には、次のメッセージのスタート
ビットの先端が来ることになる。
According to the above international standard, a checksum byte (hereinafter referred to as CS) added to the end of a message.
The time until the end of the start bit of the next message comes after the stop bit of () is completed, and the time P2 (0 to 50 ms or 25 to 50 ms) shown in FIG.
P2> P1). Therefore, the end of the start bit of the next message comes within 50 ms after the CS stop bit of the response message from a certain electronic control unit is completed.

【0009】[0009]

【発明が解決しようとする課題】ところで、上記のよう
にそれぞれの電子制御装置に優先順位を持たせ、優先順
位の高い電子制御装置から順に、自分の応答メッセージ
を送信するようにした通信システムにおいては、以下の
ような問題が発生することがある。例えば、第1→第2
→…→第nの順で優先順位が設定された第1〜第n電子
制御装置のうち、例えば第2電子制御装置が、オプショ
ンで接続されていなかったりあるいは第2電子制御自体
が故障している等で、自分の応答メッセージを送信でき
ない状態(以下、応答不可能な状態という)の場合につ
いて説明する。
By the way, in a communication system in which each electronic control unit is given a priority as described above, and its own response message is transmitted in order from the electronic control unit having a higher priority. May cause the following problems. For example, first → second
→ ... → Among the first to nth electronic control units whose priorities are set in the order of the nth, for example, the second electronic control unit is not connected as an option, or the second electronic control itself has failed. The case where the user cannot send his / her own response message (hereinafter referred to as the unresponsive state) will be described.

【0010】上記第2電子制御装置よりも優先順位の低
い第3電子制御装置は、自分よりも1つ優先順位の高い
第2電子制御装置が応答メッセージの送信を完了し、そ
の後の経過時間がP2となったことを確認してから、初
めて自分の応答メッセージを送信するように構成されて
いる。従って、上のように、第2電子制御装置が応答不
可能な状態のときは、第3電子制御装置はいつまでたっ
ても自分の応答メッセージを送信できないといった問題
が発生する。
In the third electronic control unit having a lower priority than the second electronic control unit, the second electronic control unit having a higher priority than itself completes the transmission of the response message, and the elapsed time after that. After confirming that it becomes P2, it is configured to send its own response message for the first time. Therefore, as described above, when the second electronic control unit cannot respond, the third electronic control unit cannot transmit its own response message.

【0011】そこでこのような問題に対する従来技術と
して、図13に示すように、故障診断テスタからの要求
メッセージの送信完了から、各電子制御装置についてそ
れぞれ決められた時間(図13のt1〜t3に相当)後
に、自分の応答メッセージを強制的に送信するように構
成したものがある。ところが、メッセージとして一度に
送ることのできる最大データ数は、米国自動車技術会
(SAE)のE/E故障診断テストモード推奨手順J1
979によって、図14に示すように、ヘッダバイトの
3バイト、データバイトの7バイト(♯1〜♯7)、お
よびチェックサムバイト(以下、CSという)の1バイ
トの合計11バイトに制限されている。
As a conventional technique for solving such a problem, as shown in FIG. 13, after the completion of the transmission of the request message from the failure diagnostic tester, a predetermined time (t1 to t3 in FIG. 13) for each electronic control unit is determined. Correspondingly) later, some have been configured to force the sending of their own response message. However, the maximum number of data that can be sent at one time as a message is the recommended procedure J1 for E / E failure diagnosis test mode of the American Society of Automotive Engineers (SAE)
As shown in FIG. 14, by 979, the header byte is limited to 3 bytes, the data byte is limited to 7 bytes (# 1 to # 7), and the checksum byte (hereinafter referred to as CS) is limited to 11 bytes in total. There is.

【0012】そのため、応答メッセージとして送信しな
ければならないデータが10バイト(CSを含めると1
1バイト)を超えるときは、応答メッセージを複数に分
けて送信しなければならない。従って、例えば第1電子
制御装置が送信すべきデータが10バイトを超えている
場合には、第1電子制御装置は2つの応答メッセージを
送信するわけだが、第2電子制御装置は、上記のよう
に、要求メッセージの送信完了から時間t2後に応答メ
ッセージを強制的に送信してしまうので、図15に示す
ように、第1電子制御装置からの第2応答メッセージと
第2電子制御装置からの応答メッセージとが互いに衝突
してしまう。
Therefore, the data that must be sent as a response message is 10 bytes (1 including CS).
If it exceeds 1 byte, the response message must be divided into multiple parts and sent. Therefore, for example, when the data to be transmitted by the first electronic control unit exceeds 10 bytes, the first electronic control unit transmits two response messages, but the second electronic control unit is as described above. In addition, since the response message is forcibly transmitted after the time t2 from the completion of the transmission of the request message, the second response message from the first electronic control unit and the response from the second electronic control unit are transmitted as shown in FIG. The message and each other collide.

【0013】また、以上説明した問題は、上記(ロ)の
ような通信システムについても同様に発生する。そこで
本発明は上記問題に鑑み、マスタ装置が要求メッセージ
を通信路上に送信し、それに対して優先順位の高いスレ
ーブ装置から順に、自分の応答メッセージを通信路上に
送信するように構成された通信システムにおいて、上記
複数のスレーブ装置のうちのいずれかが、接続が外され
ていたりあるいは故障している等の原因で応答不可能な
状態であっても、この応答不可能な状態のスレーブ装置
よりも優先順位の低いスレーブ装置が、自分の応答メッ
セージを、他のメッセージと衝突することなく送信でき
るようにすることを目的とする。
The problem described above also occurs in the communication system as described in (b) above. Therefore, in view of the above problems, the present invention is a communication system configured such that a master device transmits a request message on a communication channel, and slave devices having higher priorities to the request message transmit their response messages on the communication channel in order. In the above, even if one of the plurality of slave devices is in the unresponsive state due to a disconnection or a failure, the slave device in the unresponsive state is The purpose is to enable a low priority slave device to send its response message without colliding with other messages.

【0014】[0014]

【課題を解決するための手段】上記目的を達成するた
め、請求項1記載の発明では、マスタ装置(5)と複数
のスレーブ装置(2、1、6、7)とが通信路(3)を
介して接続され、前記マスタ装置(5)は、所定の処理
の実行を要求する要求メッセージを前記通信路(3)上
に送信し、前記複数のスレーブ装置(2、1、6、7)
は、前記通信路(3)からの前記要求メッセージを受信
したら、自分の識別値を組み込んだ応答メッセージを、
優先順位の高いスレーブ装置から順に前記通信路(3)
上に送信する通信システムにおいて、前記マスタ装置
(5)は、前記複数のスレーブ装置(2、1、6、7)
のうちのどれが、前記応答メッセージを送信できる状態
であるかを確認するための確認メッセージを前記通信路
(3)上に送信する確認メッセージ送信手段(ステップ
204)を備え、前記スレーブ装置(2、1、6、7)
は、前記確認メッセージを前記通信路(3)を介して受
信したら、自分の識別値を組み込んだ前記応答メッセー
ジを前記通信路(3)上に送信するように構成され、さ
らに前記マスタ装置(5)は、応答可能な状態の前記ス
レーブ装置(2、1、7)からの、前記確認メッセージ
に対する応答メッセージを、前記通信路(3)を介して
受信したとき、この応答メッセージに組み込まれた前記
識別値を記憶する識別値記憶手段と、応答不可能な状態
の前記スレーブ装置(6)からの前記応答メッセージを
受信待ち中か否かを判定する判定手段(ステップ21
1)と、この判定手段(ステップ211)によって前記
受信待ち中であると判定されたとき、前記識別値記憶手
段に記憶された識別値よりも、1つ優先順位の高い識別
値を組み込んだダミーメッセージを、前記通信路(3)
上に送信するダミーメッセージ送信手段(ステップ21
5)とを備える通信システムを特徴とする。
In order to achieve the above object, in the invention according to claim 1, a master device (5) and a plurality of slave devices (2, 1, 6, 7) are connected to a communication path (3). The master device (5) transmits a request message requesting execution of a predetermined process on the communication path (3), and the master device (5) is connected via the plurality of slave devices (2, 1, 6, 7).
When receiving the request message from the communication path (3), a response message incorporating its own identification value,
The communication path (3) in order from the slave device with the highest priority
In the communication system transmitting above, the master device (5) includes the plurality of slave devices (2, 1, 6, 7).
The slave device (2) is provided with a confirmation message transmitting means (step 204) for transmitting a confirmation message for confirming which one of them is in a state capable of transmitting the response message on the communication path (3). 1, 6, 7)
Is configured to, upon receiving the confirmation message via the communication path (3), transmit the response message incorporating its own identification value onto the communication path (3), and further, the master device (5). ), When receiving a response message to the confirmation message from the slave device (2, 1, 7) in a responsive state via the communication path (3), the response message incorporated in the response message. Identification value storage means for storing an identification value, and determination means for determining whether or not the response message from the slave device (6) in the unresponsive state is waiting to be received (step 21).
1) and a dummy in which an identification value having a higher priority than the identification value stored in the identification value storage means is incorporated when the determination means (step 211) determines that the reception is waiting. Send the message to the communication channel (3)
Dummy message transmitting means to be transmitted above (step 21
5) is included in the communication system.

【0015】また請求項2記載の発明では、請求項1記
載の通信システムにおいて、前記応答可能な状態の前記
スレーブ装置(2、1、7)からの、前記確認メッセー
ジに対する応答メッセージを、前記通信路(3)を介し
て受信したとき、この応答メッセージに組み込まれた前
記識別値を前記識別値記憶手段に記憶させる手段(ステ
ップ113)を備えることを特徴とする。
Further, in the invention according to claim 2, in the communication system according to claim 1, the response message to the confirmation message from the slave device (2, 1, 7) in the responsive state is transmitted to the communication device. It is characterized by comprising means (step 113) for storing the identification value incorporated in the response message in the identification value storage means when received via the path (3).

【0016】また請求項3記載の発明では、請求項1ま
たは2記載の通信システムにおいて、前記判定手段(ス
テップ211)は、前記通信路(3)が空いた時間が所
定時間以上か否かを判定する通信路(3)空き時間判定
手段(ステップ211)で構成されたことを特徴とす
る。
Further, in the invention described in claim 3, in the communication system according to claim 1 or 2, the determination means (step 211) determines whether or not the idle time of the communication path (3) is a predetermined time or more. The communication channel (3) for judging is configured by a free time judging means (step 211).

【0017】なお、請求項1記載の発明でいう応答可能
な状態とは、自分の応答メッセージを通信路上に送信で
きる状態のことをいう。また応答不可能な状態とは、自
分の応答メッセージを通信路上に送信できない状態のこ
とをいう。また、上記各手段の括弧内の符号は、後述す
る実施例の具体的手段との対応関係を示すものである。
The response-enabled state in the first aspect of the invention means a state in which the response message of the user can be transmitted on the communication path. The unresponsive state means a state in which the user's response message cannot be transmitted on the communication path. Further, the reference numerals in the parentheses of the above-mentioned means indicate the correspondence with the concrete means of the embodiments described later.

【0018】[0018]

【発明の作用効果】請求項1ないし3記載の発明によれ
ば、マスタ装置が通信路上に確認メッセージを送信する
と、各スレーブ装置のうちの応答可能な状態のスレーブ
装置が、この確認メッセージをそれぞれ受信する。そし
て、応答可能な状態のスレーブ装置のうちの優先順位の
高いものから順に、自分の識別値を組み込んだ応答メッ
セージを通信路上に送信する。
According to the invention described in claims 1 to 3, when the master device transmits a confirmation message on the communication path, the slave device in a responsive state among the slave devices respectively transmits the confirmation message. To receive. Then, the slave device in the response-ready state is transmitted in order from the highest priority device on the communication path, the response message incorporating its own identification value.

【0019】そしてマスタ装置は、これら応答可能な状
態のスレーブ装置からの応答メッセージを順次受信した
ら、その都度、この応答メッセージに組み込まれた識別
値を識別値記憶手段に記憶する。そしてさらに、応答不
可能な状態のスレーブ装置からの応答メッセージを受信
待ち中であれば、判定手段によってその旨が判定され、
そのときには、ダミーメッセージ送信手段が、識別値記
憶手段に記憶された識別値よりも1つ優先順位の高い識
別値を組み込んだダミーメッセージを、通信路上に送信
する。
When the master device sequentially receives the response messages from the slave devices in the responsive state, the master device stores the identification value incorporated in the response message in the identification value storage means each time. Further, if a response message from the slave device in the unresponsive state is waiting to be received, the determination means determines that,
At that time, the dummy message transmitting means transmits a dummy message incorporating an identification value having a higher priority than the identification value stored in the identification value storage means onto the communication path.

【0020】例えば、スレーブ装置が4つあり、そのう
ちの最も優先順位の高いスレーブ装置(以下、第1スレ
ーブ装置という)、2番目に優先順位の高いスレーブ装
置(以下、第2スレーブ装置という)、および4番目に
優先順位の高いスレーブ装置(以下、第4スレーブ装置
という)が応答可能な状態で、3番目に優先順位の高い
スレーブ装置(以下、第3スレーブ装置という)が応答
不可能な状態であるとする。
For example, there are four slave devices, of which the highest priority slave device (hereinafter referred to as the first slave device), the second highest priority slave device (hereinafter referred to as the second slave device), And a state in which the slave device having the fourth highest priority (hereinafter, referred to as the fourth slave device) can respond, and the slave device having the third highest priority (hereinafter, referred to as the third slave device) cannot respond. Suppose

【0021】この場合、マスタ装置はまず第1スレーブ
装置からの応答メッセージを受信し、この応答メッセー
ジに組み込まれた第1スレーブ装置の識別値を識別値記
憶手段に記憶する。そして、次に優先順位の高い第2ス
レーブ装置は応答可能な状態であるので、判定手段では
前記受信待ち中とは判定されず、その結果、ダミーメッ
セージ送信手段によってダミーメッセージは送信されな
い。
In this case, the master device first receives the response message from the first slave device and stores the identification value of the first slave device incorporated in the response message in the identification value storage means. Then, since the second slave device having the next highest priority is ready to respond, the determination means does not determine that the reception is waiting, and as a result, the dummy message transmission means does not transmit the dummy message.

【0022】そして、マスタ装置は第2スレーブ装置か
らの応答メッセージを受信し、この応答メッセージに組
み込まれた第2スレーブ装置の識別値を識別値記憶手段
に記憶する。ここで、次に優先順位の高い第3スレーブ
装置は応答不可能な状態であるので、判定手段によって
前記応答待ち中であると判定され、その結果、ダミーメ
ッセージ送信手段によってダミーメッセージが送信され
る。
Then, the master device receives the response message from the second slave device and stores the identification value of the second slave device incorporated in the response message in the identification value storage means. Here, since the third slave device having the next highest priority is in a state in which it cannot respond, the determination means determines that it is waiting for the response, and as a result, the dummy message transmission means transmits the dummy message. .

【0023】このときダミーメッセージには、識別値記
憶手段に記憶された識別値よりも1つ優先順位の高い識
別値を組み込む。この場合には、識別値記憶手段には第
2スレーブ装置の識別値が記憶されているので、これよ
りも1つ優先順位の高い第3スレーブ装置の識別値が組
み込まれる。すわなちこのダミーメッセージは、第3ス
レーブ装置が送信すべき応答メッセージと同じメッセー
ジとなる。
At this time, an identification value having a higher priority than the identification value stored in the identification value storage means is incorporated in the dummy message. In this case, since the identification value storage means stores the identification value of the second slave device, the identification value of the third slave device having a higher priority than this is incorporated. That is, this dummy message is the same message as the response message to be transmitted by the third slave device.

【0024】従って第4スレーブ装置は、このダミーを
受信したときに、第3スレーブ装置からの応答メッセー
ジを受信したと判断し、これによって次が自分の応答メ
ッセージを送信する順番であるとして、自分の応答メッ
セージを送信する。このように本発明では、複数のスレ
ーブ装置のうちのいずれかが応答不可能な状態であって
も、マスタ装置がその応答不可能な状態のスレーブ装置
に代わってダミーメッセージを送信するので、この応答
不可能な状態のスレーブ装置よりも優先順位の低いスレ
ーブ装置は、自分の応答メッセージを、他のメッセージ
と通信路上で衝突させることなく送信することができ
る。
Therefore, when the fourth slave device receives this dummy, it determines that it has received the response message from the third slave device, and this determines that the next is the order for transmitting its own response message. Send the response message. As described above, in the present invention, even if one of the plurality of slave devices is in the unresponsive state, the master device transmits the dummy message in place of the slave device in the unresponsive state. The slave device having a lower priority than the slave device in the unresponsive state can transmit its own response message without colliding with other messages on the communication path.

【0025】特に請求項3記載の発明では、前記判定手
段を、通信路が空いた時間が所定時間以上か否かを判定
する通信路空き時間判定手段で構成している。この場
合、この所定時間を、応答可能な状態のスレーブ装置が
自分の応答メッセージを送信するのに必要な前記空き待
ち時間よりも長めの時間に設定すれば、前記受信待ち中
か否かを判定することができる。
Particularly, in the invention according to claim 3, the judging means is constituted by a communication path idle time judging means for judging whether or not the time when the communication path is idle is a predetermined time or more. In this case, if this predetermined time is set to a time longer than the idle waiting time required for the slave device in the ready state to send its response message, it is determined whether or not the reception is waiting. can do.

【0026】[0026]

【実施例】次に、本発明を車両診断システムに適用した
一実施例について、図1ないし図9に基づいて説明す
る。本実施例のシステムは、図1に示すように、車両に
搭載されるスレーブ装置としての複数の電子制御装置
(エンジン制御装置1、トランスミッション制御装置
2、エアコン制御装置6、トラクション制御装置7等)
と、外部接続されるマスタ装置としての故障診断テスタ
5とが、1本の通信線3および接続手段4(ダイアグコ
ネクタ)を介して接続され、これら故障診断テスタ5と
各電子制御装置との間で1対nのデータ通信が実行され
る。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, an embodiment in which the present invention is applied to a vehicle diagnosis system will be described with reference to FIGS. As shown in FIG. 1, the system of this embodiment includes a plurality of electronic control devices (engine control device 1, transmission control device 2, air conditioner control device 6, traction control device 7, etc.) as slave devices mounted on a vehicle.
And a failure diagnosis tester 5 as a master device that is externally connected are connected via one communication line 3 and a connecting means 4 (diag connector), and between the failure diagnosis tester 5 and each electronic control device. The 1-to-n data communication is executed.

【0027】また、上記各電子制御装置には、上記1対
nのデータ通信を行う際の優先順位が予め決められてお
り、故障診断テスタ5が要求メッセージ(後述する)を
各電子制御装置に対して送信したときに、優先順位の高
い電子制御装置から順に、自分の応答メッセージ(後述
する)を送信するように構成されている。なお、本実施
例では、トランスミッション制御装置2→エンジン制御
装置1→エアコン制御装置6→トラクション制御装置7
の順で優先順位が設定されている。
Further, each electronic control unit has a predetermined order of priority when performing the one-to-n data communication, and the failure diagnosis tester 5 sends a request message (described later) to each electronic control unit. When transmitted to the electronic control device, it is configured to transmit its own response message (described later) in order from the electronic control device having the highest priority. In this embodiment, the transmission control device 2 → the engine control device 1 → the air conditioner control device 6 → the traction control device 7
Priority is set in the order of.

【0028】また、これら接続される故障診断テスタ5
と上記各車載電子制御装置との間では、その通信方式と
して上記国際規格(ISO−9141−2)に準拠した
プロトコルが用いられるものとする。以下、これら各要
素の詳細について説明する。ここでは、車載電子制御装
置の一例としてエンジン制御装置1を代表としてその構
成および機能を説明する。
Further, the failure diagnosis tester 5 connected to these
It is assumed that a protocol conforming to the above international standard (ISO-9141-2) is used as a communication system between each of the above-mentioned vehicle-mounted electronic control devices. The details of each of these elements will be described below. Here, the configuration and function of the engine control device 1 will be described as an example of the on-vehicle electronic control device.

【0029】エンジン制御装置1は、CPU11、RO
M12、RAM13、入力回路14、出力回路15、A
D変換回路(以下ADC回路という)16、および通信
回路17等をそれぞれ有して構成されている。ここで通
信回路17は、通信線3をドライブする入出力バッファ
回路である。また入力回路14には、エンジン回転数を
検出するセンサ(具体的にはクランク角センサ)21や
車速センサ22等のセンサから出力される、主にパルス
信号からなるセンサ信号が入力され、ADC回路16に
は、スロットルセンサ23、エアフローメータ24、水
温センサ25、O2 センサ26等、車両各部に設けられ
たセンサから出力されるアナログ信号からなるセンサ信
号が入力される。
The engine control unit 1 includes a CPU 11 and RO
M12, RAM13, input circuit 14, output circuit 15, A
The D conversion circuit (hereinafter referred to as an ADC circuit) 16 and the communication circuit 17 are provided. Here, the communication circuit 17 is an input / output buffer circuit that drives the communication line 3. The input circuit 14 receives a sensor signal, which is mainly a pulse signal, which is output from a sensor (specifically, a crank angle sensor) 21 that detects the engine speed, a vehicle speed sensor 22, and the like, and the ADC circuit A sensor signal, which is an analog signal output from a sensor provided in each part of the vehicle, such as a throttle sensor 23, an air flow meter 24, a water temperature sensor 25, an O2 sensor 26, etc., is input to the sensor 16.

【0030】これらの信号はいずれも、それら検出値に
対応したセンサデータとしてRAM13のデータ領域に
格納され、CPU11による燃料噴射量や点火時期の演
算のための演算値として利用される。なおRAM13に
は、上記データ領域の他に、後述する各カウンタ、各バ
ッファ、各フラグ、RCVECU、および接続ECUメ
モリ等の登録領域がそれぞれ形成されている。
All of these signals are stored in the data area of the RAM 13 as sensor data corresponding to the detected values, and are used as calculation values for the CPU 11 to calculate the fuel injection amount and the ignition timing. In addition to the above-mentioned data area, the RAM 13 is provided with registration areas such as counters, buffers, flags, RCVECU, and connection ECU memory, which will be described later.

【0031】またCPU11は、ROM12に予め格納
されている制御プログラムに従い、RAM13に取り込
まれたセンサデータに基づく所定の演算を実行して、そ
の都度の燃料噴射量や点火時期を求めるとともに、故障
診断テスタ5との間で後述する通信メッセージの授受、
およびそのメッセージを通じて指定された診断処理を実
行する部分である。
Further, the CPU 11 executes a predetermined calculation based on the sensor data loaded into the RAM 13 in accordance with a control program stored in advance in the ROM 12 to obtain the fuel injection amount and the ignition timing at each time, and the failure diagnosis. Sending and receiving communication messages to be described later with the tester 5,
And a part for executing a diagnostic process designated through the message.

【0032】なお、ROM12に格納された上記制御プ
ログラムには、RAM13内の上記各カウンタをソフト
ウェア的にカウント処理するカウンタプログラムが含ま
れる。なお、このCPU11を通じて求められた燃料噴
射量は出力回路15に与えられ、この出力回路15を通
じて、上記求められた燃料噴射量に対応する信号がエン
ジン制御手段27に出力される。エンジン制御手段27
としては例えば燃料噴射弁がある。
The control program stored in the ROM 12 includes a counter program that counts each counter in the RAM 13 by software. The fuel injection amount obtained through the CPU 11 is given to the output circuit 15, and a signal corresponding to the obtained fuel injection amount is outputted through the output circuit 15 to the engine control means 27. Engine control means 27
For example, there is a fuel injection valve.

【0033】一方、故障診断テスタ5も、上記電子制御
装置と同じくCPU、ROM、RAM、通信回路等を備
えた構成である。そして、故障診断テスタ5の外側表面
には操作手段5a(具体的にはキーボード)が設けられ
ており、この操作手段5aで設定された診断モードに応
じた要求メッセージ(後述する)が、ダイアグコネクタ
4を介して各電子制御装置に送信される。
On the other hand, the failure diagnosis tester 5 is also provided with a CPU, a ROM, a RAM, a communication circuit and the like like the electronic control unit. An operating means 5a (specifically, a keyboard) is provided on the outer surface of the failure diagnosis tester 5, and a request message (described later) according to the diagnostic mode set by the operating means 5a is displayed on the diagnostic connector. 4 to each electronic control unit.

【0034】なお、故障診断テスタ5では、上記要求メ
ッセージに対する応答メッセージ(後述する)の内容
を、図示しない表示器に一覧表示したりグラフ表示した
りすることによって、診断結果を診断者に知らせること
ができる。またダイアグコネクタ4には、イグニッショ
ンスイッチ18を経て、バッテリー19より電源が供給
されており、故障診断テスタ5がこうして車載電子制御
装置と電気的に接続されるとき、このダイアグコネクタ
4を介して故障診断テスタ5にも電源が供給されるよう
になっている。
The fault diagnostic tester 5 notifies the diagnostician of the diagnostic result by displaying a list or a graph of the contents of the response message (described later) to the request message on a display device (not shown). You can Further, the diagnostic connector 4 is supplied with power from the battery 19 via the ignition switch 18, and when the fault diagnosis tester 5 is thus electrically connected to the vehicle-mounted electronic control unit, the diagnostic connector 4 fails through the diagnostic connector 4. Power is also supplied to the diagnostic tester 5.

【0035】ところで故障診断テスタ5をダイアグコネ
クタ4に接続し、このテスタ5に電源が供給されたら、
テスタ5は、通信線3上に接続確認要求メッセージを送
信する。なお、この接続確認要求メッセージとは、どの
制御装置が自分の応答メッセージを通信線3上に送信で
きる状態(以下、応答可能な状態という)であるかを診
断するためのメッセージである。
By the way, when the failure diagnosis tester 5 is connected to the diagnostic connector 4 and power is supplied to the tester 5,
The tester 5 transmits a connection confirmation request message on the communication line 3. The connection confirmation request message is a message for diagnosing which control device is in a state capable of transmitting its own response message on the communication line 3 (hereinafter, referred to as a respondable state).

【0036】そして各制御装置は、故障診断テスタ5か
らの上記接続確認要求メッセージを受信したら、この接
続確認要求メッセージに対する応答メッセージを、通信
回路17を介して通信線3上に送信する。ここで図2
(a)を用いて、各制御装置2、1、6、7が全て応答
可能な状態のときの、故障診断テスタ5からの接続確認
要求メッセージと、これに対する各制御装置の応答メッ
セージとのやりとり(以下、接続確認処理という)の時
間的流れについて説明する。なお、以下説明する各メッ
セージを構成する各バイトのビットフォーマット、およ
びメッセージのフレーム構成は、上述した図12、14
に示される方式を採用している。
Upon receiving the connection confirmation request message from the failure diagnosis tester 5, each control device transmits a response message to the connection confirmation request message to the communication line 3 via the communication circuit 17. Figure 2 here
Using (a), the communication between the connection confirmation request message from the failure diagnosis tester 5 and the response message of each control device to this when the control devices 2, 1, 6, and 7 are all ready to respond. A temporal flow of (hereinafter referred to as connection confirmation processing) will be described. The bit format of each byte forming each message described below and the frame structure of the message are the same as those shown in FIGS.
The method shown in is adopted.

【0037】まず、故障診断テスタ5をダイアグコネク
タ4に接続すると、このテスタ5が接続確認要求メッセ
ージを送信する。なお、この接続確認要求メッセージの
ヘッダ3バイトには、図2(a)に示すように、 ・「このメッセージが要求メッセージであること($6
8)」、 ・「このメッセージの送信先がトランスミッション制御
装置2(あるいはエンジン制御装置1、エアコン制御装
置6、トラクション制御装置7)であること($6
A)」、 ・「このメッセージの送信元が故障診断テスタ5である
こと($F1)」、が組み込まれる。
First, when the failure diagnosis tester 5 is connected to the diagnostic connector 4, the tester 5 sends a connection confirmation request message. As shown in FIG. 2A, the header 3 bytes of this connection confirmation request message are as follows: "This message is a request message ($ 6
8) "," The destination of this message is the transmission control device 2 (or engine control device 1, air conditioner control device 6, traction control device 7) ($ 6
A) ",-" The sender of this message is the failure diagnosis tester 5 ($ F1) "is incorporated.

【0038】また、その次のデータバイトには、 ・「各制御装置の接続確認を要求するモード表示($1
1)」が組み込まれ、最後にCSが付加される。 一方、各制御装置は、この接続確認要求メッセージを受
信したら、自分の応答メッセージを次の手順で送信す
る。
Further, the next data byte is as follows: "Mode display requesting confirmation of connection of each control device ($ 1
1) ”is incorporated and CS is added at the end. On the other hand, each control device, upon receiving this connection confirmation request message, transmits its own response message in the following procedure.

【0039】まず、最も優先順位の高いトランスミッシ
ョン制御装置2が最初に、上記接続確認要求メッセージ
の送信完了から上記時間P2(本実施例では20ms)
後に、自分の応答メッセージの送信を開始する。その応
答メッセージのヘッダバイト3バイトには、 ・「このメッセージが応答メッセージであること($4
8)」、 ・「このメッセージの送信先が故障診断テスタ5である
こと($6B)」、 ・「このメッセージの送信元がトランスミッション制御
装置2であること($01)」が組み込まれる。
First, the transmission control device 2 having the highest priority first receives the time P2 (20 ms in this embodiment) from the completion of the transmission of the connection confirmation request message.
Later, he starts sending his reply message. The header byte 3 bytes of the response message include: "This message is a response message ($ 4
8) "," The destination of this message is the fault diagnosis tester 5 ($ 6B) ", and" The source of this message is the transmission control device 2 ($ 01) "is incorporated.

【0040】なお、上記3バイト目に組み込まれた「$
01」が、トランスミッション制御装置2の後述する識
別値である。また、その次のデータバイトには、 ・「制御装置の接続確認を送信するモード表示($5
1)」が組み込まれ、最後にCSが付加される。
It should be noted that the "$
“01” is an identification value of the transmission control device 2 described later. In addition, the next data byte is as follows: "Mode display for sending confirmation of controller connection ($ 5
1) ”is incorporated and CS is added at the end.

【0041】ここで、トランスミッション制御装置2か
らの上記応答メッセージが1フレーム内に納まる5バイ
ト長であるため、この応答メッセージの送信完了から上
記時間P2後に、エンジン制御装置1が自分の応答メッ
セージの送信を開始する。なお、この応答メッセージの
3バイト目には、図示はしないが、 ・「このメッセージの送信元がエンジン制御装置1であ
ること($02)」が組み込まれる。
Since the response message from the transmission control device 2 has a length of 5 bytes which can be accommodated in one frame, the engine control device 1 sends the response message of its own after the time P2 from the completion of the transmission of the response message. Start sending. Although not shown, "the sender of this message is the engine control device 1 ($ 02)" is incorporated in the third byte of the response message.

【0042】なお、この「$02」が、エンジン制御装
置1の後述する識別値である。そして同様の要領で、エ
アコン制御装置6およびトラクション制御装置7が、自
分の応答メッセージを順次送信する。このとき、エアコ
ン制御装置6からの応答メッセージの3バイト目には、
図示はしないが、 ・「このメッセージの送信元がエアコン制御装置6であ
ること($03)」が組み込まれ、トラクション制御装
置7からの応答メッセージの3バイト目には、図示はし
ないが、 ・「このメッセージの送信元がトラクション制御装置7
であること($04)」が組み込まれる。
This "$ 02" is an identification value of the engine control device 1 which will be described later. Then, in the same manner, the air conditioner control device 6 and the traction control device 7 sequentially transmit their own response messages. At this time, in the third byte of the response message from the air conditioner control device 6,
Although not shown in the figure, "The sender of this message is the air conditioner control device 6 ($ 03)" is incorporated, and although not shown in the third byte of the response message from the traction control device 7, "The sender of this message is the traction control device 7
Is ($ 04) ”is incorporated.

【0043】なお、上記「$03」、「$04」がそれ
ぞれ、エアコン制御装置6およびトラクション制御装置
7の後述する識別値である。ここで故障診断テスタ5
は、各制御装置からの応答メッセージを受信したとき
に、この応答メッセージの中に組み込まれた上記識別値
を、RAMの一部で構成される接続ECUメモリ13a
(図3(a))の0番地から3番地までに順次格納する
(ステップ312参照)。つまりこの場合、0番地にト
ランスミッション制御装置2の識別値を格納し、1番地
にエンジン制御装置1の識別値を格納し、2番地にエア
コン制御装置6の識別値を格納し、3番地にトラクショ
ン制御装置7の識別値を格納する。
The above "$ 03" and "$ 04" are respectively the identification values of the air conditioner control device 6 and the traction control device 7 which will be described later. Here, the fault diagnosis tester 5
When receiving a response message from each control device, the connection ECU memory 13a configured by a part of the RAM stores the identification value incorporated in the response message.
The data is sequentially stored from address 0 to address 3 in FIG. 3A (see step 312). That is, in this case, the identification value of the transmission control device 2 is stored in the address 0, the identification value of the engine control device 1 is stored in the address 1, the identification value of the air conditioner control device 6 is stored in the address 2, and the traction is stored in the address 3. The identification value of the control device 7 is stored.

【0044】そして故障診断テスタ5は、この接続EC
Uメモリ13aと後述するRCVECUに、どの識別値
が格納されているかに基づいて、どの制御装置が応答可
能な状態であるかを確認し、この確認結果に基づいて、
後述するRAM値読み出し診断等の処理を行う。以上、
各制御装置2、1、6、7の全てが応答可能な状態のと
きの、上記接続確認処理における時間的流れについて図
2(a)を用いて説明したが、今度は、上記各制御装置
のうちのいずれかが応答不可能な状態のときの、接続確
認処理における時間的流れについて図2(b)を用いて
説明する。
Then, the failure diagnosis tester 5 uses this connection EC.
Based on which identification value is stored in the U memory 13a and the RCVECU described later, it is confirmed which control device is in a responsive state, and based on this confirmation result,
Processing such as RAM value reading diagnosis described below is performed. that's all,
The time flow in the connection confirmation processing when all of the control devices 2, 1, 6, and 7 are in the responsive state has been described with reference to FIG. 2A. The temporal flow of the connection confirmation processing when any one of them is in the unresponsive state will be described with reference to FIG.

【0045】例えば、3番目に優先順位の高いエアコン
制御装置6が応答不可能な状態のときは、図2(b)に
示すように、故障診断テスタ5からの接続確認要求メッ
セージの送信完了から時間P2後に、まずトランスミッ
ション制御装置2が応答メッセージを送信し、さらに時
間P2後に、エンジン制御装置1が応答メッセージを送
信する。
For example, when the air-conditioner control device 6 having the third highest priority is in a state where it cannot respond, as shown in FIG. 2B, the transmission of the connection confirmation request message from the failure diagnosis tester 5 is completed. After the time P2, the transmission control device 2 first transmits the response message, and after the time P2, the engine control device 1 transmits the response message.

【0046】さらに時間P2後に、本来ならエアコン制
御装置6からの応答メッセージが送信されるはずである
のが、この場合は送信されず、その結果、通信線3が空
いた状態の時間(以下、アイドル時間という)がP2を
超える。そこで故障診断テスタ5は、上記アイドル時間
がP2よりも長いP2X(本実施例では28ms)を経
過したことを確認したら、エアコン制御装置6が応答不
可能な状態であると判定し、エアコン制御装置6が本来
送信するはずの応答メッセージと同じメッセージを、ダ
ミーとして送信する(ステップ215参照)。
Further, after the time P2, the response message from the air conditioner control device 6 should originally be transmitted, but in this case it is not transmitted, and as a result, the time when the communication line 3 is idle (hereinafter, Idle time) exceeds P2. Therefore, when the failure diagnosis tester 5 confirms that the idle time has passed P2X (28 ms in this embodiment) longer than P2, it determines that the air conditioner control device 6 is in a non-responsive state, and the air conditioner control device 5 The same message as the response message that 6 should originally send is sent as a dummy (see step 215).

【0047】これによって、トラクション制御装置7
は、このダミーのメッセージの送信完了から時間P2後
に、自分の応答メッセージを送信することができる。な
お、この場合は、図3(b)に示すように、上記接続E
CUメモリ13aの0番地にはトランスミッション制御
装置2の識別値が格納され、1番地にはエンジン制御装
置1の識別値が格納されるが、2番地にはトラクション
制御装置7の識別値が格納される。また3番地には何の
データも格納されず、$00のままとなる。
As a result, the traction control device 7
Can transmit its own response message after time P2 from the completion of transmission of this dummy message. In this case, as shown in FIG.
The identification value of the transmission control device 2 is stored at address 0 of the CU memory 13a, the identification value of the engine control device 1 is stored at address 1, and the identification value of the traction control device 7 is stored at address 2. It Further, no data is stored in the address 3 and remains $ 00.

【0048】次に図4を用いて、上記RAM値読み出し
診断処理における、故障診断テスタ5からの要求メッセ
ージおよび各制御装置からの応答メッセージの時間的流
れについて説明する。例えば、各制御装置2、1、6、
7が全て応答可能な状態のときは、図4(a)に示すよ
うに、故障診断テスタ5が、RAM値の読み出しを要求
する要求メッセージを送信する。
Next, with reference to FIG. 4, a temporal flow of the request message from the failure diagnostic tester 5 and the response message from each control device in the RAM value read diagnostic process will be described. For example, each control device 2, 1, 6,
When all 7 are ready to respond, as shown in FIG. 4A, the failure diagnosis tester 5 transmits a request message requesting reading of the RAM value.

【0049】それに対して、各制御装置2、1、6、7
が、時間P2の間隔を空けながら順次自分の応答メッセ
ージを送信する。一方、上記各制御装置2、1、6、7
のうち、いずれか(例えばエアコン制御装置6)が応答
不可能な状態のときは、図4(b)に示すように、故障
診断テスタ5からのRAM値要求メッセージの送信完了
から時間P2後に、まずトランスミッション制御装置2
が応答メッセージを送信し、さらに時間P2後に、エン
ジン制御装置1が応答メッセージを送信する。
On the other hand, the control devices 2, 1, 6, 7
However, it transmits its own response message one after another at intervals of time P2. On the other hand, the control devices 2, 1, 6, 7 described above
When any one of them (for example, the air conditioner control device 6) cannot respond, as shown in FIG. 4 (b), after the time P2 from the completion of the transmission of the RAM value request message from the failure diagnosis tester 5, First, the transmission control device 2
Transmits a response message, and after time P2, the engine control device 1 transmits a response message.

【0050】そして故障診断テスタ5は、アイドル時間
がP2Xを経過したら、上記接続確認処理のときに接続
ECUメモリ13aに格納された識別値、およびRCV
ECUに格納された識別値に基づいて、エアコン制御装
置6からの応答メッセージと同じメッセージをダミーと
して送信する(ステップ215参照)。そしてトラクシ
ョン制御装置7は、上記ダミーの送信完了から時間P2
後に、自分の応答メッセージを送信する。
When the idle time has passed P2X, the failure diagnosis tester 5 determines the RCV and the identification value stored in the connection ECU memory 13a during the connection confirmation processing.
Based on the identification value stored in the ECU, the same message as the response message from the air conditioner control device 6 is transmitted as a dummy (see step 215). Then, the traction control device 7 receives the time P2 from the completion of the transmission of the dummy.
Later, send your response message.

【0051】以上、本実施例の接続確認処理、およびR
AM値読み出し診断処理の時間的な流れについて図2、
図4を用いて説明したが、今度は、上記接続確認処理を
行うための具体的手段について、図5〜図9を用いて説
明する。なお、図5〜図9に示す処理は、故障診断テス
タ5で行われる処理であり、図5は、いつ送信されてく
るか分からない応答メッセージを確実に取り込むため
に、CPUのシリアル入力割込み機能を通じて実現され
る割込処理を示すフローチャート、図6、7は、ベース
ループごとに起動される送信側のメインルーチンを示す
フローチャート、および図8、9は、ベースループごと
に起動される受信側のメインルーチンを示すフローチャ
ートである。
As described above, the connection confirmation processing of this embodiment and R
FIG. 2 shows the temporal flow of the AM value read diagnosis process.
Although described with reference to FIG. 4, specific means for performing the connection confirmation process will now be described with reference to FIGS. 5 to 9. The processes shown in FIGS. 5 to 9 are processes performed by the failure diagnosis tester 5, and FIG. 5 shows the serial input interrupt function of the CPU in order to reliably capture a response message that is unknown when it is sent. 6 and 7 are flowcharts showing the main routine of the transmitting side activated for each base loop, and FIGS. 8 and 9 are flowcharts of the receiving side activated for each base loop. It is a flow chart which shows a main routine.

【0052】また、以下説明する処理で用いられる各カ
ウンタ、各フラグ、接続ECUメモリ、接続確認モー
ド、N、i、j、NX、およびRCVECUは、イグニ
ッションスイッチ18をオンして各電子制御装置に電源
が供給された初期状態においては、全て0になってい
る。ところで故障診断テスタ5は、各制御装置からの応
答メッセージの1バイトデータの受信が完了する度に、
図5に示す処理を行って、そのメッセージに含まれる受
信データおよびバイト数を、受信バッファおよび受信カ
ウンタに格納する。
Further, each counter, each flag, connection ECU memory, connection confirmation mode, N, i, j, NX, and RCVECU used in the processing described below turns on the ignition switch 18 and causes each electronic control unit to operate. In the initial state when power is supplied, all are 0. By the way, the failure diagnosis tester 5 receives the 1-byte data of the response message from each control device,
By performing the processing shown in FIG. 5, the received data and the number of bytes included in the message are stored in the reception buffer and the reception counter.

【0053】具体的には、上記メッセージのバイトの受
信が完了する度にステップ101にてこのシリアル入力
割込処理を起動し、ステップ102にて、受信割込要求
フラグをクリアして、次のバイトの受信割込を受け付け
る準備をする。そしてステップ103にて、受信したバ
イトがメッセージの1バイト目か否かを判定し、1バイ
ト目であると判定したら、ステップ104にて、その受
信データを受信バッファ(1)に格納する。
Specifically, each time the reception of the byte of the above message is completed, this serial input interrupt processing is activated in step 101, the reception interrupt request flag is cleared in step 102, and the next Prepare to accept a byte reception interrupt. Then, in step 103, it is determined whether or not the received byte is the first byte of the message. If it is determined that it is the first byte, the received data is stored in the reception buffer (1) in step 104.

【0054】そしてステップ105にて、受信カウンタ
に1をセットし、次のステップ114にて、上記アイド
ル時間を計測するためのアイドルカウンタをクリアし
て、この割込処理を抜ける。なお、このアイドルカウン
タは、図示しないタイマによる時間割込み(例えば1m
s割込み)に応じて1カウントずつカウントアップされ
る。従ってアイドルカウンタは、ステップ112にてク
リアされた後は再び0からカウントアップされる。
Then, in step 105, the reception counter is set to 1, and in the next step 114, the idle counter for measuring the idle time is cleared and the interrupt process is exited. Note that this idle counter is a time interrupt (for example, 1 m
s interrupt), the count is incremented by one. Therefore, the idle counter is incremented from 0 again after being cleared in step 112.

【0055】また、ステップ103の判定結果が2バイ
ト目以降であれば、ステップ106にて受信カウンタを
インクリメントして、今何バイト目かを判定する情報と
して用いる。そしてステップ107にて、現在受信した
バイト数が11を超えたか否かを受信カウンタに基づい
て判定し、超えたと判定されたら異常とみなして、ステ
ップ108〜110にて、通信エラーフラグのセット、
受信バッファ(1)〜(n)のオールクリア、受信カウ
ンタのクリアを実行し、この処理を抜ける。
If the result of the determination in step 103 is the second byte or later, the reception counter is incremented in step 106 and used as information for determining the current byte number. Then, in step 107, it is determined whether or not the number of bytes currently received exceeds 11, based on the reception counter. If it is determined that the number of bytes has exceeded 11, it is considered to be abnormal, and in steps 108 to 110, a communication error flag is set,
All the reception buffers (1) to (n) are cleared, the reception counter is cleared, and the process is exited.

【0056】また、ステップ107にて受信バイト数が
11を超えていないと判定されたら、ステップ111に
て、今受信したデータを受信バッファ(n)に格納す
る。そして次のステップ112にて、受信カウンタが3
か否か、すなわち3バイト目のデータを受信バッファ
(3)に格納したか否かを判定し、YESと判定された
ら次のステップ113にて、RAMの一部であるRCV
ECUに受信バッファ(3)のデータを格納する。そし
て、ステップ114の処理を実行して、この処理を抜け
る。なお、本実施例では、上記RCVECUにて本発明
における識別値記憶手段を構成している。
If it is determined in step 107 that the number of received bytes does not exceed 11, then in step 111, the data just received is stored in the reception buffer (n). Then, in the next step 112, the reception counter is set to 3
It is determined whether or not, that is, whether or not the data of the third byte has been stored in the reception buffer (3), and if YES is determined, in the next step 113, the RCV which is a part of the RAM
The data of the reception buffer (3) is stored in the ECU. Then, the process of step 114 is executed to exit this process. In the present embodiment, the RCVECU constitutes the identification value storage means in the present invention.

【0057】また故障診断テスタ5は、上記のような割
込み処理の他に、図6、7に示す送信側のメインルーチ
ンの処理を行う。具体的には、まずステップ201に
て、接続確認処理完了フラグが0にセットされているか
否かを判定することによって、接続確認処理が完了した
か否かを判定する。ここで接続確認処理完了フラグは、
接続確認処理が完了した時点で後述するステップ218
にて1にセットされる。
Further, the fault diagnosis tester 5 performs the processing of the main routine on the transmission side shown in FIGS. 6 and 7 in addition to the interrupt processing as described above. Specifically, first in step 201, it is determined whether or not the connection confirmation processing is completed by determining whether or not the connection confirmation processing completion flag is set to 0. Here, the connection confirmation processing completion flag is
Step 218 described later when the connection confirmation processing is completed
Is set to 1.

【0058】上記ステップ201にてYES、すなわち
まだ接続確認処理が完了していないと判定されたら、ス
テップ202にて、接続確認モードを1にセットするこ
とによって、接続確認処理を実行中であることを一時的
に記憶する。またステップ201にてNOと判定された
ら、ステップ207にジャンプする。そして次のステッ
プ203にて、接続確認要求送信完了フラグが1にセッ
トされているか否かを判定することによって、接続確認
要求メッセージの送信を完了したか否かを判定する。こ
こでNO、すなわちまだ送信を完了していないと判定さ
れたら、次のステップ204にて接続確認要求メッセー
ジを送信する。そして次のステップ205にて、後述す
るステップ212にて用いるiに0をセットし、次のス
テップ206にて、接続確認要求送信完了フラグを1に
セットして、接続確認要求メッセージの送信を完了した
ことを一時的に記憶する。また、上記ステップ203に
てYESと判定されたら、ステップ207にジャンプす
る。
If YES in step 201, that is, if it is determined that the connection confirmation process is not yet completed, the connection confirmation process is being executed by setting the connection confirmation mode to 1 in step 202. Is temporarily stored. If NO in step 201, the process jumps to step 207. Then, in the next step 203, it is determined whether or not the transmission of the connection confirmation request message is completed by determining whether or not the connection confirmation request transmission completion flag is set to 1. If NO, that is, if it is determined that the transmission has not been completed, the connection confirmation request message is transmitted in the next step 204. Then, in the next step 205, i used in step 212 described later is set to 0, and in the next step 206, the connection confirmation request transmission completion flag is set to 1 to complete the transmission of the connection confirmation request message. Memorize what you have done temporarily. If YES is determined in the above step 203, the process jumps to step 207.

【0059】ステップ207では、接続確認処理、RA
M値読み出し診断処理等の要求モードを実行中か否かを
判定する。ここでNO、すなわちどの要求モードも実行
していないと判定されたら、そのままこのルーチンを抜
ける。反対にYESと判定されたら、次のステップ20
8にて、上記接続確認モードが1にセットされているか
否かを判定することによって、接続確認処理中か否かを
判定する。
In step 207, the connection confirmation processing and RA
It is determined whether or not a request mode such as M-value reading diagnostic processing is being executed. If NO, that is, if it is determined that none of the request modes is being executed, the routine directly ends. On the contrary, if YES is determined, the next step 20
At 8, it is determined whether the connection confirmation mode is being set by determining whether the connection confirmation mode is set to 1.

【0060】ここでYES(接続確認処理中)と判定さ
れたら、ステップ209にて、後述するステップ214
にて用いるNに所定数(本実施例では15)をセットし
て図7のステップ211に進み、反対にNOと判定され
たら、ステップ210にてNにNXをセットして図7の
ステップ211に進む。ここで、ステップ209におけ
る所定数は、通信線3を介して故障診断テスタ5と接続
される制御装置の数と同じか、もしくはそれよりも多い
数としてセットされるものである。またステップ210
におけるNXは、後述する図9のステップ313の説明
にて述べるように、このうちの応答可能な状態の制御装
置の数を示す。
If it is determined to be YES (during connection confirmation processing) here, in step 209, step 214 to be described later is performed.
7 is set to a predetermined number (15 in this embodiment) and the process proceeds to step 211 in FIG. 7. On the contrary, if NO is determined, in step 210 N is set to NX and step 211 in FIG. Proceed to. Here, the predetermined number in step 209 is set as the number equal to or larger than the number of control devices connected to the failure diagnosis tester 5 via the communication line 3. Step 210
NX indicates the number of control devices in the responsive state among them, as will be described later in the description of step 313 in FIG. 9.

【0061】そしてステップ211では、アイドルカウ
ンタがP2X(>P2)を超えたか否かを判定すること
によって、現在故障診断テスタ5が、応答不可能な制御
装置からの応答メッセージ受信待ち中か否かを判定す
る。ここで、各制御装置2、1、6、7が全て応答可能
な状態であれば、各制御装置はP2ごとに自分の応答メ
ッセージを送信し、故障診断テスタ5はこれらの応答メ
ッセージを受信する度に、図5のステップ114にてア
イドルカウンタをクリアするので、このステップ211
ではNOと判定される。このようにNOと判定されたと
きは、何もせずにこのルーチンを抜ける。
Then, in step 211, it is determined whether or not the idle counter exceeds P2X (> P2) to determine whether or not the fault diagnosis tester 5 is currently waiting to receive a response message from the unresponsive controller. To judge. Here, if all of the control devices 2, 1, 6, and 7 are ready to respond, each control device transmits its own response message for each P2, and the failure diagnosis tester 5 receives these response messages. Each time, the idle counter is cleared in step 114 of FIG.
Then, it is determined to be NO. When the determination is NO, the routine exits without doing anything.

【0062】しかし、上記各制御装置2、1、6、7の
うちのいずれか、例えばエアコン制御装置6が応答不可
能な状態であったら、故障診断テスタ5は、エンジン制
御装置1からの応答メッセージを受信してアイドルカウ
ンタをクリアした後、エアコン制御装置6からの応答メ
ッセージを受信しないため、結果的にアイドルカウンタ
をクリアできず、アイドルカウンタはP2Xを超え、ス
テップ211にてYESと判定される。
However, if any of the control devices 2, 1, 6 and 7 described above, for example, the air conditioner control device 6 cannot respond, the failure diagnosis tester 5 causes the engine control device 1 to respond. After receiving the message and clearing the idle counter, since the response message from the air conditioner control device 6 is not received, the idle counter cannot be cleared as a result, the idle counter exceeds P2X, and YES is determined in step 211. It

【0063】このようにYESと判定されたときは、応
答不可能な状態の制御装置が存在しているということな
ので、ステップ212、213の処理によってどの制御
装置が応答不可能な状態かを確認し、ステップ215に
て、この応答不可能な状態の制御装置が本来送信するは
ずの応答メッセージと同じメッセージを、ダミーとして
送信する。
If YES is determined in this way, it means that there is a control device in a non-responsive state, so it is confirmed by the processing of steps 212 and 213 which control device is in a non-responsive state. Then, in step 215, the same message as the response message that should be originally transmitted by the control device in the unresponsive state is transmitted as a dummy.

【0064】具体的には、まずステップ212にて、接
続ECUメモリ13aのi番地に格納されている識別値
とRCVECUに格納されている識別値が同じか否かを
判定する。なお、最初にこのステップ212を行うとき
は、上記ステップ205にてi=0にセットされている
ため、0番地の識別値とRCVECUの識別値とを比較
することになる。そして異なると判定されたら、ステッ
プ213にてiをインクリメントして再びステップ21
2の処理を行い、同じと判定されたら、ステップ214
に進む。
Specifically, first, at step 212, it is determined whether the identification value stored in the address i of the connected ECU memory 13a is the same as the identification value stored in the RCVECU. When step 212 is first performed, i = 0 is set in step 205, so the identification value at address 0 is compared with the identification value of RCVECU. If it is determined that they are different from each other, i is incremented in step 213, and step 21
If it is determined that they are the same, step 214 is performed.
Proceed to.

【0065】そしてステップ214では、i+j+1が
上記ステップ209または210でセットしたN以上か
否かを判定する。そしてNOと判定されたら、ステップ
215にて上記ダミーのメッセージを送信する。このス
テップ215で送信するダミーメッセージの3バイト目
には、そのときRCVECUに格納された識別値よりも
1つだけ大きな値が組み込まれる。例えばそのときRC
VECUに格納された識別値が(01)ならば、(0
2)が3バイト目に組み込まれる。そして、ステップ2
16にてjをインクリメントしたらこのルーチンを抜け
る。
Then, in step 214, it is judged whether i + j + 1 is N or more set in step 209 or 210. If NO is determined, the dummy message is transmitted in step 215. In the third byte of the dummy message transmitted in step 215, a value larger by one than the identification value stored in RCVECU at that time is incorporated. For example, at that time RC
If the identification value stored in the VECU is (01), (0
2) is incorporated in the 3rd byte. And step 2
When j is incremented at 16, the routine exits.

【0066】また、ステップ214にてYESと判定さ
れたら、接続確認処理が完了したということなので、次
のステップ217にて上記iとjをクリアし、ステップ
218にて上記接続確認処理完了フラグを1にセットす
るとともに、ステップ219にて接続確認モードに0を
セットする。その後このルーチンを抜ける。また故障診
断テスタ5は、図8、9に示す受信側のメインルーチン
の処理を行う。
If YES is determined in step 214, it means that the connection confirmation process is completed. Therefore, in step 217, the above i and j are cleared, and in step 218, the connection confirmation process completion flag is set. In addition to setting to 1, the connection confirmation mode is set to 0 in step 219. Then exit this routine. Further, the failure diagnosis tester 5 performs the processing of the main routine on the receiving side shown in FIGS.

【0067】具体的には、まずステップ301にて、受
信バッファ(1)にデータが存在するか否かを判定する
ことによって、応答メッセージを受信している最中か否
かを判定する。そして受信バッファ(1)になにがしか
のデータが存在していれば、メッセージを受信中である
とみなして、ステップ302に進む。反対にステップ3
01にてNOと判定されたら(同番地のデータが「$0
0」であれば)、このルーチンを抜ける。
Specifically, first, in step 301, it is determined whether or not data is present in the reception buffer (1) to determine whether or not the response message is being received. If there is some data in the receiving buffer (1), it is considered that the message is being received, and the process proceeds to step 302. On the contrary, step 3
If NO is determined in 01 (the data at the same address is "$ 0
If it is "0"), this routine is exited.

【0068】ステップ302では、アイドルカウンタが
上記国際規格で規定された時間P1の最大値(20m
s)を超えたか否かを判定することによって、応答メッ
セージの受信を完了したか否かを判定する。ここで超え
ていないと判定されたら、まだ応答メッセージの受信を
完了していないとみなして、このルーチンを抜ける。反
対に超えたと判定されたら、応答メッセージの受信を完
了したとみなして、続くステップ303〜305におい
て、このメッセージのサムチェックを行う。
In step 302, the idle counter indicates the maximum value of the time P1 (20 m
By determining whether or not s) is exceeded, it is determined whether or not the reception of the response message is completed. If it is determined that the response message is not exceeded, it is considered that the reception of the response message is not completed yet, and this routine is exited. On the other hand, if it is determined that the number of times of reply is exceeded, it is considered that the reception of the response message is completed, and the sum check of this message is performed in the following steps 303 to 305.

【0069】このサムチェックでは、まずステップ30
3において、受信カウンタのカウント値に基づき受信し
たメッセージが何バイト長かを確認する。そしてこの数
値に基づき、次のステップ304で受信バッファ(1)
〜(n−1)に格納されているデータの総和を計算し、
最後のステップ305にてその総和値の下位8ビットの
データと受信バッファ(n)に格納されているデータ、
すなわちCSの値とが一致しているか否かを判定する。
In this thumb check, first, step 30
In 3, the number of bytes of the received message is confirmed based on the count value of the reception counter. Then, based on this numerical value, in the next step 304, the reception buffer (1)
Calculate the sum of the data stored in (n-1),
In the last step 305, the lower 8-bit data of the total value and the data stored in the reception buffer (n),
That is, it is determined whether or not the value of CS matches.

【0070】このサムチェックの結果、上記各値が一致
していないと判定されたら、異常とみなし、ステップ3
06にて通信エラーフラグをセットし、ステップ307
にて受信バッファ(1)〜(n)を全てクリアし、ステ
ップ308で受信カウンタをクリアしてこのルーチンを
抜ける。また上記サムチェックの結果が正常であれば、
受信データに問題はないものと判断して、続くステップ
309において、受信バッファ(1)〜(3)の内容、
すなわちメッセージヘッダが正常か否かを更に判定す
る。ここで正常と判定されたら図9のステップ310に
進み、異常と判定されたらステップ306の処理を行
う。
As a result of this sum check, if it is determined that the above values do not match, it is regarded as abnormal, and step 3
The communication error flag is set at 06, and step 307
At step 308, all reception buffers (1) to (n) are cleared, at step 308 the reception counter is cleared, and this routine is exited. If the result of the above sum check is normal,
It is determined that the received data has no problem, and in the following step 309, the contents of the receiving buffers (1) to (3),
That is, it is further determined whether the message header is normal. If it is determined to be normal here, the process proceeds to step 310 of FIG. 9, and if it is determined to be abnormal, the process of step 306 is performed.

【0071】図9のステップ310では、上記接続モー
ド1に1がセットされているか否かを判定することによ
って、接続確認処理中か否かを判定する。ここでNOと
判定されたらステップ314にジャンプし、受信バッフ
ァ(1)〜(n)を全てクリアする。反対にYESと判
定されたら、ステップ311にて、接続ECUメモリ1
3aの空きアドレス(i番地)をサーチする。
In step 310 of FIG. 9, it is determined whether or not the connection confirmation processing is being performed by determining whether or not 1 is set in the connection mode 1. If NO is determined here, the process jumps to step 314 to clear all the reception buffers (1) to (n). On the contrary, if YES is determined, in step 311, the connected ECU memory 1
A free address (address i) of 3a is searched.

【0072】そしてステップ312にて、この空きアド
レス(i番地)に、受信バッファ(3)のデータ、すな
わち今受信した応答メッセージに組み込まれた識別値を
格納し、ステップ313にて、上記ステップ210にて
説明したNXをインクリメントした後、ステップ314
の処理を行う。以上説明した本実施例によると、各制御
装置2、1、6、7のうちの例えばエアコン制御装置6
が応答不可能な状態の場合、接続確認処理中においては
図2(b)に示すように、制御装置2と1が応答メッセ
ージを送信した後に、エアコン制御装置6が応答メッセ
ージを送信しないことから、故障診断テスタ5はアイド
ルカウンタをクリアできず、その結果、アイドルカウン
タがP2Xを超え、ステップ211にてYESと判定さ
れ、ステップ212に進む。
Then, in step 312, the data of the receiving buffer (3), that is, the identification value incorporated in the response message just received is stored in this empty address (address i), and in step 313, the above-mentioned step 210 is performed. After incrementing NX described in step 314, step 314
Process. According to the present embodiment described above, for example, the air conditioner control device 6 among the control devices 2, 1, 6, 7
2 is in the unresponsive state, the air conditioner control device 6 does not send the response message after the control devices 2 and 1 send the response message during the connection confirmation process as shown in FIG. 2B. The failure diagnosis tester 5 cannot clear the idle counter, and as a result, the idle counter exceeds P2X, and YES is determined in step 211, and the process proceeds to step 212.

【0073】このとき、RCVECUには、最後に受信
した応答メッセージに組み込まれた識別値、すなわち
(02)が格納されている。またこのときi=0であ
る。従って、ステップ212では、接続ECUメモリ1
3aの0番地に格納された識別値(01)と、RCVE
CUに格納された識別値(02)とを比較するため、N
Oと判定されてステップ213にてiをインクリメント
し、再びステップ212の処理を行う。
At this time, the RCVECU stores the identification value incorporated in the last received response message, that is, (02). At this time, i = 0. Therefore, in step 212, the connected ECU memory 1
The identification value (01) stored at address 0 of 3a and RCVE
To compare with the identification value (02) stored in the CU, N
When it is determined to be O, i is incremented in step 213, and the process of step 212 is performed again.

【0074】このときはステップ212では、1番地に
格納された識別値(02)と、RCVECUに格納され
た識別値(02)とを比較するため、YESと判定され
てステップ214の処理を行う。このときi=1、j=
0、N=15のため、ステップ214ではNOと判定さ
れてステップ215にてダミーを送信する。このダミー
の3バイト目には、RCVECUに格納された識別値よ
りも1つ大きな値(03)が組み込まれる。
At this time, in step 212, the identification value (02) stored in the address 1 is compared with the identification value (02) stored in RCVECU, so that it is determined to be YES and the processing of step 214 is performed. . At this time, i = 1, j =
Since 0 and N = 15, NO is determined in step 214 and the dummy is transmitted in step 215. In the third byte of this dummy, a value (03) that is one larger than the identification value stored in RCVECU is incorporated.

【0075】するとトラクション制御装置7は、このダ
ミーを受信したときに、エアコン制御装置6からの応答
メッセージを受信したものとみなして、このダミーの受
信完了からP2後に、自分の応答メッセージを送信す
る。そして故障診断テスタ5は、トラクション制御装置
7からの応答メッセージを受信した後は、アイドルカウ
ンタをクリアできないことから、結果的にP2Xを超え
ることになり、再びステップ211にてYESと判定さ
れてステップ212の処理を行う。
Then, when the traction control device 7 receives this dummy, it considers that the response message from the air conditioner control device 6 has been received, and transmits its own response message P2 after completion of the reception of this dummy. . After the response message from the traction control device 7 is received, the failure diagnosis tester 5 cannot clear the idle counter, so that the result is that P2X is exceeded. The processing of 212 is performed.

【0076】このときにはi=1なので、接続ECUメ
モリ13aの1番地に格納された識別値(02)とRC
VECUに格納された識別値(04)とを比較し、NO
と判定される。そして、ステップ213にてi=2とし
た後、再びステップ212の処理を行う。このときには
YESと判定されるので、ステップ214の処理を行
う。
At this time, since i = 1, the identification value (02) stored in the first address of the connected ECU memory 13a and RC
The identification value (04) stored in the VECU is compared and NO
Is determined. Then, after setting i = 2 in step 213, the process of step 212 is performed again. At this time, since YES is determined, the process of step 214 is performed.

【0077】ステップ214ではi=2、j=1、N=
15なのでNOと判定され、再びダミーを送信する。つ
まり、図2(b)には図示していないが、制御装置7が
応答メッセージを送信完了してから時間P2X後に、故
障診断テスタ5がダミーを送信することになる。故障診
断テスタ5は、このダミーの送信によってアイドルカウ
ンタをクリアするが、その後再びカウントアップするの
で、再びステップ211→212→214→215の順
で処理を行い、再びダミーを送信することになる。つま
り、上記ダミーの送信完了からP2X後に再びダミーを
送信することになる。このように、i+j+1≧15と
なるまで、時間P2Xごとにダミーの送信を繰り返す。
In step 214, i = 2, j = 1, N =
Since it is 15, it is determined as NO and the dummy is transmitted again. That is, although not shown in FIG. 2B, the failure diagnosis tester 5 transmits a dummy after the time P2X from when the control device 7 completes transmitting the response message. The fault diagnosis tester 5 clears the idle counter by transmitting the dummy, but since it counts up again after that, the processes are performed again in the order of steps 211 → 212 → 214 → 215, and the dummy is transmitted again. That is, the dummy is transmitted again after P2X from the completion of the transmission of the dummy. In this way, dummy transmission is repeated every time P2X until i + j + 1 ≧ 15.

【0078】そしてi+j+1≧15となったら、ステ
ップ214にてYESと判定され、ステップ217〜2
19にて接続確認処理が完了したことを記憶する。ま
た、上記接続確認処理が完了して、RAM値読み出し診
断処理を行うときには、ステップ210にてNにNX、
つまりエアコン制御装置6が応答不可能な状態の場合は
3をセットする。この場合、上記接続確認処理とは異な
り、N=3にセットされているので、トラクション制御
装置7からの応答メッセージを受信した後は、アイドル
カウンタがP2Xを超えてもステップ214ではYES
と判定されるので、ダミーは送信しない。
When i + j + 1 ≧ 15, YES is determined in step 214, and steps 217-2 are executed.
It is stored in 19 that the connection confirmation processing is completed. When the connection confirmation process is completed and the RAM value read diagnosis process is performed, NX is set to N in step 210.
That is, 3 is set when the air conditioner control device 6 cannot respond. In this case, unlike the connection confirmation processing, N = 3 is set, so that even if the idle counter exceeds P2X after receiving the response message from the traction control device 7, YES is obtained in step 214.
Therefore, the dummy is not transmitted.

【0079】以上説明したように本実施例では、ステッ
プ211の処理を行う構成としたので、応答不可能な状
態の制御装置が存在するか否かを判定することができ
る。さらに本実施例では、最後に受信した応答メッセー
ジの識別値をRCVECUに格納するとともに、ステッ
プ212、213の処理を行う構成としたので、どれが
応答不可能な状態であるかを確認することができる。
As described above, in the present embodiment, since the processing of step 211 is performed, it is possible to determine whether or not there is a control device in the unresponsive state. Further, in the present embodiment, since the identification value of the last received response message is stored in RCVECU and the processing of steps 212 and 213 is performed, it is possible to confirm which is the unresponsive state. it can.

【0080】従ってステップ215にて、その応答不可
能な状態の制御装置が本来送信するはずの応答メッセー
ジと同じメッセージを送信することができ、これによっ
て、この応答不可能な状態の制御装置よりも優先順位の
低い制御装置が、自分の応答メッセージを送信すること
ができる。また本実施例では、故障診断テスタ5が、接
続確認処理中に受信した応答メッセージの数を、ステッ
プ313にてNXとして記憶し、接続確認処理以外の例
えばRAM値読み出し診断処理のときには、ステップ2
14にて用いられるNを上記NXとするようにしたの
で、最後の応答メッセージを受信した後にダミーを送信
しないようにすることができる。 (変形例)上記実施例では、例えばRAM値読み出し診
断処理のときにも、図4(b)に示すようにアイドルカ
ウンタがP2X経過後にダミーを送信するようにした
が、図10に示すように、アイドルカウンタがP2経過
後にダミーを送信するようにしても良い。この場合、例
えば接続ECUメモリ13aに格納された識別値に基づ
いて、ダミーを送信するタイミングと、ダミーの3バイ
ト目に組み込む識別値を選択すれば良い。
Therefore, in step 215, the same message as the response message that the control device in the unresponsive state should originally have sent can be sent, and this causes the control device in the unresponsive state to send the same message. The lower priority controller can send its response message. Further, in the present embodiment, the failure diagnosis tester 5 stores the number of response messages received during the connection confirmation processing as NX in step 313, and, for example, in the case of the RAM value read diagnosis processing other than the connection confirmation processing, the step 2 is executed.
Since N used in 14 is set to the above NX, it is possible to prevent the dummy from being transmitted after the final response message is received. (Modification) In the above-described embodiment, the idle counter transmits a dummy after P2X has elapsed, as shown in FIG. 4B, even during the RAM value read diagnosis process, but as shown in FIG. The dummy counter may be transmitted after the idle counter has passed P2. In this case, for example, based on the identification value stored in the connected ECU memory 13a, the timing of transmitting the dummy and the identification value incorporated in the third byte of the dummy may be selected.

【0081】また上記実施例では、故障診断テスタ5を
マスタ装置とし、電子制御装置をスレーブ装置としたシ
ステムについて説明したが、複数の電子制御装置の任意
の1つをマスタ装置、他の電子制御装置をスレーブ装置
としたものについても適用することができる。また上記
実施例では、本発明における通信システムを車両に用い
た場合について説明したが、車両以外のものにも適用す
ることができる。
In the above embodiment, the system in which the failure diagnosis tester 5 is used as the master device and the electronic control device is used as the slave device has been described. However, any one of the plurality of electronic control devices is used as the master device and other electronic control devices are used. It can also be applied to a device that is a slave device. Further, in the above embodiment, the case where the communication system according to the present invention is used for the vehicle has been described, but the invention can be applied to other than the vehicle.

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

【図1】本発明一実施例の全体構成図である。FIG. 1 is an overall configuration diagram of an embodiment of the present invention.

【図2】上記実施例の接続確認処理中における各メッセ
ージのタイムチャートであり、(a)は制御装置2、
1、6、7が全て応答可能な状態のとき、(b)はこの
うちの制御装置6が応答不可能な状態のときを示す。
FIG. 2 is a time chart of each message during the connection confirmation processing of the above embodiment, (a) is the control device 2,
When all of 1, 6, and 7 are in a response-enabled state, (b) shows a state in which the control device 6 is in a response-disabled state.

【図3】上記実施例の接続ECUメモリ13aを示す図
であり、(a)は制御装置2、1、6、7がすべて応答
可能な状態のとき、(b)はこのうちの制御装置6が応
答不可能な状態のときを示す。
FIG. 3 is a diagram showing a connected ECU memory 13a of the above embodiment, in which (a) is a state in which all control devices 2, 1, 6, and 7 are in a responsive state, and (b) is a control device 6 among them Indicates that the is unresponsive.

【図4】上記実施例のRAM値読み出し診断処理中にお
ける各メッセージのタイムチャートであり、(a)は制
御装置2、1、6、7が全て応答可能な状態のとき、
(b)はこのうちの制御装置6が応答不可能な状態のと
きを示す。
FIG. 4 is a time chart of each message during the RAM value read / diagnosis process of the above embodiment, in which (a) is a state in which all of the control devices 2, 1, 6, and 7 can respond,
(B) shows the state in which the control device 6 is unable to respond.

【図5】上記実施例の故障診断テスタ5におけるシリア
ル入力割込処理を示すフローチャートである。
FIG. 5 is a flowchart showing a serial input interrupt process in the failure diagnosis tester 5 of the above embodiment.

【図6】上記故障診断テスタ5における送信側のメイン
ルーチンを示すフローチャートである。
FIG. 6 is a flowchart showing a main routine on the transmission side in the failure diagnosis tester 5.

【図7】上記故障診断テスタ5における送信側のメイン
ルーチンを示すフローチャートである。
FIG. 7 is a flowchart showing a main routine on the transmission side in the failure diagnosis tester 5.

【図8】上記故障診断テスタ5における受信側のメイン
ルーチンを示すフローチャートである。
FIG. 8 is a flowchart showing a main routine on the receiving side in the failure diagnosis tester 5.

【図9】上記故障診断テスタ5における受信側のメイン
ルーチンを示すフローチャートである。
FIG. 9 is a flowchart showing a main routine on the receiving side in the failure diagnosis tester 5.

【図10】他の実施例のRAM値読み出し診断処理中に
おける各メッセージのタイムチャートである。
FIG. 10 is a time chart of each message during a RAM value read diagnosis process of another embodiment.

【図11】国際規格ISO−9141−2による通信手
順を示すタイムチャートである。
FIG. 11 is a time chart showing a communication procedure according to international standard ISO-9141-2.

【図12】上記各実施例の各メッセージを構成する各バ
イトのビットフォーマットを示すタイムチャートであ
る。
FIG. 12 is a time chart showing a bit format of each byte forming each message of each of the above-described embodiments.

【図13】従来システムにおける各メッセージのタイム
チャートである。
FIG. 13 is a time chart of each message in the conventional system.

【図14】米国自動車技術会(SAE)J1979に定
められる1メッセージのフレーム構成を示すタイムチャ
ートである。
FIG. 14 is a time chart showing a frame structure of one message defined by American Society for Automotive Engineers (SAE) J1979.

【図15】図13のシステムにおけるデータ衝突の発生
例を示すタイムチャートである。
FIG. 15 is a time chart showing an example of occurrence of data collision in the system of FIG.

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

1…エンジン制御装置(スレーブ装置)、 2…トランスミッション制御装置(スレーブ装置)、 3…通信線、5…故障診断テスタ(マスタ装置)、 6…エアコン制御装置(スレーブ装置)、 7…トラクション制御装置(スレーブ装置) DESCRIPTION OF SYMBOLS 1 ... Engine control device (slave device), 2 ... Transmission control device (slave device), 3 ... Communication line, 5 ... Failure diagnosis tester (master device), 6 ... Air conditioner control device (slave device), 7 ... Traction control device (Slave device)

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 H04L 12/40 H04L 11/00 321 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification number Office reference number FI technical display location H04L 12/40 H04L 11/00 321

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 マスタ装置と複数のスレーブ装置とが通
信路を介して接続され、 前記マスタ装置は、所定の処理の実行を要求する要求メ
ッセージを前記通信路上に送信し、 前記複数のスレーブ装置は、前記通信路からの前記要求
メッセージを受信したら、自分の識別値を組み込んだ応
答メッセージを、優先順位の高いスレーブ装置から順に
前記通信路上に送信する通信システムにおいて、 前記マスタ装置は、 前記複数のスレーブ装置のうちのどれが、前記応答メッ
セージを送信できる状態であるかを確認するための確認
メッセージを前記通信路上に送信する確認メッセージ送
信手段を備え、 前記スレーブ装置は、 前記確認メッセージを前記通信路を介して受信したら、
自分の識別値を組み込んだ前記応答メッセージを前記通
信路上に送信するように構成され、 さらに前記マスタ装置は、 応答可能な状態の前記スレーブ装置からの、前記確認メ
ッセージに対する応答メッセージを、前記通信路を介し
て受信したとき、この応答メッセージに組み込まれた前
記識別値を記憶する識別値記憶手段と、 応答不可能な状態の前記スレーブ装置からの前記応答メ
ッセージを受信待ち中か否かを判定する判定手段と、 この判定手段によって前記受信待ち中であると判定され
たとき、前記識別値記憶手段に記憶された識別値より
も、1つ優先順位の高い識別値を組み込んだダミーメッ
セージを、前記通信路上に送信するダミーメッセージ送
信手段とを備えることを特徴とする通信システム。
1. A master device and a plurality of slave devices are connected via a communication path, the master device transmits a request message requesting execution of a predetermined process on the communication path, and the plurality of slave devices. Is a communication system that, upon receiving the request message from the communication path, transmits a response message incorporating its own identification value on the communication path in order from a slave device with a higher priority, Of the slave device, which comprises a confirmation message transmitting means for transmitting a confirmation message on the communication path for confirming whether the response message can be transmitted, the slave device, the confirmation message If you receive it via the communication channel,
The master device is configured to transmit the response message incorporating its own identification value onto the communication channel, and the master device further includes a response message to the confirmation message from the slave device in a response-enabled state. Identification value storage means for storing the identification value incorporated in the response message when received via the communication device, and whether or not the response message from the slave device in the unresponsive state is waiting to be received. And a dummy message incorporating an identification value having a higher priority than the identification value stored in the identification value storage means when the determination means determines that the reception is waiting. A communication system comprising: a dummy message transmitting means for transmitting on a communication path.
【請求項2】 前記応答可能な状態の前記スレーブ装置
からの、前記確認メッセージに対する応答メッセージ
を、前記通信路を介して受信したとき、この応答メッセ
ージに組み込まれた前記識別値を前記識別値記憶手段に
記憶させる手段を備えることを特徴とする請求項1記載
の通信システム。
2. When a response message to the confirmation message is received from the slave device in the responsive state via the communication path, the identification value stored in the response message is stored in the identification value. The communication system according to claim 1, further comprising means for storing in the means.
【請求項3】 前記判定手段は、 前記通信路が空いた時間が所定時間以上か否かを判定す
る通信路空き時間判定手段で構成されたことを特徴とす
る請求項1または2記載の通信システム。
3. The communication according to claim 1 or 2, wherein the determination means is configured by a communication path idle time determination means for determining whether or not the communication channel is idle for a predetermined time or more. system.
JP7064285A 1995-03-23 1995-03-23 Communication system Pending JPH08265880A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7064285A JPH08265880A (en) 1995-03-23 1995-03-23 Communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7064285A JPH08265880A (en) 1995-03-23 1995-03-23 Communication system

Publications (1)

Publication Number Publication Date
JPH08265880A true JPH08265880A (en) 1996-10-11

Family

ID=13253819

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7064285A Pending JPH08265880A (en) 1995-03-23 1995-03-23 Communication system

Country Status (1)

Country Link
JP (1) JPH08265880A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1407936A2 (en) * 2002-10-11 2004-04-14 Denso Corporation Vehicular electronic control system and electronic control unit, program, and storing member for the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1407936A2 (en) * 2002-10-11 2004-04-14 Denso Corporation Vehicular electronic control system and electronic control unit, program, and storing member for the same
US6799106B2 (en) 2002-10-11 2004-09-28 Denso Corporation Vehicular electronic control system, and electronic control unit, program, and storing member for the same
EP1407936A3 (en) * 2002-10-11 2005-07-27 Denso Corporation Vehicular electronic control system and electronic control unit, program, and storing member for the same

Similar Documents

Publication Publication Date Title
KR100233180B1 (en) Communication system
EP1022877B1 (en) Data transmission method
CN101107595A (en) Fault diagnosis data recording system and method
US6321148B1 (en) Vehicle communication control apparatus and method
JPH0769376B2 (en) Multiplex device for vehicle
JP3486990B2 (en) Serial communication device
JP3106927B2 (en) Communications system
JPH08223190A (en) Communication system
JPH08265880A (en) Communication system
JP3355831B2 (en) Vehicle communication system
JP2781397B2 (en) Multiplex transmission equipment
JPH08204709A (en) Communication system
JP2005145262A (en) Car-mounted lan system
JP2788276B2 (en) Vehicle failure diagnosis device and diagnosis method
JP3487048B2 (en) Communications system
JPH0746676A (en) Communication system for vehicle diagnosis
JP3401360B2 (en) Multiplex transmission equipment
JP3401361B2 (en) Multiplex transmission system
EP4231595A1 (en) Relay device, communication network system, and communication control method
JPH0722431B2 (en) Multiplex communication system
JP4872417B2 (en) In-vehicle data recorder and data recording method
JPH05316124A (en) Data transmission method
JPH02147448A (en) Trouble shooting device for car
JPH04203344A (en) Data communication between electronic devices installed on vehicle
JPH0498930A (en) Multiplex transmitter