JP5182269B2 - Network system - Google Patents
Network system Download PDFInfo
- Publication number
- JP5182269B2 JP5182269B2 JP2009253342A JP2009253342A JP5182269B2 JP 5182269 B2 JP5182269 B2 JP 5182269B2 JP 2009253342 A JP2009253342 A JP 2009253342A JP 2009253342 A JP2009253342 A JP 2009253342A JP 5182269 B2 JP5182269 B2 JP 5182269B2
- Authority
- JP
- Japan
- Prior art keywords
- frame
- relay
- communication
- network system
- relay device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
- Small-Scale Networks (AREA)
Description
本発明は、車載ネットワーク間を複数の中継装置により相互接続することで構成されたネットワークシステムに関する。 The present invention relates to a network system configured by interconnecting in-vehicle networks with a plurality of relay devices.
従来より、独立した二つのネットワークを複数の中継装置(ゲートウェイ)で相互接続したネットワークシステムが知られている。
この種のネットワークシステムでは、例えば、中継装置が二つある場合、一方の中継装置は奇数番地の宛先へ、他方の中継装置は偶数番地の宛先への通信を中継することで、中継装置の負荷を分散したり、一方の中継装置が故障した場合に、他方の中継装置に代理中継を行わせたり、各中継装置に一定周期でブロードキャスト通信を行わせることにより、互いに他の中継装置が正常に動作しているか否かを検知し合わせたりすることが行われている(例えば、特許文献1参照)。
Conventionally, a network system in which two independent networks are interconnected by a plurality of relay apparatuses (gateways) is known.
In this type of network system, for example, when there are two relay devices, one relay device relays communication to an odd address destination, and the other relay device relays communication to an even address destination. If one relay device fails or the other relay device performs proxy relay, or each relay device performs broadcast communication at a certain period, the other relay devices can operate normally. It is performed to detect whether or not they are operating (for example, see Patent Document 1).
なお、代理中継は、具体的には、通信先端末に通信フレームが届かなかった場合、通信元端末に再送フラグを設定した通信フレームを再送信させ、中継装置は、この再送フラグが設定された通信フレームを、宛先が奇数番地か偶数番地かによらず無条件に中継することで実現している。 The proxy relay, specifically, when the communication frame does not reach the communication destination terminal, causes the communication source terminal to retransmit the communication frame in which the retransmission flag is set, and the relay device sets the retransmission flag. This is realized by relaying the communication frame unconditionally regardless of whether the destination is an odd address or an even address.
しかし、上述のネットワークシステムでは、一方の中継装置が故障すると、他方の中継装置の負荷が増大してしまい、故障していない側の中継装置の処理にも影響を与えてしまう可能性があるという問題があった。 However, in the above network system, if one relay device fails, the load on the other relay device increases, which may affect the processing of the non-failed relay device. There was a problem.
また、上述のネットワークシステムのように通信元端末に通信フレームを再送信させるためには、通信先から通信元に対してアクノリッジ信号を返送する必要があり、このようなアクノリッジ信号の返送を行わないシステムには、上述の代理送信を適用することができないという問題もあった。 Further, in order to retransmit the communication frame to the communication source terminal as in the above network system, it is necessary to return an acknowledge signal from the communication destination to the communication source, and such an acknowledge signal is not returned. The system also has a problem that the above-described proxy transmission cannot be applied.
本発明は、上記問題点を解決するために、いずれかの中継装置の故障時に他の中継装置の負荷を増大させることなく対処可能なネットワークシステムを提供することを目的とする。 In order to solve the above-described problems, an object of the present invention is to provide a network system that can cope with a failure of one of the relay devices without increasing the load of the other relay device.
上記目的を達成するためになされた本発明のネットワークシステムは、車載ネットワーク間を複数の中継装置により相互接続することで構成され、通信フレームのうち車載ネットワーク間で中継する必要のあるものを中継フレームとして、その中継フレームには中継時に経由させる中継装置を指定するための指定情報が少なくとも含まれている。 The network system of the present invention made to achieve the above object is configured by interconnecting in-vehicle networks with a plurality of relay devices, and relay frames that need to be relayed between in-vehicle networks among communication frames. The relay frame includes at least designation information for designating a relay device through which the relay frame passes.
そして、中継装置は、中継フレームの中継の要否を指定情報に従って判断し、中継フレームの通信元となる端末装置である通信元端末は、同一種別に分類される中継フレームが、同一の中継装置を連続して経由することがないように、指定情報の設定を行う。 Then, the relay device determines whether the relay frame needs to be relayed according to the designation information, and the communication source terminal, which is the terminal device that is the communication source of the relay frame, determines that the relay frame classified into the same type is the same relay device. The specified information is set so that it will not be routed continuously.
このように構成された本発明のネットワークシステムでは、同一種別に分類される中継フレームは、同一の中継装置を連続して経由することがなく、具体的には、例えば、二つの中継装置が存在する場合には、交互に中継することになる。このため、いずれかの中継装置が故障した場合に、中継フレームが二フレーム以上連続して受信不能となることがないため、中継フレームを利用する通信先端末では、受信するフレーム間隔が粗くなるものの、中継フレームに基づく処理を継続することができる。 In the network system of the present invention configured as described above, the relay frames classified into the same type do not pass through the same relay device continuously. Specifically, for example, there are two relay devices. When it does, it will relay alternately. For this reason, if one of the relay devices fails, the relay frame will not be continuously unreceivable for two frames or more. However, in the communication destination terminal using the relay frame, although the frame interval for receiving is coarse, The processing based on the relay frame can be continued.
このように、本発明のネットワークシステムによれば、中継装置が故障した場合でも、代理送信等の特別な処理に依存することなく、正常な動作を継続することができる。
ところで、通信フレームが、フレーム種別を識別するためのフレーム識別子を有する場合、中継装置は、フレーム識別子によって、中継フレームであるか否かを判断するように構成されていてもよい。
As described above, according to the network system of the present invention, even when the relay device fails, normal operation can be continued without depending on special processing such as proxy transmission.
By the way, when the communication frame has a frame identifier for identifying the frame type, the relay apparatus may be configured to determine whether or not it is a relay frame based on the frame identifier.
即ち、本発明は、このような形態の車載ネットワークの一つであるCANに対して好適に適用することができる。
また、車載ネットワークにおいて、フレーム種別毎に通信フレームの送出タイミングが設定されている場合、中継装置は、送出タイミングによって、中継フレームであるか否かを判断するように構成されていてもよい。
In other words, the present invention can be suitably applied to CAN which is one of the in-vehicle networks of such a form.
In the in-vehicle network, when the transmission timing of the communication frame is set for each frame type, the relay device may be configured to determine whether the frame is a relay frame based on the transmission timing.
即ち、本発明は、このような形態の車載ネットワークの一つであるFlexRay(Daimler Chrysler AG の登録商標)に対して好適に適用することができる。
ところで、指定情報を用いた中継フレームの振り分け方の一例として、具体的には、次の手法が考えられる。
That is, the present invention can be suitably applied to FlexRay (registered trademark of Daimler Chrysler AG), which is one of the on-vehicle networks having such a configuration.
By the way, specifically, the following method can be considered as an example of how to allocate the relay frame using the designation information.
即ち、中継装置がM(Mは2以上の整数)個存在する場合、中継装置のそれぞれには、0,1,…,M−1のいずれかの値を振分識別子として割り当て、通信元端末は、指定情報として、フレーム種別毎に管理され且つ通信フレームを送信する毎にインクリメントされる0〜M−1の値からなるシリアル番号を設定する。 That is, when there are M relay devices (M is an integer of 2 or more), each relay device is assigned one of 0, 1,..., M−1 as a distribution identifier, and the communication source terminal Sets, as the designation information, a serial number that is managed for each frame type and is incremented every time a communication frame is transmitted, and includes a value of 0 to M-1.
そして、中継装置は、中継フレームの指定情報として設定されたシリアル番号をMで割った余りが、自身の中継装置に割り当てられた振分識別子と一致する場合に、その中継フレームの中継を行う。 Then, the relay device relays the relay frame when the remainder obtained by dividing the serial number set as the relay frame designation information by M matches the distribution identifier assigned to the relay device.
このように構成された本発明のネットワークシステムによれば、中継装置の設置数が増減した場合に、通信元端末で設定するシリアル番号の上限値と、中継装置に割り当てる振分識別子を適宜変更するだけで簡単に対応することができる。 According to the network system of the present invention configured as described above, when the number of installed relay apparatuses increases or decreases, the upper limit value of the serial number set in the communication source terminal and the distribution identifier assigned to the relay apparatus are changed as appropriate. Just a simple response.
本発明のネットワークシステムにおいて、中継フレームが、フレーム種別毎に決められた設定周期で送信されるように設定されている場合、中継装置は、フレーム種別毎に、最後の中継からの経過時間を計測し、その経過時間が、設定周期に基づいて設定された途絶判定閾値を経過した場合に、予め設定された代理フレームを送信してもよい。 In the network system of the present invention, when the relay frame is set to be transmitted at a set cycle determined for each frame type, the relay device measures the elapsed time from the last relay for each frame type. Then, when the elapsed time has passed the interruption determination threshold set based on the set cycle, a preset proxy frame may be transmitted.
このように構成された本発明のネットワークシステムによれば、何等かの理由で通信元端末と中継装置との間(即ち、通信元端末が接続された車載ネットワーク内)で中継フレームが消失した場合に、代理フレームが送信されるため、通信先端末では、その代理フレームを用いて処理を継続することができる。 According to the network system of the present invention configured as described above, when the relay frame is lost between the communication source terminal and the relay device for some reason (that is, in the in-vehicle network to which the communication source terminal is connected). In addition, since the proxy frame is transmitted, the communication destination terminal can continue the processing using the proxy frame.
また、本発明のネットワークシステムによれば、通信フレームの受信状態を監視することによって、通信フレームの欠落が発生した場合の原因を、代理フレームの受信がなければ中継装置の異常、代理フレームの受信があれば通信元ネットワークの異常であると絞り込むことができ、その結果、異常への対処を的確に行うことができると共に、修理に要する手間も軽減することができる。 In addition, according to the network system of the present invention, by monitoring the reception state of the communication frame, the cause when the communication frame is lost is determined as follows. If there is an error, it can be narrowed down to an abnormality in the communication source network. As a result, the abnormality can be dealt with accurately and the labor required for repair can be reduced.
ここで、中継装置が送信する代理フレームは、最低限必要な精度が確保されるような規定値を設定したものであってもよいが、例えば、中継装置に、フレーム種別毎に最後に中継した中継フレームを保持フレームとして記憶させ、この保持フレームを代理フレームとして送信させるように構成してもよい。 Here, the proxy frame transmitted by the relay device may be set with a specified value that ensures the minimum required accuracy. For example, the relay frame is last relayed to the relay device for each frame type. The relay frame may be stored as a holding frame, and the holding frame may be transmitted as a proxy frame.
この場合、通信先端末では、前回の中継フレームで受信したものと同じ値を用いて処理を実行することになるため、処理精度を大きく劣化させることなく処理を継続することができる。 In this case, in the communication destination terminal, the process is executed using the same value as that received in the previous relay frame, so that the process can be continued without greatly degrading the processing accuracy.
なお、中継装置は、代理フレームに、代理送信された通信フレームであることを示す情報を含ませることが望ましい。なお、中継フレームには、その情報を設定する領域が予め用意されていてもよいし、中継装置が新たに付加するようにしてもよい。但し、後者の場合は、通信元ネットワークと通信先ネットワークとで中継フレームのフレーム長が変化してしまうため、前者の方が望ましい。 It is desirable that the relay device includes information indicating that the proxy frame is a communication frame transmitted by proxy. Note that an area for setting the information may be prepared in advance in the relay frame, or a relay device may newly add the area. However, in the latter case, since the frame length of the relay frame changes between the communication source network and the communication destination network, the former is preferable.
また、中継フレームの設定周期は、その中継フレームを使用する処理において要求される処理精度を確保するために最低限必要な受信間隔の半分以下に設定されていることが望ましい。 Further, it is desirable that the setting period of the relay frame is set to be equal to or less than half of the minimum necessary reception interval in order to ensure the processing accuracy required in the processing using the relay frame.
この場合、いずれか一つの中継装置が故障した場合に、通信先端末での処理を、精度を低下させることなく継続することができる。 In this case, when any one of the relay devices fails, the processing at the communication destination terminal can be continued without reducing accuracy.
以下に本発明の実施形態を図面と共に説明する。
<全体構成>
図1は、実施形態のネットワークシステム1の概要を示すブロック図である。
Embodiments of the present invention will be described below with reference to the drawings.
<Overall configuration>
FIG. 1 is a block diagram illustrating an overview of a network system 1 according to the embodiment.
ネットワークシステム1は、図1に示すように、それぞれバス状の通信線(以下「バスライン」と称する。)L1に端末装置として接続された複数の電子制御ユニット(ECU)20(20a,20b,…)からなる車載ネットワークとしての第1車載LAN(Local Area Network)3と、バスラインL2に端末装置として接続された複数のECU30(30a,30b,…)からなる車載ネットワークとしての第2車載LAN5と、第1及び第2車載LAN3,5を相互接続する中継装置10(10a,10b)とを備えている。
As shown in FIG. 1, the network system 1 includes a plurality of electronic control units (ECUs) 20 (20a, 20b, ...) a first in-vehicle LAN (Local Area Network) 3 as an in-vehicle network, and a second in-
なお、第1及び第2車載LAN3,5を介して行うデータ通信は、車載LANで一般的に利用されているCAN(ドイツ、Robert Bosch社が提案した「Controller Area Network 」)プロトコルを用いている。
The data communication performed via the first and second in-
<通信フレームの構成>
第1及び第2車載LAN3,5で使用される通信フレームは、フレームの開始を表すスタートオブフレーム、フレームの優先順位等を表すアービトレーションフィールド、データのバイト数等を表すコントロールフィールド、転送するデータの実体であるデータフィールド、フレームの誤りをチェックするためのCRCを付加するCRCフィールド、正しいメッセージを受信したユニットからの通知(ACK)を受けるACKフィールド、フレームの終了を表すエンドオブフレームからなり、CANプロトコルにおいて周知のものである。
<Configuration of communication frame>
The communication frames used in the first and second in-
ここで、中継装置10を介した中継を行う際に使用する通信フレームである中継フレームについて説明する。
図2は、中継フレームの構成のうち、以下の説明で必要となるアービトレーションフィールド(以下「ID領域」という)、及びデータフィールド(以下「DT領域」という)を抽出したものである。
Here, a relay frame that is a communication frame used when relaying via the
FIG. 2 shows an extracted arbitration field (hereinafter referred to as “ID region”) and data field (hereinafter referred to as “DT region”) necessary for the following description from the configuration of the relay frame.
図2に示すように、ID領域には、DT領域にどのようなメッセージが割り付けられたフレームか(即ち、フレーム種別)を識別すると共に、メッセージの優先度を示すためのIDコード(フレーム識別子)が設定される。 As shown in FIG. 2, in the ID area, an ID code (frame identifier) for identifying the message assigned to the DT area (that is, the frame type) and indicating the priority of the message is shown. Is set.
中継フレームのDT領域は、中継装置10による中継を制御するための中継制御領域(CTF)と、ECU間で送受信されるデータの実体である転送データ領域(DTF)とからなる。
The DT area of the relay frame includes a relay control area (CTF) for controlling relaying by the
そして、CTFには、ECU20,30から送信された通常の中継フレームであるか、中継装置10にて代理送信された代理フレーム(後述する)であるかを示す代理フラグFと、フレーム種別毎に個別に管理され、個々の中継フレームを識別するための識別情報となるシリアル番号SNとが設定される。なお、本実施形態では、フラグは1ビットで構成され、0が通常フレーム、1が代理フレームを表す。また、シリアル番号SNは7ビットで構成され、00H〜8FHの値が設定される。
The CTF includes a proxy flag F indicating whether it is a normal relay frame transmitted from the
<ECU>
ECU20(又は30)は、いずれも基本的には同様の構成をしており、バスラインL1(又はL2)へのデータの送出、バスラインL1(又はL2)からのデータの取込を行うトランシーバ、周知のCANプロトコルに従って車載LAN3(又は5)を介した通信を制御するCANコントローラからなる通信回路21と、CPU,ROM,RAM,I/Oを中心に構成され、CANコントローラを制御して他のECUとの通信を行うことにより、他のECUと連動して、自ECUに割り当てられた機能を実現するための各種処理を実行するマイクロコンピュータ(マイコン)22とを備えている。
<ECU>
The ECU 20 (or 30) basically has the same configuration, and is a transceiver that sends data to the bus line L1 (or L2) and takes data from the bus line L1 (or L2). The
各ECU20,30には、他のECUに送信するメッセージのIDコード(送信ID)と、自身が受信すべきメッセージのIDコード(受信ID)が割り当てられ、また、マイコン22を構成するRAMには、送信ID毎にシリアル番号SNを管理する領域が用意されている。なお、このシリアル番号SNは、使用される毎(その領域に対応する送信IDを付与した通信フレームの送信を行う毎)に更新(インクリメント)される。
Each
そして、マイコン22は、通信フレームを送信する時には、メッセージの本体であるDT領域を生成してこれを通信回路21に供給する共に、通信回路21から供給されるDT領域の内容に従って各種処理を実行する。特に、送信する通信フレームが中継フレームである場合、マイコン22は、DT領域内に、送信するメッセージの送信IDに対応付けられたシリアル番号SNを設定したCTF領域を生成する。
When transmitting the communication frame, the
通信回路21は、マイコン22から供給されたDT領域を、送信IDを付与した通信フレームに載せて送信する共に、受信IDが付与された通信フレームの受信し、そのDT領域をマイコン22に供給する。
The
なお、通信フレームは、送信ID(フレーム種別)毎に、通信間隔が設定されており、その通信間隔は、該通信フレームに基づく処理を実行する通信先ECUが、所望の処理精度を確保できる必要最低限の受信間隔の1/2以下の長さに設定されている。 Note that a communication interval is set for each transmission ID (frame type) in the communication frame, and it is necessary that the communication destination ECU that executes processing based on the communication frame can ensure a desired processing accuracy. The length is set to 1/2 or less of the minimum reception interval.
<中継装置>
中継装置10は、ECU20,30を構成する通信回路21、マイコン22と同様に構成された通信回路11,12、マイコン13と、代理フレームを記憶するための記憶回路14とを備えている。但し、通信回路11はバスラインL1に接続され、通信回路12はバスラインL2に接続されている。
<Relay device>
The
通信回路11には、第1車載LAN3に接続されたECU20から送信され、第2車載LAN5に接続されたECU30に中継する必要のある通信フレームのIDコード(中継ID)が割り当てられ、また、通信回路12には、第2車載LAN5に接続されたECU30から送信され、第1車載LAN3に接続されたECU20に中継する必要のある通信フレームのIDコードが割り当てられている。そして、これら通信回路11,12に割り当てられたIDコード(中継ID)と一致する送信IDを有した通信フレームを中継フレームとして取り込むように設定されている。
An ID code (relay ID) of a communication frame that is transmitted from the
記憶回路14には、中継ID毎に少なくとも一つの通信フレームを記憶する領域が設けられている。以後、記憶回路14に記憶されている通信フレームを保持フレームという。また、マイコン13には、中継ID毎に、最後の中継からの経過時間を表す経過タイマーが設けられていると共に、中継フレームの受信が途絶しているか否かを判定するための途絶判定閾値が設定されている。
The storage circuit 14 is provided with an area for storing at least one communication frame for each relay ID. Hereinafter, the communication frame stored in the storage circuit 14 is referred to as a holding frame. Further, the
なお、途絶判定閾値は、例えば、対象となる通信フレーム(中継フレーム)について設定された通信間隔に、システムの特性等に基づいて設定される許容遅延時間を加えた値を用いればよい。 For example, the interruption determination threshold value may be a value obtained by adding a permissible delay time set based on system characteristics or the like to a communication interval set for a target communication frame (relay frame).
また、各中継装置10には、中継を分担する中継フレームの振り分けに使用する振分識別子が割り当てられており、本実施形態では、中継装置10aの振分識別子が1、中継装置10bの振分識別子が0に設定されている。
Also, each
<中継処理>
ここで、中継装置10のマイコン13が実行する中継処理の内容を、図3に示すフローチャートに沿って説明する。なお、本処理は、中継装置10に電源が投入されると起動する。また、本処理と並行して、中継ID毎に設けられた経過タイマーを一定時間毎に更新(インクリメント)する処理が少なくとも実行される。
<Relay processing>
Here, the contents of the relay process executed by the
本処理が起動すると、まず、S110では、全ての経過タイマーをゼロクリアすることで初期化し、S120では、通信回路11,12が中継フレームを取り込んだか否かを判断し、中継フレームを取り込んでいる場合は、S130に進む。
When this processing is started, first, in S110, all elapsed timers are initialized by clearing them to zero, and in S120, it is determined whether or not the
S130では、取り込んだ中継フレームに設定されているシリアル番号SNを参照して、中継を実行すべきか否かを判断する。ここでは、識別情報のLSB(即ち、識別情報を中継装置10の数2で割った余り)と、中継装置10に割り当てられた振分識別子とを比較し、両者が一致する場合に、中継を実行すべきであると判断する。
In S130, it is determined whether or not relaying should be executed with reference to the serial number SN set in the fetched relay frame. Here, the LSB of the identification information (that is, the remainder obtained by dividing the identification information by the number 2 of the relay devices 10) is compared with the distribution identifier assigned to the
S130にて中継を実行すべきと判断した場合は、S140に進み、通信回路11,12のうち、中継フレームを取り込んだ側を受信側通信回路、他方の側を送信側通信回路として、受信側通信回路が取り込んだ中継フレームを送信側通信回路に送信させる。
If it is determined in S130 that the relay should be executed, the process proceeds to S140, and the
S150では、その送信した中継フレームによって、記憶回路14に記憶されている保持フレームを更新し、S160では、中継に係る経過タイマーを初期化して、S120に戻る。 In S150, the holding frame stored in the storage circuit 14 is updated with the transmitted relay frame. In S160, an elapsed timer related to relay is initialized, and the process returns to S120.
先のS120にて、中継フレームを取り込んでいないと判断した場合、又は先のS130にて、中継を実行すべきではないと判断した場合は、S170に進む。但し、S130からS170に移行する場合は、取り込んだ中継フレームをそのまま破棄する。 If it is determined in the previous S120 that the relay frame has not been captured, or if it is determined in the previous S130 that the relay should not be executed, the process proceeds to S170. However, when shifting from S130 to S170, the fetched relay frame is discarded as it is.
S170では、途絶判定閾値を超えた経過タイマー(以下「時間超過タイマー」という)が存在するか否かを判断し、存在しなければ、S120に戻る。
S170にて、時間超過タイマーが存在すると判断した場合は、S180に進み、その時間超過タイマーに対応付けられた中継IDの保持フレームを、代理フレームとして送信側通信回路に送信させ、続く、S190では、代理送信に係る経過タイマーを初期化してS120に戻る。
In S170, it is determined whether or not there is an elapsed timer (hereinafter referred to as “time excess timer”) exceeding the interruption determination threshold value. If not, the process returns to S120.
If it is determined in S170 that there is an overtime timer, the process proceeds to S180, where the relay ID holding frame associated with the overtime timer is transmitted to the transmission side communication circuit as a proxy frame, and in S190, Then, the elapsed timer for proxy transmission is initialized and the process returns to S120.
<動作>
次に、ネットワークシステム1による通信フレームの中継動作について説明する
但し、各車載LAN3,5上における通信フレームの基本的な送受信動作は、ID領域を用いてビット単位非破壊アービトレイションを行う周知のCANプロトコルに従って実行されるものであるため、ここではその説明を省略する。
<Operation>
Next, the relay operation of the communication frame by the network system 1 will be described. However, the basic transmission / reception operation of the communication frame on each of the in-
ここで図4は、正常時における通信フレームの中継動作を示す説明図である。
なお、第2車載LAN5に接続されたECU30の一つをECU1、第1車載LAN3に接続されたECU20の一つをECU2、二つの中継装置10(10a,10b)をGW1(振分識別子=1),GW2(振分識別子=0)として、ECU1の送信ID、ECU2の受信ID、GW1,GW2の中継IDには、それぞれID=002Hが少なくとも含まれているものとする。即ち、ECU1から送信されるID=002Hに設定された通信フレームがGW1,GW2を介してECU2にて受信される場合について説明する。
Here, FIG. 4 is an explanatory diagram showing the relay operation of the communication frame at the normal time.
Note that one
図4に示すように、ECU1では、シリアル番号SNを順次インクリメントしながらIDが002Hに設定された通信フレームを一定の通信間隔毎に送信する。このとき代理フラグはF=0に設定されるため、通信フレームを送信する毎に、設定されるCTFの値は00H,01H,02H,…と変化する。 As shown in FIG. 4, the ECU 1 transmits a communication frame with an ID set to 002H at regular communication intervals while sequentially incrementing the serial number SN. At this time, since the proxy flag is set to F = 0, every time a communication frame is transmitted, the set CTF value changes as 00H, 01H, 02H,.
CTFのLSBが0(即ち、シリアル番号SNが偶数)に設定された通信フレームは、GW2を介し、CTFのLSBが1(シリアル番号SNが奇数)に設定された通信フレームは、GW1を介して、第2車載LAN5から第1車載LAN3に中継される。
A communication frame in which the LSB of the CTF is set to 0 (that is, the serial number SN is an even number) is via GW2, and a communication frame in which the LSB of the CTF is set to 1 (the serial number SN is an odd number) is via GW1. And relayed from the second in-
つまり、GW1,GW2は、IDが002Hに設定された通信フレームを交互に中継し、ECU2では、IDが002Hに設定された通信フレームを漏れなく受信することになる。 That is, GW1 and GW2 relay the communication frame with the ID set to 002H alternately, and the ECU 2 receives the communication frame with the ID set to 002H without omission.
次に図5は、GW2が故障した場合の動作を示す説明図である。
図5に示すように、ECU2では、GW1を介して中継された通信フレームだけが受信されることになる。つまり、正常時の通信間隔の倍の周期で通信フレームを受信することになるが、通信間隔は、元々、必要な処理精度を確保できる必要最低限の1/2の周期で送信されているため、周期が2倍になっても、ECU2にて必要な処理精度は確保されることになる。
Next, FIG. 5 is an explanatory diagram showing an operation when the GW 2 fails.
As shown in FIG. 5, the ECU 2 receives only the communication frame relayed via the GW 1. In other words, the communication frame is received at a cycle that is twice as long as the normal communication interval, but the communication interval is originally transmitted at a minimum half cycle that can ensure the required processing accuracy. Even if the cycle is doubled, the required processing accuracy is ensured in the ECU 2.
次に図6は、第2車載LAN5での障害により、一部の通信フレームをGW1,GW2が受信することができなかった場合の動作を示す説明図である。
図6に示すように、シリアル番号SNが03H及び04Hに設定された通信フレームが障害の影響を受けたものとする。GW1では、シリアル番号SNが03Hの通信フレームを確認できないため、前回の中継(シリアル番号SNが01Hの通信フレームの中継)時に初期化された経過タイマーが途絶判定閾値に達した時点で、保持フレーム(即ち、前回の中継フレーム)を代理フレームとして送信する。
Next, FIG. 6 is an explanatory diagram showing an operation when a part of communication frames cannot be received by the GW 1 and the GW 2 due to a failure in the second in-
As shown in FIG. 6, it is assumed that the communication frame in which the serial numbers SN are set to 03H and 04H is affected by the failure. Since the GW 1 cannot confirm the communication frame with the serial number SN of 03H, when the elapsed timer initialized at the previous relay (relay of the communication frame with the serial number SN of 01H) reaches the interruption determination threshold, the holding frame (That is, the previous relay frame) is transmitted as a proxy frame.
一方、GW2では、シリアル番号SNが04Hの通信フレームを確認できないため、前回の中継(シリアル番号SNが02Hの通信フレームの中継)時に初期化された経過タイマーが途絶判定閾値に達した時点で、保持フレーム(即ち、前回の中継フレーム)を代理フレームとして送信する。 On the other hand, in GW2, since the communication frame with the serial number SN of 04H cannot be confirmed, when the elapsed timer initialized at the previous relay (relay of the communication frame with the serial number SN of 02H) reaches the disruption determination threshold, The holding frame (that is, the previous relay frame) is transmitted as a proxy frame.
なお、GW1,GW2にて代理フレームを送信する時には、CTFの代理フラグFを1に設定するため、CTFの値は、シリアル番号SNそのものではなく、シリアル番号SNに80Hを加えた値となる。 When the proxy frame is transmitted by GW1 and GW2, since the CTF proxy flag F is set to 1, the value of CTF is not the serial number SN itself but a value obtained by adding 80H to the serial number SN.
その後、障害から復帰すると、正常時の動作が行われる。
これにより、ECU2では、シリアル番号SNが03H,04Hの通信フレームを受信することができないが、代わりに、代理フラグFが1に設定され且つシリアル番号SNが01H,02H(即ち、CTFは81H,82H)の代理フレームを受信することになる。
After that, when recovering from the failure, normal operation is performed.
As a result, the ECU 2 cannot receive the communication frame with the serial number SN of 03H and 04H. Instead, the proxy flag F is set to 1 and the serial number SN is 01H and 02H (that is, the CTF is 81H, 82H) will be received.
<効果>
以上説明したように、ネットワークシステム1では、二つの車載LAN3,5を二つの中継装置10a,10bで接続し、同一のIDコード(フレーム種別)を有する中継フレームは、二つの中継装置10a,10bで交互に中継されるように設定されている。
<Effect>
As described above, in the network system 1, two in-
従って、ネットワークシステム1によれば、一方の中継装置10が故障した場合には、同一IDコードを有する中継フレームの受信間隔が2倍に粗くなるものの、特定のIDコードを有する中継フレームの受信が途絶えてしまうことがないため、その中継フレームに基づく処理を継続することができる。
Therefore, according to the network system 1, when one of the
しかも、ネットワークシステム1によれば、IDコード毎に通信周期が設定され、その通信周期は、受信側ECU20,30において、所望の処理精度を確保するために必要な受信周期の1/2に設定されているため、中継装置10の故障によって、中継フレームの受信間隔が2倍になっても、その処理について最低限必要な処理精度を確保することができる。
Moreover, according to the network system 1, a communication cycle is set for each ID code, and the communication cycle is set to ½ of the reception cycle necessary for ensuring the desired processing accuracy in the receiving
つまり、ネットワークシステム1によれば、いずれか一方の中継装置10に異常が発生した場合に、中継装置10は互いの動作状態を監視しなくても、十分な対処できるようにされているため、中継装置10の構成を簡易なものとすることができる。
That is, according to the network system 1, when an abnormality occurs in any one of the
また、ネットワークシステム1では、中継装置10が、中継フレームのIDコード(中継ID)毎に、先の中継からの経過時間を計測する経過タイマーを備え、その経過タイマーが途絶判定閾値に達すると代理フレームを送信するようにされている。
Further, in the network system 1, the
従って、ネットワークシステム1によれば、中継フレームの受信状態を監視することによって、中継フレームの欠落が発生した場合に、代理フレームの受信がなければ中継装置10の異常、代理フレームの受信があれば通信元ネットワークの異常であるものとして異常の原因を絞り込むことができ、その結果、異常への対処を的確に行うことができ、また、修理に要する手間を軽減することもできる。
Therefore, according to the network system 1, by monitoring the reception state of the relay frame, when the relay frame is lost, if there is no reception of the proxy frame, there is an abnormality in the
また、ネットワークシステム1では、中継フレームにシリアル番号SNを付与すると共に、中継装置10に振分識別子を割り当て、シリアル番号SNを中継装置10の数で割った値が振分識別子と一致するか否かによって、中継フレームの振り分けを行っている。
In the network system 1, the serial number SN is assigned to the relay frame, the distribution identifier is assigned to the
従って、ネットワークシステム1によれば、中継装置10の数を変更した場合に、ECU20,30で設定するシリアル番号SNの上限値((中継装置10の数の整数倍)−1に設定)と、各中継装置10に割り当てる振分識別子を適宜変更するだけで簡単に対応することができる。
[他の実施形態]
以上本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、本発明の要旨を逸脱しない範囲において様々な態様にて実施することが可能である。
Therefore, according to the network system 1, when the number of the
[Other Embodiments]
Although one embodiment of the present invention has been described above, the present invention is not limited to the above embodiment, and can be implemented in various modes without departing from the gist of the present invention.
例えば、上記実施形態では、中継装置10の通信回路11,12によって中継フレームを一旦取り込んでから、シリアル番号SNを確認して中継を実行すべきか否かを判断しているが、通信回路11,12を、シリアル番号SNを参照できるように構成し、IDコードが中継IDと一致し且つシリアル番号SNが中継を実行すべきものである場合のみ、その通信フレームを取り込むように構成してもよい。
For example, in the above-described embodiment, the relay frame is temporarily captured by the
上記実施形態では、中継フレームに予め用意された中継制御領域CTF中に代理フラグFの領域を確保しているが、中継装置10が代理フラグFの領域を新たに追加するように構成してもよい。
In the above embodiment, the proxy flag F area is secured in the relay control area CTF prepared in advance in the relay frame. However, the
但し、その場合、中継フレームの通信元と通信SS空き元と中継先でデータ長が変化するため、中継元となる送信フレームに予め領域が確保されている方がより望ましい。
上記実施形態では、中継装置10が代理フレームを送信する機能を備えているが、この機能は省略されていてもよい。
However, in this case, since the data length varies between the communication source of the relay frame, the communication SS vacant source, and the relay destination, it is more preferable that an area is secured in advance in the transmission frame serving as the relay source.
In the above embodiment, the
上記実施形態では、代理フレームとして、保持フレーム(即ち、前回の中継フレーム)を用いているが、故障時に必要最低限の処理精度が確保されるような固定値を用いて、中継ID毎に予め設定された固定フレームを用いてもよい。 In the above embodiment, the holding frame (that is, the previous relay frame) is used as the proxy frame. However, a fixed value that ensures the minimum necessary processing accuracy at the time of failure is used in advance for each relay ID. A fixed frame that has been set may be used.
上記実施形態では、シリアル番号SNを用いて、二つの中継装置10に中継フレームを振り分けているが、中継フレームを送信するECU20,30にて、シリアル番号SNの代わりに振分識別子(連番である必要はない)そのものを順番に付与するように構成してもよい。
In the above embodiment, the relay frame is distributed to the two
上記実施形態では、車載LAN3,5としてCANを用いているが、これに限るものではなく、例えば、FlexRay(Daimler Chrysler AG の登録商標)を用いてもよい。
この場合、ECU20,30は、フレーム種別(メッセージの内容)毎に割り当てられた送出タイミング(セグメント)を用いて通信フレームを送信し、中継装置10は、その送出タイミングによって、中継フレームであるか否かを判断するように構成すればよい。
In the above embodiment, the CAN is used as the in-
In this case, the
しかし、このようにフレーム種別と送出タイミングとを一意に関連付けない場合は、IDコードを設定するID領域を、中継制御領域CTFと同様にデータ領域内に設け、中継装置10は、このデータ領域内のID領域を参照することによって、中継フレームであるか否かを判断するように構成すればよい。
However, when the frame type and the transmission timing are not uniquely associated as described above, an ID area for setting the ID code is provided in the data area in the same manner as the relay control area CTF, and the
1…ネットワークシステム 3,5…車載LAN 10…中継装置 11,12,21…通信回路 13,22…マイクロコンピュータ(マイコン) 14…記憶回路 20,30…ECU L1,L2…バスライン
DESCRIPTION OF SYMBOLS 1 ...
Claims (8)
通信フレームのうち前記車載ネットワーク間で中継する必要のあるものを中継フレームとして、該中継フレームには中継時に経由させる前記中継装置を指定するための指定情報が少なくとも含まれ、
前記中継装置は、前記中継フレームの中継の要否を前記指定情報に従って判断し、
前記中継フレームの通信元となる端末装置である通信元端末は、同一種別に分類される前記中継フレームが、同一の前記中継装置を連続して経由することがないように、前記指定情報の設定を行うことを特徴とするネットワークシステム。 A network system configured by interconnecting in-vehicle networks with a plurality of relay devices,
Among the communication frames, those that need to be relayed between the in-vehicle networks are used as relay frames, and the relay frames include at least designation information for designating the relay device to be relayed at the time of relaying,
The relay device determines whether the relay frame needs to be relayed according to the designation information;
The communication source terminal, which is a terminal device serving as a communication source of the relay frame, sets the designation information so that the relay frames classified into the same type do not pass through the same relay device continuously. A network system characterized by
前記中継装置は、前記フレーム識別子によって、前記中継フレームであるか否かを判断することを特徴とする請求項1に記載のネットワークシステム。 The communication frame has a frame identifier for identifying a frame type,
The network system according to claim 1, wherein the relay apparatus determines whether the relay frame is the relay frame based on the frame identifier.
前記中継装置は、前記送出タイミングによって、前記中継フレームであるか否かを判断することを特徴とする請求項1に記載のネットワークシステム。 In the in-vehicle network, the transmission timing of the communication frame is set for each frame type,
The network system according to claim 1, wherein the relay device determines whether the relay frame is based on the transmission timing.
前記通信元端末は、前記指定情報として、前記フレーム種別毎に管理され且つ前記通信フレームを送信する毎にインクリメントされる0〜M−1の値からなるシリアル番号を設定し、
前記中継装置は、前記中継フレームの前記指定情報として設定された前記シリアル番号をMで割った余りが、該中継装置に割り当てられた前記振分識別子と一致する場合に、該中継フレームの中継を行うことを特徴とする請求項1乃至請求項3のいずれか1項に記載のネットワークシステム。 There are M relay devices (M is an integer equal to or greater than 2), and each of the relay devices is assigned any one of 0, 1,..., M−1 as a distribution identifier,
The communication source terminal sets, as the designation information, a serial number that is managed for each frame type and that is incremented every time the communication frame is transmitted, and includes a value of 0 to M−1.
The relay device relays the relay frame when the remainder obtained by dividing the serial number set as the designation information of the relay frame by M matches the distribution identifier assigned to the relay device. The network system according to claim 1, wherein the network system is performed.
前記中継装置は、前記フレーム種別毎に、最後の中継からの経過時間を計測し、該経過時間が、前記設定周期に基づいて設定された途絶判定閾値を経過した場合に、予め設定された代理フレームを送信することを特徴とする請求項1乃至請求項4のいずれか1項に記載のネットワークシステム。 The relay frame is transmitted at a set cycle determined for each frame type,
The relay device measures the elapsed time from the last relay for each frame type, and when the elapsed time has passed the interruption determination threshold set based on the set cycle, The network system according to any one of claims 1 to 4, wherein a frame is transmitted.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009253342A JP5182269B2 (en) | 2009-11-04 | 2009-11-04 | Network system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009253342A JP5182269B2 (en) | 2009-11-04 | 2009-11-04 | Network system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2011101115A JP2011101115A (en) | 2011-05-19 |
JP5182269B2 true JP5182269B2 (en) | 2013-04-17 |
Family
ID=44191954
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009253342A Expired - Fee Related JP5182269B2 (en) | 2009-11-04 | 2009-11-04 | Network system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5182269B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5672275B2 (en) | 2012-08-28 | 2015-02-18 | 株式会社デンソー | Network system |
JP6451399B2 (en) * | 2015-02-25 | 2019-01-16 | 株式会社デンソー | Relay device |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH01122230A (en) * | 1987-11-06 | 1989-05-15 | Hitachi Ltd | Data transmission system for network system |
JP2004328049A (en) * | 2003-04-21 | 2004-11-18 | Mitsubishi Electric Corp | Network system |
-
2009
- 2009-11-04 JP JP2009253342A patent/JP5182269B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2011101115A (en) | 2011-05-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10404721B2 (en) | Communication device for detecting transmission of an improper message to a network | |
US10153825B2 (en) | Vehicle-mounted control device | |
JP6451546B2 (en) | Communication network and relay device | |
JP2007038904A (en) | Car-mounted gateway device and message forwarding method used in gateway device | |
JP6760199B2 (en) | In-vehicle communication system, in-vehicle relay device and message relay method | |
EP0507579A2 (en) | Multiplexed transmission between nodes with cyclic redundancy check calculation | |
JP6390520B2 (en) | In-vehicle communication system | |
JP2009253557A (en) | On-board relay connection unit | |
CN111919422B (en) | Method for operating an ethernet on-board network of a motor vehicle, control unit and ethernet on-board network | |
JP4917669B2 (en) | In-vehicle relay connection unit | |
CN110574344B (en) | Network switch | |
JP2011213210A (en) | Electronic control unit and control system | |
JP5182269B2 (en) | Network system | |
JP2006340099A (en) | Gateway unit | |
JP2006253922A (en) | Gateway apparatus and data transfer method for the gateway apparatus | |
CN113545012B (en) | Communication device, communication system, and message arbitration method | |
US10873918B2 (en) | Wireless communication terminal and communication control method for establishing efficient communication, and capable of suppressing a delay in the communication | |
CN114080786A (en) | Gateway device, data frame transmission method, and program | |
JP6200734B2 (en) | Communication control device | |
JP4754940B2 (en) | Relay connection unit | |
JP4361540B2 (en) | Gateway device, data transfer method, and program | |
JP2008109357A (en) | Packet transfer device and packet transfer method | |
JP2006319381A (en) | Method for transmitting urgent message | |
JP2014204160A (en) | Gateway unit | |
JP7110950B2 (en) | network system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120210 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20121214 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20121218 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121231 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5182269 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20160125 Year of fee payment: 3 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
LAPS | Cancellation because of no payment of annual fees |