JP6471613B2 - Relay device and communication system - Google Patents

Relay device and communication system Download PDF

Info

Publication number
JP6471613B2
JP6471613B2 JP2015108799A JP2015108799A JP6471613B2 JP 6471613 B2 JP6471613 B2 JP 6471613B2 JP 2015108799 A JP2015108799 A JP 2015108799A JP 2015108799 A JP2015108799 A JP 2015108799A JP 6471613 B2 JP6471613 B2 JP 6471613B2
Authority
JP
Japan
Prior art keywords
communication
transmission
message
unit
data
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.)
Active
Application number
JP2015108799A
Other languages
Japanese (ja)
Other versions
JP2016225741A (en
Inventor
翼 金森
翼 金森
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.)
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Wiring Systems Ltd
AutoNetworks Technologies Ltd
Sumitomo Electric Industries 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 Sumitomo Wiring Systems Ltd, AutoNetworks Technologies Ltd, Sumitomo Electric Industries Ltd filed Critical Sumitomo Wiring Systems Ltd
Priority to JP2015108799A priority Critical patent/JP6471613B2/en
Publication of JP2016225741A publication Critical patent/JP2016225741A/en
Application granted granted Critical
Publication of JP6471613B2 publication Critical patent/JP6471613B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Traffic Control Systems (AREA)
  • Small-Scale Networks (AREA)

Description

本発明は、複数の通信線中の1つに接続されている複数の通信装置にデータを送信する中継装置、及び、該中継装置を備える通信システムに関する。   The present invention relates to a relay device that transmits data to a plurality of communication devices connected to one of a plurality of communication lines, and a communication system including the relay device.

車両に搭載される通信システムとして、複数の通信線中の1つに接続されている複数の通信装置が互いに通信する通信システムが提案されている。複数の通信装置夫々は、車両に搭載された電気機器を制御するECU(Electronic Control Unit)である。この通信システムでは、複数の通信装置間の通信によって、複数の電気機器を連動させる制御処理が実現される。   As a communication system mounted on a vehicle, a communication system in which a plurality of communication devices connected to one of a plurality of communication lines communicate with each other has been proposed. Each of the plurality of communication devices is an ECU (Electronic Control Unit) that controls an electric device mounted on the vehicle. In this communication system, a control process for interlocking a plurality of electrical devices is realized by communication between a plurality of communication devices.

複数の通信装置夫々が複数の通信線中の1つに接続されている通信システムでは、複数の通信線夫々は中継装置に接続されており、中継装置が複数の通信装置間の通信を中継する。このような通信システムにおいて、例えば、2つの通信線夫々に接続されている2つの通信装置に中継装置が同時に送信すべき場合が考えられる。   In a communication system in which a plurality of communication devices are connected to one of a plurality of communication lines, each of the plurality of communication lines is connected to a relay device, and the relay device relays communication between the plurality of communication devices. . In such a communication system, for example, there may be a case where the relay apparatus should transmit simultaneously to two communication apparatuses connected to two communication lines.

複数の通信線夫々を介した通信において、データ毎に送信の優先度が設けられている場合、通信線ごとに通信の状況が異なっているため、中継装置が、2つの通信線夫々に接続されている2つの通信装置に同時にデータを送信することは難しい。   In communication via each of a plurality of communication lines, when transmission priority is provided for each data, since the communication status differs for each communication line, the relay device is connected to each of the two communication lines. It is difficult to simultaneously transmit data to two communication devices.

この問題を解決する通信システムとして、特許文献1は、複数の通信線夫々を介した通信において、中継装置が行うデータ送信の優先度が複数の通信装置が行うデータ送信の優先度よりも高い通信システムを開示している。この通信システムでは、中継装置が行うデータ送信の優先度が高いため、複数の通信線夫々に接続されている複数の通信装置にデータが中継装置から同時に送信される確率は高い。   As a communication system that solves this problem, Patent Document 1 discloses a communication in which the priority of data transmission performed by a relay device is higher than the priority of data transmission performed by a plurality of communication devices in communication via a plurality of communication lines. A system is disclosed. In this communication system, since the priority of data transmission performed by the relay device is high, the probability that data is simultaneously transmitted from the relay device to the plurality of communication devices connected to the plurality of communication lines is high.

特開2008−172362号公報JP 2008-172362 A

しかしながら、特許文献1に記載されている通信システムの中継装置がデータを送信する場合において、データ送信に用いられる通信線を介して、他のデータの送受信が実行中であるとき、中継装置は、データ送信の優先度に無関係に、他のデータの送受信の終了を待たなければならない。   However, when the relay device of the communication system described in Patent Document 1 transmits data, when other data is being transmitted / received via the communication line used for data transmission, the relay device Regardless of the priority of data transmission, the end of transmission / reception of other data must be waited.

従って、例えば、2つの通信線夫々に接続されている2つの通信装置に中継装置がデータを送信する場合において、一方の通信線が使用されており、他の通信線が使用されていないとき、中継装置は、他の通信線に接続されている通信装置にデータを先に送信してしまう。
このため、特許文献1に記載の通信システムには、中継装置は、複数の通信線夫々を介したデータの同時送信を確実に行うことができないという問題がある。
Thus, for example, when the relay device transmits data to two communication devices connected to two communication lines, when one communication line is used and the other communication line is not used, The relay device transmits data first to a communication device connected to another communication line.
For this reason, the communication system described in Patent Document 1 has a problem that the relay apparatus cannot reliably perform simultaneous transmission of data via each of the plurality of communication lines.

本発明は斯かる事情に鑑みてなされたものであり、その目的とするところは、複数の通信線夫々を介したデータの同時送信を確実に行うことができる中継装置、及び、該中継装置を備える通信システムを提供することにある。   The present invention has been made in view of such circumstances, and an object of the present invention is to provide a relay device capable of reliably performing simultaneous transmission of data via each of a plurality of communication lines, and the relay device. A communication system is provided.

本発明に係る中継装置は、N(N:2以上の整数)個の通信線中の1つに夫々が接続され、該通信線を介してデータの送受信を行う複数の通信装置にデータを送信する中継装置において、K(K:2以上N以下の整数)個の前記通信線に接続されている全ての前記通信装置に送信禁止を示す禁止情報を送信する禁止送信部と、前記禁止送信部による前記全ての通信装置への前記禁止情報の送信が成功して前記全ての通信装置の送信が禁止されている間に、前記K個の通信線夫々を介して前記全ての通信装置に共通のデータを送信する同時送信を行うデータ送信部とを備えることを特徴とする。 The relay device according to the present invention is connected to one of N (N: integer greater than or equal to 2) communication lines, and transmits data to a plurality of communication devices that transmit and receive data via the communication line. In the relay device, the prohibition transmission unit that transmits prohibition information indicating transmission prohibition to all the communication devices connected to K (K: an integer not less than 2 and not more than N) communication lines, and the prohibition transmission unit While the transmission of the prohibition information to all of the communication devices is successful and the transmission of all of the communication devices is prohibited , the common to all the communication devices via each of the K communication lines And a data transmission unit that performs simultaneous transmission for transmitting data.

本発明にあっては、複数の通信装置夫々は、N個の通信線中の1つに接続され、通信線を介してデータの送受信を行う。これらの通信装置にデータを送信する。
例えば、K個の通信線夫々に接続されているK個の通信装置にデータを同時に送信する必要がある場合、事前に、K個の通信線に接続されている全ての通信装置に送信禁止を示す禁止情報を送信する。これにより、K個の通信線に接続されている全ての通信装置の送信が禁止されるので、K個の通信線夫々を介したデータの同時送信を確実に行うことが可能である。
In the present invention, each of the plurality of communication devices is connected to one of the N communication lines, and transmits and receives data via the communication line. Data is transmitted to these communication devices.
For example, if it is necessary to transmit data simultaneously to K communication devices connected to K communication lines, prohibit transmission in advance for all communication devices connected to K communication lines. Send prohibited information to indicate. Accordingly, since all of the transmission of the communication equipment that is connected to the K communication line is inhibited, it is possible to reliably perform the simultaneous transmission of data via the people the K communication lines husband.

また、K個の通信線に接続されている全ての通信装置が行う送信が禁止されている間に、K個の通信線夫々を介して共通のデータを送信する。これにより、K個の通信線夫々を介した共通のデータの同時受信が実現される。 Further , while transmission performed by all communication devices connected to the K communication lines is prohibited, common data is transmitted via each of the K communication lines. This realizes simultaneous reception of common data via each of the K communication lines.

本発明に係る中継装置は、前記N個の通信線中の1つを介して特定のデータを受信するデータ受信部を備え、前記禁止送信部は、該データ受信部が前記特定のデータを受信した場合に前記禁止情報を送信することを特徴とする。   The relay device according to the present invention includes a data receiving unit that receives specific data via one of the N communication lines, and the prohibited transmission unit receives the specific data by the data receiving unit. In this case, the prohibition information is transmitted.

本発明にあっては、N個の通信線中の1つを介して特定のデータを受信した場合、K個の通信線に接続されている複数の通信装置に禁止情報を送信する。その後、例えば、受信した特定のデータの同時送信を行う。   In the present invention, when specific data is received via one of N communication lines, the prohibition information is transmitted to a plurality of communication devices connected to the K communication lines. Thereafter, for example, the received specific data is simultaneously transmitted.

本発明に係る通信システムは、前述した中継装置と、該中継装置からデータを受信する複数の前記通信装置とを備え、該複数の通信装置夫々は、前記禁止送信部が送信した禁止情報を受信する禁止受信部を有し、該禁止受信部が前記禁止情報を受信した場合、データの送信を停止することを特徴とする。   A communication system according to the present invention includes the relay device described above and a plurality of the communication devices that receive data from the relay device, and each of the plurality of communication devices receives the prohibition information transmitted by the prohibition transmission unit. A prohibition receiving unit configured to stop data transmission when the prohibition reception unit receives the prohibition information.

本発明にあっては、複数の通信装置は中継装置からデータを受信する。複数の通信装置夫々は、中継装置から禁止情報を受信した場合、データの送信を停止する。これにより、複数の通信装置夫々の送信が禁止される。   In the present invention, the plurality of communication devices receive data from the relay device. Each of the plurality of communication devices stops data transmission when the prohibition information is received from the relay device. Thereby, transmission of each of a plurality of communication devices is prohibited.

本発明に係る通信システムは、前記通信装置は、前記禁止受信部が禁止情報を受信してから所定期間が経過した後にデータの送信を再開することを特徴とする。   The communication system according to the present invention is characterized in that the communication device resumes data transmission after a predetermined period has elapsed since the prohibition receiving unit received the prohibition information.

本発明にあっては、通信装置は、禁止情報を受信してから所定時間が経過した後にデータの送信を再開する。これにより、簡単な構成でデータの送信を許可することが可能となる。   In the present invention, the communication apparatus resumes data transmission after a predetermined time has elapsed since the prohibition information was received. As a result, data transmission can be permitted with a simple configuration.

本発明に係る通信システムは、前記中継装置は、前記K個の通信線に接続されている複数の前記通信装置に送信許可を示す許可情報を送信する許可送信部を有し、複数の前記通信装置夫々は、前記許可送信部が送信した許可情報を受信する許可受信部を有し、該許可受信部が前記許可情報を受信した場合、データの送信を再開することを特徴とする。 In the communication system according to the present invention, the relay device includes a permission transmission unit that transmits permission information indicating transmission permission to the plurality of communication devices connected to the K communication lines, and the plurality of the communication devices Each device has a permission receiving unit that receives permission information transmitted by the permission transmitting unit, and when the permission receiving unit receives the permission information , transmission of data is resumed.

本発明にあっては、中継装置は、K個の通信線に接続されている複数の通信装置に禁止情報を送信し、これらの通信装置の送信が禁止される。その後、中継装置は、K個の通信線に接続されている複数の通信装置に許可情報を送信する。K個の通信線に接続されている複数の通信装置夫々は、禁止情報を受信した場合にデータの送信を停止し、許可情報を受信した場合にデータの送信を再開する。このため、K個の通信線夫々を介したデータの送信が確実に禁止されている状態でデータの同時送信を行うことが可能となる。   In the present invention, the relay device transmits prohibition information to a plurality of communication devices connected to K communication lines, and transmission of these communication devices is prohibited. Thereafter, the relay device transmits permission information to a plurality of communication devices connected to the K communication lines. Each of the plurality of communication devices connected to the K communication lines stops data transmission when the prohibition information is received, and resumes data transmission when the permission information is received. For this reason, simultaneous transmission of data can be performed in a state where transmission of data through each of the K communication lines is reliably prohibited.

本発明に係る通信システムは、前述した中継装置と、該中継装置からデータを受信する複数の前記通信装置とを備え、前記中継装置は、前記データ送信部が前記共通のデータを送信した後に、前記K個の通信線に接続されている複数の前記通信装置に送信許可を示す許可情報を送信する許可送信部を有し、複数の前記通信装置夫々は、前記禁止送信部が送信した禁止情報を受信する禁止受信部と、前記許可送信部が送信した許可情報を受信する許可受信部とを有し、前記禁止受信部が前記禁止情報を受信した場合にデータの送信を停止し、前記許可受信部が前記許可情報を受信した場合にデータの送信を再開することを特徴とする。 A communication system according to the present invention includes the relay device described above and a plurality of the communication devices that receive data from the relay device, and the relay device transmits the common data after the data transmission unit transmits the common data. A permission transmission unit that transmits permission information indicating transmission permission to the plurality of communication devices connected to the K communication lines, and each of the plurality of communication devices includes prohibition information transmitted by the prohibition transmission unit. And a permission receiving unit that receives permission information transmitted by the permission transmitting unit. When the prohibition receiving unit receives the prohibition information, the transmission of data is stopped, and the permission is received. When the receiving unit receives the permission information, transmission of data is resumed.

本発明にあっては、複数の通信装置は中継装置からデータを受信する。中継装置は、K個の通信線に接続されている複数の通信装置に禁止情報を送信する。通信装置は、禁止情報を受信した場合、データの送信を停止する。中継装置は、K個の通信線に接続されている複数の通信装置の送信が禁止されている間に、K個の通信線夫々を介して共通のデータを送信する。その後、中継装置は、送信許可を示す許可情報を、K個の通信線に接続されている複数の通信装置に送信する。これらの通信装置は、許可情報を受信した場合、データの送信を再開する。   In the present invention, the plurality of communication devices receive data from the relay device. The relay device transmits prohibition information to a plurality of communication devices connected to the K communication lines. When receiving the prohibition information, the communication device stops data transmission. The relay device transmits common data via each of the K communication lines while transmission of the plurality of communication devices connected to the K communication lines is prohibited. Thereafter, the relay device transmits permission information indicating transmission permission to a plurality of communication devices connected to the K communication lines. When receiving the permission information, these communication devices resume data transmission.

本発明によれば、K個の通信線に接続されている複数の通信装置にデータの送信を禁止するため、K個の通信線夫々を介したデータの同時送信を確実に行うことができる。   According to the present invention, since data transmission is prohibited to a plurality of communication devices connected to K communication lines, simultaneous transmission of data via each of the K communication lines can be reliably performed.

実施の形態1における通信システムの要部構成を示すブロック図である。1 is a block diagram showing a main part configuration of a communication system according to Embodiment 1. FIG. メッセージの構成の説明図である。It is explanatory drawing of a structure of a message. 通信装置の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of a communication apparatus. 通信装置の制御部が実行する送信制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the transmission control process which the control part of a communication apparatus performs. 通信装置の通信部が実行する送信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the transmission process which the communication part of a communication apparatus performs. 通信装置の通信部が実行する受信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reception process which the communication part of a communication apparatus performs. 中継装置の要部構成を示すブロック図である。It is a block diagram which shows the principal part structure of a relay apparatus. メッセージ対応表の内容を示す図表である。It is a chart which shows the contents of a message correspondence table. 中継装置の制御部が実行する送信制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the transmission control process which the control part of a relay apparatus performs. 中継装置の制御部が実行する送信制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the transmission control process which the control part of a relay apparatus performs. 中継装置の通信部が実行する送信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the transmission process which the communication part of a relay apparatus performs. 中継装置の通信部が実行する受信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reception process which the communication part of a relay apparatus performs. 実施の形態2における通信装置の制御部が実行する送信制御処理の手順を示すフローチャートである。10 is a flowchart illustrating a procedure of transmission control processing executed by a control unit of the communication device according to Embodiment 2. 通信装置の通信部が実行する受信処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the reception process which the communication part of a communication apparatus performs. 中継装置の制御部が実行する送信制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the transmission control process which the control part of a relay apparatus performs. 中継装置の制御部が実行する送信制御処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the transmission control process which the control part of a relay apparatus performs.

以下、本発明をその実施の形態を示す図面に基づいて詳述する。
(実施の形態1)
図1は、実施の形態1における通信システム1の要部構成を示すブロック図である。通信システム1は、車両に好適に搭載され、中継装置2、N(=3)個の通信線3,4,5及び6つの通信装置30,31,40,41,50,51を備える。中継装置2は、N(=3)個の通信線3,4,5夫々に接続されている。
Hereinafter, the present invention will be described in detail with reference to the drawings illustrating embodiments thereof.
(Embodiment 1)
FIG. 1 is a block diagram illustrating a main configuration of a communication system 1 according to the first embodiment. The communication system 1 is suitably mounted on a vehicle and includes a relay device 2, N (= 3) communication lines 3, 4, 5 and six communication devices 30, 31, 40, 41, 50, 51. The relay device 2 is connected to N (= 3) communication lines 3, 4, and 5.

通信線3に2つの通信装置30,31が各別に接続されている。通信線4に2つの通信装置40,41が各別に接続されている。通信線5に2つの通信装置50,51に接続されている。
このように、6つの通信装置30,31,40,41,50,51夫々はN(=3)個の通信線3,4,5中の1つに接続されている。
Two communication devices 30 and 31 are connected to the communication line 3 separately. Two communication devices 40 and 41 are connected to the communication line 4 separately. Two communication devices 50 and 51 are connected to the communication line 5.
In this way, each of the six communication devices 30, 31, 40, 41, 50, 51 is connected to one of N (= 3) communication lines 3, 4, 5.

6つの通信装置30,31,40,41,50,51夫々は、車両に搭載された図示しない電気機器を制御するECUである。6つの通信装置30,31,40,41,50,51は互いに通信し、通信装置30,31,40,41,50,51の通信によって、複数の電気機器を連動させる制御処理が実現される。中継装置2は、6つの通信装置30,31,40,41,50,51間の通信を中継する。   Each of the six communication devices 30, 31, 40, 41, 50, 51 is an ECU that controls an electric device (not shown) mounted on the vehicle. The six communication devices 30, 31, 40, 41, 50, 51 communicate with each other, and a control process for interlocking a plurality of electrical devices is realized by communication of the communication devices 30, 31, 40, 41, 50, 51. . The relay device 2 relays communication between the six communication devices 30, 31, 40, 41, 50, and 51.

中継装置2及び通信装置30,31は通信線3を介して互いにメッセージ、所謂データフレームを送受信する。中継装置2及び通信装置40,41は通信線4を介して互いにメッセージを送受信する。中継装置2及び通信装置50,51は通信線5を介して互いにメッセージを送受信する。中継装置2は、通信線3,4,5の中で異なる通信線に接続される複数の通信装置の通信を中継する。   The relay device 2 and the communication devices 30 and 31 transmit and receive messages, so-called data frames, to each other via the communication line 3. The relay device 2 and the communication devices 40 and 41 transmit and receive messages to and from each other via the communication line 4. The relay device 2 and the communication devices 50 and 51 transmit and receive messages to and from each other via the communication line 5. The relay device 2 relays communication of a plurality of communication devices connected to different communication lines among the communication lines 3, 4, and 5.

6つの通信装置30,31,40,41,50,51夫々は、中継装置2からメッセージを受信し、中継装置2にメッセージを送信する。中継装置2は、6つの通信装置30,31,40,41,50,51からメッセージを受信し、6つの通信装置30,31,40,41,50,51にメッセージを送信する。中継装置2は、例えば、通信装置30が通信線3を介して送信したメッセージを、通信線4に接続されている通信装置40と、通信線5に接続されている通信装置50とに送信する。   Each of the six communication devices 30, 31, 40, 41, 50, 51 receives a message from the relay device 2 and transmits a message to the relay device 2. The relay device 2 receives messages from the six communication devices 30, 31, 40, 41, 50, 51 and transmits messages to the six communication devices 30, 31, 40, 41, 50, 51. For example, the relay device 2 transmits a message transmitted by the communication device 30 via the communication line 3 to the communication device 40 connected to the communication line 4 and the communication device 50 connected to the communication line 5. .

中継装置2は、送信禁止を示すメッセージを6つの通信装置30,31,40,41,50,51夫々に送信する。6つの通信装置30,31,40,41,50,51夫々は、送信禁止を示すメッセージを受信した場合、メッセージの送信を停止する。送信禁止を示すメッセージは禁止情報に相当する。   The relay device 2 transmits a message indicating transmission prohibition to each of the six communication devices 30, 31, 40, 41, 50, and 51. When each of the six communication devices 30, 31, 40, 41, 50, 51 receives a message indicating that transmission is prohibited, it stops transmitting the message. A message indicating prohibition of transmission corresponds to prohibition information.

通信線3,4,5夫々は、所謂ツイストペア線であり、撚り合わされた図示しない2つの導線によって構成される。また、メッセージは複数のビットのデータによって構成され、1ビットのデータは、「0」(ドミナント)又は「1」(リセッシブ)で表される。   Each of the communication lines 3, 4, 5 is a so-called twisted pair line, and is constituted by two conductors (not shown) twisted together. The message is composed of a plurality of bits of data, and 1-bit data is represented by “0” (dominant) or “1” (recessive).

通信装置30,31夫々は、通信線3を構成する2つの導線に電圧を印加することによって、1ビットのデータを送信する。具体的に、通信装置30,31夫々は、2つの導線間の電圧差が所定電圧以上の一定電圧、例えば2Vとなるように、2つの導線夫々に電圧を印加する。これにより、データ「0」が送信される。また、通信装置30,31夫々は、2つの導線間の電圧差が所定電圧未満の一定電圧、例えば、0Vとなるように、2つの導線夫々に電圧を印加する。これにより、データ「1」が送信される。所定電圧は例えば1Vである。   Each of the communication devices 30 and 31 transmits 1-bit data by applying a voltage to the two conductors constituting the communication line 3. Specifically, each of the communication devices 30 and 31 applies a voltage to each of the two conductors such that the voltage difference between the two conductors is a constant voltage equal to or higher than a predetermined voltage, for example, 2V. As a result, data “0” is transmitted. Further, each of the communication devices 30 and 31 applies a voltage to each of the two conductors so that the voltage difference between the two conductors becomes a constant voltage less than a predetermined voltage, for example, 0V. As a result, data “1” is transmitted. The predetermined voltage is 1 V, for example.

更に、通信装置30,31夫々は、通信線3を構成する2つの導線間の電圧差を検出することによって、1ビットのデータ「0」又は「1」を受信する。通信装置30,31夫々は、検出した電圧差が所定電圧以上である場合、データ「0」を受信し、検出した電圧差が所定電圧未満である場合、データ「1」を受信する。   Further, each of the communication devices 30 and 31 receives 1-bit data “0” or “1” by detecting a voltage difference between two conductors constituting the communication line 3. Each of the communication devices 30 and 31 receives data “0” when the detected voltage difference is greater than or equal to the predetermined voltage, and receives data “1” when the detected voltage difference is less than the predetermined voltage.

データ「0」及び「1」が通信線3に同時に送信された場合、通信線3を構成する2つの導線間の電圧差は所定電圧以上となり、データ「0」が受信される。   When data “0” and “1” are transmitted to the communication line 3 at the same time, the voltage difference between the two conductors constituting the communication line 3 becomes a predetermined voltage or more, and the data “0” is received.

通信装置40,41夫々は、通信装置30,31と同様に1ビットのデータを送受信する。通信装置30,31の送受信の説明において、通信線3及び通信装置30,31夫々を通信線4及び通信装置40,41に置き換えることによって、通信装置40,41の送受信を説明することができる。
同様に、通信装置50,51夫々も、通信装置30,31と同様に1ビットのデータを送受信する。通信装置30,31の送受信の説明において、通信線3及び通信装置30,31夫々を通信線5及び通信装置50,51に置き換えることによって、通信装置50,51の送受信を説明することができる。
Each of the communication devices 40 and 41 transmits and receives 1-bit data in the same manner as the communication devices 30 and 31. In the description of the transmission / reception of the communication devices 30 and 31, the transmission / reception of the communication devices 40 and 41 can be described by replacing the communication line 3 and the communication devices 30 and 31 with the communication line 4 and the communication devices 40 and 41, respectively.
Similarly, the communication devices 50 and 51 transmit and receive 1-bit data in the same manner as the communication devices 30 and 31. In the description of the transmission / reception of the communication devices 30 and 31, the transmission / reception of the communication devices 50 and 51 can be described by replacing the communication line 3 and the communication devices 30 and 31 with the communication line 5 and the communication devices 50 and 51, respectively.

図2はメッセージの構成の説明図である。通信線3,4,5夫々を介した通信、即ち、メッセージの送受信は、CAN(Controller Area Network)プロトコルに従って行われる。CAN通信で用いられるメッセージは、図2に示されているように、SOF(Start Of Frame)、アービトレーションフィールド、コントロールフィールド、データフィールド、CRC(Cyclic Redundancy Check)フィールド、ACK(Acknowledge)及びEOF(End Of Frame)によって構成される。   FIG. 2 is an explanatory diagram of the structure of the message. Communication via the communication lines 3, 4, 5, that is, transmission / reception of messages is performed according to a CAN (Controller Area Network) protocol. As shown in FIG. 2, the message used in the CAN communication includes SOF (Start Of Frame), arbitration field, control field, data field, CRC (Cyclic Redundancy Check) field, ACK (Acknowledge), and EOF (End of Frame). Of Frame).

SOFは1つのビットによって構成され、このビットのデータは「0」(ドミナント)である。SOFはメッセージの開始を示す。
通信線3,4,5夫々において、複数のメッセージが同時に送信された場合、アービトレーション(調停)が行われる。アービトレーションフィールドには、メッセージの種類を表すメッセージID(Identification Data)とRTR(Remote Transmission Request)ビットとが含まれる。メッセージIDはアービトレーションに用いられる。
The SOF is composed of one bit, and the data of this bit is “0” (dominant). SOF indicates the start of the message.
Arbitration (arbitration) is performed when a plurality of messages are transmitted simultaneously on each of the communication lines 3, 4, 5. The arbitration field includes a message ID (Identification Data) indicating a message type and an RTR (Remote Transmission Request) bit. The message ID is used for arbitration.

コントロールフィールドに含まれるデータは、データフィールドの長さを示す。データフィールドはメッセージの中核をなし、データフィールドに含まれるデータは、メッセージの具体的な内容を示す。CRCフィールドは複数のビットのデータによって構成される。CRCフィールドに含まれるデータはコード及びCRC境界を示す。コードは、例えば、15ビットのデータによって表され、CRC境界は1ビットのデータによって表される。   Data included in the control field indicates the length of the data field. The data field forms the core of the message, and the data included in the data field indicates the specific content of the message. The CRC field is composed of a plurality of bits of data. Data included in the CRC field indicates a code and a CRC boundary. For example, the code is represented by 15-bit data, and the CRC boundary is represented by 1-bit data.

ACKは、1ビットのデータによって構成され、メッセージが正しく受信されたか否かの確認に用いられる。EOFに含まれるデータはメッセージの終了を示す。EOFは、例えば、夫々が「1」(リセッシブ)である7ビットのデータによって構成される。   The ACK is composed of 1-bit data, and is used to check whether the message has been correctly received. Data contained in the EOF indicates the end of the message. The EOF is composed of 7-bit data, each of which is “1” (recessive), for example.

通信線3を介した通信で行われるアービトレーションを説明する。中継装置2及び通信装置30,31夫々は、メッセージのSOFから順に1ビットのデータを送信する。ここで、中継装置2及び通信装置30,31夫々は、通信線3を構成する2つの導線間の電圧差も検出している。   Arbitration performed in communication via the communication line 3 will be described. Each of the relay device 2 and the communication devices 30 and 31 transmits 1-bit data in order from the SOF of the message. Here, each of the relay device 2 and the communication devices 30 and 31 also detects a voltage difference between two conductors constituting the communication line 3.

中継装置2及び通信装置30,31夫々は、アービトレーションフィールドに含まれるデータを送信している間、送信したデータと、通信線3を介して送信されているデータとが一致しているか否かを判定する。前述したように、データ「0」(ドミナント)及び「1」(リセッシブ)が同時に通信線3に送信された場合、データ「0」が通信線3を介して送信される。中継装置2及び通信装置30,31夫々は、データ「1」を送信したにも関わらず、データ「0」が通信線3を介して送信されている場合、データの送信を停止する。このように、アービトレーションが行われる。   While each of the relay device 2 and the communication devices 30 and 31 is transmitting data included in the arbitration field, it is determined whether or not the transmitted data matches the data transmitted via the communication line 3. judge. As described above, when data “0” (dominant) and “1” (recessive) are simultaneously transmitted to the communication line 3, the data “0” is transmitted via the communication line 3. The relay device 2 and the communication devices 30 and 31 stop transmitting data when the data “0” is transmitted via the communication line 3 even though the data “1” is transmitted. In this way, arbitration is performed.

