JPH07162479A - Device and method for communication control - Google Patents

Device and method for communication control

Info

Publication number
JPH07162479A
JPH07162479A JP5339633A JP33963393A JPH07162479A JP H07162479 A JPH07162479 A JP H07162479A JP 5339633 A JP5339633 A JP 5339633A JP 33963393 A JP33963393 A JP 33963393A JP H07162479 A JPH07162479 A JP H07162479A
Authority
JP
Japan
Prior art keywords
data
received
cpu
communication
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP5339633A
Other languages
Japanese (ja)
Inventor
Shigeru Kimura
繁 木村
Eiji Inaba
英治 稲葉
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.)
Nippon Steel Corp
Original Assignee
Nippon Steel Corp
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 Nippon Steel Corp filed Critical Nippon Steel Corp
Priority to JP5339633A priority Critical patent/JPH07162479A/en
Publication of JPH07162479A publication Critical patent/JPH07162479A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)
  • Detection And Prevention Of Errors In Transmission (AREA)
  • Dc Digital Transmission (AREA)
  • Communication Control (AREA)

Abstract

PURPOSE:To perform a communication process for data without paying attention to the contents of the data by sending the data which are divided by a start-stop synchronization system and received within a specific period, together to an arithmetic processing part at a time. CONSTITUTION:Once the start-stop synchronization system detects a start and a stop bit before and behind data, a communication chip 11 outputs an interruption signal INT to a CPU 10. Once the CPU 10 receives the signal INT, it is judged whether data are one starting byte or not. When so, the CPU 10 sends a start signal TR to a timer 14 for monitoring. When not, on the other hand, the CPU 10 reads the received data out of the chip 11 and stores the data in a location of a receiving buffer in a memory 13 which is indicated by a pointer. Then the pointer is set to a storage location for next received data. Here, the data that the CPU 10 receives are divided into small pieces, which are sent to an arithmetic processing part 1 each time the timer 14 enters a time-up state.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、通信制御装置および通
信制御方法に関し、特に、通信されたデータをブロック
化して処理する場合に有効な通信制御装置および通信制
御方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication control device and a communication control method, and more particularly to a communication control device and a communication control method effective when processing communicated data in blocks.

【0002】[0002]

【従来の技術】従来、パソコン、ワークステーション、
プロセスコンピュータ等の間で通信を行なう場合、受信
データをまとめて、すなわちブロック化してから、主演
算装置で必要な処理が行われる。
2. Description of the Related Art Conventionally, personal computers, workstations,
When communication is performed between process computers and the like, received data is collected, that is, divided into blocks, and then necessary processing is performed in the main arithmetic unit.

【0003】例えば、図5には、二つの主演算部CPU
1が、通信制御部CCU2により、通信ライン3を介し
て調歩同期式シリアル伝送を行なう場合が示されてい
る。通常、CPU1とCCU2は別のボード上に設けら
れる。インテリジェントなシリアル伝送部である通信制
御部CCU2は、受信したデータを、CPU1に演算単
位を示すべく、あらかじめ終結コードを付加して、CP
U1に伝送する。演算単位を示す終結コードであるデリ
ミタコードとして、キャリッジリターンCR、ラインフ
ィードLF、エンドオブテキストEOTなどを、使用す
る。CCU2は、終結コード受信までに伝送される伝文
を1パケットとして演算が行われるようにCPU1へ伝
送する。
For example, in FIG. 5, two main calculation units CPU are shown.
1 shows a case where the communication control unit CCU2 performs start-stop synchronous serial transmission via the communication line 3. Usually, CPU1 and CCU2 are provided on different boards. The communication control unit CCU2, which is an intelligent serial transmission unit, adds a termination code in advance to the CPU 1 to indicate the arithmetic unit to the received data, and the CP
Transmit to U1. A carriage return CR, a line feed LF, an end of text EOT, or the like is used as a delimiter code which is a termination code indicating an operation unit. The CCU 2 transmits the message transmitted until the termination code is received to the CPU 1 so that the message is calculated as one packet.

