JP4006605B2 - Reduction of repeater delay effect - Google Patents
Reduction of repeater delay effect Download PDFInfo
- Publication number
- JP4006605B2 JP4006605B2 JP2006233037A JP2006233037A JP4006605B2 JP 4006605 B2 JP4006605 B2 JP 4006605B2 JP 2006233037 A JP2006233037 A JP 2006233037A JP 2006233037 A JP2006233037 A JP 2006233037A JP 4006605 B2 JP4006605 B2 JP 4006605B2
- Authority
- JP
- Japan
- Prior art keywords
- station
- frame
- relay
- communication
- slave
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Small-Scale Networks (AREA)
Description
本発明は、バス型ネットワークにおいて、ネットワークを管理するマスタ局、I/O機器を接続するスレーブ局、及び通信フレームを整形・増幅する中継局とから構成されるFA機器等を制御する通信システムに関するものである。 The present invention relates to a communication system for controlling an FA device or the like that includes a master station that manages a network, a slave station that connects an I / O device, and a relay station that shapes and amplifies a communication frame in a bus network. Is.
単一のマスタ局と複数のスレーブ局と複数の中継局とから構成されるプログラマブルコントローラ(PLC)のリモートI/Oネットワークは既に知られている。そのネットワーク例が図17に示されている。 A remote I / O network of a programmable controller (PLC) composed of a single master station, a plurality of slave stations, and a plurality of relay stations is already known. An example of the network is shown in FIG.
同図にて示されるように、このネットワークシステムは、マスタ局70とスレーブ局80a〜d(スレーブ#1〜4)と中継局90a〜d(リピータ#1〜4)とから概略構成されており、中継局(リピータ)段数は2段として構成されたネットワークである。
As shown in the figure, this network system is roughly composed of a
ビルディングブロック型のPLCは、ユーザプログラムを実行するCPUユニット、入力機器や出力機器(以下、両機器の総称としてI/O機器という)を接続した入出力ユニット(I/Oユニット)、リモートI/Oネットワークを接続してスレーブ局との間で入出力データ(I/Oデータ)を通信する通信マスタユニットなどの各ユニットを結合して構成されている。 A building block type PLC includes a CPU unit for executing a user program, an input / output unit (I / O unit) connected to input devices and output devices (hereinafter, collectively referred to as I / O devices), a remote I / O unit, and the like. Each unit such as a communication master unit that connects an O network and communicates input / output data (I / O data) with a slave station is combined.
マスタ局70というのは、1組のプログラマブルコントローラに相当すると捉えても良いし、PLCの通信マスタユニットが該当すると捉えても良い。同図では、プログラマブルコントローラをマスタ局として表している。そして、このネットワークはバス型ネットワークとして構成されており、マスタ局はネットワークを管理するものであり、プログラマブルコントローラに組み込まれている。
The
スレーブ局は、I/O機器(図示せず)を接続していて、マスタ局から受信した通信フレームに格納されたOUTデータに基づいて出力機器を制御し、また、マスタ局からの要求に応答して、入力機器から取り込んだINデータを応答フレームに格納してマスタ局へ返信するものである。 The slave station is connected to an I / O device (not shown), controls the output device based on the OUT data stored in the communication frame received from the master station, and responds to a request from the master station. Then, IN data fetched from the input device is stored in a response frame and returned to the master station.
中継局は、ネットワーク上で送受信される通信フレームに対して波形整形及び増幅処理を行うものである。このことから、マスタ局から各スレーブ局へと送信される要求フレームや各スレーブ局からの応答フレームが通信される際に、中継局を通過するたびに整形・増幅処理を経るため、整形・増幅処理に要する一定時間の遅延(リピータ遅延)が発生してしまう。 The relay station performs waveform shaping and amplification processing on communication frames transmitted and received on the network. Therefore, when request frames transmitted from the master station to each slave station and response frames from each slave station are communicated, shaping / amplification processing is performed every time it passes through the relay station. A delay of a certain time required for processing (repeater delay) occurs.
図17にて示される観測点A,B,C,Dにおいて、マスタ局が送信する要求フレームと各スレーブ局が応答する応答フレームを時系列的に示す動作モデルが図21にて示されている。 FIG. 21 shows an operation model showing, in time series, the request frame transmitted from the master station and the response frame responded by each slave station at the observation points A, B, C, and D shown in FIG. .
図17にて示されるように、スレーブ局#1は、中継局を介さずにマスタ局に接続されている。そのため、図21の観測点Aにおけるスレーブ局(#1)80aの応答は、リピータ遅延が生じないため、マスタ局70からの要求フレームの終了と共に、スレーブ局(#1)80からの応答フレームが送信されている。
As shown in FIG. 17,
それに対し、スレーブ局(#2)80bとマスタ局70との間には中継局が1つ存在しており、スレーブ局(#3)80c及び(#4)80dはマスタ局70との間に中継局が2つずつ存在している。そのため、スレーブ局(#2,#3,#4)に送信される要求フレームは、中継局を通過するたびにリピータ遅延が発生し、それらのスレーブ局からの応答フレームも同様に中継局を通過するたびにリピータ遅延が発生してしまう。
On the other hand, there is one relay station between the slave station (# 2) 80b and the
そのため、従来は、中継局で生じてしまうリピータ遅延を考慮して、同図にて示されるように、各スレーブの応答に隙間を空けて応答同士が衝突しないようにしていた(例えば特許文献1参照)。 For this reason, conventionally, in consideration of the repeater delay that occurs in the relay station, as shown in the figure, a gap is left in the response of each slave so that the responses do not collide (for example, Patent Document 1). reference).
同様に、図17にて示される観測点B,C,Dにおいてもリピータ遅延に対応するために、図21にて示されるように各スレーブ局の応答フレームの送信には所定時間の間隔を空けて送信するようにしていた。 Similarly, at the observation points B, C and D shown in FIG. 17, in order to cope with the repeater delay, as shown in FIG. To send.
また、同システムはバス型システムであるため、中継局は、上流、下流に流れる全ての通信フレームを中継するものである。図17にて示されるようなシステム構成においては、スレーブ局(#3)80cの応答フレームは4つの中継局(中継局90d、90c、90a、90b)を介して、マスタ局や他のスレーブ局に到着し、スレーブ局(#4)80dにも到着することとなる。
Further, since the system is a bus type system, the relay station relays all communication frames flowing upstream and downstream. In the system configuration as shown in FIG. 17, the response frame of the slave station (# 3) 80c is transmitted to the master station and other slave stations via the four relay stations (
この際、スレーブ局(#4)80dに到着するのは、「リピータ遅延×4」時間後となる。このため、全てのスレーブ局からの応答フレームの衝突を回避するためには、観測点Aにおいて応答フレームの間隔を平均で「リピータ遅延×4」に相当する時間の隙間をあける必要が生じていた。そのため、通信サイクルは、
通信サイクル
=要求フレーム時間
+(応答フレーム時間+リピータ遅延×最大リピータ段数×2)
×スレーブ数
となる。
At this time, the slave station (# 4) 80d arrives after “repeater delay × 4” time. For this reason, in order to avoid the collision of response frames from all the slave stations, it is necessary to leave a gap of time corresponding to “repeater delay × 4” on the average at the observation point A. . Therefore, the communication cycle is
Communication cycle = Request frame time
+ (Response frame time + repeater delay x maximum number of repeater stages x 2)
× Slave number.
さらに、上述のように、従来の中継局は上流、下流に流れる全ての通信フレームを中継するものであった。より詳細には、例えば、図21にて示されるスレーブ局(#1)80aから発信される応答フレームは、マスタ局70に送信されるだけではなく、中継局を介して他のスレーブ局(#2,#3,#4)にも中継されていた。このことは、観測点A,B,C,Dの全てにおいてスレーブ局(#1)からの応答フレームが知見されていることから明らかである。同様に、全ての観測点A,B,C,Dにおいて、全てのスレーブ局からの応答フレームが知見されている。
従来の方法では、各中継局にて発生するリピータ遅延を考慮して各スレーブ局の応答に隙間を空けて応答同士が衝突しないようにしているため、各スレーブ局の応答の隙間分、通信サイクルが増大してしまうという問題が生じていた。 In the conventional method, the repeater delay generated at each relay station is taken into consideration so that there is a gap between the responses of each slave station so that the responses do not collide with each other. There has been a problem of increasing the number of people.
また、ネットワーク上の各スレーブ局から送信されるマスタ局宛の通信フレームも、他のスレーブ局に中継されてしまうため、通信路の占有率が上昇してしまい、通信性能の低下に繋がっていた。 In addition, the communication frame addressed to the master station transmitted from each slave station on the network is also relayed to other slave stations, resulting in an increase in the occupation rate of the communication path, leading to a decrease in communication performance. .
本発明は、上述の問題点に着目してなされたものであり、その目的とするところは、通信サイクルを増大させずに、各スレーブ局の応答同士が衝突しないようにすることのできる中継局遅延影響の低減化方法及びその方法を実現するためのシステムを提供することにある。 The present invention has been made paying attention to the above-mentioned problems, and the object of the present invention is to provide a relay station capable of preventing the responses of the slave stations from colliding with each other without increasing the communication cycle. It is an object of the present invention to provide a method for reducing the influence of delay and a system for realizing the method.
また、本発明の他の目的とするところは、ネットワーク上の中継局により、中継する通信フレームの種別を判別し、必要な情報のみを中継することで、ネットワーク占有率を低減化し、ネットワーク効率を向上させることにある。 Another object of the present invention is to determine the type of communication frame to be relayed by a relay station on the network and relay only necessary information, thereby reducing the network occupancy rate and improving the network efficiency. It is to improve.
本発明のさらに他の目的並びに作用効果については、明細書の以下の記述を参照することにより、当業者であれば容易に理解されるであろう。 Other objects and operational effects of the present invention will be easily understood by those skilled in the art by referring to the following description of the specification.
本発明の通信システムは、通信機能を有するプログラマブルコントローラであるマスタ局と、通信機能を有するI/Oターミナル装置である1もしくは2以上のスレーブ局とがネットワークにて結ばれ、かつネットワーク上にあって、上流に位置するマスタ局と下流に位置するスレーブ局とを結ぶ経路上には、1段又は2段以上に亘ってリピータとして機能する中継局が介在されている通信システムにおいて、ネットワーク上にて送受信される通信フレームの中には、スレーブ局からマスタ局に対してのみ発せられる第1のフレーム種別であることを識別するための識別情報を有する通信フレームが含まれており、中継局は、上流側のネットワークに接続する上流ポートおよび下流側のネットワークに接続する下流ポートを備え、上流ポートまたは下流ポートにて受信したフレームの識別情報が第1のフレーム種別であることを識別した場合、その受信したフレームに対しては、前記下流ポートから上流ポートへの方向に対してのみ中継処理を行う、ことを特徴とする。 In the communication system of the present invention, a master station, which is a programmable controller having a communication function, and one or more slave stations, which are I / O terminal devices having a communication function, are connected by a network and are connected to the network. In a communication system in which a relay station functioning as a repeater is interposed in one or more stages on a path connecting a master station located upstream and a slave station located downstream, on a network The communication frame transmitted and received includes a communication frame having identification information for identifying that the first frame type is issued only from the slave station to the master station. An upstream port connected to the upstream network and a downstream port connected to the downstream network. When the identification information of the frame received at the downstream port is identified as the first frame type, the received frame is relayed only in the direction from the downstream port to the upstream port. It is characterized by performing.
このような構成により、スレーブ局からマスタ局へと送信される応答フレームは、マスタ局にのみ送信され、従来例のように他のスレーブ局にまで送信されてしまうことがない。従って、不要なフレームの送信が行われず、ネットワーク上にて応答同士が衝突しないように設けられていた各スレーブ局の応答タイミングの隙間を最小化することが可能となる。 With such a configuration, the response frame transmitted from the slave station to the master station is transmitted only to the master station, and is not transmitted to other slave stations as in the conventional example. Therefore, unnecessary frame transmission is not performed, and it is possible to minimize the gap between the response timings of the slave stations provided so that the responses do not collide with each other on the network.
好ましい実施の形態としては、ネットワーク上にて送受信される通信フレームの中には、さらにマスタ局からスレーブ局に対してのみ発せられる第2のフレーム種別であることを識別するための識別情報を有する通信フレームが含まれており、中継局は、上流ポートまたは下流ポートにて受信したフレームの識別情報が第2のフレーム種別であることを識別した場合、その受信したフレームに対しては、上流ポートから下流ポートへの方向に対してのみ中継処理を行う、ようにしてもよい。 As a preferred embodiment, the communication frame transmitted / received on the network further includes identification information for identifying the second frame type transmitted only from the master station to the slave station. When the communication frame is included and the relay station identifies that the identification information of the frame received at the upstream port or the downstream port is the second frame type, the relay station The relay processing may be performed only in the direction from the downstream port to the downstream port.
同様にして、好ましい他の実施の形態としては、ネットワーク上にて送受信される通信フレームの中には、さらにマスタ局とスレーブ局との間で双方向に発せられる第3のフレーム種別であることを識別するための識別情報を有する通信フレームが含まれており、中継局は、上流ポートまたは下流ポートにて受信したフレームの識別情報が第3のフレーム種別であることを識別した場合、その受信したフレームに対しては、受信した上流ポートから下流ポートへの方向または受信した下流ポートから上流ポートへの方向に対して中継処理を行う、ものであってもよい。 Similarly, in another preferred embodiment, the communication frame transmitted / received on the network is a third frame type that is transmitted bidirectionally between the master station and the slave station. A communication frame having identification information for identifying the frame, and when the relay station identifies that the identification information of the frame received at the upstream port or the downstream port is the third frame type, the reception The received frame may be subjected to relay processing in the direction from the received upstream port to the downstream port or in the direction from the received downstream port to the upstream port.
好ましい実施形態によれば、 マスタ局は、スレーブ局に対して特定の通信フレームを送信し、その特定の通信フレームに対するスレーブ局からの応答フレームから中継局の通過段数を読み出し、読み出された中継局の通過段数に基づいて、当該スレーブ局がマスタ局からの通信フレームに対する応答フレームを返信するタイミングを設定するタイムドメインを計算し、そのタイムドメインのスレーブ局に対する書き込み処理を行う、ものであってもよい。 According to a preferred embodiment, the master station transmits a specific communication frame to the slave station, reads the number of passing stages of the relay station from the response frame from the slave station for the specific communication frame, and reads the read relay Based on the number of passing stages of the station, the slave station calculates a time domain for setting a timing for returning a response frame to the communication frame from the master station, and performs a writing process to the slave station of the time domain. Also good.
このような構成により、送信される通信フレームから得られる情報を基に、そのフレームを送信したスレーブ局とのネットワーク構成上の位置を把握することが可能となる(例えば、マスタ局から当該スレーブ局までの経路上に中継局が何段存在するか等)。そして、マスタ局によって算出される、各スレーブ局における応答タイミングを設定するためのタイムドメインにおいて、各スレーブ局の応答タイミングの隙間を減少させ、高速な通信サイクルを実現することが可能となる。 With such a configuration, based on information obtained from a communication frame to be transmitted, it is possible to grasp the position on the network configuration with the slave station that transmitted the frame (for example, from the master station to the slave station). How many relay stations are on the route to the top). And in the time domain for setting the response timing in each slave station calculated by the master station, it becomes possible to reduce the gap between the response timings of each slave station and realize a high-speed communication cycle.
このとき、スレーブ局において、マスタ局からの通信フレームに対する応答フレームを送信するタイミングを設定するためのタイムドメインが、マスタ局が複数の応答フレームを隙間なく受信できるように計算される、ようにしてもよい。 At this time, in the slave station, the time domain for setting the timing for transmitting the response frame for the communication frame from the master station is calculated so that the master station can receive a plurality of response frames without gaps. Also good.
このような構成により、マスタ局からのフレームに対する応答フレームの送信時に設けられている応答の隙間を削減し、中継局によって生じるリピータ遅延の影響を低減化することが可能となる。 With such a configuration, it is possible to reduce a response gap provided when transmitting a response frame to a frame from the master station, and to reduce the influence of repeater delay caused by the relay station.
ここで言う『リピータ遅延』とは、ネットワーク上送信される各種通信フレームが中継局を通過する際にかかる時間のことである。中継局において、中継対象となる通信フレームに対して波形整形や増幅等の様々な処理を行うため、通信フレームを中継するたびに中継局が存在しない場合に比べて遅れが生じてしまう。リピータ遅延とはこの遅れ、すなわち中継局における中継処理にかかる時間を意味するものである。以下で言う『リピータ通信』も同様である。 Here, “repeater delay” refers to the time required for various communication frames transmitted on the network to pass through the relay station. Since various processes such as waveform shaping and amplification are performed on the communication frame to be relayed in the relay station, a delay occurs as compared with the case where there is no relay station each time the communication frame is relayed. The repeater delay means this delay, that is, the time required for relay processing in the relay station. The same applies to “repeater communication” described below.
好ましい実施の形態としては、マスタ局からスレーブ局に対して送信される特定の通信フレームは、通過した中継局のアドレス値の情報と中継局段数の情報とを含むことができるものであり、中継局は、前記特定の通信フレームが通過する際に、自局のアドレス値の情報と中継局段数に+1加算した値の情報とをその特定の通信フレームに含ませる処理を行うものであり、スレーブ局は、前記特定の通信フレームから、自局の上位側に隣接する中継局のアドレス値の情報と、中継局段数の情報とを取り出す処理と、マスタ局への応答フレームに、前記特定の通信フレームから読み出した自局の上位側に隣接する中継局のアドレス値の情報と中継局段数の情報とを含ませる処理とを行う、ようにしてもよい。 As a preferred embodiment, the specific communication frame transmitted from the master station to the slave station can include information on the address value of the relay station that has passed through and information on the number of relay station stages. When the specific communication frame passes, the station performs processing for including information on the address value of the local station and information on a value obtained by adding +1 to the number of relay station stages in the specific communication frame. The station extracts, from the specific communication frame, the processing for extracting the address value information of the relay station adjacent to the upper side of the own station and the information on the number of relay station stages, and the specific communication in the response frame to the master station. You may make it perform the process which includes the information of the address value of the relay station adjacent to the high-order side of the own station read from the flame | frame, and the information of the number of relay station steps.
また、好ましい実施の形態としては、ネットワーク上にて送受信される通信フレームには、スレーブ局に接続された入力機器から入力したINデータをスレーブ局がマスタ局へと応答として返信するためのインフレームが含まれており、スレーブ局は、自局が保持するタイムドメインに基づいて、インフレームを、リピータ遅延時間だけ早く応答を返信するようにし、中継局は、インフレームについては、下流ポートから上流ポートへの方向に対してのみ中継処理を行う、ようにしてもよい。 As a preferred embodiment, in a communication frame transmitted / received on the network, an in-frame for the slave station to return the IN data input from the input device connected to the slave station as a response to the master station. The slave station returns an in-frame response as soon as the repeater delay time based on the time domain held by the local station, and the relay station upstream from the downstream port for the in-frame. The relay process may be performed only in the direction toward the port.
また、好ましい実施の形態としては、スレーブ局は、マスタ局がスレーブ局の存在を確認するためのコネクションフレームをマスタ局へ送信するものであり、マスタ局は、スレーブ局に対してコネクションフレームの送信を要求するトリガフレームを送信するものであり、スレーブ局は、タイムドメインに基づいて、前記トリガフレームに対する応答としてのコネクションフレームを前記リピータ遅延時間だけ早く返信するようにし、中継局は、コネクションフレームについては、下流から上流方向に対してのみ中継処理を行う、ようにしてもよい。 In a preferred embodiment, the slave station transmits a connection frame for the master station to confirm the existence of the slave station, and the master station transmits a connection frame to the slave station. The slave station transmits a connection frame as a response to the trigger frame earlier by the repeater delay time based on the time domain, and the relay station transmits the connection frame as a response to the trigger frame. May perform relay processing only from the downstream to the upstream direction.
また、別の一面から見た本発明の通信システムは、通信機能を有するプログラマブルコントローラであるマスタ局と、通信機能を有するI/Oターミナル装置である1若しくは2以上のスレーブ局とがネットワークにて結ばれ、かつネットワーク上にあって、上流に位置するマスタ局と下流に位置するスレーブ局とを結ぶ経路上には、1段又は2段以上に亘ってリピータとして機能する中継局が介在されている通信システムにおいて、ネットワーク上にて送受信される通信フレームの中には、スレーブ局からマスタ局に対してのみ発せられる第1のフレーム種別を有する通信フレームが含まれており、中継局は、上流側のネットワークに接続する上流ポートおよび下流側のネットワークに接続する下流ポートを備え、受信したフレームの識別情報が第1のフレーム種別であることを識別した場合、その受信したフレームに対しては、下流ポートから上流ポートへの方向に対してのみ中継処理を行い、スレーブ局は、マスタ局との間に介在する中継局の段数に基づいて決定された、当該スレーブ局がマスタ局からの通信フレームに対する応答フレームを返信するタイミングを設定するためのタイムドメインを予め記憶しており、そのタイムドメインが、マスタ局が複数の応答フレームを隙間なく受信できるように決定されている、ことを特徴とする。 Further, the communication system of the present invention as seen from another aspect includes a master station that is a programmable controller having a communication function and one or more slave stations that are I / O terminal devices having a communication function in a network. A relay station that functions as a repeater over one stage or two or more stages is connected on a route that is connected and on the network and connects a master station located upstream and a slave station located downstream. In a communication system, a communication frame transmitted / received on a network includes a communication frame having a first frame type that is transmitted only from a slave station to a master station. Identify received frames with an upstream port connected to the other network and a downstream port connected to the downstream network When it is identified that the information is of the first frame type, the received frame is relayed only in the direction from the downstream port to the upstream port, and the slave station communicates with the master station. The time domain for setting the timing at which the slave station returns a response frame to the communication frame from the master station, which is determined based on the number of relay stations intervening in the master station, is stored in advance. It is determined that the master station can receive a plurality of response frames without gaps.
このような構成により、スレーブ局からマスタ局へと送信される応答フレームは、マスタ局にのみ送信され、従来例のように他のスレーブ局にまで送信されてしまうことがない。従って、不要なフレームの送信が行われず、ネットワーク上にて応答同士が衝突しないように設けられていた各スレーブ局の応答タイミングの隙間を最小化することが可能となる。そして、マスタ局からのフレームに対する応答フレームの送信時に設けられている応答の隙間を削減し、中継局によって生じるリピータ遅延の影響を低減化すること可能となる。 With such a configuration, the response frame transmitted from the slave station to the master station is transmitted only to the master station, and is not transmitted to other slave stations as in the conventional example. Therefore, unnecessary frame transmission is not performed, and it is possible to minimize the gap between the response timings of the slave stations provided so that the responses do not collide with each other on the network. Then, it is possible to reduce the response gap provided when transmitting the response frame to the frame from the master station, and to reduce the influence of repeater delay caused by the relay station.
好ましい実施形態とてしは、スレーブ局は、マスタ局がスレーブ局の存在を確認するためのコネクションフレームをマスタ局へ送信するものであり、マスタ局は、スレーブ局に対してコネクションフレームの送信を要求するトリガフレームを送信するものであり、
スレーブ局は、タイムドメインに基づいて、コネクションフレームを前記リピータ遅延時間だけ早く応答を返信するようにし、中継局は、コネクションフレームについては下流から上流方向に対してのみ中継処理を行う、ようにしてもよい。
In a preferred embodiment, the slave station transmits a connection frame for the master station to confirm the existence of the slave station, and the master station transmits a connection frame to the slave station. Sending the requested trigger frame,
Based on the time domain, the slave station returns a response to the connection frame as early as the repeater delay time, and the relay station relays only the connection frame from downstream to upstream. Also good.
好ましい実施の形態としては、通信フレームの中には、スレーブ局であるI/Oターミナル装置のINデータをマスタ局へ送信するためのインフレームが含まれており、スレーブ局は、タイムドメインに基づいて、I/Oターミナル装置のINデータを含んだインフレームを、マスタ局が複数の応答フレームを隙間なく受信できるように応答を返信するようにし、中継局は、前記インフレームについては下流から上流方向に対してのみ中継処理を行う、ようにしてもよい。 As a preferred embodiment, the communication frame includes an in-frame for transmitting IN data of the I / O terminal device which is a slave station to the master station. The slave station is based on the time domain. In response to the in-frame including the IN data of the I / O terminal device, the master station returns a response so that a plurality of response frames can be received without gaps. You may make it perform a relay process only with respect to a direction.
別の一面から見た本発明は、通信機能を有するプログラマブルコントローラであるマスタ局と、通信機能を有するI/Oターミナル装置である1若しくは2以上のスレーブ局とがネットワークにて結ばれ、かつネットワーク上にあって、上流に位置するマスタ局と下流に位置するスレーブ局とを結ぶ経路上には、1段又は2段以上に亘ってリピータとして機能する中継局が介在されている通信システムにおける中継装置であって、上流側のネットワークに接続する上流ポートおよび下流側のネットワークに接続する下流側ポートと、
上流ポートまたは下流ポートから各種通信フレームを受信する受信手段と、受信手段により受信した通信フレームの種別をそれに含まれる識別情報から識別する識別手段と、識別手段により識別した通信フレームの種別が、スレーブ局からマスタ局に対してのみ発せられる第1のフレーム種別であった場合には、下流ポートから上流ポートへの方向に対してのみ中継処理を行う中継制御手段とを具備する、ものである。
According to another aspect of the present invention, a master station that is a programmable controller having a communication function and one or more slave stations that are I / O terminal devices having a communication function are connected by a network. Relay in a communication system in which a relay station functioning as a repeater is interposed over one or two or more stages on a path connecting a master station located upstream and a slave station located downstream An apparatus, an upstream port connected to an upstream network and a downstream port connected to a downstream network;
The receiving means for receiving various communication frames from the upstream port or the downstream port, the identifying means for identifying the type of the communication frame received by the receiving means from the identification information included therein, and the type of the communication frame identified by the identifying means is the slave In the case of the first frame type issued only from the station to the master station, relay control means for performing relay processing only in the direction from the downstream port to the upstream port is provided.
このような構成により、スレーブ局からマスタ局へと送信される応答フレームは、マスタ局にのみ送信され、従来例のように他のスレーブ局にまで送信されてしまうことがない。 With such a configuration, the response frame transmitted from the slave station to the master station is transmitted only to the master station, and is not transmitted to other slave stations as in the conventional example.
このとき、中継制御手段が、識別手段により識別した通信フレームの種別が、マスタ局からスレーブ局に対してのみ発せられる第2のフレーム種別であった場合には、上流ポートから下流ポートへの方向に対してのみ中継処理を行う、ものであってもよい。 At this time, if the type of the communication frame identified by the identifying means by the relay control means is the second frame type issued only from the master station to the slave station, the direction from the upstream port to the downstream port The relay processing may be performed only on the.
また、中継制御手段が、識別手段により識別した通信フレームの種別が、マスタ局とスレーブ局との間で双方向に発せられる第3のフレーム種別であった場合には、上流ポートから下流ポートへの方向または下流ポートから上流ポートへの方向に対して中継処理を行う、ものであってもよい。 Further, when the type of the communication frame identified by the relay control unit by the identifying unit is the third frame type issued bi-directionally between the master station and the slave station, the upstream port is changed to the downstream port. Or the relay process may be performed in the direction from the downstream port to the upstream port.
以上の説明で明らかなように、本発明によれば、ネットワーク上の中継局により、中継する通信フレームの種別を判別し、必要な情報のみを中継することで、ネットワーク占有率を低減化し、ネットワーク効率を向上させるて、通信サイクルを高速化することが可能となる。 As is apparent from the above description, according to the present invention, the relay station on the network discriminates the type of communication frame to be relayed and relays only necessary information, thereby reducing the network occupancy rate. It is possible to improve efficiency and speed up the communication cycle.
以下に、この発明の好適な実施の一形態を添付図面を参照しながら詳細に説明する。 In the following, a preferred embodiment of the present invention will be described in detail with reference to the accompanying drawings.
通信マスタ局及び通信スレーブ局を含むPLCシステム全体の構成図が図1に示されている。同図に示されるように、このPLCシステムは、通信マスタ局となる通信機能を有するPLC装置1と、通信スレーブ局となる複数台の通信機能を有するI/Oターミナル装置2,2・・・とを、バス型ネットワークであるフィールドバス6により繋いで構成されている。なお、図において、3はパソコンを利用した設定装置であり、PLC装置1、マスタユニット10、通信スレーブ局、中継装置4などのネットワーク上においてノードとなる各装置・機器に対して、各種の設定を行う機能を持つ。「設定ツール装置」や「ネットワークコンフィギュレータ」などと称されることもある。4は中継装置として機能するリピータ、5はフィールドバスの終端における反射を低減する終端装置である。
A block diagram of the entire PLC system including a communication master station and a communication slave station is shown in FIG. As shown in the figure, this PLC system includes a
図示のPLC装置1としては、パラレルバスの敷設された図示しないバックプレーン上に多数のコネクタを配置し、それらのコネクタに対して、CPUユニット、I/Oユニット、その他各種の高機能ユニット等々を任意に装着可能とした所謂ビルディングブロック型のPLC装置が採用されている。そして、特に、この例では、バックプレーン上の1のコネクタに対して通信マスタユニットを装着することにより、「通信機能を有するPLC装置」が構成されている。図では、それらのユニットのうちで、CPUユニット20及び通信マスタユニット10のみに参照符号が付されている。
The illustrated
通信マスタユニット10の内部構成を示すハードウェア構成図が図2に示されている。同図に示されるように、通信マスタユニット10は、通信物理層として機能する通信インタフェース(通信I/F)101と、所望の通信機能を実現するための回路をLSI化してなるマスタ用ASIC102と、CPUユニット20との間で受け渡される送受信データのバッファエリアや、後述するCPU104の演算用ワークエリア等として機能するRAM103と、マイクロプロセッサを主体として構成されて装置全体を統括制御するためのCPU104と、各種の設定データが格納される不揮発性メモリ(EEPROM)105と、各種の動作表示等を行うためのLED表示器106と、各種の設定操作等に使用される設定スイッチ107と、CPUユニット20へ通ずる内部バスへのインタフェースとして機能する内部バスインタフェース(内部バスI/F)108とを含んでいる。
A hardware configuration diagram showing an internal configuration of the
当業者にはよく知られているように、この種のPLCシステムにおいては、CPUユニット20は、共通処理、I/Oリフレッシュ処理、ユーザプログラム実行処理、周辺サービス処理等を繰り返し一巡実行しており、I/Oリフレッシュ処理の実行の際には、バックプレーン上に装着されたローカルI/Oユニットとの間のみならず、通信マスタユニット10内のRAM103との間においても、I/Oリフレッシュ処理を実行する。
As is well known to those skilled in the art, in this type of PLC system, the CPU unit 20 repeatedly executes a common process, an I / O refresh process, a user program execution process, a peripheral service process, and the like. When executing the I / O refresh process, the I / O refresh process is performed not only between the local I / O unit mounted on the backplane but also with the
具体的には、CPUユニット20のI/Oメモリ内のOUTデータは、通信マスタユニット10のRAM103内のOUTエリアに書き込まれ、同RAM103のINデータは、CPUユニット20のI/Oメモリ内のINエリアに書き込まれる。
Specifically, the OUT data in the I / O memory of the CPU unit 20 is written to the OUT area in the
一方、後に詳細に説明するように、通信マスタユニット10と各I/Oターミナル装置2との間では、CPUユニット20のI/Oリフレッシュ動作とは非同期にフィールドバス6を介する通信が行われており、これにより各I/Oターミナル装置2と通信マスタユニット10内のRAM103との間においても、一種のI/Oリフレッシュ処理が実行される。
On the other hand, as will be described in detail later, communication via the
具体的には、I/Oターミナル装置2から受信されたINデータは、通信マスタユニット10内のRAM103のINエリアに書き込まれ、CPUユニット20はI/Oリフレッシュ動作により通信マスタユニット10から取り込む。そしてCPUユニット20はINデータをもとにユーザプログラムを実行し、その実行結果をOUTデータとする。CPUユニット20はI/Oリフレッシュ動作によりOUTデータを通信マスタユニット10へ送り出す。通信マスタユニット10はOUTデータを同RAM103のOUTエリアに格納する。そして通信マスタユニット10は、I/Oリフレッシュとは非同期に、同RAM103のOUTエリアのOUTデータを、該当するI/Oターミナル装置2へ送信する。
Specifically, the IN data received from the I /
このようにして、CPUユニット20内のI/Oメモリと各I/Oターミナル装置2,2・・との間において、通信マスタユニット10を経由してI/Oリフレッシュ処理が実行され、その結果として、リモート設置された各I/Oターミナル装置2,2・・・に接続されたI/O機器をCPUユニット20で制御することが可能となるのである。
In this way, the I / O refresh process is executed between the I / O memory in the CPU unit 20 and each I /
次に、I/Oターミナル装置内部のハードウェア構成図が図3に示されている。同図に示されるように、I/Oターミナル装置2は、通信物理層として機能する通信インタフェース(通信I/F)201と、所望の通信機能を実現するための回路をLSI化してなるマスタ用ASIC202と、マイクロプロセッサを主体として構成されて装置全体を統括制御するためのCPU203と、各種の設定データが格納される不揮発性メモリ(EEPROM)204と、各種の動作表示等を行うためのLED表示器205と、各種の設定操作等に使用される設定スイッチ206と、I/O機器7との間でデータをやり取りするためのI/O部207と、装置全体に安定化直流電源を供給するための変圧機能を有する直流電源部208とを含んでいる。
Next, FIG. 3 shows a hardware configuration diagram inside the I / O terminal device. As shown in the figure, the I /
そして、通信マスタユニット10と各I/Oターミナル装置2との間では、通信マスタユニット10を通信マスタ局、各I/Oターミナル装置2を通信スレーブ局とする1対Nのマスタ・スレーブ通信を通じて、I/Oデータのやり取りが行われる。
Then, between the
具体的には、通信マスタユニット10から受信されるOUTデータは、I/Oターミナル装置2のI/O部207を介してI/O機器7(出力機器)へと送り出され、I/O機器7(入力機器)からI/O部207を介してI/Oターミナル装置2に取り込まれたINデータは、通信マスタユニット10へ宛てて送信される。
Specifically, the OUT data received from the
次に、中継装置として機能するリピータ内部のハードウェア構成図が図4に示されている。同図に示されているように、リピータ4は、マスタ側とスレーブ側にそれぞれ接続される通信インタフェース401,402と、両通信インタフェース401,402間に実装され、伝送されるデータ(信号)に対して所定の処理を行うリピータ用ASIC403と、マイクロプロセッサを主体として構成されて装置全体を統括制御するためのCPU407とを備えている。さらに、入力電圧(24V)を5Vに降圧し、リピータ4内の各素子に電源供給する電源部404を備えている。さらにまた、動作状態(通信状態)や異常/正常などを示すLED表示部405並びにノードアドレスの設定などを行うための設定スイッチ406を備えている。
Next, FIG. 4 shows a hardware configuration diagram inside the repeater functioning as a relay device. As shown in the figure, the
本発明におけるリピータ(中継局)の遅延低減化にあっては、ネットワーク上における各中継局がネットワーク上における設置位置(すなわち、ネットワーク構成)を認識することが好ましい。上述のように構成されたネットワークにおいて、送信される情報フレームの探索経路及びそのためのネットワーク構成情報教示方法の一例から説明する。 In the delay reduction of the repeater (relay station) in the present invention, it is preferable that each relay station on the network recognizes the installation position (that is, the network configuration) on the network. In the network configured as described above, an example of a search path for transmitted information frames and an example of a network configuration information teaching method therefor will be described.
先に、図1を参照しつつ説明した通信マスタ局(M)、通信スレーブ局(S)、中継局(R)は、PLCシステムのネットワーク上で固有のアドレスを保持しており、各機器の個別識別は、このアドレスにより行われる。そして、ネットワークの立ち上げ管理から通常通信に至るまでには、本実施形態のネットワーク構成情報教示方法が適用される。 The communication master station (M), the communication slave station (S), and the relay station (R) described above with reference to FIG. 1 have unique addresses on the PLC system network. Individual identification is performed by this address. The network configuration information teaching method of the present embodiment is applied from network startup management to normal communication.
先ず、マスタ局(M)から一斉同報送信(1対N通信)される第1のフレームを媒介として、中継局(R)から中継局(R)及び中継局(R)からスレーブ局(S)へと局アドレスを受け渡すことで、中継局(R)及びスレーブ局(S)のそれぞれに、ネットワーク内における「自局の上位側隣接局情報」を生成保存させる動作が行われる。 First, the relay station (R) to the relay station (R) and the relay station (R) to the slave station (S) through the first frame broadcasted simultaneously (one-to-N communication) from the master station (M). ), The relay station (R) and the slave station (S) generate and store the “upper neighbor station information of the own station” in the network.
この動作は、電源投入時等のように、マスタ局がネットワークに接続された中継局並びにスレーブ局を認識する以前の段階で行ってもよいし、ネットワーク運用中のように、マスタ局がネットワークに接続された中継局並びにスレーブ局を認識したのちの段階で随意に行ってもよい。 This operation may be performed at a stage before the master station recognizes the relay station and slave station connected to the network, such as when the power is turned on, or the master station is connected to the network during network operation. It may be optionally performed at a stage after recognizing the connected relay station and slave station.
この実施形態では、探索フレーム(一般にSolicitFrame又はBeaconFrame等と呼ばれるものが該当する。以下、BeaconFrameと記述し、BFと略記するがいずれもSolicitFrameを含む意味である)が使用される。BFのフレームフォーマットを示す構成図が図5に示されている。 In this embodiment, a search frame (generally called a SolicitFrame, a BeaconFrame, or the like is applicable. Hereinafter, it is described as BeaconFrame, and is abbreviated as BF, but both mean to include SolicitFrame) is used. A block diagram showing the frame format of the BF is shown in FIG.
同図に示されるように、フィールドバス6を流れるBFには、BFであることを識別するためのBF識別ヘッダ501と、中継局を通過するたびにその中継局のアドレス値により更新される中継局アドレス502と、中継局を通過するたびにその値が+1インクリメントされる中継局カウンタ503と、BFの通信転送速度を示す伝達速度504とが少なくとも含まれている。
As shown in the figure, the BF flowing through the
通信マスタ局(M)は、BFがネットワークに接続されている全ての中継局及び通信スレーブ局(S)に伝わるようにBFを一斉同報送信する。すると、一斉同報送信されたBFは、直接にスレーブ局(S)へ、又は、1もしくは2段以上の中継局を経由してスレーブ局へと到達する。このとき、各経路を流れるBFはその経路の線路遅延時間、及び通過中継局の中継遅延時間をもって僅かに遅れるものの、全体としてはほぼ同時刻に各中継局及び各スレーブ局に到達すると考えることができる。 The communication master station (M) broadcasts the BF simultaneously so that the BF is transmitted to all relay stations and communication slave stations (S) connected to the network. Then, the BF that has been broadcast simultaneously reaches the slave station (S) directly, or reaches the slave station via one or more relay stations. At this time, although the BF flowing through each path is slightly delayed by the line delay time of the path and the relay delay time of the passing relay station, it can be considered that the BF reaches each relay station and each slave station at almost the same time as a whole. it can.
フレームの送受信シーケンスの説明図(その1)が図6に示されている。同図に示されるように、マスタ局(アドレス10)からは、中継局アドレスの値が「10」及び中継局カウンタの値が「0」の状態にあるBFがネットワーク上に一斉同報送信される。 An explanatory diagram (part 1) of the frame transmission / reception sequence is shown in FIG. As shown in the figure, from the master station (address 10), a BF having a relay station address value of “10” and a relay station counter value of “0” is broadcast on the network. The
この一斉同報送信されたBFを中継局(アドレス100)がその上位ポートから受信すると、BF内の中継局アドレス502の値「10」及び中継局カウンタ503の値「0」はBFから読み出され、中継局(アドレス100)内のメモリに格納保持される。これにより、中継局(アドレス100)は、上位側に1つ隣接する局の局アドレスが「10」であるとして、自局の相対位置を認識することができる。この場合、中継局(アドレス100)が生成する「自局の上位側隣接局情報」の内容は、「自局の上位側隣接局情報」(局アドレス「10」)となる。
When the relay station (address 100) receives the broadcasted BF from its upper port, the value “10” of the
その後、BF内の中継局アドレス502の値は、「10」(マスタ局アドレス:上位側へ1つ隣接する局の局アドレス)から「100」(中継局アドレス:自局アドレス)へと置き換えられる。同時に、中継局カウンタ503の値「0」は+1インクリメントされて「1」となる。こうして、中継局アドレス502の値が書き替えられ、かつ中継局カウンタ503の値が+1インクリメントされた新たなBFが、次段に位置するスレーブ局(アドレス101)へとその下位ポートから送信される。
Thereafter, the value of the
中継局(アドレス100)から送信されたBFをスレーブ局(アドレス101)が受信すると、BF内の中継局アドレス502の値「100」及び中継局カウンタ503の値「1」はBFから読み出され、スレーブ局(アドレス101)内のメモリに格納保持される。これにより、スレーブ局(アドレス101)は、上位側に1つ隣接する局の局アドレスが「100」であるとして、自局の相対位置を認識することができる。この場合、スレーブ局(アドレス101)が生成する「自局の上位側隣接局情報」の内容は、上位側に1つ隣接する局の局アドレスが「100」であるから、「自局の上位側隣接局情報」(局アドレス「100」)となる。
When the slave station (address 101) receives the BF transmitted from the relay station (address 100), the value “100” of the
このように、情報保存フェーズ(フェーズI)が実行されると、マスタ局から一斉同報送信されるBFを媒介として、マスタ局(アドレス10)から中継局(アドレス100)、中継局(アドレス100)からスレーブ局(アドレス101)へと局アドレスを受け渡すことで、中継局(アドレス100)及びスレーブ局(アドレス101)のそれぞれに、ネットワーク内における自局の上位側隣接局情報と中継局カウンタ値とが生成保存されることなる。 In this way, when the information storage phase (phase I) is executed, the master station (address 10) to the relay station (address 100), the relay station (address 100) via the BF broadcast simultaneously from the master station. ) From the slave station (address 101) to the relay station (address 100), the relay station (address 100) and the slave station (address 101) are respectively notified of the higher-level neighboring station information and the relay station counter in the network. Values are generated and stored.
なお、図6に示される例にあっては、マスタ局とスレーブ局との間には中継局が1段しか介在されていないが、それらの局間に2段以上の中継局が介在されていたり、あるいは、マスタ局とスレーブ局との間に中継局が全く介在されていない場合においても、各中継局並びに各スレーブ局の動作は同様である。 In the example shown in FIG. 6, only one relay station is interposed between the master station and the slave station, but two or more relay stations are interposed between these stations. Even when no relay station is interposed between the master station and the slave station, the operation of each relay station and each slave station is the same.
中継局のBF受信時の処理フロー(その1)が図7に示されている。なお、このフローに示される処理は、図4に示されるリピータ4内のCPU407により実行される。
FIG. 7 shows a processing flow (No. 1) when the relay station receives BF. The process shown in this flow is executed by the
同図において、処理が開始されると、まず、フレーム受信待機処理が実行される(ステップ701)。この状態において、何らかのフレームが受信され(ステップ702YES)、そのフレームのBF識別ヘッダ501に基づいて、そのフレームがBFであると判定されると(ステップ703YES)、以下の処理(ステップ704〜709)が順次に実行される。
In the figure, when processing is started, first, frame reception standby processing is executed (step 701). In this state, when any frame is received (YES in step 702) and it is determined that the frame is BF based on the
先ず、フレームの解析が行われて、当該フレームの構造が認識される(ステップ704)。次いで、フレーム内のアドレス情報(中継局アドレス502)、カウンタ情報(中継局カウンタ503)が読み出され、所定のメモリに格納保持される(ステップ705,706)。次いで、フレーム内のアドレス情報(中継局アドレス502)が自アドレスに置換される(ステップ707)。次いで、フレーム内のカウンタ情報(中継局カウンタ503)が、+1インクリメントされた値で置換される(ステップ708)。最後に、こうして得られた新たなフレームが、下位ポートに出力される(709)。
First, the frame is analyzed and the structure of the frame is recognized (step 704). Next, address information (relay station address 502) and counter information (relay station counter 503) in the frame are read out and stored in a predetermined memory (
通信スレーブ局のBF受信時の処理フロー(その1)が図8に示されている。なお、このフローに示される処理は、図3に示されるI/Oターミナル装置2内のCPU203により実行される。
FIG. 8 shows a processing flow (No. 1) at the time of BF reception of the communication slave station. The processing shown in this flow is executed by the
同図において、処理が開始されると、まず、フレーム受信待機処理が実行される(ステップ801)。この状態において、何らかのフレームが受信され(ステップ802YES)、そのフレームのBF識別ヘッダ501に基づいて、そのフレームがBFヘッダと判定されると(ステップ803YES)、以下の処理(ステップ804〜806)が順次に実行される。
In the figure, when processing is started, first, frame reception standby processing is executed (step 801). In this state, when any frame is received (YES in step 802) and the frame is determined to be a BF header based on the
先ず、フレームの解析が行われて、当該フレームの構造が認識される(ステップ804)。次いで、フレーム内アドレス情報(中継局アドレス502)、フレーム内カウンタ情報(中継局カウンタ503)が読み出され、「自局の上位側隣接局情報」として所定のメモリに格納保持される(ステップ805,806)。 First, the frame is analyzed, and the structure of the frame is recognized (step 804). Next, in-frame address information (relay station address 502) and in-frame counter information (relay station counter 503) are read out and stored in a predetermined memory as “upper neighbor information of own station” (step 805). 806).
このようにして、中継局及びスレーブ局のそれぞれに、ネットワーク内における自局の上位側隣接局情報と中継局カウンタ値とが生成保存され、この情報がマスタ局にフィードバックされることにより、マスタ局にてシステム全体の構成図が把握される。なお、BFを利用する方法以外にもネットワーク構成情報教示方法はある。例えば、作業者が実際のネットワーク構成から各スレーブ局においてマスタ局との間に介在する中継局の数を確かめ、その結果をマスタ局に登録する方法であっても良い。つまり、設定装置3からマスタ局に対して各スレーブ局の中継局の段数情報を送信して書き込む方法であっても良い。この方法であれば、その後、マスタ局から各スレーブ局に対して中継局の段数情報を送信して書き込むことになる。
In this way, each of the relay station and the slave station generates and stores the higher-side neighboring station information of the own station and the relay station counter value in the network, and this information is fed back to the master station. The system diagram of the entire system can be grasped. In addition to the method using BF, there is a network configuration information teaching method. For example, a method may be used in which an operator confirms the number of relay stations intervening with the master station in each slave station from the actual network configuration and registers the result in the master station. That is, a method may be used in which the
他の方法として、例えば、作業者が実際のネットワーク構成から各スレーブ局においてマスタ局との間に介在する中継局の数を確かめ、その結果をスレーブ局に登録する方法であっても良い。つまり、設定装置3から直接的に各スレーブ局に対して、中継局の段数情報を送信して書き込む方法であっても良い。各スレーブ局に直接的に中継局段数を登録する場合の、別方法としては、スレーブ局に操作ボタンを設け、作業者がスレーブ局の操作ボタンを中継局段数と同じ数だけ押すことで登録できるような方法としても良い。
As another method, for example, an operator may check the number of relay stations intervening with the master station in each slave station from the actual network configuration, and register the result in the slave station. That is, a method of transmitting and writing the relay station stage number information directly from the
次に、本発明の要部であるネットワーク上の中継局にて生じるリピータ遅延の低減化方法について図9〜16を参照して詳細に説明する。尚、これらの図において、符号30はマスタ局を、40a〜eはスレーブ局(その1〜5)を、50a及びbは中継局(その1及び2)を、31はネットワーク幹線を、32はネットワーク幹線から分岐しているネットワーク支線その1、そして33はネットワーク幹線から分岐しているネットワーク支線その2をそれぞれ示している。
Next, a method for reducing a repeater delay generated in a relay station on a network, which is a main part of the present invention, will be described in detail with reference to FIGS. In these figures,
本発明に係るPLCシステムには、以下に説明を行うマスタ局からスレーブ局に対してのみ発せられる専用フレーム(例えば、BeaconFrame, OutFrame, TrgFrame)と、スレーブ局からマスタ局に対してのみ発せられる専用フレーム(例えば、ConnectionFrame, InFrame)、双方向に発せられるフレーム(例えば、EventFrame)が存在し、中継局にて前記フレーム種類を判別し、必要方向のみに転送する中継局を特徴とするものである。なお、BeaconFrame(ビーコンフレーム)は、前述の探索フレームであり、定期的にマスタ局から送信するもので、送信伝送速度とリピータ通過段数をスレーブ局に通知する働きをする。OutFrame(アウトフレーム)は、PLCのユーザプログラム実行結果などをOUTデータとし、マスタ局からスレーブ局へ送信するものである。TrgFrame(トリガフレーム)は、マスタ局からスレーブ局に対してConnectionFrameの返信を要求するためのものである。ConnectionFrame(コネクションフレーム)は、スレーブ局がトリガフレームを受信した場合に、トリガフレームで指定されていた時にマスタ局へ返信するものである。マスタ局は、このConnectionFrameを返送してきたスレーブ局に対して存在確認(図18のステップ1103YES)または加入処理(図18のステップ1104,1105)を行う。InFrame(インフレーム)は、スレーブ局が入力機器から取り込んだINデータをマスタ局へ送信するものである。EventFrame(イベントフレーム)は、インフレームとは別に、マスタ局からの要求によりスレーブ局が何らかのデータをマスタ局へ送信するためのフレームである。
In the PLC system according to the present invention, a dedicated frame (for example, BeaconFrame, OutFrame, TrgFrame) issued only from the master station to the slave station described below, and a dedicated frame issued only from the slave station to the master station There is a frame (for example, ConnectionFrame, InFrame), a frame that is emitted in both directions (for example, EventFrame), the relay station distinguishes the frame type, and the relay station transfers only in the necessary direction. . The BeaconFrame (beacon frame) is the above-described search frame, which is periodically transmitted from the master station, and serves to notify the slave station of the transmission transmission rate and the number of repeater passing stages. OutFrame is a PLC user program execution result or the like as OUT data and is transmitted from the master station to the slave station. TrgFrame (trigger frame) is used to request a ConnectionFrame response from the master station to the slave station. The connection frame (connection frame) is a reply to the master station when the slave station receives the trigger frame and is designated by the trigger frame. The master station performs existence confirmation (YES in
図10及び図11にて示されるように、本実施形態におけるPLCシステムは、バス型ネットワークにおいて、ネットワークを管理するマスタ局30と、I/O等を制御するスレーブ局40、及び通信フレームを整形・増幅する中継局50とから構成されている。
As shown in FIG. 10 and FIG. 11, the PLC system in the present embodiment shapes a
各フレームの基本構造が図9に示されている。同図にて示されるように、各フレームは、フレームが始まることを示すスタートコード901、フレームの種別を示すフレーム識別ヘッダ902、フレームの内容を示すフレームデータ903、及びフレームの正当性を示すチェックコード904(CRCデータ等)の4つの要素少なくとも含むものである。ネットワーク上の中継局50は、このスタートコード901を認識した時点で波形の整形を行い、他方のポートに出力を開始する。この波形の整形を行うことで、ネットワークの敷設距離を延長することが可能とされている。
The basic structure of each frame is shown in FIG. As shown in the figure, each frame has a
しかしながら、スタートコード901を判別した段階で中継処理を行った場合、スレーブ局40からマスタ局30宛てに送信するデータも、他のスレーブ局宛てに中継が行われてしまうため、不要な中継セグメントにもデータが送信され、ネットワークの占有効率が低下してしまっていた。
However, when relay processing is performed at the stage where the
図10にマスタ局30からスレーブ局40に対してのフレーム送信を行う場合が示されている。マスタ局30からスレーブ局40に対してのフレームは一斉同報的なフレームであるため、全てのフレームを同時に中継することで対応が可能である。同図にて示されるように、マスタ局30から発せられるフレームは、スレーブ局40aのみならず、中継局50aを介してスレーブ局40d、そしてスレーブ局40eへも送信される。尚、図示していないが、中継局50bを介してスレーブ局40b及びスレーブ局40cにも送信されている。
FIG. 10 shows a case where frame transmission from the
それに対して、図11にスレーブ局40からマスタ局30に対してのフレーム送信を行う場合が示されている。同図にて示されるように、例えば、スレーブ局40dからマスタ局30に対してフレーム送信する場合、中継局50aがフレームの整形・増幅を行い、マスタ局30に対してフレーム送信を行うのであるが、従来では同時に中継局50bがそのフレームを受信し、下位ポートにフレーム送信を行ってしまっていた。このため、スレーブ局40b及び40cは、マスタ30局に送信できるネットワークの空き時間が確保できずに、ネットワークの通信効率が低下してしまっていた。
On the other hand, FIG. 11 shows a case where frame transmission from the slave station 40 to the
図12にて上記の場合におけるネットワーク占有率が示されている。同図にて示されるように、ネットワーク支線32上に配置されているスレーブ局40dからマスタ局宛のフレームは、ネットワーク支線32から中継局50aによって中継されてネットワーク幹線31へと送り出されてマスタ局30へと送信される。ところが、マスタ局30へと送信されると共に、ネットワーク支線33上に設置されている中継局50bによって中継され、スレーブ局40bへも送信されてしまう。本来マスタ局宛てであるスレーブ局40dからのフレームがネットワーク支線32と中継局50bを経由してスレーブ局40bへも送信されてしまう。その結果、ネットワーク支線33上にスレーブ局40dからマスタ局30宛のフレームが中継されることによって余分な占有が生じてしまい、その分スレーブ局40bからマスタ局30宛のフレームの送信が遅れてしまっている。
FIG. 12 shows the network occupation ratio in the above case. As shown in the figure, a frame addressed to the master station from the
尚、図示しないが、同様にスレーブ局40bから送信されるマスタ局30宛のフレームも中継局50aを経由してスレーブ局40d及び40eにも送信されてしまい、ネットワーク支線32上に余分なセットワーク占有を発生させていた。
Although not shown in the figure, a frame transmitted from the
各中継局にて受信するフレームを識別し、不要な中継処理を行わないようにした場合が図13にて示されている。同図と図12とを比較することで明確であるが、スレーブ局40dからマスタ局30宛のフレームを中継局50bが識別し、中継処理を行わないようにすることで、ネットワーク支線33上の余分なネットワーク占有が発生せずに、スレーブ局40bからマスタ局30宛のフレームをスムーズに送信することが可能となっている。このように、中継局にてフレーム識別ヘッダを判断し、必要な方向のみに中継処理を行うことで、ネットワーク支線33の通信時間が確保でき、スレーブ局40b及び40cが通信可能となり、ネットワーク効率の向上が実現可能である。ここでは、ネットワーク支線33の通信時間を確保することを記載しているが、他の中継局でも同様の処理を行うことにより、ネットワーク全体の効率が向上されることは言うまでもない。
FIG. 13 shows a case where a frame received by each relay station is identified and unnecessary relay processing is not performed. It is clear by comparing FIG. 12 with FIG. 12, but the
上述のようにフレームを識別し不要な中継を行わないようにされた中継局の機能ブロック図が図14に示されている。同図にて示されるように、各中継局には上位ポート411と下位ポート417とが双方向シリアルバスによってネットワークに接続されている。
FIG. 14 shows a functional block diagram of a relay station that identifies frames and prevents unnecessary relaying as described above. As shown in the figure, each relay station has an
まず、上位ポート411側からフレームが送信されてきた場合を説明する。双方向シリアルバスを介して上位ポート411に送られてきたフレーム(受信データ)はスタートコード検出部412へと送られる。そして、受信データはスタートコード検出部412からデータバッファリング部413にて蓄積され、後にリピートフレーム生成部416へと送られる。このとき、スタートコード検知部412は、データバッファリング部413へと受信データを送ると共に、フレーム種別識別部414へも受信データとスタートコード検知信号を送る。次に、フレーム種別識別部414にスタートコード検知信号が送られると、フレームの種別が識別され、その識別結果がフレーム種別情報信号として下位リピートコントロール部415へと送られる。下位リピートコントロール部415では、フレーム種別情報信号にて規定されるフレームの種類によって、受信したフレームがリピート対象フレームであるかどうかの判定を行う。
First, a case where a frame is transmitted from the
この下位リピートコントロール部415における判定方法は以下のようになっている。既に説明したように、ネットワーク上の各中継局はネットワーク構成情報教示方法を用いることにより、ネットワーク上の自己の位置や他の中継局及びスレーブ局との相対位置を把握している。この場合、上位ポート411側にて受信したフレームに対する判定なので、ネットワークにおける上流から送信されてきたフレームに対して当該中継局からさらに下流側に中継するかどうかを判定するものである。そのため、例えば受信データがマスタ局からスレーブ局宛てのフレームであれば、ネットワークの上流から送信されてくるべきフレームであり、下位ポートを介して更に下流へと中継するべきフレームであると判断される。一方、受信データがスレーブ局からマスタ局宛のフレームであれば、マスタ局は中継局より上流側に位置しているため、下位ポートを介して下流へと中継処理(リピート)は行う必要のないフレームであると判断される。
The determination method in the lower
このような判定処理を経て、対象フレームが中継を行う必要があるフレームであると判定された場合、リピートフレーム生成部416に対してリピート開始信号を送信する。このリピート開始信号を受信したリピートフレーム生成部416はデータバッファリング部413に蓄積されている受信データをリピート送信フレームデータとして下位ポート417を介してネットワーク上に送信する。尚、下位リピートコントロール部415は、リピート開始信号をリピートフレーム生成部416へと送信すると共に、抑制信号を上位リピートコントロール部421にも送信する。中継局においては、自己が発信したフレームをまた自己で受信してしまうことがある。そのようなこのことのないように、下位ポート417からフレームデータを送信する際には、上位リピートコントロール部421を介して上位ポート411にて受信を抑制するための信号を下位リピートコントロール部415にて送信するものである。
When it is determined through such determination processing that the target frame is a frame that needs to be relayed, a repeat start signal is transmitted to the repeat
下位リピートコントロール部415にて中継を行う必要がないと判定された場合、リピート開始信号は生成されず、受信データの中継処理は行われない。
When the lower
同様に、下位ポート417側からフレームが送信されてきた場合を以下に説明する。双方向シリアルバスを介して下位ポート417に送られてきたフレーム(受信データ)はスタートコード検出部418へと送られる。そして、受信データはスタートコード検出部418からデータバッファリング部419にて蓄積され、後にリピートフレーム生成部422へと送られる。このとき、データバッファリング部419へと受信データが送られると共に、フレーム種別識別部420へも受信データとスタートコード検知信号が送られる。次に、フレーム種別識別部420にスタートコード検知信号が送られると、フレームの種別が識別され、その識別結果がフレーム種別情報信号として上位リピートコントロール部421へと送られる。上位リピートコントロール部421では、フレーム種別情報信号にて規定されるフレームの種類によって、上位ポート411を介してさらに中継処理(リピート)を行うかどうかの判定を行う。
Similarly, a case where a frame is transmitted from the
この上位リピートコントロール部421における判定方法も上述した上位ポート411からの受信時と同様であるが、この場合は下位ポート417側にて受信したフレームについての判定なので、ネットワークにおける下流から送信されてきたフレームとなる。そのため、受信データがスレーブ局からマスタ局宛てのフレームであれば、ネットワークの下流から送信されてくるべきフレームであり、上位ポートを介して更に上流へと中継するべきフレームであると判断される。一方、受信データがマスタ局からスレーブ局宛のフレームであれば、スレーブ局は中継局より下流に位置しているため、上位ポートを介して上流に位置するマスタ局への中継処理(リピート)は行う必要のないフレームであると判断される。
The determination method in the upper
このような判定処理を経て、中継を行う必要があると判定された場合、リピートフレーム生成部422に対してリピート開始信号を送信する。このリピート開始信号を受信したリピートフレーム生成部422はデータバッファリング部419に蓄積されている受信データをリピート送信フレームデータとして上位ポート411を介してネットワーク上に送信する。尚、上位リピートコントロール部421は、リピート開始信号をリピートフレーム生成部422へと送信すると共に、抑制信号を下位リピートコントロール部415にも送信する。中継局においては、自己が発信したフレームをまた自己で受信してしまうことがある。そのようなこのことのないように、上位ポート411からフレームデータを送信する際には、下位リピートコントロール部415を介して下位ポート417にて受信を抑制するための信号を上位リピートコントロール部421にて送信するものである。
When it is determined that it is necessary to perform relaying through such determination processing, a repeat start signal is transmitted to the repeat
上位リピートコントロール部421にて中継を行う必要がないと判定された場合、リピート開始信号は生成されず、受信データを中継は行われない。
If the upper
中継局にて行われる処理が図15のフローチャートにて示されている。同図にて示されるように、上位ポート側においては、先ず、フレーム受信を待つ待機状態にて始まる(ステップ1501)。フレーム受信後、受信したフレームのスタートコードを検出する(ステップ1502)。当該フレームのスタートコードが検出されたら、先に図9にて説明したフレームに含まれるフレーム識別ヘッダを基にヘッダー識別(フレーム種類の識別)を行い、そのフレーム種類がリピート対象フレームであるか否かを判定する(ステップ1503)。対象フレームがリピート対象フレームである場合(ステップ1503、リピート対象フレーム)、下位ポートへの受信とリピートとを停止させる信号を送信し(ステップ1504)、その後下位ポートへのリピート処理を開始する(ステップ1505)。一方で、ステップ1503に戻り、対象フレームがリピート不可フレームである場合(ステップ1503、リピート不可フレーム)、そのフレームに対するリピート処理は行わず、ステップ1501に戻り、次の受信フレームを待機する。
The processing performed at the relay station is shown in the flowchart of FIG. As shown in the figure, the host port side first starts in a standby state waiting for frame reception (step 1501). After receiving the frame, the start code of the received frame is detected (step 1502). When the start code of the frame is detected, header identification (frame type identification) is performed based on the frame identification header included in the frame described above with reference to FIG. 9, and whether or not the frame type is a repeat target frame. Is determined (step 1503). If the target frame is a repeat target frame (
同様に、下位ポート側においてもフレーム受信を待つ待機状態にて始まる(ステップ1506)。フレーム受信後、受信したフレームのスタートコードを検出する(ステップ1507)。当該フレームのスタートコードが検出されたら、当該フレームに含まれるフレーム識別ヘッダを基にヘッダー識別(フレーム種類の識別)を行い、そのフレーム種類がリピート対象フレームであるか否かを判定する(ステップ1508)。対象フレームがリピート対象フレームである場合(ステップ1508、リピート対象フレーム)、上位ポートへの受信とリピートとを停止させる信号を送信し(ステップ1509)、その後上位ポートへのリピート処理を開始する(ステップ1510)。一方で、ステップ1508に戻り、対象フレームがリピート不可フレームである場合(ステップ1508、リピート不可フレーム)、そのフレームに対するリピート処理は行わず、ステップ1506に戻り、次の受信フレームを待機する。
Similarly, the lower port side starts in a standby state waiting for frame reception (step 1506). After receiving the frame, the start code of the received frame is detected (step 1507). When the start code of the frame is detected, header identification (frame type identification) is performed based on the frame identification header included in the frame, and it is determined whether or not the frame type is a repeat target frame (step 1508). ). If the target frame is a repeat target frame (
このような構成により、各中継局は、受信したフレームの種別を判別し、中継が必要なフレームのみを中継することができる。尚、上記実施例では、中継局2つと、スレーブ局5つのネットワーク構成として説明したが、異なる構成のネットワークにおいても同様の処理を行うことで同じ効果を得ることが可能である。 With such a configuration, each relay station can determine the type of received frame and relay only frames that need to be relayed. In the above embodiment, the network configuration is described as two relay stations and five slave stations. However, the same effect can be obtained by performing the same processing in different networks.
また、このような機能を備えた中継局は、中継するフレームと、中継しないフレームとを設定により切り替えることも可能である。同様に、設定により中継処理を行わない期間(時間)を設けるようにすることも可能である。 In addition, a relay station having such a function can switch between a frame to be relayed and a frame not to be relayed by setting. Similarly, it is also possible to provide a period (time) during which no relay process is performed by setting.
さらには、上記の構成において、任意の中継局の中継動作そのものを停止させることも可能である。これにより、中継動作が停止された中継局で区切られた独立ネットワークが存在可能になる。 Furthermore, in the above configuration, the relay operation itself of an arbitrary relay station can be stopped. As a result, an independent network separated by relay stations whose relay operation has been stopped can exist.
ネットワーク内の一つの中継局を区切りとして独立ネットワークを構成した一例が図16に示されている。同図において、基本的構成は先に説明した図10並びに図11と同様であるため、同じ構成要素には同じ符号を付与し、説明を省略する。図16においては、ネットワーク支線32上にサブマスタ(副マスタ)局60を設置した点において図10並びに図11のネットワーク構成と異なる。このようなネットワーク構成において、ネットワーク支線32上の中継局50aにおける中継動作を停止するように設定することによって、中継動作が停止された中継局50aで区切られた独立ネットワークを構成することが可能となる。より詳細には、同図のネットワークにおいて、中継局50aにて区切られているネットワーク支線32と、そのネットワーク支線32上に設置されているスレーブ局40d、スレーブ局40e、及び新たに設置されたサブマスタ局60が独立ネットワークとして構成されている。そして、この、独立ネットワークにサブマスタ局60が接続されていることで、独立ネットワーク内での高速通信が可能になる。
An example in which an independent network is configured with one relay station in the network as a partition is shown in FIG. In this figure, the basic configuration is the same as that of FIG. 10 and FIG. 11 described above, so the same reference numerals are given to the same components and the description thereof is omitted. 16 differs from the network configurations of FIGS. 10 and 11 in that a submaster (submaster)
なお、この独立させたネットワークを再度同一ネットワークに組み込む場合には、サブマスタ局60から中継局50aに対して復帰指示のフレームを送信。中継局50aは復帰指示のフレームを受信した場合、マスタ局30に対して復帰します(しました)というステータスを示すフレームを返信し中継動作を再開する。これにより、ネットワークが復帰する。
When this independent network is incorporated into the same network again, a return instruction frame is transmitted from the
また、上記の復帰方法の場合、復帰するまでに時間かかってしまう場合がある。この場合、中継動作を停止させる対象中継局(この例では中継局50a)の上位ポートにおいて、特定のフレームを受信した時から一定時間のみ中継動作を停止するように設定しても良い。そのような構成とすることで、通常はネットワークの一部として動作し、所定のフレームをマスタ局から受信した場合、所定期間中継動作を停止させ、ネットワークから切り離された独立ネットワークが構成される。そして、中継局が中継動作を停止している期間のみサブマスタ60が動作するように設定すれば、独立ネットワークとして所定期間動作し、期間の満了とともに中継動作を再会し、通常のネットワークに戻ることが可能となる。このようにして、中継局にて区切られた独立ネットワークを効率よく形成し、その独立ネットワーク内での高速通信が実現され、通常のネットワークへの復帰も容易となる。
In the case of the above-described return method, it may take time to return. In this case, it may be set such that the relay operation is stopped only for a predetermined time from the reception of a specific frame at the upper port of the target relay station (the
次に、本発明が適用されたネットワークにおける通信フレームの流れを、図17〜20を参照しつつ説明する。図17は先に従来例の説明にて用いたネットワークのシステム構成図であるが、同じシステム構成に本発明を用いた場合を以下に説明する。言うまでもないが、図17の構成については既に従来例の説明にて詳細に説明しているため、ここでの説明は省略する。 Next, the flow of communication frames in a network to which the present invention is applied will be described with reference to FIGS. FIG. 17 is a system configuration diagram of the network used in the description of the conventional example. The case where the present invention is used in the same system configuration will be described below. Needless to say, since the configuration of FIG. 17 has already been described in detail in the description of the conventional example, description thereof is omitted here.
このような構成のネットワークシステムにおけるマスタ局の動作を図18に示されるフローチャートを参照して説明する。同図にて示されるように、マスタ局は先ずBF(Beaconフレーム)の送信を行う(ステップ1101)。このBFは、所定間隔毎に一斉同報的に送信され、各スレーブ局に、マスタ局からの送信経路上に中継局が何段(何個)存在するかを通知する働きを有する。続いて、トリガフレームの送信を行う(ステップ1102)。このトリガフレームは、特定のアドレスに対して送信されるものであり、対象スレーブ局にて受信後にCNフレームを送信するようにとの指示が含まれている。そのため、マスタ局は、トリガフレームの送信後、スレーブ局からCNフレームが返信されて来たかを確認する(ステップ1103)。ここで言うCNフレームとは、マスタ局が送信するトリガフレームに対するスレーブ局の応答フレームのことである。マスタ局は、このCNフレームを返信してきたスレーブに対して以下の加入処理を行う。CNフレームが返信されてきている場合(ステップ1103,YES)、CNフレームの送信元であるスレーブ局の加入処理を行う。この加入処理として、スレーブ情報の読み出し処理を行うStatusReadフレームを送信する(ステップ1104)。この読み出し処理には、同図のフローチャートでは省略しているが、対象スレーブ局へのStatusReadの送信と、その応答の受信が実行される。そして、スレーブ局からの応答に含まれる対象スレーブ局の種別情報や対応するスレーブの中継局通過段数の読み出し処理が行われる。この読み出し処理で得られたスレーブ局情報によってマスタ局はネットワーク構成を把握し、その情報を基に、タイムドメインの作成を行う。そして、加入処理のもう一つの処理として、StatusWriteによるスレーブに対する情報書き込み処理(ステップ1105)が行われる。この書き込み処理においても、同図のフローチャートでは省略しているが、StatusWriteの対象スレーブ局への送信処理が行われている。このStatusWriteには、作成されたタイムドメインが含まれており、スレーブ局側にてそのタイムドメインにて指定されるタイミングで応答処理を行うようにスレーブ局側に指示するものである。これらの処理が終了すると、またステップ1101に戻る。
The operation of the master station in the network system having such a configuration will be described with reference to the flowchart shown in FIG. As shown in the figure, the master station first transmits a BF (Beacon frame) (step 1101). This BF is transmitted simultaneously at predetermined intervals, and has a function of notifying each slave station how many (how many) relay stations exist on the transmission path from the master station. Subsequently, a trigger frame is transmitted (step 1102). This trigger frame is transmitted to a specific address, and includes an instruction to transmit the CN frame after reception at the target slave station. Therefore, the master station confirms whether a CN frame has been returned from the slave station after transmitting the trigger frame (step 1103). The CN frame referred to here is a response frame of the slave station to the trigger frame transmitted by the master station. The master station performs the following joining process on the slave that has returned the CN frame. If a CN frame has been returned (
次に、スレーブ局側の動作を図19を参照して説明する。マスタ局からのBFにより、先に説明した方法を用いてフレームの伝送速度及び自己の中継局通過段数を把握する(ステップ1201)。そして、この把握処理が完了したらマスタ局からのトリガフレームを受信できる状態に遷移する(ステップ1202)。マスタ局からのトリガフレームの受信有無の確認が行われる(ステップ1203)。このとき、トリガフレームの受信が確認できなければ(ステップ1203,NO)、トリガフレームを受信するまで待機する。マスタ局からのトリガフレームの受信が確認できたら(ステップ1203,YES)、そのトリガフレームが自局宛であるかどうか(自分がCN応答該当ノードであるかどうか)を識別する(ステップ1204)。このとき、自分がCN応答該当ノードでなければ(ステップ1204,NO)、ステップ1203に戻り、次のトリガフレームを待つ。そして、自分がCN応答該当ノードである場合(ステップ1204,YES)、マスタ局に対してCNフレームの返信を行う(ステップ1205)。続いて、マスタ局からのStatusReadの受信を待つ(ステップ1206及びステップ1206,NO)。マスタ局からのStatusReadを受信したら(ステップ1206,YES)、受信したStatusReadに対して、自局中継局通過段数を応答としてマスタ局に返信する(ステップ1207)。続いて、マスタ局からのStatusWriteの受信を待つ(ステップ1208及びステップ1208,NO)。マスタ局からのStatusWriteを受信したら(ステップ1208,YES)、StatusWriteのパラメータで加入状態に遷移するとともに、タイムドメインの反映を行う(ステップ1209)。このタイムドメインの反映とは、マスタ局にて作成されたタイムドメインにおいて指定される応答タイミングで応答フレームを送信するように自局を設定するものである。
Next, the operation on the slave station side will be described with reference to FIG. Based on the BF from the master station, the frame transmission rate and the number of relay station passing stages are ascertained using the method described above (step 1201). When this grasping process is completed, the state transitions to a state where a trigger frame from the master station can be received (step 1202). Whether or not a trigger frame is received from the master station is confirmed (step 1203). At this time, if the reception of the trigger frame cannot be confirmed (
以上のようにして、マスタユニットとすべてのスレーブユニットについてイニシャル処理が終了したら、I/O情報を交換する通信サイクルが以下のように実行される。マスタユニットは、出力データを含んだ要求フレームをスレーブに対して一斉同報する。それぞれのスレーブユニットは、マスタユニットから受信したタイムドメインに基づいて入力データを含んだ応答フレームを順番に送信する。すべてのスレーブユニットが応答フレームを送信した後、マスタユニットは再度要求フレームを一斉同報し、I/O情報交換の通信サイクルを繰り返す。 As described above, when the initial processing is completed for the master unit and all the slave units, a communication cycle for exchanging I / O information is executed as follows. The master unit broadcasts a request frame including output data to the slaves. Each slave unit sequentially transmits response frames including input data based on the time domain received from the master unit. After all the slave units have transmitted the response frame, the master unit broadcasts the request frame again and repeats the I / O information exchange communication cycle.
図17にて示される4つの観測点A〜Dにおいて、マスタ局が送信する要求フレームと各スレーブ局が応答する応答フレームを時系列的に示す動作モデルが図20に示されている。同図にて示されるように、観測点Aにおいては、マスタ局からの要求フレームに加え、各スレーブ局からの応答フレームが知見されているが、その他の観測点B,C,Dにおいては、マスタ局からの要求フレームと、ネットワーク構成において各観測点より下流に位置するスレーブ局からの応答フレームのみ知見され、図21に示した従来例のように、不要なフレームの中継がなされていないことが明確である。 FIG. 20 shows an operation model showing, in time series, the request frame transmitted from the master station and the response frame responded by each slave station at the four observation points A to D shown in FIG. As shown in the figure, at observation point A, in addition to the request frame from the master station, response frames from each slave station are known, but at other observation points B, C, and D, Only the request frame from the master station and the response frame from the slave station located downstream from each observation point in the network configuration are known, and unnecessary frames are not relayed as in the conventional example shown in FIG. Is clear.
この実施形態においては、各中継局は、応答フレームは下流から上流のみに中継するように設定されており、かつ応答フレームの間隔を観測点Aで最小化できるように、各応答フレームは通過する中継局数分のリピータ遅延時間だけ早く応答するように設定されている。このような設定により、観測点Aにおける応答フレームの間隔を最小化でき、図20にて示されるように、各応答フレームにおいて、リピータ遅延の低減化が実現されている。 In this embodiment, each relay station is set to relay the response frame only from the downstream to the upstream, and each response frame passes so that the interval between the response frames can be minimized at the observation point A. It is set to respond quickly by the repeater delay time corresponding to the number of relay stations. With this setting, the interval between the response frames at the observation point A can be minimized, and as shown in FIG. 20, a reduction in repeater delay is realized in each response frame.
各スレーブ局における応答フレームの送信タイミングは、
要求フレーム受信後の該当スレーブ局応答フレーム送信開始時間
=該当スレーブ局の応答フレームの観測点Aでの位置
−要求フレーム到着遅延
−該当スレーブ局応答フレームが観測点Aまで到着するまでの時間
=該当スレーブ局の応答フレームの観測点Aでの位置
−リピータ遅延×該当スレーブまでのリピータ(中継局)段数×2
となる。
The transmission timing of the response frame in each slave station is
Response time transmission start of the corresponding slave station response frame after receiving the request frame = Position of the response frame of the corresponding slave station at observation point A
Request frame arrival delay
-Time until the corresponding slave station response frame arrives at observation point A = position of the corresponding slave station response frame at observation point A
-Repeater delay x number of repeater (relay station) stages to the corresponding slave x 2
It becomes.
このとき、通信サイクルは、
通信サイクル=
要求フレーム時間+リピータ遅延×最大リピータ段数
+(応答フレーム時間)×スレーブ数
となる。
At this time, the communication cycle is
Communication cycle =
Requested frame time + repeater delay x maximum number of repeater stages
+ (Response frame time) x number of slaves.
よって、従来例に比べて「リピータ遅延×最大リピータ段数×(2×スレーブ数−1)」の分だけ、通信サイクルは高速になる。 Therefore, compared with the conventional example, the communication cycle becomes faster by the amount of “repeater delay × maximum repeater stage number × (2 × number of slaves−1)”.
尚、従来の技術を用いた通信ネットワークと、同じネットワーク構成を有し、本発明を適用した通信ネットワークとのサイクルタイムの比較を行ったところ、従来例では1.8msであったサイクルタイムが、本発明を適用することによって、1.2msまで短縮できた。 In addition, when the cycle time of the communication network using the conventional technology and the communication network having the same network configuration and applying the present invention was compared, the cycle time of 1.8 ms in the conventional example was By applying the present invention, the time was reduced to 1.2 ms.
以上の説明で明らかなように、本発明によれば、ネットワーク上の中継局により、中継する通信フレームの種別を判別し、必要な情報のみを中継することで、ネットワーク占有率を低減化し、ネットワーク効率を向上させるて、通信サイクルを高速化することが可能となる。 As is apparent from the above description, according to the present invention, the relay station on the network discriminates the type of communication frame to be relayed and relays only necessary information, thereby reducing the network occupancy rate. It is possible to improve efficiency and speed up the communication cycle.
1 PLC
2 スレーブ局
3 PC
4 中継局
5 終端装置
6 フィールドバス
7 I/O機器
10 通信マスタユニット
20 CPUユニット
30 マスタ局
31 ネットワーク幹線
32 ネットワーク支線その1
33 ネットワーク支線その2
40a〜40e スレーブ局
1 PLC
2
4 relay station 5
33
40a-40e Slave station
Claims (14)
ネットワーク上にて送受信される通信フレームの中には、
スレーブ局からマスタ局に対してのみ発せられる第1のフレーム種別であることを識別するための識別情報を有する通信フレームが含まれており、
中継局は、
上流側のネットワークに接続する上流ポートおよび下流側のネットワークに接続する下流ポートを備え、上流ポートまたは下流ポートにて受信したフレームの識別情報が第1のフレーム種別であることを識別した場合、その受信したフレームに対しては、前記下流ポートから上流ポートへの方向に対してのみ中継処理を行う、ことを特徴とする通信システム。 A master station, which is a programmable controller having a communication function, and one or more slave stations, which are I / O terminal devices having a communication function, are connected by a network and are located on the network and located upstream. In a communication system in which a relay station functioning as a repeater is interposed over one stage or two or more stages on a path connecting a station and a slave station located downstream ,
Some communication frames that will be transmitted or received on the network,
Communication frame cage containing Marete with identification information for identifying that it is the first frame type emanating from the slave station only to the master station,
The relay station
When the upstream port connected to the upstream network and the downstream port connected to the downstream network are provided, and the identification information of the frame received at the upstream port or the downstream port is identified as the first frame type, A communication system, wherein a received frame is relayed only in the direction from the downstream port to the upstream port .
マスタ局からスレーブ局に対してのみ発せられる第2のフレーム種別であることを識別するための識別情報を有する通信フレームが含まれており、
中継局は、
上流ポートまたは下流ポートにて受信したフレームの識別情報が第2のフレーム種別であることを識別した場合、その受信したフレームに対しては、上流ポートから下流ポートへの方向に対してのみ中継処理を行う、ことを特徴とする請求項1に記載の通信システム。 Some communication frames sent and received on the network
Communication frame cage containing Marete with identification information for identifying that the master station is a second frame type emitted only to the slave station,
The relay station
When the identification information of the frame received at the upstream port or the downstream port is identified as the second frame type, the received frame is relayed only in the direction from the upstream port to the downstream port. line cormorants communication system according to claim 1, characterized in that.
マスタ局とスレーブ局との間で双方向に発せられる第3のフレーム種別であることを識別するための識別情報を有する通信フレームが含まれており、
中継局は、
上流ポートまたは下流ポートにて受信したフレームの識別情報が第3のフレーム種別であることを識別した場合、その受信したフレームに対しては、受信した上流ポートから下流ポートへの方向または受信した下流ポートから上流ポートへの方向に対して中継処理を行う、ことを特徴とする請求項1または2のいずれかに記載の通信システム。 Some of the communication frame transmitted and received by the network further
Communication frame cage containing Marete with identification information for identifying that it is the third frame type emitted in both directions between the master station and the slave station,
The relay station
When the identification information of the frame received at the upstream port or the downstream port identifies that it is the third frame type, for the received frame , the direction from the received upstream port to the downstream port or the received downstream The communication system according to claim 1 , wherein relay processing is performed in a direction from the port to the upstream port .
スレーブ局に対して特定の通信フレームを送信し、その特定の通信フレームに対するスレーブ局からの応答フレームから中継局の通過段数を読み出し、読み出された中継局の通過段数に基づいて、当該スレーブ局がマスタ局からの通信フレームに対する応答フレームを返信するタイミングを設定するタイムドメインを計算し、そのタイムドメインのスレーブ局に対する書き込み処理を行う、ことを特徴とする請求項1〜3のいずれかに記載の通信システム。 The master station
Transmits a communication frame specific to the slave station, reads the passage number of the relay station from the response frame from the slave station for the particular communication frame, based on the passage number of the read relay station, the slave station calculates the time domain for setting a timing for returning the response frame to the communication frame from the master station performs the writing process to the slave station of the time domain, to any one of claims 1-3, characterized in that The communication system described.
中継局は、
前記特定の通信フレームが通過する際に、自局のアドレス値の情報と中継局段数に+1加算した値の情報とをその特定の通信フレームに含ませる処理を行うものであり、
スレーブ局は、
前記特定の通信フレームから、自局の上位側に隣接する中継局のアドレス値の情報と、中継局段数の情報とを取り出す処理と、
マスタ局への応答フレームに、前記特定の通信フレームから読み出した自局の上位側に隣接する中継局のアドレス値の情報と中継局段数の情報とを含ませる処理とを行う、ことを特徴とする請求項4に記載の通信システム。 The specific communication frame transmitted from the master station to the slave station can include information on the address value of the relay station that has passed and information on the number of relay station stages,
The relay station
When the specific communication frame passes, the address information of the own station and the information of the value obtained by adding +1 to the number of relay station stages are included in the specific communication frame ,
Slave station
From the specific communication frame , a process of extracting information on the address value of the relay station adjacent to the upper side of the own station and information on the number of relay station stages;
A process of including, in the response frame to the master station, information on the address value of the relay station adjacent to the upper side of the own station read from the specific communication frame and information on the number of relay station stages, The communication system according to claim 4 .
スレーブ局は、
自局が保持するタイムドメインに基づいて、インフレームを、リピータ遅延時間だけ早く応答を返信するようにし、
中継局は、
インフレームについては、下流ポートから上流ポートへの方向に対してのみ中継処理を行う、ことを特徴とする請求項5に記載の通信システム。 A communication frame that will be transmitted or received over a network is included in-frame to the IN data input from the input device connected to the slave station slave station replies in response to the master station,
Slave station
Based on the time domain held by the local station, the response is sent back in-frame earlier by the repeater delay time.
The relay station
6. The communication system according to claim 5 , wherein relay processing is performed only in the direction from the downstream port to the upstream port for in-frame.
マスタ局がスレーブ局の存在を確認するためのコネクションフレームをマスタ局へ送信するものであり、
マスタ局は、
スレーブ局に対してコネクションフレームの送信を要求するトリガフレームを送信するものであり、
スレーブ局は、
前記タイムドメインに基づいて、前記トリガフレームに対する応答としてのコネクションフレームを前記リピータ遅延時間だけ早く返信するようにし、
中継局は、
前記コネクションフレームについては、下流から上流方向に対してのみ中継処理を行う、ことを特徴とする請求項5に記載の通信システム。 Slave station
The master station transmits a connection frame for confirming the existence of the slave station to the master station.
The master station
Sends a trigger frame requesting the slave station to send a connection frame,
Slave station
Based on the time domain, a connection frame as a response to the trigger frame is returned earlier by the repeater delay time,
The relay station
6. The communication system according to claim 5 , wherein the connection frame is relayed only from the downstream to the upstream direction.
ネットワーク上にて送受信される通信フレームの中には、
スレーブ局からマスタ局に対してのみ発せられる第1のフレーム種別を有する通信フレームが含まれており、
中継局は、
上流側のネットワークに接続する上流ポートおよび下流側のネットワークに接続する下流ポートを備え、受信したフレームの識別情報が第1のフレーム種別であることを識別した場合、その受信したフレームに対しては、下流ポートから上流ポートへの方向に対してのみ中継処理を行い、
スレーブ局は、
マスタ局との間に介在する中継局の段数に基づいて決定された、当該スレーブ局がマスタ局からの通信フレームに対する応答フレームを返信するタイミングを設定するためのタイムドメインを予め記憶しており、そのタイムドメインが、マスタ局が複数の応答フレームを隙間なく受信できるように決定されている、ことを特徴とする通信システム。 A master station, which is a programmable controller having a communication function, and one or more slave stations, which are I / O terminal devices having a communication function, are connected by a network and are located on the network and located upstream. In a communication system in which a relay station functioning as a repeater is interposed over one stage or two or more stages on a path connecting a station and a slave station located downstream ,
Among the communication frames sent and received on the network,
Communication frame having a first frame type emanating from the slave station only to the master station cage contains Marete,
The relay station
It includes a downstream port connected to the upstream port and the downstream side of the network connected to the upstream side of the network, when the identification information of the received frame is identified to be the first frame type, for a frame in which the received Performs relay processing only in the direction from the downstream port to the upstream port ,
Slave station
The time domain for setting the timing at which the slave station returns a response frame to the communication frame from the master station, determined based on the number of relay stations intervening with the master station, is stored in advance. The time domain is determined so that the master station can receive a plurality of response frames without gaps.
マスタ局がスレーブ局の存在を確認するためのコネクションフレームをマスタ局へ送信するものであり、
マスタ局は、
スレーブ局に対してコネクションフレームの送信を要求するトリガフレームを送信するものであり、
スレーブ局は、前記タイムドメインに基づいて、コネクションフレームをリピータ遅延時間だけ早く応答を返信するようにし、
中継局は、コネクションフレームについては下流から上流方向に対してのみ中継処理を行う、ことを特徴とする請求項9に記載の通信システム。 Slave station
The master station transmits a connection frame for confirming the existence of the slave station to the master station.
The master station
Sends a trigger frame requesting the slave station to send a connection frame,
Based on the time domain, the slave station returns a response to the connection frame earlier by a repeater delay time,
The communication system according to claim 9 , wherein the relay station performs a relay process only for a connection frame from downstream to upstream.
スレーブ局であるI/Oターミナル装置のINデータをマスタ局へ送信するためのインフレームが含まれており、
スレーブ局は、
前記タイムドメインに基づいて、I/Oターミナル装置のINデータを含んだインフレームを、マスタ局が複数の応答フレームを隙間なく受信できるように応答を返信するようにし、
中継局は、
前記インフレームについては下流から上流方向に対してのみ中継処理を行う、ことを特徴とする請求項9に記載の通信システム。 In the communication frame,
In-frame for transmitting IN data of I / O terminal device, which is a slave station , to the master station is included.
Slave station
Based on the time domain , the master station returns a response so that the master station can receive a plurality of response frames without any gaps, including the IN data of the I / O terminal device,
The relay station
The communication system according to claim 9 , wherein the in-frame is subjected to relay processing only from downstream to upstream.
上流側のネットワークに接続する上流ポートおよび下流側のネットワークに接続する下流側ポートと、
上流ポートまたは下流ポートから各種通信フレームを受信する受信手段と、
受信手段により受信した通信フレームの種別をそれに含まれる識別情報から識別する識別手段と、
識別手段により識別した通信フレームの種別が、スレーブ局からマスタ局に対してのみ発せられる第1のフレーム種別であった場合には、下流ポートから上流ポートへの方向に対してのみ中継処理を行う中継制御手段とを具備する、ことを特徴とする中継装置。 A master station which is a programmable controller having a communication function, linked with one or more slave stations are I / O terminal devices having the communication function in the network, and by Tsu near the network, located upstream A relay device in a communication system in which a relay station that functions as a repeater is interposed over one or more stages on a path connecting a master station and a slave station located downstream ,
An upstream port connected to the upstream network and a downstream port connected to the downstream network;
Receiving means for receiving various communication frames from the upstream port or the downstream port ;
Identifying means for identifying the type of communication frame received by the receiving means from the identification information included therein ;
When the type of the communication frame identified by the identification unit is the first frame type that is issued only from the slave station to the master station, the relay process is performed only in the direction from the downstream port to the upstream port. A relay apparatus comprising: a relay control unit.
識別手段により識別した通信フレームの種別が、マスタ局からスレーブ局に対してのみ発せられる第2のフレーム種別であった場合には、上流ポートから下流ポートへの方向に対してのみ中継処理を行う、ことを特徴とする請求項12に記載の中継装置。 Relay control means
When the type of the communication frame identified by the identifying means is the second frame type issued only from the master station to the slave station, the relay process is performed only in the direction from the upstream port to the downstream port. The relay apparatus according to claim 12.
識別手段により識別した通信フレームの種別が、マスタ局とスレーブ局との間で双方向に発せられる第3のフレーム種別であった場合には、上流ポートから下流ポートへの方向または下流ポートから上流ポートへの方向に対して中継処理を行う、ことを特徴とする請求項12または13に記載の中継装置。 Relay control means
When the type of the communication frame identified by the identification means is the third frame type that is transmitted bidirectionally between the master station and the slave station , the direction from the upstream port to the downstream port or the upstream from the downstream port The relay apparatus according to claim 12, wherein relay processing is performed in a direction toward a port .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006233037A JP4006605B2 (en) | 2005-08-31 | 2006-08-30 | Reduction of repeater delay effect |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005252423 | 2005-08-31 | ||
JP2006233037A JP4006605B2 (en) | 2005-08-31 | 2006-08-30 | Reduction of repeater delay effect |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007167281A Division JP4182450B2 (en) | 2005-08-31 | 2007-06-26 | Reduction of repeater delay effect |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2007097157A JP2007097157A (en) | 2007-04-12 |
JP4006605B2 true JP4006605B2 (en) | 2007-11-14 |
Family
ID=37982214
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006233037A Expired - Fee Related JP4006605B2 (en) | 2005-08-31 | 2006-08-30 | Reduction of repeater delay effect |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4006605B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5456720B2 (en) * | 2011-04-22 | 2014-04-02 | 三菱電機株式会社 | Communications system |
JP7097840B2 (en) * | 2019-03-20 | 2022-07-08 | 三菱電機株式会社 | Protection control device |
-
2006
- 2006-08-30 JP JP2006233037A patent/JP4006605B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2007097157A (en) | 2007-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7792155B2 (en) | Communication system and slave and repeater units therefor | |
JP3925660B2 (en) | Communication master station startup control method | |
JP3566304B2 (en) | Bus control device and bus control system | |
JP2001512944A (en) | Method for automatic addressing, bus system for automatic addressing and communication subscriber equipment usable in the bus system and method | |
US20050132037A1 (en) | Programmable controller and communication interface therefor | |
JP4006605B2 (en) | Reduction of repeater delay effect | |
JP7394185B2 (en) | Communications system | |
JP4182450B2 (en) | Reduction of repeater delay effect | |
JP2004280304A (en) | Field bus system, communication method and master/ slave | |
JP2007244000A5 (en) | ||
JP4636257B2 (en) | Filtering repeat function | |
JP4623291B2 (en) | Method for teaching network configuration information in PLC system | |
CN103370906A (en) | Communication system | |
JP4019946B2 (en) | Network system monitoring method, monitoring system, repeater and monitoring device | |
JP2008005191A (en) | Communication system | |
JP4107110B2 (en) | Fieldbus system, connection confirmation method, and master | |
JP2006171833A (en) | PLC data exchange system and control method of PLC data exchange system | |
JP4407838B2 (en) | Communication master station startup control method | |
CN101645195B (en) | Recognizing telegram boundaries | |
JP2000132210A (en) | Controller and cooperation controlling method | |
JP5042064B2 (en) | Crime prevention system | |
JPH04360259A (en) | Transmission control system by polling | |
JPH07264217A (en) | Polling method | |
KR20130046903A (en) | Apparatus and method for reprogramming a plurality of ecus | |
Lee et al. | Real time data communication using gateway for CAN and Profibus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20070315 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20070326 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20070420 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070427 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070626 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070704 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20070801 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070814 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100907 Year of fee payment: 3 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 4006605 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100907 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110907 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110907 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120907 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130907 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |