JP2006140739A - Communication synchronization device, system, method, and program - Google Patents

Communication synchronization device, system, method, and program Download PDF

Info

Publication number
JP2006140739A
JP2006140739A JP2004328183A JP2004328183A JP2006140739A JP 2006140739 A JP2006140739 A JP 2006140739A JP 2004328183 A JP2004328183 A JP 2004328183A JP 2004328183 A JP2004328183 A JP 2004328183A JP 2006140739 A JP2006140739 A JP 2006140739A
Authority
JP
Japan
Prior art keywords
communication
time
mask time
mask
establishment
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.)
Withdrawn
Application number
JP2004328183A
Other languages
Japanese (ja)
Inventor
Shogo Imada
昭吾 今田
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 Ten Ltd
Original Assignee
Denso Ten 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 Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2004328183A priority Critical patent/JP2006140739A/en
Publication of JP2006140739A publication Critical patent/JP2006140739A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Communication Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To suppress useless communication processing at start and to dispense with the maintenance of an existing ECU even when a new ECU is connected to a network. <P>SOLUTION: A communication synchronization device recalculates communication mask time, based on communication formation time which is measuring time from communication start up to communication formation and starts communication processing by using the communication mask time at the succeeding start. Moreover, the communication mask time is calculated on the basis of margin time for coping with measuring errors and dispersion in the operation of respective ECUs 1, 2, shortening time for coping with the shortening of the communication mask time and maximum mask time and minimum mask time for preventing the communication mask time from becoming an abnormal value. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

この発明は、通信開始時の通信同期制御をおこなう通信同期装置、通信同期システム、通信同期方法および通信同期プログラムに関し、特に、通信が成立するまでの時間を学習し、通信開始のタイミングを自動調整することにより、起動の際の無駄な通信処理を省くことができるとともに、新規の装置がネットワークに接続された場合であっても、通信開始のタイミングを調整するための保守作業を必要としない通信同期装置、通信同期システム、通信同期方法および通信同期プログラムに関する。   The present invention relates to a communication synchronization device, a communication synchronization system, a communication synchronization method, and a communication synchronization program that perform communication synchronization control at the start of communication, and in particular, learns the time until communication is established and automatically adjusts the communication start timing. By doing so, it is possible to eliminate unnecessary communication processing at the time of start-up, and communication that does not require maintenance work to adjust the communication start timing even when a new device is connected to the network The present invention relates to a synchronization device, a communication synchronization system, a communication synchronization method, and a communication synchronization program.

従来、車両などの移動体では、センサーやアクチュエータを制御する複数の電子制御ユニット(ECU)が、車内LAN(Local Area Network)により相互に接続され、車両全体の制御がおこなわれている。   2. Description of the Related Art Conventionally, in a moving body such as a vehicle, a plurality of electronic control units (ECUs) that control sensors and actuators are connected to each other via an in-vehicle LAN (Local Area Network) to control the entire vehicle.

これらのECUは、ドライバーがイグニッションキーを「ON」に操作した際に起動し、相互の通信を成立させるために通信処理を開始する。そして、各ECU間の通信が成立すると、すべてのECUは動作可能な状態となる。したがって、かかる通信の成立は迅速におこなう必要がある。   These ECUs are activated when the driver operates the ignition key to “ON”, and start communication processing in order to establish mutual communication. When communication between the ECUs is established, all ECUs are operable. Therefore, it is necessary to quickly establish such communication.

たとえば、特許文献1には、複数のECUの中からマスタECUを選択し、このマスタECUが他のECUの起動処理をおこなうことで、全体として各ECU間の通信成立時間を短縮する発明が開示されている。   For example, Patent Document 1 discloses an invention in which a master ECU is selected from a plurality of ECUs, and the master ECU performs startup processing of other ECUs, thereby shortening the communication establishment time between the ECUs as a whole. Has been.

特許第3478656号公報Japanese Patent No. 3478656

しかしながら、かかる特許文献1を用いたとしても、各ECUの性能はまちまちであるため、マスタECUの選択次第では、通信成立時間を効率的に短縮することができない場合もある。また、各ECUが通信処理を開始してから通信が成立するまでの時間は異なるため、通信成立前に無駄な通信処理が発生してしまう。   However, even if this Patent Document 1 is used, the performance of each ECU varies, and depending on the selection of the master ECU, the communication establishment time may not be shortened efficiently. In addition, since the time from when each ECU starts the communication process to when the communication is established is different, a wasteful communication process occurs before the communication is established.

この無駄な通信の発生を抑制するために、各ECUが起動してから通信処理を開始するまでの時間を調整するための通信マスク時間を各ECUに保持させることも考えられる。すなわち、各ECUは、設定された通信マスク時間の経過後に通信処理を開始することにより、起動時の無駄な通信処理を抑制しようというものである。しかし、かかる調整時間を保持させた場合であっても、車載LANに新規なECUを追加する場合には、他のECUが保持する通信マスク時間を保守する必要がある。   In order to suppress the occurrence of this wasteful communication, it is also conceivable that each ECU holds a communication mask time for adjusting the time from when each ECU is activated until the communication process is started. That is, each ECU attempts to suppress useless communication processing at the time of activation by starting communication processing after the set communication mask time has elapsed. However, even when such an adjustment time is held, when a new ECU is added to the in-vehicle LAN, it is necessary to maintain the communication mask time held by another ECU.

これらのことから、各ECUの起動時の無駄な通信処理を抑制して効率的な通信同期をおこなうことができ、かつ、車載LANに新規なECUを追加する場合であっても保守作業を必要としないECUをいかにして実現するかが大きな課題となっている。なお、かかる課題は、ECUに限ったものではなく、ネットワークに接続され相互に通信をおこなう通信装置についても同様に生ずる課題である。   Therefore, efficient communication synchronization can be performed by suppressing unnecessary communication processing at the start of each ECU, and maintenance work is required even when a new ECU is added to the in-vehicle LAN. It is a big problem how to realize an ECU that does not. Such a problem is not limited to the ECU, but is similarly a problem that occurs in a communication apparatus that is connected to a network and communicates with each other.

この発明は、上述した従来技術による問題点を解消するためになされたものであり、各ECUが起動する際の無駄な通信処理を抑制することができるとともに、新規なECUがネットワークに接続された場合であっても既存のECUを保守する必要がない、通信同期装置、通信同期システム、通信同期方法および通信同期プログラムを提供することを目的とする。   The present invention has been made to solve the above-described problems caused by the prior art, and can suppress unnecessary communication processing when each ECU is activated, and a new ECU is connected to the network. Even if it is a case, it aims at providing the communication synchronization apparatus, the communication synchronization system, the communication synchronization method, and the communication synchronization program which do not need to maintain existing ECU.

上述した課題を解決し、目的を達成するため、請求項1の発明に係る通信同期装置は、通信開始時の通信同期制御をおこなう通信同期装置であって、通信開始から通信成立までの通信成立時間を計測する計測手段と、起動から通信開始までの無通信時間をあらわす通信マスク時間を前記通信成立時間に基づいて算出する算出手段と、前記算出手段が算出した前記通信マスク時間を記憶する記憶手段と、前記記憶手段が前記通信マスク時間を記憶した後の起動時に、前記記憶手段から前記通信マスク時間を読み出して該通信マスク時間の経過時に通信を開始する通信手段とを備えたことを特徴とする。   In order to solve the above-described problems and achieve the object, the communication synchronization device according to the first aspect of the present invention is a communication synchronization device that performs communication synchronization control at the start of communication, and communication is established from the start of communication to the establishment of communication. Measuring means for measuring time; calculation means for calculating a communication mask time representing a non-communication time from activation to communication start based on the communication establishment time; and storage for storing the communication mask time calculated by the calculation means And a communication means for reading out the communication mask time from the storage means and starting communication when the communication mask time elapses after the storage means stores the communication mask time. And

また、請求項2の発明に係る通信同期装置は、請求項1の発明において、前記算出手段は、前記記憶手段から読み出した前記通信マスク時間に、前記通信成立時間を足し合わせることにより、新たな通信マスク時間を算出することを特徴とする。   According to a second aspect of the present invention, there is provided a communication synchronization apparatus according to the first aspect, wherein the calculation means adds a new communication establishment time to the communication mask time read out from the storage means. The communication mask time is calculated.

また、請求項3の発明に係る通信同期装置は、請求項1または2の発明において、前記算出手段は、前記記憶手段から読み出した前記通信マスク時間に、前記通信成立時間および所定の長さの時間を足し合わせることにより、新たな通信マスク時間を算出することを特徴とする。   According to a third aspect of the present invention, there is provided the communication synchronization apparatus according to the first or second aspect, wherein the calculation means includes the communication establishment time and a predetermined length in the communication mask time read from the storage means. A new communication mask time is calculated by adding the times.

また、請求項4の発明に係る通信同期装置は、請求項1、2または3の発明において、前記算出手段は、前記通信成立時間が0である場合に、前記記憶装置から読み出した前記通信マスク時間から所定の長さの時間を差し引くことにより、新たな通信マスク時間を算出することを特徴とする。   The communication synchronization device according to a fourth aspect of the present invention is the communication synchronization device according to the first, second, or third aspect, wherein the calculation means reads the communication mask read from the storage device when the communication establishment time is zero. A new communication mask time is calculated by subtracting a predetermined length of time from the time.

また、請求項5の発明に係る通信同期装置は、請求項4の発明において、前記記憶手段は、前記通信成立時間が0である起動が連続しておこなわれたことをあらわすカウンタを記憶し、前記算出手段は、該カウンタが所定の回数を上回った場合にのみ、前記記憶装置から読み出した前記通信マスク時間から所定の長さの時間を差し引くことにより、新たな通信マスク時間を算出することを特徴とする。   Further, in the communication synchronization device according to the invention of claim 5, in the invention of claim 4, the storage means stores a counter representing that the activation with the communication establishment time being 0 is continuously performed, The calculation means calculates a new communication mask time by subtracting a predetermined length of time from the communication mask time read from the storage device only when the counter exceeds a predetermined number of times. Features.

また、請求項6の発明に係る通信同期装置は、請求項1〜5のいずれか一つの発明において、前記記憶手段は、前記通信マスク時間の最小値をあらわす最小マスク時間と、前記通信マスク時間の最大値をあらわす最大マスク時間とを記憶し、前記算出手段は、算出した前記通信マスク時間が該最小マスク時間より小さい場合に該通信マスク時間を該最小マスク時間とし、算出した前記通信マスク時間が該最大マスク時間より大きい場合に該通信マスク時間を該最大マスク時間とすることを特徴とする。   According to a sixth aspect of the present invention, there is provided the communication synchronizer according to any one of the first to fifth aspects, wherein the storage means includes a minimum mask time representing a minimum value of the communication mask time, and the communication mask time. A maximum mask time representing a maximum value of the communication mask time, and when the calculated communication mask time is smaller than the minimum mask time, the calculation means sets the communication mask time as the minimum mask time, and calculates the communication mask time. Is greater than the maximum mask time, the communication mask time is set as the maximum mask time.

また、請求項7の発明に係る通信同期装置は、請求項1〜5のいずれか一つの発明において、前記記憶手段は、前記通信マスク時間の最小値をあらわす最小マスク時間と、前記通信マスク時間の最大値をあらわす最大マスク時間を記憶し、前記通信手段は、読み出した前記通信マスク時間が該最小マスク時間より小さい場合に該通信マスク時間を該最小マスク時間とし、読み出した前記通信マスク時間が該最大マスク時間より大きい場合に該通信マスク時間を該最大マスク時間とすることを特徴とする。   According to a seventh aspect of the present invention, there is provided the communication synchronizer according to any one of the first to fifth aspects, wherein the storage means includes a minimum mask time representing a minimum value of the communication mask time, and the communication mask time. The communication means stores the communication mask time as the minimum mask time when the read communication mask time is smaller than the minimum mask time, and the read communication mask time. The communication mask time is set as the maximum mask time when it is larger than the maximum mask time.

また、請求項8の発明に係る通信同期装置は、請求項1〜7のいずれか一つの発明において、前記通信手段は、前記記憶手段から読み出した前記通信マスク時間が経過し、かつ、前記計測手段が計測した通信成立時間が経過した時点で通信監視処理を開始することを特徴とする。   According to an eighth aspect of the present invention, there is provided the communication synchronizer according to any one of the first to seventh aspects, wherein the communication means has passed the communication mask time read from the storage means and the measurement has been performed. The communication monitoring process is started when the communication establishment time measured by the means has elapsed.

また、請求項9の発明に係る通信同期システムは、移動体上に搭載され、通信開始時の通信同期制御をおこなう通信同期装置を含む電子制御ユニットと、複数の前記電子制御ユニットを相互に接続するネットワークとからなる通信同期システムであって、それぞれの前記通信同期装置は、通信開始から通信成立までの通信成立時間を計測する計測手段と、起動から通信開始までの無通信時間をあらわす通信マスク時間を前記通信成立時間に基づいて算出する算出手段と、前記算出手段が算出した前記通信マスク時間を記憶する記憶手段と、前記記憶手段が前記通信マスク時間を記憶した後の起動時に、前記記憶手段から前記通信マスク時間を読み出して該通信マスク時間の経過時に通信を開始する通信手段とを備えたことを特徴とする。   According to a ninth aspect of the present invention, there is provided a communication synchronization system that is mounted on a mobile body and includes an electronic control unit including a communication synchronization device that performs communication synchronization control at the start of communication, and a plurality of the electronic control units connected to each other. Each communication synchronization device includes a measuring means for measuring a communication establishment time from the start of communication to the establishment of communication, and a communication mask representing a non-communication time from the start to the start of communication Calculating means for calculating a time based on the communication establishment time; storage means for storing the communication mask time calculated by the calculating means; and storing the memory mask at startup after the storage means stores the communication mask time. Communication means for reading the communication mask time from the means and starting communication when the communication mask time elapses.

また、請求項10の発明に係る通信同期システムは、請求項9の発明において、前記記憶手段を備えない通信同期装置を含む電子制御ユニットが、前記ネットワークに接続された場合には、前記通信同期装置は、前記記憶手段が保持する前記通信マスク時間を前記記憶手段を備えない通信同期装置に通知することを特徴とする。   A communication synchronization system according to a tenth aspect of the present invention is the communication synchronization system according to the ninth aspect, wherein when the electronic control unit including a communication synchronization device not provided with the storage means is connected to the network, the communication synchronization system is provided. The apparatus notifies the communication synchronization apparatus not provided with the storage means of the communication mask time held by the storage means.

また、請求項11の発明に係る通信同期方法は、通信開始時の通信同期制御をおこなう通信同期方法であって、通信開始から通信成立までの通信成立時間を計測する計測工程と、起動から通信開始までの無通信時間をあらわす通信マスク時間を前記通信成立時間に基づいて算出する算出工程と、前記算出工程が算出した前記通信マスク時間を記憶する記憶工程と、前記記憶工程が前記通信マスク時間を記憶した後の起動時に、前記記憶工程から前記通信マスク時間を読み出して該通信マスク時間の経過時に通信を開始する通信工程とを含んだことを特徴とする。   The communication synchronization method according to the invention of claim 11 is a communication synchronization method for performing communication synchronization control at the start of communication, measuring a communication establishment time from communication start to communication establishment, A calculation step of calculating a communication mask time representing a non-communication time until the start based on the communication establishment time, a storage step of storing the communication mask time calculated by the calculation step, and the storage step of the communication mask time A communication step of reading out the communication mask time from the storage step and starting communication when the communication mask time has elapsed.

また、請求項12の発明に係る通信同期プログラムは、通信開始時の通信同期制御をおこなう通信同期プログラムであって、通信開始から通信成立までの通信成立時間を計測する計測手順と、起動から通信開始までの無通信時間をあらわす通信マスク時間を前記通信成立時間に基づいて算出する算出手順と、前記算出手順が算出した前記通信マスク時間を記憶する記憶手順と、前記記憶手順が前記通信マスク時間を記憶した後の起動時に、前記記憶手順から前記通信マスク時間を読み出して該通信マスク時間の経過時に通信を開始する通信手順とをコンピュータに実行させることを特徴とする。   The communication synchronization program according to the invention of claim 12 is a communication synchronization program for performing communication synchronization control at the start of communication, measuring a communication establishment time from communication start to communication establishment, and communication from start to communication. A calculation procedure for calculating a communication mask time representing a non-communication time until the start based on the communication establishment time, a storage procedure for storing the communication mask time calculated by the calculation procedure, and the storage procedure for the communication mask time. The communication mask time is read from the storage procedure at the time of startup after storing the information, and the computer is caused to execute a communication procedure for starting communication when the communication mask time elapses.

請求項1にかかる通信同期装置によれば、通信開始から通信成立までの通信成立時間を計測する計測手段と、起動から通信開始までの無通信時間をあらわす通信マスク時間を通信成立時間に基づいて算出する算出手段と、算出手段が算出した通信マスク時間を記憶する記憶手段と、記憶手段が通信マスク時間を記憶した後の起動時に、記憶手段から通信マスク時間を読み出して通信マスク時間の経過時に通信を開始する通信手段とを備えるよう構成したので、学習後の通信マスク時間を用いて通信処理を開始することにより起動時の無駄な通信処理の発生を効率的に防止することができるとともに、ネットワーク上に新規な装置が追加された場合であっても通信マスク時間の保守作業を必要としないという効果を奏する。   According to the communication synchronization device of the first aspect, the measurement means for measuring the communication establishment time from the communication start to the communication establishment, and the communication mask time representing the non-communication time from the start to the communication start based on the communication establishment time. A calculating means for calculating, a storing means for storing the communication mask time calculated by the calculating means, and at the time of activation after the storing means stores the communication mask time, the communication mask time is read from the storing means and the communication mask time has elapsed. Since the communication means for starting communication is configured, it is possible to efficiently prevent occurrence of useless communication processing at the time of activation by starting communication processing using the communication mask time after learning. Even when a new device is added on the network, there is an effect that maintenance work for the communication mask time is not required.

また、請求項2にかかる通信同期装置によれば、算出手段は、記憶手段から読み出した通信マスク時間に、通信成立時間を足し合わせることにより、新たな通信マスク時間を算出するよう構成したので、実際の通信成立時間を反映して通信マスク時間を延長することにより、起動時の無駄な通信処理の発生を効率的に防止することができるという効果を奏する。   Further, according to the communication synchronization device according to claim 2, the calculation means is configured to calculate a new communication mask time by adding the communication establishment time to the communication mask time read from the storage means. By extending the communication mask time to reflect the actual communication establishment time, there is an effect that it is possible to efficiently prevent generation of useless communication processing at the time of activation.

また、請求項3にかかる通信同期装置によれば、算出手段は、記憶手段から読み出した通信マスク時間に、通信成立時間および所定の長さの時間を足し合わせることにより、新たな通信マスク時間を算出するよう構成したので、通信成立時間のばらつきを補正することにより、起動時の無駄な通信処理の発生を効率的に防止することができるという効果を奏する。   According to the communication synchronization device of the third aspect, the calculating means adds a communication establishment time and a predetermined length of time to the communication mask time read from the storage means, thereby obtaining a new communication mask time. Since the calculation is configured, it is possible to efficiently prevent the occurrence of useless communication processing at the time of activation by correcting the variation in the communication establishment time.

また、請求項4にかかる通信同期装置によれば、算出手段は、通信成立時間が0である場合に、記憶装置から読み出した通信マスク時間から所定の長さの時間を差し引くことにより、新たな通信マスク時間を算出するよう構成したので、通信成立時間が0である場合に通信マスク時間を短縮することにより、起動時の無駄な通信処理の発生を効率的に防止することができるという効果を奏する。   According to the communication synchronization device of the fourth aspect, when the communication establishment time is 0, the calculation means obtains a new time by subtracting a predetermined length of time from the communication mask time read from the storage device. Since the communication mask time is calculated, the communication mask time is shortened when the communication establishment time is 0, thereby effectively preventing the occurrence of unnecessary communication processing at the time of activation. Play.

また、請求項5にかかる通信同期装置によれば、記憶手段は、通信成立時間が0である起動が連続しておこなわれたことをあらわすカウンタを記憶し、算出手段は、カウンタが所定の回数を上回った場合にのみ、記憶装置から読み出した通信マスク時間から所定の長さの時間を差し引くことにより、新たな通信マスク時間を算出するよう構成したので、通信マスク時間を過剰に短縮することを防止することにより、起動時の無駄な通信処理の発生を効率的に防止することができるという効果を奏する。   According to the communication synchronization device of the fifth aspect, the storage means stores a counter indicating that the activation with the communication establishment time of 0 is continuously performed, and the calculation means includes the counter a predetermined number of times. Only when the time exceeds the threshold, the communication mask time read out from the storage device is subtracted from the predetermined length of time to calculate a new communication mask time. By preventing this, it is possible to effectively prevent the occurrence of useless communication processing at the time of activation.

また、請求項6にかかる通信同期装置によれば、記憶手段は、通信マスク時間の最小値をあらわす最小マスク時間と、通信マスク時間の最大値をあらわす最大マスク時間とを記憶し、算出手段は、算出した前記通信マスク時間が最小マスク時間より小さい場合に通信マスク時間を最小マスク時間とし、算出した通信マスク時間が最大マスク時間より大きい場合に通信マスク時間を最大マスク時間とするよう構成したので、異常値となった通信マスク時間が記憶装置に記憶されることを防止して、起動時の無駄な通信処理の発生を効率的に防止することができるという効果を奏する。   According to the communication synchronization device of the sixth aspect, the storage means stores the minimum mask time representing the minimum value of the communication mask time and the maximum mask time representing the maximum value of the communication mask time, and the calculating means includes The communication mask time is set as the minimum mask time when the calculated communication mask time is smaller than the minimum mask time, and the communication mask time is set as the maximum mask time when the calculated communication mask time is larger than the maximum mask time. Thus, the communication mask time that has become an abnormal value is prevented from being stored in the storage device, and the occurrence of useless communication processing at the time of activation can be effectively prevented.

また、請求項7にかかる通信同期装置によれば、記憶手段は、通信マスク時間の最小値をあらわす最小マスク時間と、通信マスク時間の最大値をあらわす最大マスク時間を記憶し、通信手段は、読み出した通信マスク時間が最小マスク時間より小さい場合に通信マスク時間を最小マスク時間とし、読み出した通信マスク時間が最大マスク時間より大きい場合に通信マスク時間を最大マスク時間とするよう構成したので、記憶装置上に記憶された通信マスク時間が異常値をとった場合であっても確実に補正することにより、起動時の無駄な通信処理の発生を効率的に防止することができるという効果を奏する。   According to the communication synchronization device of claim 7, the storage means stores the minimum mask time representing the minimum value of the communication mask time and the maximum mask time representing the maximum value of the communication mask time, and the communication means comprises: When the read communication mask time is smaller than the minimum mask time, the communication mask time is set as the minimum mask time, and when the read communication mask time is larger than the maximum mask time, the communication mask time is set as the maximum mask time. Even if the communication mask time stored on the apparatus takes an abnormal value, it is possible to efficiently prevent generation of useless communication processing at the time of startup by reliably correcting the mask value.

また、請求項8にかかる通信同期装置によれば、通信手段は、記憶手段から読み出した通信マスク時間が経過し、かつ、計測手段が計測した通信成立時間が経過した時点で通信監視処理を開始するよう構成したので、通信処理を開始してから通信が成立がするまでの間に通信エラーを検出することを防止することができるという効果を奏する。   According to the communication synchronization device of the eighth aspect, the communication means starts the communication monitoring process when the communication mask time read from the storage means has elapsed and the communication establishment time measured by the measurement means has elapsed. Thus, there is an effect that it is possible to prevent a communication error from being detected after communication processing is started until communication is established.

また、請求項9にかかる通信同期システムによれば、通信開始から通信成立までの通信成立時間を計測する計測手段と、起動から通信開始までの無通信時間をあらわす通信マスク時間を通信成立時間に基づいて算出する算出手段と、算出手段が算出した通信マスク時間を記憶する記憶手段と、記憶手段が通信マスク時間を記憶した後の起動時に、記憶手段から通信マスク時間を読み出して通信マスク時間の経過時に通信を開始する通信手段とを備えるよう構成したので、学習後の通信マスク時間を用いて通信処理を開始することにより起動時の無駄な通信処理の発生を効率的に防止することができるとともに、ネットワーク上に新規な装置が追加された場合であっても通信マスク時間の保守作業を必要としないという効果を奏する。   According to the communication synchronization system of the ninth aspect, the communication establishment time is a measurement means for measuring the communication establishment time from the communication start to the communication establishment, and the communication mask time representing the no communication time from the start to the communication start. A calculation means for calculating the communication mask time, a storage means for storing the communication mask time calculated by the calculation means, and at the start-up after the storage means stores the communication mask time, the communication mask time is read from the storage means to Since the communication means for starting communication at the time of elapse is provided, it is possible to efficiently prevent occurrence of useless communication processing at startup by starting communication processing using the communication mask time after learning. In addition, even when a new device is added on the network, there is an effect that the maintenance work for the communication mask time is not required.

また、請求項10にかかる通信同期システムによれば、記憶手段を備えない通信同期装置を含む電子制御ユニットが、ネットワークに接続された場合には、通信同期装置は、記憶手段が保持する通信マスク時間を記憶手段を備えない通信同期装置に通知するよう構成したので、記憶手段を備えない通信同期装置が学習後の通信マスク時間を用いることにより、起動時の無駄な通信処理の発生を効率的に防止することができるという効果を奏する。   According to the communication synchronization system of the tenth aspect, when the electronic control unit including the communication synchronization device not provided with the storage means is connected to the network, the communication synchronization device holds the communication mask held by the storage means. Since it is configured to notify the communication synchronization apparatus that does not include the storage means, the communication synchronization apparatus that does not include the storage means uses the communication mask time after learning, thereby efficiently generating unnecessary communication processing at the time of startup. There is an effect that it can be prevented.

また、請求項11にかかる通信同期方法によれば、通信開始から通信成立までの通信成立時間を計測する計測手段と、起動から通信開始までの無通信時間をあらわす通信マスク時間を通信成立時間に基づいて算出する算出手段と、算出手段が算出した通信マスク時間を記憶する記憶手段と、記憶手段が通信マスク時間を記憶した後の起動時に、記憶手段から通信マスク時間を読み出して通信マスク時間の経過時に通信を開始する通信手段とを備えるよう構成したので、学習後の通信マスク時間を用いて通信処理を開始することにより起動時の無駄な通信処理の発生を効率的に防止することができるとともに、ネットワーク上に新規な装置が追加された場合であっても通信マスク時間の保守作業を必要としないという効果を奏する。   According to the communication synchronization method of the eleventh aspect, the measurement means for measuring the communication establishment time from the communication start to the communication establishment, and the communication mask time representing the non-communication time from the start to the communication start as the communication establishment time. A calculation means for calculating the communication mask time, a storage means for storing the communication mask time calculated by the calculation means, and at the start-up after the storage means stores the communication mask time, the communication mask time is read from the storage means to Since the communication means for starting communication at the time of elapse is provided, it is possible to efficiently prevent occurrence of useless communication processing at startup by starting communication processing using the communication mask time after learning. In addition, even when a new device is added on the network, there is an effect that the maintenance work for the communication mask time is not required.

また、請求項12にかかる通信同期プログラムによれば、通信開始から通信成立までの通信成立時間を計測する計測手段と、起動から通信開始までの無通信時間をあらわす通信マスク時間を通信成立時間に基づいて算出する算出手段と、算出手段が算出した通信マスク時間を記憶する記憶手段と、記憶手段が通信マスク時間を記憶した後の起動時に、記憶手段から通信マスク時間を読み出して通信マスク時間の経過時に通信を開始する通信手段とを備えるよう構成したので、学習後の通信マスク時間を用いて通信処理を開始することにより起動時の無駄な通信処理の発生を効率的に防止することができるとともに、ネットワーク上に新規な装置が追加された場合であっても通信マスク時間の保守作業を必要としないという効果を奏する。   According to the communication synchronization program of the twelfth aspect, the measurement means for measuring the communication establishment time from the communication start to the communication establishment, and the communication mask time representing the non-communication time from the start to the communication start as the communication establishment time. A calculation means for calculating the communication mask time, a storage means for storing the communication mask time calculated by the calculation means, and at the start-up after the storage means stores the communication mask time, the communication mask time is read from the storage means to Since the communication means for starting communication at the time of elapse is provided, it is possible to efficiently prevent occurrence of useless communication processing at startup by starting communication processing using the communication mask time after learning. In addition, even when a new device is added on the network, there is an effect that the maintenance work for the communication mask time is not required.

以下に添付図面を参照して、この発明に係る通信同期装置、通信同期システム、通信同期方法および通信同期プログラムの好適な実施例を詳細に説明する。以下では、まず、各実施例に共通する本発明の特徴部分である通信マスク時間の学習処理の概要を説明した後に、通信マスク時間を延長する場合(実施例1)、通信マスクの延長および短縮をする場合(実施例2)についてそれぞれ説明することとする。   Exemplary embodiments of a communication synchronization device, a communication synchronization system, a communication synchronization method, and a communication synchronization program according to the present invention will be described below in detail with reference to the accompanying drawings. In the following, first, after explaining the outline of the communication mask time learning process, which is a characteristic part of the present invention common to each embodiment, when the communication mask time is extended (Example 1), the communication mask is extended and shortened. Each of the cases (Example 2) will be described.

(概要および特徴)
まず、各実施例に共通する本発明の特徴部分である通信マスク時間の学習処理の概要について説明する。図1は、本発明の特徴部分である通信マスク時間の学習処理の概要を説明するための説明図である。
(Overview and features)
First, an outline of a communication mask time learning process, which is a characteristic part of the present invention common to the embodiments, will be described. FIG. 1 is an explanatory diagram for explaining an outline of a communication mask time learning process which is a characteristic part of the present invention.

近年、車両の高性能化にともなって車両には多数のセンサーやアクチュエータが搭載され、これらのデバイスを制御するECUの数も増加している。そして、車両に搭載される複数のECUは、車載LANにより相互に接続されデータを送受信して車両全体の制御をおこなっている。同図に示すように、ドライバーがイグニッションスイッチを「ON」に操作するなどして車両システムを起動すると、各ECU(ECU1およびECU2)は、それぞれ起動する。   2. Description of the Related Art In recent years, with increasing performance of vehicles, vehicles are equipped with a large number of sensors and actuators, and the number of ECUs that control these devices is increasing. A plurality of ECUs mounted on the vehicle are connected to each other by an in-vehicle LAN to transmit and receive data and control the entire vehicle. As shown in the figure, each ECU (ECU1 and ECU2) is activated when the driver activates the vehicle system, for example, by operating the ignition switch to "ON".

しかしながら、各ECUの性能はそれぞれ異なることが通常であるので、車両システムが起動してから各ECUが起動するまでの時間はまちまちである。たとえば、同図の上側に示した場合においては、ECU1、ECU2の順序で各ECUが起動している。そして、起動した各ECUはそれぞれ「通信処理」を開始する。ここで、「通信処理」とは、双方向の通信が未だ成立していない期間の処理と、双方向の通信が成立した後の処理を含むものとする。   However, since the performance of each ECU is usually different, the time from the start of the vehicle system to the start of each ECU varies. For example, in the case shown in the upper side of the figure, each ECU is activated in the order of ECU1, ECU2. Each activated ECU starts “communication processing”. Here, “communication processing” includes processing during a period in which bidirectional communication has not yet been established, and processing after establishment of bidirectional communication.

たとえば、ECU1が通信処理を開始してECU2と双方向の通信を成立させようとしても、ECU2が通信処理を開始するまではECU2からの応答が得られないため、ECU1は、ECU2の応答を得るためのメッセージ送信を定期的に繰り返すことになる。   For example, even if the ECU 1 starts the communication process and establishes two-way communication with the ECU 2, since the response from the ECU 2 cannot be obtained until the ECU 2 starts the communication process, the ECU 1 obtains the response of the ECU 2. Message transmission will be repeated periodically.

この無駄な通信処理の発生を抑制するため、各ECUの性能にみあった通信マスク時間(Tmask)をあらかじめ設定して各ECUが通信処理を開始するタイミングを合わせることが考えられる。この場合、さまざまな性能のECUと通信することを考慮して、かかる通信マスク時間(Tmask)は十分に長い時間に設定されることが通常である。しかしながら、通信マスク時間(Tmask)が長すぎると全体として通信成立までの時間が遅延してしまう。また、あらかじめ静的な通信マスク時間を設定するこの方法では、車載LANにあらたなECUを追加した場合などに他のECUに設定されている通信マスク時間を保守する必要がある。   In order to suppress the occurrence of this wasteful communication process, it is conceivable to set a communication mask time (Tmask) suitable for the performance of each ECU in advance and match the timing at which each ECU starts the communication process. In this case, in consideration of communication with ECUs having various performances, the communication mask time (Tmask) is usually set to a sufficiently long time. However, if the communication mask time (Tmask) is too long, the time until communication is established as a whole is delayed. Further, in this method of setting a static communication mask time in advance, it is necessary to maintain the communication mask time set in another ECU when a new ECU is added to the in-vehicle LAN.

そこで、同図の下側に示したように、本発明においては、各ECUが通信処理を開始してから通信が成立するまでの時間を学習することにより、動的に通信マスク時間を変更する仕組みを提供することとした。このようにすることで、通信マスク時間を自律的に適切な長さに調整することが可能となるとともに、車載LANにあらたなECUを追加した場合であっても、各ECUは、動的に自己の通信マスク時間を変更することができるので保守作業を必要とすることなく起動する際の無駄な通信処理を抑制することが可能となる。   Therefore, as shown on the lower side of the figure, in the present invention, the communication mask time is dynamically changed by learning the time from when each ECU starts communication processing until communication is established. It was decided to provide a mechanism. In this way, it is possible to autonomously adjust the communication mask time to an appropriate length, and even when a new ECU is added to the in-vehicle LAN, each ECU is dynamically Since the own communication mask time can be changed, it is possible to suppress useless communication processing at the start-up without requiring maintenance work.

次に、各実施例に共通するECU1のハードウェア構成について説明する。図2は、本発明の実施例に係るECU1のハードウェア構成およびネットワーク構成を示すブロック図である。同図に示すように、ECU1は、CPU(Central Processing Unit)10、タイマ11、通信コントローラ12、ROM(Read Only Memory)13、ノーマルRAM(Random Access Memory)14およびスタンバイRAM15を有する。そして、各ECU1は、車載LANにより相互に接続されている。なお、同図では3個のECU1しか示していないが、ECU1の個数を制限するものではない。   Next, the hardware configuration of the ECU 1 common to the embodiments will be described. FIG. 2 is a block diagram illustrating a hardware configuration and a network configuration of the ECU 1 according to the embodiment of the present invention. As shown in FIG. 1, the ECU 1 includes a CPU (Central Processing Unit) 10, a timer 11, a communication controller 12, a ROM (Read Only Memory) 13, a normal RAM (Random Access Memory) 14, and a standby RAM 15. And each ECU1 is mutually connected by in-vehicle LAN. In the figure, only three ECUs 1 are shown, but the number of ECUs 1 is not limited.

CPU10は、ECU1の全体制御をおこなうものであり、バスを介して接続されるECU1内の他の装置を制御する。また、タイマ11は、通信タイミングを検出するためのフリーランタイマなどのタイマであり、通信コントローラ12は、車載LANとECU1との通信を制御するデバイスである。   The CPU 10 performs overall control of the ECU 1 and controls other devices in the ECU 1 connected via a bus. The timer 11 is a timer such as a free-run timer for detecting communication timing, and the communication controller 12 is a device that controls communication between the in-vehicle LAN and the ECU 1.

ROM13は、プログラムや静的データの格納用メモリとして用いる読み出し専用のメモリである。また、ノーマルRAM14は、演算用メモリなどとして用いる書き込みおよび読み出し可能なメモリであり、システム起動時に初期化される。そして、スタンバイRAM15は、システムが終了しても供給を継続するスタンバイ電源が接続され、システム終了後も格納されたデータを保持することができるRAMである。   The ROM 13 is a read-only memory used as a memory for storing programs and static data. The normal RAM 14 is a writable and readable memory used as an arithmetic memory and is initialized when the system is activated. The standby RAM 15 is a RAM that is connected to a standby power supply that continues to be supplied even when the system is terminated, and that can retain stored data even after the system is terminated.

このスタンバイRAM15は、学習後の通信マスク時間(Tmask)などのデータ保持に用いられる。なお、本発明に係る実施例において各ECU1は、このスタンバイRAM15を有する構成としているが、車載LANに接続される少なくとも一つのECU1がスタンバイRAM15を有し、かかるスタンバイRAM15が保持する通信マスク時間(Tmask)を他のECU1に通知する構成とすることもできる。   The standby RAM 15 is used to hold data such as a communication mask time (Tmask) after learning. In the embodiment according to the present invention, each ECU 1 has the standby RAM 15. However, at least one ECU 1 connected to the in-vehicle LAN has the standby RAM 15, and the communication mask time ( Tmask) may be notified to other ECUs 1.

次に、通信マスク時間の学習処理について図3〜図7を用いてさらに詳細に説明する。なお、本実施例1では、通信マスク時間を学習し、かかる通信マスク時間を延長する場合について説明する。   Next, the communication mask time learning process will be described in more detail with reference to FIGS. In the first embodiment, a case where the communication mask time is learned and the communication mask time is extended will be described.

図3は、本発明の実施例1に係るECU1のソフトウェア構成を示すブロック図である。なお、通信開始同期部100および通信処理部110のプログラムは、ROM13に格納されており、実行時にはノーマルRAM14上に展開される。また、記憶部120の各データは、ROM13、ノーマルRAM14あるいはスタンバイRAM15に保持される。なお、次回の起動の際に用いられるデータは、電源断後も格納されたデータを保持することができるスタンバイRAM15に保持される。   FIG. 3 is a block diagram illustrating a software configuration of the ECU 1 according to the first embodiment of the present invention. Note that the programs of the communication start synchronization unit 100 and the communication processing unit 110 are stored in the ROM 13 and are expanded on the normal RAM 14 at the time of execution. Each data in the storage unit 120 is held in the ROM 13, the normal RAM 14, or the standby RAM 15. Note that data used at the next start-up is held in the standby RAM 15 that can hold the stored data even after the power is turned off.

同図に示すように、ECU1は、通信開始同期部100、通信処理部110および記憶部120を有する。また、通信開始同期部100は、通信マスク値更新処理部101および通信成立時間計測部102をさらに有し、記憶部120は、通信マスク時間(Tmask)121をさらに有する。   As shown in the figure, the ECU 1 includes a communication start synchronization unit 100, a communication processing unit 110, and a storage unit 120. The communication start synchronization unit 100 further includes a communication mask value update processing unit 101 and a communication establishment time measurement unit 102, and the storage unit 120 further includes a communication mask time (Tmask) 121.

通信開始同期部100は、ECU1が起動した際に通信処理部110が通信処理を開始したならば、通信開始から通信が成立するまでの時間である通信成立時間(Tok)を計測するとともに、かかる通信成立時間(Tok)に基づいて通信マスク時間(Tmask)121を算出して記憶部120に格納する処理部である。   If the communication processing unit 110 starts communication processing when the ECU 1 is activated, the communication start synchronization unit 100 measures the communication establishment time (Tok) that is the time from the start of communication to the establishment of communication, and this is taken. It is a processing unit that calculates a communication mask time (Tmask) 121 based on the communication establishment time (Tok) and stores it in the storage unit 120.

通信マスク値更新処理部101は、通信成立時間計測部102が計測した通信成立時間(Tok)を取得して、取得した通信成立時間(Tok)に基づいて通信マスク時間(Tmask)121を算出する。たとえば、学習前の通信マスク時間(Tmask)121の値が20msecであり、計測された通信成立時間(Tok)の値が2msecであったならば、両者の値を足し合わせた22msecを新たな通信マスク時間(Tmask)121の値として算出する。そして、算出した通信マスク(Tmask)122を記憶部120に格納する。   The communication mask value update processing unit 101 acquires the communication establishment time (Tok) measured by the communication establishment time measurement unit 102, and calculates the communication mask time (Tmask) 121 based on the acquired communication establishment time (Tok). . For example, if the value of the communication mask time (Tmask) 121 before learning is 20 msec and the value of the measured communication establishment time (Tok) is 2 msec, 22 msec obtained by adding both values to the new communication is added. The value is calculated as the value of the mask time (Tmask) 121. Then, the calculated communication mask (Tmask) 122 is stored in the storage unit 120.

通信成立時間計測部102は、通信開始から通信が成立するまでの時間である通信成立時間(Tok)を、タイマ11を用いて計測し、かかる計測結果を通信マスク値更新処理部101に渡す処理をおこなう。たとえば、通信処理部110が1回目の応答要求を車載LANに対して送出したならば、この通信成立時間計測部102はタイマの計時を開始する。   The communication establishment time measuring unit 102 measures a communication establishment time (Tok), which is a time from the start of communication to the establishment of communication, using the timer 11, and passes the measurement result to the communication mask value update processing unit 101. Do it. For example, if the communication processing unit 110 sends a first response request to the in-vehicle LAN, the communication establishment time measuring unit 102 starts measuring the timer.

そして、通信処理部110が2回目の応答要求を送信することなく他のECU1からの応答を受信して通信が成立したならば、通信成立時間(Tok)の値を0msecに設定する。また、通信処理部110が1msec間隔で2回目以降の応答要求を送信し、5回目の応答要求の送出後に通信が成立したならば、通信成立時間(Tok)の値を4msecに設定する。なお、かかる応答要求の送信間隔は任意の値に設定することができる。   If the communication processing unit 110 receives a response from another ECU 1 without transmitting a second response request and communication is established, the communication establishment time (Tok) value is set to 0 msec. In addition, if the communication processing unit 110 transmits the second and subsequent response requests at 1 msec intervals and communication is established after the fifth response request is transmitted, the communication establishment time (Tok) value is set to 4 msec. Note that the transmission interval of the response request can be set to an arbitrary value.

通信処理部110は、車載LANを介して他のECU1とのデータ送受信をおこなう処理部である。この通信処理部110は、記憶部120から通信マスク時間(Tmask)121を読み出し、読み出した通信マスク時間(Tmask)121の期間だけ待ち合せた後に通信処理を開始する。たとえば、通信マスク時間が5msecであったならば、動作開始後5msecの期間は通信処理をおこなわず、かかる期間が経過すると定期的に車載LANに応答要求を送出する。そして、他のECU1から応答を受信して双方向の通信が成立した後は他のECU1と双方向のデータ送受信をおこなう。   The communication processing unit 110 is a processing unit that performs data transmission / reception with another ECU 1 via the in-vehicle LAN. The communication processing unit 110 reads the communication mask time (Tmask) 121 from the storage unit 120, waits for the read communication mask time (Tmask) 121, and then starts communication processing. For example, if the communication mask time is 5 msec, communication processing is not performed for a period of 5 msec after the operation is started, and a response request is periodically sent to the in-vehicle LAN when the period elapses. Then, after a response is received from another ECU 1 and bidirectional communication is established, bidirectional data transmission / reception is performed with the other ECU 1.

記憶部120は、ROM13、ノーマルRAM14あるいはスタンバイRAM15上に構成される。たとえば、電源断後も保持され次回の起動の際に用いられるデータは、スタンバイRAM15上に保持される。また、静的なデータはROM13に、動的なデータであるが電源断後は用いられないデータはノーマルRAM14に、それぞれ保持される。   The storage unit 120 is configured on the ROM 13, the normal RAM 14, or the standby RAM 15. For example, data that is retained even after the power is turned off and is used at the next startup is retained on the standby RAM 15. Static data is stored in the ROM 13 and data that is dynamic data but is not used after the power is turned off is stored in the normal RAM 14.

通信マスク時間(Tmask)121は、通信マスク値更新処理101により算出される時間データであり、通信処理部110により用いられる。この通信マスク時間(Tmask)121は、次回の起動の際に用いられるので保持先はスタンバイRAM15となる。   The communication mask time (Tmask) 121 is time data calculated by the communication mask value update processing 101 and is used by the communication processing unit 110. Since this communication mask time (Tmask) 121 is used at the next startup, the storage destination is the standby RAM 15.

次に、通信マスク時間(Tmask)121を延長させる必要がある場合の通信マスク時間の学習処理について図4−1および図4−2を用いて説明する。図4−1は、通信マスク時間(Tmask)121を延長させる必要がある場合の通信マスク時間(Tmask)121および通信成立時間(Tok)を説明するための説明図であり、図4−2は、学習後の通信マスク時間(Tmask)121を説明するための説明図である。   Next, a communication mask time learning process when it is necessary to extend the communication mask time (Tmask) 121 will be described with reference to FIGS. FIG. 4A is an explanatory diagram for explaining the communication mask time (Tmask) 121 and the communication establishment time (Tok) when it is necessary to extend the communication mask time (Tmask) 121. FIG. It is explanatory drawing for demonstrating the communication mask time (Tmask) 121 after learning.

図4−1では、ECU1がECU2よりも先に通信処理を開始した場合におけるECU1の通信成立時間(Tok)および通信マスク時間(Tmask)121について説明している。なお、このECU2はECU1と同様の構成を有するECUである。   FIG. 4A illustrates the communication establishment time (Tok) and the communication mask time (Tmask) 121 of the ECU 1 when the ECU 1 starts communication processing before the ECU 2. The ECU 2 is an ECU having the same configuration as the ECU 1.

同図に示すように、ECU1が起動するとECU1の通信処理部110は、記憶部120から通信マスク時間(Tmask)121を読み出し、読み出した通信マスク時間(Tmask)121の期間だけ待ち合せた後に通信処理を開始する。そして、ECU1の通信成立時間計測部102は、通信処理を開始してから通信が成立するまでの時間である通信成立時間(Tok)を計測する。つづいて、通信マスク値更新処理部101は、この通信成立時間(Tok)に基づいて学習後の通信マスク時間(Tmask)121を算出し、記憶部120の通信マスク時間(Tmask)121に書込む。   As shown in the figure, when the ECU 1 is activated, the communication processing unit 110 of the ECU 1 reads out the communication mask time (Tmask) 121 from the storage unit 120 and waits for the read communication mask time (Tmask) 121 for the communication processing. To start. Then, the communication establishment time measuring unit 102 of the ECU 1 measures a communication establishment time (Tok) that is a time from when communication processing is started until communication is established. Subsequently, the communication mask value update processing unit 101 calculates a communication mask time (Tmask) 121 after learning based on the communication establishment time (Tok), and writes it in the communication mask time (Tmask) 121 of the storage unit 120. .

たとえば、同図におけるTmaskの値が10msecであり、Tokの値が3msecであれば、学習後の通信マスク時間(Tmask)121の値は13msecとなる。そして、この学習後の通信マスク時間(Tmask)121は、次回の車両システムの起動時にECU1が使用することになる。   For example, if the value of Tmask in the figure is 10 msec and the value of Tok is 3 msec, the value of the communication mask time (Tmask) 121 after learning is 13 msec. The communication mask time (Tmask) 121 after learning is used by the ECU 1 at the next start-up of the vehicle system.

図4−2に示すように、再度車両システムが起動されECU1が起動すると、ECU1の通信処理部110は、記憶部120から通信マスク時間(Tmask)121を読み出し、読み出した通信マスク時間(Tmask)121の期間だけ待ち合せた後に通信処理を開始する。学習前の図4−1の場合と異なり、学習後の図4−2の場合には、ECU1とECU2との通信処理開始時期が近づくので、無駄な通信処理をおこなうことなくECU1とECU2とは通信を成立させることができる。   As shown in FIG. 4B, when the vehicle system is activated again and the ECU 1 is activated, the communication processing unit 110 of the ECU 1 reads the communication mask time (Tmask) 121 from the storage unit 120, and the read communication mask time (Tmask). After waiting for the period 121, the communication process is started. Unlike the case of FIG. 4-1 before learning, in the case of FIG. 4-2 after learning, the communication processing start time between the ECU 1 and the ECU 2 approaches, so that the ECU 1 and the ECU 2 are not subjected to unnecessary communication processing. Communication can be established.

次に、本実施例1に係るECU1の処理手順について説明する。図5は、実施例1に係るECU1の処理手順を示すフローチャートである。   Next, a processing procedure of the ECU 1 according to the first embodiment will be described. FIG. 5 is a flowchart illustrating a processing procedure of the ECU 1 according to the first embodiment.

