JP2022083142A - Control device, communication control method, and control program - Google Patents
Control device, communication control method, and control program Download PDFInfo
- Publication number
- JP2022083142A JP2022083142A JP2020194427A JP2020194427A JP2022083142A JP 2022083142 A JP2022083142 A JP 2022083142A JP 2020194427 A JP2020194427 A JP 2020194427A JP 2020194427 A JP2020194427 A JP 2020194427A JP 2022083142 A JP2022083142 A JP 2022083142A
- Authority
- JP
- Japan
- Prior art keywords
- communication frame
- communication
- input data
- received
- threshold time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000004891 communication Methods 0.000 title claims abstract description 357
- 238000000034 method Methods 0.000 title claims description 76
- 238000012545 processing Methods 0.000 claims abstract description 70
- 230000008569 process Effects 0.000 claims description 56
- 230000005540 biological transmission Effects 0.000 claims description 33
- 238000004364 calculation method Methods 0.000 claims description 33
- 230000007246 mechanism Effects 0.000 abstract description 5
- 230000000087 stabilizing effect Effects 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 21
- 230000006870 function Effects 0.000 description 21
- 238000013461 design Methods 0.000 description 11
- 238000011161 development Methods 0.000 description 5
- 238000004088 simulation Methods 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 4
- 238000004904 shortening Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000010365 information processing Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 230000006641 stabilisation Effects 0.000 description 2
- 238000011105 stabilization Methods 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000012790 confirmation Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000012559 user support system Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/42—Loop networks
- H04L12/437—Ring fault isolation or reconfiguration
Abstract
Description
本発明は、ネットワークに接続可能な制御装置、その制御装置における通信制御方法、およびその制御装置を実現するための制御プログラムに関する。 The present invention relates to a control device that can be connected to a network, a communication control method in the control device, and a control program for realizing the control device.
例えば、EtherCAT(登録商標)に従うネットワークでは、通信マスタ(以下、単に「マスタ」とも称す。)が送信した通信フレームは、すべての通信スレーブ(以下、単に「スレーブ」とも称す。)を巡回した上で、マスタに戻る。 For example, in a network according to EtherCAT (registered trademark), a communication frame transmitted by a communication master (hereinafter, also simply referred to as “master”) circulates all communication slaves (hereinafter, also simply referred to as “slave”). Then, return to the master.
通信フレームを巡回させるためのトポロジとして、経路上に、通信フレームを受信および送信するポートを有するスレーブが存在する形態に加えて、経路上に存在するスレーブのポートは、通信フレームの受信および送信の一方のみを行う形態を採用し得る。説明の便宜上、前者を「非リング構成」と称し、後者を「リング構成」とも称す。リング構成においては、スレーブに接続されたケーブルの各々では通信フレームが一方向に伝送されることになる。なお、リング構成と非リング構成との両方を含む態様も存在し得る。 As a topology for patrolling a communication frame, in addition to the form in which a slave having a port for receiving and transmitting a communication frame exists on the path, the port of the slave existing on the path is used for receiving and transmitting the communication frame. It is possible to adopt a form in which only one is performed. For convenience of explanation, the former is referred to as a "non-ring configuration" and the latter is also referred to as a "ring configuration". In the ring configuration, the communication frame is transmitted in one direction on each of the cables connected to the slave. In addition, there may be an embodiment including both a ring configuration and a non-ring configuration.
このようなリング構成に関して、特開2020-167554号公報(特許文献1)は、リングトポロジを含むネットワークにおける不正な経路を容易に知ることが可能なマスタ装置を開示する。 Regarding such a ring configuration, Japanese Patent Application Laid-Open No. 2020-167554 (Patent Document 1) discloses a master device capable of easily knowing an illegal route in a network including a ring topology.
また、EtherCATに従うネットワークにおいては、マスタから送信された通信フレームが一巡してマスタに戻るまでに要する時間(以下、「ラウンドトリップ時間」とも称す。)を設計上考慮する必要がある。より具体的には、ラウンドトリップ時間が増大することによって、通信マスタと通信スレーブとの間でやり取りされるデータの更新周期が長くなり制御性能が低下し得る。 Further, in a network according to EtherCAT, it is necessary to consider in design the time required for the communication frame transmitted from the master to make a round and return to the master (hereinafter, also referred to as "round trip time"). More specifically, as the round trip time increases, the update cycle of the data exchanged between the communication master and the communication slave becomes long, and the control performance may deteriorate.
ラウンドトリップ時間は、通信スレーブの数が増加するにつれて大きくなるが、リング構成を採用することで、非リング構成を採用した場合よりラウンドトリップ時間の増大を抑制できる。 The round trip time increases as the number of communication slaves increases, but by adopting the ring configuration, it is possible to suppress the increase in the round trip time as compared with the case where the non-ring configuration is adopted.
リング構成は一種の冗長化ネットワークであり、ネットワーク内で何らかの障害が発生すると、非リング構成のネットワークが自動的に再構成されて、通信フレームの伝送は継続される。しかしながら、ネットワーク構成が変化することに伴って、ラウンドトリップ時間はより長くなる方向に変化し得る。 The ring configuration is a kind of redundant network, and if some failure occurs in the network, the non-ring configuration network is automatically reconfigured and the transmission of communication frames is continued. However, as the network configuration changes, the round trip time may change in the direction of becoming longer.
本発明のある局面の目的は、リング構成によって得られるラウンドトリップ時間の短縮化と、リング構成に何らかの障害が発生した場合の制御の安定化とを両立できる新たな仕組みを提供することである。 An object of an aspect of the present invention is to provide a new mechanism capable of both shortening the round trip time obtained by the ring configuration and stabilizing control when some kind of failure occurs in the ring configuration.
本発明のある実施の形態に従う制御装置は、通信フレームが一巡するように構成されたネットワークに接続される通信部と、通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算、および、当該制御演算により決定された出力データを含む通信フレームの送信を、実行周期毎に繰返し実行する演算処理部とを含む。演算処理部は、通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データに基づいて制御演算を実行する第1の動作モードと、通信フレームを送信してから第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データに基づいて制御演算を実行する第2の動作モードとを選択可能に構成されている。演算処理部は、第1の動作モードにおいて、第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新し、第2の動作モードにおいて、第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新する。 A control device according to an embodiment of the present invention includes a communication unit connected to a network configured to make a cycle of communication frames, and a control operation based on input data included in the communication frame received via the communication unit. It also includes an arithmetic processing unit that repeatedly executes transmission of a communication frame including output data determined by the control operation every execution cycle. If the arithmetic processing unit does not receive the transmitted communication frame by the first threshold time after transmitting the communication frame, it is a backup data included in the communication frame received before the transmission. The transmitted communication frame must be received by the first operation mode in which the control operation is executed based on the input data and the second threshold time shorter than the first threshold time after the communication frame is transmitted. The second operation mode for executing the control operation based on the preliminary input data which is the input data included in the communication frame received before the transmission can be selected. If the arithmetic processing unit receives the transmitted communication frame by the first threshold time in the first operation mode, the arithmetic processing unit updates the preliminary input data with the input data included in the received communication frame, and the second If the transmitted communication frame is received by the third threshold time longer than the second threshold time in the operation mode of, the preliminary input data is updated with the input data included in the received communication frame.
この構成によれば、第1の動作モードにおいては、第1のしきい時間までに送信した通信フレームを受信できるか否かに基づいて、制御演算に用いる入力データの決定、および、予備入力データの更新を判断する。一方、第2の動作モードにおいては、第2のしきい時間までに送信した通信フレームを受信できるか否かに基づいて、制御演算に用いる入力データを決定するものの、予備入力データの更新については、第2のしきい時間より長い第3のしきい時間までに受信された通信フレームを対象にして行うことができる。このため、第2の動作モードにおいては、第1の動作モードに比較して、通信フレームを送信してから制御演算の実行を開始するまでの時間を短く設定しても、第3のしきい時間までに通信フレームを受信できれば、予備入力データを適切に更新できる。そのため、制御の安定化を図ることができる。 According to this configuration, in the first operation mode, the input data to be used for the control calculation is determined and the preliminary input data is determined based on whether or not the communication frame transmitted by the first threshold time can be received. Judge the update of. On the other hand, in the second operation mode, the input data used for the control calculation is determined based on whether or not the communication frame transmitted by the second threshold time can be received, but the update of the preliminary input data is performed. , Communication frames received by the third threshold time, which is longer than the second threshold time, can be targeted. Therefore, in the second operation mode, even if the time from the transmission of the communication frame to the start of the execution of the control operation is set shorter than that in the first operation mode, the third threshold is set. If the communication frame can be received by the time, the preliminary input data can be updated appropriately. Therefore, it is possible to stabilize the control.
ネットワークは、通信スレーブに接続されたケーブルの各々において、通信フレームが一方向にのみ伝送されるように構成されたリング構成を含んでいてもよい。演算処理部は、ネットワークがリング構成を含む場合に、第2の動作モードを有効化可能になっていてもよい。これらの構成によれば、リング構成に適した動作モードを提供できる。なお、ネットワークは、デイジーチェーン接続された構成を含んでいてもよい。 The network may include a ring configuration configured such that the communication frame is transmitted in only one direction on each of the cables connected to the communication slave. The arithmetic processing unit may be able to enable the second operation mode when the network includes a ring configuration. According to these configurations, it is possible to provide an operation mode suitable for the ring configuration. The network may include a daisy-chained configuration.
第2のしきい時間は、リング構成において、通信部から送信された通信フレームが一巡して通信部に戻るまでの時間に基づいて決定されてもよい。第3のしきい時間は、リング構成に含まれるいずれかのケーブルが通信フレームを伝送できない状態で、通信部から送信された通信フレームが一巡して通信部に戻るまでの時間に基づいて決定されてもよい。この構成によれば、ネットワーク構成の変化を予測して、適切なしきい時間を決定できる。 In the ring configuration, the second threshold time may be determined based on the time required for the communication frame transmitted from the communication unit to make a round and return to the communication unit. The third threshold time is determined based on the time required for the communication frame transmitted from the communication unit to make a round and return to the communication unit when any of the cables included in the ring configuration cannot transmit the communication frame. You may. According to this configuration, it is possible to predict changes in the network configuration and determine an appropriate threshold time.
リング構成は、通信部および複数の通信スレーブに接続された中継装置を含んでいてもよい。この構成によれば、ジャンクション冗長性(Junction Redundancy)を有するリング構成を実現できる。 The ring configuration may include a communication unit and a relay device connected to a plurality of communication slaves. According to this configuration, a ring configuration having Junction Redundancy can be realized.
通信部は、それぞれ異なる通信スレーブに接続された複数のポートを有していてもよい。この構成によれば、ケーブル冗長性(Cable Redundancy)を有するリング構成を実現できる。 The communication unit may have a plurality of ports connected to different communication slaves. According to this configuration, a ring configuration having cable redundancy can be realized.
第2の動作モードにおける実行周期は、第1の動作モードにおける実行周期より短く設定されてもよい。この構成によれば、制御演算の実行周期の短縮化、および/または、実行可能な演算量の増大化を実現できる。 The execution cycle in the second operation mode may be set shorter than the execution cycle in the first operation mode. According to this configuration, it is possible to shorten the execution cycle of control operations and / or increase the amount of operations that can be executed.
演算処理部で実行されるユーザプログラムに含まれる命令により演算処理部の動作モードを参照できるように構成されてもよい。この構成によれば、演算処理部における動作モードに応じて、容易に処理を異ならせることができる。 It may be configured so that the operation mode of the arithmetic processing unit can be referred to by an instruction included in the user program executed by the arithmetic processing unit. According to this configuration, the processing can be easily different depending on the operation mode in the arithmetic processing unit.
本発明の別の実施の形態によれば、通信フレームが一巡するように構成されたネットワークに接続される通信部を含む制御装置で実行される通信制御方法が提供される。通信制御方法は、第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップと、通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップと、制御演算により決定された出力データを含む通信フレームを送信するステップとを含む。入力処理を実行するステップは、第1の動作モードにおいて、通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いるステップと、第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新するステップとを含む。入力処理を実行するステップは、第2の動作モードにおいて、通信フレームを送信してから第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いるステップと、第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新するステップとを含む。 According to another embodiment of the present invention, there is provided a communication control method executed by a control device including a communication unit connected to a network configured to make a cycle of communication frames. The communication control method is a step of executing input processing according to the operation mode selected from the first operation mode and the second operation mode, and control based on the input data included in the communication frame received via the communication unit. It includes a step of executing an operation and a step of transmitting a communication frame containing output data determined by a control operation. In the step of executing the input process, in the first operation mode, if the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the communication frame received before the transmission is received. If the transmitted communication frame is received by the step of using the preliminary input data, which is the input data included in the above, for the control calculation and the first threshold time, the input data included in the received communication frame is used as a backup. Includes steps to update the input data. In the second operation mode, the step of executing the input process is such that if the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the transmitted communication frame is not received. The step of using the preliminary input data, which is the input data included in the communication frame received before the transmission, for the control calculation, and the transmitted communication frame by the third threshold time longer than the second threshold time. If received, it includes a step of updating the preliminary input data with the input data included in the received communication frame.
本発明のさらに別の実施の形態によれば、通信フレームが一巡するように構成されたネットワークに接続される通信部を含むコンピュータで実行される制御プログラムが提供される。制御プログラムはコンピュータに、第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップと、通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップと、制御演算により決定された出力データを含む通信フレームを送信するステップとを実行させる。入力処理を実行するステップは、第1の動作モードにおいて、通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いるステップと、第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新するステップとを含む。入力処理を実行するステップは、第2の動作モードにおいて、通信フレームを送信してから第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いるステップと、第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データを更新するステップとを含む。 According to still another embodiment of the present invention, there is provided a control program executed by a computer including a communication unit connected to a network configured to make a cycle of communication frames. The control program is based on a step of executing input processing to the computer according to the operation mode selected from the first operation mode and the second operation mode, and input data included in the communication frame received through the communication unit. The step of executing the control operation and the step of transmitting the communication frame including the output data determined by the control operation are executed. In the step of executing the input process, in the first operation mode, if the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the communication frame received before the transmission is received. If the transmitted communication frame is received by the step of using the preliminary input data, which is the input data included in the above, for the control calculation and the first threshold time, the input data included in the received communication frame is used as a backup. Includes steps to update the input data. In the second operation mode, the step of executing the input process is such that if the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the transmitted communication frame is not received. The step of using the preliminary input data, which is the input data included in the communication frame received before the transmission, for the control calculation, and the transmitted communication frame by the third threshold time longer than the second threshold time. If received, it includes a step of updating the preliminary input data with the input data included in the received communication frame.
本発明のある実施の形態によれば、リング構成によって得られるラウンドトリップ時間の短縮化と、リング構成に何らかの障害が発生した場合の制御の安定化とを両立できる。 According to an embodiment of the present invention, it is possible to achieve both a reduction in the round trip time obtained by the ring configuration and a stabilization of control when some kind of failure occurs in the ring configuration.
本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。 Embodiments of the present invention will be described in detail with reference to the drawings. The same or corresponding parts in the drawings are designated by the same reference numerals and the description thereof will not be repeated.
<A.適用例>
まず、図1~図3を参照して、本発明が適用される場面の一例について説明する。
<A. Application example>
First, an example of a situation in which the present invention is applied will be described with reference to FIGS. 1 to 3.
図1は、本実施の形態に従う制御システムの一例を示す模式図である。図1(A)~図1(C)に示す制御システム1は、通信マスタ(マスタ)として機能する制御装置の一例であるPLC100と、通信スレーブ(スレーブ)として機能する入出力装置などのデバイス200-1~200-5(以下、「デバイス200」とも総称する。)および中継装置300とを含む。
FIG. 1 is a schematic diagram showing an example of a control system according to the present embodiment. The
本明細書における「リング構成」は、スレーブに接続されたケーブルの各々において、通信フレームが一方向にのみ伝送されるように構成されたネットワークを意味する。言い換えれば、スレーブの各々は、複数のポートを有しており、1つのポートは、通信フレームの送信および受信の一方のみを行う構成が「リング構成」を意味する。 As used herein, "ring configuration" means a network configured such that communication frames are transmitted in only one direction on each of the cables connected to the slave. In other words, each of the slaves has a plurality of ports, and one port means a "ring configuration" in which only one of transmission and reception of a communication frame is performed.
一方、本明細書における「非リング構成」は、スレーブに接続されたいずれかのケーブルにおいて、通信フレームが両方向に伝送されるように構成されたネットワークを意味する。言い換えれば、スレーブの有するいずれかのポートが、通信フレームの送信および受信の両方を行う構成が「非リング構成」を意味する。 On the other hand, the "non-ring configuration" in the present specification means a network configured so that a communication frame is transmitted in both directions in any cable connected to a slave. In other words, a configuration in which one of the ports of the slave performs both transmission and reception of communication frames means a "non-ring configuration".
制御システム1のネットワークに関して、PLC100は、通信フレームの送受信を行うためのポート151を有している。デバイス200-1~200-5の各々は、通信フレームを送受信するための第1ポート251および第2ポート252を有している。基本的には、第1ポート251は、通信フレームが入力されるポート(INポート)であり、第2ポート252は、通信フレームが出力されるポート(OUTポート)である。
With respect to the network of the
中継装置300は、通信フレームを送受信するための第1ポート351、第2ポート352および第3ポート353を有している。中継装置300は、あるポートで通信フレームを受けると、所定規則に従って決定される別のポートから、当該受信したフレームを送信する。図1に示す例では、所定規則として、第1ポート351→第2ポート352→第3ポート353→第1ポート351→・・・といった循環的に決定されてもよい。
The
図1(A)には、リング構成の一例を示している。PLC100のポート151から送信された通信フレームは、ケーブル20、中継装置300の第1ポート351、中継装置300の第2ポート352、ケーブル21、デバイス200-1の第1ポート251、デバイス200-1の第2ポート252、ケーブル22、デバイス200-2の第1ポート251、デバイス200-2の第2ポート252、ケーブル23、デバイス200-3の第1ポート251、デバイス200-3の第2ポート252、ケーブル24、デバイス200-4の第1ポート251、デバイス200-4の第2ポート252、ケーブル25、デバイス200-5の第1ポート251、デバイス200-5の第2ポート252、ケーブル26、中継装置300の第3ポート353、ケーブル20の順で一巡して、PLC100のポート151に戻る。この場合、PLC100のポート151から送信された通信フレームのポートの通過数は14となる。
FIG. 1A shows an example of a ring configuration. The communication frame transmitted from the
一方、図1(B)には、デバイス200-3とデバイス200-4とを接続するケーブル24が何らかの原因で断線した場合を示す。この場合、デバイス200-3の第2ポート252から通信フレームを送信することができないので、デバイス200-3は、第1ポート251から通信フレームを送信する。すなわち、デバイス200-3は、通信フレームを同じ経路で戻すことになる。その後、通信フレームは、ケーブル23、デバイス200-2の第2ポート252、デバイス200-2の第1ポート251、ケーブル22、デバイス200-1の第2ポート252、デバイス200-1の第1ポート251、中継装置300の第2ポート352、中継装置300の第3ポート353、ケーブル26、デバイス200-5の第2ポート252、デバイス200-5の第1ポート251、ケーブル25、デバイス200-4の第2ポート252、ケーブル25、デバイス200-5の第1ポート251、デバイス200-5の第2ポート252、ケーブル26、中継装置300の第3ポート353、ケーブル20の順でPLC100のポート151に戻る。この場合、PLC100のポート151から送信された通信フレームのポートの通過数は22となる。
On the other hand, FIG. 1B shows a case where the
図1(C)には、非リング構成の一例を示している。PLC100のポート151から送信された通信フレームは、ケーブル20、中継装置300の第1ポート351、中継装置300の第2ポート352、ケーブル21、デバイス200-1の第1ポート251、デバイス200-1の第2ポート252、ケーブル22、デバイス200-2の第1ポート251、デバイス200-2の第2ポート252、ケーブル23、デバイス200-3の第1ポート251、デバイス200-3の第2ポート252、ケーブル24、デバイス200-4の第1ポート251、ケーブル24、デバイス200-3の第2ポート252、デバイス200-3の第1ポート251、ケーブル23、デバイス200-2の第2ポート252、デバイス200-2の第1ポート251、ケーブル22、デバイス200-1の第2ポート252、デバイス200-1の第1ポート251、ケーブル21、中継装置300の第2ポート352、中継装置300の第1ポート351、ケーブル20の順で一巡して、PLC100のポート151に戻る。この場合、PLC100のポート151から送信された通信フレームのポートの通過数は22となる。
FIG. 1C shows an example of a non-ring configuration. The communication frame transmitted from the
ラウンドトリップ時間は、ポートの通過時間と、ケーブルの通過時間との合計で定まることになるが、ポートの通過時間が支配的な要因になる。そのため、通信フレームが通過するポートの数が増加するほど、ラウンドトリップ時間は増大する。図1(A)に示すリング構成におけるラウンドトリップ時間Tr1に比較して、図1(B)に示す構成におけるラウンドトリップ時間Tr2(Tr2>Tr1)は長くなる。通過ポート数が同一であるので、図1(B)に示す構成におけるラウンドトリップ時間Tr2は、図1(C)に示す構成におけるラウンドトリップ時間Tr3とほぼ同じになる(Tr2≒Tr3)。 The round trip time is determined by the sum of the port transit time and the cable transit time, but the port transit time is the dominant factor. Therefore, as the number of ports through which the communication frame passes increases, the round trip time increases. The round trip time Tr2 (Tr2> Tr1) in the configuration shown in FIG. 1B is longer than the round trip time Tr1 in the ring configuration shown in FIG. 1 (A). Since the number of passing ports is the same, the round trip time Tr2 in the configuration shown in FIG. 1 (B) is substantially the same as the round trip time Tr3 in the configuration shown in FIG. 1 (C) (Tr2≈Tr3).
すなわち、リング構成におけるラウンドトリップ時間を前提にして、システム設計を行うと、リング構成に何らかの障害が発生して非リング構成に変化すると、ラウンドトリップ時間が伸びて、システムが設計通りに動作しない可能性もある。 That is, if the system is designed on the premise of the round trip time in the ring configuration, if some failure occurs in the ring configuration and the system changes to the non-ring configuration, the round trip time may be extended and the system may not operate as designed. There is also sex.
そこで、本実施の形態に従う制御システムは、リング構成が非リング構成に変化した場合であっても、制御性能への影響を抑制できる仕組みを提供する。なお、本実施の形態に従う制御システムが提供する通信制御方法は、リング構成が非リング構成に変化した場合のみに適用されるものではなく、様々なネットワーク構成に対して適用可能である。 Therefore, the control system according to the present embodiment provides a mechanism capable of suppressing the influence on the control performance even when the ring configuration is changed to the non-ring configuration. The communication control method provided by the control system according to the present embodiment is not applied only when the ring configuration is changed to the non-ring configuration, but can be applied to various network configurations.
先に、システム設計について説明する。図2は、本実施の形態に従う制御システム1のPLC100での処理の一例を示す模式図である。
First, the system design will be described. FIG. 2 is a schematic diagram showing an example of processing in PLC100 of the
図2(A)~図2(C)を参照して、PLC100は、制御演算160と、出力処理162と、入力処理164とからなる一連の処理を周期的に実行する。以下では、一連の処理が実行される周期を「タスク実行周期」とも称す。
With reference to FIGS. 2 (A) to 2 (C), the
入力処理164は、デバイス200から測定値などの入力データを収集する処理である。制御演算160は、入力処理164により収集された入力データに基づいて、制御対象を制御するための演算を行って、デバイス200への指令値などの出力データを決定する。出力処理162は、制御演算160により決定された出力データを対象のデバイス200へ送信する処理である。このように、PLC100の演算処理部(図5に示すプロセッサ102)は、フィールドネットワークコントローラ112を介して受信した通信フレームに含まれる入力データに基づく制御演算160、および、制御演算160により決定された出力データを含む通信フレームの送信を、タスク実行周期毎に繰返し実行する。
The
出力処理162および入力処理164は、通信フレームを用いて実現される。そのため、出力処理162の終了から入力処理164の開始までの時間は、PLC100が通信フレームを送信してから当該通信フレームが戻ってくるまでの時間、すなわちラウンドトリップ時間に依存することになる。
The
図2(A)~図2(C)においては、非リング構成を前提とする。図2(A)には、PLC100に接続されるデバイス200の数、および、制御演算160の演算量がいずれも相対的に少ない場合のタイムチャートを示す。図2(B)には、図2(A)に比較して、PLC100に接続されるデバイス200の数が増加した場合のタイムチャートを示す。
In FIGS. 2A to 2C, a non-ring configuration is assumed. FIG. 2A shows a time chart when the number of
図2(A)と図2(B)とを比較すると、接続されるデバイス200の数が増加することで、出力処理162の終了から入力処理164の開始までの時間、すなわち通信時間Tt1(図2(A)参照)は、通信時間Tt2(図2(B)参照)まで増加していることが分かる。これは、入出力の応答性能の低下を意味する。但し、制御演算160の演算量が相対的に少ないので、タスク実行周期Tc1は、いずれの場合においても維持されている。
Comparing FIG. 2A and FIG. 2B, as the number of
図2(C)には、図2(B)に比較して、制御演算160の演算量が増加した場合のタイムチャートを示す。図2(C)においては、演算量の増加に伴って、制御演算160の処理時間が増加するため、タスク実行周期Tc1より長いタスク実行周期Tc2が必要になっている。すなわち、接続されるデバイス200の数、および、制御演算160の演算量が増大することに伴って、タスク実行周期はΔTcだけ伸びることになる。
FIG. 2C shows a time chart when the amount of operation of the
したがって、通信時間を可能な限り短くすることが好ましい。ここで、非リング構成ではなく、リング構成を採用することで、ポートの通過数を低減できるので、ラウンドトリップ時間、すなわち通信時間を短縮できる。 Therefore, it is preferable to shorten the communication time as much as possible. Here, by adopting a ring configuration instead of a non-ring configuration, the number of passages through the ports can be reduced, so that the round trip time, that is, the communication time can be shortened.
図3は、本実施の形態に従う制御システム1のPLC100での処理の別の一例を示す模式図である。図3(A)には、図2(B)と同様に、非リング構成を採用した場合のタイムチャートを示し、図3(B)には、リング構成を採用した場合のタイムチャートを示す。
FIG. 3 is a schematic diagram showing another example of the processing of the
図3(A)と図3(B)とを比較すると、通信時間Tt2が通信時間Tt3(<通信時間Tt2)まで短縮されており、タスク実行周期Tc1を同一に設定すると、その短縮された通信時間の分が余裕時間166となり、制御演算160としてより多くの演算を実行できる。
Comparing FIG. 3A and FIG. 3B, the communication time Tt2 is shortened to the communication time Tt3 (<communication time Tt2), and when the task execution cycle Tc1 is set to be the same, the shortened communication is performed. The minute of time becomes the
このように、リング構成を採用することで、通信時間を短縮でき、これによって、タスク実行周期の短縮化およびより多くの制御演算の実行といった、制御性能を高めることができる。しかしながら、断線などの障害がネットワークに発生すると、リング構成から非リング構成に変化し、通信時間は長くなる。 As described above, by adopting the ring configuration, the communication time can be shortened, and thereby the control performance such as shortening the task execution cycle and executing more control operations can be improved. However, when a failure such as disconnection occurs in the network, the ring configuration changes to the non-ring configuration, and the communication time becomes long.
図4は、本実施の形態に従う制御システム1のPLC100での処理のさらに別の一例を示す模式図である。図4(A)には、図3(B)と同様に、リング構成を採用した場合のタイムチャートを示し、図4(B)には、リング構成が非リング構成に変化した場合のタイムチャートを示す。
FIG. 4 is a schematic diagram showing still another example of the processing of the
図4(A)に示すように、リング構成を採用することで、通信時間Tt3を短縮でき、制御演算160の演算量が相対的に多くても、制御演算160と、出力処理162と、入力処理164とからなる一連の処理をタスク実行周期Tc1で周期的に実行できる。
As shown in FIG. 4A, by adopting the ring configuration, the communication time Tt3 can be shortened, and even if the calculation amount of the
一方で、リング構成に断線などの障害が発生すると、非リング構成に変化し、図4(B)に示すように、通信時間Tt4(>通信時間Tt3)は伸びることになる。その結果、制御演算160と、出力処理162と、入力処理164とからなる一連の処理をタスク実行周期Tc1で周期的に実行できなくなる(この状態は、「タスク実行周期オーバ」などとも称される。)。
On the other hand, when a failure such as disconnection occurs in the ring configuration, the ring configuration changes to a non-ring configuration, and as shown in FIG. 4B, the communication time Tt4 (> communication time Tt3) is extended. As a result, a series of processes including the
このような通信時間が増加する事態を考慮して、非リング構成における通信時間を前提として、図4(C)に示すように、システム設計を行う場合もある。すなわち、図4(C)に示すタイムチャートでは、ある程度の時間余裕を見て、タスク実行周期Tc3が設定されている。但し、図4(C)に示すシステム設計では、ロバストではあるが、リング構成を採用したことによるラウンドトリップ時間の短縮のメリットは活かせていないことになる。 In consideration of such a situation where the communication time increases, the system may be designed as shown in FIG. 4C on the premise of the communication time in the non-ring configuration. That is, in the time chart shown in FIG. 4C, the task execution cycle Tc3 is set with a certain time margin. However, in the system design shown in FIG. 4C, although it is robust, the merit of shortening the round trip time by adopting the ring configuration cannot be utilized.
このような背景技術を考慮して、本実施の形態に従う制御システムにおいては、以下のいずれの設計手法をも採用できる新たな仕組みを提供する。 In consideration of such background techniques, a new mechanism that can adopt any of the following design methods is provided in the control system according to the present embodiment.
(1)図1(C)および図4(C)に示すような非リング構成におけるラウンドトリップ時間を前提としたシステム設計。 (1) A system design assuming a round trip time in a non-ring configuration as shown in FIGS. 1 (C) and 4 (C).
(2)図1(A)および図4(B)に示すようなリング構成におけるラウンドトリップ時間を前提としたタスク実行周期を設定しつつ、図1(B)および図4(C)に示すような非リング構成に変化した場合でも、制御性能への影響を抑制するためのモードを有効化したシステム設計。 (2) As shown in FIGS. 1 (B) and 4 (C), while setting the task execution cycle assuming the round trip time in the ring configuration as shown in FIGS. 1 (A) and 4 (B). A system design that enables a mode to suppress the effect on control performance even when the configuration changes to a non-ring configuration.
以下、このような仕組みを実現するための構成、処理、機能などについて詳述する。
<B.ハードウェア構成例>
次に、本実施の形態に従う制御システム1を構成する各装置のハードウェア構成例について説明する。
Hereinafter, the configuration, processing, functions, etc. for realizing such a mechanism will be described in detail.
<B. Hardware configuration example>
Next, a hardware configuration example of each device constituting the
(b1:制御装置(PLC100))
図5は、本実施の形態に従う制御システム1のPLC100のハードウェア構成例を示す模式図である。図5を参照して、PLC100は、主たるハードウェアコンポーネントとして、プロセッサ102と、メインメモリ104と、ストレージ110と、フィールドネットワークコントローラ112と、ローカルバスコントローラ114とを含む。これらのハードウェアコンポーネントは、内部バス118を介して電気的に接続される。
(B1: Control device (PLC100))
FIG. 5 is a schematic diagram showing a hardware configuration example of the PLC100 of the
プロセッサ102は、制御演算を実行する演算処理部に相当し、CPU(Central Processing Unit)やGPU(Graphics Processing Unit)などで構成される。具体的には、プロセッサ102は、ストレージ110に格納されたプログラムを読出して、メインメモリ104に展開して実行することで、制御対象に応じた制御演算、および、後述するような各種処理を実現する。
The
メインメモリ104は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性記憶装置などで構成される。ストレージ110は、例えば、SSD(Solid State Drive)やHDD(Hard Disk Drive)などの不揮発性記憶装置などで構成される。
The
ストレージ110には、基本的な機能を実現するためのシステムプログラム1102、制御対象に応じて作成されたユーザプログラム1104、および、後述するような処理を決定するためのシステム設定情報1106などが格納される。システムプログラム1102は、PLC100における基本的な機能を実現するため、制御プログラムの少なくとも一部とみなすことができる。
The storage 110 stores a
フィールドネットワークコントローラ112は、通信部に相当し、通信フレームが一巡するように構成されたネットワークに接続される。より具体的には、フィールドネットワークコントローラ112は、ポート151を有しており、通信フレームの送受信処理を担当する。PLC100のフィールドネットワークコントローラ112は、通信マスタ(マスタ)として機能する。なお、フィールドネットワークコントローラ112は、通信フレームを周期的に送受信するための同期カウンタを有していてもよい。
The
ローカルバスコントローラ114は、内部バス118を介して、1または複数の機能ユニット116と電気的に接続される。機能ユニット116は、制御対象との間で各種の信号をやり取りする機能などを含む。機能ユニット116は、例えば、制御対象からのデジタル信号を受取るDI(Digital Input)機能、制御対象に対してデジタル信号を出力するDO(Digital Output)機能、制御対象からのアナログ信号を受取るAI(Analog Input)機能、制御対象に対してアナログ信号を出力するAO(Analog Output)機能のうち1または複数の機能を有している。さらに、機能ユニット116としては、PID(Proportional Integral Derivative)制御やモーション制御といった特殊機能を実装したコントローラを含み得る。
The
図5には、プロセッサ102がプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(例えば、ASIC(Application Specific Integrated Circuit)またはFPGA(Field-Programmable Gate Array)など)を用いて実装してもよい。あるいは、PLC100の主要部を、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
FIG. 5 shows a configuration example in which the necessary functions are provided by the
さらに、PLC100に表示装置やサポート装置などの機能を統合した構成を採用してもよい。
Further, a configuration in which functions such as a display device and a support device are integrated into the
(b2:デバイス200)
図6は、本実施の形態に従う制御システム1のデバイス200のハードウェア構成例を示す模式図である。図6を参照して、デバイス200は、主たるハードウェアコンポーネントとして、制御回路206と、フィールドネットワークコントローラ212と、機能モジュール220とを含む。
(B2: Device 200)
FIG. 6 is a schematic diagram showing a hardware configuration example of the
制御回路206は、デバイス200における処理を主体的に実行する演算処理部である。制御回路206は、典型的には、プロセッサ202と、メインメモリ204と、ストレージ210とを含む。プロセッサ202は、CPUやGPUなどで構成される。メインメモリ204は、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ210は、例えば、SSDなどの不揮発性記憶装置などで構成される。なお、ストレージ210として、ROM(Read Only Memory)を採用してもよい。
The
なお、制御回路206は、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
The
フィールドネットワークコントローラ212は、第1ポート251および第2ポート252を有しており、通信フレームの送受信処理を担当する。デバイス200のフィールドネットワークコントローラ212は、通信スレーブ(スレーブ)として機能する。なお、フィールドネットワークコントローラ212は、通信フレームを周期的に送受信するための同期カウンタを有していてもよい。
The
機能モジュール220は、図5に示す機能ユニット116と同様に、制御対象との間で各種の信号をやり取りする処理などを担当する。
Similar to the
(b3:中継装置300)
図7は、本実施の形態に従う制御システム1の中継装置300のハードウェア構成例を示す模式図である。図7を参照して、中継装置300は、主たるハードウェアコンポーネントとして、制御回路306と、フィールドネットワークインターフェイス312とを含む。
(B3: Relay device 300)
FIG. 7 is a schematic diagram showing a hardware configuration example of the
制御回路306は、中継装置300における通信フレームの転送処理を主体的に実行する演算処理部である。制御回路306は、典型的には、プロセッサ302と、メインメモリ304と、ストレージ310とを含む。プロセッサ302は、CPUやGPUなどで構成される。メインメモリ304は、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ310は、例えば、SSDなどの不揮発性記憶装置などで構成される。なお、ストレージ310として、ROMを採用してもよい。
The
なお、制御回路306は、専用のハードウェア回路(例えば、ASICまたはFPGAなど)を用いて実装してもよい。
The
フィールドネットワークインターフェイス312は、第1ポート351、第2ポート352および第3ポート353を有しており、通信フレームの図示しない受信回路および送信回路を含む。
The
<C.通信フレームの送受信処理>
上述したように、リング構成を採用した場合には、断線などの障害により非リング構成に変化し、その結果、ラウンドトリップ時間が伸びる場合がある。また、ネットワークを伝送する通信フレームが破損や消滅することもある。そのため、マスタであるPLC100は、ある通信フレームを送信してから、所定時間内に当該通信フレームが戻ってこなければ、通信フレームが途中で破損や消滅した(以下、「フレームロスト」とも称す。)と判断する。
<C. Communication frame transmission / reception processing>
As described above, when the ring configuration is adopted, the non-ring configuration may be changed due to an obstacle such as disconnection, and as a result, the round trip time may be extended. In addition, the communication frame that transmits the network may be damaged or disappear. Therefore, the PLC100, which is the master, does not return the communication frame within a predetermined time after transmitting a certain communication frame, the communication frame is damaged or disappears in the middle (hereinafter, also referred to as "frame lost"). Judge.
したがって、非リング構成を採用している場合には、マスタから送信された通信フレームの挙動としては、(1)通信フレームが所定時間内にマスタに戻る、(2)通信フレームがロストしてマスタへ戻らない、の2種類が想定される。 Therefore, when the non-ring configuration is adopted, the behavior of the communication frame transmitted from the master is as follows: (1) the communication frame returns to the master within a predetermined time, and (2) the communication frame is lost and the master. Two types are assumed, one that does not return to.
一方、リング構成を採用している場合には、マスタから送信された通信フレームの挙動としては、(1)通信フレームが所定時間内にマスタに戻る、(2)非リング構成に変化して、通信フレームが所定時間を超えてマスタに戻る、(3)通信フレームがロストしてマスタへ戻らない、の3種類が想定される。 On the other hand, when the ring configuration is adopted, the behavior of the communication frame transmitted from the master is as follows: (1) the communication frame returns to the master within a predetermined time, and (2) the communication frame changes to a non-ring configuration. Three types are assumed: the communication frame returns to the master after a predetermined time, and (3) the communication frame is lost and does not return to the master.
図8は、本実施の形態に従う制御システム1における通信時間に関する処理を説明するための図である。図8(A)には非リング構成の例を示し、図8(B)にはリング構成の例を示す。
FIG. 8 is a diagram for explaining a process related to communication time in the
図8(A)を参照して、非リング構成を前提としたシステム設計を採用した場合には、リング構成が正常であるか否かにかかわらず、出力処理162の終了から入力処理164の開始までの時間は相対的に長く設定されている。
When a system design premised on a non-ring configuration is adopted with reference to FIG. 8A, the
図8(B)を参照して、正常なリング構成においては、出力処理162の終了直後にPLC100から送信された通信フレームは、入力処理164の開始までにPLC100に戻る(図8(B)の「正常」)。一方、リング構成に何らかの障害が発生して非リング構成に変化すると、ラウンドトリップ時間が増大し、通信フレームは、入力処理164の開始までにPLC100に戻ることができない(図8(B)の「遅延」)。
With reference to FIG. 8B, in a normal ring configuration, the communication frame transmitted from the PLC100 immediately after the end of the
また、通信フレームが途中で破損や消滅すると、通信フレームは、PLC100に戻ってこないことになる(図8(B)の「フレームロスト」)。なお、図8(B)の「遅延」より遅れて通信フレームが戻ってきた場合も、フレームロストと同様の取り扱いとしてもよい。 Further, if the communication frame is damaged or disappears in the middle, the communication frame does not return to the PLC 100 (“frame lost” in FIG. 8 (B)). Even if the communication frame returns later than the "delay" in FIG. 8B, it may be handled in the same manner as the frame lost.
このように、図8(A)に示す例では、図8(B)の「遅延」といった概念は存在せず、出力処理162の終了直後にPLC100から送信された通信フレームが入力処理164の開始までにPLC100に戻ってくる場合(図8(A)の「正常」)と、それ以外の場合(図8(A)の「フレームロスト」)とが存在することになる。
As described above, in the example shown in FIG. 8 (A), the concept of "delay" in FIG. 8 (B) does not exist, and the communication frame transmitted from the
したがって、図8(A)の非リング構成においては、出力処理162の終了タイミングT0を基準として、しきい時間Th1が設定されることになる。一方、図8(B)のリング構成においては、出力処理162の終了タイミングT0を基準として、しきい時間Th2およびしきい時間Th3が設定される。なお、しきい時間Th1およびしきい時間Th3は、通信タイムアウト時間に相当し、しきい時間Th2は、リング構成に何らかの障害が発生したことを判断するためのしきい時間に相当する。
Therefore, in the non-ring configuration of FIG. 8A, the threshold time Th1 is set with reference to the end timing T0 of the
ここで、しきい時間Th1およびしきい時間Th3は、非リング構造のラウンドトリップ時間に基づいて決定され、しきい時間Th2は、リング構成のラウンドトリップ時間に基づいて決定される。なお、しきい時間Th1およびしきい時間Th3は、同じ値であってもよいし、異なる値であってもよい。 Here, the threshold time Th1 and the threshold time Th3 are determined based on the round trip time of the non-ring structure, and the threshold time Th2 is determined based on the round trip time of the ring configuration. The threshold time Th1 and the threshold time Th3 may have the same value or different values.
本実施の形態に従う制御システム1においては、正常、遅延、フレームロストの3種類でそれぞれ処理を異ならせる。
In the
図9は、本実施の形態に従う制御システム1のPLC100における入力処理164の例を説明するための図である。図9を参照して、PLC100に戻ってきた通信フレームに含まれるデバイス200などからのデータ(以下、入力データ)は、現周期入力データ170および予備入力データ172という、互いに独立した形でPLC100のメインメモリ104に保持される。
FIG. 9 is a diagram for explaining an example of the
現周期入力データ170は、現在のタスク実行周期で受信された通信フレームに含まれる入力データである。予備入力データ172は、現在のタスク実行周期以外で、最も新しく適切に受信された通信フレームに含まれる入力データである。
The current
図8(A)および図8(B)に示す「正常」において、制御演算160では、現周期入力データ170が入力データとして用いられる。一方、図8(B)に示す「遅延」、ならびに、図8(A)および図8(B)に示す「フレームロスト」において、制御演算160では、予備入力データ172が入力データとして用いられる。すなわち、「遅延」および「フレームロスト」では、現在のタスク実行周期の通信フレームを利用できないので、それ以前に受信されていた通信フレームを利用して、制御演算160が実行される。
In the "normal" shown in FIGS. 8A and 8B, the current
「正常」であれば、現在のタスク実行周期で受信された通信フレームに含まれる入力データは、現周期入力データ170として保持されるとともに、予備入力データ172としても保持される。すなわち、「正常」であれば、現周期入力データ170および予備入力データ172は、同一の入力データとなる。
If it is "normal", the input data included in the communication frame received in the current task execution cycle is held as the current
一方、「フレームロスト」であれば、現在のタスク実行周期で通信フレームを受信できないので現周期入力データ170および予備入力データ172はいずれも更新されず、そのままとなる。
On the other hand, in the case of "frame lost", since the communication frame cannot be received in the current task execution cycle, neither the current
これに対して、「遅延」であれば、現在のタスク実行周期で通信フレームは受信できないので、現周期入力データ170は更新されないが、通信フレーム自体は受信しているので、予備入力データ172として保持することはできる。そのため、「遅延」であれば、受信された通信フレームに含まれる入力データは、制御演算160の実行後に、予備入力データ172として保持される。
On the other hand, in the case of "delay", since the communication frame cannot be received in the current task execution cycle, the current
以上説明したように、リング構成を採用できる制御システムにおいては、システム設計の1つとして、リング構成が非リング構成に変化してラウンドトリップ時間が伸びた場合(最悪値)を想定した設計が可能である(図1(C)および図4(C)など参照)。この場合には、図8(B)に示す「遅延」を考慮することなく、「正常」と「フレームロスト」とを考慮すればよい。このようなシステム設計においては、フレームロストが発生しない限り、各タスク実行周期で受信された通信フレームに含まれる入力データを用いて入力処理164を実行できる。そのため、入力データが取得されたタイミングと、入力処理164の実行タイミングとの間に時間的なズレは発生しない。このような利点に着目して、この場合のPLC100の動作モードを「データ同期性優先モード」と称す。
As described above, in a control system that can adopt a ring configuration, as one of the system designs, it is possible to design assuming that the ring configuration changes to a non-ring configuration and the round trip time is extended (worst value). (See FIGS. 1 (C) and 4 (C), etc.). In this case, "normal" and "frame lost" may be considered without considering the "delay" shown in FIG. 8 (B). In such a system design, the
データ同期性優先モードにおいては、PLC100は、通信フレームを送信してからしきい時間Th1(第1のしきい時間)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データ172に基づいて制御演算160を実行する。予備入力データ172に関して、PLC100は、しきい時間Th1までに送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データ172を更新する。
In the data synchronization priority mode, if the
一方、リング構成で得られるラウンドトリップ時間を前提としてシステム設計することもできる。この場合には、図8(B)に示す「遅延」を考慮する必要がある。リング構成が非リング構成に変化した場合には、入力処理164に用いられる入力データは、1つ前のタスク実行周期で受信された通信フレームに含まれるものとなる。すなわち、リング構成が非リング構成に変化しても、入力データが取得されたタイミングと入力処理164の実行タイミングとの間の時間的なズレは、タスク実行周期の1周期分だけに抑制できる。このとき、タスク実行周期自体を短縮できるので、入出力の応答性能や制御演算160の演算量の観点からは、制御性能を向上できる。このような利点に着目して、この場合のPLC100の動作モードを「制御性能優先モード」と称す。
On the other hand, the system can be designed on the premise of the round trip time obtained by the ring configuration. In this case, it is necessary to consider the "delay" shown in FIG. 8 (B). When the ring configuration is changed to the non-ring configuration, the input data used in the
制御性能優先モードにおいては、PLC100は、通信フレームを送信してからしきい時間Th2(第2のしきい時間)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データ172に基づいて制御演算160を実行する。予備入力データ172に関して、PLC100は、しきい時間Th2より長いしきい時間Th3(第3のしきい時間)までに送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データ172を更新する。
In the control performance priority mode, if the
上述したように、制御性能優先モードにおける実行周期は、データ同期性優先モードにおける実行周期より短く設定することもできる。なお、PLC100では、ネットワークがリング構成を含む場合に、制御性能優先モードを有効化するようにしてもよい。 As described above, the execution cycle in the control performance priority mode can be set shorter than the execution cycle in the data synchronization priority mode. In PLC100, the control performance priority mode may be enabled when the network includes a ring configuration.
<D.処理手順>
次に、上述したデータ同期性優先モードおよび制御性能優先モードのそれぞれについてのPLC100における処理手順について説明する。PLC100は、データ同期性優先モードおよび制御性能優先モードのうち選択された動作モードに従って、後述するような入力処理を含む処理を周期的に実行する。
<D. Processing procedure>
Next, the processing procedure in the
(d1:データ同期性優先モード)
図10は、本実施の形態に従う制御システム1のPLC100によるデータ同期性優先モードでの処理手順を示すフローチャートである。図10に示す各ステップは、典型的には、PLC100のプロセッサ102がシステムプログラム1102およびユーザプログラム1104(図5参照)を実行することで実現される。
(D1: Data synchronization priority mode)
FIG. 10 is a flowchart showing a processing procedure in the data synchronization priority mode by the
図10を参照して、PLC100は、タスク実行周期が到来したか否かを判断する(ステップS100)。タスク実行周期が到来すれば(ステップS100においてYES)、PLC100は、前回の制御演算によって算出された出力データを含む通信フレームを生成および送信する(ステップS102)。すなわち、PLC100は、制御演算により決定された出力データを含む通信フレームを送信する。
With reference to FIG. 10, the
その後、PLC100は、ネットワークを一巡した通信フレームを受信したか否かを判断する(ステップS104)。
After that, the
ネットワークを一巡した通信フレームを受信すれば(ステップS104においてYES)、PLC100は、受信した通信フレームに含まれる入力データを現周期入力データ170として格納し(ステップS106)、現周期入力データ170を用いて制御演算を実行する(ステップS108)。併せて、PLC100は、現周期入力データ170で予備入力データ172を更新する(ステップS110)。このように、PLC100は、しきい時間Th1(第1のしきい時間)までに送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データ172を更新する。そして、ステップS100以下の処理が繰返される。
If the communication frame that has circled the network is received (YES in step S104), the
一方、ネットワークを一巡した通信フレームを受信していなければ(ステップS104においてNO)、PLC100は、通信フレームを送信してから、しきい時間Th1が経過したか否かを判断する(ステップS112)。しきい時間Th1が経過していなければ(ステップS112においてNO)、ステップS104以下の処理が繰返される。
On the other hand, if the communication frame that has circled the network has not been received (NO in step S104), the
しきい時間Th1が経過していれば(ステップS112においてYES)、PLC100は、予備入力データ172を制御演算に用いる入力データとして選択し(ステップS114)、予備入力データ172を用いて制御演算を実行する(ステップS116)。このように、PLC100は、通信フレームを送信してからしきい時間Th1(第1のしきい時間)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いる。このとき、予備入力データ172の更新は行われない。そして、ステップS100以下の処理が繰返される。
If the threshold time Th1 has elapsed (YES in step S112), the
(d2:制御性能優先モード)
図11は、本実施の形態に従う制御システム1のPLC100による制御性能優先モードでの処理手順を示すフローチャートである。図11に示す各ステップは、典型的には、PLC100のプロセッサ102がシステムプログラム1102およびユーザプログラム1104(図5参照)を実行することで実現される。
(D2: Control performance priority mode)
FIG. 11 is a flowchart showing a processing procedure in the control performance priority mode by the
図11を参照して、PLC100は、タスク実行周期が到来したか否かを判断する(ステップS200)。タスク実行周期が到来すれば(ステップS200においてYES)、PLC100は、前回の制御演算によって算出された出力データを含む通信フレームを生成および送信する(ステップS202)。すなわち、PLC100は、制御演算により決定された出力データを含む通信フレームを送信する。
With reference to FIG. 11, the
その後、PLC100は、ネットワークを一巡した通信フレームを受信したか否かを判断する(ステップS204)。
After that, the
ネットワークを一巡した通信フレームを受信すれば(ステップS204においてYES)、PLC100は、受信した通信フレームに含まれる入力データを現周期入力データ170として格納し(ステップS206)、現周期入力データ170を用いて制御演算を実行する(ステップS208)。併せて、PLC100は、現周期入力データ170で予備入力データ172を更新する(ステップS210)。そして、ステップS200以下の処理が繰返される。
If the communication frame that has circled the network is received (YES in step S204), the
一方、ネットワークを一巡した通信フレームを受信していなければ(ステップS204においてNO)、PLC100は、通信フレームを送信してから、しきい時間Th2が経過したか否かを判断する(ステップS212)。しきい時間Th2が経過していなければ(ステップS212においてNO)、ステップS204以下の処理が繰返される。
On the other hand, if the communication frame that has circled the network has not been received (NO in step S204), the
しきい時間Th2が経過していれば(ステップS212においてYES)、PLC100は、予備入力データ172を制御演算に用いる入力データとして選択し(ステップS214)、予備入力データ172を用いて制御演算を実行する(ステップS216)。このように、PLC100は、通信フレームを送信してからしきい時間Th2(第2のしきい時間)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを制御演算に用いる。
If the threshold time Th2 has elapsed (YES in step S212), the
さらに、PLC100は、しきい時間Th3が経過するまでに、ネットワークを一巡した通信フレームを受信したか否かを判断する(ステップS218)。しきい時間Th3が経過するまでに、ネットワークを一巡した通信フレームを受信していれば(ステップS218においてYES)、PLC100は、受信した通信フレームに含まれる入力データで予備入力データ172を更新する(ステップS220)。このように、PLC100は、しきい時間Th3(第3のしきい時間)までに送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで予備入力データ172を更新する。そして、ステップS200以下の処理が繰返される。
Further, the
一方、しきい時間Th3が経過するまでに、ネットワークを一巡した通信フレームを受信していなければ(ステップS218においてNO)、予備入力データ172の更新は行われず、ステップS100以下の処理が繰返される。
On the other hand, if the communication frame that has circled the network has not been received by the time when the threshold time Th3 elapses (NO in step S218), the
<E.動作例>
次に、本実施の形態に従う制御システム1における動作例について説明する。
<E. Operation example>
Next, an operation example in the
図12は、本実施の形態に従う制御システム1の動作例を示すタイムチャートである。 図12(A)には、リング構成における動作例を示す。図12(A)に示す動作例においては、出力処理162の終了から入力処理164の開始までの間に、通信フレーム30が一巡するので、通信フレーム30に含まれる入力データが現周期入力データ170として格納され、同じタスク実行周期の制御演算160において用いられる。
FIG. 12 is a time chart showing an operation example of the
一方、図12(B)には、リング構成が非リング構成に変化している場合の動作例を示す。図12(B)に示す動作例においては、出力処理162の終了から入力処理164の開始までの間に、通信フレーム30が一巡できないので、1つ前のタスク実行周期において更新された予備入力データ172が制御演算160において用いられる。なお、同じタスク実行周期に受信された通信フレーム30に含まれる入力データは、予備入力データ172として格納され、次のタスク実行周期の制御演算160において用いられる。
On the other hand, FIG. 12B shows an operation example when the ring configuration is changed to the non-ring configuration. In the operation example shown in FIG. 12B, since the
図12(C)には、非リング構成からリング構成に復帰した場合の動作例を示す。非リング構成からリング構成に復帰すると、出力処理162の終了から入力処理164の開始までの間に、通信フレーム30は一巡できるようになる。それに伴って、1つ前のタスク実行周期において更新された予備入力データ172ではなく、同じタスク実行周期において受信された通信フレーム30に含まれる入力データ(現周期入力データ170)が制御演算160において用いられるようになる。
FIG. 12C shows an operation example when the non-ring configuration is restored to the ring configuration. When the non-ring configuration is restored to the ring configuration, the
このように、本実施の形態に従う制御システム1においては、制御演算の実行中にリング構成が非リング構成に変化しても、あるいは、非リング構成がリング構成に変化したとしても、制御性能への影響を最小限にして、制御演算の実行を継続できる。
As described above, in the
<F.システム設計およびユーザ支援>
次に、本実施の形態に従う制御システム1におけるシステム設計を行うための構成および処理などについて説明する。
<F. System design and user support>
Next, the configuration and processing for designing the system in the
(f1:サポート装置)
PLC100に格納されるユーザプログラム1104およびシステム設定情報1106は、PLC100に接続可能なサポート装置400を用いて作成および設定可能である。
(F1: Support device)
The
図13は、本実施の形態に従う制御システム1のサポート装置400のハードウェア構成例を示す模式図である。図13を参照して、サポート装置400は、一例として、汎用的なアーキテクチャに従うハードウェア(例えば、汎用パソコン)を用いて実現される。
FIG. 13 is a schematic diagram showing a hardware configuration example of the
サポート装置400は、制御システム1のPLC100およびデバイス200に対する設定、ならびに、PLC100で実行されるユーザプログラム1104の作成が統合的に可能な統合開発環境を提供する。統合開発環境においては、デバッグやシミュレーションなどが可能であってもよい。
The
図13を参照して、サポート装置400は、主たるハードウェアコンポーネントとして、プロセッサ402と、メインメモリ404と、入力部406と、表示部408と、ストレージ410と、通信コントローラ412と、光学ドライブ416と、USBコントローラ424とを含む。これらのハードウェアコンポーネントは、内部バス228を介して電気的に接続される。
With reference to FIG. 13, the
プロセッサ402は、CPUやGPUなどで構成され、ストレージ410に格納されたプログラムを読出して、メインメモリ404に展開して実行することで、サポート装置400としての機能を実現する。
The
メインメモリ404は、DRAMやSRAMなどの揮発性記憶装置などで構成される。ストレージ410は、例えば、HDDやSSDなどの不揮発性記憶装置などで構成される。
The
ストレージ410には、基本的な機能を実現するためのOS4102、および、統合開発環境を実現するための開発プログラム4104などが格納される。開発プログラム4104は、プロセッサ402により実行されることで、統合開発環境を提供する。
The
入力部406は、キーボードやマウスなどで構成され、ユーザ操作を受け付ける。
表示部408は、ディスプレイや各種インジケータなどで構成され、プロセッサ402からの処理結果などを出力する。
The
The
通信コントローラ412は、任意の上位ネットワークを介して、任意の情報処理装置との間でデータをやり取りする。
The
光学ドライブ416は、コンピュータ読取可能なプログラムを非一過的に格納する記憶媒体418(例えば、DVDなどの光学記憶媒体)から任意のデータを読み取り、および、任意のデータを記憶媒体418に書き込むことができる。
The
USBコントローラ424は、USB接続を介して、任意の情報処理装置との間のデータをやり取りする。
The
コンピュータ読取可能なプログラムを非一過的に格納する記憶媒体418から、その中に格納されたプログラムが読み取られてストレージ410などにインストールされてもよい。あるいは、サポート装置400で実行される各種プログラムは、ネットワーク上のサーバ装置などからダウンロードする形でインストールするようにしてもよい。また、本実施の形態に係るサポート装置400が提供する機能は、OS4102が提供するモジュールの一部を利用する形で実現される場合もある。
The program stored in the
なお、制御システム1の稼動中において、サポート装置400は、PLC100から取り外されていてもよい。
The
(f2:しきい時間)
サポート装置400は、上述したしきい時間Th1,Th2,Th3をそれぞれ決定する機能を有していてもよい。
(F2: threshold time)
The
しきい時間Th1(第1のしきい時間)は、フレームロストを判定するための時間であり、対象のネットワークにおけるラウンドトリップ時間に基づいて決定される。 The threshold time Th1 (first threshold time) is a time for determining frame lost, and is determined based on the round trip time in the target network.
しきい時間Th2(第2のしきい時間)は、リング構成に何らの障害も発生していない状態のラウンドトリップ時間に基づいて決定される。すなわち、しきい時間Th1は、リング構成において、PLC100のフィールドネットワークコントローラ112(通信部)から送信された通信フレームが一巡してフィールドネットワークコントローラ112(通信部)に戻るまでの時間に基づいて決定される。
The threshold time Th2 (second threshold time) is determined based on the round trip time in a state where no obstacle has occurred in the ring configuration. That is, the threshold time Th1 is determined based on the time required for the communication frame transmitted from the field network controller 112 (communication unit) of the
しきい時間Th3(第3のしきい時間)は、リング構成に何らの障害も発生していない状態のラウンドトリップ時間に基づいて決定される。すなわち、しきい時間Th3は、リング構成に含まれるいずれかのケーブルが通信フレームを伝送できない状態で、フィールドネットワークコントローラ112(通信部)から送信された通信フレームが一巡してフィールドネットワークコントローラ112(通信部)に戻るまでの時間に基づいて決定される。 The threshold time Th3 (third threshold time) is determined based on the round trip time in a state where no obstacle is generated in the ring configuration. That is, in the threshold time Th3, the communication frame transmitted from the field network controller 112 (communication unit) goes around in a state where any of the cables included in the ring configuration cannot transmit the communication frame, and the field network controller 112 (communication). It is decided based on the time to return to the part).
例えば、サポート装置400は、制御システム1のネットワークにおける通信フレームが一巡するのに要する時間を測定し、測定された時間に基づいて、しきい時間Th2および/またはしきい時間Th3を決定してもよい。
For example, the
あるいは、サポート装置400は、シミュレーションによって、しきい時間Th2および/またはしきい時間Th3を決定してもよい。例えば、サポート装置400は、ネットワークに接続されるデバイス200の数、および、ネットワークの接続形態(ネットワークトポロジー)の情報に基づいて、予め定められた算出式に従って、しきい時間Th1および/またはしきい時間Th2を決定してもよい。
Alternatively, the
(f3:ユーザインターフェイス画面)
ユーザは、サポート装置400が提供する統合開発環境を利用して、ユーザプログラム1104を作成するとともに、制御システム1に係る各種設定も行う。このとき、サポート装置400は、ユーザ操作に応じて、ユーザプログラム1104の実行時間などをシミュレーションにより推定することができる。その上で、サポート装置400は、シミュレーション結果に基づいて、動作モードの変更などをユーザへアドバイスすることもできる。
(F3: User interface screen)
The user creates the
図14は、本実施の形態に従う制御システム1のサポート装置400が提供するユーザインターフェイス画面450の一例を示す模式図である。図14を参照して、ユーザインターフェイス画面450は、現在の設定において算出されたユーザプログラム1104の実行時間を示すグラフ452と、ネットワーク構成を変更した上で、制御性能優先モードを採用した場合におけるユーザプログラム1104の実行時間を示すグラフ454とを含む。なお、グラフ452に示される実行時間としては、PLC100で測定された計測値を採用してもよい。
FIG. 14 is a schematic diagram showing an example of a
ユーザは、グラフ452とグラフ454とを比較することで、ユーザプログラム1104の実行時間(タスク実行周期)をどの程度短縮できるのかを事前に把握できる。
By comparing the
図14に示すユーザインターフェイス画面450の例においては、シミュレーション結果に基づいて、「リング構成に変更して制御性能優先モードを選択することで、タスク実行周期を2msから1msに短縮できます」といったメッセージ460が表示されている。
In the example of the
ユーザは、メッセージ460を参照して、制御システム1のネットワーク構成を非リング構成からリング構成に変更した上で、チェックボックス458をチェックすることで、制御性能優先モードが有効化される。制御性能優先モードが有効化された場合には、ネットワーク内で何らかの障害が発生すると、データの同期性が失われる可能性がある旨をユーザへ通知するようにしてもよい。
The user refers to the
なお、図14に示す例では、チェックボックス456がチェックされており、データ同期性優先モードが選択されていることが分かる。 In the example shown in FIG. 14, the check box 456 is checked, and it can be seen that the data synchronization priority mode is selected.
(f4:動作モードの確認・取得)
PLC100の動作モードおよびユーザプログラム1104の実行時間などは、任意の方法で確認および取得できるようにしてもよい。
(F4: Confirmation / acquisition of operation mode)
The operation mode of the
典型的には、サポート装置400をPLC100に接続し、サポート装置400上で、PLC100の動作モード(データ同期性優先モードおよび制御性能優先モードのいずれkであるか)、ならびに、ユーザプログラム1104の実行時間などをモニターできるようにしてもよい。
Typically, the
また、制御システム1にHMI(Human Machine Interface)を設け、PLC100の動作モード、およびに、ユーザプログラム1104の実行時間などを、HMI上に表示するようにしてもよい。
Further, an HMI (Human Machine Interface) may be provided in the
さらに、PLC100が保持するシステム変数あるいは特殊イベントなどを利用することで、ユーザプログラム1104に含まれる専用命令によって、PLC100の動作モード、およびに、ユーザプログラム1104の実行時間などを取得できるようにしてもよい。このように、PLC100で実行されるユーザプログラム1104に含まれる命令により現在の動作モードを参照できるように構成されてもよい。例えば、PLC100の動作モードに応じて、入力処理を異ならせるようなユーザプログラム1104を作成することもできる。
Further, by using the system variables or special events held by the
<G.リング構成のバリエーション>
上述の説明では、中継装置300を用いたリング構成の例について説明したが、これに限らず他の構成を採用してもよい。
<G. Variations of ring configuration>
In the above description, an example of a ring configuration using the
図15は、本実施の形態に従う制御システム1で採用可能なリング構成の一例を示す図である。
FIG. 15 is a diagram showing an example of a ring configuration that can be adopted in the
図15(A)には、3つ以上のポートを有する中継装置300を用いたリング構成の例を示す。中継装置300は、ポートを3つ以上有することで、ジャンクション冗長性(Junction Redundancy)を提供する。図15(A)に示すリング構成においては、PLC100のフィールドネットワークコントローラ112(通信部)および複数のデバイス200(スレーブ)に接続された中継装置300を含む。
FIG. 15A shows an example of a ring configuration using a
図15(B)には、2つ以上のポート151,152を有するPLC100を用いたリング構成の例を示す。PLC100は、ポートを2つ以上有することで、ケーブル冗長性(Cable Redundancy)を提供する。図15(B)に示すリング構成においては、PLC100のフィールドネットワークコントローラ112(通信部)は、それぞれ異なるデバイス200(スレーブ)に接続された複数のポートを有している。
FIG. 15B shows an example of a ring configuration using a PLC100 having two or
また、図15(A)に示す中継装置300、および、図15(B)に示すPLC100を任意に組み合わせてリング構成を構成してもよい。
Further, the
本実施の形態に従う通信制御方法は、上述した構成例に限らず任意のリング構成に対して適用可能である。また、通信プロトコルとしても、EtherCATに限らず、定時性を有する様々な産業用ネットワーク用の通信プロトコルに適用可能である。 The communication control method according to the present embodiment is applicable to any ring configuration, not limited to the configuration example described above. Further, the communication protocol is not limited to EtherCAT, and can be applied to various communication protocols for industrial networks having punctuality.
<H.付記>
上述したような本実施の形態は、以下のような技術思想を含む。
[構成1]
通信フレーム(30)が一巡するように構成されたネットワークに接続される通信部(112)と、
前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算(160)、および、当該制御演算により決定された出力データを含む通信フレームの送信(164)を、実行周期毎に繰返し実行する演算処理部(102)とを備え、
前記演算処理部は、
通信フレームを送信してから第1のしきい時間(Th1)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データ(172)に基づいて制御演算を実行する第1の動作モードと、
通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間(Th2)までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データ(172)に基づいて制御演算を実行する第2の動作モードとを選択可能に構成されており、
前記演算処理部は、
前記第1の動作モードにおいて、前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新し、
前記第2の動作モードにおいて、前記第2のしきい時間より長い第3のしきい時間(Th3)までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新する、制御装置(100)。
[構成2]
前記ネットワークは、通信スレーブに接続されたケーブル(21~26)の各々において、通信フレームが一方向にのみ伝送されるように構成されたリング構成を含む、構成1に記載の制御装置。
[構成3]
前記演算処理部は、前記ネットワークが前記リング構成を含む場合に、前記第2の動作モードを有効化可能になっている、構成2に記載の制御装置。
[構成4]
前記第2のしきい時間は、前記リング構成において、前記通信部から送信された通信フレームが一巡して前記通信部に戻るまでの時間に基づいて決定され、
前記第3のしきい時間は、前記リング構成に含まれるいずれかのケーブルが通信フレームを伝送できない状態で、前記通信部から送信された通信フレームが一巡して前記通信部に戻るまでの時間に基づいて決定される、構成2または3に記載の制御装置。
[構成5]
前記リング構成は、前記通信部および複数の通信スレーブ(200)に接続された中継装置(300)を含む、構成2~4のいずれか1項に記載の制御装置。
[構成6]
前記通信部は、それぞれ異なる通信スレーブに接続された複数のポート(151,152)を有している、構成2~4のいずれか1項に記載の制御装置。
[構成7]
前記第2の動作モードにおける実行周期(Tc1)は、前記第1の動作モードにおける実行周期(Tc2)より短く設定される、構成1に記載の制御装置。
[構成8]
前記演算処理部で実行されるユーザプログラム(1104)に含まれる命令により前記演算処理部の動作モードを参照できるように構成される、構成1~7のいずれか1項に記載の制御装置。
[構成9]
通信フレームが一巡するように構成されたネットワークに接続される通信部(112)を含む制御装置(100)で実行される通信制御方法であって、
第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップ(S104,S106,S110,S114;S204,S206,S210,S212,S214,S218,S220)と、
前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップ(S108,S116;S208,S216)と、
前記制御演算により決定された出力データを含む通信フレームを送信するステップ(S102,S202)とを備え、
前記入力処理を実行するステップは、
前記第1の動作モードにおいて、
通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップ(S114)と、
前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップ(S110)とを含み、
前記第2の動作モードにおいて、
通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップ(S214)と、
前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップ(S220)とを含む、通信制御方法。
[構成10]
通信フレームが一巡するように構成されたネットワークに接続される通信部(112)を含むコンピュータ(100)で実行される制御プログラム(1102)であって、前記制御プログラムは前記コンピュータに、
第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップ(S104,S106,S110,S114;S204,S206,S210,S212,S214,S218,S220)と、
前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップ(S108,S116;S208,S216)と、
前記制御演算により決定された出力データを含む通信フレームを送信するステップ(S102,S202)とを実行させ、
前記入力処理を実行するステップは、
前記第1の動作モードにおいて、
通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップ(S114)と、
前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップ(S110)とを含み、
前記第2の動作モードにおいて、
通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップ(S214)と、
前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップ(S220)とを含む、制御プログラム。
<H. Addendum>
The present embodiment as described above includes the following technical ideas.
[Structure 1]
A communication unit (112) connected to a network configured so that the communication frame (30) makes a round, and
The control operation (160) based on the input data included in the communication frame received via the communication unit and the transmission (164) of the communication frame including the output data determined by the control operation are repeated for each execution cycle. It is equipped with an arithmetic processing unit (102) to be executed.
The arithmetic processing unit is
If the transmitted communication frame is not received by the first threshold time (Th1) after the communication frame is transmitted, the preliminary input data which is the input data included in the communication frame received before the transmission. The first operation mode for executing the control operation based on (172) and
If the transmitted communication frame is not received by the second threshold time (Th2) shorter than the first threshold time after the communication frame is transmitted, it is included in the communication frame received before the transmission. It is configured so that it can be selected from the second operation mode in which the control operation is executed based on the preliminary input data (172) which is the input data.
The arithmetic processing unit is
If the transmitted communication frame is received by the first threshold time in the first operation mode, the preliminary input data is updated with the input data included in the received communication frame.
In the second operation mode, if the transmitted communication frame is received by the third threshold time (Th3) longer than the second threshold time, the input data included in the received communication frame is used as the input data. A control device (100) that updates the preliminary input data.
[Structure 2]
The control device according to
[Structure 3]
The control device according to configuration 2, wherein the arithmetic processing unit can enable the second operation mode when the network includes the ring configuration.
[Structure 4]
The second threshold time is determined based on the time required for the communication frame transmitted from the communication unit to make a round and return to the communication unit in the ring configuration.
The third threshold time is the time until the communication frame transmitted from the communication unit makes a round and returns to the communication unit in a state where any of the cables included in the ring configuration cannot transmit the communication frame. The control device according to configuration 2 or 3, which is determined based on the above.
[Structure 5]
The control device according to any one of configurations 2 to 4, wherein the ring configuration includes a relay device (300) connected to the communication unit and a plurality of communication slaves (200).
[Structure 6]
The control device according to any one of configurations 2 to 4, wherein the communication unit has a plurality of ports (151, 152) connected to different communication slaves.
[Structure 7]
The control device according to
[Structure 8]
The control device according to any one of
[Structure 9]
It is a communication control method executed by a control device (100) including a communication unit (112) connected to a network configured to make a cycle of communication frames.
With steps (S104, S106, S110, S114; S204, S206, S210, S212, S214, S218, S220) for executing input processing according to the operation mode selected from the first operation mode and the second operation mode. ,
A step (S108, S116; S208, S216) of executing a control operation based on the input data included in the communication frame received via the communication unit, and
The step (S102, S202) for transmitting a communication frame including the output data determined by the control calculation is provided.
The step of executing the input process is
In the first operation mode,
If the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the preliminary input data which is the input data included in the communication frame received before the transmission is controlled. Step (S114) used for calculation and
If the transmitted communication frame is received by the first threshold time, the step (S110) of updating the preliminary input data with the input data included in the received communication frame is included.
In the second operation mode,
If the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the input included in the communication frame received before the transmission is received. A step (S214) in which the preliminary input data, which is data, is used for the control calculation,
If the transmitted communication frame is received by the third threshold time, which is longer than the second threshold time, the step (S220) of updating the preliminary input data with the input data included in the received communication frame. Communication control methods, including.
[Structure 10]
A control program (1102) executed by a computer (100) including a communication unit (112) connected to a network configured to make a cycle of communication frames, wherein the control program is applied to the computer.
With steps (S104, S106, S110, S114; S204, S206, S210, S212, S214, S218, S220) for executing input processing according to the operation mode selected from the first operation mode and the second operation mode. ,
A step (S108, S116; S208, S216) of executing a control operation based on the input data included in the communication frame received via the communication unit, and
The step (S102, S202) of transmitting a communication frame including the output data determined by the control calculation is executed.
The step of executing the input process is
In the first operation mode,
If the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the preliminary input data which is the input data included in the communication frame received before the transmission is controlled. Step (S114) used for calculation and
If the transmitted communication frame is received by the first threshold time, the step (S110) of updating the preliminary input data with the input data included in the received communication frame is included.
In the second operation mode,
If the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the input included in the communication frame received before the transmission is received. A step (S214) in which the preliminary input data, which is data, is used for the control calculation,
If the transmitted communication frame is received by the third threshold time, which is longer than the second threshold time, the step (S220) of updating the preliminary input data with the input data included in the received communication frame. A control program, including.
<I.利点>
本実施の形態に係る制御システムは、リング構成によって得られるラウンドトリップ時間の短縮化と、リング構成に何らかの障害が発生した場合の制御の安定化とを両立できる。
<I. Advantages>
The control system according to the present embodiment can achieve both shortening of the round trip time obtained by the ring configuration and stabilization of control when some kind of failure occurs in the ring configuration.
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 It should be considered that the embodiments disclosed this time are exemplary in all respects and not restrictive. The scope of the present invention is shown by the scope of claims, not the above description, and is intended to include all modifications within the meaning and scope equivalent to the scope of claims.
1 制御システム、20,21,22,23,24,25,26 ケーブル、30 通信フレーム、100 PLC、102,202,302,402 プロセッサ、104,204,304,404 メインメモリ、110,210,310,410 ストレージ、112,212 フィールドネットワークコントローラ、114 ローカルバスコントローラ、116 機能ユニット、118,228 内部バス、151,152 ポート、160 制御演算、162 出力処理、164 入力処理、166 余裕時間、170 現周期入力データ、172 予備入力データ、200 デバイス、206,306 制御回路、220 機能モジュール、251,351 第1ポート、252,352 第2ポート、300 中継装置、312 フィールドネットワークインターフェイス、353 第3ポート、400 サポート装置、406 入力部、408 表示部、412 通信コントローラ、416 光学ドライブ、418 記憶媒体、424 USBコントローラ、450 ユーザインターフェイス画面、452,454 グラフ、456,458 チェックボックス、460 メッセージ、1102 システムプログラム、1104 ユーザプログラム、1106 システム設定情報、4102 OS、4104 開発プログラム、T0 終了タイミング、Tc1,Tc2,Tc3 タスク実行周期、Th1,Th2,Th3 しきい時間、Tr1,Tr2,Tr3 ラウンドトリップ時間、Tt1,Tt2,Tt3,Tt4 通信時間。 1 Control system, 20,21,22,23,24,25,26 cable, 30 communication frames, 100 PLC, 102,202,302,402 processor, 104,204,304,404 main memory, 110,210,310 , 410 storage, 112,212 field network controller, 114 local bus controller, 116 functional unit, 118,228 internal bus, 151,152 ports, 160 control operations, 162 output processing, 164 input processing, 166 margin time, 170 current cycle Input data, 172 spare input data, 200 devices, 206,306 control circuit, 220 functional module, 251 and 351 first port, 252, 352 second port, 300 repeater, 312 field network interface, 353 third port, 400 Support device, 406 input section, 408 display section, 412 communication controller, 416 optical drive, 418 storage medium, 424 USB controller, 450 user interface screen, 452,454 graphs, 456,458 check boxes, 460 messages, 1102 system programs, 1104 User program, 1106 System setting information, 4102 OS, 4104 Development program, T0 end timing, Tc1, Tc2, Tc3 task execution cycle, Th1, Th2, Th3 threshold time, Tr1, Tr2, Tr3 round trip time, Tt1, Tt2 , Tt3, Tt4 communication time.
Claims (10)
前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算、および、当該制御演算により決定された出力データを含む通信フレームの送信を、実行周期毎に繰返し実行する演算処理部とを備え、
前記演算処理部は、
通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データに基づいて制御演算を実行する第1の動作モードと、
通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データに基づいて制御演算を実行する第2の動作モードとを選択可能に構成されており、
前記演算処理部は、
前記第1の動作モードにおいて、前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新し、
前記第2の動作モードにおいて、前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新する、制御装置。 A communication unit connected to a network configured to make a round of communication frames,
An arithmetic processing unit that repeatedly executes a control calculation based on input data included in a communication frame received via the communication unit and a communication frame including output data determined by the control calculation at each execution cycle. Equipped with
The arithmetic processing unit is
If the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, it is based on the preliminary input data which is the input data included in the communication frame received before the transmission. The first operation mode to execute the control operation and
If the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the input included in the communication frame received before the transmission is received. It is configured to be able to select a second operation mode that executes control operations based on the preliminary input data that is the data.
The arithmetic processing unit is
If the transmitted communication frame is received by the first threshold time in the first operation mode, the preliminary input data is updated with the input data included in the received communication frame.
In the second operation mode, if the transmitted communication frame is received by the third threshold time longer than the second threshold time, the input data included in the received communication frame is the preliminary input data. Update the control device.
前記第3のしきい時間は、前記リング構成に含まれるいずれかのケーブルが通信フレームを伝送できない状態で、前記通信部から送信された通信フレームが一巡して前記通信部に戻るまでの時間に基づいて決定される、請求項2または3に記載の制御装置。 The second threshold time is determined based on the time required for the communication frame transmitted from the communication unit to make a round and return to the communication unit in the ring configuration.
The third threshold time is the time until the communication frame transmitted from the communication unit makes a round and returns to the communication unit in a state where any of the cables included in the ring configuration cannot transmit the communication frame. The control device according to claim 2 or 3, which is determined based on the above.
第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップと、
前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップと、
前記制御演算により決定された出力データを含む通信フレームを送信するステップとを備え、
前記入力処理を実行するステップは、
前記第1の動作モードにおいて、
通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップと、
前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップとを含み、
前記第2の動作モードにおいて、
通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップと、
前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップとを含む、通信制御方法。 It is a communication control method executed by a control device including a communication unit connected to a network configured to make a cycle of communication frames.
A step of executing input processing according to the operation mode selected from the first operation mode and the second operation mode, and
A step of executing a control operation based on the input data included in the communication frame received via the communication unit, and
A step of transmitting a communication frame including output data determined by the control operation is provided.
The step of executing the input process is
In the first operation mode,
If the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the preliminary input data which is the input data included in the communication frame received before the transmission is controlled. The steps used for the calculation and
If the transmitted communication frame is received by the first threshold time, the step of updating the preliminary input data with the input data included in the received communication frame is included.
In the second operation mode,
If the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the input included in the communication frame received before the transmission is received. A step of using the preliminary input data, which is data, for the control calculation, and
If the transmitted communication frame is received by the third threshold time, which is longer than the second threshold time, the step of updating the preliminary input data with the input data included in the received communication frame is included. Communication control method.
第1の動作モードおよび第2の動作モードのうち選択された動作モードに従って、入力処理を実行するステップと、
前記通信部を介して受信した通信フレームに含まれる入力データに基づく制御演算を実行するステップと、
前記制御演算により決定された出力データを含む通信フレームを送信するステップとを実行させ、
前記入力処理を実行するステップは、
前記第1の動作モードにおいて、
通信フレームを送信してから第1のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップと、
前記第1のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップとを含み、
前記第2の動作モードにおいて、
通信フレームを送信してから前記第1のしきい時間より短い第2のしきい時間までに当該送信した通信フレームを受信しなければ、当該送信より前に受信した通信フレームに含まれていた入力データである予備入力データを前記制御演算に用いるステップと、
前記第2のしきい時間より長い第3のしきい時間までに当該送信した通信フレームを受信すれば、当該受信した通信フレームに含まれる入力データで前記予備入力データを更新するステップとを含む、制御プログラム。 A control program executed by a computer including a communication unit connected to a network configured to make a cycle of communication frames, wherein the control program is applied to the computer.
A step of executing input processing according to the operation mode selected from the first operation mode and the second operation mode, and
A step of executing a control operation based on the input data included in the communication frame received via the communication unit, and
The step of transmitting a communication frame including the output data determined by the control operation is executed.
The step of executing the input process is
In the first operation mode,
If the transmitted communication frame is not received by the first threshold time after the communication frame is transmitted, the preliminary input data which is the input data included in the communication frame received before the transmission is controlled. The steps used for the calculation and
If the transmitted communication frame is received by the first threshold time, the step of updating the preliminary input data with the input data included in the received communication frame is included.
In the second operation mode,
If the transmitted communication frame is not received by the second threshold time shorter than the first threshold time after the communication frame is transmitted, the input included in the communication frame received before the transmission is received. A step of using the preliminary input data, which is data, for the control calculation, and
If the transmitted communication frame is received by the third threshold time longer than the second threshold time, the step of updating the preliminary input data with the input data included in the received communication frame is included. Control program.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020194427A JP2022083142A (en) | 2020-11-24 | 2020-11-24 | Control device, communication control method, and control program |
PCT/JP2021/008911 WO2022113383A1 (en) | 2020-11-24 | 2021-03-08 | Control device, communication control method, and control program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020194427A JP2022083142A (en) | 2020-11-24 | 2020-11-24 | Control device, communication control method, and control program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022083142A true JP2022083142A (en) | 2022-06-03 |
Family
ID=81754138
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020194427A Pending JP2022083142A (en) | 2020-11-24 | 2020-11-24 | Control device, communication control method, and control program |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP2022083142A (en) |
WO (1) | WO2022113383A1 (en) |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0480149U (en) * | 1990-11-23 | 1992-07-13 | ||
US5245605A (en) * | 1991-10-04 | 1993-09-14 | International Business Machines Corporation | Integration of synchronous and asynchronous traffic on rings |
US10277417B2 (en) * | 2014-03-04 | 2019-04-30 | Omron Corporation | Control system, control apparatus and control method with input-only communication frame |
JP6338923B2 (en) * | 2014-04-30 | 2018-06-06 | パナソニック デバイスSunx株式会社 | Programmable controller and control program |
US11165602B2 (en) * | 2017-10-31 | 2021-11-02 | Murata Machinery, Ltd. | Communication system, controlled device, and control method for communication system |
JP6969585B2 (en) * | 2019-03-29 | 2021-11-24 | オムロン株式会社 | Master unit, arithmetic processing unit, programmable logic controller, network, and information processing method |
-
2020
- 2020-11-24 JP JP2020194427A patent/JP2022083142A/en active Pending
-
2021
- 2021-03-08 WO PCT/JP2021/008911 patent/WO2022113383A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
WO2022113383A1 (en) | 2022-06-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8977534B2 (en) | Controller support apparatus, controller support program executed on the apparatus, storage medium storing the program, and method of estimating execution time of control program | |
JP6600518B2 (en) | Bus system | |
WO2015133175A1 (en) | Control system, control device, and control method | |
JP6897494B2 (en) | Control system, control system communication control method, and relay device | |
US10429813B2 (en) | Communication system, communication device, and communication program | |
US20180219721A1 (en) | Information processing device, information processing program, and information processing method | |
CN108376111B (en) | Information processing apparatus, information processing method, and computer-readable storage medium | |
US10908583B2 (en) | Safety control system and safety control unit | |
EP2533114B1 (en) | Controller support device, controller support program to be executed in said device, recording medium storing said program, and method for estimating execution duration of control program | |
WO2018139627A1 (en) | Safety system and safety controller | |
WO2022113383A1 (en) | Control device, communication control method, and control program | |
JP2018136745A (en) | Control system, controller and control program | |
WO2020184035A1 (en) | Control system, support device, and program for support device | |
US10715396B2 (en) | Support apparatus, non-transitory computer readable recording medium and setting method | |
JP6196505B2 (en) | Cloud control system and method for executing the control program | |
JPWO2020090032A1 (en) | Communication systems, communication devices and programs | |
US10627784B2 (en) | Control system and control device | |
CN114245978B (en) | Host device, operation processing device, controller, network system, and method | |
WO2023248548A1 (en) | Control system, relay device, and communication method | |
JP6586666B2 (en) | Parallel processing device, node information collection method, and node information collection program | |
WO2023248547A1 (en) | Control system, relay device, and communication method | |
WO2022113384A1 (en) | Control device, communication control method, and control program | |
CN114443545B (en) | Interface expansion method, device, management system and related equipment | |
JP6915583B2 (en) | Safety control system and control method in safety control system | |
JP2023031106A (en) | Communication system, communication control method, and communication control program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230907 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240402 |