JP2010021866A - Communication system and master - Google Patents

Communication system and master Download PDF

Info

Publication number
JP2010021866A
JP2010021866A JP2008181673A JP2008181673A JP2010021866A JP 2010021866 A JP2010021866 A JP 2010021866A JP 2008181673 A JP2008181673 A JP 2008181673A JP 2008181673 A JP2008181673 A JP 2008181673A JP 2010021866 A JP2010021866 A JP 2010021866A
Authority
JP
Japan
Prior art keywords
slave
frame
master
slaves
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2008181673A
Other languages
Japanese (ja)
Inventor
Masao Koga
政男 古賀
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2008181673A priority Critical patent/JP2010021866A/en
Publication of JP2010021866A publication Critical patent/JP2010021866A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Programmable Controllers (AREA)
  • Small-Scale Networks (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To set timing for each slave to transmit an IN frame so as not to generate a useless idle time so much, while fixing an order of transmissions. <P>SOLUTION: A communication system is disclosed in which each slave that has received a trigger frame outputted from a master, transmits an IN frame after the lapse of a set waiting time. An order of slaves to transmit IN frames starts from a smallest address of the slaves and the master acquires an address of a slave connected to a network and to be used actually and a bit size of IO data of the IN frame that the slave transmits, obtains the time required for each slave to transmit the IN frame and, in timing when an IN frame is completely transmitted from the slave of a certain address (#n-1), sets transmission timing for a slave of the next address (#n) on the basis of the obtained time. As illustrated in Fig.(b), for IN frames from #0, #2, #6, the transmission timing is shifted forward closely, so that an overall cycle time is shortened. <P>COPYRIGHT: (C)2010,JPO&amp;INPIT

Description

この発明は、マスタと複数のスレーブとがネットワークにて接続され、マスタが、スレーブの送信タイミングの基準信号となるトリガフレームを送信し、そのトリガフレームを受信したスレーブが、そのトリガフレームを受信してから予め設定された待機時間(タイムドメイン値)を経過後、INフレームを送信する通信システム及びそれに用いられるマスタに関するもので、前記待機時間の設定に関する改良に関する。   In the present invention, a master and a plurality of slaves are connected via a network, the master transmits a trigger frame that is a reference signal for the transmission timing of the slave, and the slave that receives the trigger frame receives the trigger frame. The present invention relates to a communication system that transmits an IN frame after elapse of a preset standby time (time domain value) and a master used therefor, and relates to an improvement related to the setting of the standby time.

FA(ファクトリーオートメーション)で用いられるPLC(プログラマブルコントローラ)が加入されるネットワークシステムの一形態として、フィールドネットワークシステムがある。このフィールドネットワークシステムは、マスタとなるPLCと、I/O機器やI/Oターミナル等の各種のスレーブが、制御系ネットワークの1つであるフィールドバスに接続されて構成される。このフィールドネットワークシステムでは、マスタとスレーブとが、マスタ−スレーブ通信を行い、IOデータ等の送受を行ない、制御対象機器の制御を実行する。   A field network system is one form of a network system to which a PLC (programmable controller) used in FA (factory automation) is joined. This field network system is configured by connecting a master PLC and various slaves such as I / O devices and I / O terminals to a field bus which is one of the control networks. In this field network system, a master and a slave perform master-slave communication, transmit / receive IO data and the like, and execute control of a control target device.

マスタ並びにスレーブは、フィールドバスに対してマルチドロップ配線で接続され、マスタから出力された送信フレームは、フィールドバスに接続された全てのスレーブ(ノード局)に対して一斉に到達する。そして、各スレーブには個々にノードアドレスが設定されており、送信フレームには、宛先のノードアドレス(1または複数)を含む宛先データを付加しておく。これにより、各スレーブは、受信した送信フレームの宛先データを抽出し、自己宛の送信フレームか否かを判断し自己宛の場合にはその送信フレームを取り込み、自己宛でない場合には破棄するようになる。   The master and the slave are connected to the field bus by multidrop wiring, and the transmission frame output from the master reaches all the slaves (node stations) connected to the field bus at the same time. A node address is individually set for each slave, and destination data including the destination node address (one or more) is added to the transmission frame. As a result, each slave extracts the destination data of the received transmission frame, determines whether it is a transmission frame addressed to itself, captures the transmission frame if it is addressed to itself, and discards it if it is not addressed to itself. become.

また、スレーブからマスタへ向けて出力されるフレームも、同様に送信アドレスにマスタのノードアドレスが付加されることにより、マスタのみが受信することができる。さらに、例えば、特許文献2に開示された通信システムのように、所定の条件の下でネットワークを構成した場合、スレーブからマスタへ送信されるフレームのうち、本発明における最適化対象となるINフレームには、ノードアドレスを付加しないフレームフォーマットをとることもできる。すなわち、ネットワーク上に存在するマスタが一台で、かつ、そのマスタがネットワークの階層において最上位に位置するようにした場合、必ずマスタにのみ送信されるフレーム(INフレーム、CNフレーム)は、宛先アドレスをフレームに含ませる必要がない。つまり、ヘッダにフレーム種別を特定するための情報を含ませておくことで、INフレーム等の場合には、マスタ宛のフレームであることがわかるので、当該フレームを、マスタが受信する(他のスレーブは受信しない)ことができる。また、マスタとスレーブとの間にリピータが介在するネットワーク構成の場合、リピータは、上記フレーム内のフレーム種別を判定し、当該フレームがINフレームであり、かつ当該リピータの下位ポートからの受信した場合は、リピータの上位側、つまりマスタが存在するポートに対して中継処理をすることで適切に伝送できる。このように宛先アドレスを含ませないようにすることで、宛先アドレスに要するフレーム長分だけ、サイクルタイムに大きく影響するINフレームのフレーム長を短くできるため、結果としてサイクルタイムを短くすることができる。   Similarly, only the master can receive a frame output from the slave to the master by adding the node address of the master to the transmission address. Further, for example, when a network is configured under a predetermined condition as in the communication system disclosed in Patent Document 2, among the frames transmitted from the slave to the master, the IN frame to be optimized in the present invention Can take a frame format without adding a node address. That is, when there is one master on the network and the master is positioned at the highest level in the network hierarchy, a frame (IN frame, CN frame) transmitted only to the master is always the destination. There is no need to include the address in the frame. In other words, by including information for specifying the frame type in the header, in the case of an IN frame or the like, it can be understood that the frame is addressed to the master, so the master receives the frame (other Slave can not receive). In the case of a network configuration in which a repeater is interposed between a master and a slave, the repeater determines the frame type in the frame, and the frame is an IN frame and is received from a lower port of the repeater. Can be appropriately transmitted by relaying to the upper side of the repeater, that is, the port where the master exists. By not including the destination address in this way, the frame length of the IN frame that greatly affects the cycle time can be shortened by the frame length required for the destination address. As a result, the cycle time can be shortened. .

ところで、係るスレーブからマスタに向けて出力されるフレームの送信タイミングであるが、各スレーブが一斉に送信すると、フィールドバス上で衝突が生じて通信不能となるので、予め各スレーブに対し異なる送信タイミングを設定しておく。そして、各スレーブは、マスタの出した要求(トリガフレーム)を受信してから、自己に設定された一定時間経過後に応答を返すようにする。   By the way, it is the transmission timing of the frame output from the slave to the master, but if each slave transmits all at once, a collision occurs on the fieldbus and communication becomes impossible. Is set in advance. Each slave receives a request (trigger frame) issued by the master, and then returns a response after a certain time set in itself.

この各スレーブが返す応答のタイミング(タイムスロット)は、マスタが決定し、各スレーブに設定する。具体的には、送信する順番は、各スレーブに設定されたアドレス順(昇順)にする。これは、各スレーブから送られてくるフレーム(INフレーム)の順番を、毎サイクルで同じにしたいという要求を受け、アドレス順にすることでINフレームの位置を固定化している。   The response timing (time slot) returned by each slave is determined by the master and set for each slave. Specifically, the transmission order is the address order (ascending order) set for each slave. In response to a request to make the order of frames (IN frames) sent from each slave the same in each cycle, the position of the IN frame is fixed by making the order of addresses.

また、スレーブから送信されるフレームは、サイズが固定のヘッダと、IOの点数によりサイズが異なるビットデータとから構成される。各スレーブのビットデータは、16ビットから256ビットと多岐にわたり、16点単位(16ビット,32ビット,48ビット,…)となる。そこで、最小単位(サイズ)となる16点を基本とし、16ビットのフレームを送信するのに必要な時間を1つのタイムスロットとする。よって、すべてのスレーブが16点で、アドレスが#0から#6まで抜けることなく存在している場合、図1(a)に示すように、タイムスロットごとに定期的に各スレーブから送信される。1つのタイムスロットは、“ヘッダのサイズ”+“16ビット分のデータサイズ”のフレームを送信するために要する時間に合わせているので、無駄なく各スレーブが送信することができる。   The frame transmitted from the slave is composed of a header having a fixed size and bit data having a different size depending on the IO score. The bit data of each slave varies widely from 16 bits to 256 bits, and is in units of 16 points (16 bits, 32 bits, 48 bits,...). Therefore, 16 points as a minimum unit (size) are basically used, and a time required to transmit a 16-bit frame is defined as one time slot. Therefore, when all the slaves are 16 points and the addresses exist from # 0 to # 6 without being lost, as shown in FIG. 1 (a), each slave periodically transmits from each slave. . One time slot is matched with the time required to transmit a frame of “header size” + “data size for 16 bits”, so that each slave can transmit without waste.

一方、実際には、上述したように、各スレーブは、異なる点数のものが混在しているので、16点の応答の場合には1つのタイムスロット、32点の場合には2つのタイムスロット、64の場合には4つのタイムスロットを使用する。つまり、スレーブ(ノードアドレス=#x)のデータサイズが32ビットの場合は、連続する2つのタイムスロット(#nと#(n+1))の領域を使用することになる。これに伴い、スレーブのアドレスとして#(n+1)は使用できなくなる。その結果、例えば、スレーブアドレスが#0,#2,#6の各スレーブから送信されるINフレームが、32ビット,64ビット,18ビットとすると、各INフレームの送信タイミングは、図1(b)に示すようになる。そして、具体的な各スレーブの応答位置(トリガフレームから距離)は、
スレーブ#0の応答位置=0
スレーブ#2の応答位置=0+(ヘッダ+16ビット)×2
スレーブ#6の応答位置=0+(ヘッダ+16ビット)×(2+4)
となる。マスタは、スレーブ検出時にスレーブアドレスとビットサイズから各スレーブの応答時間(各スレーブがトリガフレームを受信して応答を返すまでの時間)を算出して、各スレーブに通知する。係る構成からなる従来例としては、例えば特許文献1に開示された技術がある。
On the other hand, as described above, since each slave has a different number of points, one time slot in the case of a response of 16 points, two time slots in the case of 32 points, In the case of 64, four time slots are used. That is, when the data size of the slave (node address = # x) is 32 bits, the area of two consecutive time slots (#n and # (n + 1)) is used. As a result, # (n + 1) cannot be used as the slave address. As a result, for example, if the IN frames transmitted from the slaves whose slave addresses are # 0, # 2, and # 6 are 32 bits, 64 bits, and 18 bits, the transmission timing of each IN frame is as shown in FIG. ) As shown. And the specific response position (distance from the trigger frame) of each slave is
Response position of slave # 0 = 0
Response position of slave # 2 = 0 + (header + 16 bits) × 2
Response position of slave # 6 = 0 + (header + 16 bits) × (2 + 4)
It becomes. When detecting the slave, the master calculates the response time of each slave from the slave address and the bit size (the time until each slave receives a trigger frame and returns a response) and notifies each slave. As a conventional example having such a configuration, there is a technique disclosed in Patent Document 1, for example.

特開2004−280304号公報JP 2004-280304 A 特開2007−97157号公報JP 2007-97157 A

INフレームの順番を毎回同じにした場合、図1(b)に示すように、あるINフレームが送信完了してから、次にINフレームが送信開始するまでに、時間が空き、効率が悪くなることがある。これは、32ビット以上のデータを送信するINフレームは、複数のタイムスロットを使用することになり、各タイムスロットは、ヘッダ+16ビット分のINフレームを送信するために要する時間が設定されているのに対し、32ビット以上のデータを送信するINフレームには、ヘッダは1つのみ有しているので、1または複数のヘッダのサイズ分だけ無駄が生じる。   When the order of the IN frames is the same every time, as shown in FIG. 1B, there is a time lapse from the completion of transmission of a certain IN frame to the start of transmission of the next IN frame, resulting in poor efficiency. Sometimes. This is because an IN frame for transmitting data of 32 bits or more uses a plurality of time slots, and each time slot is set with a time required for transmitting an IN frame for header + 16 bits. On the other hand, an IN frame that transmits data of 32 bits or more has only one header, and therefore waste is generated by the size of one or a plurality of headers.

さらに、1つのタイムスロットの長さは、ヘッダ+16ビット分のデータを送信するのに必要な時間を基準とし、さらに、1つのINフレームを送信する場合に生じるばらつきを考慮して所定のマージンを付加している。このばらつきの量は、ビットサイズの大小に対応するものでもなく、1つのフレームごとに起因するものである。従って、仮に32ビットのデータを送信するINフレームでは、1つのフレーム分のばらつきを考慮したマージンを設定する必要があるところ、2つのタイムスロットを使用するため2つのフレーム分のばらつきを考慮したマージンが加算されるので、結果として1つ分のばらつきに応じた時間が更に無駄に設定されることになる。   In addition, the length of one time slot is based on the time required to transmit header + 16-bit data, and a predetermined margin is taken into account when variations occur when one IN frame is transmitted. It is added. The amount of variation does not correspond to the size of the bit size but is attributed to each frame. Accordingly, in an IN frame that transmits 32-bit data, it is necessary to set a margin that takes into account variations for one frame. Since two time slots are used, a margin that takes into account variations for two frames. As a result, time corresponding to one variation is further set wastefully.

また、スレーブアドレスでタイムスロットが決定されるため、途中のノード(スレーブ)が存在しなくても前詰めされず無駄が生じる。一例を上げすると、図1(b)の場合、#5のスレーブが存在しないので、タイムスロット#5の区間は、フレームが送信されない区間となる。   In addition, since the time slot is determined by the slave address, even if there is no intermediate node (slave), it is not prepended and waste occurs. As an example, in the case of FIG. 1B, since there is no slave of # 5, the section of time slot # 5 is a section in which no frame is transmitted.

なお、このような無駄を省くため、フレームが詰まった通信サイクルを実現する場合、ネットワークに加入した順にINフレームを並べる必要がある。例えば、#3,#0,#2,#4の順番で加入された場合は、図1(c)に示すようになる。しかし、この方法では、ネットワークを構築するたびにINフレームの順番が変わってしまい、それに伴い、I/O応答特性が変動するため、FA制御の信頼性が低下するので好ましくない。さらに、スレーブが加入するたびに通信サイクルが変動するという問題もある。   In order to eliminate such waste, it is necessary to arrange IN frames in the order in which they are joined to the network when realizing a communication cycle in which frames are clogged. For example, in the case of joining in the order of # 3, # 0, # 2, and # 4, it becomes as shown in FIG. However, this method is not preferable because the order of IN frames changes every time a network is constructed, and the I / O response characteristics fluctuate accordingly, which reduces the reliability of FA control. Further, there is a problem that the communication cycle varies every time a slave joins.

この発明は、送信する順番を固定しつつ、各スレーブがINフレームを送信するタイミングを過度に無駄な空き時間(隙間)を生じることなく適切に設定することができる通信システム及びマスタを提供することを目的とする。   The present invention provides a communication system and a master capable of appropriately setting the timing at which each slave transmits an IN frame without causing an excessively wasteful idle time (gap) while fixing the transmission order. With the goal.

この発明による通信システムは、(1)マスタと複数のスレーブとがネットワークにて接続され、マスタが、スレーブの送信タイミングの基準信号となるトリガフレームを送信し、そのトリガフレームを受信したスレーブが、そのトリガフレームを受信してから予め設定された待機時間を経過後、INフレームを送信する通信システムである。そして、マスタは、ネットワークを構成するスレーブのアドレスと、そのスレーブが送信するINフレームのIOデータのビットサイズと、を関連付けた登録テーブルと、その登録テーブルに格納されたスレーブのアドレスに基づいてINフレームを送信するスレーブの順番を決定し、1番目からn−1番目までの各スレーブの登録テーブルに格納されたビットサイズから、それぞれのスレーブで送信されるINフレーム全体のデータサイズを求めると共に、その求めた各INフレーム全体のデータサイズの総和から、それら1番目からn−1番目までのスレーブがINフレームを送信するのに要する時間の総和を求め、その求めた時間に基づいてn番目に送信するスレーブについての待機時間を決定する待機時間決定手段と、その待機時間決定手段で決定した各スレーブについての待機時間を当該スレーブに通知する通知手段と、を有する。そして、スレーブは、通知手段により通知され待機時間を記憶する記憶手段を有し、その記憶手段に記憶した待機時間に基づいて決定される送信タイミングで、INフレームの送信を行うようにした。   In the communication system according to the present invention, (1) a master and a plurality of slaves are connected by a network, the master transmits a trigger frame that is a reference signal for the transmission timing of the slave, and the slave that has received the trigger frame The communication system transmits an IN frame after elapse of a preset standby time after receiving the trigger frame. Then, the master determines the IN based on the registration table in which the address of the slave configuring the network and the bit size of the IO data of the IN frame transmitted by the slave are associated, and the slave address stored in the registration table. The order of the slaves that transmit the frames is determined, and the data size of the entire IN frame transmitted by each slave is determined from the bit sizes stored in the registration tables of the first to (n-1) th slaves. From the sum of the data sizes of all the obtained IN frames, the sum of the time required for the first to (n−1) th slaves to transmit the IN frame is obtained, and the nth based on the obtained time. Wait time determination means for determining the wait time for the slave to be transmitted, and the wait time It has a notifying means for notifying the waiting time for each slave determined in the constant section to the slave, the. The slave has storage means that is notified by the notification means and stores the standby time, and transmits the IN frame at a transmission timing determined based on the standby time stored in the storage means.

アドレスに基づく送信するスレーブの順番であるが、実施形態では、小さいアドレスから昇順にしたが、降順でも良いし、予め決めた規則に基づいて決定するものでも良い。いずれにしても、予め規則を決めておくことで、送信する順番を固定化することである。待機時間は、実施形態では、タイムドメイン値に対応する。この待機時間に基づいて行われる通信は、実施形態の最適化モードでの動作に対応する。登録テーブルは、下記の(2)の発明等のように、実際にネットワークに接続されているスレーブから所望の情報を収集し、マスタが自動的に作成しても良いし、設定ツール装置等を用いてユーザが作成し、それをマスタにセットしても良い。設定ツール装置を用いて作成したものをマスタに登録する場合、その登録時には登録テーブルに格納されたスレーブが実際にネットワークに接続・加入していなくても良い。但し、実際にこの登録テーブルに格納された情報に基づいて待機時間を設定し、その待機時間に基づいてINフレームの送信を行う際には、実際にスレーブが存在している必要がある。   Although the order of slaves to be transmitted is based on the address, in the embodiment, the order is ascending from the smallest address, but the order may be descending or may be determined based on a predetermined rule. In any case, the order of transmission is fixed by determining rules in advance. The waiting time corresponds to a time domain value in the embodiment. Communication performed based on this standby time corresponds to the operation in the optimization mode of the embodiment. The registration table collects desired information from slaves that are actually connected to the network, as in the invention of (2) below, and the master may automatically create the setting table. It may be created by the user and set in the master. When registering a device created using the setting tool device in the master, the slave stored in the registration table may not actually be connected to or joined to the network at the time of registration. However, when the standby time is actually set based on the information stored in the registration table and the IN frame is transmitted based on the standby time, the slave must actually exist.

本発明では、登録テーブルに格納されたスレーブのアドレスから、通信開始時におけるネットワークに存在するスレーブを知ることができ、換言すると、使用されていないアドレスを知ることができる。従って、登録テーブルに登録されたスレーブのアドレスに基づいて送信順番を決定することで、未使用の空きアドレスを排除することができる。しかも、待機時間決定手段により、各スレーブの送信タイミングは、前詰め(1つ前のスレーブの送信が完了するタイミングで自己のスレーブの送信タイミングになる)で設定されるので、無駄な隙間(空き時間)がなく、効率よく通信を行うように待機時間(タイムドメイン値)の設定を行うことができる。よって、全てのスレーブがINフレームを送信し終わる通信サイクルも短くすることができる。   In the present invention, the slave existing in the network at the start of communication can be known from the slave address stored in the registration table, in other words, an unused address can be known. Therefore, by determining the transmission order based on the slave addresses registered in the registration table, unused free addresses can be eliminated. In addition, the transmission time of each slave is set by the waiting time determining means in a justified manner (the transmission timing of its own slave is reached when transmission of the previous slave is completed). The standby time (time domain value) can be set so that communication can be performed efficiently without time. Therefore, the communication cycle in which all slaves finish sending the IN frame can be shortened.

(2)スレーブは、送信するINフレームのIOデータのビットサイズを記憶保持し、マスタは、ネットワークに接続されている全てのスレーブから、それぞれが記憶保持しているビットサイズと、アドレスとを関連付けたステータス情報を収集するステータス情報収集手段と、そのステータス情報収集手段で収集したネットワークに接続されている全てのスレーブのステータス情報から登録テーブルを作成し、登録テーブル記憶部に格納する登録テーブル作成手段と、を備えるとよい。このようにすると、実際にネットワークに格納されている全てのスレーブの情報を過不足無く収集することができるので、その後の待機時間の決定処理が、実際のネットワークに対応して正しく行うことができる。   (2) The slave stores and holds the bit size of the IO data of the IN frame to be transmitted, and the master associates the bit size stored and held by each slave connected to the network with the address. Status information collecting means for collecting the status information, and a registration table creating means for creating a registration table from the status information of all slaves connected to the network collected by the status information collecting means and storing it in the registration table storage unit It is good to provide. In this way, the information of all slaves actually stored in the network can be collected without excess or deficiency, so that the subsequent determination process of the waiting time can be correctly performed corresponding to the actual network. .

(3)マスタは、ネットワークに接続されている全てのスレーブについて、マスタからそれぞれのスレーブまでに存在するリピータの段数を取得するリピータ段数取得手段を備え、待機時間決定手段は、待機時間を通知するスレーブとの間でリピータが存在している場合、リピータ段数取得手段で取得したリピータの段数とリピータを通過する際に生じるリピータ遅延時間に基づいて、リピータを通過することに伴い生じる総遅延時間を求め、1番目からn−1番目までのスレーブがINフレームを送信するのに要する時間の総和から総遅延時間を減算してn番目に送信するスレーブについての待機時間を求めるものとすることができる。このようにすると、リピータが存在するネットワークにおいても、各スレーブから送信されたINフレームは、マスタにタイミング良く受信されるようになり、送信タイミングの最適化を図ることができる。   (3) The master includes repeater stage number acquisition means for acquiring the number of repeater stages existing from the master to each slave for all slaves connected to the network, and the standby time determination means notifies the standby time. When there is a repeater with the slave, based on the repeater stage number acquired by the repeater stage number acquisition means and the repeater delay time that occurs when passing through the repeater, the total delay time caused by passing through the repeater is calculated. The waiting time for the nth slave to be transmitted can be obtained by subtracting the total delay time from the total time required for the first to (n-1) th slaves to transmit the IN frame. . In this way, even in a network where repeaters exist, the IN frame transmitted from each slave is received by the master with good timing, and the transmission timing can be optimized.

(4)本発明のマスタは、マスタと複数のスレーブの存在するネットワーク上で、マスタが送信したスレーブの送信タイミングの基準信号となるトリガフレームを受信したスレーブが、そのトリガフレームを受信してから予め設定された待機時間を経過後、INフレームを送信する通信システムのためのマスタであって、ネットワークを構成するスレーブのアドレスと、そのスレーブが送信するINフレームのIOデータのビットサイズと、を関連付けた登録テーブルと、その登録テーブルに格納されたスレーブのアドレスに基づいてINフレームを送信するスレーブの順番を決定し、1番目からn−1番目までの各スレーブの登録テーブルに格納されたビットサイズから、それぞれのスレーブで送信されるINフレーム全体のデータサイズを求めると共に、その求めた各INフレーム全体のデータサイズの総和から、それら1番目からn−1番目までのスレーブがINフレームを送信するのに要する時間の総和を求め、その求めた時間に基づいてn番目に送信するスレーブについての待機時間を決定する待機時間決定手段と、その待機時間決定手段で決定した各スレーブについての待機時間を当該スレーブに通知する通知手段と、を備えた。   (4) The master of the present invention, after receiving the trigger frame received by the slave that has received the trigger frame serving as the reference signal of the transmission timing of the slave transmitted by the master on the network where the master and the plurality of slaves exist. A master for a communication system that transmits an IN frame after elapse of a preset waiting time, and the address of a slave that constitutes the network and the bit size of IO data of the IN frame that the slave transmits. Based on the associated registration table and the slave address stored in the registration table, the order of the slave that transmits the IN frame is determined, and the bits stored in the registration tables of the first to (n-1) th slaves From the size, the data size of the entire IN frame transmitted by each slave And obtaining the sum of the time required for the first to (n-1) th slaves to transmit the IN frame from the sum of the data sizes of all the obtained IN frames. Based on the obtained time Waiting time determining means for determining a waiting time for the nth slave to be transmitted, and notifying means for notifying the slave of the waiting time for each slave determined by the waiting time determining means.

本発明は、送信する順番を固定しつつ、各スレーブがINフレームを送信するタイミングを過度に無駄な空き時間(隙間)を生じることなく適切に設定することができる。   According to the present invention, it is possible to appropriately set the timing at which each slave transmits an IN frame without causing an excessively wasteful empty time (gap) while fixing the transmission order.

図2は、本発明の好適な一実施の形態を実現するネットワークシステム全体を示している。図2に示すように、このネットワークシステムは、マスタ10と、各種のスレーブ20が、フィールドバス30を介して接続されて構築されている。さらに、この例では、フィールドバス30の適宜位置にリピータ31が接続され、そのリピータ31の下位側にもスレーブ20が接続される構成を採っている。リピータ31は、通過する信号に対して波形整形をするので、このようにリピータ31を設けることで、ケーブル長を長くすることができる。マスタ10は、実際にはPLCを構成する1つのユニットであるマスタユニットにより構成される。また、図示省略するが、フィールドバス30の先端には、終端装置が接続される。   FIG. 2 shows an entire network system that realizes a preferred embodiment of the present invention. As shown in FIG. 2, this network system is constructed by connecting a master 10 and various slaves 20 via a field bus 30. Further, in this example, the repeater 31 is connected to an appropriate position of the field bus 30 and the slave 20 is connected to the lower side of the repeater 31. Since the repeater 31 shapes the waveform of the signal passing therethrough, the cable length can be increased by providing the repeater 31 in this way. The master 10 is actually composed of a master unit that is one unit constituting the PLC. Although not shown, a termination device is connected to the front end of the fieldbus 30.

図3は、マスタ10の内部構造を示している。マスタ10は、本発明との関係で言うと、フィールドバスに接続され、実際にデータの送受を行う通信インタフェース(物理層回路)11と、その通信インタフェース11を介してマスタ−スレーブ間通信をし、スレーブ20との間でI/Oデータの送受を行ったり、所定のコマンドの送信並びにそれに基づくレスポンスの受信を行うマスタ通信ASIC12と、各種の制御を行うMPU13と、各種の制御実行時にワークエリア等として使用されるRAM14と、上記制御を行うプログラムや、各種の設定データ等が格納されたEEPROM15と、を備えている。さらに、マスタユニットの場合、図示省略するが、PLCを構成する他のユニット(CPUユニット等)と内部バスを介して通信を行うための内部バスインタフェースや、動作状態(通信状態)や異常/正常などを示すLED表示部や、ユニットのアドレスの設定などを行うための設定スイッチ等を備えている。   FIG. 3 shows the internal structure of the master 10. In relation to the present invention, the master 10 is connected to the field bus and performs communication between the master and the slave via the communication interface (physical layer circuit) 11 that actually transmits and receives data. The master communication ASIC 12 that transmits / receives I / O data to / from the slave 20, transmits a predetermined command and receives a response based on the command, the MPU 13 that performs various controls, and the work area when various controls are executed And an EEPROM 15 in which a program for performing the above control and various setting data are stored. Further, in the case of the master unit, although not shown in the figure, an internal bus interface for communicating with other units (CPU unit or the like) constituting the PLC via an internal bus, an operation state (communication state), abnormal / normal Etc., a setting switch for setting the unit address, and the like.

MPU13が行う制御としては、CPUユニットその他のユニット等と通信したり、マスタ通信ASIC12を動作させたりするようになっている。特に本発明との関係でいうと、フィールドバス30に接続されたスレーブ20を確認し、そのスレーブ20の送信タイミング(タイムドメイン)を決定し、各スレーブに設定する機能を持つ。   The control performed by the MPU 13 communicates with the CPU unit and other units, or operates the master communication ASIC 12. In particular, in relation to the present invention, the slave 20 connected to the field bus 30 is confirmed, the transmission timing (time domain) of the slave 20 is determined, and each slave 20 has a function of setting.

本実施形態では、マスタ10が決定する各スレーブの送信タイミング(マスタの出した要求(トリガフレーム)を受信してから各スレーブが送信するタイミング)は、各スレーブに設定されたアドレス順にしてINフレームの位置を固定化することを基本とし、特許文献1等に用いられた前後に送信する送信フレーム間で通信していない無駄な時間を生じることを許容する通常モードと、係る無駄の発生を抑制し、効率よく通信する最適化モードを採るようにしている。   In this embodiment, the transmission timing of each slave determined by the master 10 (the timing at which each slave transmits after receiving the request (trigger frame) issued by the master) is set in the order of the addresses set in each slave. Based on fixing the position of the frame, the normal mode that allows a wasteful time not communicating between transmission frames transmitted before and after that used in Patent Document 1 and the like, and the occurrence of such waste The optimization mode that suppresses and communicates efficiently is adopted.

リピータ31は、送信されてきたフレームを受信する処理,受信したフレームの波形整形をする処理,波形整形したフレームを送信する処理等を行うため、そこを通過する際に、一定の遅延が生じる。このリピータ31における遅延時間は、FAネットワークの規定により所定時間内になるように定められているので、どのメーカ・型式のリピータを使用したとしても、リピータを通過することにより生じる遅延時間は一律となる。そして、係る所定時間が、“リピータ遅延時間値”としてEEPROM15に格納されている。   Since the repeater 31 performs a process of receiving a transmitted frame, a process of shaping a waveform of the received frame, a process of transmitting a waveform-shaped frame, and the like, a certain delay occurs when passing through the repeater 31. Since the delay time in the repeater 31 is determined to be within a predetermined time by the FA network regulations, the delay time generated by passing through the repeater is uniform regardless of which manufacturer / model repeater is used. Become. The predetermined time is stored in the EEPROM 15 as a “repeater delay time value”.

図4に示すように、スレーブ20は、フィールドバスに接続され、実際にマスタ10との間でI/Oデータや各種メッセージ等の送受を行う通信インタフェース(物理層回路)21と、その通信インタフェース21を介してマスタ−スレーブ間通信をし、I/Oデータの送受を行ったり、マスタ20からの所定のコマンドの受信並びにそれに基づくレスポンスの送信を行うスレーブ通信ASIC22と、各種の制御を行うMPU23と、各種の制御実行時にワークエリア等として使用されるRAM24と、上記制御を行うプログラムや、各種の設定データ,IOデータ等が格納されたEEPROM25と、を備えている。マスタ10から送られてきた“タイムドメイン”は、スレーブ通信ASIC22内のタイムドメイン記憶部22a内に格納される。スレーブ通信ASIC22は、そのタイムドメイン記憶部22a内に格納されたタイムドメインに従って、マスタの出したトリガフレームを受信後、当該タイムドメイン経過後にフレーム(INフレーム)を送信する。   As shown in FIG. 4, the slave 20 is connected to the field bus and actually communicates with the master 10 to transmit / receive I / O data, various messages, and the like, and its communication interface. 21. A slave communication ASIC 22 that performs master-slave communication via 21 and transmits / receives I / O data, receives predetermined commands from the master 20 and transmits responses based on the commands, and an MPU 23 that performs various controls And a RAM 24 used as a work area at the time of various control executions, and an EEPROM 25 in which a program for performing the above control, various setting data, IO data, and the like are stored. The “time domain” sent from the master 10 is stored in the time domain storage unit 22 a in the slave communication ASIC 22. The slave communication ASIC 22 receives the trigger frame issued by the master according to the time domain stored in the time domain storage unit 22a, and transmits a frame (IN frame) after the time domain has elapsed.

また、図示省略するが、動作状態(通信状態)や異常/正常などを示すLED表示部や、スレーブ20のアドレスの設定などを行うための設定スイッチや、電源回路等を備えている。また、スレーブ20がI/Oターミナルの場合、IO機器を接続するための端子台等も備える。   Although not shown in the figure, an LED display unit that indicates an operation state (communication state), abnormality / normality, a setting switch for setting an address of the slave 20, a power supply circuit, and the like are provided. When the slave 20 is an I / O terminal, a terminal block for connecting an IO device is also provided.

次に、マスタが行う最適化モードによる送信タイミング(タイムドメイン)を決定する機能を説明する。まず、マスタ10は、RAM14内に、送信タイミングを決定する際に必要となる各スレーブのアドレス(スレーブアドレス/ノードアドレス)と、送信フレームに含まれるINデータのビットサイズを関連付けた登録テーブルを記憶保持する。この記憶保持する登録テーブルは、マスタ10がネットワークに接続・加入されたスレーブと通信をして自動的に作成するようにしてもよいし、ユーザが設定ツール装置で作成したものをダウンロードすることでRAM14内に格納するようにしても良い。   Next, a function for determining transmission timing (time domain) by the optimization mode performed by the master will be described. First, the master 10 stores, in the RAM 14, a registration table in which each slave address (slave address / node address) necessary for determining transmission timing is associated with the bit size of IN data included in the transmission frame. Hold. The registration table stored and held may be created automatically by the master 10 communicating with a slave connected to the network or downloaded by the user using the setting tool device. You may make it store in RAM14.

図5は、係る登録テーブルを自動的に作成する機能を示している。まず、マスタ10のMPU13は、接続可能な各アドレスについて、冗長性を考慮したタイムドメイン値を算出する(S1)。すなわち、本実施形態でも、図1に示すように、スレーブが送信するINフレームは、ビットデータが16ビットのものを基準とし、その基準となるINフレームを送信するのに要する時間あるいはかかる時間に所定のマージンを付加した時間を、1つのタイムスロットの時間に設定し、#nのアドレスのスレーブは、#nのタイムスロットのタイミングでフレームを送信するようにしている。そして、ネットワークに接続可能なノード数(N)が決まっているので図1(a)に示すように、#0,#1,#2,……,#Nの各タイムスロットの送信開始時間であるタイムドメイン値を算出する。このとき求める各タイムドメイン値は、リピータの存在を考慮せず、マスタ10に接続されたフィールドバス30に直接接続されている(0段目)スレーブ20に対するタイムドメイン値とする。なお、係る各アドレスに対するタイムドメイン値の算出処理は、たとえば特許文献1等に開示された技術を用いて行うことができる。   FIG. 5 shows a function for automatically creating such a registration table. First, the MPU 13 of the master 10 calculates a time domain value considering redundancy for each connectable address (S1). That is, also in this embodiment, as shown in FIG. 1, the IN frame transmitted by the slave is based on the bit data having 16 bits as a reference, and the time required for transmitting the reference IN frame or the time required for the transmission is as follows. The time with a predetermined margin added is set as the time of one time slot, and the slave at the address of #n transmits a frame at the timing of the time slot of #n. Since the number of nodes (N) that can be connected to the network is determined, as shown in FIG. 1A, the transmission start time of each time slot of # 0, # 1, # 2,. A certain time domain value is calculated. Each time domain value obtained at this time is a time domain value for the slave 20 connected directly to the fieldbus 30 connected to the master 10 (0th stage) without considering the presence of the repeater. The time domain value calculation process for each address can be performed using, for example, the technique disclosed in Patent Document 1 or the like.

次に、MPU13は、ネットワークに新規なスレーブが追加されたか否かを判断する(S2)。これは、マスタ10(MPU13)は、定期的にネットワークに接続されているスレーブを監視しており、新たにネットワークに加入されたスレーブの有無を判断する。   Next, the MPU 13 determines whether or not a new slave has been added to the network (S2). This is because the master 10 (MPU 13) periodically monitors the slaves connected to the network, and determines whether there are any slaves newly joined to the network.

MPU13は、新たなスレーブの加入を検出した場合(S2でYes)、MPU13は、そのスレーブに対してステータスリード(STR)メッセージを送り、当該スレーブが記憶するステータスを取得する。そして、マスタ10(MPU13)は、取得したステータスに基づき、タイムドメイン値を算出し、ステータスライト(STR)メッセージにより、その求めたタイムドメイン値をそのスレーブ20(スレーブ通信ASIC12)に書き込む。本実施形態との関係でいうと、取得するステータスは、そのスレーブのアドレスと、入力点数(ビットデータサイズ)と、リピータ段数である。これらの情報は、スレーブ20が自己のステータス情報として保有している。なお、リピータ段数は、この登録テーブル設定機能とは別に、事前にマスタ10(MPU13)がリピータ段数調査用のメッセージフレーム(ビーコンフレーム)を送り、そのビーコンフレームを受信したスレーブは、自己のリピータ段数を認識し、ステータス情報を記憶する記憶部(RAM24等)に格納する。このビーコンフレームは、初期値としてリピータ段数情報として“0”を持ち、たとえば、ブロードキャスト等で送信され、リピータを通過する都度、リピータ段数が“+1”インクリメントされて更新される。これにより、このビーコンフレームを受信したスレーブは、受信するまでに通過したリピータの数を認識することができ、その数をリピータ段数として、ステータス情報記憶部に格納する。係る技術は、たとえば、特開2007−097157号公報等に開示されている。なお、このビーコンフレームのように、マスタ側からスレーブ側に向けて送信されたフレームに基づいてリピータ段数を求めるものに限ることはなく、これとは逆に、スレーブ側からマスタに向けてリピータ段数調査用のメッセージフレームを送信することでマスタが認識するようにしてもよい。つまり、上記のビーコンフレームと同様に、スレーブから送信されたリピータ段数調査用フレームは、初期値が0の“リピータ段数”の情報を持ち、リピータを通過する都度、リピータにてそのリピータ段数が“+1”インクリメントされる。これにより、マスタは、受信したリピータ段数調査用フレームの送信元アドレスと、フレームに格納された“リピータ段数”の情報から、各スレーブまでの間に、幾つのリピータが存在しているかを認識することができる。   When the MPU 13 detects the joining of a new slave (Yes in S2), the MPU 13 sends a status read (STR) message to the slave and acquires the status stored by the slave. Then, the master 10 (MPU 13) calculates a time domain value based on the acquired status, and writes the obtained time domain value to the slave 20 (slave communication ASIC 12) by a status write (STR) message. In relation to this embodiment, the statuses to be acquired are the address of the slave, the number of input points (bit data size), and the number of repeater stages. These pieces of information are held by the slave 20 as its own status information. In addition to the registration table setting function, the repeater stage number is determined in advance by the master 10 (MPU 13) sending a repeater stage number message frame (beacon frame), and the slave receiving the beacon frame has its own repeater stage number. Is stored in a storage unit (such as the RAM 24) that stores status information. This beacon frame has “0” as repeater stage number information as an initial value, and is transmitted, for example, by broadcast or the like. Each time it passes through the repeater, the repeater stage number is incremented by “+1” and updated. As a result, the slave that has received this beacon frame can recognize the number of repeaters that have passed until the beacon frame is received, and stores that number in the status information storage unit as the number of repeater stages. Such a technique is disclosed in, for example, Japanese Patent Application Laid-Open No. 2007-097157. The beacon frame is not limited to the number of repeater stages based on the frame transmitted from the master side toward the slave side. Conversely, the repeater stage number from the slave side toward the master is not limited. The master may be recognized by transmitting a message frame for investigation. That is, similar to the above-described beacon frame, the repeater stage number investigation frame transmitted from the slave has the information of the “repeater stage number” having an initial value of 0, and the repeater stage number is “ +1 "incremented. As a result, the master recognizes how many repeaters exist between each slave from the transmission source address of the received repeater stage number check frame and the information of the “repeater stage number” stored in the frame. be able to.

また、この処理ステップS3におけるスレーブのタイムドメイン値の決定は、通常モードにおける決定処理である。具体的には、MPU13は、リピータを介していない0段目(リピータ段数=0)のスレーブに対しては、処理ステップS1で求めたアドレスと同じ番号のタイムスロットに割り当てられたタイムドメイン値を読み出し、その値をそのスレーブについてのタイムドメイン値に決定する。つまり、スレーブアドレスが#nの場合、タイムスロット#nに割り当てられたタイムドメイン値が、その#nのスレーブのタイムドメイン値となる。また、リピータの下位に存在するスレーブの場合、MPU13は、リピータ遅延に基づく補正を行う。つまり、MPU13は、対象となるスレーブのリピータ段数を取得すると共に、EEPROM15に格納されたリピータ遅延時間値を読み出し、
補正値=(リピータ段数×リピータ遅延時間値)×2
を求める。そして、その対象となるスレーブのアドレス(#n)に対応するタイムスロット#nのタイムドメイン値(0段目の基準タイムドメイン値)から、上記の補正値を減算して補正タイムドメイン値を求め、求めた値をそのスレーブに対するタイムドメイン値とする。リピータを通過することで、リピータ遅延時間値だけ遅れるので、マスタからスレーブに向けて送られたトリガフレームが、スレーブに到達するまでにリピータを通過すると、通過した段数にリピータ遅延時間値を掛けた時間(下位方向総遅延時間)だけ遅れる。つまり、マスタから送信されたトリガフレームが、リピータを介さない0段目のスレーブに到達するときよりも、リピータの下位側に存在するスレーブに到着するタイミングが、そのリピータ段数に起因する下位方向総遅延時間だけ遅れる。よって、各スレーブのINフレームの送信タイミングは、係るトリガフレームを受信した時点を基準に設定されたタイムドメイン値を経過後となるので、リピータの下位に存在するスレーブは、基準となる0段のタイムドメイン値に基づく期間よりも、上記の下位方向総遅延時間分だけ早く送信する必要がある。
The determination of the slave time domain value in the processing step S3 is a determination process in the normal mode. Specifically, the MPU 13 sets the time domain value assigned to the time slot having the same number as the address obtained in the processing step S1 for the slave at the 0th stage (number of repeater stages = 0) not via the repeater. Read and determine the value as the time domain value for that slave. That is, when the slave address is #n, the time domain value assigned to the time slot #n is the time domain value of the slave of #n. Further, in the case of a slave that exists below the repeater, the MPU 13 performs correction based on the repeater delay. That is, the MPU 13 acquires the repeater stage number of the target slave and reads the repeater delay time value stored in the EEPROM 15.
Correction value = (number of repeater stages x repeater delay time value) x 2
Ask for. Then, the correction time domain value is obtained by subtracting the correction value from the time domain value of the time slot #n corresponding to the address (#n) of the subject slave (#n). The obtained value is set as the time domain value for the slave. By passing the repeater, the repeater delay time value is delayed, so when the trigger frame sent from the master to the slave passes through the repeater before reaching the slave, the number of stages passed is multiplied by the repeater delay time value. Delayed by time (total delay time in the lower direction). In other words, the trigger frame transmitted from the master arrives at the slave on the lower side of the repeater rather than reaching the 0th slave without passing through the repeater. Delayed by the delay time. Therefore, the transmission timing of the IN frame of each slave is after the time domain value set with reference to the time when the trigger frame is received, so that the slave existing in the lower order of the repeater has a 0-stage reference. It is necessary to transmit by the above-mentioned total delay time in the lower direction than the period based on the time domain value.

同様に、スレーブから送信されたINフレームがマスタに到着するまでにリピータを通過すると、その通過する都度、リピータ遅延時間値だけ遅れる。従って、そのリピータ遅延時間値にリピータ段数を掛けることで、スレーブから送信されたINフレームがマスタに到着するまでの間に生じるリピータに起因する上位方向総遅延時間が求まる。そこで、INフレームの通信のみに着目した場合、その上位方向総遅延時間分だけ早めに送信することで、マスタに到着する(マスタ10に直接接続されているフィールドバス30を伝送される)際のタイミングは、処理ステップS1で求めた0段目のタイムドメイン値に従って、アドレス順にタイミング良く通信される。   Similarly, if the IN frame transmitted from the slave passes through the repeater before reaching the master, it is delayed by the repeater delay time value each time it passes. Therefore, by multiplying the repeater delay time value by the number of repeater stages, the total upper direction delay time caused by the repeater generated until the IN frame transmitted from the slave arrives at the master is obtained. Therefore, when attention is paid only to the communication of the IN frame, by sending it earlier by the total delay time in the upper direction, when arriving at the master (transmitting the fieldbus 30 directly connected to the master 10) The timing is communicated with good timing in order of address according to the time domain value of the 0th stage obtained in the processing step S1.

よって、マスタから送信されるトリガフレームの伝送に基づく下位方向総遅延時間(リピータ段数×リピータ遅延時間値)と、スレーブから送信されるINフレームの伝送に基づく上位方向総遅延時間(リピータ段数×リピータ遅延時間値)の両方向(往復)のリピータによる遅延を考慮し、0段目のタイムドメイン値に、上記の補正値だけ減算した値を、補正後のタイムドメイン値とすることで、各スレーブから送信されたINフレームが、処理ステップS1で求めた0段目のタイムドメイン値に従って、アドレス順にタイミング良くマスタに到達する。なお、係るリピータ遅延時間を考慮した補正処理については、例えば、特許文献1や特開2007−097157号公報等に開示された技術を適用することができる。   Therefore, the lower total delay time based on the transmission of the trigger frame transmitted from the master (repeater stage number × repeater delay time value) and the upper total delay time based on the transmission of the IN frame transmitted from the slave (repeater stage number × repeater). Taking into account delays caused by repeaters in both directions (delay time value), the value obtained by subtracting the above correction value from the time domain value in the 0th stage is used as the time domain value after correction. The transmitted IN frame arrives at the master in order of address according to the timing in accordance with the time domain value at the 0th stage obtained in processing step S1. For the correction processing considering the repeater delay time, for example, the technique disclosed in Patent Document 1, Japanese Patent Application Laid-Open No. 2007-097157, or the like can be applied.

このようにして求められた、リピータの有無(ある場合には、その段数)を考慮して決定したタイムドメイン値は、上述したようにステータスライトフレームにより、対応するスレーブに送られる。   The time domain value determined in consideration of the presence / absence of the repeater (the number of stages in some cases) obtained in this way is sent to the corresponding slave by the status write frame as described above.

また、MPU13は、処理ステップS3を実行することでステータスリードフレームにて読み出したスレーブのビットサイズを、スレーブのアドレスと関連付けたスレーブ管理テーブルを作成(追加・更新)し、スレーブ管理テーブル記憶部14aに保管する(S4)。なお、処理ステップS2の分岐判断で、新たなスレーブが検出されなかった場合、上記の処理ステップS3,S4がスキップされる。   Also, the MPU 13 creates (adds / updates) a slave management table in which the slave bit size read in the status read frame is associated with the slave address by executing the processing step S3, and the slave management table storage unit 14a. (S4). If a new slave is not detected in the branch determination in process step S2, the above process steps S3 and S4 are skipped.

次いで、MPU13は、設定ツール装置や、ユーザープログラム(ラダープログラム)の実行に伴う“登録テーブル生成指示”のイベントがあったか否かを判断する(S5)。生成指示が無い場合、MPU13は、その他のマスタ処理を実行する(S7)。つまり、通常のマスタスレーブ通信を実行したり、他のユニットとの間でデータを送受したりする等の処理を行う。   Next, the MPU 13 determines whether or not there is a “registration table generation instruction” event associated with the execution of the setting tool device or the user program (ladder program) (S5). If there is no generation instruction, the MPU 13 executes other master processing (S7). That is, processing such as normal master-slave communication or data transmission / reception with other units is performed.

一方、生成指示のイベントを受信した場合、MPU13は、スレーブ管理テーブル記憶部14aに格納されたスレーブ管理テーブルの情報から、登録テーブルを生成し、登録管理テーブル記憶部14bに格納する(S6)。この生成する登録テーブルは、例えば図6に示すように、“スレーブのアドレス”と、“有効無効フラグ”と、“ビットデータサイズ”とを関連付けたテーブル構造となっている。   On the other hand, when the generation instruction event is received, the MPU 13 generates a registration table from the information of the slave management table stored in the slave management table storage unit 14a, and stores it in the registration management table storage unit 14b (S6). The generated registration table has a table structure in which “slave address”, “valid / invalid flag”, and “bit data size” are associated with each other as shown in FIG. 6, for example.

図6に示すように、アドレスの欄は、IN#0からIN#Nまで用意される。スレーブから送信されてくるのはINデータ(INフレーム)であるので、アドレスも、IN#nとなっている。MPU13は、スレーブ管理テーブルに格納されたアドレスに対応するビットサイズを、登録テーブルの該当箇所に格納するとともに、そのアドレスの有効無効フラグを“有効”にする。また、ビットサイズが32,42,…のように、基本サイズとなる16ビットよりも大きい場合、その大きさに合わせて連続するアドレスの有効無効フラグを“無効”にする。例えば、IN#2のように、32ビットの場合、2つのタイムスロットを占有する必要があるので、続くIN#3を“無効”にセットする。同様に、IN#5のように、48ビットの場合、3つのタイムスロットを占有する必要があるので、続くIN#6とIN#7を“無効”にセットする。   As shown in FIG. 6, the address column is prepared from IN # 0 to IN # N. Since the IN data (IN frame) is transmitted from the slave, the address is also IN # n. The MPU 13 stores the bit size corresponding to the address stored in the slave management table at the corresponding location in the registration table, and sets the valid / invalid flag of the address to “valid”. If the bit size is larger than 16 bits, which is the basic size, such as 32, 42,..., The valid / invalid flag of consecutive addresses is set to “invalid” according to the size. For example, in the case of 32 bits like IN # 2, since it is necessary to occupy two time slots, subsequent IN # 3 is set to “invalid”. Similarly, in the case of 48 bits as in IN # 5, since it is necessary to occupy three time slots, subsequent IN # 6 and IN # 7 are set to “invalid”.

また、MPU13は、ネットワークに存在しない(スレーブ管理テーブルに登録されていない)アドレスについての有効無効フラグを、“無効”にセットする。さらに、有効無効フラグが“無効”のものについては、ビットデータサイズの欄は“0”としている。   In addition, the MPU 13 sets a valid / invalid flag for an address that does not exist in the network (not registered in the slave management table) to “invalid”. Further, the bit data size column is “0” when the valid / invalid flag is “invalid”.

このようにして生成した登録テーブルは、RAM14内に用意された登録テーブル記憶部14bに格納される。その後、MPU13は、処理ステップS7に移行し、その他のマスタ処理を実行する。以後、MPU13は、上述した処理ステップS2からS7までの各処理を、繰り返し実行する。   The registration table generated in this way is stored in a registration table storage unit 14b prepared in the RAM 14. Thereafter, the MPU 13 proceeds to processing step S7 and executes other master processing. Thereafter, the MPU 13 repeatedly executes the above-described processing steps S2 to S7.

このように、本実施形態では、登録テーブルを自動的に生成するようにしたが、設定ツール装置を用いてユーザがマニュアルで設定することもできる。図7,図8は、設定ツール装置を用いた登録テーブルの設定処理を説明する、設定ツール装置のモニタ画面の図である。図7に示すように、右側のネットワーク表示ウインドウW1に、登録テーブルを作成するネットワークのネットワーク構成図を描画する。このネットワーク構成図は、設定ツール装置をネットワークに直接或いはPLCを介して接続し、当該ネットワークに加入しているノード(スレーブ)の情報を収集して作成・描画しても良いし、モニタの左側の機器リスト表示ウインドウW2に表示された部品リストの中から選択することで作成・描画しても良い。このネットワーク構成図の作成処理は、通常の設定ツール装置の機能として組み込まれているものを用いることができる。   As described above, in the present embodiment, the registration table is automatically generated, but the user can also manually set it using the setting tool device. 7 and 8 are diagrams of the monitor screen of the setting tool device for explaining the registration table setting processing using the setting tool device. As shown in FIG. 7, a network configuration diagram of the network for creating the registration table is drawn in the network display window W1 on the right side. In this network configuration diagram, the setting tool device may be connected to the network directly or via a PLC, and information on nodes (slaves) subscribing to the network may be collected and created or drawn. It may be created and drawn by selecting from the parts list displayed in the device list display window W2. This network configuration diagram creation process can use a built-in function of a normal setting tool device.

このようにして、ネットワーク構成図が作成されたならば、図8に示すスレーブ情報登録ウインドウを開く。これは、図7のモニタ画面中の“編集”ボタンを選択し、プルダウンメニューを表示(図示省略)し、該当するメニューを指定することでモニタ画面に表示することができる。   When the network configuration diagram is created in this way, the slave information registration window shown in FIG. 8 is opened. This can be displayed on the monitor screen by selecting the “edit” button in the monitor screen of FIG. 7, displaying a pull-down menu (not shown), and specifying the corresponding menu.

このスレーブ情報登録ウインドウは、上側の未登録デバイス一覧表示ウインドウW3と、下側の登録デバイス一覧表示ウインドウW4を備え、当該スレーブ情報登録ウインドウを開いたときは、図7のネットワーク表示ウインドウW1に描画されていたネットワーク構成図を構成する各スレーブの情報(アドレス,型式等)が表示される。この状態で、各スレーブを選択し、図示省略するビットサイズ登録画面を表示し、そこにビットサイズを登録(入力)すると、登録デバイス一覧表示ウインドウW4に移行する。そして、すべてのスレーブに対するビットサイズの登録が完了すると、図8に示すように、すべてのスレーブが登録デバイス一覧表示ウインドウW4に表示され、設定ツール装置上での処理が完了する。   The slave information registration window includes an upper unregistered device list display window W3 and a lower registered device list display window W4. When the slave information registration window is opened, the slave information registration window is drawn in the network display window W1 of FIG. Information (address, model, etc.) of each slave constituting the network configuration diagram that has been made is displayed. In this state, each slave is selected, a bit size registration screen (not shown) is displayed, and when the bit size is registered (input) there, the process proceeds to a registered device list display window W4. When the registration of the bit sizes for all the slaves is completed, all the slaves are displayed in the registered device list display window W4 as shown in FIG. 8, and the processing on the setting tool device is completed.

この状態で、設定ツール装置とマスタ(PLC)を接続し、モニタ画面の下方に用意された“アップロード”ボタンをクリックすると、ノードアドレスと、ビットサイズを関連付けたテーブルがマスタにロードされ、マスタの登録テーブルに格納される。   In this state, when the setting tool device and the master (PLC) are connected and the “Upload” button prepared at the bottom of the monitor screen is clicked, a table associating the node address with the bit size is loaded into the master, and the master's Stored in the registration table.

図9は、最適化モードで動作する場合のマスタ10(MPU13)の機能を示している。最適化モードへの移行は、登録テーブルの作成と同様に、設定ツール装置等による指示を受けたことに起因して行うようにする。もちろん、マスタ10にモード切替スイッチを設け、スイッチ操作によって切り替えるようにしても良い。   FIG. 9 shows functions of the master 10 (MPU 13) when operating in the optimization mode. The shift to the optimization mode is performed due to receiving an instruction from the setting tool device or the like, similarly to the creation of the registration table. Of course, the master 10 may be provided with a mode changeover switch and switched by a switch operation.

MPU13は、RAM14に格納された登録テーブルを読み出す(S11)。そして、MPU13は、読み出した登録テーブルに基づき、スレーブに設定する最適なタイムドメイン値を算出する(S12)。このとき求める各タイムドメイン値は、通常モードの時と同様に、リピータの存在を考慮せず、マスタ10に接続されたフィールドバス30に直接接続されている(0段目)スレーブ20に対するタイムドメイン値とする。具体的には、登録テーブル中の“有効フラグ”なアドレスと、そのアドレスのデータサイズを抽出し、まず、送信する順番は、有効フラグのアドレスを昇順に並ぶように決定する。これにより、たとえば、図6に示す例では、“IN#1”のアドレスのスレーブは存在しないので、そのアドレスに対するタイムドメイン値の設定を行わない。もちろん、IN#3やIN#6,IN#7のように、ビットサイズが16ビットよりも大きいフレームのために、その前のアドレスのスレーブに占有されているアドレスも、“無効フラグ”となっているので、そのアドレスについてのタイムドメイン値の設定も行われない。   The MPU 13 reads the registration table stored in the RAM 14 (S11). Then, the MPU 13 calculates the optimum time domain value to be set for the slave based on the read registration table (S12). Each time domain value obtained at this time is the time domain for the slave 20 that is directly connected to the fieldbus 30 connected to the master 10 (the 0th stage) without considering the presence of the repeater, as in the normal mode. Value. Specifically, the “valid flag” address in the registration table and the data size of the address are extracted. First, the order of transmission is determined so that the addresses of the valid flag are arranged in ascending order. Thereby, for example, in the example shown in FIG. 6, there is no slave with the address of “IN # 1”, so the time domain value is not set for the address. Of course, because the frame has a bit size larger than 16 bits, such as IN # 3, IN # 6, and IN # 7, the address occupied by the slave at the previous address is also an “invalid flag”. Therefore, no time domain value is set for the address.

さらに、ネットワーク上に存在するスレーブのアドレスと、そのスレーブが送信するINフレームのビットサイズから、アドレス順に並んだ各INフレームを詰めて送信タイミングを規定するタイムドメイン値を設定する。具体的には、あるアドレス(#n−1)のスレーブから送信されるINフレームが送信完了したタイミングで、次のアドレス(#n)のスレーブの送信タイミングを設定する。一例を示すと、図11のように、#0のスレーブから送信されるINフレームのビットサイズが32ビットで、#2のスレーブから送信されるINフレームのビットサイズが64ビットで、#6のスレーブから送信されるINフレームのビットサイズが16ビットとすると、通常モードでは、図11(a)に示すように、#0のスレーブから送信されるINフレームは、32ビットのため、#1に割り当てられる領域まで占有するが、ヘッダは1つであるので、2つ分のタイムスロットから少なくともヘッドサイズの1つ分だけ短く、そのINフレームが送信完了してから、#2のスレーブからINフレームが送信されてくるまでに、係るヘッダ1つ分の空き時間が生じる。同様に、#2のスレーブから送信されるINフレームは、64ビットのビットサイズを有しているので、4つ分のタイムスロットを占有する。よって、#2のスレーブから送信されるINフレームは、4つ分のタイムスロットのから少なくともヘッドサイズの3つ分だけ短く、そのINフレームが送信完了してから、#6のスレーブのINフレームが送信されるまでに、係るヘッダ1つ分の空き時間が生じる。   Further, from the address of the slave existing on the network and the bit size of the IN frame transmitted by the slave, a time domain value that defines the transmission timing is set by packing each IN frame arranged in the address order. Specifically, the transmission timing of the slave at the next address (#n) is set at the timing when the transmission of the IN frame transmitted from the slave at the certain address (# n-1) is completed. For example, as shown in FIG. 11, the bit size of the IN frame transmitted from the # 0 slave is 32 bits, the bit size of the IN frame transmitted from the # 2 slave is 64 bits, and the # 6 Assuming that the bit size of the IN frame transmitted from the slave is 16 bits, the IN frame transmitted from the slave # 0 is 32 bits in the normal mode, as shown in FIG. Although it occupies the allocated area but has only one header, it is shorter by at least one head size from the two time slots, and after the IN frame has been transmitted, the IN frame is sent from the # 2 slave. Until one of the headers is transmitted. Similarly, since the IN frame transmitted from the slave # 2 has a bit size of 64 bits, it occupies four time slots. Therefore, the IN frame transmitted from the # 2 slave is shorter by at least three head sizes from the four time slots, and after the IN frame has been transmitted, the IN frame of the # 6 slave is There is a free time for one such header before it is transmitted.

そこで、MPU13は、#nのスレーブがINフレームを送信完了したタイミングで、#(n+1)のスレーブがINフレームを送信するように、当該#(n+1)のタイムドメイン値を決定する。具体的には、例えば図11に示す例では、各スレーブがマスタからのトリガフレームを受信してから、INフレームを送信するタイミングである応答位置(タイムドメイン値)は、下記のサイズ分を通信するに要する時間経過後となる。もちろん、通信時間(実際の伝送や、スレーブ内での送受信処理等)のばらつきを考慮し、所定のマージンを付加するのは構わない。この求めた各スレーブに対するタイムドメイン値は、別途、RAM14等に格納するようにしても良いし、登録テーブルの追加情報として各アドレスに関連付けて格納しても良い。
スレーブ#0の応答位置=0
スレーブ#2の応答位置=0+ヘッダ+32ビット
スレーブ#6の応答位置=0+ヘッダ+32ビット+ヘッダ+64ビット
Therefore, the MPU 13 determines the time domain value of # (n + 1) so that the slave of # (n + 1) transmits the IN frame at the timing when the slave of #n completes transmission of the IN frame. Specifically, in the example shown in FIG. 11, for example, the response position (time domain value) at which each slave transmits an IN frame after receiving a trigger frame from the master communicates the following size. It will be after the time required to do. Of course, a predetermined margin may be added in consideration of variations in communication time (actual transmission, transmission / reception processing in the slave, etc.). The obtained time domain value for each slave may be separately stored in the RAM 14 or the like, or may be stored in association with each address as additional information of the registration table.
Response position of slave # 0 = 0
Slave # 2 response position = 0 + header + 32 bits Slave # 6 response position = 0 + header + 32 bits + header + 64 bits

次に、MPU13は、ネットワークに新規なスレーブが追加されたか否かを判断する(S13)。つまり、マスタ10(MPU13)は、定期的にネットワークに接続されているスレーブを監視しており、新たにネットワークに加入されたスレーブの有無を判断する。   Next, the MPU 13 determines whether or not a new slave has been added to the network (S13). That is, the master 10 (MPU 13) periodically monitors the slaves connected to the network, and determines whether there are any slaves newly joined to the network.

MPU13は、新たなスレーブの加入を検出した場合(S13でYes)、MPU13は、そのスレーブに対するタイムドメイン値を求めるとともに、設定する(S14)。具体的には、MPU13は、そのスレーブに対してステータスリード(STR)メッセージを送り、当該スレーブが記憶するステータスを取得する。ここで取得するステータスは、少なくとも“リピータ段数”についての情報である。本実施形態では、各スレーブが、自己のステータス情報として、アドレス,型式,IN/OUTの種類,ビットサイズその他のスレーブに関する情報に加え、ネットワークに加入された状態における自己の階層位置(リピータ段数)も保持するようにしているので、MPU13は、係るリピータ段数を、ステータスリードフレームを使って取得する。   When the MPU 13 detects the joining of a new slave (Yes in S13), the MPU 13 obtains and sets the time domain value for the slave (S14). Specifically, the MPU 13 sends a status read (STR) message to the slave and acquires the status stored in the slave. The status acquired here is information on at least the “number of repeater stages”. In this embodiment, each slave, as its own status information, in addition to address, type, IN / OUT type, bit size, and other information related to the slave, its own hierarchical position in the state of joining the network (number of repeaters) Therefore, the MPU 13 acquires the number of repeater stages using the status lead frame.

そして、処理対象のスレーブのアドレスに基づき、S12で求めた当該スレーブ(アドレス)についての0段目におけるタイムドメイン値に対し、上記のリピータ段数に基づく補正を行い、リピータ段数を考慮したタイムドメイン値を求める。このタイムドメイン値の補正処理は、上述した通常モードにおける処理ステップS3で行ったものと同様である。つまり、MPU13は、
補正後タイムドメイン値=
タイムドメイン値−リピータ段数×リピータ遅延時間値×2

を、演算することで実際のタイムドメイン値を決定する。そして、決定したタイムドメイン値をステータスライトフレームを使い、該当するスレーブ20のスレーブ通信ASICに書き込む。
Then, based on the address of the slave to be processed, the time domain value at the 0th stage for the slave (address) obtained in S12 is corrected based on the number of repeater stages, and the time domain value considering the repeater stage number Ask for. This time domain value correction processing is the same as that performed in the processing step S3 in the normal mode described above. That is, the MPU 13
Time domain value after correction =
Time domain value-number of repeater stages x repeater delay time value x 2

To determine the actual time domain value. Then, the determined time domain value is written into the slave communication ASIC of the corresponding slave 20 using the status write frame.

その後、MPU13は、処理ステップS15に移行し、その他のマスタ処理を実行する。以後、MPU13は、上述した処理ステップS13からS15までの各処理を、繰り返し実行する。   After that, the MPU 13 proceeds to processing step S15 and executes other master processing. Thereafter, the MPU 13 repeatedly executes the above-described processing steps S13 to S15.

一方、スレーブ20(MPU23)は、図10に示すフローチャートを実行する機能を有する。すなわち、マスタからステータスライトフレームでスレーブ通信ASIC22に対してパラメータ(タイムドメイン値)が書き込まれるまで待つ(S21)。そして、タイムドメイン値が格納されたならば、MPU23は、スレーブ通信ASIC22が、格納されたタイムドメイン値にしたがってINフレームを返送する状態に遷移させる(S22)。よって、以後、スレーブ通信ASIC22は、マスタからトリガフレームを受信したスレーブ通信ASIC22は、設定されたタイムドメイン値にしたがって、INフレームを送信する。つまり、マスタから通常モードのタイムドメイン値が設定された場合には、スレーブ20は通常モードのタイミングでINフレームを送信し、最適化モードのタイムドメイン値が設定された場合には、スレーブ20は最適化モードのタイミングでINフレームを送信することになる。   On the other hand, the slave 20 (MPU 23) has a function of executing the flowchart shown in FIG. That is, it waits until a parameter (time domain value) is written to the slave communication ASIC 22 by the status write frame from the master (S21). If the time domain value is stored, the MPU 23 makes a transition to a state in which the slave communication ASIC 22 returns an IN frame according to the stored time domain value (S22). Accordingly, after that, the slave communication ASIC 22 receives the trigger frame from the master, and the slave communication ASIC 22 transmits the IN frame according to the set time domain value. That is, when the time domain value of the normal mode is set from the master, the slave 20 transmits the IN frame at the timing of the normal mode, and when the time domain value of the optimization mode is set, the slave 20 The IN frame is transmitted at the timing of the optimization mode.

この処理ステップS22による遷移が行われたならば、MPU23は、スレーブの処理を繰り返し実行する(S23)。このスレーブの処理としては、RAMに記憶されるIOデータの読み書きや、接続されたIO機器との通信や、マスタから送られてきたメッセージに対するレスポンスの作成・返信等がある。   If the transition by this process step S22 is performed, MPU23 will repeatedly perform the process of a slave (S23). The slave processing includes reading / writing IO data stored in the RAM, communication with a connected IO device, and creating / replying a response to a message sent from the master.

上記の最適化モードの動作開始タイミングは、例えば以下のようにすることができる。通常、システム構築時は、任意にスレーブを追加したり削除したりする。そのため、登録したスレーブしか使用できない最適化モードでは使い勝手が悪いので、登録テーブルを使用しない通常モードでシステムを構築する。システムが完成後の本稼動時は、性能を向上させるため登録テーブルを使用する最適化モードで動作させる。また、同じシステムを複数作成する場合は、すでにシステムの構成は完成しているため、最初から最適化モードで動作させる。もちろん、これに限ることはなく、各種タイミングで最適化モードを実行させることができる。   The operation start timing in the above optimization mode can be set as follows, for example. Normally, slaves are arbitrarily added or deleted during system construction. For this reason, the optimization mode in which only registered slaves can be used is not easy to use, so the system is constructed in the normal mode that does not use the registration table. When the system is in operation after completion, the system is operated in an optimization mode that uses a registration table to improve performance. In addition, when creating a plurality of the same systems, since the system configuration has already been completed, the system is operated in the optimization mode from the beginning. Of course, the present invention is not limited to this, and the optimization mode can be executed at various timings.

従来の通信システムの問題点を説明する図である。It is a figure explaining the problem of the conventional communication system. 本発明に係る通信システムを実現するネットワーク構成の一例を示す図である。It is a figure which shows an example of the network structure which implement | achieves the communication system which concerns on this invention. マスタの内部構成の一例を示す図である。It is a figure which shows an example of the internal structure of a master. スレーブの内部構成の一例を示す図である。It is a figure which shows an example of the internal structure of a slave. マスタのMPUに実装されるステータス情報を収集し登録テーブルを作成する機能(ステータス情報収集手段+登録テーブル作成手段)を示すフローチャートである。It is a flowchart which shows the function (status information collection means + registration table preparation means) which collects the status information mounted in master MPU, and produces a registration table. 登録テーブルのデータ構造の一例を示す図である。It is a figure which shows an example of the data structure of a registration table. 設定ツール装置を用いて登録テーブルを登録する例を説明するモニタ画面である。It is a monitor screen explaining the example which registers a registration table using a setting tool apparatus. 設定ツール装置を用いて登録テーブルを登録する例を説明するモニタ画面である。It is a monitor screen explaining the example which registers a registration table using a setting tool apparatus. 最適化モードで動作するマスタのMPUの機能を示すフローチャートである。It is a flowchart which shows the function of MPU of the master which operate | moves in optimization mode. スレーブのMPUの機能を示すフローチャートである。動作原理を説明する図である。It is a flowchart which shows the function of MPU of a slave. It is a figure explaining an operation principle. 本発明の作用効果を説明する図である。It is a figure explaining the effect of this invention.

符号の説明Explanation of symbols

10 マスタ
11 通信インタフェース
12 マスタ通信ASIC
13 MPU
14 RAM
15 EEPROM
20 スレーブ
21 通信インタフェース
22 スレーブ通信ASIC
23 MPU
24 RAM
25 EEPROM
30 フィールドバス
31 リピータ
10 Master 11 Communication Interface 12 Master Communication ASIC
13 MPU
14 RAM
15 EEPROM
20 Slave 21 Communication interface 22 Slave communication ASIC
23 MPU
24 RAM
25 EEPROM
30 Fieldbus 31 Repeater

Claims (4)

マスタと複数のスレーブとがネットワークにて接続され、前記マスタが、前記スレーブの送信タイミングの基準信号となるトリガフレームを送信し、そのトリガフレームを受信した前記スレーブが、そのトリガフレームを受信してから予め設定された待機時間を経過後、INフレームを送信する通信システムであって、
前記マスタは、
ネットワークを構成するスレーブのアドレスと、そのスレーブが送信するINフレームのIOデータのビットサイズと、を関連付けた登録テーブルと、
その登録テーブルに格納された前記スレーブのアドレスに基づいて前記INフレームを送信するスレーブの順番を決定し、1番目からn−1番目までの各スレーブの前記登録テーブルに格納されたビットサイズから、それぞれのスレーブで送信されるINフレーム全体のデータサイズを求めると共に、その求めた各INフレーム全体のデータサイズの総和から、それら1番目からn−1番目までのスレーブがINフレームを送信するのに要する時間の総和を求め、その求めた時間に基づいてn番目に送信するスレーブについての待機時間を決定する待機時間決定手段と、
その待機時間決定手段で決定した各スレーブについての待機時間を当該スレーブに通知する通知手段と、を有し、
前記スレーブは、前記通知手段により通知され待機時間を記憶する記憶手段を有し、その記憶手段に記憶した待機時間に基づいて決定される送信タイミングで、INフレームの送信を行うようにした
ことを特徴とする通信システム。
A master and a plurality of slaves are connected via a network, the master transmits a trigger frame that is a reference signal for the transmission timing of the slave, and the slave that has received the trigger frame receives the trigger frame. A communication system for transmitting an IN frame after elapse of a preset standby time from
The master
A registration table associating addresses of slaves constituting the network with bit sizes of IO data of IN frames transmitted by the slaves;
Based on the address of the slave stored in the registration table, the order of the slaves that transmit the IN frame is determined, and from the bit size stored in the registration table of each of the first to n-1th slaves, In addition to determining the data size of the entire IN frame transmitted by each slave, the first to (n-1) th slaves transmit the IN frame based on the total data size of the determined IN frames. Standby time determination means for determining a total time required and determining a standby time for the nth slave to be transmitted based on the determined time;
Notification means for notifying the slave of the standby time for each slave determined by the standby time determination means,
The slave has a storage unit that is notified by the notification unit and stores a standby time, and transmits the IN frame at a transmission timing determined based on the standby time stored in the storage unit. A featured communication system.
前記スレーブは、送信するINフレームのIOデータのビットサイズを記憶保持し、
前記マスタは、ネットワークに接続されている全てのスレーブから、それぞれが記憶保持しているビットサイズと、アドレスとを関連付けたステータス情報を収集するステータス情報収集手段と、
そのステータス情報収集手段で収集したネットワークに接続されている全てのスレーブのステータス情報から前記登録テーブルを作成し、登録テーブル記憶部に格納する登録テーブル作成手段と、
を備えたことを特徴とする請求項1に記載の通信システム。
The slave stores and holds the bit size of IO data of the IN frame to be transmitted,
The master, from all slaves connected to the network, status information collection means for collecting status information in which each bit size stored and held is associated with an address;
Creating the registration table from the status information of all slaves connected to the network collected by the status information collecting means, and storing the registration table in a registration table storage unit;
The communication system according to claim 1, further comprising:
前記マスタは、ネットワークに接続されている全てのスレーブについて、前記マスタからそれぞれのスレーブまでに存在するリピータの段数を取得するリピータ段数取得手段を備え、
前記前記待機時間決定手段は、前記待機時間を通知するスレーブとの間でリピータが存在している場合、前記リピータ段数取得手段で取得したリピータの段数とリピータを通過する際に生じるリピータ遅延時間に基づいて、リピータを通過することに伴い生じる総遅延時間を求め、前記1番目からn−1番目までのスレーブがINフレームを送信するのに要する時間の総和から前記総遅延時間を減算してn番目に送信するスレーブについての待機時間を求めるものであることを特徴とする請求項1または2に記載の通信システム。
The master comprises a repeater stage number acquisition means for acquiring the number of repeater stages existing from the master to each slave for all slaves connected to the network,
The waiting time determining means, when there is a repeater with the slave notifying the waiting time, determines the repeater delay time generated when passing the repeater and the repeater stage number obtained by the repeater stage number obtaining means. Based on the total delay time caused by passing through the repeater, and subtracting the total delay time from the total time required for the first to (n-1) th slaves to transmit the IN frame. The communication system according to claim 1 or 2, wherein a waiting time for a slave to be transmitted second is obtained.
マスタと複数のスレーブの存在するネットワーク上で、前記マスタが送信した前記スレーブの送信タイミングの基準信号となるトリガフレームを受信した前記スレーブが、そのトリガフレームを受信してから予め設定された待機時間を経過後、INフレームを送信する通信システムのためのマスタであって、
ネットワークを構成するスレーブのアドレスと、そのスレーブが送信するINフレームのIOデータのビットサイズと、を関連付けた登録テーブルと、
その登録テーブルに格納された前記スレーブのアドレスに基づいて前記INフレームを送信するスレーブの順番を決定し、1番目からn−1番目までの各スレーブの前記登録テーブルに格納されたビットサイズから、それぞれのスレーブで送信されるINフレーム全体のデータサイズを求めると共に、その求めた各INフレーム全体のデータサイズの総和から、それら1番目からn−1番目までのスレーブがINフレームを送信するのに要する時間の総和を求め、その求めた時間に基づいてn番目に送信するスレーブについての待機時間を決定する待機時間決定手段と、
その待機時間決定手段で決定した各スレーブについての待機時間を当該スレーブに通知する通知手段と、
を備えたマスタ。
On a network where a master and a plurality of slaves exist, a standby time set in advance after the slave that has received a trigger frame that is a reference signal for the transmission timing of the slave transmitted by the master receives the trigger frame And a master for a communication system that transmits an IN frame,
A registration table associating addresses of slaves constituting the network with bit sizes of IO data of IN frames transmitted by the slaves;
Based on the address of the slave stored in the registration table, the order of the slaves that transmit the IN frame is determined, and from the bit size stored in the registration table of each of the first to n-1th slaves, In addition to determining the data size of the entire IN frame transmitted by each slave, the first to (n-1) th slaves transmit the IN frame based on the total data size of the determined IN frames. Standby time determination means for determining a total time required and determining a standby time for the nth slave to be transmitted based on the determined time;
Notification means for notifying the slave of the standby time for each slave determined by the standby time determination means;
With a master.
JP2008181673A 2008-07-11 2008-07-11 Communication system and master Pending JP2010021866A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008181673A JP2010021866A (en) 2008-07-11 2008-07-11 Communication system and master

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008181673A JP2010021866A (en) 2008-07-11 2008-07-11 Communication system and master

Publications (1)

Publication Number Publication Date
JP2010021866A true JP2010021866A (en) 2010-01-28

Family

ID=41706317

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008181673A Pending JP2010021866A (en) 2008-07-11 2008-07-11 Communication system and master

Country Status (1)

Country Link
JP (1) JP2010021866A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012111229A1 (en) 2011-02-14 2012-08-23 株式会社 日立産機システム Communication system
JP2015114810A (en) * 2013-12-11 2015-06-22 セイコーエプソン株式会社 Detector, sensor, electronic apparatus, and mobile body
WO2018146900A1 (en) 2017-02-07 2018-08-16 オムロン株式会社 Control device and communication device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004280304A (en) * 2003-03-13 2004-10-07 Omron Corp Field bus system, communication method and master/ slave

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004280304A (en) * 2003-03-13 2004-10-07 Omron Corp Field bus system, communication method and master/ slave

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012111229A1 (en) 2011-02-14 2012-08-23 株式会社 日立産機システム Communication system
JP2015114810A (en) * 2013-12-11 2015-06-22 セイコーエプソン株式会社 Detector, sensor, electronic apparatus, and mobile body
WO2018146900A1 (en) 2017-02-07 2018-08-16 オムロン株式会社 Control device and communication device
US11068423B2 (en) 2017-02-07 2021-07-20 Omron Corporation Control device and communication device

Similar Documents

Publication Publication Date Title
JP5101523B2 (en) Selective activation of field devices in low-power wireless mesh networks
CA2558111C (en) Communication system and slave and repeater units therefor
JP5006815B2 (en) Multi-hop wireless network system
US20140121785A1 (en) System and method for parameterizing field devices of an automation or control system
CN101374094B (en) Data transmission method
JP4683346B2 (en) Master / slave communication system and master / slave communication method
US20090077455A1 (en) Transmission system
JP6157523B2 (en) Data collection device, relay device, and data collection system
JP2010021866A (en) Communication system and master
JP4205138B2 (en) How to obtain IO unit status information
CN109716247B (en) Arithmetic device and control system
JP3343036B2 (en) Programmable controller network system
JP6375635B2 (en) Network system and parameter determination device
JP2007219870A (en) Fire alarm equipment
JP2007027889A (en) Network configuration information teaching method in plc system
US9160661B2 (en) Method and apparatus for full duplex serial shifting mode and switch mode data transmission
JP5380478B2 (en) Communications system
JP2004280304A (en) Field bus system, communication method and master/ slave
JP4006605B2 (en) Reduction of repeater delay effect
JP2004221905A (en) Method for monitoring network system, monitoring system, repeater, and monitoring device
JP5801059B2 (en) Communication processing system
JP2012109831A (en) Communication system
JP4182450B2 (en) Reduction of repeater delay effect
JP3947090B2 (en) Data transmission method
JP6845127B2 (en) External monitoring system and monitoring terminal

Legal Events

Date Code Title Description
A621 Written request for application examination

Effective date: 20110510

Free format text: JAPANESE INTERMEDIATE CODE: A621

A977 Report on retrieval

Effective date: 20120614

Free format text: JAPANESE INTERMEDIATE CODE: A971007

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120627

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130704