通信線3において、メッセージIDが同一である複数のメッセージが中継装置2及び通信装置30,31から送信されることはない。中継装置2及び通信装置30,31の中で、アービトレーションフィールドに含まれるデータの送信を完了した1つの装置が、メッセージを送信する送信権を獲得し、このメッセージの送信が終了するまで他の装置がメッセージを送信することはない。   In the communication line 3, a plurality of messages having the same message ID are not transmitted from the relay device 2 and the communication devices 30 and 31. Among the relay device 2 and the communication devices 30 and 31, one device that has completed transmission of data included in the arbitration field acquires a transmission right to transmit a message, and the other device until the transmission of this message is completed. Never send a message.

通信線4,5夫々を介した通信で行われるアービトレーションも、通信線3を介した通信で行われるアービトレーションと同様に行われる。通信線3を介した通信で行われるアービトレーションの説明において、通信線3及び通信装置30,31を、通信線4及び通信装置40,41に置き換えることによって、通信線4を介した通信で行われるアービトレーションを説明することができる。同様に、通信線3を介した通信で行われるアービトレーションの説明において、通信線3及び通信装置30,31を、通信線5及び通信装置50,51に置き換えることによって、通信線5を介した通信で行われるアービトレーションを説明することができる。   Arbitration performed by communication via the communication lines 4 and 5 is also performed in the same manner as arbitration performed by communication via the communication line 3. In the explanation of arbitration performed by communication via the communication line 3, the communication line 3 and the communication devices 30 and 31 are replaced with the communication line 4 and the communication devices 40 and 41, thereby performing the communication via the communication line 4. Explain arbitration. Similarly, in the explanation of the arbitration performed by communication via the communication line 3, the communication line 3 and the communication devices 30 and 31 are replaced with the communication line 5 and the communication devices 50 and 51, whereby communication via the communication line 5 is performed. Can explain the arbitration performed in

図3は通信装置30の要部構成を示すブロック図である。通信装置30は、制御部60、通信部61、入力部62、出力部63、記憶部64及びタイマ65を有する。これらはバス66に接続されている。通信部61は、バス66の他に通信線3に接続されている。   FIG. 3 is a block diagram showing a main configuration of the communication device 30. The communication device 30 includes a control unit 60, a communication unit 61, an input unit 62, an output unit 63, a storage unit 64, and a timer 65. These are connected to the bus 66. The communication unit 61 is connected to the communication line 3 in addition to the bus 66.

通信部61は、所謂、CANドライバであり、図示しないCPU(Central Processing Unit)を有する。通信部61は、通信線3を介してメッセージを送信する送信処理と、通信線3を介してメッセージを受信する受信処理とを行う。受信処理において、通信部61が受信するメッセージには、送信禁止を示すメッセージを含む。通信部61は、受信処理において、受信したメッセージが通信線3を介したメッセージの送信禁止を示していない場合、受信したメッセージを制御部60に通知する。通信部61は、受信したメッセージが通信線3を介したメッセージの送信禁止を示している場合、即ち、送信禁止を示すメッセージを中継装置2から受信した場合、メッセージの送信禁止を制御部60に通知する。通信部61は禁止受信部として機能する。   The communication unit 61 is a so-called CAN driver and has a CPU (Central Processing Unit) (not shown). The communication unit 61 performs a transmission process for transmitting a message via the communication line 3 and a reception process for receiving a message via the communication line 3. In the reception process, the message received by the communication unit 61 includes a message indicating that transmission is prohibited. In the reception process, the communication unit 61 notifies the control unit 60 of the received message when the received message does not indicate message transmission prohibition via the communication line 3. When the received message indicates that the transmission of the message via the communication line 3 is prohibited, that is, when the message indicating that the transmission is prohibited is received from the relay device 2, the communication unit 61 instructs the control unit 60 to prohibit the transmission of the message. Notice. The communication unit 61 functions as a prohibited reception unit.

入力部62には、車両に搭載されている図示しない種々のセンサの出力結果、又は、車両に設けられている操作用のスイッチのオン/オフ等を示す信号が入力される。入力部62は、入力された信号の内容を制御部60に通知する。
出力部63は、車両に搭載された電気機器に接続されており、制御部60の指示に従って、動作を制御するための信号を電気機器に出力する。電気機器は、出力部63から出力された信号に応じて、作動又は停止等を行う。
The input unit 62 is supplied with signals indicating output results of various sensors (not shown) mounted on the vehicle, or on / off of operation switches provided on the vehicle. The input unit 62 notifies the control unit 60 of the content of the input signal.
The output unit 63 is connected to an electric device mounted on the vehicle, and outputs a signal for controlling the operation to the electric device in accordance with an instruction from the control unit 60. The electric device operates or stops according to the signal output from the output unit 63.

タイマ65は、制御部60の指示に従って、計時の開始及び終了を行う。タイマ65が計時している計時時間は、制御部60によって、タイマ65から読み出される。
記憶部64は不揮発性メモリであり、記憶部64には制御プログラムが記憶されている。記憶部64には、更に、通信部61が通信線3を介して送信すべきデータが記憶される送信データ領域が設けられている。記憶部64に記憶されている内容の読み出し及び書き込みは制御部60によって行われる。
The timer 65 starts and ends timing in accordance with instructions from the control unit 60. The time measured by the timer 65 is read from the timer 65 by the control unit 60.
The storage unit 64 is a non-volatile memory, and the storage unit 64 stores a control program. The storage unit 64 is further provided with a transmission data area in which data to be transmitted by the communication unit 61 via the communication line 3 is stored. Reading and writing of the contents stored in the storage unit 64 is performed by the control unit 60.

制御部60は、記憶部64に記憶されている制御プログラムを実行することによって種々の処理を実行する。具体的には、制御部60は、通信部61が受信したデータ、及び/又は、入力部62に入力された内容に基づいて、制御信号を出力部63に出力させ、出力部63に接続されている電気機器の動作を制御する。   The control unit 60 executes various processes by executing the control program stored in the storage unit 64. Specifically, the control unit 60 causes the output unit 63 to output a control signal based on the data received by the communication unit 61 and / or the content input to the input unit 62, and is connected to the output unit 63. Control the operation of the electrical equipment that is.

また、制御部60は、入力部62に入力された内容に応じて、通信部61が通信線3を介して送信すべきデータを生成し、生成したデータを記憶部64の送信データ領域に記憶する。
更に、制御部60は、通信部61の送信を制御する送信制御処理を実行する。
Further, the control unit 60 generates data to be transmitted by the communication unit 61 via the communication line 3 according to the content input to the input unit 62 and stores the generated data in the transmission data area of the storage unit 64. To do.
Further, the control unit 60 executes a transmission control process for controlling the transmission of the communication unit 61.

図4は、通信装置30の制御部60が実行する送信制御処理の手順を示すフローチャートである。制御部60は送信制御処理を周期的に実行する。制御部60は、まず、通信部61からメッセージの送信禁止が通知されたか否かを判定する(ステップS1)。制御部60は、送信禁止が通知されたと判定した場合(S1:YES)、タイマ65に指示して計時を開始させ(ステップS2)、タイマ65が計時している計時時間が待機時間以上であるか否かを判定する(ステップS3)。待機時間は、一定であり、予め記憶部64に記憶されている。待機時間は例えば300〜500マイクロ秒である。   FIG. 4 is a flowchart illustrating a procedure of transmission control processing executed by the control unit 60 of the communication device 30. The control unit 60 periodically executes transmission control processing. First, the control unit 60 determines whether or not a message transmission prohibition is notified from the communication unit 61 (step S1). When it is determined that the transmission prohibition is notified (S1: YES), the control unit 60 instructs the timer 65 to start measuring time (step S2), and the time measured by the timer 65 is equal to or longer than the waiting time. Is determined (step S3). The standby time is constant and is stored in the storage unit 64 in advance. The waiting time is, for example, 300 to 500 microseconds.

制御部60は、計時時間が待機時間未満であると判定した場合(S3:NO)、ステップS3を再び実行し、計時時間が待機時間以上となるまで待機する。制御部60は、計時時間が待機時間以上であると判定した場合(S3:YES)、タイマ65に指示して計時を終了させる(ステップS4)。   When it is determined that the timed time is less than the standby time (S3: NO), the control unit 60 executes Step S3 again and waits until the timed time becomes equal to or longer than the standby time. When it is determined that the measured time is equal to or longer than the standby time (S3: YES), the control unit 60 instructs the timer 65 to end the time measurement (step S4).

制御部60は、送信禁止が通知されていないと判定した場合(S1:NO)、又は、ステップS4を実行した後、記憶部64の送信データ領域に送信すべきデータが記憶されているか否かを判定する(ステップS5)。制御部60は、送信すべきデータが記憶されていないと判定した場合(S5:NO)、送信制御処理を終了する。この場合、制御部60は、次の周期が到来した場合、送信制御処理を再開する。   When it is determined that the transmission prohibition is not notified (S1: NO), or after step S4 is executed, the control unit 60 determines whether data to be transmitted is stored in the transmission data area of the storage unit 64. Is determined (step S5). When it is determined that the data to be transmitted is not stored (S5: NO), the control unit 60 ends the transmission control process. In this case, the control unit 60 resumes the transmission control process when the next cycle arrives.

制御部60は、送信すべきデータが記憶されていると判定した場合(S5:YES)、記憶部64の送信データ領域に記憶されているデータの送信を指示するデータ送信指示を通信部61に出力する(ステップS6)。
通信部61は、制御部60からデータ送信指示が入力された場合に送信処理を実行する。通信部61は、送信処理において、データの送信の成功及び失敗を制御部60に通知する。
When it is determined that data to be transmitted is stored (S5: YES), the control unit 60 instructs the communication unit 61 to transmit a data to instruct transmission of data stored in the transmission data area of the storage unit 64. Output (step S6).
The communication unit 61 executes transmission processing when a data transmission instruction is input from the control unit 60. The communication unit 61 notifies the control unit 60 of success and failure of data transmission in the transmission process.

制御部60は、ステップS6を実行した後、通信部61からデータの送信失敗が通知されたか否かを判定する(ステップS7)。制御部60は、送信失敗が通知されていないと判定した場合(ステップS7:NO)、通信部61からデータの送信成功が通知されたか否かを判定する(ステップS8)。   After executing step S6, the control unit 60 determines whether or not a data transmission failure is notified from the communication unit 61 (step S7). When it is determined that the transmission failure is not notified (step S7: NO), the control unit 60 determines whether the data transmission success is notified from the communication unit 61 (step S8).

制御部60は、送信成功が通知されていないと判定した場合(S8:NO)、ステップS7を実行し、送信成功又は送信失敗が通信部61から通知されるまで待機する。制御部60は、送信失敗が通知された場合(S7:YES)、送信制御処理を終了する。この場合も、制御部60は、次の周期が到来した場合、送信制御処理を再開する。再開した送信制御処理では、前回の送信制御処理で送信に失敗したデータが記憶部64の送信データ領域から削除されていないため、制御部60は、同一のデータを通信部61に送信させる。   When it is determined that the transmission success is not notified (S8: NO), the control unit 60 executes step S7 and waits until the communication unit 61 notifies the transmission success or the transmission failure. When the transmission failure is notified (S7: YES), the control unit 60 ends the transmission control process. Also in this case, the control unit 60 resumes the transmission control process when the next cycle arrives. In the resumed transmission control process, the data that failed to be transmitted in the previous transmission control process has not been deleted from the transmission data area of the storage unit 64, so the control unit 60 causes the communication unit 61 to transmit the same data.

制御部60は、送信成功が通知されたと判定した場合(S8:YES)、通信部61が送信したデータを記憶部64の送信データ領域から削除し(ステップS9)、送信制御処理を終了する。この場合も、制御部60は、次の周期が到来した場合、送信制御処理を再開する。再開した送信制御処理では、前回の送信制御処理で送信に成功したデータが記憶部64の送信データ領域から削除されているため、制御部60は、記憶部64の送信データ領域に記憶されている新たなデータを通信部61に送信させる。   When it is determined that the transmission success has been notified (S8: YES), the control unit 60 deletes the data transmitted by the communication unit 61 from the transmission data area of the storage unit 64 (step S9), and ends the transmission control process. Also in this case, the control unit 60 resumes the transmission control process when the next cycle arrives. In the resumed transmission control process, since the data successfully transmitted in the previous transmission control process is deleted from the transmission data area of the storage unit 64, the control unit 60 is stored in the transmission data area of the storage unit 64. New data is transmitted to the communication unit 61.

図5は、通信装置30の通信部61が実行する送信処理の手順を示すフローチャートである。前述したように、通信部61は、制御部60からデータ送信指示が入力された場合に送信処理を実行する。そして、通信部61は、制御部60からデータ送信指示が入力されない限り、送信処理を実行することはない。   FIG. 5 is a flowchart showing a procedure of transmission processing executed by the communication unit 61 of the communication device 30. As described above, the communication unit 61 executes transmission processing when a data transmission instruction is input from the control unit 60. The communication unit 61 does not execute the transmission process unless a data transmission instruction is input from the control unit 60.

通信部61は、通信線3を介したメッセージの送信が可能であるか否かを判定する(ステップS11)。通信部61は、通信線3を介したメッセージの送信が行われているか否かに基づいて、メッセージの送信が可能であるか否かを判定する。夫々が「1」(リセッシブ)である7ビットのデータによってメッセージのEOFが構成されている場合においては、通信部61は、7ビット以上連続してデータ「1」を検出しているときに、メッセージの送信が可能であると判定する。同様の場合において、通信部61は、7ビット以上連続してデータ「1」を検出していないときに、メッセージの送信が不可能であると判定する。夫々が「1」(リセッシブ)である7ビットのデータによってEOFが構成されている場合、通信システム1において送受信されるメッセージでは、7ビット連続してデータ「1」が示されることはない。   The communication unit 61 determines whether a message can be transmitted via the communication line 3 (step S11). The communication unit 61 determines whether the message can be transmitted based on whether the message is transmitted through the communication line 3. In the case where the EOF of the message is composed of 7-bit data, each of which is “1” (recessive), the communication unit 61 detects data “1” continuously for 7 bits or more. It is determined that the message can be transmitted. In the same case, the communication unit 61 determines that message transmission is impossible when data “1” is not detected continuously for 7 bits or more. When the EOF is composed of 7-bit data, each of which is “1” (recessive), the data transmitted / received in the communication system 1 does not indicate data “1” continuously for 7 bits.

通信部61は、メッセージの送信が可能であると判定した場合(S11:YES)、記憶部64の送信データ領域に記憶されているデータがデータフィールドに含まれているメッセージを生成する(ステップS12)。次に、通信部61は、ステップS12で生成したメッセージの1ビットのデータを送信する(ステップS13)。送信処理では、通信部61は、ステップS13を繰り返し実行し、メッセージのSOFを構成する1ビットのデータから、順次、メッセージのデータを送信する。   When the communication unit 61 determines that the message can be transmitted (S11: YES), the communication unit 61 generates a message in which the data stored in the transmission data area of the storage unit 64 is included in the data field (step S12). ). Next, the communication unit 61 transmits 1-bit data of the message generated in step S12 (step S13). In the transmission process, the communication unit 61 repeatedly executes step S13, and sequentially transmits message data from 1-bit data constituting the SOF of the message.

次に、通信部61は、メッセージの送信を停止すべきか否かを判定する(ステップS14)。アービトレーションの説明で述べたように、通信部61は、データ「1」(リセッシブ)を送信したにもかかわらず、データ「0」(ドミナント)が通信線3を介して送信されていた場合、メッセージの送信を停止すべきと判定する。通信部61は、送信したデータと、通信線3を介して送信されているデータとが一致している場合、メッセージの送信を停止すべきではないと判定する。   Next, the communication unit 61 determines whether or not to stop the message transmission (step S14). As described in the explanation of arbitration, the communication unit 61 transmits a message when data “0” (dominant) is transmitted via the communication line 3 even though data “1” (recessive) is transmitted. Is determined to be stopped. If the transmitted data matches the data transmitted via the communication line 3, the communication unit 61 determines that the message transmission should not be stopped.

通信部61は、メッセージの送信が不可能であると判定した場合(S11:NO)、又は、メッセージの送信を停止すべきであると判定した場合(S14:YES)、メッセージの送信失敗を制御部60に通知し(ステップS15)、送信処理を終了する。   If the communication unit 61 determines that the message transmission is impossible (S11: NO) or determines that the message transmission should be stopped (S14: YES), the communication unit 61 controls the message transmission failure. The notification is sent to the unit 60 (step S15), and the transmission process is terminated.

通信部61は、メッセージの送信を停止すべきではないと判定した場合(S14:NO)、メッセージの送信権を獲得したか否かを判定する(ステップS16)。アービトレーションの説明で述べたように、通信部61は、メッセージのアービトレーションフィールドに含まれているデータの送信が完了した場合にメッセージの送信権を獲得したと判定する。通信部61は、アービトレーションフィールドに含まれているデータの送信が完了していない場合にメッセージの送信権を獲得していないと判定する。   When determining that the message transmission should not be stopped (S14: NO), the communication unit 61 determines whether or not the message transmission right has been acquired (step S16). As described in the explanation of arbitration, the communication unit 61 determines that the transmission right of the message has been acquired when the transmission of the data included in the arbitration field of the message is completed. The communication unit 61 determines that the message transmission right has not been acquired when the transmission of the data included in the arbitration field has not been completed.

通信部61は、メッセージの送信権を獲得していないと判定した場合(S16:NO)、ステップS13を実行し、メッセージの送信を停止すべきと判定するか、又は、メッセージの送信権を獲得したと判定するまでメッセージのデータを1ビットずつ送信する。   When it is determined that the message transmission right has not been acquired (S16: NO), the communication unit 61 executes step S13 and determines that the message transmission should be stopped or acquires the message transmission right. The message data is transmitted bit by bit until it is determined that it has been completed.

通信部61は、メッセージの送信権を獲得したと判定した場合(S16:YES)、ステップS13と同様に、ステップS12で生成したメッセージの1ビットのデータを送信する(ステップS17)。通信部61は、ステップS13と同様に、ステップS17も繰り返し実行する。ステップS17で通信部61が送信するデータは、アービトレーションフィールド以降に含まれるメッセージのデータである。   When it is determined that the message transmission right has been acquired (S16: YES), the communication unit 61 transmits the 1-bit data of the message generated in step S12 as in step S13 (step S17). The communication unit 61 repeatedly executes step S17 as in step S13. The data transmitted by the communication unit 61 in step S17 is message data included after the arbitration field.

通信部61は、ステップS17を実行した後、メッセージの送信が完了したか否かを判定する(ステップS18)。通信部61は、メッセージの送信が完了していないと判定した場合(S18:NO)、ステップS17を実行し、メッセージの送信が完了するまでメッセージのデータを1ビットずつ送信する。通信部61は、メッセージの送信が完了したと判定した場合(S18:YES)、メッセージの送信成功を制御部60に通知し(ステップS19)、送信処理を終了する。   After executing Step S17, the communication unit 61 determines whether or not the message transmission is completed (Step S18). When it is determined that the message transmission has not been completed (S18: NO), the communication unit 61 executes step S17, and transmits message data bit by bit until the message transmission is completed. If the communication unit 61 determines that the message transmission is completed (S18: YES), the communication unit 61 notifies the control unit 60 of the successful message transmission (step S19), and ends the transmission process.

図6は通信装置30の通信部61が実行する受信処理の手順を示すフローチャートである。通信部61は、メッセージのSOFを検出した場合、又は、送信処理で送信を停止すべきと判定した場合に受信処理を実行する。   FIG. 6 is a flowchart illustrating a procedure of reception processing executed by the communication unit 61 of the communication device 30. The communication unit 61 executes the reception process when detecting the SOF of the message or when determining that the transmission should be stopped by the transmission process.

通信部61は、メッセージの1ビットのデータを受信し(ステップS21)、メッセージの受信が完了したか否かを判定する(ステップS22)。通信部61は、メッセージの受信が完了していないと判定した場合(S22:NO)、ステップS21に実行し、メッセージの受信が完了するまで、1ビットのデータを順次受信する。   The communication unit 61 receives 1-bit data of the message (step S21), and determines whether or not the message has been received (step S22). If the communication unit 61 determines that the message reception has not been completed (S22: NO), the communication unit 61 executes the process in step S21 and sequentially receives 1-bit data until the message reception is completed.

通信部61は、メッセージの受信が完了したと判定した場合(S22:YES)、受信したメッセージが、メッセージの送信禁止を示しているか否かを判定する(ステップS23)。通信部61は、受信したメッセージが送信禁止を示していると判定した場合(S23:YES)、メッセージの送信禁止を制御部60に通知する(ステップS24)。   If it is determined that the message has been received (S22: YES), the communication unit 61 determines whether or not the received message indicates message transmission prohibition (step S23). When the communication unit 61 determines that the received message indicates transmission prohibition (S23: YES), the communication unit 61 notifies the control unit 60 of message transmission prohibition (step S24).

通信部61は、受信したメッセージが、メッセージの送信禁止を示していないと判定した場合(S23:NO)、又は、ステップS24を実行した後、受信処理を終了する。   When it is determined that the received message does not indicate message transmission prohibition (S23: NO), or after executing step S24, the communication unit 61 ends the reception process.

なお、通信部61は、受信処理で受信したメッセージが送信禁止を示していない場合、受信したメッセージ夫々について、メッセージIDに基づいて、通信装置30に送信されたメッセージであるか否かを判定する。通信部61は、通信装置30に送信されたメッセージではないと判定した場合、このメッセージを破棄する。通信部61は、通信装置30に送信されたメッセージであると判定した場合、このメッセージに含まれるデータを制御部70に通知し、制御部70は、前述したように、通信部61が受信したデータに基づいて、制御信号を出力部63に出力させ、出力部63に接続されている電気機器の動作を制御する。   If the message received in the reception process does not indicate transmission prohibition, the communication unit 61 determines whether each received message is a message transmitted to the communication device 30 based on the message ID. . If the communication unit 61 determines that the message is not a message transmitted to the communication device 30, the communication unit 61 discards this message. When determining that the message is a message transmitted to the communication device 30, the communication unit 61 notifies the control unit 70 of data included in the message, and the control unit 70 receives the communication unit 61 as described above. Based on the data, a control signal is output to the output unit 63, and the operation of the electrical device connected to the output unit 63 is controlled.

通信装置31,40,41,50,51夫々は、通信装置30と同様に構成され、制御部60、通信部61、入力部62、出力部63、記憶部64及びタイマ65を有する。通信装置30の構成の説明において、通信装置30を通信装置31に置き換えることによって、通信装置31の構成を説明することができる。通信装置30の構成の説明において、通信線3を通信線4に置き換え、かつ、通信装置30を通信装置40又は通信装置41に置き換えることによって、通信装置40又は通信装置41の構成を説明することができる。通信装置30の構成の説明において、通信線3を通信線5に置き換え、かつ、通信装置30を通信装置50又は通信装置51に置き換えることによって、通信装置50又は通信装置51の構成を説明することができる。   Each of the communication devices 31, 40, 41, 50, 51 is configured similarly to the communication device 30, and includes a control unit 60, a communication unit 61, an input unit 62, an output unit 63, a storage unit 64, and a timer 65. In the description of the configuration of the communication device 30, the configuration of the communication device 31 can be described by replacing the communication device 30 with the communication device 31. In the description of the configuration of the communication device 30, the configuration of the communication device 40 or the communication device 41 is described by replacing the communication line 3 with the communication line 4 and replacing the communication device 30 with the communication device 40 or the communication device 41. Can do. In the description of the configuration of the communication device 30, the configuration of the communication device 50 or the communication device 51 will be described by replacing the communication line 3 with the communication line 5 and replacing the communication device 30 with the communication device 50 or the communication device 51. Can do.

以上のように、通信装置30,31,40,41,50,51夫々の通信部61が、受信処理において、送信禁止を示すメッセージを受信した場合、制御部60は、送信制御処理において、通信部61が、送信禁止を示すメッセージを受信してから待機時間が経過するまで、通信部61にデータ送信指示を出力しない。このため、通信部61は、送信禁止を示すメッセージを受信してから待機時間が経過するまで、メッセージの送信を停止する。制御部60は、通信部61が、送信禁止を示すメッセージを受信してから待機時間が経過した後において、記憶部64の送信データ領域に送信すべきデータが記憶されている場合、データ送信指示を通信部61に出力し、通信部61はメッセージの送信を再開する。   As described above, when the communication unit 61 of each of the communication devices 30, 31, 40, 41, 50, 51 receives a message indicating transmission prohibition in the reception process, the control unit 60 performs communication in the transmission control process. The unit 61 does not output a data transmission instruction to the communication unit 61 until the standby time elapses after receiving a message indicating that transmission is prohibited. For this reason, the communication unit 61 stops the message transmission until the standby time elapses after the message indicating the transmission prohibition is received. When the communication unit 61 stores data to be transmitted in the transmission data area of the storage unit 64 after the standby time has elapsed since the communication unit 61 received the message indicating that transmission is prohibited, the control unit 60 instructs the data transmission. Is output to the communication unit 61, and the communication unit 61 resumes message transmission.

図7は中継装置2の要部構成を示すブロック図である。中継装置2は、制御部70、N(=3)個の通信部71,72,73及び記憶部74を有する。これらはバス75に接続されている。通信部71,72,73夫々は、バス75の他に、通信線3,4,5に接続されている。   FIG. 7 is a block diagram showing a main configuration of the relay device 2. The relay apparatus 2 includes a control unit 70, N (= 3) communication units 71, 72, 73 and a storage unit 74. These are connected to the bus 75. Each of the communication units 71, 72, 73 is connected to communication lines 3, 4, 5 in addition to the bus 75.

通信部71も、通信部61と同様に、所謂、CANドライバであり、図示しないCPUを有する。通信部71は、通信線3を介してメッセージを送信する送信処理と、通信線3を介してメッセージを受信する受信処理とを行う。
通信部72,73夫々は通信部71と同様に作用する。通信部71の作用の説明において、通信線3及び通信部71を通信線4及び通信部72に置き換えることによって通信部72の作用を説明することができる。通信部71の作用の説明において、通信線3及び通信部71を通信線5及び通信部73に置き換えることによって通信部73の作用を説明することができる。
Similar to the communication unit 61, the communication unit 71 is a so-called CAN driver and includes a CPU (not shown). The communication unit 71 performs a transmission process for transmitting a message via the communication line 3 and a reception process for receiving a message via the communication line 3.
Each of the communication units 72 and 73 operates in the same manner as the communication unit 71. In the description of the operation of the communication unit 71, the operation of the communication unit 72 can be described by replacing the communication line 3 and the communication unit 71 with the communication line 4 and the communication unit 72. In the description of the operation of the communication unit 71, the operation of the communication unit 73 can be described by replacing the communication line 3 and the communication unit 71 with the communication line 5 and the communication unit 73.

記憶部74は不揮発性メモリである。記憶部74には制御プログラムが記憶されている。また、記憶部74には、通信部71,72,73が通信線3,4,5を介して送信すべきメッセージが記憶されている送信メッセージ領域が設けられている。通信部71,72,73が受信処理で受信したメッセージは、記憶部74の送信メッセージ領域に記憶される。記憶部74に記憶されている内容の読み出し及び書き込みは制御部60によって行われる。   The storage unit 74 is a nonvolatile memory. The storage unit 74 stores a control program. In addition, the storage unit 74 is provided with a transmission message area in which messages to be transmitted by the communication units 71, 72, and 73 via the communication lines 3, 4, and 5 are stored. Messages received by the communication units 71, 72, 73 in the reception process are stored in the transmission message area of the storage unit 74. Reading and writing of the contents stored in the storage unit 74 is performed by the control unit 60.

制御部70は、記憶部74に記憶されている制御プログラムを実行することによって、通信部71,72,73の送信を制御する送信制御処理を実行する。制御部70が送信制御処理を実行するために、記憶部74には、メッセージIDとメッセージの送信に用いられる通信線3,4,5との対応関係を示すメッセージ対応表が記憶されている。   The control unit 70 executes a transmission control process that controls transmission of the communication units 71, 72, and 73 by executing a control program stored in the storage unit 74. In order for the control unit 70 to execute the transmission control process, the storage unit 74 stores a message correspondence table indicating the correspondence between the message ID and the communication lines 3, 4, 5 used for message transmission.

図8はメッセージ対応表の内容を示す図表である。メッセージ対応表には、メッセージID毎に、通信線3,4,5の中でメッセージの送信に用いられる通信線が示されている。「○」はメッセージの送信に用いられることを示している。「−」はメッセージの送信に用いられないことを示している。また、通信線3,4,5の中でメッセージの送信に用いられる通信線の数が2以上である場合、メッセージの同時送信が必要であるか又は不要であるかが示されている。   FIG. 8 is a table showing the contents of the message correspondence table. In the message correspondence table, communication lines used for message transmission among the communication lines 3, 4, and 5 are shown for each message ID. “O” indicates that the message is used for message transmission. "-" Indicates that the message is not used for transmission. In addition, when the number of communication lines used for message transmission among the communication lines 3, 4, 5 is 2 or more, it is indicated whether simultaneous transmission of messages is necessary or unnecessary.

メッセージIDが「A1」であるメッセージについては、2つの通信線3,4がメッセージの送信に用いられ、通信線3,4夫々を介して同時にメッセージを送信することは不要である。メッセージIDが「A2」であるメッセージについては、2つの通信線4,5がメッセージの送信に用いられ、通信線4,5夫々を介して同時にメッセージを送信することが必要である。メッセージIDが「A3」であるメッセージについては、1つの通信線5がメッセージの送信に用いられる。   For a message having a message ID “A1”, the two communication lines 3 and 4 are used for message transmission, and it is not necessary to transmit the message simultaneously via the communication lines 3 and 4. For a message with the message ID “A2”, the two communication lines 4 and 5 are used for message transmission, and it is necessary to transmit the messages simultaneously via the communication lines 4 and 5 respectively. For a message whose message ID is “A3”, one communication line 5 is used for message transmission.

図9及び図10は、中継装置2の制御部70が実行する送信制御処理の手順を示すフローチャートである。制御部70は送信制御処理を周期的に実行する。制御部60は、記憶部74の送信メッセージ領域に送信すべきメッセージが記憶されているか否かを判定する(ステップS31)。制御部60は、送信すべきメッセージが記憶されていると判定した場合(S31:YES)、送信すべきメッセージのメッセージIDとメッセージ対応表とに基づいて、メッセージを出力する通信線を決定する(ステップS32)。例えば、メッセージIDが「A2」である場合、メッセージを出力する通信線を通信線4,5に決定する。   FIG. 9 and FIG. 10 are flowcharts showing the procedure of the transmission control process executed by the control unit 70 of the relay apparatus 2. The control unit 70 periodically executes transmission control processing. The control unit 60 determines whether a message to be transmitted is stored in the transmission message area of the storage unit 74 (step S31). When it is determined that a message to be transmitted is stored (S31: YES), the control unit 60 determines a communication line for outputting a message based on the message ID of the message to be transmitted and the message correspondence table ( Step S32). For example, when the message ID is “A2”, the communication lines 4 and 5 are determined as communication lines to output the message.

次に、制御部70は、送信すべきメッセージのメッセージIDとメッセージ対応表とに基づいて、メッセージを同時に送信すべきか否かを判定する(ステップS33)。制御部70は、例えば、メッセージIDが「A1」又は「A3」である場合、メッセージを同時に送信すべきではないと判定する。制御部70は、例えば、メッセージIDが「A2」である場合、メッセージを同時に送信すべきであると判定する。   Next, based on the message ID of the message to be transmitted and the message correspondence table, the control unit 70 determines whether the messages should be transmitted simultaneously (step S33). For example, when the message ID is “A1” or “A3”, the control unit 70 determines that the messages should not be transmitted simultaneously. For example, when the message ID is “A2”, the control unit 70 determines that the messages should be transmitted simultaneously.

制御部70は、メッセージを同時に送信すべきではないと判定した場合(S33:NO)、記憶部74の送信メッセージ領域に記憶されているメッセージの送信を指示するメッセージ送信指示を、ステップS32で決定した通信線に接続されている通信部に出力する(ステップS34)。制御部70は、例えば、ステップS32でメッセージの送信に用いる通信線を通信線5に決定した場合、通信部73にメッセージ送信指示を出力する。   When determining that the messages should not be transmitted simultaneously (S33: NO), the control unit 70 determines a message transmission instruction for instructing transmission of the message stored in the transmission message area of the storage unit 74 in step S32. Is output to the communication unit connected to the communication line (step S34). For example, when the communication line 5 is determined as the communication line 5 in step S <b> 32, the control unit 70 outputs a message transmission instruction to the communication unit 73.

通信部71,72,73夫々は、制御部70からメッセージ送信指示が入力された場合に送信処理を実行する。通信部71,72,73夫々は、送信処理において、メッセージの送信の成功及び失敗を制御部70に通知する。   Each of the communication units 71, 72, and 73 executes transmission processing when a message transmission instruction is input from the control unit 70. Each of the communication units 71, 72, and 73 notifies the control unit 70 of the success and failure of message transmission in the transmission process.

制御部70は、通信部71,72,73の中でメッセージの送信処理を実行している通信部の少なくとも1つから送信失敗が通知されたか否かを判定する(ステップS35)。制御部70は、送信処理を実行している通信部の少なくとも1つから送信失敗が通知されたと判定した場合(S35:YES)、メッセージ送信指示を、通信部71,72,73の中で送信失敗を通知した通信部に出力する(ステップS36)。その後、制御部70は再びステップS35を実行する。   The control unit 70 determines whether or not a transmission failure has been notified from at least one of the communication units that are executing message transmission processing among the communication units 71, 72, and 73 (step S35). When it is determined that the transmission failure has been notified from at least one of the communication units that are executing the transmission process (S35: YES), the control unit 70 transmits a message transmission instruction in the communication units 71, 72, and 73. It outputs to the communication part which notified failure (step S36). Thereafter, the control unit 70 executes Step S35 again.

制御部70は、送信失敗が通知されていない場合(S35:NO)、通信部71,72,73の中でメッセージの送信処理を実行している全ての通信部から送信成功が通知されたか否かを判定する(ステップS37)。制御部70は、全ての通信部から送信成功が通知されていないと判定した場合(S37:NO)、ステップS35を実行し、メッセージの送信が成功するまで、メッセージ送信指示の出力、又は、待機を行い続ける。   If the transmission failure has not been notified (S35: NO), the control unit 70 has received a successful transmission notification from all the communication units executing the message transmission process in the communication units 71, 72, 73. Is determined (step S37). When it is determined that the transmission success has not been notified from all the communication units (S37: NO), the control unit 70 executes step S35 and outputs a message transmission instruction or waits until the message transmission is successful. Continue to do.

制御部70は、送信成功が通知された場合(S37:YES)、送信されたメッセージを記憶部74の送信メッセージ領域から削除する(ステップS38)。制御部70は、送信すべきメッセージが記憶されていないと判定した場合(S31:NO)、又は、ステップS38を実行した後、送信制御処理を終了する。制御部70は、次の周期が到来した場合、送信制御処理を再開する。   When the transmission success is notified (S37: YES), the control unit 70 deletes the transmitted message from the transmission message area of the storage unit 74 (step S38). When it is determined that the message to be transmitted is not stored (S31: NO) or after executing step S38, the control unit 70 ends the transmission control process. The control unit 70 resumes the transmission control process when the next cycle arrives.

制御部70は、メッセージを同時に送信すべきであると判定した場合(S33:YES)、送信禁止を示すメッセージの送信を指示する禁止送信指示を、ステップS32で決定した通信線夫々に接続されている通信部に出力する(ステップS39)。制御部70は、例えば、ステップS32でメッセージの送信に用いる通信線を2つの通信線4,5に決定した場合、通信部72,73に禁止送信指示を出力する。
メッセージを同時に送信すべきである場合、当然のことながら、ステップS32で決定される通信線の数は、K(K:2以上N以下の整数)個である。従って、ステップS39では、制御部70は、禁止送信指示をステップS32で決定したK個の通信線夫々に接続されているK個の通信部に出力する。
When it is determined that the messages should be transmitted simultaneously (S33: YES), the control unit 70 is connected to each of the communication lines determined in step S32 with a prohibited transmission instruction for instructing transmission of a message indicating that transmission is prohibited. (Step S39). For example, when the control unit 70 determines two communication lines 4 and 5 as communication lines used for message transmission in step S <b> 32, the control unit 70 outputs a prohibited transmission instruction to the communication units 72 and 73.
When the messages are to be transmitted at the same time, as a matter of course, the number of communication lines determined in step S32 is K (K: an integer from 2 to N). Accordingly, in step S39, the control unit 70 outputs a prohibited transmission instruction to the K communication units connected to the K communication lines determined in step S32.

通信部71,72,73夫々は、制御部70から禁止送信指示が入力された場合も送信処理を実行する。通信部71,72,73夫々は、送信処理において、送信禁止を示すメッセージの送信の成功及び失敗を制御部70に通知する。   Each of the communication units 71, 72, and 73 executes transmission processing even when a prohibited transmission instruction is input from the control unit 70. Each of the communication units 71, 72, and 73 notifies the control unit 70 of success and failure of transmission of a message indicating that transmission is prohibited in the transmission process.

制御部70は、通信部71,72,73の中で、送信禁止を示すメッセージの送信処理を実行しているK個の通信部の少なくとも1つから送信失敗が通知されたか否かを判定する(ステップS40)。制御部70は、K個の通信部の少なくとも1つから送信失敗が通知されたと判定した場合(S40:YES)、禁止送信指示を、通信部71,72,73の中で送信失敗を通知した通信部に出力する(ステップS41)。その後、制御部70は再びステップS40を実行する。   The control unit 70 determines whether or not a transmission failure has been notified from at least one of the K communication units that are executing transmission processing of a message indicating transmission prohibition in the communication units 71, 72, and 73. (Step S40). When it is determined that the transmission failure is notified from at least one of the K communication units (S40: YES), the control unit 70 notifies the transmission failure in the communication units 71, 72, and 73. It outputs to a communication part (step S41). Thereafter, the control unit 70 executes Step S40 again.

制御部70は、通信部71,72,73の中で、送信禁止を示すメッセージの送信処理を実行しているK個の通信部のいずれからも送信失敗が通知されていない場合(S40:NO)、通信部71,72,73の中で、送信禁止を示すメッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されたか否かを判定する(ステップS42)。制御部70は、送信禁止を示すメッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されていないと判定した場合(S42:NO)、ステップS40を実行し、送信禁止を示す全てのメッセージの送信が成功するまで、禁止送信指示の出力、又は、待機を行い続ける。   When the transmission failure is not notified from any of the K communication units executing the transmission process of the message indicating the transmission prohibition in the communication units 71, 72, and 73 (S40: NO) In the communication units 71, 72, and 73, it is determined whether or not transmission success has been notified from all of the K communication units that are executing transmission processing of a message indicating transmission prohibition (step S42). When it is determined that the transmission success has not been notified from all of the K communication units that are executing the transmission process of the message indicating that transmission is prohibited (S42: NO), the control unit 70 executes step S40 and transmits the message. Until transmission of all messages indicating prohibition is successful, output of the prohibition transmission instruction or standby is continued.

制御部70は、送信禁止を示すメッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されたと判定した場合(S42:YES)、ステップS34と同様に、記憶部74の送信メッセージ領域に記憶されているメッセージの送信を指示するメッセージ送信指示を、ステップS32で決定したK個の通信線夫々に接続されているK個の通信部に出力する(ステップS43)。   If the control unit 70 determines that transmission success has been notified from all of the K communication units that are executing transmission processing of a message indicating transmission prohibition (S42: YES), the storage unit 74 is the same as step S34. A message transmission instruction for instructing transmission of the message stored in the transmission message area is output to the K communication units connected to the K communication lines determined in step S32 (step S43).

ステップS43でメッセージ送信指示を出力するK個の通信部は、ステップS39で禁止送信指示を出力したK個の通信部である。このため、ステップS43でメッセージ送信指示を出力したK個の通信部夫々に接続しているK個の通信線を介して、メッセージは送信されていない。従って、ステップS43でメッセージ送信指示を出力されたK個の通信部夫々はメッセージの送信失敗を制御部70に通知することはない。   The K communication units that output the message transmission instruction in step S43 are the K communication units that output the prohibited transmission instruction in step S39. For this reason, no message is transmitted via the K communication lines connected to the K communication units that output the message transmission instructions in step S43. Therefore, each of the K communication units to which the message transmission instruction is output in step S43 does not notify the control unit 70 of the message transmission failure.

制御部70は、ステップS43を実行した後、通信部71,72,73の中で、記憶部74の送信メッセージ領域に記憶されているメッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されたか否かを判定する(ステップS44)。制御部70は、メッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されていないと判定した場合(S44:NO)、ステップS44を再び実行し、メッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されるまで待機する。   After executing step S43, the control unit 70, among the communication units 71, 72, 73, of the K communication units that are executing the transmission process of the message stored in the transmission message area of the storage unit 74. It is determined whether or not transmission success has been notified from all (step S44). When determining that the transmission success has not been notified from all of the K communication units that are executing the message transmission process (S44: NO), the control unit 70 executes step S44 again and performs the message transmission process. The process waits until all the K communication units executing the notification of successful transmission.

制御部70は、メッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されたと判定した場合(S44:YES)、送信されたメッセージを記憶部74の送信メッセージ領域から削除し(ステップS45)、送信制御処理を終了する。その後、制御部70は、次の周期が到来した場合、送信制御処理を再開する。   When it is determined that the transmission success has been notified from all of the K communication units executing the message transmission process (S44: YES), the control unit 70 transmits the transmitted message from the transmission message area of the storage unit 74. Delete (step S45), and the transmission control process ends. Thereafter, the control unit 70 resumes the transmission control process when the next cycle arrives.

図11は、中継装置2の通信部71が実行する送信処理の手順を示すフローチャートである。前述したように、通信部71は、制御部70からメッセージ送信指示又は禁止送信指示が入力された場合に送信処理を実行する。
通信部72,73は通信部71と同様の送信処理を実行する。通信部71が実行する送信処理の説明において、通信線3、通信装置30及び通信部71夫々を通信線4、通信装置40及び通信部72に置き換えることによって通信部72が実行する送信処理を説明することができる。通信部71が実行する送信処理の説明において、通信線3、通信装置30及び通信部71夫々を通信線5、通信装置50及び通信部73に置き換えることによって通信部73が実行する送信処理を説明することができる。
FIG. 11 is a flowchart illustrating a procedure of transmission processing executed by the communication unit 71 of the relay apparatus 2. As described above, the communication unit 71 performs a transmission process when a message transmission instruction or a prohibited transmission instruction is input from the control unit 70.
The communication units 72 and 73 execute the same transmission process as the communication unit 71. In the description of the transmission process performed by the communication unit 71, the transmission process performed by the communication unit 72 by replacing the communication line 3, the communication device 30, and the communication unit 71 with the communication line 4, the communication device 40, and the communication unit 72, respectively. can do. In the description of the transmission process executed by the communication unit 71, the transmission process executed by the communication unit 73 by replacing the communication line 3, the communication device 30, and the communication unit 71 with the communication line 5, the communication device 50, and the communication unit 73, respectively. can do.

通信部71は、通信装置30の通信部61が実行する送信処理のステップS11と同様に、通信線3を介したメッセージの送信が可能であるか否かを判定する(ステップS51)。通信部71は、メッセージの送信が可能であると判定した場合(S51:YES)、メッセージの1ビットのデータを送信する(ステップS52)。メッセージ送信指示が入力された通信部71が実行する送信処理のステップS52では、通信部71は、記憶部74の送信メッセージ領域に記憶されているメッセージの1ビットのデータを送信する。禁止送信指示が入力された通信部71が実行する送信処理のステップS52では、通信部71は、送信禁止を示すメッセージの1ビットのデータを送信する。   The communication unit 71 determines whether or not a message can be transmitted via the communication line 3 as in step S11 of the transmission process executed by the communication unit 61 of the communication device 30 (step S51). When it is determined that the message can be transmitted (S51: YES), the communication unit 71 transmits 1-bit data of the message (step S52). In step S52 of the transmission process executed by the communication unit 71 to which the message transmission instruction has been input, the communication unit 71 transmits 1-bit data of the message stored in the transmission message area of the storage unit 74. In step S52 of the transmission process executed by the communication unit 71 to which the prohibited transmission instruction has been input, the communication unit 71 transmits 1-bit data of a message indicating that transmission is prohibited.

次に、通信部71は、通信装置30の通信部61が実行する送信処理のステップS14と同様に、メッセージの送信を停止すべきか否かを判定する(ステップS53)。通信部61は、メッセージの送信が不可能であると判定した場合(S51:NO)、又は、メッセージの送信を停止すべきであると判定した場合(S53:YES)、メッセージの送信失敗を制御部70に通知し(ステップS54)、送信処理を終了する。   Next, the communication unit 71 determines whether or not the transmission of the message should be stopped, similarly to step S14 of the transmission process executed by the communication unit 61 of the communication device 30 (step S53). When the communication unit 61 determines that the message cannot be transmitted (S51: NO) or determines that the message transmission should be stopped (S53: YES), the communication unit 61 controls the message transmission failure. The unit 70 is notified (step S54), and the transmission process is terminated.

通信部71は、メッセージの送信を停止すべきではないと判定した場合(S53:NO)、通信装置30の通信部61が実行する送信処理のステップS16と同様に、メッセージの送信権を獲得したか否かを判定する(ステップS55)。通信部71は、メッセージの送信権を獲得していないと判定した場合(S55:NO)、ステップS52を実行し、メッセージの送信を停止すべきと判定するか、又は、メッセージの送信権を獲得したと判定するまでメッセージのデータを1ビットずつ送信する。   When the communication unit 71 determines that the message transmission should not be stopped (S53: NO), the communication unit 71 has acquired the message transmission right in the same manner as in step S16 of the transmission process executed by the communication unit 61 of the communication device 30. It is determined whether or not (step S55). When it is determined that the message transmission right has not been acquired (S55: NO), the communication unit 71 executes step S52 and determines that the message transmission should be stopped or acquires the message transmission right. The message data is transmitted bit by bit until it is determined that it has been completed.

通信部71は、メッセージの送信権を獲得したと判定した場合(S55:YES)、ステップS52と同様に、メッセージの1ビットのデータを送信する(ステップS56)。通信部71は、ステップS52と同様に、ステップS56も繰り返し実行する。ステップS56で通信部71が送信するデータは、アービトレーションフィールド以降に含まれるメッセージのデータである。   If it is determined that the message transmission right has been acquired (S55: YES), the communication unit 71 transmits 1-bit data of the message (step S56) as in step S52. The communication unit 71 repeatedly executes step S56 as in step S52. The data transmitted by the communication unit 71 in step S56 is message data included after the arbitration field.

通信部71は、ステップS56を実行した後、メッセージの送信が完了したか否かを判定する(ステップS57)。通信部71は、メッセージの送信が完了していないと判定した場合(S57:NO)、ステップS56を実行し、メッセージの送信が完了するまでメッセージのデータを1ビットずつ送信する。通信部71は、メッセージの送信が完了したと判定した場合(S57:YES)、メッセージの送信成功を制御部70に通知し(ステップS58)、送信処理を終了する。   After executing step S56, the communication unit 71 determines whether or not the transmission of the message is completed (step S57). When the communication unit 71 determines that the message transmission is not completed (S57: NO), the communication unit 71 executes step S56 and transmits the message data bit by bit until the message transmission is completed. If the communication unit 71 determines that the message transmission is completed (S57: YES), the communication unit 71 notifies the control unit 70 of the successful message transmission (step S58), and ends the transmission process.

図12は、中継装置2の通信部71が実行する受信処理の手順を示すフローチャートである。通信部71は、メッセージのSOFを検出した場合、又は、送信処理で送信を停止すべきと判定した場合に受信処理を実行する。
通信部72,73は通信部71と同様の受信処理を実行する。通信部71が実行する受信処理の説明において、通信部71を通信部72に置き換えることによって通信部72が実行する受信処理を説明することができる。通信部71が実行する受信処理の説明において、通信部71を通信部73に置き換えることによって通信部73が実行する受信処理を説明することができる。
FIG. 12 is a flowchart illustrating a procedure of reception processing executed by the communication unit 71 of the relay device 2. The communication unit 71 executes the reception process when detecting the SOF of the message or when determining that the transmission should be stopped by the transmission process.
The communication units 72 and 73 execute the same reception process as that of the communication unit 71. In the description of the reception process executed by the communication unit 71, the reception process executed by the communication unit 72 can be described by replacing the communication unit 71 with the communication unit 72. In the description of the reception process performed by the communication unit 71, the reception process performed by the communication unit 73 can be described by replacing the communication unit 71 with the communication unit 73.

通信部71は、メッセージの1ビットのデータを受信し(ステップS61)、メッセージの受信が完了したか否かを判定する(ステップS62)。通信部61は、メッセージの受信が完了していないと判定した場合(S62:NO)、ステップS61に実行し、メッセージの受信が完了するまで、1ビットのデータを順次受信する。   The communication unit 71 receives 1-bit data of the message (step S61), and determines whether or not reception of the message is completed (step S62). If the communication unit 61 determines that the message reception is not completed (S62: NO), the communication unit 61 executes the process in step S61 and sequentially receives 1-bit data until the message reception is completed.

通信部71は、メッセージの受信が完了したと判定した場合(S62:YES)、受信処理を終了する。
なお、通信部71は、受信処理で受信したメッセージ夫々について、メッセージIDに基づいて、中継装置2に送信されたメッセージであるか否かを判定する。通信部71は、中継装置2に送信されたメッセージではないと判定した場合、このメッセージを破棄する。通信部71は、中継装置2に送信されたメッセージであると判定した場合、このメッセージを記憶部74の送信メッセージ領域に記憶する。
If the communication unit 71 determines that the message has been received (S62: YES), the communication unit 71 ends the reception process.
Note that the communication unit 71 determines whether each message received in the reception process is a message transmitted to the relay device 2 based on the message ID. If the communication unit 71 determines that the message is not a message transmitted to the relay device 2, the communication unit 71 discards this message. When determining that the message is a message transmitted to the relay device 2, the communication unit 71 stores this message in the transmission message area of the storage unit 74.

以上のように、中継装置2の通信部71,72,73中の少なくとも2つは、N(=3)個の通信線3,4,5中のK個の通信線を介してメッセージの同時送信を行う場合、該K個の通信線に接続されている通信装置の通信部61に、送信禁止を示すメッセージを送信して、これらの通信装置が行うメッセージの送信を禁止する。例えば、通信部72,73は、2つの通信線4,5を介してメッセージの同時送信を行う場合、通信装置40,41,50,51夫々の通信部61に、送信禁止を示すメッセージを送信して、通信装置40,41,50,51の通信部61が行うメッセージの送信を禁止する。
通信部71,72,73夫々は禁止送信部として機能する。
As described above, at least two of the communication units 71, 72, and 73 of the relay device 2 can simultaneously transmit messages via K communication lines of N (= 3) communication lines 3, 4, and 5. When transmission is performed, a message indicating transmission prohibition is transmitted to the communication unit 61 of the communication apparatus connected to the K communication lines, and transmission of messages performed by these communication apparatuses is prohibited. For example, when the communication units 72 and 73 perform simultaneous transmission of messages via the two communication lines 4 and 5, a message indicating transmission prohibition is transmitted to the communication units 61 of the communication devices 40, 41, 50, and 51. Then, the transmission of the message performed by the communication unit 61 of the communication devices 40, 41, 50, 51 is prohibited.
Each of the communication units 71, 72, and 73 functions as a prohibited transmission unit.

従って、例えば、中継装置2の通信部72,73が通信装置40,50にメッセージIDが「A2」であるメッセージを同時に送信する必要がある場合、事前に、2つの通信線3,4に接続されている4つの通信装置40,41,50,51の通信部61に、送信禁止を示すメッセージを送信する。これにより、2つの通信線3,4に接続されている4つの通信装置40,41,50,51夫々の送信が禁止されるので、通信部72,73は、2つの通信線4,5を介してメッセージの同時送信を確実に行うことができる。この例では、データの送受信が禁止される通信線の数Kは2である。   Therefore, for example, when it is necessary for the communication units 72 and 73 of the relay device 2 to simultaneously transmit a message having the message ID “A2” to the communication devices 40 and 50, the communication units 72 and 73 are connected to the two communication lines 3 and 4 in advance. A message indicating transmission prohibition is transmitted to the communication units 61 of the four communication devices 40, 41, 50, 51. Accordingly, transmission of each of the four communication devices 40, 41, 50, 51 connected to the two communication lines 3, 4 is prohibited, so that the communication units 72, 73 connect the two communication lines 4, 5 to each other. Thus, simultaneous transmission of messages can be reliably performed. In this example, the number K of communication lines for which data transmission / reception is prohibited is two.

中継装置2の通信部71,72,73中の少なくとも2つは、K個の通信線夫々に接続されている通信装置のメッセージの送信が禁止されている間に、K個の通信線夫々を介して共通のメッセージを送信する。例えば、メッセージIDが「A2」である場合、中継装置2の通信部72,73は、2つの通信線4,5夫々に接続されている通信装置40,41,50,51のメッセージの送信が禁止されている間に、2つの通信線4,5夫々を介して、メッセージIDが「A2」である共通のメッセージを送信する。これにより、例えば、通信装置40,50において、2つの通信線4,5夫々を介した共通のメッセージの同時受信が実現される。この例でも、データの送受信が禁止される通信線の数Kは2である。
通信部71,72,73夫々はデータ送信部としても機能する。
At least two of the communication units 71, 72, and 73 of the relay device 2 connect each of the K communication lines while the transmission of the message of the communication device connected to each of the K communication lines is prohibited. Send a common message via For example, when the message ID is “A2”, the communication units 72 and 73 of the relay device 2 transmit the messages of the communication devices 40, 41, 50, and 51 connected to the two communication lines 4 and 5, respectively. While being prohibited, a common message with the message ID “A2” is transmitted via the two communication lines 4 and 5 respectively. Thereby, for example, in the communication devices 40 and 50, simultaneous reception of a common message via the two communication lines 4 and 5 is realized. Also in this example, the number K of communication lines for which data transmission / reception is prohibited is two.
Each of the communication units 71, 72, 73 also functions as a data transmission unit.

前述したように、通信装置30,31,40,41,50,51夫々の通信部61は、送信禁止を示すメッセージを受信してから待機時間が経過した後、メッセージの送信を再開する。
これにより、通信装置30,31,40,41,50,51夫々において、簡単な構成でメッセージの送信を許可することができる。
As described above, the communication units 61 of the communication devices 30, 31, 40, 41, 50, and 51 resume message transmission after a standby time has elapsed after receiving a message indicating that transmission is prohibited.
Thereby, in each of the communication devices 30, 31, 40, 41, 50, and 51, transmission of a message can be permitted with a simple configuration.

中継装置2の通信部71,72,73夫々は、N(=3)個の通信線3,4,5中の1つを介して、特定のメッセージ、具体的には、同時送信が必要とされるメッセージを受信する。通信部71,72,73中の1つが特定のメッセージを受信した場合に、通信部71,72,73中の少なくとも2つは、送信禁止を示すメッセージを送信して、メッセージの送信を禁止する。例えば、通信部71によって、メッセージIDが「A2」であるメッセージが受信された場合、通信部72,73は、送信禁止を示すメッセージを、通信線4,5を介して送信し、通信装置40,41,50,51のメッセージの送信を禁止する。その後、メッセージIDが「A2」であるメッセージの同時送信が行われる。通信部71,72,73夫々はデータ受信部としても機能する。   Each of the communication units 71, 72, 73 of the relay apparatus 2 requires a specific message, specifically, simultaneous transmission via one of N (= 3) communication lines 3, 4, 5. Receive messages. When one of the communication units 71, 72, and 73 receives a specific message, at least two of the communication units 71, 72, and 73 transmit a message indicating that transmission is prohibited, and prohibit transmission of the message. . For example, when the message having the message ID “A2” is received by the communication unit 71, the communication units 72 and 73 transmit a message indicating transmission prohibition via the communication lines 4 and 5, and the communication device 40. , 41, 50, 51 are prohibited from being transmitted. Thereafter, the message with the message ID “A2” is simultaneously transmitted. Each of the communication units 71, 72, 73 also functions as a data receiving unit.

(実施の形態2)
実施の形態1においては、通信装置30,31,40,41,50,51夫々の通信部61は、送信禁止を示すメッセージを受信してから待機時間が経過した後、メッセージの送信を再開する。しかしながら、通信部61がメッセージの送信を再開するタイミングは、送信禁止を示すメッセージを受信してから待機時間が経過した場合に限定されない。通信部61は、中継装置2の通信部71,72,73中の1つから送信許可を示すメッセージを受信した場合に、メッセージの送信を再開してもよい。
(Embodiment 2)
In the first embodiment, each communication unit 61 of communication devices 30, 31, 40, 41, 50, 51 resumes message transmission after a standby time has elapsed after receiving a message indicating that transmission is prohibited. . However, the timing at which the communication unit 61 resumes message transmission is not limited to the case where the standby time has elapsed after receiving a message indicating transmission prohibition. When the communication unit 61 receives a message indicating transmission permission from one of the communication units 71, 72, and 73 of the relay device 2, the communication unit 61 may resume message transmission.

以下では、実施の形態2について実施の形態1と異なる点を説明する。後述する構成を除く他の構成については実施の形態1と同様であるため、同様の符号を付してその詳細な説明を省略する。送信許可を示すメッセージは許可情報に相当する。   In the following, the differences between the second embodiment and the first embodiment will be described. Since the other configuration except the configuration to be described later is the same as that of the first embodiment, the same reference numerals are given and detailed description thereof is omitted. A message indicating transmission permission corresponds to permission information.

実施の形態2における通信システム1は、実施の形態1における通信システム1と同様に構成されている。実施の形態2における通信システム1に関して、通信装置30,31,40,41,50,51夫々の制御部60が実行する送信制御処理と、通信装置30,31,40,41,50,51夫々の通信部61が実行する受信処理と、中継装置2の制御部70が実行する送信制御処理とが実施の形態1と異なる。通信装置30,31,40,41,50,51夫々の通信部61は、受信処理において、受信したメッセージが、メッセージの送信許可を示している場合、メッセージの送信許可を制御部60に通知する。   The communication system 1 in the second embodiment is configured similarly to the communication system 1 in the first embodiment. Regarding the communication system 1 according to the second embodiment, the transmission control process executed by the control unit 60 of each of the communication devices 30, 31, 40, 41, 50, 51 and the communication devices 30, 31, 40, 41, 50, 51, respectively. The reception process executed by the communication unit 61 and the transmission control process executed by the control unit 70 of the relay apparatus 2 are different from those in the first embodiment. The communication units 61 of the communication devices 30, 31, 40, 41, 50, 51 notify the control unit 60 of message transmission permission when the received message indicates message transmission permission in the reception process. .

図13は、実施の形態2における通信装置30の制御部60が実行する送信制御処理の手順を示すフローチャートである。制御部60は、実施の形態1と同様に、送信制御処理を周期的に実行する。実施の形態2における制御部60が実行する送信制御処理のステップS71,S73〜S77は、実施の形態1における制御部60が実行する送信制御処理のステップS1,S5〜S9と同様である。このため、ステップS71,S73〜S77の詳細な説明を省略する。   FIG. 13 is a flowchart illustrating a procedure of transmission control processing executed by the control unit 60 of the communication device 30 according to the second embodiment. Similar to the first embodiment, the control unit 60 periodically performs transmission control processing. Steps S71, S73 to S77 of the transmission control process executed by the control unit 60 in the second embodiment are the same as steps S1, S5 to S9 of the transmission control process executed by the control unit 60 in the first embodiment. For this reason, detailed description of steps S71 and S73 to S77 is omitted.