まず、ECU1の通信処理部110は、記憶部120から通信マスク時間(Tmask)121を読み出す(ステップS101)。そして、読み出した通信マスク時間(Tmask)121の値をタイマ11に設定し(ステップS102)、Tmaskの経過を待ち合せる(ステップS103否定)。   First, the communication processing unit 110 of the ECU 1 reads the communication mask time (Tmask) 121 from the storage unit 120 (step S101). Then, the value of the read communication mask time (Tmask) 121 is set in the timer 11 (step S102), and the elapse of Tmask is awaited (No in step S103).

そして、Tmaskが経過したならば(ステップS103肯定)、通信成立時間計測部102は、通信成立時間(Tok)の計測処理をおこなう(ステップS104)。ここで、このステップS104の処理内容について図6を用いて説明する。図6は、図5に示したTok計測処理の処理手順を示すフローチャートである。   If Tmask has elapsed (Yes at Step S103), the communication establishment time measuring unit 102 performs a communication establishment time (Tok) measurement process (Step S104). Here, the processing content of this step S104 is demonstrated using FIG. FIG. 6 is a flowchart showing a procedure of the Tok measurement process shown in FIG.

図6に示すように、まず、通信成立時間(Tok)に0を設定し(ステップS201)、通信成立処理を開始する(ステップS202)。具体的には、ステップS202では通信処理部110が定期的に応答要求を送信するためのタイマ(Twaitの長さのタイマ)をセットして、1回目の応答要求を送信する。   As shown in FIG. 6, first, the communication establishment time (Tok) is set to 0 (step S201), and the communication establishment process is started (step S202). Specifically, in step S202, the communication processing unit 110 sets a timer (timer with a length of Twait) for periodically transmitting a response request, and transmits the first response request.

そして、他のECU1から応答を受信したならば通信成立と判定し(ステップS203肯定)、リターンする。この場合、Tokの値は0のままである。一方、応答を受信せずタイマ(Twaitの長さのタイマ)がタイムアウトしたならば(ステップS203否定)、TokにTok+Twaitを設定する(ステップS204)。つづいて、タイマ(Twaitの長さのタイマ)をセットして応答要求を送信し、Twaitの期間待ち合せる(ステップS205)。   If a response is received from another ECU 1, it is determined that communication is established (Yes at step S203), and the process returns. In this case, the value of Tok remains 0. On the other hand, if no response is received and the timer (timer of Twait length) times out (No at Step S203), Tok + Twait is set to Tok (Step S204). Subsequently, a timer (a timer having a length of Twait) is set, a response request is transmitted, and a Twait period is awaited (step S205).

そして、再度ステップS203の処理に戻り、通信が成立するまでステップS204〜ステップS205の処理を繰り返す。このようにして、このTok計測処理では、通信処理開始から通信成立までの時間を計測し、計測した通信成立時間(Tok)を通信マスク値更新処理部101に渡す。   And it returns to the process of step S203 again and repeats the process of step S204-step S205 until communication is materialized. In this way, in the Tok measurement process, the time from the start of the communication process to the communication establishment is measured, and the measured communication establishment time (Tok) is passed to the communication mask value update processing unit 101.

図5に戻り、Tmask更新処理(ステップS105)について説明する。ここで、このステップS105の処理内容について図7を用いて説明する。図7は、図5に示したTmask更新処理の処理手順を示すフローチャートである。   Returning to FIG. 5, the Tmask update process (step S105) will be described. Here, the processing content of this step S105 is demonstrated using FIG. FIG. 7 is a flowchart showing a processing procedure of the Tmask update process shown in FIG.

図7に示すように、このTmask更新処理では、通信成立時間計測部102から渡されたTokを用いて通信マスク時間(Tmask)121の更新をおこなう。具体的には、TmaskにTmask+Tokを設定する(ステップS301)。   As shown in FIG. 7, in this Tmask update process, the communication mask time (Tmask) 121 is updated using the Tok passed from the communication establishment time measuring unit 102. Specifically, Tmask + Tok is set in Tmask (step S301).

図5に戻り、ステップS106について説明する。Tokの計測処理をおこない(ステップS104)、計測されたTokに基づいてTmaskの更新処理をおこなうと(ステップS105)、ECU1は通常の通信処理を開始する(ステップS106)。ここで、通常の通信処理とは、双方向の通信が成立した後の通信処理のことを指す。   Returning to FIG. 5, step S106 will be described. When the Tok measurement process is performed (step S104) and the Tmask update process is performed based on the measured Tok (step S105), the ECU 1 starts a normal communication process (step S106). Here, normal communication processing refers to communication processing after bidirectional communication is established.

上述してきたように、本実施例1では、通信マスク時間の学習処理により、通信開始から通信成立までの計測時間である通信成立時間(Tok)を反映して通信マスク時間(Tmask)を再計算するよう構成したので、次回の立ち上げ時には、学習後のTmaskを用いて通信処理を開始することにより、各ECU間の通信開始時間のばらつきを補正して起動時の無駄な通信処理の発生を抑制することができる。また、学習処理により、各ECU1は通信マスク時間(Tmask)を自律的に設定することとしたので、新規なECUが車内LANに接続された場合であっても保守作業をおこなうことなく適切なマスク時間を自動的に設定することができる。   As described above, in the first embodiment, the communication mask time (Tmask) is recalculated by reflecting the communication establishment time (Tok), which is the measurement time from the start of communication to the communication establishment, by the communication mask time learning process. Therefore, at the next start-up, the communication process is started using the learned Tmask, thereby correcting the variation in the communication start time between the ECUs and generating unnecessary communication processes at the time of startup. Can be suppressed. In addition, since each ECU 1 autonomously sets the communication mask time (Tmask) by the learning process, even if a new ECU is connected to the in-vehicle LAN, an appropriate mask is performed without performing maintenance work. The time can be set automatically.

なお、実施例1では、本発明の特徴部分である、動的に通信マスク時間を変更する学習処理の仕組みを説明するために、最も基本的な場合である通信マスク時間の延長処理について説明した。しかしながら、本発明はこれに限らず、通信マスク時間の短縮処理や、計測誤差や各ECU1の動作のばらつきに対応した処理に適用することができる。以下では、これらの処理について詳細に説明する。   In the first embodiment, in order to explain the mechanism of the learning process that dynamically changes the communication mask time, which is a characteristic part of the present invention, the communication mask time extension process, which is the most basic case, has been described. . However, the present invention is not limited to this, and can be applied to processing for shortening communication mask time and processing corresponding to measurement errors and variations in the operation of each ECU 1. Hereinafter, these processes will be described in detail.

本実施例2では、通信マスク時間を学習し、かかる通信マスクの延長および短縮をする場合について説明する。なお、実施例1と重複する部分の説明については省略あるいは簡単な説明にとどめることとする。   In the second embodiment, a case where the communication mask time is learned and the communication mask is extended and shortened will be described. Note that the description of the same parts as those in the first embodiment is omitted or only a brief description.

図8は、本発明の実施例2に係るECU1のソフトウェア構成を示すブロック図である。なお、通信開始同期部100および通信処理部110のプログラムは、ROM13に格納されており、実行時にはノーマルRAM14上に展開される。また、記憶部120の各データは、ノーマルRAM14またはスタンバイRAM15に保持される。なお、電源断後も保持され次回の起動の際に用いられるデータは、スタンバイRAM15に保持される。   FIG. 8 is a block diagram illustrating a software configuration of the ECU 1 according to the second embodiment of the present invention. Note that the programs of the communication start synchronization unit 100 and the communication processing unit 110 are stored in the ROM 13 and are expanded on the normal RAM 14 at the time of execution. Each data in the storage unit 120 is held in the normal RAM 14 or the standby RAM 15. Note that the data that is retained even after the power is turned off and is used at the next startup is retained in the standby RAM 15.

同図に示すように、ECU1は、通信開始同期部100、通信処理部110および記憶部120を有する。また、通信開始同期部100は、通信マスク値更新処理部101および通信成立時間計測部102をさらに有し、記憶部120は、通信マスク時間(Tmask)121、マージン時間(α)122、短縮時間(β)123、最大マスク時間(Tmaskmax)124および最小マスク時間(Tmaskmin)125をさらに有する。   As shown in the figure, the ECU 1 includes a communication start synchronization unit 100, a communication processing unit 110, and a storage unit 120. The communication start synchronization unit 100 further includes a communication mask value update processing unit 101 and a communication establishment time measurement unit 102, and the storage unit 120 includes a communication mask time (Tmask) 121, a margin time (α) 122, and a reduction time. (Β) 123, a maximum mask time (Tmaskmax) 124, and a minimum mask time (Tmaskmin) 125 are further included.

通信開始同期部100は、ECU1が起動した際に通信処理部110が通信処理を開始したならば、通信開始から通信が成立するまでの時間である通信成立時間(Tok)を計測するとともに、かかる通信成立時間(Tok)に基づいて通信マスク時間(Tmask)121を算出して記憶部120に格納する処理部である。   If the communication processing unit 110 starts communication processing when the ECU 1 is activated, the communication start synchronization unit 100 measures the communication establishment time (Tok) that is the time from the start of communication to the establishment of communication, and this is taken. It is a processing unit that calculates a communication mask time (Tmask) 121 based on the communication establishment time (Tok) and stores it in the storage unit 120.

通信マスク値更新処理部101は、通信成立時間計測部102が計測した通信成立時間(Tok)を取得するとともに、取得した通信成立時間(Tok)に基づいて通信マスク時間(Tmask)121を算出する処理部である点は実施例1と同様である。   The communication mask value update processing unit 101 acquires the communication establishment time (Tok) measured by the communication establishment time measurement unit 102 and calculates a communication mask time (Tmask) 121 based on the acquired communication establishment time (Tok). The point which is a process part is the same as that of Example 1. FIG.

本実施例2では、計測誤差や各ECU1の動作のばらつきに対応するためのマージン時間(α)122、通信マスク時間(Tmask)121の短縮に対応するための短縮時間(β)123、通信マスク時間(Tmask)121が異常値となることを防止するための最大マスク時間(Tmaskmax)124および最小マスク時間(Tmaskmin)125を用いることにより、より適切な通信マスク時間(Tmask)121を算出することとした。これらのデータ(122〜125)は、静的なデータであるので保持先はROM13またはスタンバイRAM15となる。   In the second embodiment, margin time (α) 122 for dealing with measurement errors and variations in operation of each ECU 1, shortened time (β) 123 for dealing with shortening of communication mask time (Tmask) 121, communication mask A more appropriate communication mask time (Tmask) 121 is calculated by using the maximum mask time (Tmaskmax) 124 and the minimum mask time (Tmaskmin) 125 for preventing the time (Tmask) 121 from becoming an abnormal value. It was. Since these data (122 to 125) are static data, the storage destination is the ROM 13 or the standby RAM 15.

マージン時間(α)122は、計測誤差や各ECU1の動作のばらつきに対応するために用いる静的なデータであり、通信マスク値更新処理部101により用いられる。実施例1においては、通信開始から通信成立までの時間をあらわす通信成立時間(Tok)を計測することとしていたが、かかる計測値には誤差が含まれる場合があり、また、通信相手となる他のECU1の動作にばらつきが存在する場合もある。このため、計測したTokと実際の値とを補正するためのマージン時間(α)122を導入し、計測したTokにマージン時間(α)122を加えた値を用いることとした。   The margin time (α) 122 is static data used to cope with measurement errors and variations in the operation of the ECUs 1 and is used by the communication mask value update processing unit 101. In the first embodiment, the communication establishment time (Tok) representing the time from the start of communication to the establishment of communication is measured. However, the measurement value may include an error, and may be a communication partner. There may be a variation in the operation of the ECU 1. Therefore, a margin time (α) 122 for correcting the measured Tok and the actual value is introduced, and a value obtained by adding the margin time (α) 122 to the measured Tok is used.

短縮時間(β)123は、通信マスク時間(Tmask)121が大きな値となりすぎた場合にTmaskを短縮するために用いられるステップ時間であり、たとえば、0.5msecの値をとる。ここで、通信マスク時間(Tmask)121が大きな値となりすぎた場合とは、システム変更などにより起動速度の遅いECU1が起動速度の速いECU1に置き換えられた場合や、計測誤差や一時的な障害により通信マスク時間が長めの値をとった場合がある。   The shortening time (β) 123 is a step time used to shorten the Tmask when the communication mask time (Tmask) 121 becomes too large, and takes a value of 0.5 msec, for example. Here, the case where the communication mask time (Tmask) 121 becomes too large means that the ECU 1 having a low startup speed is replaced with the ECU 1 having a high startup speed due to a system change or the like, or a measurement error or a temporary failure. The communication mask time may take a long value.