【0004】送信側では、伝文中の終結コードと同一の
コードのデータが発生した場合に、そのデータと終結コ
ードを区別するために、その同一のデータの前に透過コ
ードを付加して送信する。受信側では、付加された透過
コードを検出すると、終結コードでないことを認識し、
かつその透過をコードを削除した形で、伝文を認識す
る。
On the transmitting side, when data having the same code as the termination code in the message is generated, in order to distinguish the data and the termination code, a transparent code is added before the same data and transmitted. . When the receiving side detects the added transparent code, it recognizes that it is not a termination code,
And recognize the message in the form that the code is removed from the transparency.

【0005】[0005]

【発明が解決しようとする課題】ところで、最近ではパ
ーソナルコンピュータ等の機器の普及により、調歩同期
方式のシリアル伝送が広く行われている。これらの通信
伝文は、JISコード、ASCIIコード等のコードで
送信される。産業機器等の装置においては、伝文はヘキ
サコードやバイナリーコード等の任意のビット列の組合
せで構成されることが多い。よって、産業機器等の装置
間での調歩同期式シリアル伝送を用いる場合は、透過コ
ードを用いて伝送し処理するか、あるいは、JISコー
ド等に変換して伝送し、処理する必要があった。このよ
うな伝送は処理手順が増えるため、通信制御部の負荷が
増加するものであった。また、終結コードを用いると、
受信側では、その判定処理を行なう必要がある。
By the way, recently, due to the widespread use of devices such as personal computers, the serial transmission of the start-stop synchronization system has been widely performed. These communication messages are transmitted by codes such as JIS code and ASCII code. In a device such as an industrial machine, a message is often composed of a combination of arbitrary bit strings such as a hex code and a binary code. Therefore, when using the asynchronous serial transmission between devices such as industrial equipment, it is necessary to transmit and process by using a transparent code or convert to JIS code and transmit and process. Since such a transmission increases the processing procedure, the load on the communication control unit increases. Also, with the termination code,
The receiving side needs to perform the determination process.

【0006】本発明は、上記に鑑み、ヘキサコードやバ
イナリコードをコード変換したり、透過コード制御をし
ないで通信制御を行なう装置および方法を提供するもの
である。
In view of the above, the present invention provides an apparatus and method for performing communication control without transcoding a hexa-code or a binary code or performing transparent code control.

【0007】[0007]

【課題を解決するための手段】請求項1記載の発明の通
信制御装置は、受信データの処理を行なう演算処理部
と、通信ラインを介して受信した受信データを演算処理
部へ伝送する通信制御部とを有して、調歩同期式のデー
タ通信を行なう通信制御装置であって、調歩同期式で分
割して受信される受信データを所定期間内に受信された
受信データをまとめて演算処理部へ伝送するものであ
る。
According to a first aspect of the present invention, there is provided a communication control device for processing received data, and a communication control for transmitting received data received through a communication line to the arithmetic processing unit. A communication control device for performing start-stop synchronization-type data communication, the reception processing data being received by dividing in the start-stop synchronization method, the reception data received within a predetermined period are collectively processed. Is to be transmitted to.

【0008】また、請求項2記載の発明の通信制御方法
は、通信ラインを介してデータを調歩同期式のデータ通
信で受信し、その受信データの処理を行なう演算処理部
へ伝送し、演算処理部で受信データの処理を行なうデー
タ通信制御方法において、調歩同期式で分割して受信さ
れる通信ラインからの各々のデータが所定期間内に受信
されないときに、受信データをまとめて演算制御部へ伝
送するものである。
In the communication control method according to the second aspect of the present invention, data is received via a communication line by start-stop synchronization type data communication, and is transmitted to an arithmetic processing unit that processes the received data, and arithmetic processing is performed. In a data communication control method of processing received data in a unit, when the respective data received from a communication line divided in an asynchronous manner are not received within a predetermined period, the received data are collectively sent to an arithmetic control unit. It is to be transmitted.

【0009】[0009]