制御部60は、通信部61からメッセージの送信禁止が通知されたと判定した場合(S71:YES)、通信部61からメッセージの送信許可が通知されたか否かを判定する(ステップS72)。制御部60は、送信許可が通知されていないと判定した場合(S72:NO)、ステップS72を実行し、通信部61からメッセージの送信許可が通知されるまで待機する。制御部60は、メッセージの送信禁止が通知されていないと判定した場合(S71:NO)、又は、メッセージの送信許可が通知されたと判定した場合(S72:YES)、ステップS73を実行する。   When it is determined that the message transmission prohibition has been notified from the communication unit 61 (S71: YES), the control unit 60 determines whether the communication unit 61 has notified the message transmission permission (step S72). When it is determined that the transmission permission is not notified (S72: NO), the control unit 60 executes step S72 and waits until the communication unit 61 notifies the message transmission permission. When it is determined that the message transmission prohibition is not notified (S71: NO), or when it is determined that the message transmission permission is notified (S72: YES), the control unit 60 executes Step S73.

図14は通信装置30の通信部61が実行する受信処理の手順を示すフローチャートである。実施の形態2における通信部61も、実施の形態1と同様に、メッセージのSOFを検出した場合、又は送信処理で送信を停止すべきと判定した場合に受信処理を実行する。実施の形態2における通信部61が実行する受信処理のステップS81〜S84は、実施の形態1における通信部61が実行する受信処理のステップS21〜S24と同様である。このため、ステップS81〜S84の詳細な説明を省略する。   FIG. 14 is a flowchart illustrating a procedure of reception processing executed by the communication unit 61 of the communication device 30. Similarly to the first embodiment, the communication unit 61 according to the second embodiment also executes the reception process when detecting the SOF of the message or when determining that the transmission should be stopped by the transmission process. Steps S81 to S84 of the reception process executed by the communication unit 61 in the second embodiment are the same as steps S21 to S24 of the reception process executed by the communication unit 61 in the first embodiment. For this reason, detailed description of steps S81 to S84 is omitted.

通信部61は、受信したメッセージが、メッセージの送信禁止を示していないと判定した場合(S83:NO)、受信したメッセージが、メッセージの送信許可を示しているか否かを判定する(ステップS85)。通信部61は、受信したメッセージが、メッセージの送信許可を示していると判定した場合(S85:YES)、メッセージの送信許可を制御部60に通知する(ステップS86)。   If the communication unit 61 determines that the received message does not indicate message transmission prohibition (S83: NO), the communication unit 61 determines whether the received message indicates message transmission permission (step S85). . If the communication unit 61 determines that the received message indicates message transmission permission (S85: YES), the communication unit 61 notifies the control unit 60 of message transmission permission (step S86).

通信部61は、受信したメッセージが、ステップS84,S86のいずれか一方を実行した後、又は、メッセージの送信許可を示していないと判定した場合(S85:NO)、受信処理を終了する。   The communication part 61 complete | finishes a reception process, after determining whether the received message has performed any one of step S84, S86, or has not shown transmission permission of a message (S85: NO).

なお、実施の形態2においても、通信部61は、受信処理で受信したメッセージが送信禁止又は送信許可を示していない場合、受信したメッセージ夫々について、メッセージIDに基づいて、通信装置30に送信されたメッセージであるか否かを判定する。通信部61は、通信装置30に送信されたメッセージではないと判定した場合、このメッセージを破棄する。通信部61は、通信装置30に送信されたメッセージであると判定した場合、このメッセージに含まれるデータを制御部70に通知し、制御部70は、通信部61が受信したデータに基づいて、制御信号を出力部63に出力させ、出力部63に接続されている電気機器の動作を制御する。   In the second embodiment as well, the communication unit 61 transmits each received message to the communication device 30 based on the message ID when the message received in the reception process does not indicate transmission prohibition or transmission permission. It is determined whether it is a message. If the communication unit 61 determines that the message is not a message transmitted to the communication device 30, the communication unit 61 discards this message. When the communication unit 61 determines that the message is a message transmitted to the communication device 30, the communication unit 61 notifies the control unit 70 of data included in the message, and the control unit 70 is based on the data received by the communication unit 61. The control signal is output to the output unit 63 to control the operation of the electric device connected to the output unit 63.

実施の形態2においても、通信装置31,40,41,50,51夫々は、通信装置30と同様に構成される。通信装置30の構成の説明において、通信装置30を通信装置31に置き換えることによって、通信装置31の構成を説明することができる。通信装置30の構成の説明において、通信線3を通信線4に置き換え、かつ、通信装置30を通信装置40又は通信装置41に置き換えることによって、通信装置40又は通信装置41の構成を説明することができる。通信装置30の構成の説明において、通信線3を通信線5に置き換え、かつ、通信装置30を通信装置50又は通信装置51に置き換えることによって、通信装置50又は通信装置51の構成を説明することができる。   Also in the second embodiment, each of the communication devices 31, 40, 41, 50, 51 is configured similarly to the communication device 30. In the description of the configuration of the communication device 30, the configuration of the communication device 31 can be described by replacing the communication device 30 with the communication device 31. In the description of the configuration of the communication device 30, the configuration of the communication device 40 or the communication device 41 is described by replacing the communication line 3 with the communication line 4 and replacing the communication device 30 with the communication device 40 or the communication device 41. Can do. In the description of the configuration of the communication device 30, the configuration of the communication device 50 or the communication device 51 will be described by replacing the communication line 3 with the communication line 5 and replacing the communication device 30 with the communication device 50 or the communication device 51. Can do.

以上のように、通信装置30,31,40,41,50,51夫々の通信部61は、送信許可を示すメッセージを中継装置2から受信する。受信処理において通信部61が、送信禁止を示すメッセージを受信した場合、制御部60は、送信制御処理において、通信部61が、送信許可を示すメッセージを受信するまで、通信部61にデータ送信指示を出力しない。このため、通信部61は、送信禁止を示すメッセージを受信してから送信許可を示すメッセージを受信するまで、メッセージの送信を停止する。制御部60は、通信部61が、送信許可を示すメッセージを受信した場合において、記憶部64の送信データ領域に送信すべきデータが記憶されているとき、データ送信指示を通信部61に出力し、通信部61はメッセージの送信を再開する。通信部61は許可受信部としても機能する。   As described above, each of the communication units 61 of the communication devices 30, 31, 40, 41, 50, 51 receives a message indicating transmission permission from the relay device 2. When the communication unit 61 receives a message indicating transmission prohibition in the reception process, the control unit 60 instructs the communication unit 61 to transmit data until the communication unit 61 receives a message indicating transmission permission in the transmission control process. Is not output. For this reason, the communication unit 61 stops the message transmission until the message indicating the transmission permission is received after the message indicating the transmission prohibition is received. When the communication unit 61 receives a message indicating transmission permission and the data to be transmitted is stored in the transmission data area of the storage unit 64, the control unit 60 outputs a data transmission instruction to the communication unit 61. The communication unit 61 resumes message transmission. The communication unit 61 also functions as a permission receiving unit.

図15及び図16は、中継装置2の制御部70が実行する送信制御処理の手順を示すフローチャートである。制御部70は、実施の形態2と同様に、送信制御処理を周期的に実行する。実施の形態2における制御部70が実行する送信制御処理のステップS91〜S105は、実施の形態1における制御部70が実行する送信制御処理のステップS31〜S45と同様である。このため、ステップS91〜S105の詳細な説明を省略する。   FIG. 15 and FIG. 16 are flowcharts showing the procedure of the transmission control process executed by the control unit 70 of the relay apparatus 2. The control unit 70 executes transmission control processing periodically as in the second embodiment. Steps S91 to S105 of the transmission control process executed by the control unit 70 in the second embodiment are the same as steps S31 to S45 of the transmission control process executed by the control unit 70 in the first embodiment. For this reason, detailed description of steps S91 to S105 is omitted.

制御部70は、ステップS105を実行した後、送信許可を示すメッセージの送信を指示する許可送信指示を、ステップS92で決定したK個の通信線夫々に接続されているK個の通信部に出力する(ステップS106)。制御部70は、例えば、ステップS92でメッセージの送信に用いるK個の通信線を通信線4,5に決定した場合、通信部72,73に許可送信指示を出力する。   After executing step S105, the control unit 70 outputs a permission transmission instruction for instructing transmission of a message indicating transmission permission to the K communication units connected to the K communication lines determined in step S92. (Step S106). For example, when the control unit 70 determines that the communication lines 4 and 5 are K communication lines used for message transmission in step S92, the control unit 70 outputs a permission transmission instruction to the communication units 72 and 73.

通信部71,72,73夫々は、制御部70から許可送信指示が入力された場合も送信処理を実行する。通信部71,72,73夫々は、送信処理において、送信許可を示すメッセージの送信の成功及び失敗を制御部70に通知する。   Each of the communication units 71, 72, and 73 executes transmission processing even when a permission transmission instruction is input from the control unit 70. Each of the communication units 71, 72, and 73 notifies the control unit 70 of success and failure of transmission of a message indicating transmission permission in the transmission process.

制御部70は、通信部71,72,73の中で、送信許可を示すメッセージの送信処理を実行しているK個の通信部の少なくとも1つから送信失敗が通知されたか否か判定する(ステップS107)。制御部70は、複数の通信部の少なくとも1つから送信失敗が通知されたと判定した場合(S107:YES)、許可送信指示を、通信部71,72,73の中で送信失敗を通知した通信部に出力する(ステップS108)。その後、制御部70は再びステップS107を実行する。   The control unit 70 determines whether or not a transmission failure has been notified from at least one of the K communication units that are executing transmission processing of a message indicating transmission permission among the communication units 71, 72, and 73 ( Step S107). When it is determined that the transmission failure has been notified from at least one of the plurality of communication units (S107: YES), the control unit 70 sends a permission transmission instruction to the communication unit 71, 72, 73 that has notified the transmission failure. (Step S108). Thereafter, the control unit 70 executes Step S107 again.

制御部70は、通信部71,72,73の中で、送信許可を示すメッセージの送信処理を実行しているK個の通信部のいずれからも送信失敗が通知されていない場合(S107:NO)、通信部71,72,73の中で、送信許可を示すメッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されたか否かを判定する(ステップS109)。制御部70は、送信許可を示すメッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されていないと判定した場合(S109:NO)、ステップS107を実行し、送信許可を示す全てのメッセージの送信が成功するまで、許可送信指示の出力、又は、待機を行い続ける。   In the communication units 71, 72, 73, the control unit 70 is notified of no transmission failure from any of the K communication units that are executing transmission processing of a message indicating transmission permission (S 107: NO). In the communication units 71, 72, 73, it is determined whether or not transmission success has been notified from all of the K communication units that are executing transmission processing of a message indicating transmission permission (step S109). When the control unit 70 determines that the transmission success has not been notified from all of the K communication units that are executing transmission processing of a message indicating transmission permission (S109: NO), the control unit 70 executes step S107, and performs transmission. Until all the messages indicating permission are successfully transmitted, the permission transmission instruction is output or the standby is continued.

制御部70は、送信許可を示すメッセージの送信処理を実行しているK個の通信部の全てから送信成功が通知されたと判定した場合(S109:YES)、送信制御処理を終了する。その後、制御部70は、次の周期が到来した場合、送信制御処理を再開する。   When it is determined that the transmission success has been notified from all of the K communication units executing the transmission process of the message indicating the transmission permission (S109: YES), the control unit 70 ends the transmission control process. Thereafter, the control unit 70 resumes the transmission control process when the next cycle arrives.

通信部71,72,73夫々は、制御部70からメッセージの送信指示、禁止送信指示又は許可送信指示が入力された場合に実施の形態1と同様の送信処理を実行する。送信処理では、通信部71,72,73夫々は、実施の形態2と同様に、メッセージ送信指示が入力されている場合、記憶部74の送信メッセージ領域に記憶されているメッセージを送信し、禁止送信指示が入力されている場合、送信禁止を示すメッセージを送信する。実施の形態2では、通信部71,72,73夫々は、更に、許可送信指示が入力されている場合、送信許可を示すメッセージを送信する。   Each of the communication units 71, 72, and 73 executes a transmission process similar to that of the first embodiment when a message transmission instruction, a prohibited transmission instruction, or a permitted transmission instruction is input from the control unit 70. In the transmission process, each of the communication units 71, 72, and 73 transmits a message stored in the transmission message area of the storage unit 74 when a message transmission instruction is input, as in the second embodiment, and is prohibited. When a transmission instruction is input, a message indicating transmission prohibition is transmitted. In the second embodiment, each of the communication units 71, 72, 73 further transmits a message indicating transmission permission when a permission transmission instruction is input.

以上のように、中継装置2の通信部71,72,73中の少なくとも2つは、N(=3)個の通信線3,4,5中のK個の通信線を介してメッセージの同時送信を行う場合、該K個の通信線に接続されている通信装置の通信部61に、送信禁止を示すメッセージを送信して、これらの通信装置の通信部61が行うメッセージの送信を禁止した後、K個の通信線を介して共通のメッセージを送信する。通信部71,72,73中の少なくとも2つは、共通のメッセージを送信した後、K個の通信線に接続されている通信装置の通信部61に、送信許可を示すメッセージを送信して、これらの通信装置が行うメッセージの送信を許可する。例えば、通信部72,73は、2つの通信線4,5を介して通信部72,73がメッセージの同時送信を行う場合、通信装置40,41,50,51夫々の通信部61に、送信禁止を示すメッセージを送信して、通信装置40,41,50,51の通信部61が行うメッセージの送信を禁止した後、2つの通信線4,5を介して共通のメッセージを送信する。通信部72,73は、共通のメッセージを送信した後、2つの通信線4,5に接続されている通信装置40,41,50,51夫々の通信部61に、送信許可を示すメッセージを送信して、通信装置40,41,50,51の通信部61が行うメッセージの送信を許可する。
通信部71,72,73夫々は許可送信部として機能する。
As described above, at least two of the communication units 71, 72, and 73 of the relay device 2 can simultaneously transmit messages via K communication lines of N (= 3) communication lines 3, 4, and 5. When transmitting, a message indicating transmission prohibition is transmitted to the communication unit 61 of the communication device connected to the K communication lines, and transmission of the message performed by the communication unit 61 of these communication devices is prohibited. Thereafter, a common message is transmitted via the K communication lines. At least two of the communication units 71, 72, 73 transmit a message indicating transmission permission to the communication unit 61 of the communication device connected to the K communication lines after transmitting a common message, The transmission of messages performed by these communication devices is permitted. For example, when the communication units 72 and 73 perform simultaneous transmission of messages via the two communication lines 4 and 5, the communication units 72 and 73 transmit to the communication units 61 of the communication devices 40, 41, 50, and 51. After transmitting a message indicating prohibition and prohibiting the transmission of the message performed by the communication unit 61 of the communication devices 40, 41, 50 and 51, a common message is transmitted via the two communication lines 4 and 5. After transmitting the common message, the communication units 72 and 73 transmit a message indicating transmission permission to the communication units 61 of the communication devices 40, 41, 50, and 51 connected to the two communication lines 4 and 5, respectively. Then, the transmission of the message performed by the communication unit 61 of the communication devices 40, 41, 50, 51 is permitted.
Each of the communication units 71, 72, and 73 functions as a permission transmission unit.

通信装置30,31,40,41,50,51の通信部61は、送信禁止を示すメッセージを受信した場合にメッセージの送信を停止し、送信許可を示すメッセージを受信した場合にメッセージの送信を再開する。例えば、通信装置30の通信部61は、中継装置2の通信部71から、送信禁止を示すメッセージを受信した場合にメッセージの送信を停止し、送信許可を示すメッセージを受信した場合に、通信線3を介してメッセージの送信を再開する。   The communication unit 61 of the communication devices 30, 31, 40, 41, 50, 51 stops transmitting the message when receiving a message indicating transmission prohibition, and transmits the message when receiving a message indicating transmission permission. Resume. For example, when the communication unit 61 of the communication device 30 receives a message indicating transmission prohibition from the communication unit 71 of the relay device 2, the communication unit 61 stops transmission of the message, and when receiving a message indicating transmission permission, 3 restarts the message transmission.

通信装置30,31,40,41,50,51夫々の通信部61は、送信禁止を示すメッセージを受信してから、送信許可を示すメッセージを受信するまで、メッセージの送信を再開することはない。このため、例えば、中継装置2の通信部72,73は、2つの通信線3,4夫々を介したデータの送信が確実に禁止されている状態でメッセージの同時送信を行うことができる。この例では、データの送受信が禁止される通信線の数Kは2である。   The communication unit 61 of each of the communication devices 30, 31, 40, 41, 50, 51 does not resume message transmission after receiving a message indicating transmission prohibition until receiving a message indicating transmission permission. . For this reason, for example, the communication units 72 and 73 of the relay apparatus 2 can simultaneously transmit messages in a state where transmission of data via the two communication lines 3 and 4 is reliably prohibited. In this example, the number K of communication lines for which data transmission / reception is prohibited is two.

実施の形態2において、通信装置30,31,40,41,50,51夫々の通信部61がメッセージの送信を再開する構成を除く他の構成は、実施の形態1と同様である。このため、実施の形態2における通信システム1は、実施の形態1における通信システム1が奏する効果の中で、送信禁止を示すメッセージを受信してから待機時間が経過した後にメッセージの送信を再開する構成によって得られる効果を除く他の効果を奏する。   In the second embodiment, the configuration other than the configuration in which the communication units 61 of the communication devices 30, 31, 40, 41, 50, and 51 resume message transmission is the same as that of the first embodiment. For this reason, the communication system 1 according to the second embodiment restarts the transmission of the message after the standby time has elapsed after receiving the message indicating the transmission prohibition, among the effects exhibited by the communication system 1 according to the first embodiment. Other effects are obtained except for the effects obtained by the configuration.

なお、実施の形態1,2において、中継装置2の通信部71,72,73中の複数の通信部は、メッセージの同時送信を行う場合に、送信されるメッセージは、通信部71,72,73中の1つが受信したメッセージに限定されない。   In the first and second embodiments, when a plurality of communication units in the communication units 71, 72, and 73 of the relay apparatus 2 perform simultaneous transmission of messages, the transmitted messages are the communication units 71, 72, One of 73 is not limited to the received message.

また、中継装置2の通信部71,72,73中の複数の通信部は、同時送信を行う場合に、相互に異なるメッセージを送信してもよい。例えば、中継装置2の通信部72,73夫々は、通信装置40,41,50,51が行うメッセージの送信を禁止している間に、2つの通信線4,5夫々を介して、相互に異なるメッセージを送信してもよい。例えば、通信装置40,50が同時に受信する必要があるメッセージは同一であるとは限らない。   In addition, a plurality of communication units in the communication units 71, 72, and 73 of the relay device 2 may transmit different messages when performing simultaneous transmission. For example, while the communication units 72 and 73 of the relay device 2 prohibit the transmission of messages performed by the communication devices 40, 41, 50, and 51, the communication units 72 and 73 communicate with each other via the two communication lines 4 and 5, respectively. Different messages may be sent. For example, the messages that the communication devices 40 and 50 need to receive at the same time are not necessarily the same.

また、中継装置2には、外部装置、例えばダイアグツールが着脱可能に接続されていてもよい。この場合、中継装置2は、外部装置から特定のメッセージを受信したときに、N(=3)個の通信線3,4,5中の複数の通信線を介してメッセージの同時送信を行ってもよい。   Further, an external device such as a diagnostic tool may be detachably connected to the relay device 2. In this case, when the relay device 2 receives a specific message from the external device, the relay device 2 performs simultaneous transmission of the message via a plurality of communication lines among the N (= 3) communication lines 3, 4, and 5. Also good.

更に、中継装置2に接続されている通信線の数Nは、3に限定されず、2又は4以上の整数であってもよい。更に、メッセージの同時送信が行われる通信線の数Kは2に限定されず、2以上N以下であればよい。通信システム1が備える通信装置の数は6に限定されず、2以上5以下、又は、7以上であってもよい。更に、1つの通信線に接続することができる通信装置の数も2つに限定されず、1又は3以上であってもよい。   Further, the number N of communication lines connected to the relay apparatus 2 is not limited to 3, and may be 2 or an integer of 4 or more. Further, the number K of communication lines on which messages are simultaneously transmitted is not limited to 2, but may be 2 or more and N or less. The number of communication devices provided in the communication system 1 is not limited to 6, and may be 2 or more, 5 or less, or 7 or more. Furthermore, the number of communication devices that can be connected to one communication line is not limited to two, and may be one or three or more.

また、通信システム1において、電気機器の動作の制御を行う通信装置の代わりに、電気機器の動作の制御を行わない通信装置を用いてもよい。通信線を介した通信で用いられるプロトコルは、CANプロトコルに限定されず、例えば、CAN_FD(Controller Area Network with Flexible Data Rate)プロトコルであってもよい。この場合、メッセージの構成において、データフィールドの送信速度は、他の部分の送信速度よりも速く、例えば、他の部分の送信速度の4倍である。   Further, in the communication system 1, a communication device that does not control the operation of the electric device may be used instead of the communication device that controls the operation of the electric device. The protocol used for communication via the communication line is not limited to the CAN protocol, and may be, for example, a CAN_FD (Controller Area Network with Flexible Data Rate) protocol. In this case, in the message structure, the transmission rate of the data field is faster than the transmission rate of the other part, for example, four times the transmission rate of the other part.

開示された実施の形態1,2は、全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上述の説明ではなく特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内での全ての変更が含まれることが意図される。   The disclosed first and second embodiments are examples in all respects and should not be considered as restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.

1 通信システム
2 中継装置
3,4,5 通信線
30,31,40,41,50,51 通信装置
61 通信部(禁止受信部、許可受信部)
71,72,73 通信部(禁止送信部、許可送信部、データ送信部、データ受信部)
DESCRIPTION OF SYMBOLS 1 Communication system 2 Relay apparatus 3, 4, 5 Communication line 30, 31, 40, 41, 50, 51 Communication apparatus 61 Communication part (Prohibition receiving part, permission receiving part)
71, 72, 73 Communication unit (prohibited transmission unit, permission transmission unit, data transmission unit, data reception unit)

Claims (6)

N(N:2以上の整数)個の通信線中の1つに夫々が接続され、該通信線を介してデータの送受信を行う複数の通信装置にデータを送信する中継装置において、
K(K:2以上N以下の整数)個の前記通信線に接続されている全ての前記通信装置に送信禁止を示す禁止情報を送信する禁止送信部と、
前記禁止送信部による前記全ての通信装置への前記禁止情報の送信が成功して前記全ての通信装置の送信が禁止されている間に、前記K個の通信線夫々を介して前記全ての通信装置に共通のデータを送信する同時送信を行うデータ送信部と
を備えることを特徴とする中継装置。
In a relay device that is connected to one of N (N: an integer of 2 or more) communication lines and transmits data to a plurality of communication devices that transmit and receive data via the communication line,
A prohibition transmission unit that transmits prohibition information indicating prohibition of transmission to all the communication devices connected to K (K: an integer of 2 to N) communication lines;
While the transmission of the prohibition information to all the communication devices by the prohibition transmission unit is successful and the transmission of all the communication devices is prohibited, the all communication is performed via each of the K communication lines. A data transmission unit that performs simultaneous transmission for transmitting common data to the device.
前記N個の通信線中の1つを介して特定のデータを受信するデータ受信部を備え、
前記禁止送信部は、該データ受信部が前記特定のデータを受信した場合に前記禁止情報を送信すること
を特徴とする請求項1に記載の中継装置。
A data receiving unit for receiving specific data via one of the N communication lines;
The relay apparatus according to claim 1, wherein the prohibition transmission unit transmits the prohibition information when the data reception unit receives the specific data.
請求項1又は請求項2に記載の中継装置と、
該中継装置からデータを受信する複数の前記通信装置と
を備え、
該複数の通信装置夫々は、前記禁止送信部が送信した禁止情報を受信する禁止受信部を有し、該禁止受信部が前記禁止情報を受信した場合、データの送信を停止すること
を特徴とする通信システム。
The relay device according to claim 1 or 2 ,
A plurality of the communication devices that receive data from the relay device;
Each of the plurality of communication devices includes a prohibition receiving unit that receives the prohibition information transmitted by the prohibition transmission unit, and stops transmission of data when the prohibition reception unit receives the prohibition information. Communication system.
前記通信装置は、前記禁止受信部が禁止情報を受信してから所定期間が経過した後にデータの送信を再開すること
を特徴とする請求項3に記載の通信システム。
The communication system according to claim 3 , wherein the communication device resumes data transmission after a predetermined period has elapsed since the prohibition receiving unit received the prohibition information.
前記中継装置は、前記K個の通信線に接続されている複数の前記通信装置に送信許可を示す許可情報を送信する許可送信部を有し、
複数の前記通信装置夫々は、前記許可送信部が送信した許可情報を受信する許可受信部を有し、該許可受信部が前記許可情報を受信した場合、データの送信を再開すること
を特徴とする請求項3に記載の通信システム。
The relay device includes a permission transmission unit that transmits permission information indicating transmission permission to the plurality of communication devices connected to the K communication lines,
Each of the plurality of communication devices has a permission receiving unit that receives permission information transmitted by the permission transmitting unit, and when the permission receiving unit receives the permission information , restarts data transmission. The communication system according to claim 3 .
請求項1に記載の中継装置と、
該中継装置からデータを受信する複数の前記通信装置と
を備え、
前記中継装置は、前記データ送信部が前記共通のデータを送信した後に、前記K個の通信線に接続されている複数の前記通信装置に送信許可を示す許可情報を送信する許可送信部を有し、
複数の前記通信装置夫々は、
前記禁止送信部が送信した禁止情報を受信する禁止受信部と、
前記許可送信部が送信した許可情報を受信する許可受信部と
を有し、
前記禁止受信部が前記禁止情報を受信した場合にデータの送信を停止し、前記許可受信部が前記許可情報を受信した場合にデータの送信を再開すること
を特徴とする通信システム。
A relay device according to claim 1 ;
A plurality of the communication devices that receive data from the relay device;
The relay device includes a permission transmission unit that transmits permission information indicating transmission permission to the plurality of communication devices connected to the K communication lines after the data transmission unit transmits the common data. And
Each of the plurality of communication devices includes:
A prohibition receiving unit for receiving prohibition information transmitted by the prohibition transmission unit;
A permission receiver for receiving permission information transmitted by the permission transmitter; and
A communication system, wherein the prohibition receiving unit stops transmitting data when receiving the prohibition information, and resumes data transmission when the permission receiving unit receives the permission information.
JP2015108799A 2015-05-28 2015-05-28 Relay device and communication system Active JP6471613B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015108799A JP6471613B2 (en) 2015-05-28 2015-05-28 Relay device and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015108799A JP6471613B2 (en) 2015-05-28 2015-05-28 Relay device and communication system

Publications (2)

Publication Number Publication Date
JP2016225741A JP2016225741A (en) 2016-12-28
JP6471613B2 true JP6471613B2 (en) 2019-02-20

Family

ID=57748591

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015108799A Active JP6471613B2 (en) 2015-05-28 2015-05-28 Relay device and communication system

Country Status (1)

Country Link
JP (1) JP6471613B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010258990A (en) * 2009-04-28 2010-11-11 Autonetworks Technologies Ltd Control system and control program updating method
JP5607219B2 (en) * 2009-05-20 2014-10-15 ルネサスエレクトロニクス株式会社 Automotive communication systems
JP5702829B2 (en) * 2013-05-23 2015-04-15 本田技研工業株式会社 Relay device

Also Published As

Publication number Publication date
JP2016225741A (en) 2016-12-28

Similar Documents

Publication Publication Date Title
TWI730993B (en) First communication device, communication method, and communication system
US9800319B2 (en) Relay apparatus
WO2018051833A1 (en) Relay device, communication system, transmission method and computer program
JP6187339B2 (en) Communication system and relay device
JP6481579B2 (en) In-vehicle communication system and monitoring device
JP2016021623A (en) Communication system, communication control device, and unauthorized information transmission prevention method
JP2009244991A (en) Data communication method, data communication system, electronic control unit, and circuit board
JP2016122885A (en) Electronic apparatus, control method therefor, and control program
JP6471613B2 (en) Relay device and communication system
JP2006253922A (en) Gateway apparatus and data transfer method for the gateway apparatus
US10447384B2 (en) Communication apparatus, communication method, and program
JP6185371B2 (en) Sub-microcomputer program rewriting method
JP4531884B2 (en) Address, instruction and / or data telegraph device and address, instruction and / or data telegraph method
US20180262386A1 (en) Communication apparatus, communication method, and program
US8989203B2 (en) Electronic device, communication control method, and recording medium
JP4413897B2 (en) Monitoring method, monitoring device, monitoring program, and monitoring system
JP5958335B2 (en) Communication node and communication system
JP2016124456A (en) Communication system
JP6728981B2 (en) Node device and communication system
JP7042417B2 (en) Communication equipment, transmission method and computer program
JP2014016907A (en) Communication system, and address allocation method
JP7149460B2 (en) Communication terminal device and its address setting method
JP2017147610A (en) Communication system and information processing device
JP2012156956A (en) On-vehicle network apparatus
JP2017130757A (en) Communication device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170628

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180501

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180605

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180622

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181030

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181210

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: 20181225

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190107

R150 Certificate of patent or registration of utility model

Ref document number: 6471613

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150