JP6524920B2 - Inter-PLC communication data complementing apparatus, inter-PLC communication data complementing method and inter-PLC communication data complementing program - Google Patents
Inter-PLC communication data complementing apparatus, inter-PLC communication data complementing method and inter-PLC communication data complementing program Download PDFInfo
- Publication number
- JP6524920B2 JP6524920B2 JP2016002521A JP2016002521A JP6524920B2 JP 6524920 B2 JP6524920 B2 JP 6524920B2 JP 2016002521 A JP2016002521 A JP 2016002521A JP 2016002521 A JP2016002521 A JP 2016002521A JP 6524920 B2 JP6524920 B2 JP 6524920B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- cycle
- plc
- value
- inter
- 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.)
- Active
Links
Images
Landscapes
- Programmable Controllers (AREA)
Description
本発明は、PLC間通信データ補完装置、PLC間通信データ補完方法およびPLC間通信データ補完プログラムに関する。 The present invention relates to an inter-PLC communication data supplement apparatus, an inter-PLC communication data supplement method, and an inter-PLC communication data supplement program.
プラントの製造ラインにおいては、数ms〜10ms(ミリ秒)程度の定周期で更新される専用ネットワークが用いられることがある。このような専用ネットワークの送受信データの遅延時間のばらつきは1ms以下となることが要求されることがある。プログラマブルロジックコントローラ(Programmable Logic Controller、以下、PLCという。)は、各工程の温度等の環境パラメータの計測信号を入力したり、各種アクチュエータ等を駆動するための駆動信号を出力したりする入出力モジュールと、ラダープログラム等により入出力モジュールを介してアクチュエータ等を制御するコントローラ等を有している。PLCが制御対象とする設備、機能、工程が巨大規模となる場合、複数台のPLCで役割を分担したり、機能を分担したりする事で、全体の設備、機能、工程を制御する場合がある。この時、役割を分担しているPLCは互いに緊密な情報連絡が必要となり、その連絡には専用ネットワークが用いられる事がある。また、前述の入出力モジュール等で扱う外部入出力信号、各種品質データ等も、この専用ネットワーク上に展開され、複数台のPLCで利用可能とする事で、巨大規模の設備、機能、工程に対して複数台のPLCによる役割分担、機能分割の容易化がはかられている。 In a production line of a plant, a dedicated network may be used which is updated in a fixed cycle of several ms to 10 ms (milliseconds). It may be required that the variation of the delay time of transmission / reception data of such a dedicated network be 1 ms or less. A programmable logic controller (Programmable Logic Controller, hereinafter referred to as PLC) is an input / output module that inputs measurement signals of environmental parameters such as temperature of each process and outputs drive signals for driving various actuators etc. And a controller or the like that controls an actuator or the like through an input / output module by a ladder program or the like. When facilities, functions, and processes to be controlled by PLC become a huge scale, there is a case where the whole facilities, functions, and processes are controlled by sharing roles or sharing functions among multiple PLCs. is there. At this time, the PLCs sharing the role need to closely communicate with each other, and a dedicated network may be used for the communication. In addition, external input / output signals handled by the aforementioned input / output modules etc., various quality data, etc. are also developed on this dedicated network, and can be used by multiple PLCs, making it possible for large-scale facilities, functions and processes. On the other hand, the division of roles and the division of functions by multiple PLCs are facilitated.
この専用ネットワークを汎用の産業用イーサネット(登録商標)に置き換えた場合には、データの更新周期のばらつきが10〜100msとなることがあり、PLC間のデータ通信の送受信に関しては定周期性が確保されないため、データの波形に歪みが生じる。 When this dedicated network is replaced with a general-purpose industrial Ethernet (registered trademark), the variation of the data update cycle may be 10 to 100 ms, and the periodicity is secured for transmission and reception of data communication between PLCs. Will cause distortion in the data waveform.
このため、データの更新周期のばらつきが制御に影響を及ぼさない範囲に制御実行周期を遅らせる必要があり、制御精度の低下等の問題が発生する。 For this reason, it is necessary to delay the control execution cycle to a range in which the variation of the data update cycle does not affect the control, which causes problems such as a decrease in control accuracy.
複数のPLCを要するシステムに対して、通信路による伝送時間ばらつきに因らない設定時刻の同期については、その同期方法がすでに提案されている(たとえば特許文献1参照)。しかしながら、PLC間のデータ連絡に関する更新周期のばらつきを考慮したものではなく、データの非定周期性を定周期に補正することを考慮していない。 For a system requiring a plurality of PLCs, a synchronization method has already been proposed for the synchronization of the set time not due to the transmission time variation due to the communication path (see, for example, Patent Document 1). However, the variation of the update cycle related to data communication between PLCs is not taken into consideration, and the correction of non-periodicity of data to a fixed cycle is not considered.
この発明は、上述のような課題を解決するためになされたもので、通信ネットワークを専用ネットワークから汎用ネットワークに置き換えた場合であっても、更新周期にばらつきのあるPLC間のデータ連絡を定周期のデータに補完することができるPLC間通信データ補完装置、PLC間通信データ補完方法およびPLC間通信データ補完プログラムを提供することを目的とする。 The present invention has been made to solve the problems as described above, and even when the communication network is replaced with a general purpose network from a dedicated network, periodical data communication between PLCs having a variation in the update cycle. It is an object of the present invention to provide an inter-PLC communication data interpolation device, an inter-PLC communication data interpolation method, and an inter-PLC communication data interpolation program, which can be supplemented to the above data.
本発明の実施形態は、上記の目的を達成するため、第1PLCと通信ネットワークを介して接続され、前記第1PLCと同じ制御サンプリング周期で動作する第2PLCのPLC間通信データ補完装置であって、
前記制御サンプリング周期毎に前記第1PLCから送信される、周期毎に更新されるカウンタ値とデータ値とを関連付けたデータを受信して記憶する記憶部と、
前記制御サンプリング周期毎に、前記記憶部に記憶された現周期のデータのカウンタ値と、1周期前のデータのカウンタ値とが同じ場合に遅延ありと判定する比較部と、
前記遅延ありと判定された場合に、前記記憶部に記憶された2周期前のデータのデータ値と1周期前のデータのデータ値との変化率に基づいて、現周期において受信されるべきデータのデータ値を推定し補完する補完部と、を備えることを特徴とする。
An embodiment of the present invention is an inter-PLC communication data complementing apparatus for a second PLC connected to a first PLC via a communication network and operating in the same control sampling cycle as the first PLC, in order to achieve the above object.
A storage unit that receives and stores data associated with a counter value and a data value, which are transmitted from the first PLC for each control sampling cycle, and are updated for each cycle;
A comparator that determines that there is a delay when the counter value of the current cycle data stored in the storage unit is the same as the counter value of the data one cycle before in each control sampling cycle;
The data to be received in the current cycle based on the rate of change between the data value of the data two cycles earlier stored in the storage unit and the data value of the data one cycle before when it is determined that there is the delay And a complementing unit that estimates and complements data values of
好ましくは、前記比較部は、前記遅延ありと判定された後の各周期において、前記記憶部に記憶された現周期のデータのカウンタ値と1周期前のデータのカウンタ値との差が2となるまでの間、遅延ありと判定すること、を特徴とする。 Preferably, in each of the cycles after it is determined that there is the delay, the comparison unit determines that the difference between the counter value of the data of the current cycle stored in the storage unit and the counter value of the data one cycle before is 2 It is characterized by determining that there is a delay until it becomes.
好ましくは、前記補完部は、1周期前と2周期前との間のデータ値の変化率と、2周期前と3周期前との間のデータ値の変化率との変化量に基づいて、現周期のデータのデータ値を推定し補完すること、を特徴とする。 Preferably, the complementing unit is configured to change the rate of change of the data value between one cycle before and two cycles before and the rate of change of the data value between two cycles before and three cycles before. Estimating and complementing data values of data of the current cycle.
本発明の実施形態によれば、データ受信側で更新周期のばらつきによるデータ波形の歪みを補完できるので、更新周期にばらつきのある通信ネットワークを介して、PLC間のデータ連絡を実施しても、定周期の専用ネットワークを介してデータ連絡を実施した際と同様のデータとして参照することができる。これにより、複数台のPLCによる役割の分担、及び、機能の分割が、PLCの負荷増大や制御精度の低下を考慮する事なく実現できる。 According to the embodiment of the present invention, since distortion of the data waveform due to the variation of the update cycle can be compensated on the data receiving side, even if communication of data between PLCs is performed via the communication network with the variation of the update cycle, It can be referred to as the same data as when performing data communication via a fixed period dedicated network. In this way, the division of roles and the division of functions by a plurality of PLCs can be realized without considering the increase in load on the PLC and the decrease in control accuracy.
以下、図面を参照しつつ、本発明の実施形態について説明する。
なお、図面は模式的または概念的なものであり、各部分の厚みと幅との関係、部分間の大きさの比率などは、必ずしも現実のものと同一とは限らない。また、同じ部分を表す場合であっても、図面により互いの寸法や比率が異なって表される場合もある。
なお、本願明細書と各図において、既出の図に関して前述したものと同様の要素には、同一の符号を付して詳細な説明を適宜省略する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
The drawings are schematic or conceptual, and the relationship between the thickness and width of each part, the ratio of sizes between parts, and the like are not necessarily the same as the actual ones. In addition, even in the case of representing the same portion, the dimensions and ratios may be different from one another depending on the drawings.
In the specification of the present application and the drawings, the same elements as those described above with reference to the drawings are denoted by the same reference numerals, and the detailed description will be appropriately omitted.
実施の形態1.
[システムの基本構成]
図1は、実施の形態1に係るシステム構成を例示するブロック図である。図1に示すシステムは、PLC1、通信ネットワーク20、PLC30を備える。PLC1はPLC30と通信ネットワーク20を介して接続され、PLC30が送信したデータを受信する。なお、PLC1とPLC30は同じ制御サンプリング周期で動作する。
[Basic system configuration]
FIG. 1 is a block diagram illustrating a system configuration according to the first embodiment. The system shown in FIG. 1 includes a
PLC1は、プログラマブルロジックコントローラである。PLC1は、後述するデータ波形の歪みを補完するデータ補完装置2を有する。PLC1は、たとえば、メモリに格納されたシーケンスプログラムによってシステムの制御を行うコントローラ、およびコントローラによって駆動される入出力モジュール等を含んでいる。コントローラ、メモリおよび入出力モジュール等は、通信ネットワーク20上で接続されていてもよく、他の専用ネットワーク上で接続されコントローラ等を介して通信ネットワーク20に接続されていてもよい。PLC1は、たとえばコントローラにデータ補完装置2を含むようにしてもよい。
データ補完装置2は、たとえばPLC1内部で逐次実行されるプログラムにしたがって動作するようにしてもよい。
The
PLC30は、プログラマブルロジックコントローラである。PLC30は、データ出力部31とカウンタ部32とを有する。PLC30は、たとえば、メモリに格納されたシーケンスプログラムによってシステムの制御を行うコントローラ、およびコントローラによって駆動される入出力モジュール等を含んでいる。コントローラ、メモリおよび入出力モジュール等は、通信ネットワーク20上で接続されていてもよく、他の専用ネットワーク上で接続されコントローラ等を介して通信ネットワーク20に接続されていてもよい。PLC30は、たとえばコントローラにデータ出力部31およびカウンタ部32を含むようにしてもよい。
The
データ出力部31は、データ値33を出力する。データ値33とは、たとえば各入出力モジュール等との間の送受信信号であり、PLC1とPLC30のPLC間データ連絡のために用いられる信号をいう。データ値33は、たとえば10msの定周期時間で出力される。カウンタ部32は、たとえば10msの定周期時間でカウントアップするカウンタ値34を生成する。PLC30は、同一周期におけるカウンタ値34とデータ値33とを関連付けたデータを通信ネットワーク20上に出力する。なお、カウンタ部32の出力は、カウントアップ動作に限らず、カウントダウン動作でもよいのはいうまでもない。
The
通信ネットワーク20は、例えば産業用イーサネット(登録商標)である。産業用イーサネット(登録商標)は、データの更新周期のばらつきが10〜100msとなることがあり、PLC間のデータ通信の送受信に関しては定周期性が確保されないため、データの波形に歪みが生じる。なお、通信ネットワーク20として、遅延時間のばらつきの少ない専用通信ネットワークを用いてもよく、本発明の適用を妨げるものでない。 The communication network 20 is, for example, Industrial Ethernet (registered trademark). In the industrial Ethernet (registered trademark), the variation of the data update cycle may be 10 to 100 ms, and the periodicity is not secured for transmission and reception of data communication between PLCs, and thus distortion of the data waveform occurs. A dedicated communication network with less variation in delay time may be used as the communication network 20, and the application of the present invention is not hindered.
次に、定周期性が確保されない通信ネットワーク20を介することによるデータの波形の歪みについて図2を参照して説明する。
図2は、実施の形態1に係るシステムの各部における動作波形を模式的に例示するタイミング図である。
Next, distortion of the waveform of data due to the communication network 20 in which the periodicity is not ensured will be described with reference to FIG.
FIG. 2 is a timing chart schematically illustrating an operation waveform in each part of the system according to the first embodiment.
図2の最上段の動作波形では、PLC30のデータ出力部31から出力されるデータ値33aおよびカウンタ部32から出力されるカウンタ値34aの動作波形が、PLC30サンプリング時間軸とともに概念的に示されている。図2の中段の動作波形では、PLC30から出力され、通信ネットワーク20上におけるデータ値33bおよびカウンタ値34bの動作波形がPLC1サンプリング時間軸とともに概念的に示されている。図2の最下段の動作波形では、PLC1に入力されたデータ値33cおよびカウンタ値34c、ならびに、データ補完装置2によって補完されたデータ値33dが、PLC1サンプリング時間軸とともに概念的に示されている。
The operation waveforms of the data value 33a output from the
図2の中段の動作波形に示すように、PLC30のデータ値33aは、通信ネットワーク20が汎用の産業用イーサネット(登録商標)上に展開されたときには、定周期性が維持されない。汎用の産業用イーサネット(登録商標)では、送受信の同時性が保証されず、通信トラフィック等によってネットワーク上に展開された信号の伝搬遅延時間は、たとえば10ms程度〜100ms程度まで大きくばらつくことがあるからである。そのため、信号の受信のタイミングは、この伝搬遅延時間のばらつきに支配されることがある。たとえば、データ値33bのように部分的に遅延が大きくなり、波形に歪みが生じる。
As shown in the operation waveform in the middle of FIG. 2, the data value 33 a of the
図2の最下段の動作波形に示すように、定周期性が維持されていないデータ値33bをPLC1の制御サンプリング周期で読み込むと、データ値33cのようなデータ更新抜けを伴う遅延となり、波形の歪みが元のデータ値33bに比べてさらに大きくなる。 As shown in the lowermost stage operation waveform of FIG. 2, when the data value 33b whose periodicity is not maintained is read in the control sampling period of PLC1, it becomes a delay accompanied by a data update omission like the data value 33c. The distortion is larger than the original data value 33b.
[実施の形態1における特徴的構成]
このようなデータ波形の歪みを補完する本実施形態のデータ補完装置2について、図1〜図4を参照して説明する。
[Characteristic Configuration in Embodiment 1]
The
本実施形態では、PLC1とPLC30は同じ制御サンプリング周期で動作している事から、PLC1で読み込むカウンタ値34cは、通信ネットワーク20に起因するデータの更新周期のばらつきがなければ、周期毎に1ずつカウントアップすることが期待される。一方、カウンタ値34cがカウントアップしない場合には、通信ネットワーク20に起因するデータの更新抜けを伴う遅延が生じており、現周期において受信されるべきデータが受信できていないと判断できる。このような場合であっても、PLC1は、現周期において受信されるべきデータを補完して、制御対象を制御できることが求められる。
In the present embodiment, since the
そこで、本実施形態のデータ補完装置2では、現周期において受信した現周期データのカウンタ値と、1周期前に受信したデータのカウンタ値とが同じ場合に遅延ありと判定する。そして、遅延ありと判定された場合に、2周期前に受信したデータのデータ値と1周期前に受信したデータのデータ値との変化率に基づいて、現周期において受信されるべきデータのデータ値を推定し補完することとした(データ値33d)。
Therefore, in the
このような処理を実現する本実施形態のデータ補完装置2について具体的に説明する。図1に示すデータ補完装置2は、補完部3と、記憶部4と、比較部5とを備える。データ補完装置2は、PLC30が送信したデータを通信ネットワーク20から受信する。受信したデータには、PLC30のPLC間連絡用のデータ値33およびカウンタ値34が含まれる。カウンタ値34は、PLC30の制御サンプリング周期で1ずつカウントアップするため、通信ネットワーク20に起因するデータの更新周期のばらつきがなければ、PLC1が受信するデータのカウンタ値も制御サンプリング周期毎に1ずつカウントアップする。
The
記憶部4は、制御サンプリング周期毎にカウンタ値34とデータ値33とが関連付いた最新の受信データ(現周期データ)を記憶する。なお、記憶部4には、過去の受信データ(1周期前データ、2周期前データ、・・・)も数周期分記憶している。
The
比較部5は、制御サンプリング周期毎に、記憶部4から読み出した現周期データのカウンタ値34と、1周期前データのカウンタ値34とを比較する。カウンタ値の差が1である場合には、遅延なしと判定する。一方、カウンタ値の差が0である場合には遅延ありと判定する。また、比較部5は、遅延ありと判定された後の各周期において、現周期データのカウンタ値と1周期前データのカウンタ値との差が2となるまでの間、遅延ありと判定する。一方、カウンタ値の差が2となった場合には、遅延状態が解消されたとして遅延なしと判定する。
The
補完部3は、比較部5による遅延判定の結果に応じて、現周期において受信されるべきデータのデータ値を推定し補完する補完処理を実行する。これにより、データ補完装置2から通信ネットワーク20に起因するデータ波形の歪みが補完されたデータ値が出力され、PLC1内部で利用可能となる。
The
比較部5の遅延判定の結果に応じた補完部3の処理について説明する。
比較部5において遅延なしと判定された場合には、通信ネットワーク20に起因するデータの更新周期のばらつきの影響がなかったとして、補完部3は、記憶部4に格納したデータ値33cをそのまま読み出し、データ補完装置2の出力とする。
The process of the
If the
一方、比較部5において遅延ありと判定された場合には、補完部3は、2周期前データのデータ値と1周期前データのデータ値との変化率に基づいて、現周期において受信されるべきデータのデータ値を推定し補完する。
On the other hand, when the
図3を参照して、現周期のデータ値の推定について説明する。図3は、各周期とデータ値との関係を示す図である。図3において、XN+1は現周期の時刻、XNは1周期前の時刻、XN−1は2周期前の時刻、YN+1は現周期のデータ値、YNは1周期前のデータ値、YN−1は2周期前のデータ値を示している。現周期においてXN、XN−1、YN、YN−1は既知である。制御サンプリング周期は一定なので、
XN+1−XN=XN−XN−1=Δt (const)
よって、XN+1は次式で表わされる。
XN+1=XN+Δt
The estimation of the data value of the current cycle will be described with reference to FIG. FIG. 3 is a diagram showing the relationship between each cycle and the data value. In FIG. 3, X N + 1 is the time of the current cycle, X N is the time of one cycle earlier, X N-1 is the time of two cycles earlier, Y N + 1 is the data value of the current cycle, and Y N is the data value of one cycle earlier , Y N-1 indicate data values two cycles before. X N , X N-1 , Y N and Y N-1 are known in the current cycle. Since the control sampling period is constant,
X N + 1 −X N = X N −X N−1 = Δt (const)
Therefore, X N + 1 is expressed by the following equation.
X N + 1 = X N + Δt
変化率aは、XN、XN−1、YN、YN−1より次式で表される。
a=(YN−YN−1)/(XN−XN−1)=(YN−YN−1)/Δt
The rate of change a is expressed by the following equation from X N , X N -1 , Y N , Y N -1 .
a = (Y N -Y N- 1) / (X N -X N-1) = (Y N -Y N-1) / Δt
推定したい現周期のデータ値YN+1は、微分式として
YN+1−YN=a×(XN+1−XN)=a・Δt
で表されるので、これを変形して、
YN+1=(YN−YN−1)/Δt×Δt+YN=YN×2−YN−1
すなわち、
(現周期のデータ値)=(1周期前のデータ値)×2
−(2周期前のデータ値) …(1)
と表される。
The data value Y N + 1 of the current period to be estimated is expressed as a differential expression Y N + 1 −Y N = a × (X N + 1 −X N ) = a · Δt
Since it is represented by, transform this,
Y N + 1 = (Y N -Y N-1 ) / Δt × Δt + Y N = Y N × 2-Y N-1
That is,
(Data value of the current cycle) = (data value of one cycle before) × 2
− (Data value two cycles before) ... (1)
It is expressed as
よって、補完部3は、遅延ありと判定された場合に式(1)で表される補完処理を用いて現周期のデータ値を予測演算し、予測演算された現周期のデータ値を、データ補完装置2の出力とする。補完処理は、カウンタの差が2となるまで継続する。補完処理により、記憶部4に記憶された図2のデータ値33cは、図2のデータ値33dのように補完される。
Therefore, when it is determined that there is a delay, the
(フローチャート)
図4は、上述の動作を実現するために、データ補完装置2が実行する補完処理ルーチンのフローチャートである。本ルーチンは、終了する度に繰り返し実行される。なお、他のルーチンによって、データ補完装置2は、通信ネットワーク20から受信したデータを逐次記憶部4に格納している。
(flowchart)
FIG. 4 is a flowchart of a complementing process routine executed by the
図4に示すルーチンでは、まず、比較部5は、記憶部4に格納された現周期データのカウンタ値と1周期前データのカウンタ値との差を算出する(ステップS100)。
In the routine shown in FIG. 4, first, the
次に、比較部5は、カウンタ値の差が0か否かを判定する(ステップS110)。カウンタ値の差が1と判定された場合は、現周期において受信すべき最新データを受信できており、補完処理は不要である。そのため、ステップS160の処理に進む。ステップS160において、補完部3は、記憶部4から現周期データのデータ値をそのまま読み出して、データ補完装置2の出力とする。
Next, the
一方、ステップS110において、カウンタ値の差が0と判定された場合、補完部3は、現周期において受信されるべきデータのデータ値を推定し補完する補完処理を実行する(ステップS120)。具体的には、上述した式(1)を用いて現周期のデータ値を予測演算し、予測演算された現周期のデータ値を、データ補完装置2の出力とする。
On the other hand, when the difference between the counter values is determined to be 0 in step S110, the
その後、次の制御サンプリング周期に進み(ステップS130)、比較部5は、記憶部4に格納された現周期データのカウンタ値と1周期前データのカウンタ値との差を算出する(ステップS140)。
Thereafter, the process proceeds to the next control sampling cycle (step S130), and the
次に、比較部5は、カウンタ値の差が2か否かを判定する(ステップS150)。カウンタ値の差が2と判定されるまでは、ステップS120に戻って補完処理を継続する。一方、カウンタ値の差が2と判定された場合には、遅延状態が解消し、現周期において受信すべき最新データを受信できており、補完処理は不要である。そのため、ステップS160の処理に進む。ステップS160において、補完部3は、記憶部4から現周期データのデータ値をそのまま読み出して、データ補完装置2の出力とする。その後、本ルーチンは終了され、次の制御サンプリング周期において再び本ルーチンは開始される。
Next, the
以上説明したように、図4に示すルーチンによれば、PLC間のデータ通信に、定周期性が確保されない通信ネットワーク20を用いて、データ更新抜けを伴う遅延が発生した場合であっても、現周期において受信されるべきデータのデータ値を推定し補完することができる。そのため、PLC1は、補完したデータ値を用いて制御対象に制御信号を与えることができる。 As described above, according to the routine shown in FIG. 4, even when a delay accompanied by a data update omission occurs using the communication network 20 in which the periodicity is not ensured for data communication between PLCs, Data values of data to be received in the current cycle can be estimated and supplemented. Therefore, PLC1 can give a control signal to a control object using a complemented data value.
実施の形態2.
次に、図5を参照して本発明の実施の形態2について説明する。本実施形態のシステムは図1に示す構成において、補完部3に後述する予測演算を実施させることで実現することができる。
Second Embodiment
A second embodiment of the present invention will now be described with reference to FIG. The system of the present embodiment can be realized by causing the
上述した実施の形態1では、2周期前のデータのデータ値と1周期前のデータのデータ値との変化率(傾き)に着目し、上述した式(1)を用いて現周期において受信されるべきデータのデータ値を予測演算している。しかしながら、図5に示すように、変化率(傾き)の変化が急峻な場合には予測演算の精度が悪くなる。そこで、本実施形態では、1周期前と2周期前との間のデータ値の変化率と、2周期前と3周期前との間のデータ値の変化率との変化量に基づいて、現周期のデータのデータ値を予測演算する。 In the first embodiment described above, attention is paid to the rate of change (slope) between the data value of the data two cycles earlier and the data value of the data one cycle ago, and reception is performed in the current cycle using the above equation (1). The data value of the data to be calculated is predicted. However, as shown in FIG. 5, when the change in the change rate (slope) is steep, the accuracy of the prediction calculation is degraded. Therefore, in the present embodiment, the current value is calculated based on the rate of change of the data value between one cycle before and two cycles before and the change rate of the data value between two cycles before and three cycles before. Predictive operation is performed on data values of periodic data.
図5を参照して、現周期のデータ値の推定について説明する。図5は、各周期とデータ値との関係を示す図である。図5において、XN+1は現周期の時刻、XNは1周期前の時刻、XN−1は2周期前の時刻、XN−2は3周期前の時刻、YN+1は現周期のデータ値、YNは1周期前のデータ値、YN−1は2周期前のデータ値、YN−2は3周期前のデータ値を示している。現周期においてXN、XN−1、XN−2、YN、YN−1、YN−2は既知である。制御サンプリング周期は一定なので、
XN+1−XN=XN−XN−1=XN−1−XN−2=Δt (const)
よって、XN+1は次式で表される。
XN+1=XN+Δt
The estimation of the data value of the current cycle will be described with reference to FIG. FIG. 5 is a diagram showing the relationship between each period and the data value. In FIG. 5, X N + 1 is the time of the current cycle, X N is the time of one cycle earlier, X N-1 is the time of 2 cycles earlier, X N-2 is the time of 3 cycles earlier, Y N + 1 is the data of the current cycle value, Y N data values one cycle before, Y N-1 are two periods before the data values, Y N-2 represents the data value of the previous three cycles. X N, X N-1, X N-2, Y N, Y N-1, Y N-2 in the current cycle is known. Since the control sampling period is constant,
X N + 1 -X N = X N -X N-1 = X N-1 -X N-2 = Δt (const)
Therefore, X N + 1 is expressed by the following equation.
X N + 1 = X N + Δt
変化率aNは、XN、XN−1、YN、YN−1より次式で表される。
aN=(YN−YN−1)/(XN−XN−1)=(YN−YN−1)/Δt
変化率aN−1は、XN−1、XN−2、YN−1、YN−2より次式で表される。
aN−1=(YN−1−YN−2)/(XN−1−XN−2)=(YN−1−YN−2)/Δt
変化率aN+1は、次式で表される。
aN+1=a×Δt+aN
ここで、a=(aN−aN−1)/Δt
よって、aN+1=2aN−aN−1=(2YN−3YN−1+YN−2)/Δt
The rate of change a N is represented by the following equation from X N , X N -1 , Y N , Y N -1 .
a N = (Y N -Y N -1) / (X N -X N-1) = (Y N -Y N-1) / Δt
The rate of change a N-1 is represented by the following equation using X N-1 , X N-2 , Y N-1 , and Y N-2 .
aN-1 = (YN -1- YN -2 ) / (XN -1- XN -2 ) = (YN -1- YN -2 ) /? t
The change rate a N + 1 is expressed by the following equation.
a N + 1 = a × Δt + a N
Here, a = (a N -a N -1 ) / Δt
Therefore, a N + 1 = 2a N -a N-1 = (2Y N -3Y N-1 + Y N-2) / Δt
推定したい現周期のデータ値YN+1は、
YN+1=aN+1・Δt+YN=3YN−3YN−1+YN−2
すなわち、
(現周期のデータ値)=(1周期前のデータ値)×3
−(2周期前のデータ値)×3
+(3周期前のデータ値) …(2)
と表される。
The data value Y N + 1 of the current cycle to be estimated is
Y N + 1 = a N + 1 · Δt + Y N = 3 Y N -3 Y N -1 + Y N -2
That is,
(Data value of the current cycle) = (data value of one cycle before) × 3
− (
+ (Data value three cycles earlier) ... (2)
It is expressed as
よって、補完部3は、遅延ありと判定された場合に式(2)で表される補完処理を用いて現周期のデータ値を予測演算し、予測演算された現周期のデータ値を、データ補完装置2の出力とする。補完処理は、カウンタの差が2となるまで継続する。補完処理により、記憶部4に記憶された図2のデータ値33cは、図2のデータ値33dのように補完される。
Therefore, when it is determined that there is a delay, the
以上説明したように、本発明の実施の形態2によれば、補完部3において予測演算に式(2)を用いることで、図5のように変化率(傾き)の変化が急峻な場合においても、実施の形態1と同様に、現周期において受信されるべきデータのデータ値を推定し補完することができる。そのため、PLC1は補完したデータ値を用いて制御対象に制御信号を与えることができる。
As described above, according to the second embodiment of the present invention, when equation (2) is used for the prediction calculation in the
実施の形態3.
次に、図6を参照して本発明の実施の形態3について説明する。図6に示す構成は、カウンタ部6、比較部5aを除き図1の構成と同様である。
Third Embodiment
A third embodiment of the present invention will now be described with reference to FIG. The configuration shown in FIG. 6 is the same as the configuration of FIG. 1 except for the counter unit 6 and the
上述した実施の形態1では、PLC1とPLC30は同じ制御サンプリング周期で動作していることを前提としていたが、PLC1自身の動作周期がPLC30の制御サンプリング周期と異なる場合もある。そこで、本実施形態では、独立したカウンタ部6をPLC1内部に実装し、PLC30のカウンタ部32との時間的関係を定義することで、PLC1の動作周期をPLC30の制御サンプリング周期に合わせることとした。このとき、比較部5aでは、カウンタ部6からのカウンタ値と、記憶部4から読み出したPLC30のカウンタ部32のカウンタ値との時間的関係を考慮したタイミングで、補完部3に遅延判定の結果を出力する。比較部5aにおける遅延判定内容は図1の比較部5と同様である。また、その他の処理は実施の形態1と同様であるため説明は省略する。
Although in the above-described first embodiment, the
以上説明したように、本発明の実施の形態3によれば、PLC1自身の動作周期がPLC30の制御サンプリング周期と異なる場合であっても、実施の形態1、2で説明した補完処理を適用することができ、同様の効果を得ることができる。
As described above, according to the third embodiment of the present invention, even when the operation cycle of
1 PLC
2 データ補完装置
3 補完部
4 記憶部
5、5a 比較部
6 カウンタ部
20 通信ネットワーク
30 PLC
31 データ出力部
32 カウンタ部
33 データ値
34 カウンタ値
1 PLC
31
Claims (5)
前記制御サンプリング周期毎に前記第1PLCから送信される、周期毎に更新されるカウンタ値と制御対象への制御信号に関するデータ値とを関連付けたデータを受信して記憶する記憶部と、
前記制御サンプリング周期毎に、前記記憶部に記憶された現周期のデータのカウンタ値と、1周期前のデータのカウンタ値とが同じ場合に遅延ありと判定する比較部と、
前記遅延ありと判定された場合に、前記記憶部に記憶された2周期前のデータのデータ値と1周期前のデータのデータ値との変化率に基づいて、現周期において受信されるべきデータのデータ値を推定し補完する補完部と、
を備えることを特徴とするPLC間通信データ補完装置。 An inter-PLC communication data supplementing apparatus for a second PLC connected to the first PLC via a communication network that does not ensure periodicity with respect to transmission and reception, and operating in the same control sampling cycle as the first PLC,
A storage unit configured to receive and store data in which the counter value updated every cycle and the data value related to the control signal to be controlled , which are transmitted from the first PLC for each control sampling cycle, are associated;
A comparator that determines that there is a delay when the counter value of the current cycle data stored in the storage unit is the same as the counter value of the data one cycle before in each control sampling cycle;
The data to be received in the current cycle based on the rate of change between the data value of the data two cycles earlier stored in the storage unit and the data value of the data one cycle before when it is determined that there is the delay A complementing unit that estimates and complements data values of
An inter-PLC communication data complementing device comprising:
を特徴とする請求項1に記載のPLC間通信データ補完装置。 The comparison unit is configured such that the difference between the counter value of the data of the current period stored in the storage unit and the counter value of the data one cycle before becomes 2 in each cycle after the delay is determined to be present. To determine that there is a delay,
The inter-PLC communication data complementing device according to claim 1, characterized in that
を特徴とする請求項1又は2に記載のPLC間通信データ補完装置。 The complementing unit is configured to calculate the change rate of the data value between one cycle before and two cycles before and the change rate of the data value between two cycles before and three cycles before. Estimating and complementing the data values of the data,
The inter-PLC communication data complementing device according to claim 1 or 2, characterized in that
前記制御サンプリング周期毎に前記第1PLCから送信される、周期毎に更新されるカウンタ値と制御対象への制御信号に関するデータ値とを関連付けたデータを受信して記憶するステップと、
前記制御サンプリング周期毎に、記憶された現周期のデータのカウンタ値と、1周期前のデータのカウンタ値とが同じ場合に遅延ありと判定するステップと、
前記遅延ありと判定された場合に、2周期前のデータのデータ値と1周期前のデータのデータ値との変化率に基づいて、現周期において受信されるべきデータのデータ値を推定し補完するステップと、
を備えることを特徴とするPLC間通信データ補完方法。 A method for supplementing communication data between PLCs of a second PLC which is connected to the first PLC via a communication network where constant periodicity is not secured for transmission and reception and which operates in the same control sampling cycle as the first PLC,
Receiving and storing data associating the counter value updated from each cycle with the data value related to the control signal to the control target, which data is transmitted from the first PLC every control sampling cycle;
Determining that there is a delay when the counter value of the stored data of the current cycle is the same as the counter value of the data one cycle before in each control sampling cycle;
If it is determined that there is the delay, the data value of the data to be received in the current cycle is estimated and complemented based on the rate of change between the data value of the data two cycles earlier and the data value of the data one cycle earlier. Step to
An inter-PLC communication data supplement method comprising:
第2PLCを、
前記制御サンプリング周期毎に前記第1PLCから送信される、周期毎に更新されるカウンタ値と制御対象への制御信号に関するデータ値とを関連付けたデータを受信して記憶する記憶手段と、
前記制御サンプリング周期毎に、前記記憶手段に記憶された現周期データのカウンタ値と、1周期前のデータのカウンタ値とが同じ場合に遅延ありと判定する比較手段と、
前記遅延ありと判定された場合に、前記記憶手段に記憶された2周期前のデータのデータ値と1周期前のデータのデータ値との変化率に基づいて、現周期において受信されるべきデータのデータ値を推定し補完する補完手段と、
して機能させるためのPLC間通信データ補完プログラム。 An inter-PLC communication data supplement program for a second PLC connected to the first PLC via a communication network that does not ensure periodicity with respect to transmission and reception, and operating in the same control sampling cycle as the first PLC,
Second PLC,
Storage means for receiving and storing data associating the counter value updated every cycle and the data value related to the control signal to the control target transmitted from the first PLC for every control sampling cycle;
Comparing means for determining that there is a delay when the counter value of the current cycle data stored in the storage means is the same as the counter value of data one cycle before in each control sampling cycle;
The data to be received in the current cycle based on the rate of change between the data value of the data two cycles earlier and the data value of the data one cycle earlier stored in the storage means when it is determined that there is the delay Complementary means for estimating and complementing the data values of
Inter-PLC communication data supplement program to make it function.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016002521A JP6524920B2 (en) | 2016-01-08 | 2016-01-08 | Inter-PLC communication data complementing apparatus, inter-PLC communication data complementing method and inter-PLC communication data complementing program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016002521A JP6524920B2 (en) | 2016-01-08 | 2016-01-08 | Inter-PLC communication data complementing apparatus, inter-PLC communication data complementing method and inter-PLC communication data complementing program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2017123102A JP2017123102A (en) | 2017-07-13 |
| JP6524920B2 true JP6524920B2 (en) | 2019-06-05 |
Family
ID=59306656
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2016002521A Active JP6524920B2 (en) | 2016-01-08 | 2016-01-08 | Inter-PLC communication data complementing apparatus, inter-PLC communication data complementing method and inter-PLC communication data complementing program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6524920B2 (en) |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH0617412A (en) * | 1992-07-02 | 1994-01-25 | Toshiba Corp | Water system monitoring device |
| JP2004272403A (en) * | 2003-03-06 | 2004-09-30 | Mitsubishi Electric Corp | Process input / output device and monitoring control system using the same |
| JP2005267398A (en) * | 2004-03-19 | 2005-09-29 | Yaskawa Electric Corp | Inter-PLC communication system and transmission abnormality detection method thereof |
| JP2007114858A (en) * | 2005-10-18 | 2007-05-10 | Yaskawa Electric Corp | Display method and display apparatus for transmission and reception data of fixed period |
| JP4383476B2 (en) * | 2007-10-05 | 2009-12-16 | 新日本製鐵株式会社 | Plant control system and method |
-
2016
- 2016-01-08 JP JP2016002521A patent/JP6524920B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2017123102A (en) | 2017-07-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106873506B (en) | Correction device, control method for correction device, information processing program, and recording medium | |
| US9354651B2 (en) | Sizing and tuning methodology for optimized motion control components and energy efficiency | |
| CN111143989A (en) | Frequency adjustment amount calculation method, module, system, storage medium, and device | |
| KR20160125942A (en) | Programmable controller system and controller therefor | |
| Zhao et al. | A predictive control-based approach to networked Hammerstein systems: design and stability analysis | |
| KR20170135384A (en) | Apparatus for distributed clock synchronization based on EtherCAT, method thereof and computer recordable medium storing the method | |
| JP6524920B2 (en) | Inter-PLC communication data complementing apparatus, inter-PLC communication data complementing method and inter-PLC communication data complementing program | |
| EP3822734B1 (en) | Control device and control method | |
| KR101379248B1 (en) | Ethernet communication system and time synchronization method | |
| US8214415B2 (en) | Interpolator for a networked motion control system | |
| Yang et al. | Design of a networked control system with random transmission delay and uncertain process parameters | |
| Velagic | Design of Smith-like predictive controller with communication delay adaptation | |
| KR20010040569A (en) | System and method for generating a real-time signal | |
| Durand et al. | Event-triggered observer-based output-feedback stabilization of linear system with communication delays in the measurements | |
| Zhang et al. | Time delay compensation in a wireless tracking control system with previewed reference | |
| Olaya et al. | Reliable wireless control: Wireless connection in the control loop | |
| Durand et al. | Self-triggered control for the stabilization of linear systems | |
| Pohjola et al. | Tuning of PID controllers for networked control systems | |
| KR102755339B1 (en) | Device and method for controlling frame transmission timing | |
| JP6751244B2 (en) | Auto tuning device | |
| KR20250119472A (en) | Method for controlling a distributed system with at least one sensor, a control unit and an actuator | |
| DK177915B1 (en) | Process control method | |
| EP4582883A1 (en) | Method of determining at least one operational parameter of a component of a closed control loop | |
| Zhang et al. | Time-stamped dynamic matrix control for networked control systems | |
| Voit et al. | Adaptive switching controllers for tracking with hybrid communication protocols |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20180205 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20181129 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20181204 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190122 |
|
| 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: 20190409 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20190422 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6524920 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |