JP2007274123A - Communication system and communication method - Google Patents
Communication system and communication method Download PDFInfo
- Publication number
- JP2007274123A JP2007274123A JP2006094676A JP2006094676A JP2007274123A JP 2007274123 A JP2007274123 A JP 2007274123A JP 2006094676 A JP2006094676 A JP 2006094676A JP 2006094676 A JP2006094676 A JP 2006094676A JP 2007274123 A JP2007274123 A JP 2007274123A
- Authority
- JP
- Japan
- Prior art keywords
- frame
- transmission
- bus
- communication node
- transfer
- 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.)
- Granted
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Abstract
Description
本発明は、通信システム及び通信方法に関し、特に、マルチマスタの通信システム及び通信方法に関する。 The present invention relates to a communication system and a communication method, and more particularly to a multi-master communication system and a communication method.
近年、複数の通信ノードがバスに接続され、バスが解放されているときには複数の通信ノードがデータをバス上に送信することができるマルチマスタの通信システムが注目されている。 In recent years, a multi-master communication system has been attracting attention in which a plurality of communication nodes are connected to a bus and the plurality of communication nodes can transmit data onto the bus when the bus is released.
このようなマルチマスタの通信システムでは、図7に示すように、不特定多数の通信ノード1A、1B、1Cが共通のバスに接続されるため、通信ノードに対して共通のバス使用権の調停を行う調停回路を備えておらず、個々の通信ノードがバスの使用状況をモニタして送信の可否を判断している。バス使用権の調停回路を有していないマルチマスタの通信システムとしては、例えば、車内LAN等に用いられているController Area Network(CAN)等が存在する。
In such a multi-master communication system, as shown in FIG. 7, an unspecified number of
マルチマスタの通信システムにおける各通信ノードは図8に示すような構成をとる。内部バス17に接続されたCPU14、CPU14が処理するデータの保存などに用いられるメインRAM15、通信ノードの外部に設けられたセンサ3などからの情報を取得する外部I/F16、CANバス2の通信を制御するCAN制御ブロック4である。
Each communication node in the multi-master communication system has a configuration as shown in FIG. The
CAN制御ブロック4は、CANバス2のシリアルデータをパラレルデータに変換又はCANコントローラ11からのパラレルデータをシリアルデータに変換するシフトレジスタ13、送受信するデータを保持する送信バッファと受信バッファからなるメッセージバッファ12、シフトレジスタ13とメッセージバッファ12との間のデータ授受を制御するCANコントローラ11で構成される。
The CAN control block 4 includes a
CANコントローラ11は、図9に示すようにメッセージバッファからフレーム(ID、DLC、送信データ等から構成される)を受け取りシフトレジスタ13に供給する送信テンポラリバッファ112と、受信データをメッセージバッファに受け渡す機能と、これらをコントロールする制御回路111とから構成される。
As shown in FIG. 9, the
このようなCANに代表されるマルチマスタの通信システムではネットワークの通信を制御する共通の調停回路をもっていないため、個々のCANコントローラ11が、フレームを送信するたびにバスの使用状態を確認するアービトレーションを行ってから通信を開始することが必要となる。アービトレーションは、フレームを送信しようとしている通信ノードがCANバス2上に送信IDを出力し、通信ノードが出力した送信IDとCANバス2上に現れた送信IDとを比較し、一致したときに、バスの使用権を得たものとして、残りのフレーム(DLC、送信データ)の送信を行い、一致しなかった場合には、他の通信ノードからの優先順位の高い送信IDの出力があったものとして、送信を一端中止することによって行われる。
Since such a multi-master communication system represented by CAN does not have a common arbitration circuit that controls network communication, each
通信ノードからCANバス2へのデータ送信(フレーム送信)は図10に示すようなフローに従って処理される。メッセージバッファ12の中に送信要求のあるデータが存在する通信ノードは、送信テンポラリバッファ112にメッセージバッファ12にあるデータ(送信ID、送信DLC、送信データ、送信要求等)を読み出し送信準備が完了すると、バスの状態を確認するステップS51に移行する。ステップS51ではバスがビジー状態、すなわち他の通信ノードによって使用されている状態であればアイドル状態となるまでバスの状態確認を繰り返し、アイドル状態であることを検出するとステップS52へ移行する。ステップS52におけるフレームの送信は、フレームの優先順位を示す送信ID(上述のとおり、アービトレーションは送信IDの比較によって行われる)、データの長さを示すData Length Code(DLC)、データ、送信データと受信データで一致がとれているかをチェックするCycle Redundancy Code(CRC)、フレームの終了を示すEnd Of Frame(EOF)の順に行われ、EOFが送信されることによってステップS53に移行する。ステップS53では、送信されたフレームの受信に失敗した通信ノードが送信するエラーフレームの受信の有無を確認し、エラーフレームが受信されなかった場合、ステップS54に移行しフレームを送信した通信ノードの送信フェーズを完了し、エラーフレームを受信した場合、当該フレームを送信した通信ノードは送信を一端中断してステップS55に移行する。ステップS55では、エラー検出回数を示すエラーカウンタ値を確認し、エラーカウンタ値が規定値に達していなければステップS51に移行し、送信に失敗したフレームの再送信が実行されるが、エラーカウンタ値が規定値に達した場合には、ステップS56に移行しバス上の通信に参加できない状態であるバスオフステートに入る。ステップS56では、バスオフステートにある通信ノードは、バスをモニタし、ある条件、例えば、バスがアイドルであることを規定回数確認することを満たす又は、所定時間経過の後、ステップS57に移行して通信に復帰した後、ステップS51に移行し送信に失敗したフレームの再送信が実行される。このようにして、送信に失敗したフレームの再送信が行われる。
Data transmission (frame transmission) from the communication node to the CAN bus 2 is processed according to the flow shown in FIG. When a communication node in which data with a transmission request exists in the
次に、CANバス2上のデータ受信(フレーム受信)は、図11に示すようなフローによって処理される。CANバス2上に自分以外の通信ノードから出力されたフレームが存在するとき通信ノードはフレームの受信を開始して、ステップS71に移行する。ステップS71では、受信したフレームにエラーがあるかどうかを検出し、エラーがある場合には、ステップS72に移行してCANバス2上にエラーフレームを出力し、エラーがなかった場合には、ステップS73に移行する。ステップS73では、自分以外の通信ノードがエラーフレームをCANバス2上に出力し、それを受信したかどうかを検出し、エラーフレームを検出した場合には、受信したフレームを破棄するステップS74に移行し、エラーフレームが検出されなかった場合には、フレームは正常に受信されたものとしてステップS75に移行して受信を完了する。 Next, data reception (frame reception) on the CAN bus 2 is processed according to a flow as shown in FIG. When there is a frame output from a communication node other than itself on the CAN bus 2, the communication node starts receiving the frame, and proceeds to step S71. In step S71, it is detected whether or not there is an error in the received frame. If there is an error, the process proceeds to step S72 to output an error frame on the CAN bus 2. If there is no error, step S71 is performed. The process proceeds to S73. In step S73, a communication node other than itself outputs an error frame on the CAN bus 2 to detect whether it has been received. If an error frame is detected, the process proceeds to step S74 to discard the received frame. If no error frame is detected, the frame is assumed to have been received normally, and the process proceeds to step S75 to complete the reception.
ここで、バス上に大量に送信エラーを出力している、すなわちフレームの送信中に何度もエラーを発生させている通信ノードAが存在し、その通信ノードAがフレームを送信しようとしている場合について考える。 Here, there is a communication node A that has output a large number of transmission errors on the bus, that is, there is a communication node A that has repeatedly generated errors during frame transmission, and that communication node A is trying to transmit a frame. think about.
図12のタイミングチャートに示すように、通信ノードAは、フレームの送信をID A、DLC、データ A、CRCの順に実行する。このとき通信ノードCにおいて、CRCエラーの検出によりフレームの受信に失敗した場合、通信ノードCはCANバス2上にエラーフレームを送信する。CANバス2上に出力されたエラーフレームを受信することにより送信の失敗を検知した通信ノードAは、エラー検出回数をインクリメントし、エラー検出回数が規定値に達した場合には、能動的な通信の遮断状態であるバスオフステートに入ることによって、現時刻ではバス上にノイズなどの阻害要因がありうることを考慮して送信を諦め、所定時間経過の後、通信ノードAが通信に復帰するまで再送信を保留することになる。これは、エラーを頻発する通信ノードをバスから一時切り離しバスの使用効率を向上させるために行われている。このため、リアルタイム性が要求されている通信システムにおいて、通信ノードAから通信ノードCへ送ろうとしていたフレームの再送信が遅れてしまい通信の遅延の問題が発生する。 As shown in the timing chart of FIG. 12, the communication node A executes frame transmission in the order of ID A, DLC, data A, and CRC. At this time, if the communication node C fails to receive a frame due to detection of a CRC error, the communication node C transmits an error frame on the CAN bus 2. The communication node A that has detected a transmission failure by receiving the error frame output on the CAN bus 2 increments the number of error detections, and when the number of error detections reaches a specified value, active communication is performed. By entering into the bus off state, which is a blocking state, the communication node A returns to communication after a predetermined time has elapsed, considering that there may be noise and other obstruction factors on the bus at the current time. Until this time, the retransmission is suspended. This is performed in order to temporarily disconnect a communication node that frequently generates errors from the bus and improve the use efficiency of the bus. For this reason, in a communication system that requires real-time performance, the retransmission of a frame to be sent from the communication node A to the communication node C is delayed, causing a communication delay problem.
また、ネットワーク上で距離やノイズの影響で通信ノードAと通信ノードC間のみで通信が成立しなかった場合(エラーとなってしまった場合)においても、ネットワーク上の他のノード(ここでは通信ノードB)ではメッセージバッファに保持するべき情報であるID、DLC、データの受信に成功しているにも関わらず、バス上の任意の単一ノード(ここでは通信ノードC)での受信の失敗により受信フレームを破棄するという問題が発生する。すなわち、通信ノードAからのフレームが通信ノードB及びCの両方で受け取るべきフレームであり、通信ノードBでは正常に受信され、通信ノードCではエラーとなった場合にも通信ノードCのみならず、通信ノードBで正常に受信したフレームをも破棄するという問題が発生する。 Even if communication between communication node A and communication node C is not established due to the influence of distance and noise on the network (if an error occurs), other nodes on the network (in this case communication) Node B) failed to receive at any single node on the bus (in this case, communication node C) even though it successfully received ID, DLC, and data that should be stored in the message buffer. This causes a problem of discarding the received frame. That is, the frame from the communication node A is a frame that should be received by both the communication nodes B and C, and when the communication node B is normally received and an error occurs in the communication node C, not only the communication node C, There arises a problem that a frame normally received by the communication node B is also discarded.
本発明による通信ノードは、マルチマスタの通信システムのバスに接続される通信ノードであって、送信フレームに送信がエラーとなった場合に他の通信ノードに前記送信フレームの送信を代行させるための転送情報を付加する制御回路を備えることを特徴とする。 A communication node according to the present invention is a communication node connected to a bus of a multi-master communication system, and in the case where an error occurs in transmission in a transmission frame, the other communication node performs transmission of the transmission frame on behalf of A control circuit for adding transfer information is provided.
このような構成によって、他の通信ノードに対して送信フレームが転送情報を付加した送信フレームであることを通知することが可能となる。 With such a configuration, it is possible to notify other communication nodes that the transmission frame is a transmission frame to which transfer information is added.
また、本発明による通信ノードは、マルチマスタの通信システムのバスに接続される通信ノードであって、送信がエラーとなった場合に他の通信ノードに前記送信フレームの送信を代行させるための転送情報を付加された送信フレームを受け取り、かつ、エラーを受信した際に前記送信フレームを前記バスに送信する制御回路を備えることを特徴とする。 The communication node according to the present invention is a communication node connected to a bus of a multi-master communication system, and transfers a transmission to transfer the transmission frame to another communication node when an error occurs in transmission. A control circuit is provided that receives a transmission frame to which information is added and transmits the transmission frame to the bus when an error is received.
このような構成によって、受信した送信フレームを送信ノードに代わって転送することが可能となる。 With such a configuration, the received transmission frame can be transferred on behalf of the transmission node.
本発明によるフレーム送信方法は、マルチマスタの通信システムにおけるフレーム送信方法であって、通信ノードがバスオフステート直前であることを確認した際に送信フレームに転送フレームである情報を付加するステップと、前記転送フレームをバスに送信するステップと、を備えることを特徴とする。 A frame transmission method according to the present invention is a frame transmission method in a multi-master communication system, the step of adding information that is a transfer frame to a transmission frame when the communication node confirms that it is immediately before the bus off state; Transmitting the transfer frame to a bus.
このような方法によって、他の通信ノードに対して送信フレームが転送情報を付加した送信フレームであることを通知することが可能となる。 By such a method, it becomes possible to notify other communication nodes that the transmission frame is a transmission frame to which transfer information is added.
また、本発明によるフレーム受信方法は、マルチマスタの通信システムにおけるフレーム受信方法であって、通信ノードがバスから受信したフレームに対してエラーフレームが受信されたか否かを確認するステップと、前記エラーフレームの受信が確認されたとき前記受信したフレームが転送要求情報を付加された転送フレームであるか否かを確認するステップと、を備えることを特徴とする。 The frame reception method according to the present invention is a frame reception method in a multi-master communication system, in which a communication node confirms whether an error frame is received for a frame received from a bus, and the error And a step of confirming whether or not the received frame is a transfer frame to which transfer request information is added when reception of the frame is confirmed.
このような方法によって、受信した送信フレームを送信ノードに代わって転送することが可能となる。 By such a method, the received transmission frame can be transferred on behalf of the transmission node.
また、本発明による通信システムは、複数の通信ノードがバスに接続されたマルチマスタの通信システムであって、送信フレームに送信がエラーとなりエラーフレームがバスに出力された場合に第2の通信ノードに前記送信フレームの送信を代行させるための転送情報を付加して前記バスに送信する第1の通信ノードと、前記転送情報が付加された送信フレームを受け取ると共に前記送信フレームに対して前記エラーフレームがバスに出力されたとき前記送信フレームを前記第1の通信ノードに代わってバスに送信する前記第2の通信ノードと、を備えることを特徴とする。 The communication system according to the present invention is a multi-master communication system in which a plurality of communication nodes are connected to a bus, and the second communication node when an error occurs in a transmission frame and an error frame is output to the bus. A first communication node that adds transmission information for substituting transmission of the transmission frame to the bus and transmits the transmission frame to the bus; receives the transmission frame with the transmission information added; And the second communication node that transmits the transmission frame to the bus on behalf of the first communication node when the frame is output to the bus.
このような構成によって、特定の通信ノードからの送信フレームに転送情報を付加することができ、当該転送情報が付加された送信フレームを他の通信ノードによって転送することが可能となる。 With such a configuration, transfer information can be added to a transmission frame from a specific communication node, and a transmission frame to which the transfer information is added can be transferred by another communication node.
上述のように、他の通信ノードに転送要求フレームであることを通知すること、受信したフレームが転送要求されているフレームである場合に転送することが可能となり、通信効率を向上させることができる。 As described above, it is possible to notify other communication nodes that a frame is a transfer request frame, and to transfer when the received frame is a frame for which transfer is requested, thereby improving communication efficiency. .
本発明の通信システムは、バス上に接続された複数の通信ノード(通信モジュール又は通信回路とも呼ばれる)はのうち、転送を依頼するノードと、転送を実行する機能を有したノードとを配置することによって実現することができる。より具体的には、エラーとなったフレームに転送を依頼するフレームである情報を追加して送信する機能を備えた通信ノードと、受信したフレームが転送を依頼されているフレームである場合には、受信したフレームを転送する機能を備えた通信ノードとをバスに接続することによって実現することができる。なお、マルチマスタの通信システムでは、IDを使ってアービトレーションを行っているため、転送を依頼する通信ノードは複数あっても良いが、転送を実行する通信ノードが複数有ると同じIDを有するフレームが複数の通信ノードから出力されてぶつかる可能性があるため、転送を実行する通信ノードは1つが好ましい。 In the communication system of the present invention, among a plurality of communication nodes (also referred to as communication modules or communication circuits) connected on the bus, a node that requests transfer and a node that has a function of executing transfer are arranged. Can be realized. More specifically, in the case of a communication node having a function of adding and transmitting information that is a frame requesting transfer to a frame in error, and when the received frame is a frame for which transfer is requested This can be realized by connecting a communication node having a function of transferring the received frame to the bus. In a multi-master communication system, since arbitration is performed using an ID, there may be a plurality of communication nodes that request transfer. However, if there are a plurality of communication nodes that perform transfer, a frame having the same ID may be used. Since there is a possibility of collision from being output from a plurality of communication nodes, one communication node that performs transfer is preferable.
本発明の一実施の形態であるCANコントローラの構成を、図1及び図2を用いて説明する。ここではフレームの中のDLCの使われていないビットに転送を依頼するフレームか否か、転送されたフレームか否かの情報を埋め込んだ例について説明する。 A configuration of a CAN controller according to an embodiment of the present invention will be described with reference to FIGS. Here, an example will be described in which information on whether or not a frame is requested to be transferred and whether or not it is a transferred frame is included in a bit that is not used by DLC in the frame.
転送を依頼する送信側の通信ノードのCANコントローラ11Aは、図1に示すように、当該通信ノードがフレームを送信した際に、CANバス2上のエラーフレームを受信することによってインクリメントされるエラーカウンタ1111とエラーカウンタ1111の値と比較される規定値を保持した規定値レジスタ1112とを備えた制御回路111A、メッセージバッファからの送信ID,送信DLC、送信データ、送信要求を保持する送信テンポラリバッファ113を備える。制御回路111Aは、エラーカウンタ1111の値及び規定値レジスタの値とに基づいて、送信DLCを書き替えると共に、受信したフレームのIDと送信テンポラリバッファ113に保持された送信IDとを比較し、一致した場合に送信テンポラリバッファ113の送信要求をクリアする機能を備える。
As shown in FIG. 1, the CAN controller 11A of the transmission side communication node requesting the transfer is incremented by receiving an error frame on the CAN bus 2 when the communication node transmits a frame. A
転送を依頼される受信側の通信ノードのCANコントローラ11Bは、図2に示すように、当該通信ノードがフレームを受信した際に、シフトレジスタ13からのフレーム(受信ID,DLC、受信データ)を保持する受信テンポラリバッファ112、受信したフレームのDLCをデコードするDLCデコード回路121、受信テンポラリバッファのDLC及び転送要求を制御する制御回路111Bを備える。
As shown in FIG. 2, the CAN controller 11B of the receiving communication node requested to transfer the frame (reception ID, DLC, received data) from the
すなわち、転送に関わる送信側の通信ノードのCANコントローラは、転送を依頼するか否かの情報をフレームに付加する機能を備えた制御回路を、転送に関わる受信側の通信ノードのCANコントローラは、受信したフレームが転送を依頼するフレームか否かをデコードするデコード回路、及び受信フレームを一時保存する受信テンポラリバッファを備えることによって転送を実現することが可能となる。 That is, the CAN controller of the communication node on the transmission side involved in the transfer has a control circuit having a function of adding information on whether or not to request the transfer to the frame, and the CAN controller of the communication node on the reception side related to the transfer is Transfer can be realized by including a decoding circuit for decoding whether or not the received frame is a frame for which transfer is requested, and a reception temporary buffer for temporarily storing the received frame.
次に、送信側及び受信側の通信ノードの動作について、図3及び図4のフローチャートを参照しながら説明する。 Next, the operation of the transmission side and reception side communication nodes will be described with reference to the flowcharts of FIGS.
送信側の通信ノードのCANコントローラ11A内の制御回路111Aは、送信要求があるとき、すなわち、メッセージバッファに送信要求のあるデータが存在するとき、メッセージバッファから送信テンポラリバッファ113に当該データを取り込み、送信の準備を行い、ステップS60に移行する。ステップS60では、制御回路111AはCANバス2がアイドル状態となっているか否かをCANバス2上にデータが出力されているかによって判定し、アイドル状態でない場合にはバスの状態確認を繰り返し、アイドル状態を検出したらステップS61へ移行する。ステップS61では、制御回路111Aにより、エラーカウンタ1111と設定値レジスタ1112の値とが比較されてバスオフステート直前か否かが判定され、バスオフステート直前であればステップS63に移行し、そうでなければステップS62に移行する。ステップS63では、制御回路111Aは、送信DLCのビットに、バス上の任意の通信ノードにフレームの転送を依頼する情報を埋め込み、当該フレームをCANバス2上に送信しステップS64に移行する。ステップS62では、制御回路111Aは、従来と同様に、送信フレームをCANバス2上に送信しステップS64に移行する。ステップS64では、制御回路111Aは、バス上のデータを受信(RxD)し監視することによってステップS62又は63でCANバス2上に送信されたフレームに対してエラーフレームが送信されているか否かを検出し、エラーフレームが検出されない場合にはステップS65に移行し、検出された場合にはステップS66に移行する。ステップS65に移行した場合は、制御回路111Aは、フレームの送信が正常に終了したものとして送信を完了し、送信テンポラリバッファ113の送信要求をクリアする。ステップS66では、制御回路111Aは、エラー検出回数を示すエラーカウンタ1111の値を確認し、この値が規定値レジスタに設定された規定値に達していればバスオフステートであるステップS67に移行し、続いてステップS68に移行する。ステップS68では、制御回路111Aは、転送フレームが他の通信ノードによって正常に送信されたか否か、すなわち、転送フレームの送信に対しエラーフレームが検出されたか否をバス上のデータを受信することによって検出し、エラーフレームが検出されない場合には、正常に転送が行われたものとしてステップS65に移行し、エラーフレームが検出された場合には、ステップS69に移行する。ステップS69では、制御回路111Aは、通信復帰のための所定時間等が経過した後通信に復帰し、送信に失敗したフレームの再送信を行う。
The
受信側の通信ノードのCANコントローラ11Bの制御回路111Bは、ステップS81で、CANバス2上にデータ(フレーム)が出力されたことに応答して受信を開始し、CANバス2上のフレームを受信テンポラリバッファ112に取り込み、当該通信ノードで受け取ったフレームにエラーがあるかないか、例えばCRCチェック等によって検出し、エラーがあった場合には、ステップS82に移行し、エラーがなかった場合にはステップS82に移行する。ステップS82では、受信したフレームにエラーが検出されたため、制御回路111Bは、CANバス2にエラーフレームを出力する。ステップS83では、制御回路111Bは、他の通信ノードからCANバス2上にエラーフレームが送信されたか否かを検出し、エラーフレームが送信されているときにはステップS84に移行し、エラーフレームが送信されていないときにはステップS85に移行する。ステップS84では、制御回路111Bは、受信テンポラリバッファ112に記憶されているフレームのDLCをDLCデコード回路121によって検出し、デコードの結果、受信したフレームが転送要求フレームであった場合にはステップS86に移行し、受信したフレームが転送要求フレームで無い場合には、ステップS87に移行する。ステップS86では、制御回路111Bは、受信テンポラリバッファ112に転送要求フラグを立てると共に、受信テンポラリバッファ112に取り込まれたフレームのDLCを転送要求フレームから通常フレームに書き替えてCANバス2に送信(転送)を行う。ステップS87では、制御回路111Bは、受信テンポラリバッファに保持されたフレームを破棄して受信を完了する。
In step S81, the
次に、本発明の転送を依頼する送信側のCANコントローラを備えた通信ノードAと、転送を依頼される受信側のCANコントローラを備えた通信ノードBとを備えた通信システム上でのフレームの授受について図10に示すタイミングチャートを用いて説明する。 Next, a frame on a communication system including a communication node A having a transmission-side CAN controller requesting transfer and a communication node B having a receiving-side CAN controller requested to transfer is transmitted. The exchange will be described with reference to the timing chart shown in FIG.
バス上にエラーとなるフレーム(データ)を多数回出力している通信ノードAが存在し、エラーフレームのカウント値が転送を依頼しなければならない値、例えばバスオフステート直前の値になっており通信ノードAが転送を依頼するフレーム、すなわちDLCに転送を依頼することを示す値が書き込まれたフレームを送信し、同じCANバス2上に存在する通信ノードBが当該フレームを受信してCANバス2上に転送をする場合について考える。 There is a communication node A that outputs a frame (data) that causes an error many times on the bus, and the count value of the error frame is a value that must be requested to be transferred, for example, the value immediately before the bus off state. The communication node A transmits a frame for which transfer is requested, that is, a frame in which a value indicating that transfer is requested to the DLC is transmitted, and the communication node B existing on the same CAN bus 2 receives the frame and receives the CAN bus. Consider the case of forwarding on 2.
通信ノードAは、CANバス2へフレームをID A、DLC、データ A、CRCの順に送信する。ここで、通信ノードCがCANバス2のデータを受信した際CRCの受信の段階でエラーを検出すると、通信ノードCはCANバス2にエラーフレームを送信する。 The communication node A transmits frames to the CAN bus 2 in the order of ID A, DLC, data A, and CRC. When the communication node C receives data on the CAN bus 2 and detects an error at the CRC reception stage, the communication node C transmits an error frame to the CAN bus 2.
このエラーフレームを受信することにより通信ノードAは、バスオフステート直前からバスオフステートに移行し、CANバス2の状態を確認する(送信は行わない)受動的な状態に移行する。通信ノードBは、自身では正常に受信されたフレームに関し、CANバス2からエラーフレームを受信したことによりCANバス2上にフレームの受信に失敗した他の通信ノードが存在することを検知し、受信したフレームがDLCに転送を依頼する除法が着込まれた転送フレームであるため、当該転送フレームの送信をID A、DLC、データ A、CRCの順に送信する。このとき、バスオフステートになっている通信ノードAでは転送を依頼したフレームの受信をCANバス2上のフレームと送信に失敗した送信テンポラリバッファに格納されたフレームとを比較し、転送フレームの送信がエラーフレームの送信無しに終了したことを検出する、すなわち、通信ノードBからの転送フレームを通信ノードCが正常に受信したことによりバスオフステートから復帰すると共に、送信テンポラリバッファに保持されていたフレームの送信要求をクリアし、当該フレームの再送信をキャンセルする。 By receiving this error frame, the communication node A shifts to the bus off state immediately before the bus off state, and shifts to a passive state that confirms the state of the CAN bus 2 (does not transmit). The communication node B detects that there is another communication node on the CAN bus 2 that has failed to receive the frame due to the reception of the error frame from the CAN bus 2 regarding the frame that has been normally received by itself. Since the received frame is a transfer frame in which a method of requesting transfer to the DLC is embedded, transmission of the transfer frame is transmitted in the order of ID A, DLC, data A, and CRC. At this time, in the communication node A in the bus off state, the reception of the frame requested to be transferred is compared with the frame on the CAN bus 2 and the frame stored in the transmission temporary buffer which has failed to be transmitted, and the transmission of the transfer frame is performed. Is detected without the transmission of the error frame, that is, when the transfer frame from the communication node B is normally received by the communication node C, the bus is returned from the bus off state and held in the transmission temporary buffer. Clear the frame transmission request and cancel the retransmission of the frame.
以上説明したように、本発明によれば、通信のリアルタイム性が向上し、単一の通信ノードによるバスの占有を軽減することができると共にバスオフステートとなった通信ノードを早期に通信に復帰させることができるという効果を得ることができる。 As described above, according to the present invention, the real-time property of communication is improved, the occupation of the bus by a single communication node can be reduced, and the communication node that is in the bus off state is quickly returned to communication. The effect that it can be made can be acquired.
なお、実施の形態では、CANを例にして説明したが、これに限定されるものではなく、マルチマスタの通信システムであれば、適用可能であり、それ以外の通信システムでも、本発明の趣旨を逸脱しない範囲で、適用可能であることはいうまでもない。 In the embodiment, the CAN has been described as an example. However, the present invention is not limited to this, and the present invention can be applied to any multi-master communication system. The gist of the present invention is applicable to other communication systems. Needless to say, the present invention can be applied without departing from the scope of the present invention.
また、フレームの中のDLCに転送を依頼するフレームか否か、転送されたフレームか否かの情報を埋め込んだ例について説明したが、DLCに限らず、フレームを受信した通信ノードが転送を依頼するフレームか否か、転送されたフレームか否かを判別することができる情報であれば、フレーム中のどこにあってもよい。 In addition, although an example has been described in which information indicating whether or not the frame is a transfer request frame to the DLC in the frame is embedded, the communication node that received the frame requests the transfer, not limited to the DLC. As long as the information can determine whether the frame is a frame to be transmitted or not, it may be anywhere in the frame.
なお、CANであれば、フレーム中のDLCにプロトコルで利用が規定されていないビットが存在するため、DLC内の当該ビットを利用することによって、プロトコルを変更することなく本願発明を実現することが可能である。 In the case of CAN, since there is a bit that is not specified in the protocol in the DLC in the frame, the present invention can be realized without changing the protocol by using the bit in the DLC. Is possible.
1A,1B,1C 通信ノード
11,11A,11B CANコントローラ
111,111A,111B 制御回路
112 受信テンポラリバッファ
113 送信テンポラリバッファ
1111 エラーカウンタ
1112 規定値レジスタ
121 DLCデコード回路
1A, 1B,
Claims (20)
通信ノードがバスオフステート直前であることを確認した際に送信フレームに転送フレームである情報を付加するステップと、
前記転送フレームをバスに送信するステップと、を備えることを特徴とするフレーム送信方法。 A frame transmission method in a multi-master communication system, comprising:
Adding a transfer frame to the transmission frame when confirming that the communication node is immediately before the bus off state;
And a step of transmitting the transfer frame to a bus.
通信ノードがバスから受信したフレームに対してエラーフレームが受信されたか否かを確認するステップと、
前記エラーフレームの受信が確認されたとき前記受信したフレームが転送要求情報を付加された転送フレームであるか否かを確認するステップと、を備えることを特徴とするフレーム受信方法。 A frame reception method in a multi-master communication system, comprising:
Checking whether an error frame is received with respect to a frame received by the communication node from the bus;
And a step of confirming whether or not the received frame is a transfer frame to which transfer request information is added when reception of the error frame is confirmed.
送信フレームに送信がエラーとなりエラーフレームがバスに出力された場合に第2の通信ノードに前記送信フレームの送信を代行させるための転送情報を付加して前記バスに送信する第1の通信ノードと、
前記転送情報が付加された送信フレームを受け取ると共に前記送信フレームに対して前記エラーフレームがバスに出力されたとき前記送信フレームを前記第1の通信ノードに代わってバスに送信する前記第2の通信ノードと、を備えることを特徴とする通信システム。 A multi-master communication system in which a plurality of communication nodes are connected to a bus,
A first communication node for transmitting to the bus by adding transfer information for substituting transmission of the transmission frame to the second communication node when transmission becomes an error in the transmission frame and the error frame is output to the bus; ,
The second communication that receives the transmission frame to which the transfer information is added and transmits the transmission frame to the bus instead of the first communication node when the error frame is output to the bus with respect to the transmission frame. A communication system comprising: a node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006094676A JP4890909B2 (en) | 2006-03-30 | 2006-03-30 | Communication system and communication method. |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006094676A JP4890909B2 (en) | 2006-03-30 | 2006-03-30 | Communication system and communication method. |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007274123A true JP2007274123A (en) | 2007-10-18 |
JP4890909B2 JP4890909B2 (en) | 2012-03-07 |
Family
ID=38676499
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006094676A Expired - Fee Related JP4890909B2 (en) | 2006-03-30 | 2006-03-30 | Communication system and communication method. |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4890909B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010108418A (en) * | 2008-10-31 | 2010-05-13 | Toshiba Corp | Wireless meter reading device and wireless meter reading system |
JP2013131907A (en) * | 2011-12-21 | 2013-07-04 | Toyota Motor Corp | Vehicle network monitoring device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04273736A (en) * | 1991-02-28 | 1992-09-29 | Nec Corp | Packet communication system and packet re-transmission equipment |
JP2002359625A (en) * | 2001-05-31 | 2002-12-13 | Aisin Seiki Co Ltd | Control area network |
JP2005341358A (en) * | 2004-05-28 | 2005-12-08 | Matsushita Electric Ind Co Ltd | Electric light line communications system |
-
2006
- 2006-03-30 JP JP2006094676A patent/JP4890909B2/en not_active Expired - Fee Related
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH04273736A (en) * | 1991-02-28 | 1992-09-29 | Nec Corp | Packet communication system and packet re-transmission equipment |
JP2002359625A (en) * | 2001-05-31 | 2002-12-13 | Aisin Seiki Co Ltd | Control area network |
JP2005341358A (en) * | 2004-05-28 | 2005-12-08 | Matsushita Electric Ind Co Ltd | Electric light line communications system |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010108418A (en) * | 2008-10-31 | 2010-05-13 | Toshiba Corp | Wireless meter reading device and wireless meter reading system |
JP2013131907A (en) * | 2011-12-21 | 2013-07-04 | Toyota Motor Corp | Vehicle network monitoring device |
Also Published As
Publication number | Publication date |
---|---|
JP4890909B2 (en) | 2012-03-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5308802B2 (en) | CAN node | |
KR101519793B1 (en) | Network system for vehicle and data transmission method of a different kind communication controller in the same system | |
JP5510275B2 (en) | Communication system, master node, slave node | |
US8448035B2 (en) | Communication system adapting for car, communication apparatus adapting for car, and communication method adapting for car | |
US8780772B2 (en) | Communication protocol for wireless enhanced controller area networks | |
WO2012020761A1 (en) | Communication system and communication apparatus | |
US9197373B2 (en) | Method, apparatus, and system for retransmitting data packet in quick path interconnect system | |
KR20150120952A (en) | Data transmission with protocol exception state | |
US7389469B2 (en) | Bus systems, apparatuses, and methods of operating a bus | |
JP4594124B2 (en) | Communication system and communication method | |
US20170134299A1 (en) | Method and apparatus for controlling message over heterogeneous network | |
JP2014086812A (en) | Can system and node | |
CN110071860B (en) | Robot communication method, robot communication system and robot | |
US10931564B2 (en) | Handling of acknowledgement in wireless radio ad-hoc networks | |
JP4890909B2 (en) | Communication system and communication method. | |
EP1307007A1 (en) | Communication system, communication device, and communication method | |
JP2010141819A (en) | Communication device, communication method, and communication program | |
JP2006319381A (en) | Method for transmitting urgent message | |
CN112398901B (en) | Method and system for performing double message arbitration | |
KR100609493B1 (en) | Method for transmitting multiple sensors data with a CAN message | |
JP2011103577A (en) | Communication controller, communication system, and communication control method | |
JP7039959B2 (en) | Communication systems, relay devices, and nodes | |
Um | A Performance Model of Controller Area Networks for Vehicles under Unsaturated Traffic | |
CN113315601B (en) | Multipoint-assisted data transmission method and device, storage medium and electronic equipment | |
JP4936469B2 (en) | Communications system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20081212 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20100421 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110414 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110419 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110615 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110705 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110830 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20111213 |
|
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20111215 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20141222 Year of fee payment: 3 |
|
S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |