Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0918504A - Data communication device - Google Patents
[go: Go Back, main page]

JPH0918504A - Data communication device - Google Patents

Data communication device

Info

Publication number
JPH0918504A
JPH0918504A JP7167702A JP16770295A JPH0918504A JP H0918504 A JPH0918504 A JP H0918504A JP 7167702 A JP7167702 A JP 7167702A JP 16770295 A JP16770295 A JP 16770295A JP H0918504 A JPH0918504 A JP H0918504A
Authority
JP
Japan
Prior art keywords
data
communication
potential
terminal device
interrupt
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP7167702A
Other languages
Japanese (ja)
Inventor
Yasuhiro Shirota
康弘 城田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Ten Ltd
Original Assignee
Denso Ten Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP7167702A priority Critical patent/JPH0918504A/en
Publication of JPH0918504A publication Critical patent/JPH0918504A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Small-Scale Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

PROBLEM TO BE SOLVED: To greatly improve the reliability of a data communication by enabling interruption data of high priority to be transmitted without being broken during normal communication processing for the transmission and reception of request data and response data. SOLUTION: The normal communication processing uses 1st data formed of a 1st potential V1 and a 2nd potential V2. For interruption communication processing for transmitting interruption data of higher priority than the normal communication processing, 2nd data formed of the 1st potential V1 and a 3rd potential V3 lower than the 2nd potential V2 are used. Even when the 1st data and 2nd data overlap with each other, the 1st data is destroyed, but the 2nd data is destroyed only partially and a terminal equipment can detect the 2nd data without any influence. Consequently, the data of high priority can be sent and received and the reliability of the data communication is greatly improved.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、車両に搭載された
複数のECU(Electronic Control Unit)間のデータ
通信に好適に実施されるデータ通信装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data communication device suitable for data communication between a plurality of ECUs (Electronic Control Units) mounted on a vehicle.

【0002】[0002]

【従来の技術】図1は、本発明の前提となるデータ通信
装置1の全体的構成を示すブロック図である。データ通
信装置1は、1つのマスタ端末装置Mと、複数のスレー
ブ端末装置S1〜Sn(総称するときは、参照符Sを用
いる)とを含んで構成される。端末装置M,Sは、通信
ラインKによって接続されている。データ通信装置1
は、ISO9141(国際標準規格)に準拠した通信方
式が実施される。この通信方式は、いわゆるマスタ・ス
レーブ方式であり、マスタ端末装置Mから複数のスレー
ブ端末装置Sに対して要求データを送信し、各スレーブ
端末装置Sは要求データを受信し、それぞれのスレーブ
端末装置Sがマスタ端末装置Mに対して応答データを送
信する方式である。マスタ端末装置Mからの要求データ
の送信と、スレーブ端末装置Sからの応答データの送信
とによって1サイクルの通常通信処理が構成される。
2. Description of the Related Art FIG. 1 is a block diagram showing an overall configuration of a data communication apparatus 1 which is a premise of the present invention. The data communication device 1 is configured to include one master terminal device M and a plurality of slave terminal devices S1 to Sn (reference numeral S is used when collectively referred to). The terminal devices M and S are connected by a communication line K. Data communication device 1
In accordance with ISO 9141 (international standard), a communication method is implemented. This communication system is a so-called master / slave system, in which request data is transmitted from the master terminal device M to a plurality of slave terminal devices S, each slave terminal device S receives the request data, and each slave terminal device S receives the request data. In this method, S transmits response data to the master terminal device M. The transmission of request data from the master terminal device M and the transmission of response data from the slave terminal device S constitute one cycle of normal communication processing.

【0003】スレーブ端末装置S1〜Snには、優先順
位が定められており、優先順位の上位のスレーブ端末装
置から順番にマスタ端末装置Mに対して応答データを送
信する。ここでは、参照符Sの添え字1〜nが優先順位
を表すものとする。端末装置M,Sは、待機状態では予
め定める第1の電位(ハイレベル)に設定されている通
信ラインKを、前記第1の電位より低い予め定める第2
の電位(ローレベル)に引下げる手段を有し、これら2
つのレベルを所定のタイミングで切換えることによって
ビットデータを作成し、データを送信する。予め定める
数のビットデータによってバイトデータが構成され、さ
らに予め定める数のバイトデータによってメッセージデ
ータが構成される。このメッセージデータが、前記要求
データおよび応答データに相当する。
The slave terminal devices S1 to Sn have a predetermined priority order, and the response data is transmitted to the master terminal device M in order from the slave terminal device having the higher priority order. Here, the subscripts 1 to n of the reference symbol S represent the priority order. The terminal devices M and S set the communication line K, which is set to the predetermined first potential (high level) in the standby state, to the second predetermined lower than the first potential.
The means for lowering the potential (low level) of
Bit data is created by switching one level at a predetermined timing, and the data is transmitted. Byte data is composed of a predetermined number of bit data, and message data is composed of a predetermined number of byte data. This message data corresponds to the request data and the response data.

【0004】[0004]

【発明が解決しようとする課題】上述したマスタ・スレ
ーブ方式が実施されるデータ通信装置1では、現在行わ
れている通常通信処理中は、その通信処理が終了するま
では別の通信を実施できない。強制的に別の通信、たと
えば優先度の高い通信として端末装置に異常が発生した
ことをマスタ端末装置Mに知らせるための通信を行おう
とすると、2つのデータが重なり合ってしまい、2つの
データがともに破壊されてしまい、正常にデータ通信が
行えなくなるという問題がある。
In the data communication device 1 in which the master / slave system is implemented, during the normal communication process currently being performed, another communication cannot be executed until the communication process is completed. . If another communication is forcibly attempted to perform communication for notifying the master terminal device M that an abnormality has occurred in the terminal device as high-priority communication, the two data overlap and the two data together. There is a problem that the data will be destroyed and data communication cannot be performed normally.

【0005】本発明の目的は、要求データおよび応答デ
ータの送信および受信を行う通常通信処理中に、要求デ
ータおよび応答データよりも優先度の高い割込データを
壊すことなく送信することができ、データ通信の信頼性
が格段に向上するデータ通信装置を提供することであ
る。
An object of the present invention is to enable interrupt data having a higher priority than request data and response data to be transmitted without being destroyed during normal communication processing for transmitting and receiving request data and response data. An object of the present invention is to provide a data communication device in which the reliability of data communication is significantly improved.

【0006】[0006]

【課題を解決するための手段】本発明は、複数の端末装
置を予め定める第1の電位が待機状態である1本の通信
ラインで接続し、複数の端末装置の中から選ばれる主端
末装置は、他の端末装置に要求データを送信し、他の端
末装置は前記要求データに対する応答データを、主端末
装置へのデータ送信の順序を決定する予め定める優先順
位に従って順番に送信するデータ通信装置において、各
端末装置は、通信ラインの電位を前記第1の電位と第1
の電位よりも低い予め定める第2の電位とに切換えて第
1のデータを作成して送信する第1のデータ送信手段
と、通信ラインの電位を前記第1の電位と前記第2の電
位よりも低い予め定める第3の電位とに切換えて第2の
データを作成して送信する第2のデータ送信手段と、通
信ラインの電位を検出して第1および第2のデータを受
信するデータ受信手段とを備え、主端末装置による要求
データの送信と他の端末装置による応答データの送信と
によって構成される通常の通信処理を行うときは、前記
第1のデータを使用し、通常の通信処理中に、当該通常
通信処理よりも優先される割込データを送信する割込通
信処理を行うときは、前記第2のデータを使用すること
を特徴とするデータ通信装置である。本発明に従えば、
複数の端末装置は1本の通信ラインで接続され、通常の
通信処理として、複数の端末装置の中から選ばれる主端
末装置による要求データの送信と、他の端末装置による
前記要求データに対する応答データの送信とを行う。通
常通信処理は、第1のデータ送信手段によって通信ライ
ンの電位を待機状態である第1の電位と第1の電位より
も低い予め定める第2の電位とに切換えて作成される第
1のデータを使用して行われる。通常通信処理中に、当
該通常通信処理より優先される割込データを送信する割
込通信処理を行うときは、第2のデータ送信手段によっ
て通信ラインの電位を待機状態である第1の電位と前記
第2の電位よりも低い予め定める第3の電位とに切換え
て作成される第2のデータを使用して行われる。割込デ
ータと要求データまたは応答データとが重なった場合、
割込データを形成する第3の電位は、要求データおよび
応答データを形成する第2の電位よりも低いので、要求
データおよび応答データは壊れてしまうが、割込データ
は壊れずに受信することができる。これによって、通常
通信処理よりも優先度の高い割込データ、たとえばエラ
ー信号を確実に送信および受信することができ、データ
通信の信頼性が向上する。
According to the present invention, a main terminal device is selected from a plurality of terminal devices by connecting a plurality of terminal devices with one communication line in which a predetermined first potential is in a standby state. Is a data communication device that transmits request data to another terminal device, and the other terminal device sequentially transmits response data to the request data in accordance with a predetermined priority order that determines the order of data transmission to the main terminal device. In the above, each terminal device sets the potential of the communication line to the first potential and the first potential.
A second data potential that is switched to a predetermined second potential that is lower than the first potential to generate and transmit the first data, and the potential of the communication line from the first potential and the second potential. Second data transmitting means for generating and transmitting second data by switching to a predetermined third potential which is also low, and data reception for detecting the potential of the communication line and receiving the first and second data. Means for transmitting the request data by the main terminal device and the response data by the other terminal device, the normal communication process is performed by using the first data. In the data communication device, the second data is used when performing the interrupt communication process that transmits the interrupt data that has priority over the normal communication process. According to the present invention,
A plurality of terminal devices are connected by one communication line, and as a normal communication process, a main terminal device selected from a plurality of terminal devices transmits request data and another terminal device responds to the request data. And send. In the normal communication processing, the first data created by the first data transmitting means by switching the potential of the communication line between the first potential in the standby state and the predetermined second potential lower than the first potential. Is done using. During the normal communication process, when performing the interrupt communication process for transmitting the interrupt data prioritized over the normal communication process, the potential of the communication line is set to the first potential in the standby state by the second data transmitting means. It is performed using the second data created by switching to a predetermined third potential lower than the second potential. If the interrupt data and request data or response data overlap,
Since the third potential forming the interrupt data is lower than the second potential forming the request data and the response data, the request data and the response data will be corrupted, but the interrupt data must be received without being corrupted. You can This makes it possible to reliably transmit and receive interrupt data having a higher priority than the normal communication processing, for example, an error signal, and improve the reliability of data communication.

【0007】また本発明は、各端末装置は、通常通信処
理中に割込通信処理が割込んだときは、当該通常通信処
理を中断し、主端末装置は、前記割込通信処理が終了し
た後に、中断した通常通信処理における要求データを再
び送信することを特徴とする。各端末装置は通常通信処
理中に割込通信処理が割込んだときは、当該通常通信処
理を中断し、前記割込通信処理が終了した後に、主端末
装置は通常通信処理における要求データを再び送信す
る。これによって割込通信処理によって中断した通常通
信処理が改めて開始されるので、割込通信処理と通常通
信処理とを円滑に行うことができ、信頼性がより向上す
る。
Further, according to the present invention, when the interrupt communication process is interrupted during the normal communication process, each terminal device interrupts the normal communication process, and the main terminal device finishes the interrupt communication process. After that, the request data in the interrupted normal communication process is transmitted again. When each terminal device interrupts the normal communication process during the normal communication process, the normal communication process is interrupted, and after the interrupt communication process is completed, the main terminal device returns the request data in the normal communication process again. Send. As a result, the normal communication process interrupted by the interrupt communication process is restarted, so that the interrupt communication process and the normal communication process can be smoothly performed, and the reliability is further improved.

【0008】また本発明は、各端末装置は、通常通信処
理中に割込通信処理が割込んだときは、当該通常通信処
理を中断し、前記割込通信処理が終了した後に、中断し
た前記通常通信処理を再開することを特徴とする。割込
通信処理の割込みによって中断した通常通信処理は、割
込通信処理が終了した後に中断した時点から再開される
ので、中断後に改めて最初から開始する場合に比べて、
通信時間を短縮することができる。
According to the present invention, each terminal device interrupts the normal communication process when the interrupt communication process interrupts during the normal communication process, and interrupts after the interrupt communication process is completed. The feature is that normal communication processing is restarted. The normal communication process interrupted by the interrupt of the interrupt communication process is restarted from the point at which it was interrupted after the interrupt communication process was completed, so compared to the case of restarting from the beginning after the interruption.
Communication time can be reduced.

【0009】また本発明は、各端末装置は、割込通信処
理の最初の少なくとも1ビットデータの送信および受信
が完了した後は、前記第1のデータに切換えて割込通信
処理を行うことを特徴とする。割込通信処理の最初の少
なくとも1ビットデータを第2のデータによって送信お
よび受信した後は、前記第1のデータに切換えて割込通
信処理を行う。したがって割込通信処理中に、さらに優
先度の高い割込データの送信を行う割込通信処理が割込
んだ場合であっても、より優先度の高い割込データを壊
すことなく受信することができる。これによって、デー
タ通信の信頼性が向上する。また優先度に応じて複数の
異なる電位によって構成されるデータを送信するための
送信手段を準備する必要がなく、構成の小形化および低
コスト化が図られる。
According to the present invention, each terminal device switches to the first data and performs the interrupt communication process after the transmission and reception of the first at least 1-bit data of the interrupt communication process is completed. Characterize. After the first at least 1-bit data of the interrupt communication process is transmitted and received by the second data, the interrupt communication process is performed by switching to the first data. Therefore, even if an interrupt communication process that transmits interrupt data with a higher priority during the interrupt communication process interrupts, it is possible to receive interrupt data with a higher priority without destroying it. it can. This improves the reliability of data communication. Further, it is not necessary to prepare a transmitting means for transmitting data composed of a plurality of different potentials according to the priority, and the structure can be downsized and the cost can be reduced.

【0010】また本発明は、前記データ受信手段は、前
記第1および第2の電位の間に選ばれる第1の基準電位
よりも通信ラインの電位が高いか低いかを検出する第1
の電位検出手段と、前記第2および第3の電位の間に選
ばれる第2の基準電位よりも通信ラインの電位が高いか
低いかを検出する第2の電位検出手段とを含み、各端末
装置は、前記第1および第2の電位検出手段の各検出結
果が一致しないときに、エラーが発生したと判断するこ
とを特徴とする。データ受信手段が備える第1および第
2の電位検出手段による検出結果が一致しないときに、
エラーが発生したと判断する。
According to the present invention, the data receiving means may detect whether the potential of the communication line is higher or lower than a first reference potential selected between the first and second potentials.
Potential detecting means and second potential detecting means for detecting whether the potential of the communication line is higher or lower than the second reference potential selected between the second and third potentials. The device is characterized by determining that an error has occurred when the detection results of the first and second potential detecting means do not match. When the detection results by the first and second potential detecting means included in the data receiving means do not match,
Judge that an error has occurred.

【0011】[0011]

【発明の実施の形態】図1は、本発明の前提となるデー
タ通信装置1の全体的構成を示すブロック図である。デ
ータ通信装置1は、1つのマスタ端末装置Mと、複数の
スレーブ端末装置S1〜Sn(総称するときは、参照符
Sを用いる)とを含んで構成される。端末装置M,S
は、通信ラインKによって接続されている。データ通信
装置1は、ISO9141(国際標準規格)に準拠した
通信方式が実施される。この通信方式は、いわゆるマス
タ・スレーブ方式であり、マスタ端末装置Mから複数の
スレーブ端末装置Sに対して要求データを送信し、各ス
レーブ端末装置Sは要求データを受信し、それぞれのス
レーブ端末装置Sがマスタ端末装置Mに対して応答デー
タを送信する方式である。マスタ端末装置Mからの要求
データの送信と、スレーブ端末装置Sからの応答データ
の送信とによって1サイクルの通常通信処理が構成され
る。
1 is a block diagram showing an overall configuration of a data communication apparatus 1 which is a premise of the present invention. The data communication device 1 is configured to include one master terminal device M and a plurality of slave terminal devices S1 to Sn (reference numeral S is used when collectively referred to). Terminal device M, S
Are connected by a communication line K. The data communication device 1 implements a communication method that complies with ISO9141 (International Standard). This communication system is a so-called master / slave system, in which request data is transmitted from the master terminal device M to a plurality of slave terminal devices S, each slave terminal device S receives the request data, and each slave terminal device S receives the request data. In this method, S transmits response data to the master terminal device M. The transmission of request data from the master terminal device M and the transmission of response data from the slave terminal device S constitute one cycle of normal communication processing.

【0012】スレーブ端末装置S1〜Snには、優先順
位が定められており、優先順位の上位のスレーブ端末装
置から順番にマスタ端末装置Mに対して応答データを送
信する。ここでは、参照符Sの添え字1〜nが優先順位
を表すものとする。端末装置M,Sは、待機状態では予
め定める第1の電位(ハイレベル)に設定されている通
信ラインKを、前記第1の電位より低い予め定める第2
および第3の電位(ローレベル)に引下げる手段を有
し、ハイレベルおよびローレベルを所定のタイミングで
切換えることによってビットデータを作成し、データを
送信する。予め定める数のビットデータによってバイト
データが構成され、さらに予め定める数のバイトデータ
によってメッセージデータが構成される。このメッセー
ジデータが、前記要求データおよび応答データに相当す
る。
The slave terminal devices S1 to Sn have a predetermined priority order, and the response data is transmitted to the master terminal device M in order from the slave terminal device having a higher priority. Here, the subscripts 1 to n of the reference symbol S represent the priority order. The terminal devices M and S set the communication line K, which is set to the predetermined first potential (high level) in the standby state, to the second predetermined lower than the first potential.
And a means for lowering the potential to a third potential (low level), and by switching the high level and the low level at a predetermined timing, bit data is created and the data is transmitted. Byte data is composed of a predetermined number of bit data, and message data is composed of a predetermined number of byte data. This message data corresponds to the request data and the response data.

【0013】図2は、端末装置M,Sの概略的構成を示
すブロック図である。端末装置M,Sは、制御回路2と
通信回路10とを含んで構成される。制御回路2は、主
制御部11と通信制御部12とを含んで構成される。主
制御部11は、実際は所望のアプリケーションプログラ
ム(制御ソフトウェア)で実現され、各端末装置に与え
られた処理を実行するとともに、通信制御部12との間
でコマンドおよびデータの授受を行う。通信制御部12
は、実際は所望のプログラム(通信ソフトウェア)で実
現され、通信回路10を介してコマンドおよびデータを
通信ラインKに送信し、また通信ラインKからのコマン
ドおよびデータを授受する。マスタ端末装置Mは、外部
から接続される図示しないテスタなどのデータ読出装置
に対して、要求されたデータを出力する。
FIG. 2 is a block diagram showing a schematic configuration of the terminal devices M and S. The terminal devices M and S are configured to include the control circuit 2 and the communication circuit 10. The control circuit 2 includes a main control unit 11 and a communication control unit 12. The main control unit 11 is actually realized by a desired application program (control software), executes the process given to each terminal device, and exchanges commands and data with the communication control unit 12. Communication control unit 12
Is actually realized by a desired program (communication software), transmits commands and data to the communication line K through the communication circuit 10, and transmits and receives commands and data from the communication line K. The master terminal device M outputs the requested data to a data reading device such as a tester (not shown) connected from the outside.

【0014】図2を参照して通信時の動作を簡単に説明
する。マスタ端末装置Mの主制御部11は、予め定める
タイミングで通信要求を通信制御部12に与える。通信
制御部12は、通信回路10を介して要求データを通信
ラインKに送出する。スレーブ端末装置Sの通信回路1
0は、要求データを受信して通信制御部12に与える。
通信制御部12は、受信した要求データに対応した応答
処理要求を主制御部11に与える。主制御部11は、与
えられた応答処理要求に応じた処理を実行し、処理結果
を通信制御部12に与える。通信制御部12は、処理結
果を通信回路10を介して応答データとして通信ライン
Kに送出する。応答データは、マスタ端末装置Mの通信
回路10によって実現され、通信制御部12に与えられ
る。通信制御部12は、前記通信要求に対する通信結果
を主制御部11に与える。これによって、1サイクルの
通信処理が完了する。
The operation during communication will be briefly described with reference to FIG. The main control unit 11 of the master terminal device M gives a communication request to the communication control unit 12 at a predetermined timing. The communication control unit 12 sends the request data to the communication line K via the communication circuit 10. Communication circuit 1 of slave terminal device S
0 receives the request data and gives it to the communication control unit 12.
The communication control unit 12 gives a response processing request corresponding to the received request data to the main control unit 11. The main control unit 11 executes a process according to the given response process request, and gives the process result to the communication control unit 12. The communication control unit 12 sends the processing result to the communication line K as response data via the communication circuit 10. The response data is realized by the communication circuit 10 of the master terminal device M and given to the communication control unit 12. The communication control unit 12 gives the communication result for the communication request to the main control unit 11. This completes one cycle of communication processing.

【0015】図3は、本発明の実施の一形態であり、端
末装置M,Sの通信回路10に関連する構成を示すブロ
ック図である。端末装置M,Sは、たとえばECUで実
現され、データの送信および受信、各種演算、各種制御
などを実行する制御回路2を含む。制御回路2は、マイ
クロコンピュータなどで実現され、2つのシリアルデー
タ入力端子Sin0,Sin1および2つのシリアルデ
ータ出力端子Sout0,Sout1を備える。
FIG. 3 is a block diagram showing a configuration relating to the communication circuit 10 of the terminal devices M and S, which is an embodiment of the present invention. The terminal devices M and S are implemented by, for example, an ECU, and include a control circuit 2 that executes data transmission and reception, various calculations, and various controls. The control circuit 2 is realized by a microcomputer or the like and includes two serial data input terminals Sin0 and Sin1 and two serial data output terminals Sout0 and Sout1.

【0016】端末装置M,Sは、通信ラインKを接続す
るための接続端子3を備える。通信ラインKには、デー
タ通信装置1の電源電位+Bが抵抗R1を介して印加さ
れ、予め定める第1の電位(ハイレベル)に設定され
る。通信ラインKは、この第1の電位が待機状態であ
る。接続端子3には、データ送信回路4を介してシリア
ルデータ出力端子Sout0,Sout1が接続され、
またデータ受信回路5を介してシリアルデータ入力端子
Sin0,Sin1が接続される。前述した通信回路1
0は、データ送信回路4およびデータ受信回路5を含ん
で構成される。
The terminal devices M and S have a connection terminal 3 for connecting the communication line K. The power supply potential + B of the data communication device 1 is applied to the communication line K via the resistor R1 and set to a predetermined first potential (high level). The first potential of the communication line K is in a standby state. Serial data output terminals Sout0 and Sout1 are connected to the connection terminal 3 via the data transmission circuit 4,
Further, serial data input terminals Sin0 and Sin1 are connected via the data receiving circuit 5. Communication circuit 1 described above
0 includes a data transmission circuit 4 and a data reception circuit 5.

【0017】データ受信回路4は、2つのスイッチ6,
7と抵抗R2とを含む。スイッチ6は、一方端子が接地
され、他方端子は抵抗R2を介して接続端子3(通信ラ
インK)に接続される。スイッチ6は、制御回路2のシ
リアルデータ出力端子Sout0からの信号によって開
閉が制御される。スイッチ6が閉じられると通信ライン
Kの電位は、第2の電位である+B・R2/(R1+R
2)に引下げられる。これによって、第1のデータが作
成されて送信される。スイッチ7は、一方端子が接地さ
れ、他方端子は接続端子3(通信ラインK)に接続され
る。スイッチ7は、制御回路2のシリアルデータ出力端
子Sout1からの信号によって開閉が制御される。ス
イッチ7が閉じられると、通信ラインKの電位は第3の
電位であるグランド電位に引下げられる。これによっ
て、第2のデータが作成されて送信される。
The data receiving circuit 4 includes two switches 6,
7 and resistor R2. The switch 6 has one terminal grounded and the other terminal connected to the connection terminal 3 (communication line K) via the resistor R2. The opening and closing of the switch 6 is controlled by a signal from the serial data output terminal Sout0 of the control circuit 2. When the switch 6 is closed, the potential of the communication line K is + B · R2 / (R1 + R) which is the second potential.
It is lowered to 2). Thereby, the first data is created and transmitted. The switch 7 has one terminal grounded and the other terminal connected to the connection terminal 3 (communication line K). The opening and closing of the switch 7 is controlled by a signal from the serial data output terminal Sout1 of the control circuit 2. When the switch 7 is closed, the potential of the communication line K is lowered to the ground potential which is the third potential. Thereby, the second data is created and transmitted.

【0018】データ受信回路5は、2つのコンパレータ
8,9と3つの抵抗R3,R4,R5とを含む。抵抗R
3,R4,R5は、この順序で電源電位+Bとグランド
電位との間に直列に接続される。抵抗R3と抵抗R4と
の接続点P1の電位は、+B・(R4+R5)/(R3
+R4+R5)となり、この電位が第1の基準電位とし
てコンパレータ8に与えられる。コンパレータ8には、
接続端子3(通信ラインK)が接続され、通信ラインK
の電位が前記第1の基準電位よりも高いか低いかを比較
し、比較結果を制御回路2のシリアルデータ入力端子S
in0に出力する。また抵抗R4と抵抗R5との接続点
P2の電位は、+B・R5/(R3+R4+R5)とな
り、この電位が第2の基準電位としてコンパレータ9に
与えられる。コンパレータ9には接続端子3(通信ライ
ンK)が接続され、通信ラインKの電位が前記第2の基
準電位よりも高いか低いかを比較し、比較結果を制御回
路2のシリアルデータ入力端子Sin1に出力する。制
御回路2は、シリアルデータ入力端子Sin0,Sin
1の入力状況に基づいて、第1のデータか第2のデータ
かを判別する。
The data receiving circuit 5 includes two comparators 8 and 9 and three resistors R3, R4 and R5. Resistance R
3, R4 and R5 are connected in series between the power supply potential + B and the ground potential in this order. The potential at the connection point P1 between the resistors R3 and R4 is + B · (R4 + R5) / (R3
+ R4 + R5), and this potential is given to the comparator 8 as the first reference potential. The comparator 8 has
The connection terminal 3 (communication line K) is connected, and the communication line K
Of the potential of the control circuit 2 is compared with the first reference potential, and the comparison result is compared with the serial data input terminal S of the control circuit 2.
Output to in0. The potential at the connection point P2 between the resistors R4 and R5 is + B · R5 / (R3 + R4 + R5), and this potential is given to the comparator 9 as the second reference potential. A connection terminal 3 (communication line K) is connected to the comparator 9, which compares whether the potential of the communication line K is higher or lower than the second reference potential, and the comparison result is the serial data input terminal Sin1 of the control circuit 2. Output to. The control circuit 2 has serial data input terminals Sin0 and Sin.
Based on the input status of 1, it is determined whether it is the first data or the second data.

【0019】図4は、メッセージデータの構成例を示す
タイムチャートである。メッセージデータは、要求デー
タおよび応答データに相当する。メッセージデータは、
複数のバイトデータSOM,D1〜Dn,EOMで構成
される。バイトデータSOMは、メッセージデータの開
始を示すデータである。バイトデータD1〜Dnは、実
際に送信すべきデータである。バイトデータEOMは、
メッセージデータの終了を示すデータである。通常通信
処理におけるメッセージデータは、第1の電位および第
2の電位で形成される第1のデータを使用して送信され
る。
FIG. 4 is a time chart showing an example of the structure of message data. The message data corresponds to request data and response data. The message data is
It is composed of a plurality of byte data SOM, D1 to Dn, and EOM. The byte data SOM is data indicating the start of message data. The byte data D1 to Dn are data to be actually transmitted. The byte data EOM is
It is data indicating the end of the message data. Message data in the normal communication process is transmitted using the first data formed by the first potential and the second potential.

【0020】図5は、データ通信装置1で使用されるデ
ータの波形図である。図5(1)は、第1のデータの波
形図である。第1のデータは、第1の電位V1(=+
B)と第2の電位V2とを所定のタイミングで切換える
ことによって作成される。基準電位Vth1は、コンパ
レータ8の基準電位であり、基準電位Vth2はコンパ
レータ9の基準電位である。コンパレータ8は、基準電
位Vth1が第1の電位V1と第2の電位V2との間に
選ばれているため、通信ラインKの電位が第1の電位V
1と第2の電位V2との間で切換わるたびに、電位の高
低を検出し、検出結果をシリアルデータ入力端子Sin
0,Sin1に出力する。コンパレータ9は、基準電位
Vth2が電位V2よりも低く選ばれているため、常に
通信ラインKの電位が高いことを検出し、検出結果をシ
リアルデータ入力端子Sin1に出力する。制御回路2
は、2つの検出結果に基づいて第1のデータであること
を認識する。
FIG. 5 is a waveform diagram of data used in the data communication device 1. FIG. 5A is a waveform diagram of the first data. The first data is the first potential V1 (= +
It is created by switching between B) and the second potential V2 at a predetermined timing. The reference potential Vth1 is the reference potential of the comparator 8, and the reference potential Vth2 is the reference potential of the comparator 9. In the comparator 8, since the reference potential Vth1 is selected between the first potential V1 and the second potential V2, the potential of the communication line K is the first potential Vth.
Each time the voltage is switched between 1 and the second potential V2, the level of the potential is detected, and the detection result is the serial data input terminal Sin.
0, output to Sin1. Since the reference potential Vth2 is selected lower than the potential V2, the comparator 9 always detects that the potential of the communication line K is high and outputs the detection result to the serial data input terminal Sin1. Control circuit 2
Recognizes that it is the first data based on the two detection results.

【0021】図5(2)は、第2のデータの波形図であ
る。第2のデータは、第1の電位V1と第3の電位V3
(=グランド電位)との間で所定のタイミングで切換え
ることによって作成される。第1の電位V1は、基準電
位Vth1,Vth2よりも高く選ばれ、第3の電位V
3は基準電位Vth1,Vth2よりも低く選ばれてい
るため、コンパレータ8,9は第1の電位V1と第3の
電位V3とが切換わるたびに、それぞれ電位の高低を検
出し、かつ検出結果は同一である。検出結果は制御回路
2のシリアルデータ入力端子Sin0,Sin1にそれ
ぞれ与えられる。制御回路2は、2つの検出結果が一致
していることによって第2のデータであることを認識す
る。
FIG. 5B is a waveform diagram of the second data. The second data is the first potential V1 and the third potential V3.
It is created by switching to (= ground potential) at a predetermined timing. The first potential V1 is selected higher than the reference potentials Vth1 and Vth2, and the third potential Vth is selected.
Since 3 is selected lower than the reference potentials Vth1 and Vth2, the comparators 8 and 9 detect the high and low potentials each time the first potential V1 and the third potential V3 are switched, and the detection result is obtained. Are the same. The detection results are given to the serial data input terminals Sin0 and Sin1 of the control circuit 2, respectively. The control circuit 2 recognizes that it is the second data because the two detection results match.

【0022】図5(3)は、第1のデータと第2のデー
タとが重なったときの波形図である。第1のデータと第
2のデータとが重なった場合、通信ラインKは電位の低
い方に引下げられるので、2点鎖線で示すように第1の
データは壊れるが、第2のデータはその一部が壊れるだ
けであり、コンパレータ8,9の検出動作には影響はな
く、制御回路2は第2のデータを正確に受信することが
できる。
FIG. 5C is a waveform diagram when the first data and the second data overlap each other. When the first data and the second data overlap, the communication line K is pulled down to a lower potential, so that the first data is destroyed as shown by the chain double-dashed line, but the second data is Only the part is broken, the detection operation of the comparators 8 and 9 is not affected, and the control circuit 2 can accurately receive the second data.

【0023】図6は、制御回路2のデータ受信時の処理
を示すフローチャートである。ステップa1では、シリ
アルデータ入力端子Sin1に割込みがあったかどうか
を判断する。割込みがあった場合は第2のデータが受信
されたと判断する。割込みがなければステップa2に進
み、シリアルデータ入力端子Sin0に割込みがあった
かどうかを判断する。割込みがあった場合は第1のデー
タを受信したと判断し、割込みがなければデータを受信
していないと判断する。
FIG. 6 is a flow chart showing the processing when the control circuit 2 receives data. At step a1, it is determined whether or not there is an interrupt at the serial data input terminal Sin1. If there is an interrupt, it is determined that the second data has been received. If there is no interrupt, the process proceeds to step a2, and it is determined whether or not there is an interrupt at the serial data input terminal Sin0. If there is an interrupt, it is determined that the first data has been received, and if there is no interrupt, it is determined that the data has not been received.

【0024】図7は、データ通信装置1が行う第1の通
信動作を示すタイムチャートである。図7(1)は通信
ラインK上の電位の変化を示し、図7(2)はマスタ端
末装置Mから送信されるデータを示し、図7(3)〜
(6)はスレーブ端末装置S1〜S4がそれぞれ送信す
るデータを示す。通常通信処理では、マスタ端末装置M
からの要求データに基づき、スレーブ端末装置S1〜S
4がそれぞれその優先順位に従って順番に前記要求デー
タに対応する応答データを送信する。
FIG. 7 is a time chart showing the first communication operation performed by the data communication apparatus 1. 7 (1) shows changes in the potential on the communication line K, FIG. 7 (2) shows data transmitted from the master terminal device M, and FIG.
(6) shows the data transmitted by each of the slave terminal devices S1 to S4. In the normal communication process, the master terminal device M
Based on the request data from the slave terminal devices S1 to S
4 sequentially transmits response data corresponding to the request data in accordance with the priority order.

【0025】しかしながらここでたとえばスレーブ端末
装置S4においてエラー等が発生し、通常通信処理より
も優先度の高い割込データ、たとえばエラー信号を送信
するための割込通信を行う必要がある場合、スレーブ端
末装置S4はスレーブ端末装置S2の応答データの送信
途中であっても、図7(6)に示すように割込通信を開
始する。これによって、図7(1)に示すように通信ラ
インKではスレーブ端末装置S2からの応答データとス
レーブ端末装置S4からの割込通信データとが重なり合
い、各端末装置では2つのデータの衝突によってオーバ
ーランエラーまたはフレーミングエラーが発生し、その
エラーによってマスタ端末装置Mでは受信割込みが発生
する。
However, if an error or the like occurs in the slave terminal device S4 and interrupt data having a higher priority than the normal communication process, for example, interrupt communication for transmitting an error signal is required, the slave The terminal device S4 starts the interrupt communication as shown in FIG. 7 (6) even while the response data of the slave terminal device S2 is being transmitted. As a result, as shown in FIG. 7A, in the communication line K, the response data from the slave terminal device S2 and the interrupt communication data from the slave terminal device S4 overlap each other, and each terminal device is overrun due to the collision of two data. A run error or a framing error occurs, and the error causes a reception interrupt in the master terminal device M.

