JP2013082352A - Communication equipment for vehicle - Google Patents
Communication equipment for vehicle Download PDFInfo
- Publication number
- JP2013082352A JP2013082352A JP2011224188A JP2011224188A JP2013082352A JP 2013082352 A JP2013082352 A JP 2013082352A JP 2011224188 A JP2011224188 A JP 2011224188A JP 2011224188 A JP2011224188 A JP 2011224188A JP 2013082352 A JP2013082352 A JP 2013082352A
- Authority
- JP
- Japan
- Prior art keywords
- data
- message
- stored
- frame
- timing
- 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
Links
Images
Landscapes
- Communication Control (AREA)
Abstract
Description
本発明は、メッセージバッファを利用してメッセージの送受信を行う車両用通信装置に関する。 The present invention relates to a vehicle communication apparatus that transmits and receives messages using a message buffer.
車両において制御の高度化やサービスの充実を図るために、電子制御ユニット(ECU)等の車載機器同士を通信バスで相互に接続してローカルエリアネットワーク(いわゆる車内LAN)を構成し、車載機器間で情報を共有することが行われており(例えば、特許文献1を参照)、特に車内LANに多用されている通信プロトコルとして、CSMA/CD方式の一つであるCAN(Controller Area Network )プロトコルが知られている。 In order to enhance control and enhance services in vehicles, in-vehicle devices such as electronic control units (ECUs) are connected to each other via a communication bus to form a local area network (so-called in-vehicle LAN). (See, for example, Patent Document 1), and a CAN (Controller Area Network) protocol, which is one of the CSMA / CD systems, is a communication protocol that is frequently used for in-vehicle LANs. Are known.
このCANプロトコルでは、送信メッセージをフレーム化して通信バスへ送信する前には、送信メッセージの種類を表す識別IDコード(以下、CANIDという)が設定されたメッセージバッファに送信メッセージを格納するとともに、通信バスを介してフレームを受信した場合には、フレームから抽出した受信メッセージを、この受信メッセージに付与されているCANIDと同一のCANIDが予め設定されたメッセージバッファに格納するように規定されている。 In this CAN protocol, before a transmission message is framed and transmitted to a communication bus, the transmission message is stored in a message buffer in which an identification ID code (hereinafter referred to as CANID) indicating the type of the transmission message is set, and communication is performed. When a frame is received via the bus, it is defined that the received message extracted from the frame is stored in a message buffer in which the same CANID as the CANID assigned to the received message is stored.
近年、制御の高度化等により、車内LAN内の車載機器間でやり取りされる通信データ量が増大している。しかし、車載機器に搭載された通信装置内に設けられているメッセージバッファの数の上限は予め決められている(例えば32個)。このため、通信データ量が増大すると、メッセージバッファを増設しなければならなくなるという問題があった。 In recent years, with the advancement of control and the like, the amount of communication data exchanged between in-vehicle devices in the in-vehicle LAN has increased. However, the upper limit of the number of message buffers provided in the communication device mounted on the in-vehicle device is determined in advance (for example, 32). For this reason, when the amount of communication data increases, there is a problem that a message buffer must be added.
本発明は、こうした問題に鑑みてなされたものであり、予め設けられているメッセージバッファを用いて通信データ量の増大に対応することを可能とする技術を提供することを目的とする。 The present invention has been made in view of these problems, and an object of the present invention is to provide a technique that can cope with an increase in the amount of communication data using a message buffer provided in advance.
上記目的を達成するためになされた請求項1に記載の発明は、メッセージと、メッセージの種別であるメッセージ種別を示すメッセージ識別コードとが少なくとも格納される複数のメッセージバッファと、メッセージバッファに格納されたデータを抽出してフレームを構成し通信バス上に送信するとともに、通信バスを介してフレームを受信した場合には、受信したフレームから抽出したメッセージ識別コードと一致するメッセージ識別コードが格納されているメッセージバッファに、フレームから抽出したメッセージを格納する送受信手段とを備える車両用通信装置であって、第1格納手段が、メッセージ識別コード毎に予め設定された第1タイミングになると、第1タイミングに対応したメッセージ識別コードのメッセージについて予め設定された第1データ種別のデータと、第1データ種別を示す第1データ種別情報とを、第1タイミングに対応したメッセージ識別コードが格納されているメッセージバッファに格納するとともに、第2格納手段が、メッセージ識別コード毎に第1タイミングと異なるように予め設定された第2タイミングになると、第1タイミングに対応したメッセージ識別コードのメッセージについて第1データ種別と異なるように予め設定された第2データ種別のデータと、第2データ種別を示す第2データ種別情報とを、第2タイミングに対応したメッセージ識別コードが格納されているメッセージバッファに格納する。
In order to achieve the above-mentioned object, the invention according to
このように構成された車両用通信装置では、まず、第1タイミングになると、第1タイミングに対応したメッセージ識別コードのメッセージについて、第1データ種別のデータと、第1データ種別情報とが、第1タイミングに対応したメッセージ識別コードが格納されているメッセージバッファに格納される。これにより、メッセージバッファに格納されたメッセージ識別コード、第1データ種別のデータ、および第1データ種別情報が含まれるフレームが送信される。さらに、第1タイミングと異なる第2タイミングになると、第2タイミングに対応したメッセージ識別コードのメッセージについて、第1データ種別と異なる第2データ種別のデータと、第2データ種別情報とが、第2タイミングに対応したメッセージ識別コードが格納されているメッセージバッファに格納される。これにより、メッセージバッファに格納されたメッセージ識別コード、第2データ種別のデータ、および第2データ種別情報が含まれるフレームが送信される。つまり、同一のメッセージ識別コードを含みデータ種別の異なるデータを含む2種類のフレームがそれぞれ異なるタイミングで送信される。そして、この2種類のフレームにはそれぞれ、データ種別を示す情報が含まれている。 In the vehicle communication device configured as described above, first, at the first timing, the data of the first data type and the first data type information for the message of the message identification code corresponding to the first timing are It is stored in a message buffer in which a message identification code corresponding to one timing is stored. Thereby, a frame including the message identification code stored in the message buffer, the data of the first data type, and the first data type information is transmitted. Furthermore, at a second timing different from the first timing, for a message with a message identification code corresponding to the second timing, data of a second data type different from the first data type and second data type information are It is stored in a message buffer in which a message identification code corresponding to the timing is stored. Thereby, the frame including the message identification code stored in the message buffer, the data of the second data type, and the second data type information is transmitted. That is, two types of frames including the same message identification code and different data types are transmitted at different timings. Each of these two types of frames includes information indicating the data type.
このため、第1タイミングの直後に送信されたフレームを受信した通信装置は、この受信フレームから抽出したメッセージ識別コードと一致するメッセージ識別コードが格納されているメッセージバッファに、フレームから抽出したメッセージ(すなわち、第1データ種別のデータと第1データ種別情報)を格納する一方、第2タイミングの直後に送信されたフレームを受信した通信装置は、この受信フレームから抽出したメッセージ識別コードと一致するメッセージ識別コードが格納されているメッセージバッファに、フレームから抽出したメッセージ(すなわち、第2データ種別のデータと第2データ種別情報)を格納する。 Therefore, the communication device that has received the frame transmitted immediately after the first timing stores the message (from the frame) in the message buffer in which the message identification code that matches the message identification code extracted from the received frame is stored. That is, the communication device that has received the frame transmitted immediately after the second timing, while storing the data of the first data type and the first data type information), matches the message identification code extracted from the received frame. The message extracted from the frame (that is, the data of the second data type and the second data type information) is stored in the message buffer in which the identification code is stored.
したがって、同一のメッセージ識別コードが格納されているメッセージバッファに、データ種別が異なる2種類のデータを時分割で格納することができるとともに、同一のメッセージ識別コードが格納されているメッセージバッファに格納されたデータのデータ種別を第1データ種別情報および第2データ種別情報により認識することができる。 Therefore, two types of data having different data types can be stored in a time-division manner in the message buffer storing the same message identification code, and stored in the message buffer storing the same message identification code. The data type of the received data can be recognized from the first data type information and the second data type information.
これにより、第1データ種別のデータと第2データ種別のデータのそれぞれのデータ量が1つのメッセージバッファに記憶可能なデータ量を超えておらず、且つ、第1データ種別のデータと第2データ種別のデータとの総データ量が、1つのメッセージバッファに記憶可能なデータ量を超えている場合において、第1データ種別のデータを格納するためのメッセージバッファと、第2データ種別のデータを格納するためのメッセージバッファとを別々に設ける必要がなくなり、予め設けられているメッセージバッファを用いて通信データ量の増大に対応することが可能になる。 Thereby, the data amount of each of the data of the first data type and the data of the second data type does not exceed the data amount that can be stored in one message buffer, and the data of the first data type and the second data When the total data amount with the type data exceeds the data amount that can be stored in one message buffer, the message buffer for storing the data of the first data type and the data of the second data type are stored. It is no longer necessary to provide a separate message buffer for this purpose, and it is possible to cope with an increase in the amount of communication data using a message buffer provided in advance.
さらに、第1データ種別のデータと第2データ種別のデータの受信を必要とする車両用通信装置(以下、第1,2データ必要通信装置という)と、第1データ種別のデータの受信を必要とするとともに第2データ種別のデータの受信を不要とする車両用通信装置(以下、第2データ不要通信装置という)とが混在する車両用通信システムにおいて、或る車両用通信装置が第2データ種別のデータを含むフレームを送信した場合に、第1,2データ必要通信装置では、受信したフレームに第2データ種別情報が含まれるか否かを判断するための機能が必要である一方、第2データ不要通信装置では、受信したフレームに第2データ種別情報が含まれるか否かを判断するための機能が不要である。そして、車両用通信システムを構成する複数の車両用通信装置のうち、第2データ種別のデータを必要とする車両用通信装置(第1,2データ必要通信装置)のみに、第2データ種別情報が含まれるか否かを判断するための上記機能を追加すればよく、第2データ不要通信装置に対しては何らかの機能を追加することなく、第2データ種別のデータを送受信することが可能な車両用通信システムを構築することが可能となる。 Further, it is necessary to receive a vehicle communication device (hereinafter referred to as first and second data required communication device) that requires reception of data of the first data type and data of the second data type, and data of the first data type. And a vehicle communication device that does not require reception of data of the second data type (hereinafter referred to as a second data unnecessary communication device). When a frame including data of a type is transmitted, the first and second data-needed communication devices need a function for determining whether the received frame includes the second data type information. The two-data unnecessary communication apparatus does not need a function for determining whether or not the second data type information is included in the received frame. Of the plurality of vehicle communication devices constituting the vehicle communication system, the second data type information is provided only to the vehicle communication device (first and second data required communication devices) that require data of the second data type. Can be added to the second data unnecessary communication device without adding any function to the second data type communication device. It is possible to construct a vehicle communication system.
また、請求項1に記載の車両用通信装置において、請求項2に記載のように、第1データ種別情報は、第1データ種別のデータについて、予め設定された第1チェックサム算出式に基づいて算出された第1チェックサム値であり、第2データ種別情報は、第2データ種別のデータについて、第1チェックサム算出式と異なるように予め設定された第2チェックサム算出式に基づいて算出された第2チェックサム値であるようにしてもよいし、請求項3に記載のように、第1データ種別情報は、第1データ種別のデータについてのデータ長であり、第2データ種別情報は、第2データ種別のデータについてのデータ長であり、第1データ種別のデータと第2データ種別のデータとで、データ長が異なるようにしてもよい。
In the vehicle communication device according to
チェックサム値およびデータ長は、フレームに含まれる情報として、従来、広く利用されているものであり、チェックサム値またはデータ長を含むフレームを送受信するように構成された車両用通信システムにおいて、フレームに新たな情報を追加することなく、第1データ種別のデータと第2データ種別のデータとの識別を可能とすることができる。具体的には、送受信データの誤り検出のためにチェックサムを含むデータを送受信する通信システムでは第1,2データ種別情報としてチェックサム値を利用すればよく、データ長を含むデータを送受信する通信システムでは、第1,2データ種別情報としてデータ長を利用すればよい。 The checksum value and the data length are conventionally widely used as information included in the frame. In the vehicle communication system configured to transmit and receive a frame including the checksum value or the data length, It is possible to distinguish between data of the first data type and data of the second data type without adding new information. Specifically, in a communication system that transmits and receives data including a checksum for error detection of transmission and reception data, a checksum value may be used as the first and second data type information, and communication that transmits and receives data including a data length. In the system, the data length may be used as the first and second data type information.
(第1実施形態)
以下に本発明の第1実施形態を図面とともに説明する。
図1は、本発明が適用された車両用通信システム1の構成を示すブロック図である。
(First embodiment)
A first embodiment of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of a
車両用通信システム1は、車両に搭載され、図1に示すように、複数の電子制御装置(以下、ECUという)10a,10b,10c,…を、共通の通信バスBSを介して相互に通信可能となるように接続することで構成され、これらECU10a,10b,10c,…のそれぞれがノードとして機能するようにされている。なお、この車両用通信システム1では、通信プロトコルとしてCAN(CAN;Controller Area Network)が採用されている。以下、ECU10a,10b,10c…を特に区別しないでいずれか一つを指す場合は、ECU10と表記する。
A
ECU10a,10b,10c…としては、具体的には、エンジン制御を司るエンジンECU、ブレーキ制御を司るブレーキECU、ステアリング制御を司るステアリングECU、サスペンション制御を司るサスペンションECU、ライトのオン/オフを制御するECU等、種々の電子制御装置を挙げることができる。なお図1では、ECU10を5つ図示しているが、通信システム1を構成するECU10の数がこれに限定されないことは言うまでもない。
Specifically, the
ECU10は、CANプロトコルに従って他のECUとの通信を制御するCANコントローラ11と、CANコントローラ11と通信バスBSとの間でデータを送受信するためのCANトランシーバ12と、CANコントローラ11を介して他のECUとの間でメッセージを交換することにより、他のECUと連携して各種処理を実行する制御部13とを備えている。
The ECU 10 includes a
CANトランシーバ12は、予め規定された通信バスの電気的条件を満たす信号を確実に送受信するように構成されている。
CANコントローラ11は、ECU間で送受信されるメッセージ等を格納するためのメッセージバッファMBを複数(本実施形態で32個)備えたデータ格納部21と、メッセージバッファMBの格納値に基づいてメッセージをフレーム化し、CANトランシーバ12を介して通信バスBSに送信する送信制御、CANトランシーバ12を介してフレームを受信してメッセージの抽出等を行う受信制御、バス上でフレームが衝突した際のバス権の調停制御等、CANプロトコルに従った通信制御を実行するプロトコルコア部22と、プロトコルコア部22の送信制御および受信制御時に、データ格納部21へのアクセスを制御するアクセス制御部23とを備えている。
The
The
なお、データ格納部21に設けられたメッセージバッファMBのそれぞれには、メッセージバッファを識別するためのボックス番号(本実施形態では0〜31の整数値)が付与されている。
Each message buffer MB provided in the
また各メッセージバッファMBには、メッセージの種類および優先度を表す識別コード(以下、CANIDという)を格納するためのCANIDレジスタR1、メッセージのデータ長を示すDLC(Data Length Code)を格納するためのDLCレジスタR2、フレームに載せて送信するメッセージまたは受信フレームから抽出したメッセージを格納するためのメッセージレジスタR3が設けられている。なお、メッセージレジスタR3には1バイトのデータ記憶領域が8個設けられており、メッセージレジスタR3は最大8バイトのデータを記憶することができる。そして、1バイトのデータ記憶領域のそれぞれには、記憶領域を識別するためデータ番号(本実施形態では1〜8の整数値)が付与されている。以下、付与されたデータ番号がnであるデータ記憶領域を第nデータ記憶領域(nは1〜8の整数値)というとともに、付与されたデータ番号が1,2,3,4,5,6,7,8であるデータ記憶領域に格納されているデータをそれぞれ、data1,data2,data3,data4,data5,data6,data7,data8と表記する。 Each message buffer MB stores a CANID register R1 for storing an identification code (hereinafter referred to as CANID) indicating the type and priority of the message, and a DLC (Data Length Code) indicating the data length of the message. A DLC register R2 and a message register R3 for storing a message transmitted in a frame or a message extracted from a received frame are provided. The message register R3 has eight 1-byte data storage areas, and the message register R3 can store a maximum of eight bytes of data. Each 1-byte data storage area is assigned a data number (an integer value of 1 to 8 in this embodiment) for identifying the storage area. Hereinafter, the data storage area where the assigned data number is n is referred to as the nth data storage area (n is an integer value of 1 to 8), and the assigned data numbers are 1, 2, 3, 4, 5, 6 , 7 and 8 are represented as data1, data2, data3, data4, data5, data6, data7, and data8, respectively.
また制御部13は、CPU31、ROM32、およびRAM33を備え、ROM32が記憶するプログラムに基づく処理をCPU31が実行することにより、各種処理を実行する。例えば、他のECUに対して送信すべきメッセージ(以下、送信メッセージという)がある場合、メッセージの内容からそのメッセージに対応するCANIDを特定し、特定したCANIDが設定されているメッセージバッファMBのメッセージレジスタR3にメッセージを格納する。
The
また制御部13は、CANコントローラ11からフレームを受信した旨の通知を受けた場合に、メッセージバッファMBのメッセージレジスタR3の内容を読み出すことにより、他のECUからのメッセージを受信する。
Further, when receiving a notification that the frame has been received from the
このように構成されたECU10において、制御部13は、送信メッセージをメッセージバッファMBに格納する送信メッセージ格納処理と、メッセージバッファMBに格納された受信メッセージをRAM33に格納する受信メッセージ格納処理を実行する。
In the ECU 10 configured as described above, the
まず、制御部13が実行する送信メッセージ格納処理の手順を図2,3を用いて説明する。図2は送信メッセージ格納処理を示すフローチャートである。図3は、メッセージバッファMBのデータパターンを示す図である。この送信メッセージ格納処理は、ECU10が起動している間に繰り返し実行される処理である。
First, the procedure of the transmission message storage process executed by the
この送信メッセージ格納処理が実行されると、制御部13のCPU31は、まずS10にて、フレームを送信するタイミングに近づいているCANIDがあるか否かを判断する。ここで、フレームを送信するタイミングに近づいているCANIDがない場合には(S10:NO)、送信メッセージ格納処理を一旦終了する。一方、フレームを送信するタイミングに近づいているCANIDがある場合には(S10:YES)、S20にて、データパターン1で送信するタイミングであるか否かを判断する。
When this transmission message storage process is executed, the
なお、データパターン1は、下式(1)で算出されたサム値CSUM1が、メッセージバッファMBの第8データ記憶領域に格納されるものである(図3(a)を参照)。
In the
また、データパターン2は、下式(2)で算出されたサム値CSUM2が、メッセージバッファMBの第8データ記憶領域に格納されるものである(図3(b)を参照)。
In the
また、データパターン1でフレーム送信を実行するタイミングと、データパターン2でフレーム送信を実行するタイミングが、CANID毎に予め設定されている。
そしてS20にて、データパターン1で送信するタイミングである場合には(S20:YES)、S30にて、今回送信するデータ(すなわち、data1〜7)について上式(1)でサム値CSUM1を算出して、S50に移行する。
The timing for executing frame transmission with
If the transmission timing is the
一方、S20にて、データパターン1で送信するタイミングでない場合には(S20:NO)、データパターン2で送信するタイミングであると判断して、S40にて、今回送信するデータ(すなわち、data1〜7)について上式(2)でサム値CSUM2を算出して、S50に移行する。
On the other hand, if it is not the timing to transmit with
そしてS50に移行すると、フレームを送信するタイミングに近づいているとS10で判断されたCANIDが格納されたメッセージバッファMBの第1〜7データ記憶領域に、今回送信するデータ(data1〜7)を格納するとともに、第8データ記憶領域に、S30またはS40で算出されたサム値CSUM1またはサム値CSUM2を格納する。その後S60にて、S50の処理でメッセージバッファMBに格納されたメッセージをフレーム化して送信する処理をCANコントローラ11に実行させて、送信メッセージ格納処理を一旦終了する。
In S50, the data (
次に、制御部13が実行する受信メッセージ格納処理の手順を図4を用いて説明する。図4は受信メッセージ格納処理を示すフローチャートである。この受信メッセージ格納処理は、ECU10が起動している間に繰り返し実行される処理である。
Next, the procedure of the received message storage process executed by the
この受信メッセージ格納処理が実行されると、制御部13のCPU31は、まずS110にて、メッセージバッファMBにメッセージが格納されたか否かを判断する。ここで、メッセージバッファMBにメッセージが格納されていない場合には(S110:NO)、受信メッセージ格納処理を一旦終了する。一方、メッセージバッファMBにメッセージが格納された場合には(S110:YES)、S120にて、メッセージが格納されたとS110の処理で判断されたメッセージバッファMBのメッセージレジスタR3について上式(1)でサム値CSUM1を算出する。
When this received message storage process is executed, the
その後S130にて、S120で算出されたサム値CSUM1が、メッセージが格納されたとS110の処理で判断されたメッセージバッファMBのdata8と一致しているか否かを判断する。ここで、サム値CSUM1がdata8と一致している場合には(S130:YES)、S160に移行する。
Thereafter, in S130, it is determined whether or not the sum value CSUM1 calculated in S120 matches the
一方、サム値CSUM1がdata8と一致していない場合には(S130:NO)、S140にて、メッセージが格納されたとS110の処理で判断されたメッセージバッファMBのメッセージレジスタR3について上式(2)でサム値CSUM2を算出する。 On the other hand, when the sum value CSUM1 does not coincide with data8 (S130: NO), the above equation (2) is applied to the message register R3 of the message buffer MB determined in S140 that the message is stored in S140. To calculate the sum value CSUM2.
その後S150にて、S140で算出されたサム値CSUM2が、メッセージが格納されたとS110の処理で判断されたメッセージバッファMBのdata8と一致しているか否かを判断する。ここで、サム値CSUM2がdata8と一致していない場合には(S150:NO)、受信メッセージ格納処理を一旦終了する。一方、サム値CSUM2がdata8と一致している場合には(S150:YES)、S160に移行する。
Thereafter, in S150, it is determined whether or not the sum value CSUM2 calculated in S140 matches the
そしてS160に移行すると、メッセージが格納されたとS110で判断されたメッセージバッファMBのメッセージレジスタR3に格納されたメッセージを、制御用RAMにコピーし、受信メッセージ格納処理を一旦終了する。 In S160, the message stored in the message register R3 of the message buffer MB determined to have been stored in S110 is copied to the control RAM, and the received message storage process is temporarily terminated.
なお、制御用RAMは、RAM33内に設けられたデータ記憶領域であり、データ格納部21に設けられたメッセージバッファMBのそれぞれに対応して設けられている。これにより、制御部13のCPU31が、制御用RAMにコピーされたメッセージを参照し、このメッセージが示す情報を用いて、車両制御処理を実行することができる。
The control RAM is a data storage area provided in the
このように構成されたECU10では、メッセージと、メッセージの種別を示すCANIDとが少なくとも格納される複数のメッセージバッファMBと、メッセージバッファMBに格納されたデータを抽出してフレームを構成し通信バスBS上に送信するとともに、通信バスBSを介してフレームを受信した場合には、受信したフレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージを格納するCANコントローラ11とを備え、CANID毎に予め設定された、データパターン1でフレームを送信するタイミングに近づくと(S10:YES,S20:YES)、データパターン1のデータと、サム値CSUM1とを、このタイミングに対応したCANIDが格納されているメッセージバッファMBに格納する(S30,S50)とともに、データパターン2でフレームを送信するタイミングに近づくと(S10:YES,S20:NO)、データパターン2のデータと、サム値CSUM2とを、このタイミングに対応したCANIDが格納されているメッセージバッファMBに格納する(S40,S50)。
The thus configured ECU 10 extracts a plurality of message buffers MB storing at least a message and a CANID indicating a message type, extracts data stored in the message buffer MB, forms a frame, and configures a communication bus BS. When the frame is received via the communication bus BS, the CAN that stores the message extracted from the frame in the message buffer MB in which the CANID that matches the CANID extracted from the received frame is stored. The
このため、まず、データパターン1のデータとサム値CSUM1とがメッセージバッファMBに格納されることにより、このメッセージバッファMBに格納されたCANID、データパターン1のデータ、およびサム値CSUM1が含まれるフレームが送信される。さらに、データパターン2のデータとサム値CSUM2とがメッセージバッファMBに格納されることにより、このメッセージバッファMBに格納されたCANID、データパターン2のデータ、およびサム値CSUM2が含まれるフレームが送信される。つまり、同一のCANIDを含みデータ種別の異なるデータを含む2種類のフレームがそれぞれ異なるタイミングで送信される。そして、この2種類のフレームにはそれぞれ、データ種別を示す情報(すなわち、サム値CSUM1,2)が含まれている(以下、データパターン1のデータおよびサム値CSUM1を含むフレームを第1フレーム、データパターン2のデータおよびサム値CSUM2を含むフレームを第2フレームともいう)。
Therefore, first, the
このため、第1フレームを受信したECU10は、この受信フレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージ(すなわち、データパターン1のデータとサム値CSUM1)を格納する一方、第2フレームを受信したECU10は、この受信フレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージ(すなわち、データパターン2のデータとサム値CSUM2)を格納する。
Therefore, the ECU 10 that has received the first frame stores the message extracted from the frame (that is, the data of the
したがって、同一のCANIDが格納されているメッセージバッファMBに、データ種別が異なる2種類のデータを時分割で格納することができるとともに、同一のCANIDが格納されているメッセージバッファMBに格納されたデータのデータ種別をサム値CSUM1,2により認識することができる。 Therefore, two types of data having different data types can be stored in a time division manner in the message buffer MB in which the same CANID is stored, and the data stored in the message buffer MB in which the same CANID is stored. Can be recognized by the sum values CSUM1 and CSUM2.
これにより、データパターン1のデータとデータパターン2のデータのそれぞれのデータ量が1つのメッセージバッファMBに記憶可能なデータ量を超えておらず、且つ、データパターン1のデータとデータパターン2のデータとの総データ量が、1つのメッセージバッファMBに記憶可能なデータ量を超えている場合において、データパターン1のデータを格納するためのメッセージバッファMBと、データパターン2のデータを格納するためのメッセージバッファMBとを別々に設ける必要がなくなり、予め設けられているメッセージバッファMBを用いて通信データ量の増大に対応することが可能になる。
As a result, the data amount of each of the
さらに、データパターン1のデータとデータパターン2のデータの受信を必要とするECU10(以下、第1,2データ必要ECU10という)と、データパターン1のデータの受信を必要とするとともにデータパターン2のデータの受信を不要とするECU10(以下、第2データ不要ECU10という)とが混在する車両用通信システムにおいて、或るECU10がデータパターン2のデータを含むフレームを送信した場合に、第1,2データ必要ECU10では、受信したフレームにサム値CSUM2が含まれるか否かを判断するための機能が必要である一方、第2データ不要ECU10では、受信したフレームにサム値CSUM2が含まれるか否かを判断するための機能が不要である。
Furthermore, the ECU 10 that needs to receive the data of the
すなわち、データパターン2のフレームが不要なECU10(第2データ不要ECU10)における受信メッセージ格納処理は、図5に示すように、S140とS150の処理が省略されて、S130において、サム値CSUM1がdata8と一致していない場合には(S130:NO)、受信メッセージ格納処理を一旦終了するように構成された点以外は、データパターン2のフレームを必要とするECU10における受信メッセージ格納処理と同一である。
That is, in the received message storage process in the ECU 10 (second data unnecessary ECU 10) that does not require the frame of the
つまり、車両用通信システム1を構成する複数のECU10のうち、データパターン2のデータを必要とする車両用通信装置(第1,2データ必要ECU10)のみに、サム値CSUM2が含まれるか否かを判断するための上記機能を追加すればよく、第2データ不要ECU10に対しては何らかの機能を追加することなく、データパターン2のデータを送受信することが可能な車両用通信システム1を構築することが可能となる。
That is, whether or not the sum value CSUM2 is included only in the vehicle communication device (first and second data necessity ECU 10) that requires data of the
また、チェックサム値は、フレームに含まれる情報として、従来、広く利用されているものであり、チェックサム値を含むフレームを送受信するように構成された車両用通信システム1において、フレームに新たな情報を追加することなく、データパターン1のデータとデータパターン2のデータとの識別を可能とすることができる。
The checksum value has been widely used as information included in the frame. In the
以上説明した実施形態において、ECU10は本発明における車両用通信装置、CANコントローラ11は本発明における送受信手段、S30,S50の処理は本発明における第1格納手段、S40,S50の処理は本発明における第2格納手段である。
In the embodiment described above, the ECU 10 is the vehicle communication device according to the present invention, the
また、CANIDは本発明におけるメッセージ識別コード、S10とS20でYESと判断されるタイミングは本発明における第1タイミング、データパターン1のデータは本発明における第1データ種別のデータ、サム値CSUM1は本発明における第1データ種別情報、S10でYESと判断されS20でNOと判断されるタイミングは本発明における第2タイミング、データパターン2のデータは本発明における第2データ種別のデータ、サム値CSUM2は本発明における第2データ種別情報である。
CANID is the message identification code in the present invention, the timing determined as YES in S10 and S20 is the first timing in the present invention, the data of
また、式(1)は本発明における第1チェックサム算出式、サム値CSUM1は本発明における第1チェックサム値、式(2)は本発明における第2チェックサム算出式、サム値CSUM2は本発明における第2チェックサム値である。 Also, equation (1) is the first checksum calculation equation in the present invention, sum value CSUM1 is the first checksum value in the present invention, equation (2) is the second checksum calculation equation in the present invention, and sum value CSUM2 is the present one. It is a 2nd checksum value in invention.
(第2実施形態)
以下に本発明の第2実施形態を図面とともに説明する。なお第2実施形態では、第1実施形態と異なる部分のみを説明する。
(Second Embodiment)
A second embodiment of the present invention will be described below with reference to the drawings. In the second embodiment, only the parts different from the first embodiment will be described.
第2実施形態における車両用通信システム1は、送信メッセージ格納処理と受信メッセージ格納処理が変更された点以外は第1実施形態と同じである。
まず、第2実施形態における送信メッセージ格納処理の手順を図6,7を用いて説明する。図6は第2実施形態の送信メッセージ格納処理を示すフローチャートである。図7は、第2実施形態におけるメッセージバッファMBのデータパターンを示す図である。
The
First, the procedure of the transmission message storage process in the second embodiment will be described with reference to FIGS. FIG. 6 is a flowchart showing a transmission message storage process according to the second embodiment. FIG. 7 is a diagram illustrating a data pattern of the message buffer MB in the second embodiment.
この送信メッセージ格納処理が実行されると、制御部13のCPU31は、まずS210にて、フレームを送信するタイミングに近づいているCANIDがあるか否かを判断する。ここで、フレームを送信するタイミングに近づいているCANIDがない場合には(S210:NO)、送信メッセージ格納処理を一旦終了する。一方、フレームを送信するタイミングに近づいているCANIDがある場合には(S210:YES)、S220にて、データパターン1で送信するタイミングであるか否かを判断する。
When this transmission message storage process is executed, the
なお、データパターン11は、メッセージバッファMBのメッセージレジスタR3に8バイトのデータが格納されるものである(図7(a)を参照)。また、データパターン12は、メッセージバッファMBのメッセージレジスタR3に4バイトのデータが格納されるものである(図7(b)を参照)。
In the
また、データパターン11でフレーム送信を実行するタイミングと、データパターン12でフレーム送信を実行するタイミングが、CANID毎に予め設定されている。
そしてS220にて、データパターン11で送信するタイミングである場合には(S220:YES)、S230にて、フレームを送信するタイミングに近づいているとS210で判断されたCANIDが格納されたメッセージバッファMBのメッセージレジスタR3に、今回送信するデータ(data1〜8)を格納するとともに、データパターン11でのデータ長を示すデータ長値DLC1(本実施形態では8)をDLCレジスタR2に格納して、S250に移行する。
The timing for executing frame transmission with the
If it is time to transmit the
一方、S220にて、データパターン12で送信するタイミングでない場合には(S220:NO)、データパターン12で送信するタイミングであると判断して、S240にて、フレームを送信するタイミングに近づいているとS210で判断されたCANIDが格納されたメッセージバッファMBのメッセージレジスタR3に、今回送信するデータ(data1〜4)を格納するとともに、データパターン12でのデータ長を示すデータ長値DLC2(本実施形態では4)をDLCレジスタR2に格納して、S250に移行する。
On the other hand, if it is not the timing to transmit the
そしてS250に移行すると、S230またはS240の処理でメッセージバッファMBに格納されたメッセージをフレーム化して送信する処理をCANコントローラ11に実行させて、送信メッセージ格納処理を一旦終了する。
When the process proceeds to S250, the
次に、第2実施形態における受信メッセージ格納処理の手順を図8を用いて説明する。図8は第2実施形態の受信メッセージ格納処理を示すフローチャートである。
この受信メッセージ格納処理が実行されると、制御部13のCPU31は、まずS310にて、メッセージバッファMBにメッセージが格納されたか否かを判断する。ここで、メッセージバッファMBにメッセージが格納されていない場合には(S310:NO)、受信メッセージ格納処理を一旦終了する。一方、メッセージバッファMBにメッセージが格納された場合には(S310:YES)、S320にて、メッセージが格納されたとS310の処理で判断されたメッセージバッファMBのデータ長がデータ長値DLC1と一致しているか否かを判断する。
Next, the procedure of received message storage processing in the second embodiment will be described with reference to FIG. FIG. 8 is a flowchart showing the received message storage process of the second embodiment.
When this received message storage process is executed, the
ここで、データ長がデータ長値DLC1と一致している場合には(S320:YES)、S340に移行する。一方、データ長がデータ長値DLC1と一致していない場合には(S320:NO)、S330にて、メッセージが格納されたとS310の処理で判断されたメッセージバッファMBのデータ長がデータ長値DLC2と一致しているか否かを判断する。 If the data length matches the data length value DLC1 (S320: YES), the process proceeds to S340. On the other hand, if the data length does not match the data length value DLC1 (S320: NO), the data length of the message buffer MB determined in S310 that the message is stored in S330 is the data length value DLC2 It is judged whether or not.
ここで、データ長がデータ長値DLC2と一致している場合には(S330:YES)、S340に移行する。一方、データ長がデータ長値DLC2と一致していない場合には(S330:NO)、受信メッセージ格納処理を一旦終了する。 If the data length matches the data length value DLC2 (S330: YES), the process proceeds to S340. On the other hand, if the data length does not match the data length value DLC2 (S330: NO), the received message storage process is temporarily terminated.
そしてS340に移行すると、メッセージが格納されたとS110で判断されたメッセージバッファMBのメッセージレジスタR3に格納されたメッセージを、制御用RAMにコピーし、受信メッセージ格納処理を一旦終了する。 In S340, the message stored in the message register R3 of the message buffer MB determined to have been stored in S110 is copied to the control RAM, and the received message storage process is temporarily terminated.
このように構成されたECU10では、CANID毎に予め設定された、データパターン11でフレームを送信するタイミングに近づくと(S210:YES,S220:YES)、データパターン11のデータとデータ長値DLC1とを、このタイミングに対応したCANIDが格納されているメッセージバッファMBに格納する(S230)とともに、データパターン12でフレームを送信するタイミングに近づくと(S210:YES,S220:NO)、データパターン12のデータとデータ長値DLC2とを、このタイミングに対応したCANIDが格納されているメッセージバッファMBに格納する(S240)。
In the ECU 10 configured as described above, when the frame transmission timing set in advance for each CANID approaches the data pattern 11 (S210: YES, S220: YES), the data of the
このため、まず、データパターン11のデータとデータ長値DLC1とがメッセージバッファMBに格納されることにより、このメッセージバッファMBに格納されたCANID、データパターン11のデータ、およびデータ長値DLC1が含まれるフレームが送信される。さらに、データパターン12のデータとデータ長値DLC2とがメッセージバッファMBに格納されることにより、このメッセージバッファMBに格納されたCANID、データパターン12のデータ、およびデータ長値DLC2が含まれるフレームが送信される。つまり、同一のCANIDを含みデータ種別の異なるデータを含む2種類のフレームがそれぞれ異なるタイミングで送信される。そして、この2種類のフレームにはそれぞれ、データ種別を示す情報(すなわち、データ長値DLC1,2)が含まれている(以下、データパターン11のデータおよびデータ長値DLC1を含むフレームを第3フレーム、データパターン12のデータおよびデータ長値DLC2を含むフレームを第4フレームともいう)。
Therefore, first, the data of the
このため、第3フレームを受信したECU10は、この受信フレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージ(すなわち、データパターン11のデータとデータ長値DLC1)を格納する一方、第4フレームを受信したECU10は、この受信フレームから抽出したCANIDと一致するCANIDが格納されているメッセージバッファMBに、フレームから抽出したメッセージ(すなわち、データパターン12のデータとデータ長値DLC2)を格納する。
Therefore, the ECU 10 that has received the third frame stores the message extracted from the frame (that is, the data of the
したがって、同一のCANIDが格納されているメッセージバッファMBに、データ種別が異なる2種類のデータを時分割で格納することができるとともに、同一のCANIDが格納されているメッセージバッファMBに格納されたデータのデータ種別をデータ長値DLC1,2により認識することができる。 Therefore, two types of data having different data types can be stored in a time division manner in the message buffer MB in which the same CANID is stored, and the data stored in the message buffer MB in which the same CANID is stored. Can be recognized by the data length values DLC1 and DLC2.
これにより、データパターン11のデータとデータパターン12のデータのそれぞれのデータ量が1つのメッセージバッファMBに記憶可能なデータ量を超えておらず、且つ、データパターン11のデータとデータパターン12のデータとの総データ量が、1つのメッセージバッファMBに記憶可能なデータ量を超えている場合において、データパターン11のデータを格納するためのメッセージバッファMBと、データパターン12のデータを格納するためのメッセージバッファMBとを別々に設ける必要がなくなり、予め設けられているメッセージバッファMBを用いて通信データ量の増大に対応することが可能になる。
As a result, the data amount of the
またデータ長は、フレームに含まれる情報として、従来、広く利用されているものであり、データ長値を含むフレームを送受信するように構成された車両用通信システム1において、フレームに新たな情報を追加することなく、データパターン11のデータとデータパターン12のデータとの識別を可能とすることができる。
The data length has been widely used as information included in the frame in the past. In the
以上説明した実施形態において、S230の処理は本発明における第1格納手段、S240の処理は本発明における第2格納手段である。
また、S210とS220でYESと判断されるタイミングは本発明における第1タイミング、データパターン11のデータは本発明における第1データ種別のデータ、データ長値DLC1は本発明における第1データ種別情報、S210でYESと判断されS220でNOと判断されるタイミングは本発明における第2タイミング、データパターン12のデータは本発明における第2データ種別のデータ、データ長値DLC2は本発明における第2データ種別情報である。
In the embodiment described above, the process of S230 is the first storage means in the present invention, and the process of S240 is the second storage means in the present invention.
Further, the timing determined as YES in S210 and S220 is the first timing in the present invention, the data of the
以上、本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、本発明の技術的範囲に属する限り種々の形態を採ることができる。
例えば上記実施形態においては、データパターンが2種類であるものを示したが、3種類以上であってもよい。
As mentioned above, although one Embodiment of this invention was described, this invention is not limited to the said embodiment, As long as it belongs to the technical scope of this invention, a various form can be taken.
For example, in the above embodiment, two types of data patterns are shown, but three or more types may be used.
1…車両用通信システム、10…ECU、11…CANコントローラ、12…CANトランシーバ、13…制御部、21…データ格納部、22…プロトコルコア部、23…アクセス制御部、31…CPU、32…ROM、33…RAM、BS…通信バス、MB…メッセージバッファ、R1…CANIDレジスタ、R2…DLCレジスタ、R3…メッセージレジスタ
DESCRIPTION OF
Claims (3)
前記メッセージバッファに格納されたデータを抽出してフレームを構成し通信バス上に送信するとともに、該通信バスを介して前記フレームを受信した場合には、受信した前記フレームから抽出した前記メッセージ識別コードと一致する前記メッセージ識別コードが格納されている前記メッセージバッファに、前記フレームから抽出した前記メッセージを格納する送受信手段とを備える車両用通信装置であって、
前記メッセージ識別コード毎に予め設定された第1タイミングになると、該第1タイミングに対応した前記メッセージ識別コードの前記メッセージについて予め設定された第1データ種別のデータと、前記第1データ種別を示す第1データ種別情報とを、前記第1タイミングに対応した前記メッセージ識別コードが格納されている前記メッセージバッファに格納する第1格納手段と、
前記メッセージ識別コード毎に前記第1タイミングと異なるように予め設定された第2タイミングになると、該第1タイミングに対応した前記メッセージ識別コードの前記メッセージについて前記第1データ種別と異なるように予め設定された第2データ種別のデータと、前記第2データ種別を示す第2データ種別情報とを、前記第2タイミングに対応した前記メッセージ識別コードが格納されている前記メッセージバッファに格納する第2格納手段とを備える
ことを特徴とする車両用通信装置。 A plurality of message buffers storing at least a message and a message identification code indicating a message type which is the type of the message;
The data stored in the message buffer is extracted to form a frame and transmitted on the communication bus. When the frame is received via the communication bus, the message identification code extracted from the received frame A vehicular communication apparatus comprising: transmission / reception means for storing the message extracted from the frame in the message buffer in which the message identification code that matches
When the first timing preset for each message identification code is reached, the data of the first data type preset for the message of the message identification code corresponding to the first timing and the first data type are indicated. First storage means for storing first data type information in the message buffer in which the message identification code corresponding to the first timing is stored;
When the second timing preset for each message identification code differs from the first timing, the message of the message identification code corresponding to the first timing is set differently from the first data type. A second storage for storing the second data type data and the second data type information indicating the second data type in the message buffer in which the message identification code corresponding to the second timing is stored A vehicle communication device.
前記第2データ種別情報は、前記第2データ種別のデータについて、前記第1チェックサム算出式と異なるように予め設定された第2チェックサム算出式に基づいて算出された第2チェックサム値である
ことを特徴とする請求項1に記載の車両用通信装置。 The first data type information is a first checksum value calculated based on a preset first checksum calculation formula for the data of the first data type,
The second data type information is a second checksum value calculated based on a second checksum calculation formula set in advance differently from the first checksum calculation formula for the data of the second data type. The vehicle communication device according to claim 1, wherein:
前記第2データ種別情報は、前記第2データ種別のデータについてのデータ長であり、
前記第1データ種別のデータと前記第2データ種別のデータとで、データ長が異なる
ことを特徴とする請求項1に記載の車両用通信装置。 The first data type information is a data length for data of the first data type,
The second data type information is a data length for data of the second data type,
The vehicular communication device according to claim 1, wherein the first data type data and the second data type data have different data lengths.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011224188A JP2013082352A (en) | 2011-10-11 | 2011-10-11 | Communication equipment for vehicle |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2011224188A JP2013082352A (en) | 2011-10-11 | 2011-10-11 | Communication equipment for vehicle |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2013082352A true JP2013082352A (en) | 2013-05-09 |
Family
ID=48528022
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011224188A Pending JP2013082352A (en) | 2011-10-11 | 2011-10-11 | Communication equipment for vehicle |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2013082352A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017073834A (en) * | 2014-09-12 | 2017-04-13 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | Electronic control unit, on-vehicle network system and communication method for vehicle |
US9705699B2 (en) | 2014-10-17 | 2017-07-11 | Hyundai Motor Company | Method and apparatus for reducing load in can communication |
-
2011
- 2011-10-11 JP JP2011224188A patent/JP2013082352A/en active Pending
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2017073834A (en) * | 2014-09-12 | 2017-04-13 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | Electronic control unit, on-vehicle network system and communication method for vehicle |
JPWO2016038816A1 (en) * | 2014-09-12 | 2017-06-15 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America | Electronic control unit, in-vehicle network system, and vehicle communication method |
US10193896B2 (en) | 2014-09-12 | 2019-01-29 | Panasonic Intellectual Property Corporation Of America | Vehicle communication apparatus, in-vehicle network system, and vehicle communication method |
US10693889B2 (en) | 2014-09-12 | 2020-06-23 | Panasonic Intellectual Property Corporation Of America | Vehicle communication apparatus, in-vehicle network system, and vehicle communication method |
US11240253B2 (en) | 2014-09-12 | 2022-02-01 | Panasonic Intellectual Property Corporation Of America | Vehicle communication apparatus, in-vehicle network system, and vehicle communication method |
US11943233B2 (en) | 2014-09-12 | 2024-03-26 | Panasonic Intellectual Property Corporation Of America | Vehicle communication apparatus, in-vehicle network system, and vehicle communication method |
US9705699B2 (en) | 2014-10-17 | 2017-07-11 | Hyundai Motor Company | Method and apparatus for reducing load in can communication |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108028790B (en) | Abnormality detection method, abnormality detection device, and abnormality detection system | |
US11296965B2 (en) | Abnormality detection in an on-board network system | |
KR101956940B1 (en) | Method and device for serial data transmission which is adapted to memory sizes | |
US9768979B2 (en) | Can communication method and data frame structure for improving communication speed through increase in data amount | |
KR102030397B1 (en) | Network monitoring device | |
US9843523B2 (en) | Communication management apparatus and communication management method for vehicle network | |
RU2595962C2 (en) | Method and device for adaptation of reliability of data transmission in serial bus system | |
US10153825B2 (en) | Vehicle-mounted control device | |
US20140223258A1 (en) | Method and device for improving the data transmission security in a serial data transmission having flexible message size | |
US11247694B2 (en) | Control apparatus, control system, control method, and storage medium | |
CN104956626A (en) | Network device and data sending and receiving system | |
CN104995874B (en) | Data Transport Protocol with protocol anomaly state | |
EP3854651A1 (en) | Electronic control device, electronic control method, and program | |
CN101106438B (en) | Communication network system and error verification method | |
KR101334017B1 (en) | Apparatus of checking a validity of message on network for a vehicle and method of thereof | |
JP2014226946A (en) | Abnormality response system and abnormality response method for vehicular communication device | |
US10250434B2 (en) | Electronic control apparatus | |
JP2015065546A (en) | Vehicle control unit | |
JP2013082352A (en) | Communication equipment for vehicle | |
JP2017017615A (en) | Communication apparatus and communication system | |
JP2009017154A (en) | On-vehicle gateway device | |
CN114667716A (en) | Relay device, communication network system, and communication control method | |
JP2016146605A (en) | On-vehicle communication device | |
CN114667715B (en) | Relay device, communication network system, and communication control method | |
US11171857B2 (en) | Identifying an electronic device connected to a communication network that has XCP enabled |