最大マスク時間(Tmaskmax)124および最小マスク時間(Tmaskmin)125は、計測誤差や一時的な障害により通信マスク時間(Tmask)121が異常値となることを防止するために用いられる。すなわち、通信マスク時間(Tmask)121は、最小マスク時間(Tmaskmin)125以上かつ最大マスク時間(Tmaskmax)124以下となるよう調整される。   The maximum mask time (Tmaskmax) 124 and the minimum mask time (Tmaskmin) 125 are used to prevent the communication mask time (Tmask) 121 from becoming an abnormal value due to a measurement error or a temporary failure. That is, the communication mask time (Tmask) 121 is adjusted to be not less than the minimum mask time (Tmaskmin) 125 and not more than the maximum mask time (Tmaskmax) 124.

次に、通信マスク時間(Tmask)121を短縮させる必要がある場合の通信マスク時間の学習処理について図9−1および図9−2を用いて説明する。図9−1は、通信マスク時間(Tmask)121を短縮させる必要がある場合の通信マスク時間(Tmask)121を説明するための説明図であり、図9−2は、学習後の通信マスク時間(Tmask)121を説明するための説明図である。   Next, a communication mask time learning process when the communication mask time (Tmask) 121 needs to be shortened will be described with reference to FIGS. 9-1 and 9-2. FIG. 9A is an explanatory diagram for explaining the communication mask time (Tmask) 121 when the communication mask time (Tmask) 121 needs to be shortened, and FIG. 9-2 shows the communication mask time after learning. It is explanatory drawing for demonstrating (Tmask) 121.

図9−1では、ECU1がECU2よりも遅れて通信処理を開始した場合におけるECU1の通信マスク時間(Tmask)121について説明している。なお、このECU2はECU1と同様の構成を有するECUである。   FIG. 9A illustrates the communication mask time (Tmask) 121 of the ECU 1 when the ECU 1 starts communication processing later than the ECU 2. The ECU 2 is an ECU having the same configuration as the ECU 1.

同図に示すように、ECU1が起動するとECU1の通信処理部110は、記憶部120から通信マスク時間(Tmask)121を読み出し、読み出した通信マスク時間(Tmask)121の期間だけ待ち合せた後に通信処理を開始する。そして、通信相手となるECU2は既に通信処理を開始しているためすぐに通信が成立する。しかしながら、ECU2はECU1との通信が成立するまでの期間は無駄な通信処理をおこなっている。したがって、このような場合には通信マスク時間(Tmask)121を短縮してECUの通信処理の開始を早め、ECU2の通信処理の開始時期に近づける必要がある。具体的には、通信マスク時間(Tmask)121から短縮時間(β)123を差し引いて新たな通信マスク時間(Tmask)121とすることによりTmaskを短縮する。   As shown in the figure, when the ECU 1 is activated, the communication processing unit 110 of the ECU 1 reads out the communication mask time (Tmask) 121 from the storage unit 120 and waits for the read communication mask time (Tmask) 121 for the communication processing. To start. And since ECU2 used as a communication other party has already started the communication process, communication is immediately established. However, the ECU 2 performs useless communication processing during the period until communication with the ECU 1 is established. Therefore, in such a case, it is necessary to shorten the communication mask time (Tmask) 121 to accelerate the start of the communication process of the ECU and to approach the start time of the communication process of the ECU 2. Specifically, the Tmask is shortened by subtracting the shortened time (β) 123 from the communication mask time (Tmask) 121 to obtain a new communication mask time (Tmask) 121.

図9−2に示すように、再度車両システムが起動されECU1が起動すると、ECU1の通信処理部110は、記憶部120から通信マスク時間(Tmask)121を読み出し、読み出した通信マスク時間(Tmask)121の期間だけ待ち合せた後に通信処理を開始する。このTmask値は、前回の起動時のTmask値から短縮時間(β)123を差し引いたものである。したがって、学習前の図9−1の場合よりも、学習後の図9−2の場合のほうがECU1とECU2との通信処理開始時期が近づいており、無駄な通信処理が減少している。そして、車両システムの起動を繰り返すことにより、ECU1とECU2の通信処理開始時期は一致していくことになる。   As shown in FIG. 9-2, when the vehicle system is activated again and the ECU 1 is activated, the communication processing unit 110 of the ECU 1 reads out the communication mask time (Tmask) 121 from the storage unit 120, and the read communication mask time (Tmask). After waiting for the period 121, the communication process is started. This Tmask value is obtained by subtracting the shortening time (β) 123 from the Tmask value at the previous activation. Therefore, the communication processing start time between the ECU 1 and the ECU 2 is closer in the case of FIG. 9-2 after learning than in the case of FIG. 9-1 before learning, and wasteful communication processing is reduced. By repeating the activation of the vehicle system, the communication processing start times of the ECU 1 and the ECU 2 coincide with each other.

次に、本実施例2に係るECU1の処理手順について説明する。なお、実施例1に係る処理手順について説明した図5と異なる点は、Tmask更新処理(ステップS105)部分のみであるため、このTmask更新処理のバリエーションについて図10〜図12を用いて説明することとする。   Next, a processing procedure of the ECU 1 according to the second embodiment will be described. The only difference from FIG. 5 that describes the processing procedure according to the first embodiment is only the Tmask update process (step S105), and therefore, variations of this Tmask update process will be described with reference to FIGS. And

図10は、図5に示したTmask更新処理を通信マスク時間の短縮に対応させるよう変更した処理手順を示すフローチャートである。まず、通信マスク値更新処理部101は、通信成立時間(Tok)が0であるか否かを判定する(ステップS401)。そして、通信成立時間(Tok)が0でない場合には(ステップS401否定)、Tmaskが短すぎる場合であるのでTmask+Tok+αを新たなTmaskの値として設定する(ステップS402)。一方、通信成立時間(Tok)が0である場合には(ステップS401肯定)、Tmask−βを新たなTmaskの値として設定する(ステップS403)。   FIG. 10 is a flowchart showing a processing procedure in which the Tmask update process shown in FIG. 5 is changed to correspond to the shortening of the communication mask time. First, the communication mask value update processing unit 101 determines whether or not the communication establishment time (Tok) is 0 (step S401). If the communication establishment time (Tok) is not 0 (No at Step S401), Tmask is too short, and Tmask + Tok + α is set as a new Tmask value (Step S402). On the other hand, when the communication establishment time (Tok) is 0 (Yes at Step S401), Tmask-β is set as a new value of Tmask (Step S403).

このように、通信成立時間(Tok)が0であるか否かにより、Tmaskを延長あるいは短縮することとしたので、Tmaskが短すぎる場合のみならず長すぎる場合であっても適切なTmaskを算出することができる。また、通信成立時間(Tok)にマージン時間(α)122を加えた値を用いることとしたので、計測誤差や他ECU1の動作のばらつきによる通信成立時間(Tok)のずれを補正することができる。   As described above, since the Tmask is extended or shortened depending on whether or not the communication establishment time (Tok) is 0, an appropriate Tmask is calculated not only when the Tmask is too short but also when it is too long. can do. Further, since the value obtained by adding the margin time (α) 122 to the communication establishment time (Tok) is used, it is possible to correct the deviation of the communication establishment time (Tok) due to the measurement error and the variation in the operation of the other ECU 1. .

次に、図10に示したTmask更新処理の変形例について図11を用いて説明する。図11は、図10に示したTmask更新処理の変形例1の処理手順を示すフローチャートである。図10においては、Tmaskが長すぎる場合に短縮時間(β)123をTmaskから差し引いて新たなTmask値とした。しかしながら、Tmaskを短縮する学習を頻繁に実施すると計測誤差などの影響を反映しやすいためTmaskを短すぎる値に設定する頻度が高くなる傾向があり、かえって不要な通信処理が増加する場合がある。そこで、図11に示すTmask更新処理では、Tmaskを短縮する学習の実行頻度を抑える処理を追加した。   Next, a modification of the Tmask update process shown in FIG. 10 will be described with reference to FIG. FIG. 11 is a flowchart of a process procedure of the first modification of the Tmask update process depicted in FIG. In FIG. 10, when Tmask is too long, the shortening time (β) 123 is subtracted from Tmask to obtain a new Tmask value. However, frequent learning for shortening Tmask tends to reflect the influence of measurement errors and the like, and thus tends to increase the frequency of setting Tmask to a value that is too short, which may increase unnecessary communication processing. Therefore, in the Tmask update process shown in FIG. 11, a process for suppressing the execution frequency of learning for shortening Tmask is added.

図11に示すように、まず、通信マスク値更新処理部101は、通信成立時間(Tok)が0であるか否かを判定する(ステップS501)。そして、通信成立時間(Tok)が0でない場合は(ステップS501否定)、Tmaskが短すぎる場合であるのでTmask+Tok+αを新たなTmaskの値として設定する(ステップS505)。そして、Tmaskを短縮する学習の実行回数をあらわすcntに0を設定して(ステップS506)リターンする。   As shown in FIG. 11, the communication mask value update processing unit 101 first determines whether or not the communication establishment time (Tok) is 0 (step S501). If the communication establishment time (Tok) is not 0 (No at Step S501), Tmask is too short, so Tmask + Tok + α is set as a new Tmask value (Step S505). Then, 0 is set to cnt representing the number of executions of learning for shortening Tmask (step S506), and the process returns.

ここで、cntは、Tmaskを短縮する処理(ステップS504)を計数するためのカウンタであり、次回の起動の際に用いられるので保持先はスタンバイRAM15となる。また、ステップ505で用いられるNは、N回に1回の割合でTmaskを短縮する処理(ステップS504)を実行させるための数値データである。このデータは、静的なデータであるので保持先はROM13またはスタンバイRAM15となる。   Here, cnt is a counter for counting the process of shortening Tmask (step S504), and is used at the next start-up, so the holding destination is the standby RAM 15. N used in step 505 is numerical data for executing a process (step S504) for shortening Tmask at a rate of once every N times. Since this data is static data, the storage destination is the ROM 13 or the standby RAM 15.

そして、通信成立時間(Tok)が0である場合には(ステップS501肯定)、cntの値を1増加させる(ステップS502)。つづいて、このcntがNよりも大きいか否かを判定し(ステップS503)、cntがN以下であれば(ステップS503否定)リターンする。   When the communication establishment time (Tok) is 0 (Yes at Step S501), the value of cnt is increased by 1 (Step S502). Subsequently, it is determined whether or not this cnt is larger than N (step S503). If cnt is equal to or smaller than N (No in step S503), the process returns.

一方、かかるcntがNよりも大きければ(ステップS503肯定)、Tmask−βを新たなTmaskの値として設定する(ステップS504)。そして、cntの値を0に設定して(ステップS506)リターンする。   On the other hand, if such cnt is larger than N (Yes at step S503), Tmask-β is set as a new value of Tmask (step S504). Then, the value of cnt is set to 0 (step S506) and the process returns.

このように、Tmaskを短縮する学習の実行回数をあらわすcntを用いて、N回に1回の割合でTmaskを短縮する処理(ステップS504)を実行することとしたので、Tmaskを短縮する学習を頻繁に実施することによる不要な通信処理の増加を抑制することができる。   As described above, the process of shortening Tmask (step S504) is executed at a rate of once every N times using cnt that represents the number of times of learning for shortening Tmask. Therefore, learning for shortening Tmask is performed. An increase in unnecessary communication processing due to frequent implementation can be suppressed.