【0026】マスタ端末装置Mでは受信割込みが発生し
た時点で通常通信処理におけるスレーブ端末装置から送
信された応答データをすべて消去し、割込通信の終了を
監視し、割込通信が終了したことを確認した後に中断さ
れた通常通信処理を再開するために改めて要求データ
(再要求データ)を送信する。割込通信が終了したかど
うかは、通信ラインKが一定期間待機状態で継続する時
間であるバスアイドル時間が予め定める期間以上継続し
たこと、あるいは割込通信の終了を示すストップメッセ
ージデータを受信したことに基づいて判断する。
When the reception interrupt occurs, the master terminal device M erases all the response data transmitted from the slave terminal device in the normal communication process, monitors the end of the interrupt communication, and confirms that the interrupt communication is completed. After the confirmation, the request data (re-request data) is transmitted again in order to restart the interrupted normal communication process. Whether or not the interrupt communication is completed is determined by the fact that the bus idle time, which is the time during which the communication line K is kept in the standby state for a certain period, has continued for a predetermined period or more, or the stop message data indicating the completion of the interrupt communication is received. Make decisions based on that.

【0027】図8は、第1の通信動作におけるマスタ端
末装置Mの動作を説明するフローチャートである。ステ
ップb1では、通信制御部12が、主制御部11からの
通信要求を受信したかどうかを判断する。通信要求を受
信した場合はステップb2に進み、通信制御部12によ
る通信が開始される。すなわち通信初期状態に設定され
る。ステップb3では、シリアルデータ入力端子Sin
1に割込通信があるかどうかを判断する。割込通信があ
れば後述するステップb8に進み、割込通信がなければ
ステップb4に進む。
FIG. 8 is a flow chart for explaining the operation of the master terminal device M in the first communication operation. In step b1, the communication control unit 12 determines whether or not the communication request from the main control unit 11 has been received. When the communication request is received, the process proceeds to step b2, and the communication control unit 12 starts the communication. That is, the communication initial state is set. At step b3, the serial data input terminal Sin
1 determines whether there is an interrupt communication. If there is an interrupt communication, the process proceeds to step b8 described later, and if there is no interrupt communication, the process proceeds to step b4.

【0028】ステップb4では、エラーが発生している
かどうかを判断する。エラーが発生していればステップ
b2に戻り通信をやり直す。エラーが発生していなけれ
ばステップb5に進み、通信処理を実行する。すなわ
ち、所定の要求データを送信し、またはスレーブ端末装
置Sからの応答データを受信する。応答データの受信
は、シリアルデータ入力端子Sin0を用いて行う。
At step b4, it is judged whether or not an error has occurred. If an error has occurred, the process returns to step b2 to perform communication again. If no error has occurred, the process proceeds to step b5 to execute the communication process. That is, predetermined request data is transmitted, or response data from the slave terminal device S is received. The response data is received using the serial data input terminal Sin0.

【0029】ステップb6では、通信処理が終了したか
どうかを判断する。終了していなければステップb3に
戻り、通信処理を続行する。通信処理が終了した場合は
ステップb7に進み、主制御部11に受信した応答デー
タを引き渡し、処理を終了する。
At step b6, it is judged whether or not the communication processing is completed. If not completed, the process returns to step b3 to continue the communication process. When the communication process is completed, the process proceeds to step b7, the received response data is delivered to the main control unit 11, and the process is completed.

【0030】ステップb8では、エラーが発生している
かどうかを判断する。エラーが発生していればステップ
b2に戻り通信をやり直す。エラーが発生していなけれ
ばステップb9に進み、割込通信処理を実行する。すな
わち、割込処理が発生したスレーブ端末装置Sからの要
求データを受信し、またはその要求データに対応した応
答データの送信を行う。ここでの要求データの受信はシ
リアルデータ入力端子Sin0を用いて行う。ステップ
b10では、通信処理が終了したかどうかを判断する。
終了していなければステップb8に戻り、割込通信処理
を続行する。通信処理が終了した場合はステップb2に
戻り、通常の通信処理をやり直す。
At step b8, it is judged whether or not an error has occurred. If an error has occurred, the process returns to step b2 to perform communication again. If no error has occurred, the process proceeds to step b9 to execute the interrupt communication process. That is, the request data from the slave terminal device S in which the interrupt processing has occurred is received, or the response data corresponding to the request data is transmitted. The reception of the request data here is performed using the serial data input terminal Sin0. At step b10, it is determined whether or not the communication process is completed.
If not completed, the process returns to step b8 to continue the interrupt communication process. When the communication process is completed, the process returns to step b2 and the normal communication process is performed again.

【0031】図9は、第1の通信動作におけるスレーブ
端末装置Sの動作を説明するフローチャートである。本
フローチャートは、前述の割込通信処理におけるスレー
ブ端末装置として動作する場合を説明する。ステップc
1では、シリアルデータ入力端子Sin0からの通信を
受信したかどうかを判断する。通信を受信した場合はス
テップc2に進む。ステップc2では、シリアルデータ
入力端子Sin1からの割込通信を受信したかどうかを
判断する。割込通信を受信した場合は後述するステップ
c6に進む。割込通信を受信していない場合はステップ
c3に進む。
FIG. 9 is a flow chart for explaining the operation of the slave terminal device S in the first communication operation. This flowchart describes a case where the device operates as a slave terminal device in the interrupt communication process described above. Step c
At 1, it is determined whether communication from the serial data input terminal Sin0 has been received. When the communication is received, the process proceeds to step c2. At step c2, it is judged whether or not the interrupt communication from the serial data input terminal Sin1 is received. When the interrupt communication is received, the process proceeds to step c6 described later. If no interrupt communication is received, the process proceeds to step c3.

【0032】ステップc3ではエラーが発生しているか
どうかを判断する。エラーが発生していればステップc
1に戻る。エラーが発生していなければステップc4に
進み、通信処理を実行する。すなわち、マスタ端末装置
からの要求データを受信し、またはその要求データに対
応した応答データを送信する。要求データの受信は、シ
リアルデータ入力端子Sin0を用いて行う。ステップ
c5では、通信処理が終了したかどうかを判断する。終
了していなければステップc2に戻り通信処理を実行す
る。通信処理が終了した場合は処理を終了する。
At step c3, it is judged whether or not an error has occurred. If an error has occurred, step c
Return to 1. If no error has occurred, the process proceeds to step c4 to execute the communication process. That is, the request data from the master terminal device is received, or the response data corresponding to the request data is transmitted. Request data is received using the serial data input terminal Sin0. At step c5, it is determined whether or not the communication process is completed. If not completed, the process returns to step c2 to execute the communication process. When the communication processing is completed, the processing is ended.

【0033】ステップc6では、エラーが発生している
かどうかを判断する。エラーが発生していればステップ
c1に戻る。エラーが発生していなければステップc7
に進み、割込通信処理を実行する。すなわち他のスレー
ブ端末装置からの要求データを受信し、または要求デー
タに対応した応答データの送信を行う。ここでの要求デ
ータの受信は、シリアルデータ入力端子Sin1を用い
て行う。ステップc8では、通信処理が終了したかどう
かを判断する。終了していなければステップc6に戻り
割込通信処理を続行する。通信処理が終了した場合はス
テップc1に戻り、通常の通信処理を再開する。
At step c6, it is judged whether or not an error has occurred. If an error has occurred, the process returns to step c1. If no error has occurred, step c7
Then, the interrupt communication process is executed. That is, the request data from another slave terminal device is received, or the response data corresponding to the request data is transmitted. The reception of the request data here is performed using the serial data input terminal Sin1. At step c8, it is determined whether or not the communication process is completed. If not completed, the process returns to step c6 to continue the interrupt communication process. When the communication process is completed, the process returns to step c1 to resume the normal communication process.

【0034】図10は、第1の通信動作におけるスレー
ブ端末装置Sの別の動作を説明するフローチャートであ
る。本フローチャートは、割込処理が発生したスレーブ
端末装置、すなわち割込通信処理においてマスタ端末装
置として動作する場合を説明する。ステップd1では、
シリアルデータ入力端子Sin0からの通信を受信した
かどうかを判断する。通信を受信した場合はステップd
2に進み、主制御部11からの割込通信要求を受信した
かどうかを判断する。割込通信要求を受信した場合は後
述するステップd6に進む。割込通信要求を受信してい
ない場合はステップd3に進む。
FIG. 10 is a flow chart for explaining another operation of the slave terminal device S in the first communication operation. This flowchart describes a case where a slave terminal device in which an interrupt process has occurred, that is, a slave terminal device that operates as a master terminal device in an interrupt communication process. In step d1,
It is determined whether or not the communication from the serial data input terminal Sin0 is received. If communication is received, step d
In step 2, it is determined whether the interrupt communication request from the main control unit 11 has been received. When the interrupt communication request is received, the process proceeds to step d6 described later. If the interrupt communication request has not been received, the process proceeds to step d3.

【0035】ステップd3では、エラーが発生している
かどうかを判断する。エラーが発生していればステップ
d1に戻り、エラーが発生していなければステップd4
に進み、通信処理を実行する。すなわち、マスタ端末装
置Mからの要求データを受信し、またはその要求データ
に対応した応答データを送信する。ここでの要求データ
の受信は、シリアルデータ入力端子Sin0を用いて行
う。ステップd5では、通信処理が終了したかどうかを
判断する。終了していなければステップd2に戻り、通
信処理を続行する。通信処理が終了した場合は処理を終
了する。
At step d3, it is judged whether or not an error has occurred. If an error has occurred, the process returns to step d1, and if no error has occurred, step d4.
Then, the communication process is executed. That is, the request data from the master terminal device M is received, or the response data corresponding to the request data is transmitted. The reception of the request data here is performed using the serial data input terminal Sin0. At step d5, it is determined whether the communication process is completed. If not completed, the process returns to step d2 to continue the communication process. When the communication processing is completed, the processing is ended.

【0036】ステップd6では、通信制御部12は、前
述した主制御部11からの割込通信要求に基づいて割込
通信を開始する。すなわち割込通信のための通信初期状
態に設定する。ステップd7では、エラーが発生してい
るかどうかを判断する。エラーが発生していればステッ
プd6に戻り、割込通信処理をやり直す。エラーが発生
していなければステップd8に進み、割込通信処理を実
行する。すなわち、要求データを送信し、または応答デ
ータを受信する。ここでの応答データの受信は、シリア
ルデータ入力端子Sin1を用いて行う。ステップd9
では、割込通信処理を続行する。通信処理が終了した場
合は、ステップd10に進み、主制御部11に受信した
応答データを引き渡し、その後ステップd1に戻り、通
常通信処理を再開する。
At step d6, the communication controller 12 starts the interrupt communication based on the interrupt communication request from the main controller 11 described above. That is, the communication initial state for interrupt communication is set. In step d7, it is determined whether an error has occurred. If an error has occurred, the process returns to step d6 to redo the interrupt communication process. If no error has occurred, the process proceeds to step d8 to execute the interrupt communication process. That is, request data is transmitted or response data is received. The reception of the response data here is performed using the serial data input terminal Sin1. Step d9
Then, the interrupt communication process is continued. When the communication process is completed, the process proceeds to step d10, the received response data is delivered to the main control unit 11, and then the process returns to step d1 to restart the normal communication process.

【0037】図11は、本発明の実施の他の形態を説明
するためのブロック図である。本発明の実施の形態で用
いられる端末装置M,Sは、制御回路2が割込入力端子
ASR0を有しており、当該入力端子ASR0には、シ
リアルデータ入力端子Sin1に与えられる信号が同様
に与えられている。制御回路2は、入力端子ASR0に
割込があったと判断したときは、実行している通信処理
を中断し、中断したときの状態(処理に必要なパラメー
タなど)を記憶しておき、割込通信処理が終了したとき
は、中断した状態から通常通信処理を再開する。
FIG. 11 is a block diagram for explaining another embodiment of the present invention. In the terminal devices M and S used in the embodiment of the present invention, the control circuit 2 has an interrupt input terminal ASR0, and a signal applied to the serial data input terminal Sin1 is also supplied to the input terminal ASR0. Has been given. When the control circuit 2 determines that there is an interrupt at the input terminal ASR0, it interrupts the communication process being executed, stores the state at the time of interruption (parameters necessary for the process, etc.), and interrupts it. When the communication process is completed, the normal communication process is resumed from the suspended state.

【0038】図12は、本発明の実施の他の形態におけ
るデータ通信装置が行う第2の通信処理を示すタイムチ
ャートである。マスタ端末装置Mからの要求データに対
する応答データの送信が行われているときに、たとえば
スレーブ端末装置S2からの応答データが通信ラインK
に送出されているときに、スレーブ端末装置S4からの
割込通信処理が割込んだときは、その割込通信処理が割
込んだときの状態を各端末装置は記憶しておき、割込通
信処理が終了した後に、中断した状態から通常通信処理
を再開する。すなわちスレーブ端末装置S2は、中断し
たとき以降のデータの送信を再開し、その後残りの端末
装置S3,S4は順番に応答データを送出する。
FIG. 12 is a time chart showing a second communication process performed by the data communication apparatus according to another embodiment of the present invention. While the response data to the request data from the master terminal device M is being transmitted, the response data from, for example, the slave terminal device S2 is transmitted on the communication line K.
When the interrupt communication process from the slave terminal device S4 is interrupted while being sent to each terminal device, each terminal device stores the state at the time when the interrupt communication process interrupts the interrupt communication process. After the processing is completed, the normal communication processing is restarted from the interrupted state. That is, the slave terminal device S2 resumes data transmission after the interruption, and then the remaining terminal devices S3 and S4 sequentially send response data.

【0039】図13は、第2の通信動作におけるマスタ
端末装置Mの動作を説明するフローチャートである。ス
テップb21では、通信制御部12が主制御部11から
の通信要求を受信したかどうかを判断する。通信要求を
受信した場合はステップb22に進み、通信制御部12
による通信が開始される。すなわち通信初期状態に設定
される。ステップb23では、割込入力端子ASR0に
割込があるかどうかを判断する。割込がある場合は後述
するステップb28に進み、割込がない場合はステップ
b24に進む。
FIG. 13 is a flow chart for explaining the operation of the master terminal device M in the second communication operation. In step b21, it is determined whether the communication control unit 12 has received the communication request from the main control unit 11. When the communication request is received, the process proceeds to step b22 and the communication control unit 12
Communication is started. That is, the communication initial state is set. At step b23, it is determined whether or not the interrupt input terminal ASR0 has an interrupt. If there is an interrupt, the process proceeds to step b28 described below, and if there is no interrupt, the process proceeds to step b24.

【0040】ステップb24では、エラーが発生してい
るかどうかを判断する。エラーが発生していればステッ
プb22に戻り、通信をやり直す。エラーが発生してい
なければステップb25に進み、通信処理を実行する。
すなわち、要求データを送信し、または応答データを受
信する。ここでの応答データの受信は、シリアルデータ
入力端子Sin0を用いて行う。ステップb26では、
通信処理が終了したかどうかを判断する。終了していな
ければステップb23に進み、通信処理を続行する。通
信処理が終了した場合はステップb27に進み、主制御
部11に受信した応答データを引き渡し、処理を終了す
る。
At step b24, it is judged whether or not an error has occurred. If an error has occurred, the process returns to step b22 and communication is retried. If no error has occurred, the process proceeds to step b25 to execute the communication process.
That is, request data is transmitted or response data is received. The reception of the response data here is performed using the serial data input terminal Sin0. At step b26,
It is determined whether the communication processing is completed. If not completed, the process proceeds to step b23 to continue the communication process. When the communication process is completed, the process proceeds to step b27, the received response data is delivered to the main control unit 11, and the process is completed.

【0041】ステップb28では、通常通信処理を中断
し、シリアルデータ入力端子Sin0の入力を無効とす
る。ステップb29では、エラーが発生しているかどう
かを判断する。エラーが発生していればステップb32
に進み、中断した通信処理を復帰させ、前述したステッ
プb24に戻る。エラーが発生していなければステップ
b30に進み、割込通信処理を実行する。すなわち、要
求データを受信し、または応答データを送信する。ここ
での要求データの受信は、シリアルデータ入力端子Si
n1を用いて行う。ステップb31では、通信処理が終
了したかどうかを判断する。終了していなければステッ
プb29に進み、通信処理を続行する。通信処理が終了
した場合はステップb32に進み、前述したステップb
28で中断した通信処理を復帰させ、前述のステップb
24に戻り、通常通信処理を再開する。
At step b28, the normal communication process is interrupted and the input to the serial data input terminal Sin0 is invalidated. In step b29, it is determined whether an error has occurred. If an error has occurred, step b32
Then, the interrupted communication process is restored, and the process returns to step b24 described above. If no error has occurred, the process proceeds to step b30 to execute the interrupt communication process. That is, the request data is received or the response data is transmitted. The request data is received at the serial data input terminal Si.
n1 is used. At step b31, it is determined whether or not the communication process is completed. If not completed, the process proceeds to step b29 to continue the communication process. When the communication processing is completed, the process proceeds to step b32 and the above-mentioned step b
The communication processing interrupted in step 28 is restored, and the above-mentioned step b
Returning to 24, the normal communication process is restarted.

【0042】図14は、第2の通信動作におけるスレー
ブ端末装置Sの動作を説明するフローチャートである。
本フローチャートは、通常通信処理および割込通信処理
において共にスレーブ端末装置として動作する場合を説
明する。ステップc21では、シリアルデータ入力端子
Sin0からの通信を受信したかどうかを判断する。通
信を受信した場合はステップc22に進み、割込入力端
子ASR0に割込があるかどうかを判断する。割込があ
る場合は後述するステップc26に進み、割込がない場
合はステップc23に進む。
FIG. 14 is a flow chart for explaining the operation of the slave terminal device S in the second communication operation.
This flowchart describes a case where both the normal communication process and the interrupt communication process operate as a slave terminal device. At step c21, it is judged whether or not the communication from the serial data input terminal Sin0 is received. When the communication is received, the process proceeds to step c22, and it is determined whether the interrupt input terminal ASR0 has an interrupt. If there is an interrupt, the process proceeds to step c26 described below, and if there is no interrupt, the process proceeds to step c23.

【0043】ステップc23では、エラーが発生してい
るかどうかを判断する。エラーが発生していればステッ
プc21に戻り、通常通信処理をやり直す。エラーが発
生していなければステップc24に進み、通信処理を実
行する。すなわち、要求データを受信し、または応答デ
ータを送信する。ここでの要求データの受信は、シリア
ルデータ入力端子Sin0を用いて行う。ステップc2
5では、通信処理が終了したかどうかを判断する。終了
していなければステップc22に進み、通常通信処理を
続行する。通信処理が終了した場合は処理を終了する。
At step c23, it is judged whether or not an error has occurred. If an error has occurred, the process returns to step c21 and the normal communication process is performed again. If no error has occurred, the process proceeds to step c24 to execute the communication process. That is, the request data is received or the response data is transmitted. The reception of the request data here is performed using the serial data input terminal Sin0. Step c2
At 5, it is determined whether the communication processing is completed. If not completed, the process proceeds to step c22 to continue the normal communication process. When the communication processing is completed, the processing is ended.

【0044】ステップc26では、通常通信処理を中断
し、シリアルデータ入力端子Sin0を無効とする。ス
テップc27では、エラーが発生しているかどうかを判
断する。エラーが発生していればステップc30に進
み、中断した通信処理を復帰させ、前述のステップc2
3に戻り通常通信処理を再開する。エラーが発生してい
なければステップc28に進み、割込通信処理を実行す
る。すなわち、要求データを受信し、または応答データ
を送信する。ここでの要求データの受信は、シリアルデ
ータ入力端子Sin1を用いて行う。ステップc29で
は、通信処理が終了したかどうかを判断する。終了して
いなければステップc27に進み、割込通信処理を続行
する。通信処理が終了した場合はステップc30に進
み、中断した通信処理を復帰させ、ステップc23に戻
り、通常通信処理を再開する。
At step c26, the normal communication process is interrupted and the serial data input terminal Sin0 is made invalid. At step c27, it is judged whether or not an error has occurred. If an error has occurred, the process proceeds to step c30, the interrupted communication process is restored, and the above-described step c2 is performed.
Returning to step 3, the normal communication process is restarted. If no error has occurred, the process proceeds to step c28 to execute the interrupt communication process. That is, the request data is received or the response data is transmitted. The reception of the request data here is performed using the serial data input terminal Sin1. In step c29, it is determined whether or not the communication process is completed. If not completed, the process proceeds to step c27 to continue the interrupt communication process. When the communication process is completed, the process proceeds to step c30, the interrupted communication process is restored, the process returns to step c23, and the normal communication process is restarted.

【0045】図15は、第2の通信動作におけるスレー
ブ端末装置Sの他の動作を説明するフローチャートであ
る。本フローチャートは、通常通信処理ではスレーブ端
末装置として、割込通信処理ではマスタ端末装置として
動作する場合を説明する。ステップd21では、シリア
ルデータ入力端子Sin0からの通信を受信したかどう
かを判断する。通信を受信した場合はステップd22に
進み、主制御部11からの割込通信要求があるかどうか
を判断する。割込通信要求がある場合は後述するステッ
プd26に進み、割込通信要求がない場合はステップd
23に進む。
FIG. 15 is a flow chart for explaining another operation of the slave terminal device S in the second communication operation. This flowchart describes a case where the normal communication process operates as a slave terminal device and the interrupt communication process operates as a master terminal device. At step d21, it is judged whether or not the communication from the serial data input terminal Sin0 is received. When the communication is received, the process proceeds to step d22, and it is determined whether or not there is an interrupt communication request from the main control unit 11. If there is an interrupt communication request, the process proceeds to step d26 described later, and if there is no interrupt communication request, step d26.
Proceed to 23.

【0046】ステップd23では、エラーが発生してい
るかどうかを判断する。エラーが発生していればステッ
プd21に戻り、通常通信処理をやり直す。エラーが発
生していなければステップd24に進み、通信処理を実
行する。すなわち、要求データを受信し、または応答デ
ータを送信する。ここでの要求データの受信は、シリア
ルデータ入力端子Sin0を用いて行う。ステップd2
5では、通信処理が終了したかどうかを判断する。終了
していなければステップd22に戻り、通常通信処理を
続行する。通信処理が終了した場合は処理を終了する。
At step d23, it is judged whether or not an error has occurred. If an error has occurred, the process returns to step d21 and the normal communication process is performed again. If no error has occurred, the process proceeds to step d24 to execute the communication process. That is, the request data is received or the response data is transmitted. The reception of the request data here is performed using the serial data input terminal Sin0. Step d2
At 5, it is determined whether the communication processing is completed. If not completed, the process returns to step d22 to continue the normal communication process. When the communication processing is completed, the processing is ended.

【0047】ステップd26では、通常通信処理を中断
し、データ入力端子Sin0を無効とする。ステップd
27では、割込通信処理が開始される。すなわち割込通
信のための通信初期状態に設定される。ステップd28
では、エラーが発生しているかどうかを判断する。エラ
ーが発生していればステップd32に進み、中断した通
常通信処理を復帰させ、ステップd23に進み、通常通
信処理を再開する。エラーが発生していなければステッ
プd29に進み、割込通信処理を実行する。すなわち、
要求データを送信し、または応答データを受信する。こ
こでの応答データの受信は、シリアルデータ入力端子S
in1を用いて行う。
At step d26, the normal communication process is interrupted and the data input terminal Sin0 is made invalid. Step d
At 27, the interrupt communication process is started. That is, the communication initial state for interrupt communication is set. Step d28
Then, determine whether an error has occurred. If an error has occurred, the process proceeds to step d32, the interrupted normal communication process is restored, and the process proceeds to step d23 to restart the normal communication process. If no error has occurred, the process proceeds to step d29 to execute the interrupt communication process. That is,
Send request data or receive response data. Reception of the response data here is performed by the serial data input terminal S
This is done using in1.

【0048】ステップd30では、通信処理が終了した
かどうかを判断する。通信処理が終了していなければス
テップd28に戻り、割込通信処理を続行する。通信処
理が終了した場合はステップd31に進み、主制御部1
1に受信した応答データを引き渡し、ステップd32に
進む。その後前述と同様に中断した通常通信処理を復帰
させ、ステップd23に進み、通常通信処理を再開す
る。
At step d30, it is determined whether or not the communication processing is completed. If the communication process is not completed, the process returns to step d28 to continue the interrupt communication process. When the communication processing is completed, the process proceeds to step d31, and the main control unit 1
The received response data is delivered to 1, and the process proceeds to step d32. Thereafter, similarly to the above, the interrupted normal communication process is restored, the process proceeds to step d23, and the normal communication process is restarted.

【0049】図16、図17および図18は、本発明の
実施のさらに他の形態を説明するフローチャートであ
る。本発明の実施のさらに他の形態で行われる第3の通
信動作は、通常通信処理はシリアルデータ入力端子Si
n0を用いて行い、割込通信処理の最初のバイトデータ
のみをシリアルデータ入力端子Sin1を用いて行い、
それ以降のデータはシリアルデータ入力端子Sin0を
用いて行うことが特徴である。これによって、割込通信
処理の実行中にさらに優先される割込通信処理を実行す
る必要がある場合であっても何ら支障なく通信処理を実
行することができる。
16, 17, and 18 are flowcharts for explaining still another embodiment of the present invention. In the third communication operation performed in still another embodiment of the present invention, the normal communication process is the serial data input terminal Si.
n0, only the first byte data of the interrupt communication process is performed using the serial data input terminal Sin1,
The subsequent data is characterized by using the serial data input terminal Sin0. As a result, even if it is necessary to execute the interrupt communication process that is prioritized during execution of the interrupt communication process, the communication process can be executed without any trouble.

【0050】図16は、第3の通信動作におけるマスタ
端末装置Mの動作を説明するフローチャートである。ス
テップb41では、通信制御部12が主制御部11から
の通信要求を受信したかどうかを判断する。通信要求を
受信した場合はステップb42に進み、通信制御部12
による通信が開始される。すなわち通信初期状態に設定
される。ステップb43では、割込入力端子ASR0に
割込があるかどうかを判断する。割込がある場合は後述
するステップb48に進み、割込がない場合はステップ
b44に進む。
FIG. 16 is a flow chart for explaining the operation of the master terminal device M in the third communication operation. In step b41, it is determined whether the communication control unit 12 has received the communication request from the main control unit 11. When the communication request is received, the process proceeds to step b42 and the communication control unit 12
Communication is started. That is, the communication initial state is set. At step b43, it is determined whether or not the interrupt input terminal ASR0 has an interrupt. If there is an interrupt, the process proceeds to step b48 described later, and if there is no interrupt, the process proceeds to step b44.

【0051】ステップb44では、エラーが発生してい
るかどうかを判断する。エラーが発生していればステッ
プb42に戻り、通信をやり直す。エラーが発生してい
なければステップb45に進み、通信処理を実行する。
すなわち、要求データを送信し、または応答データを受
信する。ここでの応答データの受信は、シリアルデータ
入力端子Sin0を用いて行う。ステップb46では、
通信処理が終了したかどうかを判断する。通信処理が終
了していなければステップb43に戻り、通信処理を続
行する。通信処理が終了した場合はステップb47に進
み、主制御部11に受信した応答データを引き渡し、処
理を終了する。
At step b44, it is judged whether or not an error has occurred. If an error has occurred, the process returns to step b42 and communication is retried. If no error has occurred, the process proceeds to step b45 to execute the communication process.
That is, request data is transmitted or response data is received. The reception of the response data here is performed using the serial data input terminal Sin0. In step b46,
It is determined whether the communication processing is completed. If the communication process is not completed, the process returns to step b43 to continue the communication process. When the communication process is completed, the process proceeds to step b47, the received response data is delivered to the main control unit 11, and the process is completed.

【0052】ステップb48では、通常通信処理を中断
し、シリアルデータ入力端子Sin0を無効とする。ス
テップb49では、エラーが発生しているかどうかを判
断する。エラーが発生していればステップb55に進
み、中断した通常通信処理を復帰させ、ステップb44
に戻り、通常通信処理を再開する。エラーが発生してい
なければステップb50に進む。
At step b48, the normal communication process is interrupted and the serial data input terminal Sin0 is made invalid. In step b49, it is determined whether an error has occurred. If an error occurs, the process proceeds to step b55, the interrupted normal communication process is restored, and step b44
Then, the normal communication process is restarted. If no error has occurred, the process proceeds to step b50.

【0053】ステップb50では、1バイトのデータの
受信が終了したかどうかを判断する。終了していなけれ
ばステップb51に進み、シリアルデータ入力端子Si
n1およびシリアルデータ出力端子Sout1を使用状
態とし、ステップb53に進む。1バイト分のデータの
受信が終了した場合はステップb52に進み、シリアル
データ入力端子Sin0およびシリアルデータ出力端子
Sout0を使用状態としてステップb53に進む。ス
テップb53では、割込通信処理を実行する。すなわ
ち、要求データを受信し、または応答データを送信す
る。ここでの応答データの送信はシリアルデータ出力端
子Sout0を用いて行い、要求データの受信は最初の
1バイト分のデータはシリアルデータ入力端子Sin1
を用いて行い、残りのバイトデータの受信はシリアルデ
ータ入力端子Sin0を用いて行う。
At step b50, it is judged whether or not the reception of the 1-byte data is completed. If not completed, the process proceeds to step b51, where serial data input terminal Si
After setting n1 and the serial data output terminal Sout1 to the use state, the process proceeds to step b53. When the reception of 1-byte data is completed, the process proceeds to step b52, and the serial data input terminal Sin0 and the serial data output terminal Sout0 are used, and the process proceeds to step b53. At step b53, interrupt communication processing is executed. That is, the request data is received or the response data is transmitted. Here, the response data is transmitted using the serial data output terminal Sout0, and the request data is received by using the serial data input terminal Sin1 for the first 1-byte data.
And the remaining byte data is received using the serial data input terminal Sin0.

【0054】ステップb54では、通信が終了したかど
うかを判断する。通信が終了していなければステップb
49に進み、割込通信処理を続行する。通信が終了した
場合はステップb55に進み、前述のステップb48で
中断した通常通信状態を復帰させ、ステップb44に進
み通常通信処理を再開する。
At step b54, it is determined whether the communication is completed. If communication has not ended, step b
Proceed to 49 to continue the interrupt communication process. When the communication is completed, the process proceeds to step b55, the normal communication state interrupted at step b48 is restored, and the process proceeds to step b44 to restart the normal communication process.

【0055】図17は、第3の通信動作におけるスレー
ブ端末装置Sの動作を説明するフローチャートである。
本フローチャートは、通常通信処理および割込通信処理
において共にスレーブ端末装置として動作する場合を説
明する。ステップc41では、シリアルデータ入力端子
Sin0からの通信を受信したかどうかを判断する。通
信を受信した場合はステップc42に進み、割込入力端
子ASR0に割込があるかどうかを判断する。割込があ
る場合は後述するステップc46に進み、割込がない場
合はステップc43に進む。
FIG. 17 is a flow chart for explaining the operation of the slave terminal device S in the third communication operation.
This flowchart describes a case where both the normal communication process and the interrupt communication process operate as a slave terminal device. At step c41, it is judged whether or not the communication from the serial data input terminal Sin0 is received. When the communication is received, the process proceeds to step c42, and it is determined whether or not the interrupt input terminal ASR0 has an interrupt. If there is an interrupt, the process proceeds to step c46 described below, and if there is no interrupt, the process proceeds to step c43.

【0056】ステップc43では、エラーが発生してい
るかどうかを判断する。エラーが発生していればステッ
プc41に戻り、通信をやり直す。エラーが発生してい
なければステップc44に進み、通常通信処理を実行す
る。すなわち、マスタ端末装置からの要求データを受信
し、またはその要求データに応じた応答データを送信す
る。ここでの要求データの受信は、シリアルデータ入力
端子Sin0を用いて行う。ステップc45では、通信
が終了したかどうかを判断する。終了していなければス
テップc42に戻り、通信処理を続行する。通信が終了
した場合は処理を終了する。
At step c43, it is judged whether or not an error has occurred. If an error has occurred, the process returns to step c41 and communication is performed again. If no error has occurred, the process proceeds to step c44 to execute normal communication processing. That is, the request data from the master terminal device is received, or the response data corresponding to the request data is transmitted. The reception of the request data here is performed using the serial data input terminal Sin0. At step c45, it is determined whether the communication is completed. If not completed, the process returns to step c42 to continue the communication process. When the communication is completed, the processing is ended.

【0057】ステップc46では、通常通信処理を中断
し、ステップc47では、エラーが発生しているかどう
かを判断する。エラーが発生していればステップc53
に進み、通常通信処理を復帰させ、ステップc43に戻
り、通常通信処理を再開する。エラーが発生していなけ
ればステップc48に進む。
At step c46, the normal communication process is interrupted, and at step c47, it is judged whether or not an error has occurred. If an error has occurred, step c53
In step c43, the normal communication process is restored, and the process returns to step c43 to restart the normal communication process. If no error has occurred, the process proceeds to step c48.

【0058】ステップc48では、1バイト分のデータ
の受信が終了したかどうかを判断する。終了していなけ
ればステップc49において、シリアルデータ入力端子
Sin1およびシリアルデータ出力端子Sout1を使
用状態とし、ステップc51に進む。1バイト分のデー
タの受信が終了している場合はステップc50におい
て、シリアルデータ入力端子Sin0およびシリアルデ
ータ出力端子Sout0を使用状態とし、ステップc5
1に進む。
At step c48, it is judged whether or not the reception of the data of 1 byte is completed. If not completed, in step c49, the serial data input terminal Sin1 and the serial data output terminal Sout1 are put into the use state, and the process proceeds to step c51. If the reception of 1-byte data has been completed, the serial data input terminal Sin0 and the serial data output terminal Sout0 are set to the use state in step c50, and the step c5
Proceed to 1.

【0059】ステップc51では、割込通信処理を実行
する。すなわち、要求データを受信し、または応答デー
タを送信する。ここでの応答データの送信は、シリアル
データ出力端子Sout0を用いて行い、要求データの
受信は最初の1バイト分はシリアルデータ入力端子Si
n1を用いて行い、残りのバイトデータは、シリアルデ
ータ入力端子Sin0を用いて行う。
At step c51, interrupt communication processing is executed. That is, the request data is received or the response data is transmitted. Here, the response data is transmitted using the serial data output terminal Sout0, and the request data is received for the first 1 byte by the serial data input terminal Si.
n1 and the remaining byte data is performed using the serial data input terminal Sin0.

【0060】ステップc52では、通信が終了したかど
うかを判断する。終了していなければステップc47に
戻り、割込通信処理を続行する。通信が終了した場合は
ステップc53に進み、中断した通常通信処理を復帰さ
せ、ステップc43に戻り、通常通信処理を再開する。
At step c52, it is determined whether the communication is completed. If it has not ended, the process returns to step c47 to continue the interrupt communication process. When the communication is completed, the process proceeds to step c53, the interrupted normal communication process is restored, the process returns to step c43, and the normal communication process is restarted.

【0061】図18は、第3の通信動作におけるスレー
ブ端末装置Sの他の動作を説明するフローチャートであ
る。本フローチャートは、通常通信処理ではスレーブ端
末装置として、割込通信処理ではマスタ端末装置として
動作する場合を説明する。ステップd41では、シリア
ルデータ入力端子Sin0からの通信を受信したかどう
かを判断する。受信した場合はステップd42に進み、
主制御部11からの割込通信要求を受信したかどうかを
判断する。割込通信要求がある場合は後述するステップ
d46に進み、割込通信要求がない場合はステップd4
3に進む。ステップd43では、エラーが発生している
かどうかを判断する。エラーが発生していればステップ
d41に戻り、通信をやり直す。エラーが発生していな
ければステップd44に進み、通常通信処理を実行す
る。すなわち、要求データを受信し、または応答データ
を送信する。ここでの要求データの受信は、シリアルデ
ータ入力端子Sin0を用いて行う。
FIG. 18 is a flow chart for explaining another operation of the slave terminal device S in the third communication operation. This flowchart describes a case where the normal communication process operates as a slave terminal device and the interrupt communication process operates as a master terminal device. In step d41, it is determined whether communication from the serial data input terminal Sin0 has been received. If received, go to step d42,
It is determined whether or not an interrupt communication request from the main control unit 11 has been received. If there is an interrupt communication request, the process proceeds to step d46 described later, and if there is no interrupt communication request, step d4.
Proceed to 3. In step d43, it is determined whether an error has occurred. If an error has occurred, the process returns to step d41 and communication is retried. If no error has occurred, the process proceeds to step d44 to execute normal communication processing. That is, the request data is received or the response data is transmitted. The reception of the request data here is performed using the serial data input terminal Sin0.

【0062】ステップd45では、通信が終了したかど
うかを判断する。通信が終了していなければステップd
42に戻り、通常通信処理を続行する。通信が終了した
場合は処理を終了する。
At step d45, it is determined whether the communication is completed. If communication has not ended, step d
Returning to 42, the normal communication process is continued. When the communication is completed, the processing is ended.

【0063】ステップd46では、通常通信処理を中断
し、ステップd47では割込通信が開始される。すなわ
ち、割込通信のための通信初期状態に設定される。ステ
ップd48では、エラーが発生しているかどうかを判断
する。エラーが発生していればステップd55に進み、
通常通信処理を復帰させ、ステップd43に戻り、通常
通信処理を再開する。エラーが発生していなければステ
ップd49に進む。
At step d46, the normal communication process is interrupted, and at step d47, interrupt communication is started. That is, the communication initial state for interrupt communication is set. In step d48, it is determined whether an error has occurred. If an error has occurred, proceed to step d55,
The normal communication process is restored, the process returns to step d43, and the normal communication process is restarted. If no error has occurred, the process proceeds to step d49.

【0064】ステップd49では、1バイト分のデータ
の送信が終了したかどうかを判断する。終了していなけ
ればステップd50において、シリアルデータ入力端子
Sin1およびシリアルデータ出力端子Sout1を使
用状態とし、ステップd52に進む。1バイト分のデー
タの受信が終了している場合はステップd51におい
て、シリアルデータ入力端子Sin0およびシリアルデ
ータ出力端子Sout0を使用状態とし、ステップd5
2に進む。
At step d49, it is judged whether or not the transmission of 1-byte data is completed. If not completed, in step d50, the serial data input terminal Sin1 and the serial data output terminal Sout1 are put into use, and the process proceeds to step d52. If the reception of one byte of data has been completed, the serial data input terminal Sin0 and the serial data output terminal Sout0 are set to the use state in step d51, and then step d5
Proceed to 2.

【0065】ステップd52では、割込通信処理すなわ
ち、要求データを受信し、または応答データを送信す
る。ここでの要求データの送信は、最初の1バイト分は
シリアルデータ出力端子Sout1を用いて行い、残り
のバイトデータはシリアルデータ出力端子Sout0を
用いて行い、応答データの受信はシリアルデータ入力端
子Sin0を用いて行う。
At step d52, the interrupt communication process, that is, the request data is received or the response data is transmitted. Here, the request data is transmitted using the serial data output terminal Sout1 for the first byte, the remaining byte data is transmitted using the serial data output terminal Sout0, and the response data is received through the serial data input terminal Sin0. Using.

【0066】ステップd53では、通信が終了したかど
うかを判断する。通信が終了していなければステップd
48に戻り、割込通信処理を続行する。通信が終了した
場合はステップd54に進み、主制御部11へ受信した
応答データを引き渡し、ステップd55に進む。その後
前述と同様にステップd55では、中断した通常通信処
理を復帰させ、ステップd43に戻り、通常通信処理を
再開する。
At step d53, it is determined whether the communication is completed. If communication has not ended, step d
Returning to 48, the interrupt communication process is continued. When the communication is completed, the process proceeds to step d54, the received response data is delivered to the main control unit 11, and the process proceeds to step d55. Thereafter, similarly to the above, in step d55, the interrupted normal communication process is restored, the process returns to step d43, and the normal communication process is restarted.

【0067】図19は、エラー発生の有無を検出する際
の処理を詳細に説明するフローチャートである。ステッ
プe1では、オーバーランエラーが発生しているかどう
かを判断する。ステップe2では、フレーミングエラー
が発生しているかどうかを判断する。さらにステップe
3では、シリアルデータ入力端子Sin0,Sin1の
各検出電位レベルが等しいかどうかが判断される。電位
が等しければ正常であり、電位が等しくなければエラー
が発生したものと判断する。
FIG. 19 is a flow chart for explaining in detail the processing when detecting the occurrence of an error. At step e1, it is determined whether or not an overrun error has occurred. At step e2, it is judged whether or not a framing error has occurred. Further step e
At 3, it is determined whether the detection potential levels of the serial data input terminals Sin0 and Sin1 are equal. If the potentials are equal, it is normal, and if the potentials are not equal, it is determined that an error has occurred.

【0068】このようにステップe3において、シリア
ルデータ入力端子Sin0,Sin1のデータ(検出電
位)を比較チェックすることによって、入力端子および
制御回路2内部のバッファのチェックをすることができ
る。
In this way, in step e3, the data (detection potential) of the serial data input terminals Sin0 and Sin1 are compared and checked, whereby the input terminal and the buffer in the control circuit 2 can be checked.

【0069】以上のように本発明の実施の形態によれ
ば、通常通信処理の実行中に、当該通常通信処理よりも
優先度の高い割込通信処理を実行する場合は、通常通信
処理を実行する際に用いられる第1のデータとは異なる
第2のデータを用いて行う。第2のデータを構成する第
3の電位V3は第1のデータを構成する第2の電位V2
よりも低く選ばれているため、第1のデータと第2のデ
ータとが重なった場合、第1のデータは破壊されるけれ
ども、第2のデータはその一部が破壊されたとしても端
末装置は何ら影響なく、割込データを受信することがで
きる。これによってデータ通信の信頼性が格段に向上す
る。
As described above, according to the embodiment of the present invention, when the interrupt communication process having a higher priority than the normal communication process is executed during the execution of the normal communication process, the normal communication process is executed. The second data that is different from the first data that is used when performing is performed. The third potential V3 forming the second data is the second potential V2 forming the first data.
If the first data and the second data overlap, the first data will be destroyed, but the second data will be destroyed even if part of it is destroyed. Can receive interrupt data without any effect. This greatly improves the reliability of data communication.

【0070】また割込通信処理を途中から第1のデータ
に切換えて実行することによってさらに優先度の高い割
込通信処理が割込む場合であっても当該さらに優先度の
高い割込データを破壊することなく送信および受信する
ことができる。これによってデータ通信の信頼性が格段
に向上する。
Even if the interrupt communication process with a higher priority is interrupted by switching the interrupt communication process to the first data and executing the interrupt data, the interrupt data with a higher priority is destroyed. You can send and receive without doing. This greatly improves the reliability of data communication.

【0071】また上述したように割込通信処理を途中か
ら第1のデータに切換えることによって、端末装置は2
種類のレベルの異なるデータ送信するための送信回路お
よび受信回路を用意しておくだけでよく、優先度の高い
データに応じて複数種類のデータを送信および受信する
ための回路を用意しておく場合に比べて、データ送信お
よび受信に関連する構成を小形化することができ、さら
には低コスト化も実現することができる。
Further, as described above, by switching the interrupt communication processing to the first data from the middle, the terminal device is
When you need to prepare a transmission circuit and a reception circuit for transmitting different types of data, and a circuit for transmitting and receiving multiple types of data according to high priority data. Compared with, the configuration related to data transmission and reception can be downsized, and further cost reduction can be realized.

【0072】[0072]

【発明の効果】以上のように本発明によれば、優先度の
高い割込データを壊すことなく確実に送信および受信す
ることができ、データ通信の信頼性が格段に向上する。
また、割込通信処理と通常通信処理とを円滑に行うこと
ができ、データ通信の信頼性が向上する。
As described above, according to the present invention, it is possible to reliably transmit and receive high-priority interrupt data without destroying it, and the reliability of data communication is significantly improved.
Further, the interrupt communication process and the normal communication process can be smoothly performed, and the reliability of data communication is improved.

【0073】また本発明によれば、優先度の高い割込デ
ータが複数個重なった場合であっても、最も優先度の高
い割込データは壊れることがなく、優先度の高い割込デ
ータを確実に送信および受信することができ、データ通
信における信頼性が格段に向上する。
Further, according to the present invention, even when a plurality of interrupt data with a high priority are overlapped, the interrupt data with the highest priority is not destroyed and the interrupt data with a high priority is Data can be reliably transmitted and received, and reliability in data communication is significantly improved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の前提となるデータ通信装置1の全体的
構成を示すブロック図である。
FIG. 1 is a block diagram showing an overall configuration of a data communication device 1 which is a premise of the present invention.

【図2】端末装置M,Sの概略的構成を示すブロック図
である。
FIG. 2 is a block diagram showing a schematic configuration of terminal devices M and S.

【図3】本発明の実施の一形態であり、端末装置M,S
の通信回路10の具体的構成例を示すブロック図であ
る。
FIG. 3 is an embodiment of the present invention, in which the terminal devices M and S
3 is a block diagram showing a specific configuration example of the communication circuit 10 of FIG.

【図4】データ通信装置1が送信および受信するメッセ
ージデータの構成例を示すタイムチャートである。
FIG. 4 is a time chart showing a configuration example of message data transmitted and received by the data communication device 1.

【図5】データ通信装置1が使用するデータを示す波形
図である。
FIG. 5 is a waveform diagram showing data used by the data communication device 1.

【図6】制御回路2がデータ受信時に行う動作を説明す
るフローチャートである。
FIG. 6 is a flowchart illustrating an operation performed by the control circuit 2 when receiving data.

【図7】データ通信装置1が行う第1の通信動作を説明
するタイムチャートである。
FIG. 7 is a time chart illustrating a first communication operation performed by the data communication device 1.

【図8】マスタ端末装置Mが第1の通信動作において実
行する動作を説明するフローチャートである。
FIG. 8 is a flowchart illustrating an operation executed by the master terminal device M in the first communication operation.

【図9】スレーブ端末装置Sが第1の通信動作において
実行する動作を説明するフローチャートである。
FIG. 9 is a flowchart illustrating an operation performed by the slave terminal device S in the first communication operation.

【図10】スレーブ端末装置Sが第1の通信動作におい
て実行する他の動作を説明するフローチャートである。
FIG. 10 is a flowchart illustrating another operation performed by the slave terminal device S in the first communication operation.

【図11】本発明の実施の他の形態を説明するためのブ
ロック図である。
FIG. 11 is a block diagram for explaining another embodiment of the present invention.

【図12】データ通信装置が行う第2の通信動作を説明
するタイムチャートである。
FIG. 12 is a time chart illustrating a second communication operation performed by the data communication device.

【図13】マスタ端末装置Mが第2の通信動作において
実行する動作を説明するフローチャートである。
FIG. 13 is a flowchart illustrating an operation performed by master terminal device M in a second communication operation.

【図14】スレーブ端末装置Sが第2の通信動作におい
て実行する動作を説明するフローチャートである。
FIG. 14 is a flowchart illustrating an operation performed by the slave terminal device S in a second communication operation.

【図15】スレーブ端末装置Sが第2の通信動作におい
て実行する他の動作を説明するフローチャートである。
FIG. 15 is a flowchart illustrating another operation performed by the slave terminal device S in the second communication operation.

【図16】マスタ端末装置Mが第3の通信動作で実行す
る動作を説明するフローチャートである。
FIG. 16 is a flowchart illustrating an operation performed by master terminal device M in a third communication operation.

【図17】スレーブ端末装置Sが第3の通信動作で実行
する動作を説明するフローチャートである。
FIG. 17 is a flowchart illustrating an operation performed by the slave terminal device S in a third communication operation.

【図18】スレーブ端末装置Sが第3の通信動作で実行
する動作を説明するフローチャートである。
FIG. 18 is a flowchart illustrating an operation performed by the slave terminal device S in a third communication operation.

【図19】エラー発生の有無を検出する際の処理を詳細
に説明するフローチャートである。
FIG. 19 is a flowchart illustrating in detail a process when detecting whether or not an error has occurred.

【符号の説明】[Explanation of symbols]

1 データ通信装置 2 制御回路 3 接続端子 4 データ送信回路 5 データ受信回路 6,7 スイッチ 8,9 コンパレータ 10 通信回路 11 主制御部 12 通信制御部 K 通信ライン M マスタ端末装置 S(S1〜Sn) スレーブ端末装置 R1〜R5 抵抗 B 電源電位 Sin0,Sin1 シリアルデータ入力端子 Sout0,Sout1 シリアルデータ出力端子 ASR0 割込入力端子 P1,P2 接続点 V1 第1の電位 V2 第2の電位 V3 第3の電位 Vth1 第1の基準電位 Vth2 第2の基準電位 1 data communication device 2 control circuit 3 connection terminal 4 data transmission circuit 5 data reception circuit 6,7 switch 8,9 comparator 10 communication circuit 11 main control unit 12 communication control unit K communication line M master terminal device S (S1 to Sn) Slave terminal device R1 to R5 resistance B power supply potential Sin0, Sin1 serial data input terminal Sout0, Sout1 serial data output terminal ASR0 interrupt input terminal P1, P2 connection point V1 first potential V2 second potential V3 third potential Vth1 First reference potential Vth2 Second reference potential

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 複数の端末装置を予め定める第1の電位
が待機状態である1本の通信ラインで接続し、複数の端
末装置の中から選ばれる主端末装置は、他の端末装置に
要求データを送信し、他の端末装置は前記要求データに
対する応答データを、主端末装置へのデータ送信の順序
を決定する予め定める優先順位に従って順番に送信する
データ通信装置において、 各端末装置は、 通信ラインの電位を前記第1の電位と第1の電位よりも
低い予め定める第2の電位とに切換えて第1のデータを
作成して送信する第1のデータ送信手段と、 通信ラインの電位を前記第1の電位と前記第2の電位よ
りも低い予め定める第3の電位とに切換えて第2のデー
タを作成して送信する第2のデータ送信手段と、 通信ラインの電位を検出して第1および第2のデータを
受信するデータ受信手段とを備え、 主端末装置による要求データの送信と他の端末装置によ
る応答データの送信とによって構成される通常の通信処
理を行うときは、前記第1のデータを使用し、通常の通
信処理中に、当該通常通信処理よりも優先される割込デ
ータを送信する割込通信処理を行うときは、前記第2の
データを使用することを特徴とするデータ通信装置。
1. A main terminal device connecting a plurality of terminal devices with one communication line in which a predetermined first potential is in a standby state, and a main terminal device selected from the plurality of terminal devices requests another terminal device. In a data communication device that transmits data and another terminal device transmits response data to the request data in order according to a predetermined priority order that determines the order of data transmission to the main terminal device, each terminal device is a communication device. The potential of the line is switched to the first potential and a predetermined second potential lower than the first potential to create and transmit the first data, and the potential of the communication line Second data transmitting means for switching between the first potential and a predetermined third potential lower than the second potential to generate and transmit the second data, and detecting the potential of the communication line. First and second Data reception means for receiving data, and when performing a normal communication process consisting of request data transmission by the main terminal device and response data transmission by another terminal device, the first data The second data is used when performing an interrupt communication process for transmitting interrupt data prior to the normal communication process during normal communication process. .
【請求項2】 各端末装置は、通常通信処理中に割込通
信処理が割込んだときは、当該通常通信処理を中断し、
主端末装置は、前記割込通信処理が終了した後に、中断
した通常通信処理における要求データを再び送信するこ
とを特徴とする請求項1記載のデータ通信装置。
2. Each terminal device interrupts the normal communication process when the interrupt communication process interrupts during the normal communication process,
The data communication device according to claim 1, wherein the main terminal device retransmits the requested data in the interrupted normal communication process after the interrupt communication process is completed.
【請求項3】 各端末装置は、通常通信処理中に割込通
信処理が割込んだときは、当該通常通信処理を中断し、
前記割込通信処理が終了した後に、中断した前記通常通
信処理を再開することを特徴とする請求項2記載のデー
タ通信装置。
3. Each terminal device interrupts the normal communication process when the interrupt communication process interrupts during the normal communication process,
The data communication apparatus according to claim 2, wherein the interrupted normal communication process is restarted after the interrupt communication process is completed.
【請求項4】 各端末装置は、割込通信処理の最初の少
なくとも1ビットデータの送信および受信が完了した後
は、前記第1のデータに切換えて割込通信処理を行うこ
とを特徴とする請求項1記載のデータ通信装置。
4. The terminal device switches to the first data and performs the interrupt communication process after the transmission and reception of the first at least 1-bit data of the interrupt communication process is completed. The data communication device according to claim 1.
【請求項5】 前記データ受信手段は、 前記第1および第2の電位の間に選ばれる第1の基準電
位よりも通信ラインの電位が高いか低いかを検出する第
1の電位検出手段と、 前記第2および第3の電位の間に選ばれる第2の基準電
位よりも通信ラインの電位が高いか低いかを検出する第
2の電位検出手段とを含み、 各端末装置は、前記第1および第2の電位検出手段の各
検出結果が一致しないときに、エラーが発生したと判断
することを特徴とする請求項3記載のデータ通信装置。
5. The data receiving means includes first potential detecting means for detecting whether the potential of the communication line is higher or lower than a first reference potential selected between the first and second potentials. A second potential detecting means for detecting whether the potential of the communication line is higher or lower than a second reference potential selected between the second and third potentials, each terminal device comprising: 4. The data communication device according to claim 3, wherein it is determined that an error has occurred when the detection results of the first and second potential detection means do not match.
JP7167702A 1995-07-03 1995-07-03 Data communication device Withdrawn JPH0918504A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7167702A JPH0918504A (en) 1995-07-03 1995-07-03 Data communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7167702A JPH0918504A (en) 1995-07-03 1995-07-03 Data communication device

Publications (1)

Publication Number Publication Date
JPH0918504A true JPH0918504A (en) 1997-01-17

Family

ID=15854637

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7167702A Withdrawn JPH0918504A (en) 1995-07-03 1995-07-03 Data communication device

Country Status (1)

Country Link
JP (1) JPH0918504A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004500763A (en) * 2000-01-05 2004-01-08 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Method and apparatus for exchanging data between at least two subscribers coupled to a bus system
US6864717B2 (en) 2000-03-08 2005-03-08 Nec Corporation Signal transmission system
JP2006033391A (en) * 2004-07-15 2006-02-02 Auto Network Gijutsu Kenkyusho:Kk Communication apparatus and communication method
JP2012142007A (en) * 2000-06-21 2012-07-26 Dr Johannes Heidenhain Gmbh Method and device for performing serial data transmission between position measurement system and processing unit

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004500763A (en) * 2000-01-05 2004-01-08 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Method and apparatus for exchanging data between at least two subscribers coupled to a bus system
US6864717B2 (en) 2000-03-08 2005-03-08 Nec Corporation Signal transmission system
JP2012142007A (en) * 2000-06-21 2012-07-26 Dr Johannes Heidenhain Gmbh Method and device for performing serial data transmission between position measurement system and processing unit
JP2006033391A (en) * 2004-07-15 2006-02-02 Auto Network Gijutsu Kenkyusho:Kk Communication apparatus and communication method

Similar Documents

Publication Publication Date Title
US4777595A (en) Apparatus for transferring blocks of information from one node to a second node in a computer network
US4590468A (en) Token access controller protocol and architecture
KR100233180B1 (en) Communication systems
KR102471960B1 (en) Apparatus for security of vehicle can communication and method thereof
JPS61195453A (en) Operation of data processor for vehicle
JP2013516136A (en) Bus transceiver configuration
US20210258187A1 (en) Electronic control device, electronic control method, and recording medium
JPH0324109B2 (en)
KR102807028B1 (en) How to talk to a computer on your vehicle's onboard bus
WO1997034227A1 (en) Auto-negotiation progress monitor
CN115158341B (en) Vehicle fault uploading method and device based on functional safety design
CN111505977B (en) Function auxiliary debugging method, function debugging method, device, system and medium
JPH0918504A (en) Data communication device
KR20000005265A (en) Multiplex communication interface circuit and method
EP0094177A2 (en) Apparatus for direct memory-to-memory intercomputer communication
CN118838241B (en) GPIO pin control system, monitoring method and single-wire communication method
CN112787886B (en) Processing method, device driver, readable storage medium and computer for real-time system network device auto-negotiation
US11983518B2 (en) Device, system and a method for reprograming electronic control unit
JPH0381862A (en) Equipment and method for communication of vehicle-mounted network
US20210294375A1 (en) System and method of early turnaround indication for a d-phy communication interface
CN117527341A (en) Information ferrying system and information ferrying method
US11171857B2 (en) Identifying an electronic device connected to a communication network that has XCP enabled
CN1113397A (en) Communication bus system with mitigation of slave station locking problem
CN116405156A (en) Communication fault diagnosis method, device, control unit and vehicle
CN114546446A (en) Control system upgrading method, device, equipment and storage medium

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020903