JPH06164611A - Communication system for ring type local area network - Google Patents

Communication system for ring type local area network

Info

Publication number
JPH06164611A
JPH06164611A JP4333568A JP33356892A JPH06164611A JP H06164611 A JPH06164611 A JP H06164611A JP 4333568 A JP4333568 A JP 4333568A JP 33356892 A JP33356892 A JP 33356892A JP H06164611 A JPH06164611 A JP H06164611A
Authority
JP
Japan
Prior art keywords
flag
terminal unit
block
frame
area network
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
JP4333568A
Other languages
Japanese (ja)
Inventor
Masatoshi Hashimoto
正敏 橋本
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.)
HASHIMOTO DENSHI KOGYO KK
Original Assignee
HASHIMOTO DENSHI KOGYO KK
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 HASHIMOTO DENSHI KOGYO KK filed Critical HASHIMOTO DENSHI KOGYO KK
Priority to JP4333568A priority Critical patent/JPH06164611A/en
Publication of JPH06164611A publication Critical patent/JPH06164611A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide a communication system for a ring type local area network which can simplify its constitution and the signal processing and unnecessitates assignment of addresses to the terminal units. CONSTITUTION:A master unit M and the terminal units CH1-CH60 are successively connected with a ring type transmission line L in a transmission/reception enable way. These units M and CH1-CH60 successively transmit and receive the frames where plural blocks of the same bit length are connected in time sequence. Then the master unit M sets the address flag of each block, and each of units CH1-CH60 resets the address flag of the head block having its set address flag and then reads and writes the input/output data on the head block as its own data.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、リング型ローカルエリ
アネットワークの通信方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a ring type local area network communication system.

【0002】[0002]

【従来の技術】従来、バス型やリング(ループ)型のロ
ーカルエリアネットワーク(LAN)が多く使用されて
いる。従来のリング型のLANでは、以下に述べるトー
クンリング方式が主に実用されている。すなわち、この
トークンリング方式では、ライト可能不可能を示すフラ
グを含むトークンがリング伝送路を巡回しており、各端
末ユニットは、受信したトークンのフラグがライト可能
(トークン空き)を示す場合にのみ、その後、自己アド
レス、相手(送信先)アドレス、データからなるフレー
ムをライトして次の端末ユニットに送信する。
2. Description of the Related Art Conventionally, a bus type or ring (loop) type local area network (LAN) is often used. In the conventional ring type LAN, the token ring system described below is mainly used. That is, in this token ring system, a token including a flag indicating that writing is not possible circulates around the ring transmission line, and each terminal unit can only write when the flag of the received token indicates that writing is possible (token empty). After that, a frame consisting of the self address, the other party (transmission destination) address, and the data is written and transmitted to the next terminal unit.

【0003】[0003]

【発明が解決しようとする課題】しかしながら上記した
従来のトークンリング方式では、各端末ユニットにアド
レスを一々設定せねばならず、更に、データをライトし
て送信する場合に自己アドレス、相手アドレスを一緒に
ライトせねばならず、システム構成及びシステム立ち上
げ作業が複雑化するという問題があった。
However, in the above-mentioned conventional token ring system, an address must be set for each terminal unit, and further, when writing and transmitting data, the self address and the partner address are combined. However, there is a problem in that the system configuration and system startup work become complicated.

【0004】特に、LANの各端末ユニットに接続され
る各装置が、マスターユニットからの単純な起動/停止
命令により作動し、各装置が自己の運転/停止や正常/
異状の状態表示だけをマスターユニットに送信するよう
な単純な装置制御構成の場合、上記したようなトークン
リング方式はこれら各装置の構成に比べて複雑過ぎ、L
ANの有効性を相殺してしまう。
In particular, each device connected to each terminal unit of the LAN operates by a simple start / stop command from the master unit, and each device operates / stops itself or operates normally / stops.
In the case of a simple device control configuration in which only an abnormal status display is transmitted to the master unit, the token ring method as described above is too complicated compared to the configuration of each of these devices, and L
It offsets the effectiveness of AN.

【0005】本発明は、上記問題点に鑑みなされたもの
であり、システム構成が単純で高信頼性を有し、システ
ム立ち上げ作業も簡単なリング型ローカルエリアネット
ワークの通信方式を提供することを、その目的としてい
る。
The present invention has been made in view of the above problems, and it is an object of the present invention to provide a ring-type local area network communication system having a simple system configuration, high reliability, and simple system startup work. , Its purpose is.

【0006】[0006]

【課題を解決するための手段】本発明のリング型ローカ
ルエリアネットワークの通信方式は、それぞれ通信機能
を有するマスターユニット及び複数の端末ユニットが順
次送受信可能に接続されるリング状の伝送路上に、互い
に等ビット長のブロックを複数個、時間順次に連結して
なるフレームを巡回させて、前記マスターユニットと前
記各端末ユニットとの間の通信を行うリング型ローカル
エリアネットワークの通信方式であって、フレームの第
N番目のブロックは、前記伝送路上における前記マスタ
ーユニットから第N番目の前記端末ユニットと前記マス
ターユニットとの間で通信されるべき入力データと出力
データと制御フラグとをそれぞれ同一ビット位置に担持
し、制御フラグは、前記各端末ユニットのアドレスを表
示するアドレスフラグを含み、前記マスターユニット
は、各ブロックのアドレスフラグをセットするととも
に、各ブロックの入力データ及び出力データを前記各端
末ユニットの接続順にリード/ライトし、前記各端末ユ
ニットは、アドレスフラグがセット状態である先頭ブロ
ックのアドレスフラグをリセットするとともに、前記先
頭ブロックの入力データ及び出力データを自己のデータ
としてリード/ライトすることを特徴としている。
A communication system of a ring type local area network according to the present invention comprises a master unit and a plurality of terminal units each having a communication function, which are connected to each other on a ring-shaped transmission line to which transmission and reception can be sequentially performed. A ring-type local area network communication method for performing communication between the master unit and each of the terminal units by circulating a frame in which a plurality of blocks of equal bit length are sequentially connected in sequence, In the Nth block of the master unit on the transmission line, the input data to be communicated between the Nth terminal unit and the master unit, the output data, and the control flag are respectively placed in the same bit position. The control flag carries an address flag indicating the address of each terminal unit. The master unit sets the address flag of each block and reads / writes the input data and output data of each block in the order of connection of the terminal units, and the terminal units set the address flags. The address flag of the leading block in the state is reset, and the input data and output data of the leading block are read / written as their own data.

【0007】好適な態様において、制御フラグは前記各
端末ユニットの書き込み状況を示すライトフラグを含
み、前記各端末ユニットは自己データを入力データとし
て自己のブロックにライトするとともにライトフラグを
セットし、前記マスターユニットは入力データをリード
したブロックの前記ライトフラグをリセットする。好適
な態様において、制御フラグは各端末ユニットのライト
可不可を表示するオフラインフラグを含み、前記マスタ
ーユニットは所定の前記端末ユニットとの通信を遮断す
る場合に前記所定の端末ユニットに対応するブロック中
のオフラインフラグをセットし、前記各端末ユニットは
自己ブロック中のオフラインフラグがセットされている
場合に自己ブロック中の入出力データのリード/ライト
を停止する。
In a preferred mode, the control flag includes a write flag indicating a write status of each terminal unit, each terminal unit writes its own data as input data to its own block and sets the write flag, The master unit resets the write flag of the block that has read the input data. In a preferred aspect, the control flag includes an off-line flag indicating whether or not the terminal unit is writable, and the master unit is in a block corresponding to the predetermined terminal unit when the communication with the predetermined terminal unit is cut off. The offline flag is set and each terminal unit stops reading / writing of the input / output data in the self block when the offline flag in the self block is set.

【0008】好適な態様において、制御フラグは各端末
ユニットの受信エラーの有無を表示する受信エラーフラ
グを含み、前記各端末ユニットは前回受信時から所定の
許容時間内に次回の受信ができない場合に受信エラーフ
ラグを送出する。好適な態様において、前記マスターユ
ニットは受信エラーフラグを受信する際に所定回数だけ
前回送信したフレームをライトせずに再送信する。
In a preferred mode, the control flag includes a reception error flag which indicates the presence or absence of a reception error of each terminal unit, and when each terminal unit cannot receive next time within a predetermined allowable time from the time of previous reception. Send the reception error flag. In a preferred mode, when the master unit receives the reception error flag, the master unit retransmits a frame transmitted previously a predetermined number of times without writing it.

【0009】好適な態様において、前記端末ユニットは
前記再送信フレーム中の自己ブロックの出力データを正
常にリードした場合に自己ブロック中の受信エラーフラ
グをリセットするものである。好適な態様において、前
記各ブロックの前記許容時間はそれぞれフレーム1巡時
間に互いに異なる追加待ち時間を加えて構成される。
In a preferred mode, the terminal unit resets the reception error flag in the self block when the output data of the self block in the retransmission frame is normally read. In a preferred aspect, the allowable time of each block is configured by adding a different additional waiting time to each frame 1 round time.

【0010】[0010]

【作用及び発明の効果】リング型ローカルエリアネット
ワークはそれぞれ通信機能を有するマスターユニット及
び複数の端末ユニットをリング状の伝送路で順次送受信
可能に接続して構成される。マスターユニット及び各端
末ユニットはこの伝送路で、互いに等ビット長のブロッ
クを複数個、時間順次に連結してなるフレームを順次送
受信する。
The ring-type local area network is composed of a master unit and a plurality of terminal units each having a communication function, which can be sequentially transmitted and received through a ring-shaped transmission line. The master unit and each terminal unit sequentially transmit and receive a frame in which a plurality of blocks each having the same bit length are connected in time-sequential order through this transmission path.

【0011】フレームの第N番目のブロックは、伝送路
上におけるマスターユニットから第N番目の端末ユニッ
トとマスターユニットとの間で通信されるべき入力デー
タと出力データと制御フラグとをそれぞれ同一ビット位
置に担持しており、制御フラグは各端末ユニットのアド
レスを表示するアドレスフラグを含む。マスターユニッ
トは、各ブロックのアドレスフラグをセットするととも
に、各ブロックの入力データ及び出力データを各端末ユ
ニットの接続順(伝送路上でマスターユニットから数え
た)にリード/ライトする。各端末ユニットは、アドレ
スフラグがセット状態である先頭ブロックのアドレスフ
ラグをリセットし、更にこの先頭ブロックの入力データ
及び出力データを自己のデータとしてリード/ライトす
る。
The Nth block of the frame stores the input data, the output data and the control flag, which are to be communicated between the master unit and the Nth terminal unit and the master unit on the transmission line, in the same bit position. Carried, the control flag includes an address flag indicating the address of each terminal unit. The master unit sets the address flag of each block and reads / writes the input data and output data of each block in the connection order of each terminal unit (counted from the master unit on the transmission path). Each terminal unit resets the address flag of the head block in which the address flag is set, and further reads / writes the input data and output data of this head block as its own data.

【0012】すなわちこの実施例では、伝送路上でマス
ターユニットから数えた各端末ユニットの接続順に、伝
送路上を循環する各端末ユニットに対応する各ブロック
を配列してフレームとし、更に各ブロックの所定ビット
位置にアドレスフラグを設けた。ここで、マスターユニ
ットは、各ブロックのアドレスフラグを全てセットする
とともに各ブロックの入力データ及び出力データをリー
ド/ライトする。
That is, in this embodiment, each block corresponding to each terminal unit circulating on the transmission line is arranged into a frame in the order of connection of the terminal units counted from the master unit on the transmission line, and a predetermined bit of each block is further arranged. An address flag is provided at the position. Here, the master unit sets all address flags of each block and reads / writes input data and output data of each block.

【0013】そして、マスターユニットを起点として巡
回方向において第1番目の端末ユニットは、フレーム中
の第1番目のブロック(第1番目の端末ユニットにとっ
て自己ブロック)の入力データ及び出力データをリード
/ライトし、上記方向の第N番目の端末ユニットは、フ
レーム中の第N番目のブロック(第1番目の端末ユニッ
トにとって自己ブロック)の入力データ及び出力データ
をリード/ライトする。 特にこの発明では、各端末ユ
ニットは自己のブロック中のアドレスフラグをリセット
する。その結果、フレームが各端末ユニットを通過して
いくとともに各ブロックのアドレスフラグは第1番目の
ブロックから順番にリセットされていく。 結局、任意
の順番の端末ユニットは受信するフレーム中から、アド
レスフラグがセットされている最初(先頭)のブロック
を自己ブロックとしてリード/ライトすればよいことが
わかる。
Then, the first terminal unit in the traveling direction from the master unit as a starting point reads / writes the input data and the output data of the first block (self block for the first terminal unit) in the frame. Then, the Nth terminal unit in the above direction reads / writes the input data and the output data of the Nth block (self block for the first terminal unit) in the frame. Particularly in the present invention, each terminal unit resets the address flag in its own block. As a result, as the frame passes through each terminal unit, the address flags of each block are sequentially reset from the first block. After all, it is understood that the terminal units in an arbitrary order may read / write the first (head) block in which the address flag is set as the self block from the received frame.

【0014】[0014]

【発明の効果】以上説明したように本発明のリング型ロ
ーカルエリアネットワークの通信方式では、各端末ユニ
ットのデータや制御フラグを個別に収容する各ブロック
を、各端末ユニットの接続順に配列してシーケンシャル
なフレーム(ブロックトレイン)を形成し、伝送路上を
巡回させ、更にアドレスフラグが1である先頭のブロッ
クを各端末ユニットが自己ブロックとして認識し、そし
て自己ブロックのアドレスフラグをリセットして次の端
末ユニットに送信するリング型ローカルエリアネットワ
ーク構成を採用している。
As described above, in the communication system of the ring type local area network of the present invention, blocks for individually storing data and control flags of each terminal unit are arranged sequentially in the order of connection of each terminal unit. Form a new frame (block train), circulate on the transmission path, and each terminal unit recognizes the first block with an address flag of 1 as its own block, and resets the address flag of its own block to the next terminal. It uses a ring-type local area network configuration that transmits to the unit.

【0015】このようにすれば、各端末ユニットにその
アドレスを一々設定する手間が要らず、途中の変更も簡
単であり、データ送信にあたって自己アドレス及び相手
アドレスをデータとともにライトする必要もないという
システム構成上、データ処理上、簡単でシステム立ち上
げが容易なローカルエリアネットワークの通信方式を実
現することができる。
With this configuration, it is not necessary to set the address of each terminal unit one by one, the change on the way is simple, and it is not necessary to write the self address and the partner address together with the data when transmitting the data. It is possible to realize a local area network communication method that is simple in configuration and data processing and easy to start up the system.

【0016】[0016]

【実施例】以下、本発明のリング型ローカルエリアネッ
トワークの通信方式の一実施例を図面を参照して説明す
る。このリング型ローカルエリアネットワークは、マス
ターユニットMと、60個の端末ユニットCH1〜CH
60の各送信ターミナルS及び受信ターミナルRをシリ
アル伝送ラインLで接続してリング型ローカルエリアネ
ットワークを構成したものである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a communication system of a ring type local area network of the present invention will be described below with reference to the drawings. This ring-type local area network includes a master unit M and 60 terminal units CH1 to CH.
A ring-type local area network is configured by connecting the respective transmitting terminals S and receiving terminals R of 60 by serial transmission lines L.

【0017】マスターユニットM及び端末ユニットCH
1は8ビットのマイコンを有しており、上記送信ターミ
ナルS及び受信ターミナルRはこれらマイコンのI/O
インターフェイスを構成している。更に、マスターユニ
ットMのI/OインターフェイスはキーボードK、CR
T表示装置Cに接続されるとともに、上位LAN用の送
信ターミナル及び受信ターミナルを有している。
Master unit M and terminal unit CH
1 has an 8-bit microcomputer, and the transmitting terminal S and the receiving terminal R are I / O of these microcomputers.
Configuring the interface. Furthermore, the I / O interface of the master unit M is the keyboard K, CR
It is connected to the T display device C and has a transmission terminal and a reception terminal for the upper LAN.

【0018】各端末ユニットCH1〜CH60のI/O
インターフェイスは、それぞれペアケーブル用の2対の
入力ターミナル及び2対の出力ターミナルを備え、端末
ユニットCH1〜CH60の上記2対の入力ターミナル
は各自動機1〜60の2対の出力ターミナルに個別に接
続され、端末ユニットCH1〜CH60の上記2対の出
力ターミナルは各自動機M1〜M60の2対の入力ター
ミナルに個別に接続されている。
I / O of each terminal unit CH1 to CH60
The interface has two pairs of input terminals and two pairs of output terminals for pair cables, respectively, and the above two pairs of input terminals of the terminal units CH1 to CH60 are individually connected to the two pairs of output terminals of each automatic machine 1 to 60. The two pairs of output terminals of the terminal units CH1 to CH60 are individually connected to the two pairs of input terminals of the automatic machines M1 to M60.

【0019】各自動機M1〜M60において、第1の出
力ターミナルは自己の正常状態を表示する良品信号Aを
出力するターミナルであり、第2の出力ターミナルは入
力自己の異状状態を表示する信号Bを出力するターミナ
ルであり、第1の入力ターミナルは起動命令Cを受け入
れるターミナルであり、第2の入力ターミナルは停止命
令Dを受け入れるターミナルである。もちろん、各自動
機M1〜M60の第1の出力ターミナルにより、その正
常状態/不良状態を表示し、その第2の出力ターミナル
により例えば良品信号Aの出力タイミングのような他の
信号を表示してもよい。
In each of the automatic machines M1 to M60, the first output terminal is a terminal which outputs a non-defective signal A which indicates its normal state, and the second output terminal is a signal B which indicates an abnormal state of the input self. The first input terminal is a terminal that receives the start command C, and the second input terminal is a terminal that receives the stop command D. Of course, even if the normal state / defective state is displayed by the first output terminal of each of the automatic machines M1 to M60, and other signals such as the output timing of the non-defective signal A are displayed by the second output terminal. Good.

【0020】すなわち、これら各自動機M1〜M60は
比較的単純な装置であり、2ビットの動作指令(出力デ
ータ)を受取り、2ビットの状態表示(入力データ)を
出力する。もちろん、上記4ビットの入出力データを1
ビット+3ビットのように分割することも当然可能であ
る。図2にこのリング型LANを巡回する情報群(フレ
ーム)の構成を示す。
That is, each of the automatic machines M1 to M60 is a relatively simple device and receives a 2-bit operation command (output data) and outputs a 2-bit status display (input data). Of course, the above 4-bit input / output data is set to 1
It is of course possible to divide the data into bits + 3 bits. FIG. 2 shows the structure of an information group (frame) circulating in this ring LAN.

【0021】1フレームは64バイトのシーケンシャル
ビット列からなり、最初の2バイトからなるSTXはフ
レーム開始を示す先頭バイトであり、最終の2バイトか
らなるETXはフレーム終了を示す後尾バイトである。
そして、フレームの第3バイト〜第62バイトはそれぞ
れ第1〜第60ブロックを構成している。第1ブロック
は端末ユニットCH1の入出力データA〜Dを含み、第
N番目のブロックは第N番目の端末ユニットCHNの入
出力データA〜Dを含むので、図2では便宜的に、第1
ブロックに端末ユニットCH1と同じ符号CH1を付与
し、第60ブロックに端末ユニットCH60と同じ符号
CH60を付与している。
One frame consists of a 64-bit sequential bit string, STX consisting of the first 2 bytes is the head byte indicating the start of the frame, and ETX consisting of the last 2 bytes is the tail byte indicating the end of the frame.
The 3rd byte to the 62nd byte of the frame respectively form the 1st to 60th blocks. The first block includes input / output data A to D of the terminal unit CH1, and the Nth block includes input / output data A to D of the Nth terminal unit CHN. Therefore, in FIG.
The block is given the same code CH1 as the terminal unit CH1, and the 60th block is given the same code CH60 as the terminal unit CH60.

【0022】図3に任意のブロックのビット構成を示
す。各ブロックは8ビットで構成され、上位ビットから
順番に、アドレスフラグ、オフラインフラグ、受信エラ
ーフラグ、端末ライトフラグ、入力データA、入力デー
タB、出力データC、出力データDの順に構成されてい
る。ここで重要なことは、各端末ユニットCH1〜CH
60は自己のブロックにだけ入出力データA〜Dをリー
ド/ライトすることである。言い換えれば、マスターユ
ニットMから数えて第N番目の端末ユニットCHNは、
フレーム中の第N番目のブロックCHNの入出力データ
A〜Dをリード/ライトし、マスターユニットMはフレ
ーム中の第N番目のブロックCHNの入出力データA〜
Dを第N番目の端末ユニットCHNのものとしてリード
/ライトする点にある。
FIG. 3 shows the bit structure of an arbitrary block. Each block is composed of 8 bits, and is composed of an address flag, an offline flag, a reception error flag, a terminal write flag, an input data A, an input data B, an output data C, and an output data D in order from the upper bit. . What is important here is that each terminal unit CH1 to CH
60 is to read / write the input / output data A to D only in its own block. In other words, the Nth terminal unit CHN counting from the master unit M is
The master unit M reads / writes the input / output data A to D of the Nth block CHN in the frame, and the master unit M inputs / outputs data A to D of the Nth block CHN in the frame.
The point is to read / write D as the Nth terminal unit CHN.

【0023】以下、このリング型LANの動作を説明す
る。まず、マスターユニットMの動作を図4〜図6を参
照して説明する。ただし、ここでは端末ユニットCH1
〜CH60は動作状態となっているとする。電源を入れ
ると初期設定し(100)、まずオフラインフラグ処理
を行う(102)。このオフラインフラグ処理は、入力
データ(自動機への指令)A、Bを受信しないことを予
めキーボードKから指令されている端末ユニットがある
かどうかを調べ、あれば、次に送信すべき(ここでは最
初の)フレーム中のその端末ユニットに相当するブロッ
クのオフラインフラグをセットする処理をいう。
The operation of this ring type LAN will be described below. First, the operation of the master unit M will be described with reference to FIGS. However, here, the terminal unit CH1
It is assumed that CH60 is in operation. When the power is turned on, initialization is performed (100), and an offline flag process is first performed (102). This off-line flag processing checks whether or not there is a terminal unit which is instructed in advance by the keyboard K not to receive the input data (command to the automatic machine) A and B, and if there is, it should be transmitted next (here. Then, the process of setting the off-line flag of the block corresponding to the terminal unit in the (first) frame.

【0024】次にライトすべき入力データA、Bを送信
予定のフレームの各ブロックに順番にセットし、リード
すべき出力データ(各自動機の状態表示)C〜Dをリー
ドする。なおここでは最初であるのでリードすべき出力
データは0である。更に、上記送信予定のフレーム中の
全ブロックのアドレスフラグをセットし、かつ、ライト
フラグをリセットし(104)、送信を行う(10
6)。
Next, the input data A and B to be written are sequentially set in the respective blocks of the frame to be transmitted, and the output data (the status display of each automatic machine) C to D to be read are read. Since it is the first time here, the output data to be read is 0. Further, the address flags of all blocks in the frame to be transmitted are set, the write flags are reset (104), and transmission is performed (10
6).

【0025】次に、受信処理動作が完了したかどうか
(後述の受信終了フラグがセットされたかどうか)を調
べ(108)、完了していなければ内蔵タイマがタイム
オーバーかどうかを調べる(110)。ここで内蔵タイ
マは、前回の送信終了時点から作動し、遅延時間Tmを
セットされている。上記受信処理動作は図5の割り込み
ルーチンで処理され、この割り込みルーチンは端末ユニ
ットCH60からのSTX受信により作動し、後続する
各ブロックを受信処理し、ETX受信により受信終了フ
ラグをセットして(200)、メインルーチンにリター
ンする。
Next, it is checked whether or not the reception processing operation is completed (whether or not a reception end flag, which will be described later, is set) (108), and if not completed, it is checked whether or not the built-in timer is over (110). Here, the built-in timer operates from the end of the previous transmission, and the delay time Tm is set. The above reception processing operation is processed by the interrupt routine of FIG. 5, which interrupt routine operates by STX reception from the terminal unit CH60, performs reception processing of each subsequent block, and sets a reception end flag by ETX reception (200 ), Return to the main routine.

【0026】内蔵タイマの遅延時間Tmは最大フレーム
一巡時間Tc(ここでは10秒)に所定時間ΔT(ここ
では61秒)を加えた値71秒にセットされている。ス
テップ110でタイムオーバーであれば、ステップ11
2に進んで警報処理を行い(112)、ルーチンを終了
する。この場合の警報処理サブルーチンは、端末ユニッ
トCH60からの受信不良を示すフラグを上位LANに
送信し、かつ、CRT表示装置Cに表示する処理を指
す。
The delay time Tm of the built-in timer is set to 71 seconds, which is the maximum frame round-trip time Tc (10 seconds in this case) plus a predetermined time ΔT (61 seconds in this case). If the time is over in step 110, step 11
Proceed to step 2 to perform alarm processing (112), and the routine ends. The alarm processing subroutine in this case refers to processing for transmitting a flag indicating poor reception from the terminal unit CH60 to the upper LAN and displaying it on the CRT display device C.

【0027】ステップ110でタイムオーバーでなけれ
ば、ステップ108にリターンして受信完了を待ち、受
信が完了すれば、上記した受信終了フラグをセットし、
受信フレーム中に受信エラーフラグがセットされている
かどうかを調べる(114)。受信エラーフラグがセッ
トされていれば、再送信回数Sが所定値(ここでは2
回)を超えたかどうかを調べ(116)、超えていなけ
れば前回送信したフレームを加工せずに送信用のレジス
タに再セットし(118)、再送信回数Sに1を加えて
(120)、送信する(106)。
If the time is not over in step 110, the process returns to step 108 to wait for the reception completion, and if the reception is completed, the reception end flag is set,
It is checked whether the reception error flag is set in the reception frame (114). If the reception error flag is set, the number of retransmissions S is a predetermined value (here, 2
(116), and if not, reset the previously transmitted frame to the register for transmission without processing (118), add 1 to the number of retransmissions S (120), It is transmitted (106).

【0028】ステップ116で再送信回数Sが所定値
(ここでは2回)を超えていれば、ステップ112に進
んで警報処理を行い、ルーチンを終了する。この場合の
警報処理サブルーチンは、受信エラーフラグを含むブロ
ックに相当する端末ユニットのアドレス及びその受信不
良を示すフラグを上位LANに送信し、かつ、CRT表
示装置Cに受信不良を表示する処理を指す。
If the number S of retransmissions exceeds the predetermined value (two times in this case) in step 116, the process proceeds to step 112, alarm processing is performed, and the routine ends. The alarm processing subroutine in this case refers to processing of transmitting the address of the terminal unit corresponding to the block including the reception error flag and the flag indicating the reception failure to the upper LAN, and displaying the reception failure on the CRT display device C. .

【0029】次に各端末ユニットCH1〜CH60の動
作を図6のフローチャートを参照して説明する。電源を
入れると初期設定し(300)、受信処理動作が完了し
たかどうか(後述の受信終了フラグがセットされたかど
うか)を調べ(302)、完了していなければ、自己が
管理する自動機との間でデータをリード/ライトし(3
03)、次に内蔵タイマがタイムオーバーかどうかを調
べる(304)。ここで内蔵タイマは、前回の送信終了
時点から作動し、遅延時間Tn(n=1〜60)をセッ
トされている。
Next, the operation of each of the terminal units CH1 to CH60 will be described with reference to the flowchart of FIG. When the power is turned on, initialization is performed (300), and it is checked whether the reception processing operation is completed (whether a reception end flag described later is set) (302). If not completed, an automatic machine managed by itself is used. Read / write data between (3
03), and then it checks whether the built-in timer is over (304). Here, the built-in timer operates from the time when the previous transmission is completed, and the delay time Tn (n = 1 to 60) is set.

【0030】上記受信処理動作は図5の割り込みルーチ
ンと同様な割り込みルーチン(図示せず)処理され、こ
の割り込みルーチンは直前の端末ユニットCHn−1か
らのSTX受信により作動し、後続する各ブロックを受
信処理し、ETX受信により受信終了フラグを出力して
(200)、メインルーチンにリターンする。内蔵タイ
マの遅延時間Tmは最大フレーム一巡時間Tc(ここで
は10秒)に所定時間ΔT(ここでは(1×端末ユニッ
トCH1〜CH60の番号n)秒)を加えた値10+n
秒にセットされている。例えば端末ユニットCH10の
遅延時間は20秒とされる。
The above reception processing operation is processed by an interrupt routine (not shown) similar to the interrupt routine of FIG. 5, and this interrupt routine operates by the STX reception from the immediately preceding terminal unit CHn-1, and the subsequent blocks are processed. Reception processing is performed, a reception end flag is output by ETX reception (200), and the process returns to the main routine. The delay time Tm of the built-in timer is a value 10 + n obtained by adding a predetermined time ΔT (here, (1 × the number n of the terminal units CH1 to CH60) seconds) to the maximum frame round trip time Tc (here, 10 seconds).
Set to seconds. For example, the delay time of the terminal unit CH10 is set to 20 seconds.

【0031】ステップ304でタイムオーバーであれ
ば、ステップ306に進んで、自己ブロックの受信エラ
ーフラグをセットしたフレーム(受信エラーフラグ付フ
レーム)を創出し、ステップ318に進んでこの受信エ
ラーフラグ付フレームを送信する。なおこの受信エラー
フラグ付フレームの自己ブロック及びそれより上流のブ
ロックのアドレスフラグはリセットしておく。
If the time is over in step 304, the flow advances to step 306 to create a frame in which the reception error flag of the own block is set (a frame with a reception error flag), and the process advances to step 318 to generate this frame with a reception error flag. Send. The address flags of the self block of the frame with the reception error flag and the blocks upstream thereof are reset.

【0032】一方、ステップ304でタイムオーバーで
なければ、ステップ302にリターンして受信完了を待
ち、受信が完了すれば、受信フレームの自己ブロック内
のアドレスフラグ及び受信エラーフラグをリセットし
(308)、オフラインフラグがセットされているかど
うかを調べる(310)。オフラインフラグがセットさ
れていれば、ステップ318に進んで受信フレームの入
出力データA〜Dを変更せずに送信し、オフラインフラ
グがセットされていなければ、受信したフレームの自己
ブロック(すなわち、フレーム中のアドレスフラグがセ
ットされている先頭のブロック)の出力データC,Dを
リードし、入力データA,Bをライトする。具体的に説
明すれば、これら入出力データA〜Dを自己の送信バッ
ファメモリにセットする(312)。なおこの明細書に
おいてリードは、受信したフレームを保持する記憶領域
から自己の出力データC,D記憶領域への転送を意味す
る。またステップ312においてライトは、自己ブロッ
クの入力データA,Bのデータを書き換える処理すなわ
ち入力データA又はBが0であれば1をセットする場
合、入力データA又はBが1であれば0にリセットする
場合をいう。
On the other hand, if the time is not over in step 304, the process returns to step 302 to wait for the reception completion, and if the reception is completed, the address flag and the reception error flag in the self block of the reception frame are reset (308). Check 310 if the offline flag is set. If the off-line flag is set, the process proceeds to step 318 and the input / output data A to D of the received frame is transmitted without change. If the off-line flag is not set, the self-blocking of the received frame (that is, the frame) is performed. The output data C and D of the first block in which the address flag is set) are read, and the input data A and B are written. More specifically, these input / output data A to D are set in the own transmission buffer memory (312). In this specification, read means transfer from the storage area holding the received frame to its own output data C and D storage areas. Further, in step 312, the write is a process of rewriting the data of the input data A and B of its own block, that is, when the input data A or B is 0, 1 is set, and when the input data A or B is 1, it is reset to 0. When you do.

【0033】次に、ステップ312において上記ライト
(書換え)を行ったかどうかを調べ(314)、行わな
かった場合には318に進んでフレームを送信し、行っ
た場合にはライトフラグをセットして、フレームを送信
する(318)。次に、内蔵タイマを再スタートさせて
ステップ302に進み、次の受信完了に備える。
Next, in step 312, it is checked whether or not the write (rewrite) is performed (314). If not, the process proceeds to 318 to transmit the frame, and if it is performed, the write flag is set. , Frame is transmitted (318). Next, the built-in timer is restarted and the process proceeds to step 302 to prepare for the next reception completion.

【0034】以下、上記実施例の作用効果を説明する。 (a)まずこの実施例では、各端末ユニットの入出力デ
ータをシーケンシャルに連続したフレームとして巡回さ
せるとともに、各端末ユニットのブロックを識別するた
めのアドレスを1ビットのアドレスフラグで構成してい
る。そして、マスターユニットが全ブロックのアドレス
フラグをセットするとともに、各各端末ユニットがアド
レスフラグがセット状態である先頭ブロックのアドレス
フラグをリセットするとともに、この先頭ブロックを自
己ブロックとして識別するようにしている。
The operation and effect of the above embodiment will be described below. (A) First, in this embodiment, the input / output data of each terminal unit is circulated as a sequentially continuous frame, and the address for identifying the block of each terminal unit is composed of a 1-bit address flag. Then, the master unit sets the address flags of all blocks, and each terminal unit resets the address flag of the leading block whose address flag is set, and identifies this leading block as its own block. .

【0035】この結果、全端末ユニットCH1〜CH6
0は送信に当たって従来のように自己アドレス及び相手
先アドレスを設定する必要が無く、極めて簡単な端末ユ
ニットCH1〜CH60の回路構成及び処理動作でLA
Nを構成することができる。 (b)次に、端末ユニットは自己のデータ(入力データ
A,B)のライト(書換え)を示すライトフラグを含む
ので、マスターユニットは簡単に各自動機の状態変化を
識別することができ、かつ、入力データA,Bの誤送信
が生じてもライトフラグを正常に送信できれば、マスタ
ーユニットは入力データA,Bの誤送信にかかわらず、
誤検出することがない。
As a result, all terminal units CH1 to CH6
In the case of 0, it is not necessary to set the self address and the destination address for transmission as in the conventional case, and the LA has a very simple circuit configuration and processing operation of the terminal units CH1 to CH60.
N can be configured. (B) Next, since the terminal unit includes a write flag indicating the writing (rewriting) of its own data (input data A, B), the master unit can easily identify the state change of each automatic machine, and , If the write flag can be normally transmitted even if the input data A and B are erroneously transmitted, the master unit is irrespective of the erroneous transmission of the input data A and B.
There is no false detection.

【0036】(c)次に、各ブロックが端末ユニットの
ライト禁止を指令するオフラインフラグを有するので、
マスターユニットが通信を欲しない端末ユニットの入力
データA,Bが書換えられることがない。 (d)各ブロックが端末ユニットの受信エラーの有無を
表示する受信エラーフラグを含み、そして、各端末ユニ
ットは前回のフレーム受信時点(又は送信時点)からフ
レーム1巡時間を超過する所定の許容時間内が経過して
も次回のフレーム受信ができない場合に、自己のブロッ
クの受信エラーフラグがセットされた受信エラー表示フ
レームを送出するので、マスターユニットはどの端末ユ
ニットが送信不良状態であるかを簡単に識別することが
でき、表示することができる。
(C) Next, since each block has an offline flag for instructing the write inhibition of the terminal unit,
The input data A and B of the terminal unit that the master unit does not want to communicate with will not be rewritten. (D) Each block includes a reception error flag indicating whether or not there is a reception error in the terminal unit, and each terminal unit has a predetermined permissible time exceeding one frame round-trip time from the last frame reception time (or transmission time). If the next frame cannot be received even after the time elapses, the master unit sends a reception error display frame with the reception error flag of its own block set, so the master unit can easily determine which terminal unit is in a bad transmission state. Can be identified and displayed.

【0037】(e)マスターユニットは受信エラーフラ
グを受信する際に所定回数だけ前回送信したフレームを
ライトせずに再送信するので、伝送ライン又は特定の端
末ユニットにおいて何らかの一時的な伝送不良などによ
り通信不良が生じ、その後、復旧する場合に、正常に通
信を復旧することができる。当然、端末ユニットは再送
信フレーム中の自己ブロックの出力データを正常にリー
ドした場合に自己ブロック中の受信エラーフラグをリセ
ットする。
(E) When the master unit receives the reception error flag, it retransmits the previously transmitted frame a predetermined number of times without writing it. Therefore, due to some temporary transmission failure or the like on the transmission line or a specific terminal unit. When a communication failure occurs and is then restored, the communication can be restored normally. Naturally, the terminal unit resets the reception error flag in the self block when the output data of the self block in the retransmission frame is normally read.

【0038】(f)任意の端末ユニットnは送信不良が
生じた端末ユニットから下流でかつ自己より上流の全て
の端末ユニットが送信した受信エラーフラグ付きフレー
ム(受信エラー表示フレーム)を受信し、かつ下流に送
信した後で、自己の受信エラーフラグ付きフレームを送
信するように、遅延時間を設定することである。このよ
うにすれば、任意の端末ユニットで送信処理と受信処理
とが重なることがなく、信号処理が簡単となる。
(F) An arbitrary terminal unit n receives a frame with a reception error flag (reception error display frame) transmitted by all the terminal units downstream and upstream of itself from the terminal unit in which the transmission failure has occurred, and The delay time is set so that the frame with its own reception error flag is transmitted after the frame is transmitted downstream. In this way, transmission processing and reception processing do not overlap at any terminal unit, and signal processing becomes simple.

【0039】以上説明した本実施例のリング型ローカル
エリアネットワークの通信方式において以下の変形態様
が可能である。すなわち、一個の端末ユニットが連続す
る複数のブロック(例えば2ブロック)を占有すること
は可能である。このようにすると、簡単な自動機にたい
しては1バイトのブロックを割当て、複雑なデータ授受
を要する自動機には複数のブロックを割り当てることが
できる。
The following modifications are possible in the communication system of the ring type local area network of the present embodiment described above. That is, it is possible for one terminal unit to occupy a plurality of consecutive blocks (for example, two blocks). In this way, a 1-byte block can be allocated to a simple automatic machine, and a plurality of blocks can be allocated to an automatic machine that requires complicated data exchange.

【0040】この場合、各種の複合ブロック構成が可能
である。最も簡単な例は、一個の端末ユニットが連続す
る複数ブロックの規定の入出力データA〜Dのビットを
用いることである。したがって、この場合には、一個の
端末ユニットが用いる連続するブロックの数×1ブロッ
クの規定の入出力データビット(実施例1では4ビッ
ト)がデータビットとなる。
In this case, various composite block configurations are possible. The simplest example is that one terminal unit uses the bits of specified input / output data A to D of a plurality of consecutive blocks. Therefore, in this case, the prescribed input / output data bits (4 bits in the first embodiment) of the number of consecutive blocks used by one terminal unit × 1 block are data bits.

【0041】ここで重要なことは、この端末ユニットは
自己が用いる連続する複数ブロックの全てのアドレスフ
ラグをリセットして次の端末ユニットに送信することで
ある。なお他のフラグについては各1ビットあればよい
ので、連続する複数ブロックの内、先頭のブロックを除
く残りのブロックのビット位置をデータビットに転用が
可能である。
What is important here is that this terminal unit resets all the address flags of a plurality of consecutive blocks used by itself and transmits them to the next terminal unit. Since each of the other flags needs only one bit, the bit positions of the remaining blocks of the continuous plurality of blocks except the first block can be diverted to data bits.

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

【図1】 本発明のリング型ローカルエリアネットワー
クの通信方式の一例を示すブロック図である。
FIG. 1 is a block diagram showing an example of a communication system of a ring type local area network of the present invention.

【図2】 巡回するフレームのバイト構成図である。FIG. 2 is a byte configuration diagram of a cyclic frame.

【図3】 図2のブロックのビット構成図である。3 is a bit configuration diagram of the block of FIG. 2. FIG.

【図4】 図1のマスターユニットの動作を示すフロー
チャートである。
FIG. 4 is a flowchart showing the operation of the master unit shown in FIG.

【図5】 図1のマスターユニットの動作を示すフロー
チャートである。
5 is a flowchart showing the operation of the master unit of FIG.

【図6】 図1の端末ユニットの動作を示すフローチャ
ートである。
6 is a flowchart showing the operation of the terminal unit of FIG.

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

M マスターユニット CH1〜CH60 端末ユニット M master unit CH1 to CH60 terminal unit

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】それぞれ通信機能を有するマスターユニッ
ト及び複数の端末ユニットが順次送受信可能に接続され
るリング状の伝送路上に、互いに等ビット長のブロック
を複数個、時間順次に連結してなるフレームを巡回させ
て、前記マスターユニットと前記各端末ユニットとの間
の通信を行うリング型ローカルエリアネットワークの通
信方式であって、 フレームの第N番目のブロックは、前記伝送路上におけ
る前記マスターユニットから第N番目の前記端末ユニッ
トと前記マスターユニットとの間で通信されるべき入力
データと出力データと制御フラグとをそれぞれ同一ビッ
ト位置に担持し、 制御フラグは、前記各端末ユニットのアドレスを表示す
るアドレスフラグを含み、 前記マスターユニットは、各ブロックのアドレスフラグ
をセットするとともに、各ブロックの入力データ及び出
力データを前記各端末ユニットの接続順にリード/ライ
トし、 前記各端末ユニットは、アドレスフラグがセット状態で
ある先頭ブロックのアドレスフラグをリセットするとと
もに、前記先頭ブロックの入力データ及び出力データを
自己のデータとしてリード/ライトすることを特徴とす
るリング型ローカルエリアネットワークの通信方式。
1. A frame in which a plurality of blocks each having the same bit length are time-sequentially connected to each other on a ring-shaped transmission path to which a master unit and a plurality of terminal units each having a communication function are sequentially connected so that they can be transmitted and received. In the communication method of a ring-type local area network for performing communication between the master unit and each of the terminal units, the N-th block of a frame is the first from the master unit on the transmission path. Input data, output data, and a control flag to be communicated between the Nth terminal unit and the master unit are carried in the same bit position, and the control flag is an address indicating the address of each terminal unit. Flag, the master unit sets the address flag of each block In addition, the input data and the output data of each block are read / written in the order of connection of the terminal units, and each terminal unit resets the address flag of the leading block whose address flag is set and A ring-type local area network communication method that reads / writes the input data and output data of the above as its own data.
【請求項2】制御フラグは前記各端末ユニットの書き込
み状況を示すライトフラグを含み、前記各端末ユニット
は自己データを入力データとして自己のブロックにライ
トするとともにライトフラグをセットし、前記マスター
ユニットは入力データをリードしたブロックの前記ライ
トフラグをリセットする請求項1記載のリング型ローカ
ルエリアネットワークの通信方式。
2. The control flag includes a write flag indicating a writing status of each terminal unit, each terminal unit writes its own data as input data to its own block and sets the write flag, and the master unit sets The communication system of a ring type local area network according to claim 1, wherein the write flag of a block that has read input data is reset.
【請求項3】制御フラグは各端末ユニットのライト可不
可を表示するオフラインフラグを含み、前記マスターユ
ニットは所定の前記端末ユニットとの通信を遮断する場
合に前記所定の端末ユニットに対応するブロック中のオ
フラインフラグをセットし、前記各端末ユニットは自己
ブロック中のオフラインフラグがセットされている場合
に自己ブロック中の入出力データのリード/ライトを停
止する請求項1記載のリング型ローカルエリアネットワ
ークの通信方式。
3. The control flag includes an off-line flag indicating whether or not the terminal unit can be written, and the master unit is in a block corresponding to the predetermined terminal unit when the communication with the predetermined terminal unit is cut off. 2. The ring type local area network according to claim 1, wherein the offline flag of the ring type local area network is set, and each terminal unit stops read / write of input / output data in its own block when the offline flag in its own block is set. Communication method.
【請求項4】制御フラグは各端末ユニットの受信エラー
の有無を表示する受信エラーフラグを含み、前記各端末
ユニットは前回のフレーム受信時点からフレーム1巡時
間を超過する所定の許容時間内が経過しても次回のフレ
ーム受信ができない場合に、自己のブロックの受信エラ
ーフラグがセットされた受信エラー表示フレームを送出
する請求項1記載のリング型ローカルエリアネットワー
クの通信方式。
4. The control flag includes a reception error flag indicating whether or not there is a reception error in each terminal unit, and each terminal unit has passed a predetermined allowable time exceeding one frame round time from the time of the last frame reception. 2. The ring-type local area network communication system according to claim 1, wherein a reception error display frame in which the reception error flag of its own block is set is sent out even if the next frame reception cannot be performed.
【請求項5】前記マスターユニットは受信エラーフラグ
を受信する際に所定回数だけ前回送信したフレームをラ
イトせずに再送信する請求項4記載のリング型ローカル
エリアネットワークの通信方式。
5. The ring-type local area network communication system according to claim 4, wherein said master unit retransmits a previously transmitted frame a predetermined number of times when receiving the reception error flag without writing the frame.
【請求項6】前記端末ユニットは前記再送信フレーム中
の自己ブロックの出力データを正常にリードした場合に
自己ブロック中の受信エラーフラグをリセットするもの
である請求項5記載のリング型ローカルエリアネットワ
ークの通信方式。
6. The ring type local area network according to claim 5, wherein the terminal unit resets a reception error flag in its own block when the output data of its own block in the retransmitted frame is normally read. Communication method.
【請求項7】フレーム送信に障害を有する障害端末ユニ
ットより下流側へ数えて第N(N>2)番目の端末ユニ
ットは、前記障害端末ユニットより下流側でかつ前記第
N番目の端末ユニットより上流の各端末ユニットが送信
する前記受信エラー表示フレームを送信した後、自己の
受信エラー表示フレームを送信する請求項4記載のリン
グ型ローカルエリアネットワークの通信方式。
7. The N (N> 2) th terminal unit, which is counted downstream from the faulty terminal unit having a fault in frame transmission, is downstream from the faulty terminal unit and more than the Nth terminal unit. The communication system of the ring type local area network according to claim 4, wherein after transmitting the reception error display frame transmitted by each upstream terminal unit, the reception error display frame of itself is transmitted.
JP4333568A 1992-11-19 1992-11-19 Communication system for ring type local area network Pending JPH06164611A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4333568A JPH06164611A (en) 1992-11-19 1992-11-19 Communication system for ring type local area network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4333568A JPH06164611A (en) 1992-11-19 1992-11-19 Communication system for ring type local area network

Publications (1)

Publication Number Publication Date
JPH06164611A true JPH06164611A (en) 1994-06-10

Family

ID=18267503

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4333568A Pending JPH06164611A (en) 1992-11-19 1992-11-19 Communication system for ring type local area network

Country Status (1)

Country Link
JP (1) JPH06164611A (en)

Similar Documents

Publication Publication Date Title
US4354267A (en) Data transmission system utilizing loop transmission lines between terminal units
US4745597A (en) Reconfigurable local area network
EP0198020B1 (en) Data communication network
JPH0234059A (en) Processing system for node equipment
JP3138484B2 (en) Communication method for communicating via a network and station thereof
JPS60148249A (en) Message removing method
JPS5947906B2 (en) loop transmission system
JPS5943862B2 (en) Information transmission method of loop transmission system
US4127845A (en) Communications system
US4839887A (en) Node apparatus for communication network having multi-conjunction architecture
JPH0654911B2 (en) Method and apparatus for transferring mastership
JPH06164611A (en) Communication system for ring type local area network
JPH0126213B2 (en)
JP3466860B2 (en) Node arrangement order check method for ring network
JPH0225579B2 (en)
SU807258A1 (en) Device for interfacing computing system modules with check
JPH0311701B2 (en)
JPH0563716A (en) Reply confirming system for ring bus
JP3352607B2 (en) Serial bus connection device
JPH1023048A (en) Communication control method
JP2644571B2 (en) Remote IPL control method
JPS60112339A (en) Informing system for fault of circular data bus
JPH0313776B2 (en)
JPS605099B2 (en) Local station destination address control method
JPS61224538A (en) Test system for data communication equipment