JP4407838B2 - Communication master station startup control method - Google Patents
Communication master station startup control method Download PDFInfo
- Publication number
- JP4407838B2 JP4407838B2 JP2006335235A JP2006335235A JP4407838B2 JP 4407838 B2 JP4407838 B2 JP 4407838B2 JP 2006335235 A JP2006335235 A JP 2006335235A JP 2006335235 A JP2006335235 A JP 2006335235A JP 4407838 B2 JP4407838 B2 JP 4407838B2
- Authority
- JP
- Japan
- Prior art keywords
- master
- communication
- station
- link establishment
- frame
- 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
- Programmable Controllers (AREA)
- Small-Scale Networks (AREA)
Description
この発明は、通信マスタ局と通信スレーブ局とをバス型ネットワークで結んだPLCシステムに適用される通信マスタ局の起動時制御方法に関する。 The present invention relates to a communication master station startup control method applied to a PLC system in which a communication master station and a communication slave station are connected by a bus network.
通信機能を有する1のプログラマブルロジックコントローラ装置(PLC装置)と通信機能を有する1若しくは2以上のI/Oターミナル装置とをバス型ネットワークで結ぶと共に、通信機能を有するPLC装置を通信マスタ局としかつ通信機能を有するI/Oターミナル装置のそれぞれを通信スレーブ局とし、運用状態においては、通信マスタ局からのポーリングフレームの一斉同報送信に対して、該当する通信スレーブ局のそれぞれが互いにタイミングをずらせてレスポンスフレームを通信マスタ局へと返送する一連の動作を繰り返すことにより、通信マスタ局と各通信スレーブ局との間で様々なデータのやり取りを行うようにしたPLCシステムは、従来より知られている(例えば、特許文献1参照)。なお、ここで言う「I/Oターミナル装置」とは、入力ターミナル装置、出力ターミナル装置、及び入出力ターミナル装置を総称するものである。 A programmable logic controller device (PLC device) having a communication function and one or more I / O terminal devices having a communication function are connected by a bus network, and the PLC device having a communication function is used as a communication master station; Each I / O terminal device having a communication function is a communication slave station, and in the operating state, each of the corresponding communication slave stations shifts the timing relative to the simultaneous broadcast transmission of the polling frame from the communication master station. A PLC system that exchanges various data between a communication master station and each communication slave station by repeating a series of operations for returning a response frame to the communication master station has been known. (For example, refer to Patent Document 1). Here, the “I / O terminal device” is a general term for an input terminal device, an output terminal device, and an input / output terminal device.
通信マスタ局となるべき「通信機能を有するPLC装置」としては、様々な実現形態が存在する。それらの実現形態としては、例えば、(1)ユニット単位で様々な機能の増設が可能なビルディングブロック型PLCにおいて、通信マスタユニットを装着したもの、(2)ユニット単位で様々な機能の増設が可能なビルディングブロック型PLCにおいて、CPUユニット自体に通信機能を内蔵したもの、(3)演算処理部や入出力部等のPLCとして必要な基本機能を1つのハウジングに全て収容したオールインワン型PLCにおいて、通信機能をさらに内蔵したもの、(4)演算処理部や入出力部等のPLCとして必要な基本機能を1つのハウジングに全て収容したオールインワン型PLCにおいて、通信マスタユニットを外付けしたもの、等々が想定される。なお、ビルディングブロック型PLCには、ベースボードに各ユニットを取り付けるタイプと、各ユニットがDINレールに取り付けられ、各ユニット同士を各ユニットに設けられた貫通コネクタによりつなぐタイプとがある。 There are various realization forms as a “PLC device having a communication function” to be a communication master station. For example, (1) a building block PLC that can be expanded with various functions in units, with a communication master unit installed, and (2) various functions can be expanded in units. In a building block type PLC with a built-in communication function in the CPU unit itself, (3) In an all-in-one type PLC in which all basic functions necessary for the PLC such as an arithmetic processing unit and an input / output unit are accommodated in one housing. Assuming that the functions are further built in, (4) All-in-one type PLC with all the basic functions necessary for PLC such as arithmetic processing unit and input / output unit accommodated in one housing, with external communication master unit Is done. The building block type PLC includes a type in which each unit is attached to a base board and a type in which each unit is attached to a DIN rail and each unit is connected to each other by a through connector provided in each unit.
通信スレーブ局となるべき「通信機能を有するI/Oターミナル装置」についても、同様に、様々な実現形態が存在する。それらの実現形態としては、例えば、(1)端子台や入出力回路等のI/Oターミナル装置として必要な基本機能を1つのハウジングに全て収容したオールインワン型I/Oターミナル装置において、通信機能をさらに内蔵したもの、(2)端子台や入出力回路等のI/Oターミナル装置として必要な基本機能を1つのハウジングに全て収容したオールインワン型I/Oターミナル装置において、通信スレーブユニットをケーブルを介して外付けしたもの、(3)端子台や入出力回路等のI/Oターミナル装置として必要な基本機能をユニット単位で増設可能なビルディングブロック型のI/Oターミナル装置において、通信スレーブユニットを装着したもの、等々が想定されるほか、(4)ネットワーク上に存在するリピータ等もノードアドレスを有する限り、I/Oターミナルとして含めることもできる。
この種のPLCシステムにおける通信マスタ局においては、起動後、リンク確立処理を経て、運用状態へと移行すると言った起動時制御方法が採用されている。リンク確立処理においては、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを一括して又は幾つかのスレーブ局グループに分けて送信し、通信スレーブ局からのレスポンスフレームの受信有無に基づいて接続フレームの確認が行われる。通信スレーブ局のそれぞれは、ポーリングフレームに付された宛先アドレスと自己の設定アドレスとの照合一致に基づいて、自己に対するレスポンスフレーム送信要求を認識し、必要なレスポンスフレームをそのスレーブ局に固有のタイミングで返信する。 In the communication master station in this type of PLC system, a startup control method is adopted in which, after startup, a link establishment process is performed to shift to an operating state. In the link establishment process, polling frames are sent to all connectable communication slave stations in a batch or divided into several slave station groups, and based on whether or not a response frame is received from the communication slave station. The connection frame is confirmed. Each communication slave station recognizes the response frame transmission request for itself based on the matching match between the destination address attached to the polling frame and its own set address, and sends the necessary response frame to the timing specific to that slave station. Reply with.
通信スレーブ局のアドレスは、DIPスイッチ等により現場で手動設定されるのが一般的である。また、自動車生産ラインや液晶製造ラインに代表される大規模製造ラインになると、通信スレーブ局は膨大な台数となり、60台近くの通信スレーブ局が1台の通信マスタ局に対してネットワークを介して接続される場合も想定される。そのため、アドレスの誤設定に基づく通信スレーブ局の重複は比較的に起こり易く、従来より様々なスレーブ重複対策が提案されている。 In general, the address of the communication slave station is manually set on site by a DIP switch or the like. In addition, in a large-scale production line represented by an automobile production line or a liquid crystal production line, the number of communication slave stations becomes enormous, and nearly 60 communication slave stations are connected to one communication master station via a network. It is also assumed that it is connected. For this reason, duplication of communication slave stations based on erroneous address settings is relatively easy, and various countermeasures for slave duplication have been proposed.
これに対して、図11(a)に示されるように、通信スレーブ局(S1,S2,・・・Sn)はネットワーク上に多数存在するのに対して、通信マスタ局(M1)は基本的にネットワーク上に1台しか存在せず(1対N)、しかもマスタ局アドレスは現場で手動設定されると言った性格のものではないので、通信マスタ局の重複対策が論ぜられることはなかった。 On the other hand, as shown in FIG. 11A, there are many communication slave stations (S1, S2,... Sn) on the network, whereas the communication master station (M1) is basically the same. Since there is only one unit on the network (1: N), and the master station address is not of the nature that is manually set in the field, there is no discussion about countermeasures for duplication of communication master stations. It was.
ところが、昨今、自動車生産ラインや液晶製造ラインに代表される大規模製造ラインにると、ネットワークの敷設距離は数十メートルにも及ぶことがあり、しかもネットワークを構成するネットワークケーブルは工場内を複雑に錯綜して引き回され、通信マスタ局とネットワークケーブルとの対応関係が分かり難くなったことから、工場内において物理的に隣接する2つのネットワーク間において、一方のネットワークの通信マスタ局を他方のネットワークのネットワークケーブルに誤って接続してしまったり、あるいは、工場内の見通しの悪さを原因として、既に通信マスタ局が接続済みであるにも拘わらず、誤ってもう一台の通信マスタ局を同一のネットワークのネットワークケーブルに接続してしまう等の誤接続により、図11(b)に示されるように、同一のネットワークに2台以上の通信マスタ局(M1,M2)が同時に存在する状態(以下、「マスタ重複」と言う)が発生する虞が論じられるに至っている。 However, in recent years, in a large-scale production line represented by an automobile production line or a liquid crystal production line, the laying distance of the network can be several tens of meters, and the network cables constituting the network are complicated in the factory. Since the correspondence between the communication master station and the network cable is difficult to understand, the communication master station of one network is changed between the two networks that are physically adjacent in the factory. Even if the communication master station is already connected due to incorrect connection to the network cable of the network or due to poor visibility in the factory, the same communication master station is mistakenly connected. 11 (b) due to incorrect connection such as connecting to the network cable of the other network. As shown, has led to two or more communication master stations on the same network (M1, M2) state are simultaneously present (hereinafter, referred to as "master plurality") is a concern that occurs discussed.
加えて、昨今、ネットワーク上に1台しか通信マスタ局の存在を許容しない従前のPLCシステムに代えて、ネットワーク上に2台以上の通信マスタ局の存在を許容するPLCシステム製品も市場に出現したため、ユーザの側ではネットワーク上に2台以上の通信マスタ局の存在を許容するPLCシステム製品と誤認して、同一のネットワークに対応するネットワークケーブルに2以上の通信マスタ局を意識して接続する虞も論ぜられるに至っている。 In addition, recently, instead of the conventional PLC system that allows the presence of only one communication master station on the network, a PLC system product that allows the presence of two or more communication master stations on the network has appeared in the market. The user may misunderstand that the PLC system product allows the presence of two or more communication master stations on the network, and may connect two or more communication master stations to a network cable corresponding to the same network. Has also been discussed.
このようなマスタ重複が発生すると、ネットワーク上において双方の通信マスタ局からのフレームが混在乃至衝突して、いずれかの通信スレーブ局が動作不能に陥ったり、その時々の状況により定まる通信マスタ局が発行したポーリングフレームに応答して予期せぬ動作をする虞も危惧される。 When such master duplication occurs, frames from both communication master stations are mixed or collided on the network, and one of the communication slave stations becomes inoperable. There is also a risk of unexpected behavior in response to the issued polling frame.
この発明は、上述の問題点に着目してなされたものであり、その目的とするところは、ネットワーク上に1台しか通信マスタ局を許容しないPLCシステムに対して2台以上の通信マスタ局が接続されると言った事態が生じた場合にも、当該PLCシステムの誤動作を確実に防止することができる通信マスタ局の起動時制御方法を提供することにある。 The present invention has been made paying attention to the above-mentioned problems, and the object of the present invention is to provide two or more communication master stations for a PLC system that allows only one communication master station on the network. An object of the present invention is to provide a start-up control method for a communication master station that can reliably prevent malfunction of the PLC system even when a situation of being connected occurs.
この発明のさらに他の目的並びに作用効果については、明細書の以下の記述を参照することにより、当業者であれば容易に理解されるであろう。 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.
この発明の通信マスタ局の起動時制御方法は、通信機能を有する1のPLC装置と通信機能を有する1若しくは2以上のI/Oターミナル装置とをバス型ネットワークで結ぶと共に、通信機能を有するPLC装置を通信マスタ局としかつ通信機能を有するI/Oターミナル装置のそれぞれを通信スレーブ局とし、運用状態においては、通信マスタ局からのポーリングフレームの送信に対して、該当する通信スレーブ局がレスポンスフレームを通信マスタ局へと返送することにより、通信マスタ局と各通信スレーブ局との間で様々なデータのやり取りを行うようにしたPLCシステムに適用される。 The start-up control method for a communication master station according to the present invention connects a PLC device having a communication function and one or more I / O terminal devices having a communication function through a bus network, and also has a PLC having a communication function. Each device is a communication master station and each I / O terminal device having a communication function is a communication slave station. In the operating state, the corresponding communication slave station responds to the transmission of a polling frame from the communication master station. Is returned to the communication master station, so that the present invention is applied to a PLC system in which various data are exchanged between the communication master station and each communication slave station.
ここでポーリングフレームの送信は、通常のバス通信回線や、マルチドロップ回線においてフレームを送信する場合、すべてのスレーブ局が受信処理しないもので、特定のスレーブ局だけが受信するようなフレームを送信する場合などがある。また、「通信スレーブ局がレスポンスフレームを通信マスタ局へ返送する」の意味は、一般的なポーリングセレクション方式や、トークパッシング方式によりスレーブ局がフレームを返信する場合を含む。例えば、通信マスタ局が通信スレーブ局1台を特定してポーリングフレームを送信し、それを受信した1台の通信スレーブ局がデータを返信し、通信マスタ局がそのデータを受信するようなものを含む。通信マスタ局と各通信スレーブ局との間で1対1通信を順番に繰り返すものも含む。 Here, when sending a frame on a normal bus communication line or a multi-drop line, the polling frame is transmitted by a frame that is not received by all slave stations and is received only by a specific slave station. There are cases. The meaning of “the communication slave station returns a response frame to the communication master station” includes a case where the slave station returns a frame by a general polling selection method or a talk passing method. For example, a communication master station identifies one communication slave station and transmits a polling frame, and one communication slave station that receives the frame returns data, and the communication master station receives the data. Including. It also includes one that repeats one-to-one communication between the communication master station and each communication slave station in order.
また、各通信スレーブがトークンを順番に渡し、トークンを獲得したスレーブ局が順番にレスポンスフレームをマスタ局に対して送信するものも含む。以下に説明する各発明においても、ポーリングフレームの送信および「通信スレーブ局がレスポンスフレームを通信マスタ局へと返送する」の意味は、同様である。 In addition, the communication slaves pass tokens in order, and the slave station that acquired the tokens sequentially transmits response frames to the master station. In each invention described below, the transmission of a polling frame and the meaning of “the communication slave station returns a response frame to the communication master station” are the same.
より具体的には、本発明方法は、起動後、リンク確立処理を経て、運用状態へと移行する過程で、リンク確立処理に先立って実行されて、ネットワーク上に通信マスタ局が重複して存在するか否かを判定するマスタ重複判定処理を実行し、リンク確立処理に先立って実行するマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行するように構成され、更に、リンク確立処理に先立って実行されるマスタ重複判定処理が、リンク確立処理に先立って、通信スレーブ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定することを特徴とするものである。 More specifically, the method of the present invention is executed prior to the link establishment process in the process of going through the link establishment process after activation and before entering the link establishment process, and there are duplicate communication master stations on the network. The master duplication determination process for determining whether or not to perform is performed, and when it is determined by the master duplication determination process that is executed prior to the link establishment process that the communication master station is duplicated, the process proceeds to the link establishment process. The master duplication determination process executed prior to the link establishment process is a frame transmitted only by the communication slave station prior to the link establishment process. Based on the reception, it is determined that the master is duplicated.
本発明の好ましい他の実施の形態においては、リンク確立処理に先立って実行されるマスタ重複判定処理が、リンク確立処理に先立って、通信スレーブ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定するものであってもよい。 In another preferred embodiment of the present invention, the master duplication determination process executed prior to the link establishment process is based on the reception of a frame transmitted only by the communication slave station prior to the link establishment process. You may determine with duplication.
このような構成によれば、既に稼働中のPLCシステムのネットワークを構成するネットワークケーブルに誤って通信マスタ局を接続してしまってような場合には、その追加接続された通信マスタ局の電源を投入して起動すると、その後、リンク確立処理に先立って、通信スレーブ局が送信する通信フレームが受信されるため、これに基づいてマスタ重複を判定することができる。 According to such a configuration, when a communication master station is mistakenly connected to a network cable that constitutes a network of an already operating PLC system, the power supply of the additionally connected communication master station is turned on. After being input and started, a communication frame transmitted by the communication slave station is received prior to the link establishment process. Based on this, it is possible to determine master duplication.
すなわち、既に稼働中のPLCシステムのネットワークを構成するネットワークケーブルには、所定の送信周期をもって、通信マスタ局からのポーリングフレームが繰り返し流され、これに応答する通信スレーブ局からのレスポンスフレームも流れているから、リンク確立処理に先立って、通信スレーブ局が送信する通信フレーム(レスポンスフレーム)が受信されると言うことは、既に他の通信マスタ局が存在すること(マスタ重複)を間接的に意味することとなり、これに基づいてマスタ重複と判定できるのである。 In other words, a polling frame from the communication master station is repeatedly sent to the network cable constituting the network of the already operating PLC system with a predetermined transmission cycle, and a response frame from the communication slave station responding thereto is also sent. Therefore, receiving a communication frame (response frame) transmitted by a communication slave station prior to link establishment processing indirectly means that another communication master station already exists (master duplication). Based on this, it can be determined that the master is duplicated.
しかも、この判定方法によれば、ポーリングフレームの周期内には、最大、通信スレーブ局の接続台数分のレスポンスフレームが存在する上、それらの1つを受信しさえすればよいのであるから、間接的な判定であるとはいえ、判定アルゴリズムの点からは、信頼性の高い判定結果が得られる利点もある。 Moreover, according to this determination method, there are at most response frames for the number of connected communication slave stations within the period of the polling frame, and it is only necessary to receive one of them. Although it is a typical determination, there is an advantage that a highly reliable determination result can be obtained from the point of determination algorithm.
なお、この判定方法は、通信フレームのフォーマットにおいて、通信フレームの種別を示すフレームコード部の内容を示すコードが、通信スレーブ局のみが送信する既知の複数種のコードのいずれかに該当することを判別することにより実現することができる。 In this determination method, in the communication frame format, the code indicating the content of the frame code part indicating the type of the communication frame corresponds to one of a plurality of known types of codes transmitted only by the communication slave station. This can be realized by determining.
本発明の好ましい他の実施の形態においては、リンク確立処理に先立って実行されるマスタ重複判定処理に加えて、リンク確立処理と並行して実行されるマスタ重複判定処理を有し、リンク確立処理と並行して実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行するように構成され、更に、リンク確立処理と並行して実行されるマスタ重複判定処理が、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、いずれの通信スレーブ局からもレスポンスフレームの受信確認がとれないことに基づいてマスタ重複と判定するものであってもよい。 In another preferred embodiment of the present invention, in addition to the master duplication determination process executed prior to the link establishment process, the master duplication judgment process is executed in parallel with the link establishment process, and the link establishment process When it is determined that the communication master station is duplicated by the master duplication judgment process executed in parallel, the transition to the predetermined master duplication avoidance process is made without going to the operation state, In addition, a master duplication determination process executed in parallel with the link establishment process transmits a polling frame to each of all connectable communication slave stations and stores whether or not a response frame is received from the communication slave station In the connection frame confirmation process for establishment, no response frame reception confirmation can be obtained from any communication slave station. Or it may be determined that the master plurality based on.
このような構成によれば、リンク確立処理に先立って実行されるマスタ重複判定処理に加えて、リンク確立処理と並行してマスタ重複判定処理を実行するため、リンク確立処理と並行して実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されたときにも、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行する。このため、ネットワーク上に1台しか通信マスタ局を許容しないPLCシステムに対して2台以上の通信マスタ局が接続されると言った事態が生じた場合にも、当該PLCシステムの誤動作を確実に防止することができる。 According to such a configuration, in addition to the master duplication determination process executed prior to the link establishment process, the master duplication determination process is executed in parallel with the link establishment process. Even when it is determined by the master duplication determination process that there are duplicate communication master stations, the process proceeds to the predetermined master duplication avoidance process without shifting to the operation state. For this reason, even when a situation occurs in which two or more communication master stations are connected to a PLC system that allows only one communication master station on the network, the malfunction of the PLC system is ensured. Can be prevented.
また、PLCシステムの新設時やメンテナンス後の運転再開時等において、1のネットワークを構成するネットワークケーブルに誤って、あるいは、2台以上の通信マスタ局を許容するシステムと誤認して、当初から2台以上の通信マスタ局が接続されてしまったような場合にあっても、リンク確立処理と並行して、マスタ重複を確実に判定することができる。 In addition, when a PLC system is newly installed or when operation is resumed after maintenance, the network cable constituting one network is mistakenly identified as a system that allows two or more communication master stations, and 2 from the beginning. Even when more than one communication master station is connected, it is possible to reliably determine master duplication in parallel with the link establishment processing.
すなわち、このようにシステム立ち上げ時から2台以上の通信マスタ局がネットワークに接続されていると、それらの通信マスタ局は電源投入或いはリセットスイッチの作動等により同時に起動される可能性が高く、その場合、起動直後のリンク確立処理においては、各通信マスタ局からほぼ同一のタイミングでポーリングフレームが送信されるため、それらのポーリングフレームはネットワーク上で衝突して無効化されてしまい、各通信スレーブ局からレスポンスフレームが送信されない可能性が高い。したがって、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信したにも拘わらず、いずれの通信スレーブ局からもレスポンスフレームの受信確認がとれないと言うことは、2台以上の通信マスタ局が存在すること(マスタ重複)をかなりの確立で推定することができ、これに基づいてマスタ重複と判定できるのである。 That is, when two or more communication master stations are connected to the network from the time of starting the system in this way, there is a high possibility that these communication master stations will be activated simultaneously by turning on the power or operating the reset switch, In that case, in the link establishment process immediately after startup, polling frames are transmitted from each communication master station at almost the same timing, so these polling frames collide on the network and are invalidated, and each communication slave There is a high possibility that the response frame is not transmitted from the station. Therefore, even though a polling frame is transmitted to each of all connectable communication slave stations, no response slave reception confirmation can be obtained from any communication slave station. The existence of a station (master duplication) can be estimated with considerable probability, and based on this, it can be determined that there is a master duplication.
しかも、この判定方法にあっては、マスタ重複判定のために別途専用のポーリングフレーム送信処理を設けるのではなく、リンク確立処理において実行されるポーリングフレーム送信処理を流用しているため、電源投入又はリセットから運用状態へ移行する所要期間を徒に増大させることがないと言う利点もある。 In addition, in this determination method, a dedicated polling frame transmission process is not provided for the master duplication determination, but the polling frame transmission process executed in the link establishment process is diverted. There is also an advantage that the time required for shifting from the reset state to the operation state is not increased.
本発明の好ましい他の実施の形態においては、リンク確立処理に先立って実行されるマスタ重複判定処理に加えて、リンク確立処理と並行して実行されるマスタ重複判定処理を有し、リンク確立処理と並行して実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行するように構成され、更に、リンク確立処理と並行して実行されるマスタ重複判定処理が、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定するものであってもよい。 In another preferred embodiment of the present invention, in addition to the master duplication determination process executed prior to the link establishment process, the master duplication judgment process is executed in parallel with the link establishment process, and the link establishment process When it is determined that the communication master station is duplicated by the master duplication judgment process executed in parallel, the transition to the predetermined master duplication avoidance process is made without going to the operation state, In addition, a master duplication determination process executed in parallel with the link establishment process transmits a polling frame to each of all connectable communication slave stations and stores whether or not a response frame is received from the communication slave station In the connection frame confirmation process for establishment, the master duplication is based on the reception of the frame transmitted only by the communication master station. Or it may be determined.
このような構成によっても、PLCシステムの新設時やメンテナンス後の運転再開時等において、1のネットワークを構成するネットワークケーブルに誤って、あるいは、2台以上の通信マスタ局を許容するシステムと誤認して、当初から2台以上の通信マスタ局が接続されてしまったような場合にあっても、リンク確立処理と並行して、マスタ重複を確実に判定することができる。 Even with such a configuration, when a PLC system is newly installed or when operation is resumed after maintenance, the network cable constituting one network is mistakenly identified as a system that permits two or more communication master stations. Even when two or more communication master stations are connected from the beginning, it is possible to reliably determine the master duplication in parallel with the link establishment process.
すなわち、このようにシステム立ち上げ時から2台以上の通信マスタ局がネットワークに接続されていると、それらの通信マスタ局は電源投入或いはリセットスイッチの作動等により同時に起動される可能性が高いのではあるが、それでも個々の通信マスタユニットは非同期で動作するのであるから、各通信マスタ局からのポーリングフレーム送信タイミングが僅かにずれて、個々の通信マスタ局が他の通信マスタ局が送信したポーリングフレームを受信することもあり得る。したがって、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したと言うことも、2台以上の通信マスタ局が存在すること(マスタ重複)をかなりの確立で推定することができ、これに基づいてマスタ重複と判定できるのである。 In other words, when two or more communication master stations are connected to the network from the time of starting the system in this way, there is a high possibility that these communication master stations will be activated simultaneously by turning on the power or operating the reset switch. However, since each communication master unit still operates asynchronously, the polling frame transmission timing from each communication master station is slightly shifted, and the polling transmitted from each communication master station by another communication master station It is also possible to receive a frame. Therefore, a polling frame is transmitted to each connectable communication slave station, and only the communication master station transmits it in the connection frame confirmation process for establishing a link that stores the presence / absence of reception of a response frame from the communication slave station. The fact that two or more communication master stations exist (master duplication) can be estimated with considerable establishment, and based on this, it can be determined as master duplication.
しかも、この判定方法にあっても、マスタ重複判定のために別途専用のポーリングフレーム送信処理を設けるのではなく、リンク確立処理において実行されるポーリングフレーム送信処理を流用しているため、電源投入又はリセットから運用状態へ移行する所要期間を徒に増大させることがないと言う利点もある。 Moreover, even in this determination method, a separate dedicated polling frame transmission process is not provided for master duplication determination, but the polling frame transmission process executed in the link establishment process is diverted. There is also an advantage that the time required for shifting from the reset state to the operation state is not increased.
本発明の好ましい他の実施の形態においては、リンク確立処理に先立って実行されるマスタ重複判定処理に加えて、リンク確立処理と並行して実行されるマスタ重複判定処理を有し、リンク確立処理と並行して実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行するように構成され、更に、リンク確立処理と並行して実行されるマスタ重複判定処理が、接続可能な全通信スレーブ局を少なくとも2つ以上のグループに分けて、各グループ毎にポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定するものであり、かつポーリングフレームの送信間隔を各グループ毎にランダムに変更する、ものであってもよい。 In another preferred embodiment of the present invention, in addition to the master duplication determination process executed prior to the link establishment process, the master duplication judgment process is executed in parallel with the link establishment process, and the link establishment process When it is determined that the communication master station is duplicated by the master duplication judgment process executed in parallel, the transition to the predetermined master duplication avoidance process is made without going to the operation state, Furthermore, the master duplication determination process executed in parallel with the link establishment process divides all connectable communication slave stations into at least two groups and transmits a polling frame for each group. The frame transmitted only by the communication master station in the connection frame confirmation process for establishing a link that stores whether or not a response frame is received. Based on the reception of the is intended to determine the master plurality, and randomly changed the transmission interval of the polling frame in each group may be one.
このような構成によっても、PLCシステムの新設時やメンテナンス後の運転再開時等において、1のネットワークを構成するネットワークケーブルに誤って、あるいは、2台以上の通信マスタ局を許容するシステムと誤認して、当初から2台以上の通信マスタ局が接続されてしまったような場合にあっても、リンク確立処理と並行して、マスタ重複を確実に判定することができる。 Even with such a configuration, when a PLC system is newly installed or when operation is resumed after maintenance, the network cable constituting one network is mistakenly identified as a system that permits two or more communication master stations. Even when two or more communication master stations are connected from the beginning, it is possible to reliably determine the master duplication in parallel with the link establishment process.
すなわち、先に述べたように、システム立ち上げ時から2台以上の通信マスタ局がネットワークに接続されていると、それらの通信マスタ局は電源投入或いはリセットスイッチの作動等により同時に起動される可能性が高いのではあるが、それでも個々の通信マスタユニットは非同期で動作するのであるから、各通信マスタ局からのポーリングフレーム送信タイミングが僅かにずれて、個々の通信マスタ局が他の通信マスタ局が送信したポーリングフレームを受信することもあり得る。このとき、ポーリングフレームの送信間隔を各グループ毎にランダムに変更してやると、2以上の通信マスタ局のそれぞれから送信されるポーリングフレームの衝突確立が低減されて、個々の通信マスタ局が他の通信マスタ局のポーリングフレームを受信する確立が高まる。このため、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定する処理がより一層有効に作用して、マスタ重複をより確実に判定できることになる。 In other words, as described above, when two or more communication master stations are connected to the network since the system was started, these communication master stations can be activated simultaneously by turning on the power or operating the reset switch. Although each communication master unit still operates asynchronously, the timing of polling frame transmission from each communication master station is slightly shifted, so that each communication master station is connected to another communication master station. It is also possible to receive a polling frame transmitted by. At this time, if the polling frame transmission interval is randomly changed for each group, the collision establishment of polling frames transmitted from each of the two or more communication master stations is reduced, and each communication master station can communicate with other communication master stations. The probability of receiving a master station polling frame is increased. For this reason, the process of determining the master duplication based on the reception of the frame transmitted only by the communication master station acts more effectively, and the master duplication can be more reliably determined.
本発明の好ましい他の実施の形態においては、所定のマスタ重複回避処理が、ネットワークから離脱する処理であってもよい。ここで、「ネットワークからの離脱処理」とは、スイッチを介して回線の接続を物理的に絶つ場合と、物理的には回線と接続されているものの、ポーリングフレーム等のフレームについては一切送信しない休止状態の場合との双方を含んでいる。 In another preferred embodiment of the present invention, the predetermined master duplication avoidance process may be a process of leaving the network. Here, “leave processing from the network” means that the connection of the line is physically disconnected through the switch, and that the frame is physically connected to the line, but no frame such as a polling frame is transmitted. It includes both cases of hibernation.
このような構成によれば、電源投入後、リンク確立処理前に、マスタ重複と判定された場合には、稼働中のPLCシステムに一切外乱を与えることがないから、稼働中のPLCはそのまま運転を継続することができる一方、リンク確立処理中に、マスタ重複と判定された場合には、全ての通信マスタ局がネットワークから離脱されるため、マスタ重複のまま運用状態へと移行することによる危険を回避することができる。 According to such a configuration, when the master duplication is determined after the power is turned on and before the link establishment process, no disturbance is caused to the operating PLC system. On the other hand, if it is determined that the master is duplicated during the link establishment process, all communication master stations will be disconnected from the network. Can be avoided.
先に述べように、本発明の目的とするところは、ネットワーク上に1台しか通信マスタ局を許容しないPLCシステムに対して2台以上の通信マスタ局が接続されると言った事態が生じた場合にも、当該PLCシステムの誤動作を確実に防止することであることは、先に述べたとおりである。斯かる目的を考慮すれば、「所定のマスタ重複回避処理」については、「ネットワークからの離脱処理」以外にも様々な形態を採用することができる。 As described above, the object of the present invention is that a situation has occurred in which two or more communication master stations are connected to a PLC system that allows only one communication master station on the network. Even in this case, as described above, it is to surely prevent the malfunction of the PLC system. In consideration of such an object, various forms other than the “departure processing from the network” can be adopted as the “predetermined master duplication avoidance process”.
「所定のマスタ重複回避処理」の他の形態としては、例えば、(1)リンク確立処理前に、マスタ重複と判定された場合には、その後、リンク確立処理へと移行することなく、あとから追加接続された通信マスタ局は通信スレーブ局になりすまして、本来の通信マスタ局へとレスポンスフレームを送信してマスタ重複を本来の通信マスタ局に通知すること、(2)リンク確立処理中に、マスタ重複と判定された場合には、その後、運用状態へと移行することなく、通信マスタ局はランダムなタイミングで全ての通信スレーブ局に対して所定のエラーコードを送信して、最初に届いたエラーコードにより、全ての通信スレーブ局の動作を休止させること、等を挙げることができる。 As another form of the “predetermined master duplication avoiding process”, for example, (1) if it is determined that the master is duplicated before the link establishment process, the process does not proceed to the link establishment process, but later The additionally connected communication master station impersonates a communication slave station, transmits a response frame to the original communication master station and notifies the original communication master station of the master duplication, and (2) during link establishment processing, If it is determined that the master is duplicated, the communication master station sends a predetermined error code to all the communication slave stations at random timing and then arrives first without shifting to the operation state. For example, the operation of all communication slave stations can be suspended by using an error code.
別の一面から見た本発明は、PLCシステムとして捉えることもできる。すなわち、このPLCは、通信機能を有する1のPLC装置と通信機能を有する1若しくは2以上のI/Oターミナル装置とをバス型ネットワークで結ぶと共に、通信機能を有するPLC装置を通信マスタ局としかつ通信機能を有するI/Oターミナル装置のそれぞれを通信スレーブ局とし、運用状態においては、通信マスタ局からのポーリングフレームの送信に対して、該当する通信スレーブ局がレスポンスフレームを通信マスタ局へと返送する一連の動作を繰り返すことにより、通信マスタ局と各通信スレーブ局との間で様々なデータのやり取りを行うようになされている。 The present invention viewed from another aspect can also be understood as a PLC system. That is, this PLC connects one PLC device having a communication function and one or more I / O terminal devices having a communication function through a bus network, and the PLC device having the communication function is used as a communication master station. Each I / O terminal device that has a communication function is a communication slave station, and in operation, the corresponding communication slave station returns a response frame to the communication master station in response to transmission of a polling frame from the communication master station. By repeating this series of operations, various data are exchanged between the communication master station and each communication slave station.
そして、前記通信マスタ局には、起動後、リンク確立処理を経て、運用状態へと移行する過程で、リンク確立処理に先立って実行されて、ネットワーク上に通信マスタ局が重複して存在するか否かを判定するマスタ重複判定手段と、リンク確立処理に先立って実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行する第1のマスタ重複回避手段と、、が具備されている。 Then, in the communication master station, whether or not there are duplicate communication master stations on the network, which is executed prior to the link establishment process in the process of transitioning to the operation state after starting the link establishment process. When it is determined that there is a duplicate communication master station by the master duplication judgment means for judging whether or not and the master duplication judgment processing executed prior to the link establishment processing, it is determined without proceeding to the link establishment processing. First master duplication avoiding means for shifting to the master duplication avoiding process.
さらに、別の一面から見た本発明は、PLCシステムのマスタ局として捉えることもできる。すなわち、このマスタ局は、通信機能を有する1のPLC装置と通信機能を有する1若しくは2以上のI/Oターミナル装置とをバス型ネットワークで結ぶと共に、通信機能を有するPLC装置を通信マスタ局としかつ通信機能を有するI/Oターミナル装置のそれぞれを通信スレーブ局とし、運用状態においては、通信マスタ局からのポーリングフレームの送信に対して、該当する通信スレーブ局がレスポンスフレームを通信マスタ局へと返送することにより、通信マスタ局と各通信スレーブ局との間で様々なデータのやり取りを行うようにしたPLCシステムに適用される。 Furthermore, the present invention viewed from another aspect can be regarded as a master station of a PLC system. That is, this master station connects one PLC device having a communication function and one or more I / O terminal devices having a communication function by a bus network, and the PLC device having the communication function is a communication master station. In addition, each I / O terminal device having a communication function is a communication slave station, and in operation, the corresponding communication slave station sends a response frame to the communication master station in response to transmission of a polling frame from the communication master station. By returning it, the present invention is applied to a PLC system in which various data are exchanged between the communication master station and each communication slave station.
そして、このマスタ局には、起動後、リンク確立処理を経て、運用状態へと移行する過程で、リンク確立処理に先立って実行されて、ネットワーク上に通信マスタ局が重複して存在するか否かを判定する第1のマスタ重複判定手段と、リンク確立処理に先立って実行される第1のマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行する第1のマスタ重複回避手段とが具備されており、更に、リンク確立処理に先立って実行される第1のマスタ重複判定手段が、リンク確立処理に先立って、通信スレーブ局が送信するフレームを受信したことに基づいてマスタ重複と判定するものである。 Then, in this master station, it is executed prior to the link establishment process in the process of going through the link establishment process to the operational state after startup, and whether or not there are duplicate communication master stations on the network. When it is determined that the communication master station is duplicated by the first master duplication judgment means for judging whether the first master duplication judgment process is executed prior to the link establishment process, the process proceeds to the link establishment process. First master duplication avoiding means for shifting to a predetermined master duplication avoiding process without further processing, and further, a first master duplication determining means executed prior to the link establishing process is provided. Prior to processing, master duplication is determined based on reception of a frame transmitted by a communication slave station.
また、本発明は、通信機能を有する1のPLC装置と通信機能を有する1若しくは2以上のI/Oターミナル装置とをバス型ネットワークで結ぶと共に、通信機能を有するPLC装置を通信マスタ局としかつ通信機能を有するI/Oターミナル装置のそれぞれを通信スレーブ局とし、運用状態においては、通信マスタ局からのフレーム送信に対して該当する通信スレーブ局がレスポンスフレームを通信マスタ局へと返送することにより、通信マスタ局と各通信スレーブ局との間で様々なデータのやり取りを行うようにしたPLCシステムに適用される通信マスタ局の起動時制御方法であって、起動後、リンク確立処理を経て、運用状態へと移行する過程で、リンク確立処理に先立って実行され、ネットワーク上に通信マスタ局が重複して存在するか否かを判定するマスタ重複判定処理を実行し、リンク確立処理に先立って実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行する、ことを特徴とするものである。 In addition, the present invention connects one PLC device having a communication function and one or more I / O terminal devices having a communication function by a bus network, and the PLC device having the communication function serves as a communication master station; Each I / O terminal device having a communication function is set as a communication slave station, and in operation, the communication slave station corresponding to the frame transmission from the communication master station returns a response frame to the communication master station. , A communication master station start-up control method applied to a PLC system adapted to exchange various data between the communication master station and each communication slave station, after starting, through link establishment processing, In the process of transitioning to the operational state, this is executed prior to link establishment processing, and there are duplicate communication master stations on the network. The master duplication determination process is performed to determine whether or not the communication master station is duplicated by the master duplication determination process executed prior to the link establishment process, and the process proceeds to the link establishment process. Without being transferred to a predetermined master duplication avoiding process.
また、本発明のPLCシステムは、通信機能を有する1のPLC装置と通信機能を有する1若しくは2以上のI/Oターミナル装置とをバス型ネットワークで結ぶと共に、通信機能を有するPLC装置を通信マスタ局としかつ通信機能を有するI/Oターミナル装置のそれぞれを通信スレーブ局とし、運用状態においては、通信マスタ局からのフレーム送信に対して、該当する通信スレーブ局がレスポンスフレームを通信マスタ局へと返送することにより、通信マスタ局と各通信スレーブ局との間で様々なデータのやり取りを行うようにしたPLCシステムであって、前記通信マスタ局には、起動後、リンク確立処理を経て、運用状態へと移行する過程で、リンク確立処理に先立って実行され、ネットワーク上に通信マスタ局が重複して存在するか否かを判定するマスタ重複判定手段と、リンク確立処理に先立って実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行する第1のマスタ重複回避手段と、、を具備したものである。 In addition, the PLC system of the present invention connects one PLC device having a communication function and one or more I / O terminal devices having a communication function by a bus network, and also connects the PLC device having the communication function to a communication master. Each I / O terminal device that has a communication function as a communication station is a communication slave station, and in operation, the corresponding communication slave station sends a response frame to the communication master station in response to frame transmission from the communication master station. A PLC system in which various data are exchanged between the communication master station and each communication slave station by returning the data to the communication master station. In the process of transitioning to a state, it is executed prior to link establishment processing, and there are duplicate communication master stations on the network. If it is determined that there is a duplicate communication master station by the master duplication judgment means for judging whether or not and the master duplication judgment processing executed prior to the link establishment processing, the process does not proceed to the link establishment processing. And a first master duplication avoiding means for shifting to a predetermined master duplication avoiding process.
本発明によれば、リンク確立処理に先立って実行するマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行すると共に、リンク確立処理と並行して実行するマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行するため、ネットワーク上に1台しか通信マスタ局を許容しないPLCシステムに対して2台以上の通信マスタ局が接続されると言った事態が生じた場合にも、当該PLCシステムの誤動作を確実に防することができる。 According to the present invention, when it is determined by the master duplication determination process executed prior to the link establishment process that the communication master station is duplicated, the process proceeds to the predetermined master duplication avoidance process without shifting to the link establishment process. When the communication master station is determined to be duplicated by the master duplication determination process executed in parallel with the link establishment process, the process proceeds to the predetermined master duplication avoidance process without shifting to the operation state. Therefore, even if a situation occurs in which two or more communication master stations are connected to a PLC system that allows only one communication master station on the network, the malfunction of the PLC system is ensured. Can be prevented.
以下に、この発明に係る通信マスタ局の起動時制御方法の好適な実施の一形態を添付図面を参照しながら詳細に説明する。 Hereinafter, a preferred embodiment of a start-up control method for a communication master station according to the present invention will be described in detail with reference to the accompanying drawings.
通信マスタ局及び通信スレーブ局を含むPLCシステム全体の構成図が図1に示されている。同図に示されるように、このPLCシステムは、通信マスタ局となる通信機能を有するPLC装置1と、通信スレーブ局となる複数台の通信機能を有するI/Oターミナル装置2,2・・・とを、バス型ネットワークであるフィールドバス6により繋いで構成されている。なお、図において、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ユニット20のI/Oメモリ(図示せず)内のOUTデータは、通信マスタユニット10のRAM103内のOUTエリアに書き込まれ、同RAM103のINデータは、CPUユニット20のI/Oメモリ内のINエリアに書き込まれる。
Specifically, OUT data in the I / O memory (not shown) of 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エリアに書き込まれ、同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
次に、I/Oターミナル装置内部のハードウェア構成図が図3に示されている。同図に示されるように、I/Oターミナル装置2は、通信物理層として機能する通信インタフェース(通信I/F)201と、所望の通信機能を実現するための回路をLSI化してなるマスタ用ASIC202と、マイクロプロセッサを主体として構成されて装置全体を統括制御するためのCPU203と、各種の設定データが格納される不揮発性メモリ(EEPROM)204と、各種の動作表示等を行うためのLED表示器205と、各種の設定操作等に使用される設定スイッチ206と、I/O機器7との間でデータをやり取りするためのI/F部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データのやり取りが行われる。
As described in detail later, between the
具体的には、通信マスタユニット10から受信されるOUTデータは、I/Oターミナル装置2のI/F部207を介してI/O機器7のうちの出力機器へと送り出される。そして、I/O機器7のうちの入力機器からI/F部207を介してI/Oターミナル装置2に取り込まれたINデータは、通信マスタユニット10へ宛てて送信される。出力機器の具体例は駆動系のアクチュエータなどであり、入力機器の具体例はセンサやスイッチなどである。
Specifically, OUT data received from the
次に、本発明の要部を含むポーリング・セレクティング方式による1対Nのマスタ・スレーブ通信の詳細を図4〜図10を参照して説明する。 Next, details of the 1-to-N master / slave communication by the polling / selecting method including the main part of the present invention will be described with reference to FIGS.
通信フレームのフォーマットの構成図が図4に示されている。同図に示されるように、フィールドバス6を流れる通信フレームには、フレームの先頭を示すスタートコードが格納されるスタートコード部401と、フレームの種別を判定するためのフレームコードが格納されるフレームコード部402と、データ等が格納されるデータ部403と、CRCコードやパリティビット等のチェックコードが格納されるチェックコード部404とが少なくとも用意されている。
A configuration diagram of the format of the communication frame is shown in FIG. As shown in the figure, the communication frame flowing in the
フィールドバス6上には様々な通信フレームが流れるが、それらのフレームには、通信マスタ局のみが送信できるフレームと、通信スレーブ局のみが送信できるフレームとが存在する。それらのフレームの識別は、フレームコード部402の内容に基づいて行うことができる。
Various communication frames flow on the
この例にあっては、通信マスタ局のみが送信できるフレームとしては、(1)通信スレーブ局の存在確認、通信スレーブ局へのデータ送信、及び通信スレーブ局からのデータ送信許可を同時に行い、ネットワークの同期、接続確認、出力データの送信と3つの役割を持っているネットワーク同期兼出力用データフレーム(OUT_Frame)、(2)通信スレーブ局の存在確認、及び通信スレーブ局からのデータ送信許可を同時に行い、ネットワークの同期、接続確認の役割を持っているネットワーク同期フレーム(TRG_Frame)、(3)通信スレーブ局へのデータ送信を行い、出力データ送信の役割を持つ出力用データフレーム(OUT_NT_Frame)、(4)通信スレーブ局に対して、現在の伝送速度を通知するための探索フレーム(BEACON_Frame)の4種類のフレームが存在する。 In this example, the frame that can be transmitted only by the communication master station includes (1) the presence confirmation of the communication slave station, the data transmission to the communication slave station, and the data transmission permission from the communication slave station at the same time. Network synchronization and output data frame (OUT_Frame), which has three roles: synchronization, connection confirmation, output data transmission, (2) existence confirmation of communication slave station, and data transmission permission from communication slave station at the same time Network synchronization frame (TRG_Frame) that has the role of network synchronization and connection confirmation, (3) Output data frame (OUT_NT_Frame), which transmits data to the communication slave station, and has the role of output data transmission, ( 4) Four types of search frames (BEACON_Frame) for notifying the communication slave station of the current transmission rate. There exist.
また、通信スレーブ局のみが送信できるフレームとしては、(1)通信マスタ局から通信スレーブ局に対する存在確認(OUT_Frame又はTRG_Frame)に対する応答を行うための存
在応答フレーム(CN_Frame)、(2)マスタ局へのデータ送信を行うための入力用データフレーム(IN_Frame)の2種類のフレームが存在する。そして、この6種類のフレームを区別できるようにコードを予め決めておき、フレームコード部402にコード情報を格納する。なお、コード情報の決め方には代替もあり、例えば、送信元が通信マスタ局なのか通信スレーブ局なのかを示す局種別コードと、そのフレーム内容を示す内容コードとの2つをあわせてフレームコード部402に格納してもよい。
In addition, frames that can be transmitted only by the communication slave station include (1) a presence response frame (CN_Frame) for making a response to the presence confirmation (OUT_Frame or TRG_Frame) from the communication master station to the communication slave station, and (2) to the master station. There are two types of frames, an input data frame (IN_Frame) for performing the data transmission. Then, a code is determined in advance so that the six types of frames can be distinguished, and code information is stored in the
このPLCシステムにおける運用状態においては、通信マスタ局からのポーリングフレームの一斉同報送信に対して、該当する通信スレーブ局のそれぞれが互いにタイミングをずらせてレスポンスフレームを通信マスタ局へと返送する一連の動作を繰り返すことにより、通信マスタ局と各通信スレーブ局との間で様々なデータのやり取りが行われる。 In the operation state in this PLC system, in response to the simultaneous broadcast transmission of the polling frame from the communication master station, each of the corresponding communication slave stations returns a response frame to the communication master station with the timing shifted from each other. By repeating the operation, various data are exchanged between the communication master station and each communication slave station.
具体的には、通信マスタ局が第1〜第4フレームの全てに宛ててポーリングフレーム(先に説明したネットワーク同期兼出力用データフレーム(OUT_Frame)やネットワーク同期フレーム(TRG_Frame)等に相当)を一斉同報送信すると、第1スレーブ局、第2スレーブ局、第3スレーブ局、第4スレーブ局の順に、各スレーブ局からレスポンスフレーム(先に説明した存在応答フレーム(CN_Frame)や入力用データフレーム(IN_Frame)等に相当)が返信される。このとき、各通信スレーブの返信タイミングをどのように決めるかについては、例えば、特開平9−128019号公報に見られるように、ネットワーク同期兼出力用データフレーム(OUT_Frame)内の自己宛データの受信タイミングに、フレーム長および物理的遅延を考慮した基本アイドル時間を加えて返信タイミングを決定する方法等が従来より知られている。 Specifically, the communication master station broadcasts polling frames (corresponding to the previously described network synchronization / output data frame (OUT_Frame), network synchronization frame (TRG_Frame), etc.) addressed to all of the first to fourth frames. When broadcast transmission is performed, a response frame (the above-described presence response frame (CN_Frame) or input data frame (CN_Frame) or input data frame (CN_Frame) is transmitted from each slave station in the order of the first slave station, the second slave station, the third slave station, and the fourth slave station. Is equivalent to IN_Frame). At this time, as to how to determine the return timing of each communication slave, for example, as seen in Japanese Patent Laid-Open No. 9-128019, reception of self-addressed data in the network frame for synchronization and output (OUT_Frame) A method of determining a reply timing by adding a basic idle time in consideration of a frame length and a physical delay to timing is conventionally known.
なお、一斉同報送信されるポーリングフレームには、宛先を指定することも可能となっている。例えば、上の例において、第3フレームを宛先指定から除外すれば、これを受信する第3スレーブ局は自己宛のポーリングフレームでないと認識して、レスポンスフレームを返送することはない。 Note that a destination can be specified for a polling frame transmitted simultaneously. For example, in the above example, if the third frame is excluded from the destination designation, the third slave station that receives the third frame recognizes that it is not a self-addressed polling frame, and does not return a response frame.
このように、通信マスタ局からは全ての通信スレーブ局へとポーリングフレームの一斉同報送信が行われるものの、各通信スレーブ局の側ではその一斉同報送信されるポーリングフレームに自己宛の宛先指定が存在しない限り、レスポンスフレームを返信することはないから、このデータ伝送手順は、実質的に、ポーリング・セレクティング方式であると言って差し支えないものである。 In this way, although the communication master station broadcasts polling frames to all communication slave stations, each communication slave station specifies its own address for the polling frame that is broadcast simultaneously. Since no response frame is sent back unless there exists, this data transmission procedure can be said to be a polling / selecting method substantially.
次に、本発明の要部である通信マスタ局の起動時制御方法について説明する。先に説明したように、本発明の通信マスタ局の起動時制御方法は、起動後、リンク確立処理を経て、運用状態へと移行する過程で、リンク確立処理に先立って、及び/又は、リンク確立処理と並行して、ネットワーク上に通信マスタ局が重複して存在することを検知するためのマスタ重複判定処理を実行し、リンク確立処理に先立って実行するマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行すると共に、リンク確立処理と並行して実行するマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行する、ことを特徴とするものである。 Next, the startup control method for the communication master station, which is the main part of the present invention, will be described. As described above, the start-up control method of the communication master station of the present invention is performed in the process of transitioning to the operating state after the start of the link establishment process and prior to the link establishment process and / or the link. In parallel with the establishment process, a master duplication determination process is performed to detect that there are duplicate communication master stations on the network. The master duplication determination process is executed prior to the link establishment process. When it is determined that there is a duplicate, the communication master station moves to a predetermined master duplication avoidance process without going to the link establishment process and the master duplication judgment process executed in parallel with the link establishment process. When it is determined that there is a duplication, the process shifts to a predetermined master duplication avoiding process without shifting to the operation state. That.
リンク確立処理に先立って実行されるマスタ局の処理を示すフローチャート(その1)が図6に示されている。なお、このフローチャートに示される処理は、図2に示される通信マスタユニット10内のCPU104により実行される。
FIG. 6 shows a flowchart (part 1) showing the master station process executed prior to the link establishment process. Note that the processing shown in this flowchart is executed by the
同図において、電源投入により処理が開始されると、先ず、初期化処理(ステップ601)が実行されて、フラグやレジスタ類の初期設定が行われた後、監視時間を決定するためのタイマがセットされて監視時間の計時が開始される(ステップ602)。ここでセットされるタイマの監視時間は、システムの運用状態におけるポーリングフレームの送信周期(送信時間間隔)よりも十分に長めに決められている。 In the figure, when the process is started by turning on the power, the initialization process (step 601) is first executed, the flags and registers are initialized, and a timer for determining the monitoring time is set. The monitoring time is set after being set (step 602). The monitoring time of the timer set here is determined to be sufficiently longer than the polling frame transmission period (transmission time interval) in the operating state of the system.
その後、タイマがタイムアップするまでの間(ステップ604NO)、何らかのフレームが正常に受信されたか否かの判定が繰り返し実行される(ステップ603NO)。ここで、何らかのフレームが受信されたか否かの判定は、当該フレームのチェックコード部404に格納されたCRCコードやパリティビット等のチェックコードの存在有無の検知により行うことができる。
Thereafter, until the timer expires (NO in step 604), it is repeatedly determined whether or not any frame is normally received (NO in step 603). Here, whether or not any frame has been received can be determined by detecting the presence or absence of a check code such as a CRC code or a parity bit stored in the
タイマがタイムアップするまでの間に(ステップ604NO)、何らかのフレームが受信されたと判定されると(ステップ603YES)、マスタ局重複検出処理が実行されて(ステップ605)、所定のマスタ重複検出フラグF1が“1”にセットされた後、マスタ重複回避のためにネットワーク離脱処理への移行が行われる(ステップ606)。 If it is determined that some frame has been received before the timer expires (NO in step 604) (step 603 YES), a master station duplication detection process is executed (step 605), and a predetermined master duplication detection flag F1 Is set to “1”, a transition to a network leaving process is performed to avoid master duplication (step 606).
このような処理を採用したのは、通信マスタ局が接続されたネットワークに、既に、他の通信マスタ局が接続されて運転されていれば、監視時間が終了してタイマがタイムアップするまでには、既に存在する通信マスタ局から送信されたポーリングフレームか又はそれに応答して各通信スレーブ局から送信されるレスポンスフレームが受信される筈だからである。 The reason why such a process is adopted is that if another communication master station is already connected to the network to which the communication master station is connected and operated, the monitoring time ends and the timer times out. This is because a polling frame transmitted from an existing communication master station or a response frame transmitted from each communication slave station in response thereto should be received.
なお、ネットワーク離脱処理においては、スイッチを介して回線の接続を物理的に絶つようにしてもよいし、物理的には回線と接続されているものの、ポーリングフレーム等のフレームについては一切送信しない休止状態としてもよい。 In the network disconnection process, the connection of the line may be physically disconnected through the switch, or it is physically connected to the line but does not transmit any frame such as a polling frame. It is good also as a state.
これに対して、なんらのフレームも正常受信することなく(ステップ603NO)、タイマがタイムアップすると(ステップ604YES)、フレーム送信許可処理が実行されて(ステップ607)、所定のフレーム送信許可フラグF2が“1”にセットされた後、リンク確立処理への移行が行われる(ステップ608)。 In contrast, if no frame is normally received (NO in step 603) and the timer expires (YES in step 604), frame transmission permission processing is executed (step 607), and a predetermined frame transmission permission flag F2 is set. After being set to “1”, a transition to a link establishment process is performed (step 608).
このような処理を採用したのは、通信マスタ局が接続されたネットワークに、他の通信マスタ局が接続されていなければ、監視時間が終了してタイマがタイムアップするまでに、ポーリングフレームやレスポンスフレームが受信される筈はないからである。 Such processing is adopted because if no other communication master station is connected to the network to which the communication master station is connected, the polling frame or response will be sent before the monitoring time expires and the timer times out. This is because there is no way to receive the frame.
以上の例によれば、既に稼働中のPLCシステムのネットワークを構成するネットワークケーブルに誤って通信マスタ局を接続してしまってような場合には、その追加接続された通信マスタ局の電源を投入して起動すると、その後、運用状態におけるポーリングフレームの一斉同報送信周期よりも十分に長い監視期間内には、ネットワーク上を流れる何らかの通信フレームが受信されることとなるため、これに基づいてマスタ重複を判定し、ネットワークからの離脱を成し遂げることができる。 According to the above example, if a communication master station is accidentally connected to a network cable that constitutes a network of an already operating PLC system, the additional connected communication master station is powered on. Then, any communication frame that flows on the network is received within a monitoring period that is sufficiently longer than the simultaneous broadcast transmission period of polling frames in the operating state. Duplicates can be determined and a departure from the network can be achieved.
なお、ここでいう「一斉同報送信周期」は、例えば、通信マスタ局が通信スレーブ局1台を特定してポーリングフレームを送信し、それを受信した1台の通信スレーブ局がデータを返信し、通信マスタ局がそのデータを受信するようなもので、通信マスタ局と各通信スレーブ局との間で1対1通信を順番に繰り返すものである場合には、その1対1通信を行う通信周期の意味も含む。以下に説明する実施形態においても、「一斉同報送信周期」の意味は、同様である。 The "broadcast transmission cycle" here refers to, for example, a communication master station specifying one communication slave station and transmitting a polling frame, and one communication slave station receiving it returns data. If the communication master station receives the data and repeats the one-to-one communication between the communication master station and each communication slave station, the communication that performs the one-to-one communication It also includes the meaning of the period. Also in the embodiments described below, the meaning of “broadcast transmission period” is the same.
このようなマスタ局の処理によれば、通信フレームのすべてに付されている筈の例えばチェックコード(CRCコードやパリティビット等に相当)の存在を検知するだけで、マスタ重複を判定できるため、判定アルゴリズムが簡単で既存のシステムに即座に導入できると言う利点がある。 According to such processing of the master station, it is possible to determine master duplication only by detecting the presence of, for example, a check code (corresponding to a CRC code, a parity bit, etc.) attached to all communication frames. There is an advantage that the judgment algorithm is simple and can be immediately introduced into an existing system.
次に、リンク確立処理に先立って実行されるマスタ局の処理を示すフローチャート(その2)が図7に示されている。なお、このフローチャートに示される処理も、図2に示される通信マスタユニット10内のCPU104により実行される。
Next, FIG. 7 shows a flowchart (No. 2) showing the process of the master station executed prior to the link establishment process. The processing shown in this flowchart is also executed by the
図7のフローチャートにおいて、図6のフローチャートとの相違点は、フレームを正常に受信したか否かの判定処理(ステップ603)とマスタ局重複検出処理(ステップ605)との間に、送信元がマスタであるか否かを判定する処理(ステップ609)を新たに追加した点にある。 In the flowchart of FIG. 7, the difference from the flowchart of FIG. 6 is that the transmission source is between the process of determining whether or not the frame is normally received (step 603) and the master station duplication detection process (step 605). The process (step 609) for determining whether or not it is a master is newly added.
すなわち、この例にあっては、タイマがタイムアップするまでの間に(ステップ604NO)、何らかのフレームが受信されたと判定されたとしても(ステップ603YES)、直ちにマスタ局重複検出処理(ステップ605)へと移行するのではなくて、さらに送信元がマスタであるか否かの判定を行い(ステップ609)、送信元がマスタであると判定された場合に限り(ステップ609YES)、マスタ重複検出処理へと移行して(ステップ605)、所定のマスタ重複検出フラグF1が“1”にセットされた後、マスタ重複回避のためにネットワーク離脱処理へと移行するのである(ステップ606)。 That is, in this example, even if it is determined that some frame has been received before the timer expires (step 604 NO) (step 603 YES), the master station duplication detection process (step 605) is immediately performed. In addition, it is determined whether or not the transmission source is the master (step 609), and only when it is determined that the transmission source is the master (YES in step 609), the master duplication detection process is performed. (Step 605), and after the predetermined master duplication detection flag F1 is set to "1", the routine proceeds to network disconnection processing to avoid master duplication (Step 606).
ここで、送信元がマスタであるか否かの判定は、通信フレームのフォーマットにおいて、通信フレームの種別を示すフレームコード部の内容を示すコードが、通信マスタ局のみが送信する既知の複数種のコード((1)通信スレーブ局の存在確認、通信スレーブ局へのデータ送信、及び通信スレーブ局からのデータ送信許可を同時に行うためのネットワーク同期兼出力用データフレーム(OUT_Frame)、(2)通信スレーブ局の存在確認、及び通信スレーブ局からのデータ送信許可を同時に行うためのネットワーク同期フレーム(TRG_Frame)、(3)通信スレーブ局へのデータ送信を行うための出力用データフレーム(OUT_NT_Frame)、(4)通信スレーブ局に対して、現在の伝送速度を通知するための探索フレーム(BEACON_Frame)の4種類のフレームに相当)のいずれかに該当することを判別することにより実現することができる。なお、コードを、送信元が通信マスタ局なのか通信スレーブ局なのかを示す局種類コードと、そのフレーム内容を示す内容コードとからなるものとした場合には、フレームコード部の局種類コードから判別することでも実現することができる。 Here, the determination as to whether or not the transmission source is a master is made by determining whether or not a code indicating the content of the frame code part indicating the type of communication frame is a plurality of known types transmitted only by the communication master station. Code ((1) Communication slave station existence confirmation, data transmission to communication slave station, data frame for network synchronization and output (OUT_Frame) for simultaneously permitting data transmission from communication slave station, (2) communication slave Network synchronization frame (TRG_Frame) for simultaneously confirming the existence of the station and permitting data transmission from the communication slave station, (3) Output data frame (OUT_NT_Frame) for performing data transmission to the communication slave station, (4 ) 4 types of search frames (BEACON_Frame) to notify the communication slave station of the current transmission rate It corresponds to one of those) can be achieved by determining the. If the code is composed of a station type code indicating whether the transmission source is a communication master station or a communication slave station and a content code indicating the frame content, the code from the station type code in the frame code part is used. It can also be realized by discrimination.
なお、たまたま受信されたフレームの送信元がマスタではない(送信元がスレーブ)としても(ステップ609NO)、タイマにより決定される監視時間は、ポーリングフレームの送信周期よりも十分に長めに設定されているから、マスタ重複が生じている限り、タイマがタイムアップするまでの間には(ステップ604NO)、他のマスタから送信されるポーリングフレームが必ず検出されて(ステップ609YES)、マスタ重複検出処理の実行を経て(ステップ605)、ネットワーク離脱処理への移行が行われる(ステップ606)。 Even if the transmission source of the received frame is not the master (transmission source is the slave) (NO in step 609), the monitoring time determined by the timer is set sufficiently longer than the transmission period of the polling frame. Therefore, as long as master duplication occurs, until the timer expires (NO in step 604), a polling frame transmitted from another master is always detected (YES in step 609). After execution (step 605), a shift to the network leaving process is performed (step 606).
これに対して、マスタ重複が生じていなければ、マスタから送信されるポーリングフレームが受信されないまま(ステップ609NO)、タイマがタイムアップすることとなり(ステップ604YES)、この場合には、フレーム送信許可処理(ステップ607)を経て、リンク確立処理への移行が行われる(ステップ608)。 On the other hand, if there is no master duplication, the polling frame transmitted from the master is not received (step 609 NO) and the timer is timed up (step 604 YES). In this case, the frame transmission permission process After (step 607), the transition to the link establishment process is performed (step 608).
以上の例によっても、既に稼働中のPLCシステムのネットワークを構成するネットワークケーブルに誤って通信マスタ局を接続してしまってような場合には、その通信マスタ局の電源を投入して起動すると、その後、運用状態におけるポーリングフレームの一斉同報送信周期よりも十分に長い監視期間内には、通信マスタ局のみが送信する通信フレームが受信されるため、これに基づいてマスタ重複を判定し、ネットワークからの離脱を成し遂げることができる。 Even in the above example, if the communication master station is mistakenly connected to the network cable that constitutes the network of the PLC system that is already in operation, when the communication master station is turned on and started, After that, since the communication frame transmitted only by the communication master station is received within the monitoring period sufficiently longer than the simultaneous broadcast transmission period of the polling frame in the operating state, the master duplication is determined based on this, and the network Achieving withdrawal from
このようなマスタ局の処理によれば、既に稼働中のPLCシステムのネットワークを構成するネットワークケーブルには、所定の送信周期をもって、通信マスタ局からのポーリングフレームが繰り返し流れているから、運用状態におけるポーリングフレームの一斉同報送信周期よりも十分に長い監視期間内に、通信マスタ局のみが送信する通信フレーム(ポーリングフレーム等)が受信されると言うことは、既に他の通信マスタ局が存在すること(マスタ重複)を直接的に意味することとなり、これに基づいてマスタ重複判定をより確実に行うことができると言う利点がある。 According to such processing of the master station, since the polling frame from the communication master station repeatedly flows in the network cable constituting the network of the already operating PLC system with a predetermined transmission cycle, The fact that a communication frame (such as a polling frame) transmitted only by the communication master station is received within a monitoring period sufficiently longer than the simultaneous broadcast transmission period of the polling frame means that another communication master station already exists. (Master duplication) directly means that there is an advantage that the master duplication determination can be more reliably performed based on this.
次に、リンク確立処理に先立って実行されるマスタ局の処理を示すフローチャート(その3)が図8に示されている。なお、このフローチャートに示される処理も、図2に示される通信マスタユニット10内のCPU104により実行される。
Next, FIG. 8 shows a flowchart (No. 3) showing the process of the master station executed prior to the link establishment process. The processing shown in this flowchart is also executed by the
図8のフローチャートにおいて、図6のフローチャートとの相違点は、フレームを正常に受信したか否かの判定処理(ステップ603)とマスタ局重複検出処理(ステップ605)との間に、送信元がスレーブであるか否かを判定する処理(ステップ610)を新たに追加した点にある。 In the flowchart of FIG. 8, the difference from the flowchart of FIG. 6 is that the transmission source is between the determination process of whether or not the frame is normally received (step 603) and the master station duplication detection process (step 605). The process (step 610) for determining whether or not it is a slave is newly added.
すなわち、この例にあっては、タイマがタイムアップするまでの間に(ステップ604NO)、何らかのフレームが受信されたと判定されたとしても(ステップ603YES)、直ちにマスタ局重複検出処理(ステップ605)へと移行するのではなくて、さらに送信元がスレーブであるか否かの判定を行い(ステップ610)、送信元がスレーブであると判定された場合に限り(ステップ610YES)、マスタ重複検出処理へと移行して(ステップ605)、所定のマスタ重複検出フラグF1が“1”にセットされた後、マスタ重複回避のためにネットワーク離脱処理へと移行するのである(ステップ606)。 That is, in this example, even if it is determined that some frame has been received before the timer expires (step 604 NO) (step 603 YES), the master station duplication detection process (step 605) is immediately performed. In addition, it is determined whether or not the transmission source is a slave (step 610). Only when it is determined that the transmission source is a slave (YES in step 610), the master duplication detection process is performed. (Step 605), and after the predetermined master duplication detection flag F1 is set to "1", the routine proceeds to network disconnection processing to avoid master duplication (Step 606).
ここで、送信元がスレーブであるか否かの判定は、通信フレームのフォーマットにおいて、通信フレームの種別を示すフレームコード部の内容を示すコードが、通信スレーブ局のみが送信する既知の複数種のコード((1)通信マスタ局から通信スレーブ局に対する存在確認(OUT_Frame又はTRG_Frame)に対する応答を行うための存在応答フレーム(CN_Frame)、(2)マスタ局へのデータ送信を行うための入力用データフレーム(IN_Frame)の2種類のフレームに相当)のいずれかに該当することを判別することにより実現することができる。なお、コードを、送信元が通信マスタ局なのか通信スレーブ局なのかを示す局種類コードと、そのフレーム内容を示す内容コードとからなるものとした場合には、フレームコード部の局種類コードから判別することでも実現することができる。 Here, whether or not the transmission source is a slave is determined by determining whether or not a code indicating the content of the frame code part indicating the type of the communication frame is a plurality of known types transmitted only by the communication slave station in the communication frame format. Code ((1) Presence response frame (CN_Frame) for responding to the presence confirmation (OUT_Frame or TRG_Frame) from the communication master station to the communication slave station, (2) Data frame for input to transmit data to the master station (Corresponding to two types of frames (IN_Frame)). If the code is composed of a station type code indicating whether the transmission source is a communication master station or a communication slave station and a content code indicating the frame content, the code from the station type code in the frame code part is used. It can also be realized by discrimination.
なお、たまたま受信されたフレームの送信元がスレーブではない(送信元がマスタ)としても(ステップ610NO)、タイマにより決定される監視時間は、ポーリングフレームの送信周期よりも十分に長めに設定されているから、マスタ重複が生じている限り、タイマがタイムアップするまでの間には(ステップ604NO)、スレーブから送信されるレスポンスフレームが必ず検出されて(ステップ610YES)、マスタ重複検出処理の実行を経て(ステップ605)、ネットワーク離脱処理への移行が行われる(ステップ606)。 Even if the transmission source of the received frame is not a slave (transmission source is the master) (NO in step 610), the monitoring time determined by the timer is set sufficiently longer than the transmission period of the polling frame. Therefore, as long as the master duplication occurs, the response frame transmitted from the slave is surely detected until the timer expires (step 604 NO) (step 610 YES), and the master duplication detection process is executed. Then (step 605), the shift to the network leaving process is performed (step 606).
これに対して、マスタ重複が生じていなければ、スレーブから送信されるレスポンスフレームが受信されないまま(ステップ610NO)、タイマがタイムアップすることとなり(ステップ604YES)、この場合には、フレーム送信許可処理(ステップ607)を経て、リンク確立処理への移行が行われる(ステップ608)。 On the other hand, if there is no master duplication, the response frame transmitted from the slave is not received (step 610 NO), and the timer is timed up (step 604 YES). In this case, the frame transmission permission process After (step 607), the transition to the link establishment process is performed (step 608).
以上の例によっても、既に稼働中のPLCシステムのネットワークを構成するネットワークケーブルに誤って通信マスタ局を接続してしまってような場合には、その通信マスタ局の電源を投入して起動すると、その後、運用状態におけるポーリングフレームの一斉同報送信周期よりも十分に長い監視期間内には、通信スレーブ局のみが送信する通信フレームが受信されるため、これに基づいてマスタ重複を判定し、ネットワークからの離脱を成し遂げることができる。 Even in the above example, if the communication master station is mistakenly connected to the network cable that constitutes the network of the PLC system that is already in operation, when the communication master station is turned on and started, After that, since the communication frame transmitted only by the communication slave station is received within the monitoring period sufficiently longer than the simultaneous broadcast transmission period of the polling frame in the operating state, the master duplication is determined based on this, and the network Achieving withdrawal from
しかもこのようなマスタ局の処理によれば、ポーリングフレームの周期内には、最大、通信スレーブ局の接続台数分のレスポンスフレームが存在する上、それらの1つを受信しさえすればよいのであるから、間接的な判定であるとはいえ、判定アルゴリズムの点からは、信頼性の高い判定結果が得られる利点もある。 Moreover, according to such processing of the master station, there are at most response frames for the number of connected communication slave stations within the period of the polling frame, and it is only necessary to receive one of them. Therefore, although it is an indirect determination, there is also an advantage that a highly reliable determination result can be obtained from the viewpoint of the determination algorithm.
次に、リンク確立処理中のマスタ局の処理を示すフローチャートが図9(前半)及び図10(後半)にかけて示されている。図5に示されるように、リンク確立処理中のマスタ局は、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを個別に送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続スレーブ確認処理を実行しつつ、マスタ重複判定処理を実行する。 Next, a flowchart showing processing of the master station during link establishment processing is shown in FIG. 9 (first half) and FIG. 10 (second half). As shown in FIG. 5, the master station that is in the process of establishing a link individually transmits a polling frame to each of all connectable communication slave stations, and stores whether or not a response frame has been received from the communication slave station. While performing connection slave confirmation processing for link establishment, master duplication determination processing is performed.
図9において、リンク確立処理が開始されると、先ず、リンク確立処理に必要な各種の前処理を実行したのち(ステップ701)、ポーリングフレーム送信処理(ステップ702)及び監視時間を設定するためにタイマセット処理(ステップ703)を実行する。 In FIG. 9, when the link establishment process is started, first, various pre-processes necessary for the link establishment process are executed (step 701), and then a polling frame transmission process (step 702) and a monitoring time are set. A timer set process (step 703) is executed.
しかるのち、タイマがタイムアップするまでの間(ステップ708NO)、なんらかのフレームを正常受信したか否かを待機する状態となる(ステップ704NO)。ここで、何らかのフレームが受信されたか否かの判定は、当該フレームのチェックコード部404に格納されたCRCコードやパリティビット等のチェックコードの存在有無の検知により行うことができる。
Thereafter, until the timer expires (NO in step 708), it waits for whether or not any frame has been normally received (NO in step 704). Here, whether or not any frame has been received can be determined by detecting the presence or absence of a check code such as a CRC code or a parity bit stored in the
ところで、ポーリングフレーム送信処理(ステップ702)により一斉同報送信されるポーリングフレームには、宛先指定が可能とされている一方、各通信スレーブ局は互いにタイミングをずらせてレスポンスフレームを送信する機能が組み込まれている。そのため、接続スレーブ確認処理のためのポーリングのかけ方は一通りではない。 By the way, in the polling frame transmitted simultaneously by the polling frame transmission processing (step 702), it is possible to specify the destination, while each communication slave station has a function of transmitting a response frame by shifting the timing from each other. It is. For this reason, there is not a single method of polling for connection slave confirmation processing.
1台の通信マスタ局に対して4台の通信スレーブ局が存在する場合であれば、(1)第1スレーブ局〜第4スレーブ局を全て宛先指定する1個のポーリングフレームを一斉同報送信することで全ての通信スレーブ局にポーリングをかける場合、(2)ポーリング対象とするスレーブ局を、第1及び第2スレーブ局を含むグループと第3スレーブ局及び第4スレーブ局を含むグループとの2つのグループに分け、各グループのそれぞれに含まれるスレーブ局を宛先指定する2個のポーリングフレームを2回に分けて一斉同報送信することで全ての通信スレーブ局にポーリングをかける場合、(3)ポーリング対象となる4つのスレーブ局を1局毎に宛先指定する4個のポーリングフレームを4回に分けて一斉同報送信することで全ての通信スレーブ局にポーリングをかける場合、等々が想定される。なお、先に図5を参照して説明した通信シーケンス説明図の例は、上記の(3)の場合に相当する。 If there are four communication slave stations for one communication master station, (1) broadcast transmission of one polling frame specifying all destinations of the first to fourth slave stations When polling all communication slave stations, (2) the slave stations to be polled are divided into a group including the first and second slave stations and a group including the third slave station and the fourth slave station. When polling all communication slave stations by dividing the two polling frames into two groups and broadcasting the two polling frames specifying the slave stations included in each group in two broadcasts, (3 ) All the communication threads are transmitted by broadcasting the 4 polling frames that specify the address of the 4 slave stations to be polled for each station in 4 batches. When placing a poll the blanking station, etc. is assumed. The example of the communication sequence explanatory diagram described above with reference to FIG. 5 corresponds to the case of (3) above.
この図5からわかるように、マスタ局は通信スレーブ局1台を特定してポーリングフレームを送信し、それを受信した1台の通信スレーブ局からのレスポンスフレームの受信有無に基づいて接続フレームの確認を行う。次に別の通信スレーブ局1台にポーリングフレームを送信し、それを受信した当該通信スレーブ局からのレスポンスフレームの受信有無に基づいて接続フレームの確認を行う。 As can be seen from FIG. 5, the master station identifies one communication slave station, transmits a polling frame, and confirms the connection frame based on whether or not a response frame has been received from one communication slave station that has received it. I do. Next, a polling frame is transmitted to another communication slave station, and a connection frame is confirmed based on whether or not a response frame is received from the communication slave station that has received the polling frame.
それを順番に繰り返すことにより、リンク確立処理をする。この一斉同報の意味は、すべてのスレーブ局が受信処理しないもので、特定のスレーブ局だけが受信するようなポーリングフレームを送信する場合も含む意味である。通常のバス通信回線や、マルチドロップ回線において送信されるフレームであっても、ここでいう「一斉同報」の意味に含まれる。 The link establishment process is performed by repeating this in order. The meaning of this simultaneous broadcast includes a case in which all slave stations do not perform reception processing and transmit a polling frame that only a specific slave station receives. Even a frame transmitted on a normal bus communication line or a multi-drop line is included in the meaning of “broadcasting” here.
ここで、説明の便宜のために、図9のフローチャートに示す例においては、図5に示されるように、上記の(3)の場合に沿って、ポーリングフレーム送信処理(ステップ703)が実行されるものと想定する。 Here, for convenience of explanation, in the example shown in the flowchart of FIG. 9, as shown in FIG. 5, the polling frame transmission process (step 703) is executed in accordance with the case (3) above. Assuming that
このような前提の上に、ポーリングフレーム送信処理(ステップ702)が実行されて、第1スレーブ局を宛先指定するポーリングフレームが送信されると、マスタ重複が生じていない正常な状態であれば、タイマがタイムアップする以前に(ステップ708NO)、第1スレーブ局からのレスポンスフレームが受信され(ステップ704YES、ステップ705NO、ステップ706YES)、レスポンス受信処理(ステップ707)が実行されて、第1スレーブ局に対応する接続確認フラグF11は“1”にセットされる。 On this assumption, when the polling frame transmission process (step 702) is executed and the polling frame for specifying the destination of the first slave station is transmitted, if the master is not in a normal state, Before the timer expires (step 708 NO), a response frame from the first slave station is received (step 704 YES, step 705 NO, step 706 YES), and a response reception process (step 707) is executed to obtain the first slave station. The connection confirmation flag F11 corresponding to is set to “1”.
以後、第2スレーブ局〜第4スレーブ局に至るまで(図10、ステップ701NO)、宛先を変更してはポーリングフレームの送信処理が繰り返され(ステップ702)、この例では第2〜第4スレーブ局の全てが接続されているため、その都度、レスポンス受信処理が実行されて(ステップ707)、第2〜第4スレーブ局に対応する接続確認フラグF12,F13,F14は順次に“1”にセットされる。
Thereafter, from the second slave station to the fourth slave station (FIG. 10,
なお、第1〜第4スレーブ局のいずれかが接続されていなければ、そのスレーブ局に対応するレスポンスフレーム受信待機中にタイマがタイムアップするため(ステップ708YES)、その第nスレーブ局に関する接続確認フラグF1nは“0”の状態のままに維持される。 If any of the first to fourth slave stations is not connected, the timer times out while waiting for receiving a response frame corresponding to the slave station (YES in step 708), so the connection confirmation for the nth slave station is performed. The flag F1n is maintained in the “0” state.
このようにして、全てのスレーブ局に対するポーリングフレームの送信が完了すると(ステップ709YES)、接続確認フラグF11〜F14の内容に基づいて、1つ以上のスレーブ局からレスポンスフレームを受信したか否かの判定が行われ(ステップ710)、ここで肯定判定が得られれば(ステップ710YES)、リンク確立処理は終了されて、運用状態への移行が行われる。 In this way, when transmission of polling frames to all slave stations is completed (step 709 YES), whether or not response frames have been received from one or more slave stations based on the contents of the connection confirmation flags F11 to F14. If a determination is made (step 710) and an affirmative determination is obtained here (YES in step 710), the link establishment process is terminated and the operation state is shifted.
この運用状態においては、先に説明したように、通信マスタ局からのポーリングフレームの一斉同報送信に対して、該当する通信スレーブ局のそれぞれが互いにタイミングをずらせてレスポンスフレームを通信マスタ局へと返送する一連の動作を繰り返すことにより、通信マスタ局と各通信スレーブ局との間で様々なデータのやり取りが行われる。 In this operational state, as described above, in response to simultaneous transmission of polling frames from the communication master station, the corresponding communication slave stations shift the timing with respect to each other and send response frames to the communication master station. By repeating a series of returning operations, various data are exchanged between the communication master station and each communication slave station.
なお、通信マスタ局と各通信スレーブ局との間で様々なデータのやり取りは、一般的なポーリングセレクション方式や、トークンパッシング方式であってもよい。例えば、通信マスタ局が通信スレーブ局1台を特定してポーリングフレームを送信し、それを受信した1台の通信スレーブ局がデータを返信し、通信マスタ局がそのデータを受信するものようなもので、通信マスタ局と各通信スレーブ局との間で1対1通信を順番にしてゆくものであってもよい。各通信スレーブがトークンを順番に渡し、トークンを獲得したスレーブ局が順番にレスポンスフレームをマスタ局に対して送信するものであってもよい。「通信スレーブ局のそれぞれが互いにタイミングをずらせてレスポンスフレームを通信マスタ局へと返送する」の意味は、そのような方式も含んでいる。 Various data exchanges between the communication master station and each communication slave station may be performed by a general polling selection method or a token passing method. For example, the communication master station identifies one communication slave station and transmits a polling frame, and one communication slave station that receives the frame returns data, and the communication master station receives the data. Thus, one-to-one communication may be sequentially performed between the communication master station and each communication slave station. Each communication slave may pass tokens in order, and the slave station that has acquired the token may sequentially send response frames to the master station. The meaning of “each of the communication slave stations returns the response frame to the communication master station with the timing shifted from each other” includes such a method.
次に、以上のリンク確立処理と並行して行われるマスタ重複回避のためのマスタ重複判定処理について説明する。 Next, master duplication determination processing for avoiding master duplication performed in parallel with the above link establishment processing will be described.
PLCシステムの新設時やメンテナンス後の運転再開時等において、1のネットワークを構成するネットワークケーブルに誤って、あるいは、2台以上の通信マスタ局を許容するシステムと誤認して、当初から2台以上の通信マスタ局が接続されてしまったような場合が想定される。 When a PLC system is newly installed or when operation is resumed after maintenance, two or more units have been mistakenly identified as a network cable that constitutes one network, or a system that allows two or more communication master stations. It is assumed that the communication master station is connected.
このようにシステム立ち上げ時から2台以上の通信マスタ局がネットワークに接続されていると、それらの通信マスタ局は電源投入或いはリセットスイッチの作動等により同時に起動される可能性が高く、その場合、起動直後のリンク確立処理においては、各通信マスタ局からほぼ同一のタイミングでポーリングフレームが送信されるため、それらのポーリングフレームはネットワーク上で衝突して無効化されてしまい、各通信スレーブ局からレスポンスフレームが送信されない可能性が高い。したがって、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信したにも拘わらず、いずれの通信スレーブ局からもレスポンスフレームの受信確認がとれないと言うことは、2台以上の通信マスタ局が存在すること(マスタ重複)をかなりの確立で推定することができ、これに基づいてマスタ重複と判定できるのである。 In this way, when two or more communication master stations are connected to the network from the time of system startup, these communication master stations are likely to be activated at the same time by turning on the power or operating the reset switch. In the link establishment process immediately after startup, polling frames are transmitted from each communication master station at almost the same timing, so these polling frames collide on the network and are invalidated. There is a high possibility that the response frame will not be transmitted. Therefore, even though a polling frame is transmitted to each of all connectable communication slave stations, no response slave reception confirmation can be obtained from any communication slave station. The existence of a station (master duplication) can be estimated with considerable probability, and based on this, it can be determined that there is a master duplication.
すなわち、図9及び図10のフローチャートにおいて、全てのスレーブにポーリングフレームを送信したにも拘わらず(ステップ709YES)、いずれのスレーブ局からもレスポンスフレームを受信しないと判定されると(ステップ710NO)、回線異常またはマスタ重複を検出する処理(ステップ712)が実行されて、回線異常またはマスタ重複検出を示す所定のフラグF3は“1”にセットされ、しかるのち、ネットワーク離脱処理への移行が行われる(第1処理)。 That is, in the flowcharts of FIGS. 9 and 10, when it is determined that a response frame is not received from any slave station (NO in step 710) even though polling frames are transmitted to all slaves (YES in step 709), A process for detecting line abnormality or master duplication (step 712) is executed, and a predetermined flag F3 indicating line abnormality or master duplication detection is set to "1", and then a shift to the network disconnection process is performed. (First process).
このような構成によれば、PLCシステムの新設時やメンテナンス後の運転再開時等において、1のネットワークを構成するネットワークケーブルに誤って、あるいは、2台以上の通信マスタ局を許容するシステムと誤認して、当初から2台以上の通信マスタ局が接続されてしまったような場合にあっても、リンク確立処理と並行して、マスタ重複を確実に判定し、重複する全ての通信マスタ局を自発的に回線から離脱させ、マスタ重複によるPLCシステムの誤動作を未然に防止することができる。 According to such a configuration, when a PLC system is newly installed or when operation is resumed after maintenance, the network cable constituting one network is mistakenly identified as a system that permits two or more communication master stations. Even if two or more communication master stations have been connected from the beginning, in parallel with the link establishment process, the master duplication is reliably determined, and all the duplicating communication master stations are determined. It is possible to voluntarily leave the line and prevent malfunction of the PLC system due to master duplication.
一方、システム立ち上げ時から2台以上の通信マスタ局がネットワークに接続されていると、それらの通信マスタ局は電源投入或いはリセットスイッチの作動等により同時に起動される可能性が高いのではあるが、それでも個々の通信マスタユニットは非同期で動作するのであるから、各通信マスタ局からのポーリングフレーム送信タイミングが僅かにずれて、個々の通信マスタ局が他の通信マスタ局が送信したポーリングフレームを受信することもあり得る。したがって、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したと言うことも、2台以上の通信マスタ局が存在すること(マスタ重複)をかなりの確立で推定することができ、これに基づいてマスタ重複と判定できる。 On the other hand, if two or more communication master stations have been connected to the network since the system was started up, there is a high possibility that these communication master stations will be activated simultaneously by turning on the power or operating the reset switch. However, since each communication master unit operates asynchronously, the polling frame transmission timing from each communication master station is slightly shifted, and each communication master station receives a polling frame transmitted from another communication master station. It is possible to do. Therefore, a polling frame is transmitted to each connectable communication slave station, and only the communication master station transmits it in the connection frame confirmation process for establishing a link that stores the presence / absence of reception of a response frame from the communication slave station. The fact that two or more communication master stations exist (master duplication) can be estimated with considerable establishment, and based on this, it can be determined that there is a master duplication.
すなわち、図9及び図10のフローチャートにおいて、いずれかのスレーブ局からのレスポンスフレーム受信待機中に、マスタ局からのフレームが受信されたと判定されると(ステップ705YES)、マスタ局重複検出処理(ステップ711)が実行されて、マスタ局重複検出を示すフラグF4が“1”にセットされたのち、ネットワーク離脱処理への移行が行われる(第2処理)。 That is, in the flowcharts of FIGS. 9 and 10, if it is determined that a frame from the master station has been received while waiting for a response frame from any slave station (YES in step 705), a master station duplication detection process (step 705) is performed. 711) is executed and the flag F4 indicating the master station duplication detection is set to "1", and then the shift to the network disconnection process is performed (second process).
このような構成によっても、PLCシステムの新設時やメンテナンス後の運転再開時等において、1のネットワークを構成するネットワークケーブルに誤って、あるいは、2台以上の通信マスタ局を許容するシステムと誤認して、当初から2台以上の通信マスタ局が接続されてしまったような場合にあっても、リンク確立処理と並行して、マスタ重複を確実に判定し、重複する全ての通信マスタ局を自発的に回線から離脱させ、マスタ重複によるPLCシステムの誤動作を未然に防止することができる。 Even with such a configuration, when a PLC system is newly installed or when operation is resumed after maintenance, the network cable constituting one network is mistakenly identified as a system that permits two or more communication master stations. Even if two or more communication master stations have been connected from the beginning, in parallel with the link establishment process, master duplication is reliably determined and all duplicate communication master stations are spontaneously Thus, it is possible to prevent the PLC system from malfunctioning due to the master duplication.
加えて、以上の第1処理並びに第2処理によれば、マスタ重複判定のために別途専用のポーリングフレーム送信処理を設けるのではなく、リンク確立処理において実行されるポーリングフレーム送信処理を流用しているため、電源投入又はリセットから運用状態へ移行する所要期間を徒に増大させることがないと言う利点もある。 In addition, according to the first process and the second process described above, the polling frame transmission process executed in the link establishment process is used instead of providing a separate dedicated polling frame transmission process for determining the master overlap. Therefore, there is also an advantage that the time required for shifting from the power-on or reset to the operation state is not increased easily.
なお、以上述べた第2処理においては、重複する2台の通信マスタ局のそれぞれから送信されるポーリングフレームの偶然的な送信タイミングのずれを利用して、互いに他の通信マスタ局が他のマスタ局のポーリングフレームの受信を検知するようにしたが、予め各マスタ局毎にリンク確立処理におけるポーリングフレームの送信周期を異ならせておいたり、あるいはタイマセット処理(ステップ703)において、タイマにセットされる監視時間データを乱数発生器を利用してランダムな値に設定すれば、重複する2台の通信マスタ局のそれぞれから送信されるポーリングフレームの送信タイミングを積極的にずらすこともでき、これによりマスタ重複時におけるポーリングフレーム受信可能性を高め、マスタ重複判定の信頼性を高めることができる。 In the second processing described above, other communication master stations use other masters by using the accidental transmission timing shift of the polling frames transmitted from each of the two overlapping communication master stations. Although the reception of the polling frame of the station is detected, the transmission period of the polling frame in the link establishment process is changed for each master station in advance, or the timer is set in the timer in the timer setting process (step 703). If the monitoring time data is set to a random value using a random number generator, the transmission timing of polling frames transmitted from each of the two overlapping communication master stations can be positively shifted. Increases the possibility of receiving polling frames when there is a master duplication, and improves the reliability of master duplication judgment. Can.
すなわち、このような構成を採用すると、2以上の通信マスタ局のそれぞれから送信されるポーリングフレームの衝突確立が低減されて、個々の通信マスタ局が他の通信マスタ局のポーリングフレームを受信する確立が高まり、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定する処理がより一層有効に作用して、マスタ重複をより確実に判定できることになる。 That is, when such a configuration is adopted, the establishment of collision of polling frames transmitted from each of two or more communication master stations is reduced, and each communication master station is established to receive polling frames of other communication master stations. As a result, the process of determining master duplication based on the reception of a frame transmitted only by the communication master station acts more effectively, and the master duplication can be more reliably determined.
本発明によれば、リンク確立処理に先立って実行するマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行すると共に、リンク確立処理と並行して実行するマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、運状態へと移行することなく、所定のマスタ重複回避処理へと移行するため、ネットワーク上に1台しか通信マスタ局を許容しないPLCシステムに対して2台以上の通信マスタ局が接続されると言った事態が生じた場合にも、当該PLCシステムの誤動作を確実に防止することができる。 According to the present invention, when it is determined by the master duplication determination process executed prior to the link establishment process that the communication master station is duplicated, the process proceeds to the predetermined master duplication avoidance process without shifting to the link establishment process. When the communication master station is determined to be duplicated by the master duplication determination process executed in parallel with the link establishment process, the process proceeds to the predetermined master duplication avoidance process without shifting to the operating state. Therefore, even if a situation occurs in which two or more communication master stations are connected to a PLC system that allows only one communication master station on the network, the malfunction of the PLC system is ensured. Can be prevented.
M1 本来の通信マスタ局
M2 誤って追加されたマスタ局
1 通信機能を有するPLC装置
2 通信機能を有するI/Oターミナル装置
3 パソコン
4 リピータ
5 終端装置
6 フィールドバス
7 I/O機器
10 通信マスタユニット
20 CPUユニット
101 通信インタフェース
102 マスタ用ASIC
103 RAM
104 CPU
105 EEPROM
106 LED表示器
107 設定スイッチ
108 内部バズインタフェース
201 通信インタフェース
202 スレーブ用ASIC
203 CPU
204 EEPROM
205 LED表示器
206 設定スイッチ
207 I/F部
M1 Original communication master station M2 Master station added by
103 RAM
104 CPU
105 EEPROM
106
203 CPU
204 EEPROM
205
Claims (12)
起動後、リンク確立処理を経て、運用状態へと移行する過程で、リンク確立処理に先立って、ネットワーク上に通信マスタ局が重複して存在するか否かを判定するマスタ重複判定処理を実行し、
リンク確立処理に先立って実行するマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行するように構成され、
更に、リンク確立処理に先立って実行されるマスタ重複判定処理が、リンク確立処理に先立って、通信スレーブ局が送信するフレームを受信したことに基づいてマスタ重複と判定するものである、
ことを特徴とする通信マスタ局の起動時制御方法。 A PLC device having a communication function and one or more I / O terminal devices having a communication function are connected by a bus network, and the PLC device having the communication function is used as a communication master station and has an I / O function. Each of the O terminal devices is a communication slave station. In an operating state, the communication slave station returns a response frame to the communication master station in response to transmission of a polling frame from the communication master station. A communication master station start-up control method applied to a PLC system configured to exchange various data between a station and each communication slave station,
After starting, in the process of going through the link establishment process and going to the operational state, execute the master duplication judgment process to judge whether there are duplicate communication master stations on the network prior to the link establishment process ,
Configured when the communication master station by the master plurality determination process performed in advance of the link establishment process is determined to be present in duplicate, without shifting to the link establishment process, the process proceeds to a predetermined master plurality avoidance process And
Furthermore, the master duplication determination process executed prior to the link establishment process is a master duplication determination based on the reception of the frame transmitted by the communication slave station prior to the link establishment process.
A communication master station start-up control method characterized by the above.
リンク確立処理と並行して実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行するように構成され、
更に、リンク確立処理と並行して実行されるマスタ重複判定処理が、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、いずれの通信スレーブ局からもレスポンスフレームの受信確認がとれないことに基づいてマスタ重複と判定するものである、ことを特徴とする請求項1に記載の通信マスタ局の起動時制御方法。 In addition to the master duplication determination process executed prior to the link establishment process, the master duplication judgment process is executed in parallel with the link establishment process,
When it is determined by the master duplication determination process that is executed in parallel with the link establishment process that the communication master station is duplicated, the process shifts to the predetermined master duplication avoidance process without shifting to the operation state. Configured,
Further, link master plurality determination process in parallel with the link establishment process Ru is executed, transmits a polling frame addressed to the respective connectable all communication slave station, stores the received presence or absence of a response frame from the communication slave station 2. The communication according to claim 1, wherein in the connection frame confirmation processing for establishment, master duplication is determined on the basis that no response frame reception confirmation can be obtained from any communication slave station. Master station startup control method.
リンク確立処理と並行して実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行するように構成され、
更に、リンク確立処理と並行して実行されるマスタ重複判定処理が、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定するものである、ことを特徴とする請求項1に記載の通信マスタ局の起動時制御方法。 In addition to the master duplication determination process executed prior to the link establishment process, the master duplication judgment process is executed in parallel with the link establishment process,
When it is determined by the master duplication determination process that is executed in parallel with the link establishment process that the communication master station is duplicated, the process shifts to the predetermined master duplication avoidance process without shifting to the operation state. Configured,
Further, link master plurality determination process in parallel with the link establishment process Ru is executed, transmits a polling frame addressed to the respective connectable all communication slave station, stores the received presence or absence of a response frame from the communication slave station 2. The communication master station start-up according to claim 1, wherein in the connection frame confirmation processing for establishment, it is determined that the master is duplicated based on reception of a frame transmitted only by the communication master station. Time control method.
リンク確立処理と並行して実行されるマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行するように構成され、
更に、リンク確立処理と並行して実行されるマスタ重複判定処理が、接続可能な全通信スレーブ局を少なくとも2つ以上のグループに分けて、各グループ毎にポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定するものであり、かつポーリングフレームの送信間隔を各グループ毎にランダムに変更する、ことを特徴とする請求項1に記載の通信マスタ局の起動時制御方法。 In addition to the master duplication determination process executed prior to the link establishment process, the master duplication judgment process is executed in parallel with the link establishment process,
When it is determined by the master duplication determination process that is executed in parallel with the link establishment process that the communication master station is duplicated, the process shifts to the predetermined master duplication avoidance process without shifting to the operation state. Configured,
Furthermore, the master plurality determination process in parallel with the link establishment process Ru is executed, all the communication slave stations connectable divided into at least two groups, transmits a polling frame for each group, from the communication slave station In connection frame confirmation processing for establishing a link for storing the presence / absence of reception of the response frame, it is determined that the master is duplicated based on the reception of the frame transmitted only by the communication master station, and the transmission interval of the polling frame The communication master station startup control method according to claim 1, wherein the communication master station is randomly changed for each group.
前記通信マスタ局には、
起動後、リンク確立処理を経て、運用状態へと移行する過程で、リンク確立処理に先立って実行されて、ネットワーク上に通信マスタ局が重複して存在するか否かを判定するマスタ重複判定手段と、
リンク確立処理に先立って実行されるマスタ重複判定手段によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行する第1のマスタ重複回避手段と、
が具備されており、
更に、リンク確立処理に先立って実行される第1のマスタ重複判定手段が、リンク確立処理に先立って、通信スレーブ局が送信するフレームを受信したことに基づいてマスタ重複と判定するものである、ことを特徴とするPLCシステム。 A PLC device having a communication function and one or more I / O terminal devices having a communication function are connected by a bus network, and the PLC device having the communication function is used as a communication master station and has an I / O function. Each of the O terminal devices is a communication slave station. In an operating state, the communication slave station returns a response frame to the communication master station in response to transmission of a polling frame from the communication master station. A PLC system that exchanges various data between a station and each communication slave station,
In the communication master station,
Master duplication determination means that is executed prior to link establishment processing in the process of transitioning to the operating state after starting link establishment processing, and determining whether or not there are duplicate communication master stations on the network. When,
When the master plurality determination means that will be performed prior to the link establishment process is determined and the communication master station is present in duplicate, without shifting to the link establishment process, the first to migrate to a predetermined master plurality avoidance process Master duplication avoidance means,
There has been provided,
Furthermore, the first master duplication determination means that is executed prior to the link establishment process determines master duplication based on the reception of the frame transmitted by the communication slave station prior to the link establishment process. A PLC system characterized by that.
リンク確立処理と並行して実行される第2のマスタ重複判定手段によって、通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行する第2のマスタ重複回避手段とを具備し、
更に、リンク確立処理と並行して実行される第2のマスタ重複判定手段が、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、いずれの通信スレーブ局からもレスポンスフレームの受信確認がとれないことに基づいてマスタ重複と判定するものである、ことを特徴とする請求項5に記載のPLCシステム。 A second master duplication determination unit that is executed in parallel with the link establishment process and determines whether or not there are duplicate communication master stations on the network;
When the second master duplication judgment unit executed in parallel with the link establishment process determines that there is a duplicate communication master station, the process proceeds to a predetermined master duplication avoidance process without shifting to the operation state. A second master duplication avoiding means for migrating;
Further, a second master plurality determination unit that runs in parallel with the link establishment process, transmits a polling frame addressed to the respective connectable all communication slave station, the reception whether a response frame from the communication slave station in connection frame confirmation process for storing link establishment, it is to determine the master plurality based on the fact that can not be obtained acknowledgment of the response frame from any communication slave station, it in claim 5, wherein The described PLC system .
リンク確立処理と並行して実行される第2のマスタ重複判定手段によって、通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行する第2のマスタ重複回避手段とを具備し、
更に、リンク確立処理と並行して実行される第2のマスタ重複判定手段が、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定するものである、ことを特徴とする請求項5に記載のPLCシステム。 Second master duplication determination means that is executed in parallel with the link establishment process and determines whether or not there are duplicate communication master stations on the network;
When the second master duplication judgment unit executed in parallel with the link establishment process determines that there is a duplicate communication master station, the process proceeds to a predetermined master duplication avoidance process without shifting to the operation state. A second master duplication avoiding means for migrating;
Further, a second master plurality determination unit that runs in parallel with the link establishment process, transmits a polling frame addressed to the respective connectable all communication slave station, the reception whether a response frame from the communication slave station 6. The PLC system according to claim 5 , wherein, in the connection frame confirmation processing for establishing the link to be stored, the master duplication is determined based on reception of a frame transmitted only by the communication master station. .
リンク確立処理と並行して実行される第2のマスタ重複判定手段によって、通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行する第2のマスタ重複回避手段とを具備し、
更に、リンク確立処理と並行して実行される第2のマスタ重複判定手段が、接続可能な全通信スレーブ局を少なくとも2つ以上のグループに分けて、各グループ毎にポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定するものであり、かつポーリングフレームの送信間隔を各グループ毎にランダムに変更する、ことを特徴とする請求項5に記載のPLCシステム。 Second master duplication determination means that is executed in parallel with the link establishment process and determines whether or not there are duplicate communication master stations on the network;
When the second master duplication judgment unit executed in parallel with the link establishment process determines that there is a duplicate communication master station, the process proceeds to a predetermined master duplication avoidance process without shifting to the operation state. A second master duplication avoiding means for migrating;
Further, a second master plurality determination means with the link establishment process Ru are executed in parallel is, the total communication slave stations connectable divided into at least two groups, transmits a polling frame for each group, the communication In connection frame confirmation processing for establishing a link that stores whether or not a response frame is received from a slave station, it is determined that the master is duplicated based on reception of a frame transmitted only by the communication master station, and a polling frame 6. The PLC system according to claim 5 , wherein the transmission interval is randomly changed for each group.
起動後、リンク確立処理を経て、運用状態へと移行する過程で、リンク確立処理に先立って実行されて、ネットワーク上に通信マスタ局が重複して存在するか否かを判定する第1のマスタ重複判定手段と、
リンク確立処理に先立って実行される第1のマスタ重複判定処理によって通信マスタ局が重複して存在すると判定されるときには、リンク確立処理へと移行することなく、所定のマスタ重複回避処理へと移行する第1のマスタ重複回避手段と、
が具備されており、
更に、リンク確立処理に先立って実行される第1のマスタ重複判定手段が、リンク確立処理に先立って、通信スレーブ局が送信するフレームを受信したことに基づいてマスタ重複と判定するものである、ことを特徴とするPLCシステムの通信マスタ局。 A PLC device having a communication function and one or more I / O terminal devices having a communication function are connected by a bus network, and the PLC device having the communication function is used as a communication master station and has an I / O function. Each of the O terminal devices is a communication slave station. In an operating state, the communication slave station returns a response frame to the communication master station in response to transmission of a polling frame from the communication master station. A communication master station applied to a PLC system that exchanges various data between a station and each communication slave station,
The first master that is executed prior to the link establishment process and determines whether or not there are duplicate communication master stations on the network in the process of transitioning to the operation state through the link establishment process after activation. Duplicate determination means;
When the first master plurality determination process that will be performed prior to the link establishment process is determined and the communication master station is present in duplicate, without shifting to the link establishment process, the transition to a predetermined master plurality avoidance process First master duplication avoiding means,
There has been provided,
Furthermore, the first master duplication determination means that is executed prior to the link establishment process determines master duplication based on the reception of the frame transmitted by the communication slave station prior to the link establishment process. A communication master station of a PLC system.
リンク確立処理と並行して実行される第2のマスタ重複判定手段によって、通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行する第2のマスタ重複回避手段とを具備し、
更に、リンク確立処理と並行して実行される第2のマスタ重複判定手段が、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、いずれの通信スレーブ局からもレスポンスフレームの受信確認がとれないことに基づいてマスタ重複と判定するものである、ことを特徴とする請求項9に記載のPLCシステムの通信マスタ局。 Second master duplication determination means that is executed in parallel with the link establishment process and determines whether or not there are duplicate communication master stations on the network;
When the second master duplication judgment unit executed in parallel with the link establishment process determines that there is a duplicate communication master station, the process proceeds to a predetermined master duplication avoidance process without shifting to the operation state. A second master duplication avoiding means for migrating;
Further, a second master plurality determination unit that runs in parallel with the link establishment process, transmits a polling frame addressed to the respective connectable all communication slave station, the reception whether a response frame from the communication slave station in connection frame confirmation process for storing link establishment, it is to determine the master plurality based on the fact that can not be obtained acknowledgment of the response frame from any communication slave station, it in claim 9, wherein The communication master station of the described PLC system .
リンク確立処理と並行して実行される第2のマスタ重複判定手段によって、通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行する第2のマスタ重複回避手段とを具備し、
更に、リンク確立処理と並行して実行される第2のマスタ重複判定手段が、接続可能な全通信スレーブ局のそれぞれに宛ててポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定するものである、ことを特徴とする請求項9に記載のPLCシステムの通信マスタ局。 Second master duplication determination means that is executed in parallel with the link establishment process and determines whether or not there are duplicate communication master stations on the network;
When the second master duplication judgment unit executed in parallel with the link establishment process determines that there is a duplicate communication master station, the process proceeds to a predetermined master duplication avoidance process without shifting to the operation state. A second master duplication avoiding means for migrating;
Further, a second master plurality determination unit that runs in parallel with the link establishment process, transmits a polling frame addressed to the respective connectable all communication slave station, the reception whether a response frame from the communication slave station 10. The PLC system according to claim 9 , wherein in the connection frame confirmation process for establishing the link to be stored, it is determined that the master is duplicated based on the reception of the frame transmitted only by the communication master station. Communication master station .
リンク確立処理と並行して実行される第2のマスタ重複判定手段によって、通信マスタ局が重複して存在すると判定されるときには、運用状態へと移行することなく、所定のマスタ重複回避処理へと移行する第2のマスタ重複回避手段とを具備し、
更に、リンク確立処理と並行して実行される第2のマスタ重複判定手段が、接続可能な全通信スレーブ局を少なくとも2つ以上のグループに分けて、各グループ毎にポーリングフレームを送信し、通信スレーブ局からのレスポンスフレームの受信有無を記憶するリンク確立のための接続フレーム確認処理において、通信マスタ局のみが送信するフレームを受信したことに基づいてマスタ重複と判定するものであり、かつポーリングフレームの送信間隔を各グループ毎にランダムに変更する、ことを特徴とする請求項9に記載のPLCシステムの通信マスタ局。 Second master duplication determination means that is executed in parallel with the link establishment process and determines whether or not there are duplicate communication master stations on the network;
When the second master duplication judgment unit executed in parallel with the link establishment process determines that there is a duplicate communication master station, the process proceeds to a predetermined master duplication avoidance process without shifting to the operation state. A second master duplication avoiding means for migrating;
Further, a second master plurality determination means with the link establishment process Ru are executed in parallel is, the total communication slave stations connectable divided into at least two groups, transmits a polling frame for each group, the communication In connection frame confirmation processing for establishing a link that stores whether or not a response frame is received from a slave station, it is determined that the master is duplicated based on reception of a frame transmitted only by the communication master station, and a polling frame The communication master station of the PLC system according to claim 9 , wherein the transmission interval is randomly changed for each group.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2006335235A JP4407838B2 (en) | 2005-06-09 | 2006-12-13 | Communication master station startup control method |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2005169243 | 2005-06-09 | ||
| JP2006335235A JP4407838B2 (en) | 2005-06-09 | 2006-12-13 | Communication master station startup control method |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006132469A Division JP3925660B2 (en) | 2005-06-09 | 2006-05-11 | Communication master station startup control method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2007128536A JP2007128536A (en) | 2007-05-24 |
| JP4407838B2 true JP4407838B2 (en) | 2010-02-03 |
Family
ID=38151072
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2006335235A Expired - Fee Related JP4407838B2 (en) | 2005-06-09 | 2006-12-13 | Communication master station startup control method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4407838B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5408445B2 (en) * | 2010-03-15 | 2014-02-05 | オムロン株式会社 | Programmable controller and master communication circuit |
| JP2025114890A (en) * | 2022-07-05 | 2025-08-06 | パナソニックIpマネジメント株式会社 | Controller, control method, and program |
-
2006
- 2006-12-13 JP JP2006335235A patent/JP4407838B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2007128536A (en) | 2007-05-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3925660B2 (en) | Communication master station startup control method | |
| CN101630298B (en) | Serial bus slave address setting system | |
| JP2001236103A (en) | Control system | |
| JP2014230097A (en) | Master-slave system and node control method thereof | |
| CN113039546A (en) | Master-slave equipment communication system and method | |
| JPH10154991A (en) | Control system using plc | |
| CN100459447C (en) | A method for realizing active-standby switchover of wiring connection equipment | |
| KR101179431B1 (en) | Network Management System based on a EhterCAT And Managing Method thereof | |
| JP4407838B2 (en) | Communication master station startup control method | |
| JPH1041964A (en) | Programmable controller network system | |
| JP4623291B2 (en) | Method for teaching network configuration information in PLC system | |
| CN102347878A (en) | Multi-point communication system, method and equipment | |
| JP2009223418A (en) | Duplexed controller | |
| JP4458279B2 (en) | Programmable controller system communication method | |
| JP4458278B2 (en) | Communication cycle control method | |
| JP2008009794A (en) | Programmable electronic control device and communication control method for programmable electronic device | |
| JP6762546B1 (en) | Serial communication method and serial communication system | |
| CN117527762B (en) | A self-identification method and system based on serial port MODBUS communication protocol | |
| JP4636257B2 (en) | Filtering repeat function | |
| JP4458281B2 (en) | Programmable controller system | |
| JP2006277733A (en) | Programmable controller system | |
| JP5042064B2 (en) | Crime prevention system | |
| JP5900621B2 (en) | System and system control method | |
| JP2010068210A (en) | Communication system | |
| JP2009199415A (en) | Communication converter for crime-prevention system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 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: 20091021 |
|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20091103 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4407838 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121120 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121120 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131120 Year of fee payment: 4 |
|
| LAPS | Cancellation because of no payment of annual fees |