【作用】以上の構成により、透過データ処理や、コード
変換等の処理をすることなく、データ伝送が可能となる
ので、通信制御部の負荷を軽減させることができる。
With the above configuration, data transmission can be performed without performing transparent data processing or code conversion processing, so that the load on the communication control unit can be reduced.

【0010】[0010]

【実施例】以下、本発明の一実施例について図面を用い
て説明する。図4は、本発明の通信制御部の構成の一実
施例を示すものである。図において、10は中央処理装
置で、メモリ13内のプログラムを実行し、必要なデー
タの蓄積や読みだしをメモリ13に対して行なう。メモ
リ13は、ここでは、一つのものとして示してあるが、
プログラム等を格納したROMと、データを格納するR
AMとからなるものである。通信チップ11は、通信ラ
イン3を介しての通信制御を行なうものである。インタ
ーフェース部12は、受信データの処理を行なう中央処
理装置CPUへの、あるいはそのCPUからのデータの
送信または受信を行なうものである。また、タイマ14
は、CPU10からのトリガー信号TRにより起動さ
れ、所定時間でタイムアップするとタイムアップ信号I
NTがCPU10に対して出力される。データは、バス
15を介してやりとりされる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 4 shows an embodiment of the configuration of the communication control unit of the present invention. In the figure, reference numeral 10 denotes a central processing unit, which executes a program in the memory 13 to store and read necessary data in the memory 13. Although the memory 13 is shown here as one,
ROM for storing programs and R for storing data
It consists of AM. The communication chip 11 controls communication via the communication line 3. The interface unit 12 transmits or receives data to or from the central processing unit CPU that processes received data. Also, the timer 14
Is activated by the trigger signal TR from the CPU 10, and when the time is up for a predetermined time, the time up signal I
NT is output to the CPU 10. Data is exchanged via the bus 15.

【0011】図1は、通信制御部2が、調歩同期式デー
タ通信を行なっている場合、一つのデータを受信したと
きに実行される処理ルーチンを示すものである。調歩同
期式で、データの前後のスタートおよびストップビット
を検出すると、通信チップ11は、CPU10に対して
割込み信号INTを出力する。この割込み信号INTを
CPU10が受けると、図1の処理を実行する。すなわ
ち、最初の1バイトデータかの判断を行ない(ステップ
20)、最初の1バイトデータであれば(ステップ20
でYESのとき)、監視用野タイマ14に対して起動信
号TRを出す(ステップ21)。
FIG. 1 shows a processing routine executed when the communication control unit 2 receives one data in the case of performing the asynchronous data communication. When the start and stop bits before and after the data are detected in the asynchronous method, the communication chip 11 outputs an interrupt signal INT to the CPU 10. When the CPU 10 receives this interrupt signal INT, the processing of FIG. 1 is executed. That is, it is judged whether it is the first 1-byte data (step 20), and if it is the first 1-byte data (step 20).
If YES, the activation signal TR is issued to the monitoring field timer 14 (step 21).

【0012】ステップ20でNOの場合、あるいはステ
ップ21の処理の後は、通信チップ11から受信データ
を読み込み(ステップ22)、続いてメモリ13中の受
信用バッファのポインタの差し示す場所にそのデータを
格納する(ステップ23)。そして、次の受信データの
格納場所にポインタを設定する(ステップ24)。
In the case of NO in step 20, or after the processing of step 21, the reception data is read from the communication chip 11 (step 22), and then the data is stored in the location indicated by the pointer of the reception buffer in the memory 13. Is stored (step 23). Then, the pointer is set to the storage location of the next received data (step 24).

【0013】調歩同期式でデータを受信する場合、通信
チップ11は、スタートビットとストップビットの間の
データを読み取る毎に、CPU10に対して割込み信号
INTを出力するが、その受け取るデータは細かく分割
されたもので、受信データを処理するCPU1で処理す
る単位にまとめる必要がある。そのまとめるための処理
ルーチンを図2に示す。図1のステップ21で起動され
たタイマ14がタイムアップしたときに、実行されるル
ーチンが図2に示される。
When receiving data in the asynchronous mode, the communication chip 11 outputs an interrupt signal INT to the CPU 10 each time it reads the data between the start bit and the stop bit, but the received data is finely divided. The received data has to be collected into units to be processed by the CPU 1 that processes the received data. A processing routine for summarizing the above is shown in FIG. The routine executed when the timer 14 started in step 21 of FIG. 1 times out is shown in FIG.

【0014】タイマ14がタイムアップすると、受信バ
ッファ内の受信データをCPU1へインターフェース1
2を介して送信する(ステップ30)。その後、受信バ
ッファを開放する(ステップ31)。このようにするこ
とで、タイマ割込みまでに受信した一連のデータを一つ
のパケットとして主演算を行なうCPUボードに対して
送ることになるので、従来のように、通信制御部で、透
過コード処理、コード変換等を行なわずに済むものであ
る。以上は、マルチタスクOSで実行される2つのタス
クの処理の例であるが、シングルタスクの処理でもよ
い。
When the timer 14 times out, the received data in the receive buffer is sent to the CPU 1 through the interface 1.
2 (step 30). After that, the reception buffer is released (step 31). By doing so, the series of data received until the timer interrupt is sent as one packet to the CPU board that performs the main operation. Therefore, as in the conventional case, the transparent code processing, It is not necessary to perform code conversion or the like. The above is an example of the processing of two tasks executed by the multitask OS, but it may be a single task processing.

【0015】図3は、他の実施例を示すもので、図1と
の相違は、タイマ14の使い方の点にある。通信チップ
11から調歩同期式のデータ、例えば1バイトのデータ
を受信すると、その度に割込み信号INTがCPU10
に伝えられる。その割込み信号TRを受信するたびに、
実行されるルーチンが図3のものである。
FIG. 3 shows another embodiment. The difference from FIG. 1 lies in the way of using the timer 14. Whenever asynchronous data, for example, 1-byte data is received from the communication chip 11, the interrupt signal INT is sent to the CPU 10 each time.
Be transmitted to. Each time the interrupt signal TR is received,
The routine executed is that shown in FIG.

【0016】割込み信号TRを受けると、監視タイマ1
4が起動されるが、図1と異なる点は、通信チップ11
から割込み信号TRを受ける度に、タイマ14に対して
トリガーがかかることである(ステップ40)。監視タ
イマ14の設定時間は、スタートビットとストップビッ
トにより送られるデータとデータの間の時間間隔よりも
少々長い時間である。すなわち、CPU1がひとまとま
りのものとして処理する受信データが、調歩同期式通信
で分割されて送られてくるときに、通信チップ11にお
ける一つのデータの認識から次のデータの認識までの通
常の時間間隔の最大時間よりも少々長い時間間隔が、タ
イマに設定される。
When the interrupt signal TR is received, the monitoring timer 1
4 is started, but the difference from FIG. 1 is that the communication chip 11
Each time the interrupt signal TR is received from the timer 14, the timer 14 is triggered (step 40). The set time of the monitoring timer 14 is a little longer than the time interval between the data sent by the start bit and the stop bit. That is, when the received data processed by the CPU 1 as a group is sent by being divided by the asynchronous communication, the normal time from the recognition of one data in the communication chip 11 to the recognition of the next data. A time interval set in the timer is slightly longer than the maximum interval time.

【0017】その後のルーチンのステップ22、23、
24は、先の実施例の図1と同様である。また、タイマ
14がタイムアップして実行されるルーチンも、先の実
施例の図2と同様である。
Subsequent routine steps 22, 23,
24 is the same as that of FIG. 1 of the previous embodiment. The routine executed when the timer 14 times out is also the same as that in FIG. 2 of the previous embodiment.

【0018】本実施例では、CPU1がひとまとまりの
ものとして処理する受信データは、送信された個々のデ
ータが所定の時間内に連続して送信される。通信チップ
11が個々のデータの受信の度に割込み信号INTを出
し、その割込み信号INTを受ける度にタイマ14は起
動される。ひとまとまりのものが送信され終わると、次
のデータ受信までの時間間隔は、設定時間よりも長いの
で、タイマ14がタイムアップして、図2の処理がなさ
れる。これは、調歩同期式の通信では、分割されたデー
タは所定時間内に連続して送信される点に注目したもの
である。よって、通信チップでデータが受信される毎
に、図3のルーチンが起動され、監視タイマをその都度
起動する。データが連続して送信されている間は、受信
終了のタイマはその都度再設定されるため、タイムアッ
プ割込みは発生しない。しかし、所定の時間、すなわち
タイマ設定時間、受信がないと、そのタイマが起動さ
れ、それまでに受信したデータを1つのまとまったデー
タ、すなわち、パケットとして、主演算を行なうCPU
1のボードへ伝送する。
In the present embodiment, the received data processed by the CPU 1 as a group is the individual transmitted data continuously transmitted within a predetermined time. Each time the communication chip 11 receives individual data, it issues an interrupt signal INT, and each time the interrupt signal INT is received, the timer 14 is started. When the transmission of one group is completed, the time interval until the next data reception is longer than the set time, so the timer 14 times up and the processing of FIG. 2 is performed. This is because in the asynchronous communication, the divided data is continuously transmitted within a predetermined time. Therefore, every time data is received by the communication chip, the routine of FIG. 3 is activated, and the monitoring timer is activated each time. While the data is continuously transmitted, the timer for the reception end is reset each time, so that the time-up interrupt does not occur. However, if there is no reception for a predetermined time, that is, the timer setting time, the timer is activated, and the CPU that performs the main operation by collecting the data received so far as one collected data, that is, a packet.
Transmit to board 1.

【0019】なお、大量データが送信される場合は、受
信バッファエリア以上のものが送信されるときがある
が、そのときは、一定のデータ長のデータをブロッキン
グしてパケットとして主演算を行なうCPUにデータを
送信する処理を組み合わせて行なうようにする。これに
より、受信バッファのオーバーにより、メモリ中の他の
エリアのデータを破壊することを防ぐことができる。
When a large amount of data is transmitted, there is a case where more than the reception buffer area is transmitted. At that time, a CPU that blocks data of a certain data length and performs a main operation as a packet. The process of transmitting the data is combined. As a result, it is possible to prevent the data in other areas in the memory from being destroyed due to the overflow of the reception buffer.

【0020】[0020]

【発明の効果】以上のように、本発明によれば、調歩同
期式の伝送において、データの内容を意識することな
く、言い換えれば、送信側では、透過コードの付与や、
コード変換処理等を行なうことなく、受信側では透過コ
ード処理やコード変換処理等を行なうことなく、データ
通信処理を行なうことができる。
As described above, according to the present invention, in start-stop synchronization type transmission, without giving any consideration to the content of data, in other words, on the transmitting side, a transparent code is added,
The data communication process can be performed without performing the code conversion process or the like and without performing the transparent code process or the code conversion process on the receiving side.

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

【図1】本発明の通信制御部の処理内容の一実施例を示
すフローチャートである。
FIG. 1 is a flowchart showing an example of processing contents of a communication control unit of the present invention.

【図2】本発明の通信制御部の処理内容の一実施例を示
すフローチャートである。
FIG. 2 is a flowchart showing an example of processing contents of a communication control unit of the present invention.

【図3】本発明の通信制御部の処理内容の他の実施例を
示すフローチャートである。
FIG. 3 is a flowchart showing another embodiment of the processing contents of the communication control unit of the present invention.

【図4】本発明の通信システム構成の一実施例を示す図
である。
FIG. 4 is a diagram showing an embodiment of a communication system configuration of the present invention.

【図5】本発明の通信制御部のブロック構成の一実施例
を示す図である。
FIG. 5 is a diagram showing an example of a block configuration of a communication control unit of the present invention.

【符号の説明】 1,10 CPU 2 通信制御部 3,4 通信ライン 11 通信チップ 12 インターフェース 13 メモリ 14 タイマ 15 バス[Explanation of Codes] 1,10 CPU 2 Communication control unit 3,4 Communication line 11 Communication chip 12 Interface 13 Memory 14 Timer 15 Bus

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 受信データの処理を行なう演算処理部
と、通信ラインを介して受信した上記受信データを上記
演算処理部へ伝送する通信制御部とを有して、調歩同期
式のデータ通信を行なう通信制御装置であって、 調歩同期式で分割して受信される上記受信データを所定
期間内に受信された受信データをまとめて上記演算処理
部へ伝送するようにしたことを特徴とする通信制御装
置。
1. A start-stop synchronous data communication comprising an arithmetic processing unit for processing received data and a communication control unit for transmitting the received data received via a communication line to the arithmetic processing unit. A communication control device for performing communication, characterized in that the reception data received by dividing in an asynchronous manner is collectively transmitted to the arithmetic processing unit of the reception data received within a predetermined period. Control device.
【請求項2】 通信ラインを介してデータを調歩同期式
のデータ通信で受信し、その受信データの処理を行なう
演算処理部へ伝送し、上記演算処理部で上記受信データ
の処理を行なうデータ通信制御方法において、 調歩同期式で分割して受信される上記通信ラインからの
各々のデータが所定期間内に受信されないときに、上記
受信データをまとめて演算制御部へ伝送するようにした
ことを特徴とする通信制御方法。
2. A data communication in which data is received by an asynchronous data communication via a communication line, is transmitted to an arithmetic processing unit that processes the received data, and the arithmetic processing unit processes the received data. In the control method, when the respective data received from the communication line that are divided and received in an asynchronous manner are not received within a predetermined period, the received data are collectively transmitted to the arithmetic control unit. Communication control method.
JP5339633A 1993-12-02 1993-12-02 Device and method for communication control Pending JPH07162479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5339633A JPH07162479A (en) 1993-12-02 1993-12-02 Device and method for communication control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5339633A JPH07162479A (en) 1993-12-02 1993-12-02 Device and method for communication control

Publications (1)

Publication Number Publication Date
JPH07162479A true JPH07162479A (en) 1995-06-23

Family

ID=18329347

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5339633A Pending JPH07162479A (en) 1993-12-02 1993-12-02 Device and method for communication control

Country Status (1)

Country Link
JP (1) JPH07162479A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020136920A (en) * 2019-02-20 2020-08-31 パナソニックIpマネジメント株式会社 Voice control system and voice control method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020136920A (en) * 2019-02-20 2020-08-31 パナソニックIpマネジメント株式会社 Voice control system and voice control method

Similar Documents

Publication Publication Date Title
KR960005444B1 (en) Communication control microcomputer
US5111461A (en) Communication control system
US4831512A (en) System and method of message communication capable of checking consistency among data
JPH07162479A (en) Device and method for communication control
EP0640925B1 (en) Data processing system having serial interface
US5303345A (en) Method for controlling data sending and receiving operations of a microprocessor
JP2808961B2 (en) Communication control device
JP3318863B2 (en) Synchronous data transmission method and synchronous data transmission device
JPS5927647A (en) Data transmitter
JPH04107663A (en) Control system for synchronous communication system
JPH0468729A (en) Text transmission reception processing system
JPS57209559A (en) Decentralized processing system
JP3463146B2 (en) Communication control method and device
KR910003245B1 (en) Method for processing escape sequence in packet assembler/disassembler system
JPH0567013A (en) Dma serial receiving operation end system
JP2778633B2 (en) Key signal communication method
JPH03288205A (en) Programmable controller system
KR100230240B1 (en) Pager
JPS62131645A (en) Data communication equipment
JPS6076840A (en) Transmission system of state change information
JPH05227222A (en) Data transmission speed converter
JPH02152347A (en) Serial data communication controller
JPS6275857A (en) Serial transmission system
JPS62298858A (en) Communication data processor
JPS6190247A (en) Character input control method

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20010606