次に、図10に示したTmask更新処理の2つめの変形例について図12を用いて説明する。図12は、図10に示したTmask更新処理の変形例2の処理手順を示すフローチャートである。図10においては、Tmaskを延長する処理(ステップS402)およびTmaskを短縮する処理(ステップS403)をおこなっていたが、計測誤差や一時的な障害の発生によりTmask値が異常な値となる場合がある。このような場合には、かえって不要な通信処理が発生してしまうためTmaskがとりうる値に制限をかける必要がある。そこで、図12に示すTmask更新処理では、Tmaskがとりうる値に制限をかける処理を追加した。   Next, a second modification of the Tmask update process shown in FIG. 10 will be described with reference to FIG. FIG. 12 is a flowchart of a process procedure of the second modification of the Tmask update process depicted in FIG. In FIG. 10, the process of extending Tmask (step S402) and the process of shortening Tmask (step S403) are performed, but the Tmask value may become an abnormal value due to the occurrence of a measurement error or a temporary failure. is there. In such a case, unnecessary communication processing occurs on the contrary, and it is necessary to limit the values that Tmask can take. Therefore, in the Tmask update process shown in FIG. 12, a process for restricting the values that Tmask can take is added.

図12に示すように、まず、通信マスク値更新処理部101は、通信成立時間(Tok)が0であるか否かを判定する(ステップS601)。そして、通信成立時間(Tok)が0でない場合は(ステップS601否定)、Tmaskが短すぎる場合であるのでTmask+Tok+αを新たなTmaskの値として設定する(ステップS602)。一方、通信成立時間(Tok)が0である場合には(ステップS601肯定)、Tmask−βを新たなTmaskの値として設定する(ステップS603)。   As shown in FIG. 12, first, the communication mask value update processing unit 101 determines whether or not the communication establishment time (Tok) is 0 (step S601). If the communication establishment time (Tok) is not 0 (No at Step S601), Tmask is too short, and Tmask + Tok + α is set as a new Tmask value (Step S602). On the other hand, when the communication establishment time (Tok) is 0 (Yes at Step S601), Tmask-β is set as a new value of Tmask (Step S603).

そして、Tmaskの延長処理(ステップS602)またはTmaskの短縮処理(ステップS603)が完了すると、更新されたTmaskの値が最小マスク時間(Tmaskmin)125よりも小さいか否かを判定する(ステップS604)。そして、Tmaskの値が最小マスク時間(Tmaskmin)125よりも小さい場合には(ステップS604肯定)、Tmaskminを新たなTmaskの値として設定する(ステップS605)。一方、Tmaskの値が最小マスク時間(Tmaskmin)125以上の場合にはステップS605の処理をおこなわない。   When the Tmask extension process (step S602) or the Tmask reduction process (step S603) is completed, it is determined whether or not the updated Tmask value is smaller than the minimum mask time (Tmaskmin) 125 (step S604). . If the value of Tmask is smaller than the minimum mask time (Tmaskmin) 125 (Yes in step S604), Tmaskmin is set as a new value of Tmask (step S605). On the other hand, when the value of Tmask is equal to or greater than the minimum mask time (Tmaskmin) 125, the process of step S605 is not performed.

つづいて、Tmaskの値が最大マスク時間(Tmaskmax)124よりも大きいか否かを判定する(ステップS606)。そして、Tmaskの値が最大マスク時間(Tmaskmax)124よりも大きい場合には(ステップS606肯定)、Tmaskmaxを新たなTmaskの値として設定して(ステップS607)リターンする。一方、Tmaskの値が最大マスク時間(Tmaskmax)124以上の場合にはステップS607の処理をおこなうことなくリターンする。   Subsequently, it is determined whether or not the value of Tmask is larger than the maximum mask time (Tmaskmax) 124 (step S606). If the value of Tmask is greater than the maximum mask time (Tmaskmax) 124 (Yes at step S606), Tmaskmax is set as a new value of Tmask (step S607), and the process returns. On the other hand, if the value of Tmask is equal to or greater than the maximum mask time (Tmaskmax) 124, the process returns without performing the process of step S607.

このように、通信マスク時間(Tmask)121を、最小マスク時間(Tmaskmin)125以上かつ最大マスク時間(Tmaskmax)124以下となるよう処理したので、通信マスク時間(Tmask)121が異常な値をとることにより不要な通信処理が発生することを抑制することができる。   As described above, since the communication mask time (Tmask) 121 is processed to be not less than the minimum mask time (Tmaskmin) 125 and not more than the maximum mask time (Tmaskmax) 124, the communication mask time (Tmask) 121 takes an abnormal value. As a result, unnecessary communication processing can be prevented from occurring.

なお、図12においては、説明を解りやすくするために、図11で説明した「Tmaskを短縮する学習の実行頻度を抑える処理」を含まない構成について説明した。しかしながら、Tmaskを短縮する学習の実行頻度を抑える処理を含む構成とすることもできる。なお、Tmaskを短縮する学習の実行頻度を抑える処理を含める場合には、図12のステップS601〜S603の処理を、図11のステップS501〜ステップS506の処理に置き換えることになる。   In FIG. 12, the configuration not including the “processing for suppressing the execution frequency of learning for shortening Tmask” described in FIG. 11 has been described for easy understanding. However, it is also possible to adopt a configuration including a process for suppressing the execution frequency of learning for shortening Tmask. In addition, when including the process which suppresses the execution frequency of the learning which shortens Tmask, the process of step S601-S603 of FIG. 12 is replaced with the process of step S501-step S506 of FIG.

次に、本発明の実施例に係る通信監視処理の開始時期について図13を用いて説明する。図13は、本発明の実施例に係る通信監視処理の開始時期を説明するための説明図である。ECU1の通信処理部110では、通信エラーを検出するための通信監視処理をおこなうことが通常である。しかしながら、通信処理を開始してから通信が成立するまでの間に通信エラーを検出してしまうと、正常な処理であるにもかかわらずエラー処理がおこなわれてしまうという不都合が生ずる。   Next, the start time of the communication monitoring process according to the embodiment of the present invention will be described with reference to FIG. FIG. 13 is an explanatory diagram for explaining the start time of the communication monitoring process according to the embodiment of the present invention. The communication processing unit 110 of the ECU 1 normally performs a communication monitoring process for detecting a communication error. However, if a communication error is detected between the start of the communication process and the establishment of communication, there is a disadvantage that the error process is performed despite the normal process.

そこで、図13に示すように、通信成立のための処理を開始してから、通信が成立するまでの間は通信監視処理をおこなわず、通信が成立した後に通信監視処理をおこなうこととした。このようにすることで、通信成立のための処理中に通信エラーを検出することなく、通信が成立した後の通信エラーを効率的に検出することができる。なお、この通信監視処理は、図5に示した通常の通信処理開始(ステップS106)以降におこなわれることになる。   Therefore, as shown in FIG. 13, the communication monitoring process is not performed until the communication is established after the process for establishing the communication is started, and the communication monitoring process is performed after the communication is established. By doing in this way, the communication error after communication is established can be detected efficiently without detecting a communication error during the process for establishing communication. This communication monitoring process is performed after the normal communication process start (step S106) shown in FIG.

上述してきたように、本実施例2では、通信成立時間(Tok)に加えて、計測誤差や各ECU1の動作のばらつきに対応するためのマージン時間(α)、通信マスク時間(Tmask)の短縮に対応するための短縮時間(β)、通信マスク時間(Tmask)が異常値となることを防止するための最大マスク時間(Tmaskmax)および最小マスク時間(Tmaskmin)を用いることにより、通信マスク時間(Tmask)を算出するよう構成したので、より適切な通信マスク時間(Tmask)を用いることにより起動時の無駄な通信処理の発生を効果的に抑制することができる。   As described above, in the second embodiment, in addition to the communication establishment time (Tok), the margin time (α) and the communication mask time (Tmask) are shortened to cope with the measurement error and the variation in the operation of each ECU 1. By using the shortened time (β) for dealing with the above, the maximum mask time (Tmaskmax) and the minimum mask time (Tmaskmin) for preventing the communication mask time (Tmask) from becoming an abnormal value, Since Tmask) is calculated, use of a more appropriate communication mask time (Tmask) can effectively suppress occurrence of useless communication processing at the time of activation.

なお、上述した実施例においては、図3に示したソフトウェアを図2に示したECU1のハードウェア上に構成する場合について説明したが、ECU1内に独立した通信同期装置を構成し、かかる装置上で図3に示したソフトウェアを実行させる構成とすることとしてもよい。   In the embodiment described above, the case where the software shown in FIG. 3 is configured on the hardware of the ECU 1 shown in FIG. 2 has been described. However, an independent communication synchronization device is configured in the ECU 1, and The software shown in FIG. 3 may be executed.

以上のように、本発明にかかる通信同期装置、通信同期システム、通信同期方法および通信同期プログラムは、ネットワーク上の通信装置の通信開始同期処理に有用であり、特に、車載LAN上のECUの通信開始同期処理に適している。   As described above, the communication synchronization device, the communication synchronization system, the communication synchronization method, and the communication synchronization program according to the present invention are useful for the communication start synchronization processing of the communication device on the network. Suitable for start synchronous processing.

本発明の特徴部分である通信マスク時間の学習処理の概要を説明するための説明図である。It is explanatory drawing for demonstrating the outline | summary of the learning process of the communication mask time which is the characteristic part of this invention. 本発明の実施例に係るECUのハードウェア構成およびネットワーク構成を示すブロック図である。It is a block diagram which shows the hardware constitutions and network structure of ECU which concern on the Example of this invention. 本発明の実施例1に係るECU1のソフトウェア構成を示すブロック図である。It is a block diagram which shows the software structure of ECU1 which concerns on Example 1 of this invention. 通信マスク時間を延長させる必要がある場合の通信マスク時間および通信成立時間を説明するための説明図である。It is explanatory drawing for demonstrating the communication mask time and communication establishment time when it is necessary to extend communication mask time. 学習後の通信マスク時間を説明するための説明図である。It is explanatory drawing for demonstrating the communication mask time after learning. 実施例1の通信開始同期部の処理手順を示すフローチャートである。3 is a flowchart illustrating a processing procedure of a communication start synchronization unit according to the first embodiment. 図5に示したTok計測処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of Tok measurement process shown in FIG. 図5に示したTmask更新処理の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the Tmask update process shown in FIG. 本発明の実施例2に係る通信開始同期部のソフトウェア構成を示すブロック図である。It is a block diagram which shows the software structure of the communication start synchronizer concerning Example 2 of this invention. 通信マスク時間を短縮させる必要がある場合の通信マスク時間を説明するための説明図である。It is explanatory drawing for demonstrating communication mask time when it is necessary to shorten communication mask time. 学習後の通信マスク時間を説明するための説明図である。It is explanatory drawing for demonstrating the communication mask time after learning. 図5に示したTmask更新処理を通信マスク時間の短縮に対応させるよう変更した処理手順を示すフローチャートである。It is a flowchart which shows the process sequence which changed the Tmask update process shown in FIG. 5 so that it might respond | correspond to shortening of communication mask time. 図10に示したTmask更新処理の変形例1の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the modification 1 of the Tmask update process shown in FIG. 図10に示したTmask更新処理の変形例2の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the modification 2 of the Tmask update process shown in FIG. 本発明の実施例に係る通信監視処理の開始時期を説明するための説明図である。It is explanatory drawing for demonstrating the start time of the communication monitoring process which concerns on the Example of this invention.

符号の説明Explanation of symbols

1 電子制御装置(ECU)
2 電子制御装置(ECU)
10 中央処理装置(CPU)
11 タイマ
12 通信コントローラ
13 ROM
14 ノーマルRAM
15 スタンバイRAM
100 通信開始同期部
101 通信マスク値更新処理部
102 通信成立時間計測部
110 通信処理部
120 記憶部
121 通信マスク時間(Tmask)
122 マージン時間(α)
123 短縮時間(β)
124 最大マスク時間(Tmaskmax)
125 最小マスク時間(Tmaskmin)
1 Electronic control unit (ECU)
2 Electronic control unit (ECU)
10 Central processing unit (CPU)
11 Timer 12 Communication controller 13 ROM
14 Normal RAM
15 Standby RAM
DESCRIPTION OF SYMBOLS 100 Communication start synchronous part 101 Communication mask value update process part 102 Communication establishment time measurement part 110 Communication process part 120 Storage part 121 Communication mask time (Tmask)
122 Margin time (α)
123 Reduction time (β)
124 Maximum mask time (Tmaskmax)
125 Minimum mask time (Tmaskmin)

Claims (12)

通信開始時の通信同期制御をおこなう通信同期装置であって、
通信開始から通信成立までの通信成立時間を計測する計測手段と、
起動から通信開始までの無通信時間をあらわす通信マスク時間を前記通信成立時間に基づいて算出する算出手段と、
前記算出手段が算出した前記通信マスク時間を記憶する記憶手段と、
前記記憶手段が前記通信マスク時間を記憶した後の起動時に、前記記憶手段から前記通信マスク時間を読み出して該通信マスク時間の経過時に通信を開始する通信手段と
を備えたことを特徴とする通信同期装置。
A communication synchronization device that performs communication synchronization control at the start of communication,
Measuring means for measuring the communication establishment time from the communication start to communication establishment;
A calculation means for calculating a communication mask time representing a non-communication time from start to communication start based on the communication establishment time;
Storage means for storing the communication mask time calculated by the calculation means;
And a communication unit configured to read out the communication mask time from the storage unit and start communication when the communication mask time elapses when the storage unit is activated after storing the communication mask time. Synchronizer.
前記算出手段は、前記記憶手段から読み出した前記通信マスク時間に、前記通信成立時間を足し合わせることにより、新たな通信マスク時間を算出することを特徴とする請求項1に記載の通信同期装置。   The communication synchronization apparatus according to claim 1, wherein the calculation unit calculates a new communication mask time by adding the communication establishment time to the communication mask time read from the storage unit. 前記算出手段は、前記記憶手段から読み出した前記通信マスク時間に、前記通信成立時間および所定の長さの時間を足し合わせることにより、新たな通信マスク時間を算出することを特徴とする請求項1または2に記載の通信同期装置。   2. The calculation unit according to claim 1, wherein the communication unit calculates a new communication mask time by adding the communication establishment time and a predetermined length of time to the communication mask time read from the storage unit. Or the communication synchronizer of 2. 前記算出手段は、前記通信成立時間が0である場合に、前記記憶装置から読み出した前記通信マスク時間から所定の長さの時間を差し引くことにより、新たな通信マスク時間を算出することを特徴とする請求項1、2または3に記載の通信同期装置。   The calculation means calculates a new communication mask time by subtracting a predetermined length of time from the communication mask time read from the storage device when the communication establishment time is zero. The communication synchronization device according to claim 1, 2, or 3. 前記記憶手段は、前記通信成立時間が0である起動が連続しておこなわれたことをあらわすカウンタを記憶し、前記算出手段は、該カウンタが所定の回数を上回った場合にのみ、前記記憶装置から読み出した前記通信マスク時間から所定の長さの時間を差し引くことにより、新たな通信マスク時間を算出することを特徴とする請求項4に記載の通信同期装置。   The storage means stores a counter indicating that the activation with the communication establishment time of 0 has been continuously performed, and the calculation means only stores the storage device when the counter exceeds a predetermined number of times. The communication synchronization apparatus according to claim 4, wherein a new communication mask time is calculated by subtracting a predetermined length of time from the communication mask time read out from the communication mask. 前記記憶手段は、前記通信マスク時間の最小値をあらわす最小マスク時間と、前記通信マスク時間の最大値をあらわす最大マスク時間とを記憶し、前記算出手段は、算出した前記通信マスク時間が該最小マスク時間より小さい場合に該通信マスク時間を該最小マスク時間とし、算出した前記通信マスク時間が該最大マスク時間より大きい場合に該通信マスク時間を該最大マスク時間とすることを特徴とする請求項1〜5のいずれか一つに記載の通信同期装置。   The storage means stores a minimum mask time representing the minimum value of the communication mask time and a maximum mask time representing the maximum value of the communication mask time, and the calculating means stores the calculated communication mask time in the minimum The communication mask time is set as the minimum mask time when smaller than a mask time, and the communication mask time is set as the maximum mask time when the calculated communication mask time is larger than the maximum mask time. The communication synchronization device according to any one of 1 to 5. 前記記憶手段は、前記通信マスク時間の最小値をあらわす最小マスク時間と、前記通信マスク時間の最大値をあらわす最大マスク時間を記憶し、前記通信手段は、読み出した前記通信マスク時間が該最小マスク時間より小さい場合に該通信マスク時間を該最小マスク時間とし、読み出した前記通信マスク時間が該最大マスク時間より大きい場合に該通信マスク時間を該最大マスク時間とすることを特徴とする請求項1〜5のいずれか一つに記載の通信同期装置。   The storage means stores a minimum mask time representing a minimum value of the communication mask time and a maximum mask time representing a maximum value of the communication mask time, and the communication means stores the read communication mask time in the minimum mask time. 2. The communication mask time is set as the minimum mask time when the time is smaller than the time, and the communication mask time is set as the maximum mask time when the read communication mask time is longer than the maximum mask time. The communication synchronizer as described in any one of -5. 前記通信手段は、前記記憶手段から読み出した前記通信マスク時間が経過し、かつ、前記計測手段が計測した通信成立時間が経過した時点で通信監視処理を開始することを特徴とする請求項1〜7のいずれか一つに記載の通信同期装置。   The communication means starts the communication monitoring process when the communication mask time read from the storage means elapses and when the communication establishment time measured by the measurement means elapses. The communication synchronization device according to any one of 7. 移動体上に搭載され、通信開始時の通信同期制御をおこなう通信同期装置を含む電子制御ユニットと、複数の前記電子制御ユニットを相互に接続するネットワークとからなる通信同期システムであって、
それぞれの前記通信同期装置は、
通信開始から通信成立までの通信成立時間を計測する計測手段と、
起動から通信開始までの無通信時間をあらわす通信マスク時間を前記通信成立時間に基づいて算出する算出手段と、
前記算出手段が算出した前記通信マスク時間を記憶する記憶手段と、
前記記憶手段が前記通信マスク時間を記憶した後の起動時に、前記記憶手段から前記通信マスク時間を読み出して該通信マスク時間の経過時に通信を開始する通信手段と
を備えたことを特徴とする通信同期システム。
A communication synchronization system comprising an electronic control unit including a communication synchronization device that is mounted on a mobile body and performs communication synchronization control at the start of communication, and a network that interconnects the plurality of electronic control units,
Each of the communication synchronization devices is
Measuring means for measuring the communication establishment time from the communication start to communication establishment;
A calculation means for calculating a communication mask time representing a non-communication time from start to communication start based on the communication establishment time;
Storage means for storing the communication mask time calculated by the calculation means;
And a communication unit configured to read out the communication mask time from the storage unit and start communication when the communication mask time elapses when the storage unit is activated after storing the communication mask time. Synchronous system.
前記記憶手段を備えない通信同期装置を含む電子制御ユニットが、前記ネットワークに接続された場合には、前記通信同期装置は、前記記憶手段が保持する前記通信マスク時間を前記記憶手段を備えない通信同期装置に通知することを特徴とする請求項9に記載の通信同期システム。   When an electronic control unit including a communication synchronization device that does not include the storage unit is connected to the network, the communication synchronization unit performs communication that does not include the storage unit with the communication mask time held by the storage unit. The communication synchronization system according to claim 9, wherein a notification is sent to the synchronization device. 通信開始時の通信同期制御をおこなう通信同期方法であって、
通信開始から通信成立までの通信成立時間を計測する計測工程と、
起動から通信開始までの無通信時間をあらわす通信マスク時間を前記通信成立時間に基づいて算出する算出工程と、
前記算出工程が算出した前記通信マスク時間を記憶する記憶工程と、
前記記憶工程が前記通信マスク時間を記憶した後の起動時に、前記記憶工程から前記通信マスク時間を読み出して該通信マスク時間の経過時に通信を開始する通信工程と
を含んだことを特徴とする通信同期方法。
A communication synchronization method for performing communication synchronization control at the start of communication,
A measurement process for measuring communication establishment time from communication start to communication establishment;
A calculation step of calculating a communication mask time representing a non-communication time from start to communication start based on the communication establishment time;
A storage step of storing the communication mask time calculated by the calculation step;
A communication step of reading out the communication mask time from the storage step and starting communication when the communication mask time elapses when the storage step is started after storing the communication mask time. Synchronization method.
通信開始時の通信同期制御をおこなう通信同期プログラムであって、
通信開始から通信成立までの通信成立時間を計測する計測手順と、
起動から通信開始までの無通信時間をあらわす通信マスク時間を前記通信成立時間に基づいて算出する算出手順と、
前記算出手順が算出した前記通信マスク時間を記憶する記憶手順と、
前記記憶手順が前記通信マスク時間を記憶した後の起動時に、前記記憶手順から前記通信マスク時間を読み出して該通信マスク時間の経過時に通信を開始する通信手順と
をコンピュータに実行させることを特徴とする通信同期プログラム。
A communication synchronization program that performs communication synchronization control at the start of communication,
A measurement procedure for measuring the communication establishment time from communication start to communication establishment;
A calculation procedure for calculating a communication mask time representing a non-communication time from activation to communication start based on the communication establishment time;
A storage procedure for storing the communication mask time calculated by the calculation procedure;
A communication procedure for reading out the communication mask time from the storage procedure and starting communication when the communication mask time elapses when the storage procedure is started after storing the communication mask time. Communication synchronization program.
JP2004328183A 2004-11-11 2004-11-11 Communication synchronization device, system, method, and program Withdrawn JP2006140739A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004328183A JP2006140739A (en) 2004-11-11 2004-11-11 Communication synchronization device, system, method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004328183A JP2006140739A (en) 2004-11-11 2004-11-11 Communication synchronization device, system, method, and program

Publications (1)

Publication Number Publication Date
JP2006140739A true JP2006140739A (en) 2006-06-01

Family

ID=36621231

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004328183A Withdrawn JP2006140739A (en) 2004-11-11 2004-11-11 Communication synchronization device, system, method, and program

Country Status (1)

Country Link
JP (1) JP2006140739A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426258A (en) * 2017-08-25 2019-03-05 本田技研工业株式会社 The system and method that vehicle sensor data obtains processing are synchronized using vehicle communication
CN109426259A (en) * 2017-08-25 2019-03-05 本田技研工业株式会社 The system and method that vehicle sensor data obtains processing are synchronized using vehicle communication

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426258A (en) * 2017-08-25 2019-03-05 本田技研工业株式会社 The system and method that vehicle sensor data obtains processing are synchronized using vehicle communication
CN109426259A (en) * 2017-08-25 2019-03-05 本田技研工业株式会社 The system and method that vehicle sensor data obtains processing are synchronized using vehicle communication
CN109426258B (en) * 2017-08-25 2023-04-18 本田技研工业株式会社 System and method for synchronized vehicle sensor data acquisition processing using vehicle communication
CN109426259B (en) * 2017-08-25 2023-04-28 本田技研工业株式会社 System and method for synchronous vehicle sensor data acquisition processing using vehicle communication

Similar Documents

Publication Publication Date Title
JP2011068038A (en) Communication control device, job processing method for communication control device, and program
JP5818938B1 (en) Control device switching system
JPWO2018235790A1 (en) Vehicle control device
JP2015202710A (en) Electronic control device
KR20150019499A (en) Message process method of gateway
US10346332B2 (en) Slave device
JP2018045310A (en) Information processor, control method thereof and computer program
JP5712783B2 (en) Electronic control unit, in-vehicle network, data transmission method
JP2008107914A (en) Microcomputer, program and electronic control device for vehicle
JP6828633B2 (en) Data processing device, its control method, and program
JP2008305209A (en) Information processor, information processing method, program, and computer readable recording medium
JP2006140739A (en) Communication synchronization device, system, method, and program
JP5094356B2 (en) Information processing apparatus, information processing method, and program for executing the method
JP2011070309A (en) Switch state detection device and processing system
JP2008035417A (en) Communication apparatus and method for updating radio parameter thereof
JP2016170649A (en) Information processing device and control method of information processing device
JP2011199704A (en) Electronic apparatus enabling wireless communication, electronic apparatus system, and wireless communication method
JP2010097427A (en) Processing apparatus, processing method and computer program
JP2009037387A (en) Wireless usb system, device wire adapter, and method of controlling wired usb device
JP7310695B2 (en) Communications system
WO2018047860A1 (en) Relay device
KR101593338B1 (en) Apparatus for lin communication of vehicle and control method thereof
JP2006051635A (en) Device, method and program for controlling printing
JP2006270898A (en) Network processing system, its pattern data transmission method and program
JP2004153742A (en) Network apparatus and network system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071109

A761 Written withdrawal of application

Free format text: JAPANESE INTERMEDIATE CODE: A761

Effective date: 20090123