JP7375977B1 - Programmable logic controller, support device, display device, logging method, support method, and display method - Google Patents
Programmable logic controller, support device, display device, logging method, support method, and display method Download PDFInfo
- Publication number
- JP7375977B1 JP7375977B1 JP2023076791A JP2023076791A JP7375977B1 JP 7375977 B1 JP7375977 B1 JP 7375977B1 JP 2023076791 A JP2023076791 A JP 2023076791A JP 2023076791 A JP2023076791 A JP 2023076791A JP 7375977 B1 JP7375977 B1 JP 7375977B1
- Authority
- JP
- Japan
- Prior art keywords
- control
- variables
- values
- collected
- program
- 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
- 238000000034 method Methods 0.000 title claims description 373
- 238000012545 processing Methods 0.000 claims abstract description 110
- 238000004364 calculation method Methods 0.000 claims description 7
- 239000000284 extract Substances 0.000 claims description 3
- 238000010586 diagram Methods 0.000 abstract description 20
- 101100408464 Caenorhabditis elegans plc-1 gene Proteins 0.000 description 41
- 238000004891 communication Methods 0.000 description 26
- 230000006870 function Effects 0.000 description 18
- 230000001276 controlling effect Effects 0.000 description 13
- 230000001360 synchronised effect Effects 0.000 description 12
- 238000004458 analytical method Methods 0.000 description 11
- 238000006243 chemical reaction Methods 0.000 description 11
- 238000001514 detection method Methods 0.000 description 6
- 230000000875 corresponding effect Effects 0.000 description 4
- 102100026205 1-phosphatidylinositol 4,5-bisphosphate phosphodiesterase gamma-1 Human genes 0.000 description 3
- 101000691599 Homo sapiens 1-phosphatidylinositol 4,5-bisphosphate phosphodiesterase gamma-1 Proteins 0.000 description 3
- 230000005856 abnormality Effects 0.000 description 3
- 238000007792 addition Methods 0.000 description 3
- 238000013480 data collection Methods 0.000 description 3
- 238000005259 measurement Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 239000000203 mixture Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 230000002596 correlated effect Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000004886 process control Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Images
Abstract
【課題】PLCによる機器の制御において使用される変数の値を適切に収集する。
【解決手段】制御部は、外部機器を制御するための制御プログラムを実行するプログラム実行処理と、制御プログラムにおいて使用されている変数の値を収集するロギング処理とを含む制御処理を、制御周期毎に繰り返す。制御部は、制御プログラムにおいて使用されている複数の変数を複数の制御周期に分割し、複数の制御周期各々において複数の変数のうち一部の変数の値を収集することで、複数の変数それぞれの値を制御周期よりも長い収集期間内に収集する。
【選択図】図11
An object of the present invention is to appropriately collect values of variables used in controlling equipment using a PLC.
[Solution] A control unit performs control processing, including program execution processing for executing a control program for controlling external equipment, and logging processing for collecting values of variables used in the control program, every control cycle. Repeat. The control unit divides a plurality of variables used in a control program into a plurality of control cycles, and collects the values of some of the plurality of variables in each of the plurality of control cycles. The value of is collected within a collection period that is longer than the control period.
[Selection diagram] Figure 11
Description
本発明は、プログラマブルロジックコントローラ(Programmable Logic Controller,PLC)の技術に関する。 The present invention relates to a programmable logic controller (PLC) technology.
PLCに関して、監視機器から入力される各種データとデバイス値との時間的な関係を特定しやすくする技術が知られている(例えば、特許文献1を参照)。ユーザアプリケーションの実行や機器の制御に影響なくロギングを行える技術も知られている(例えば、特許文献2を参照)。スケジューラを実装したPLCも知られている(例えば、特許文献3を参照)。 Regarding PLC, a technique is known that makes it easier to specify the temporal relationship between various data input from monitoring equipment and device values (see, for example, Patent Document 1). A technique is also known that allows logging to be performed without affecting the execution of user applications or the control of devices (see, for example, Patent Document 2). PLCs equipped with a scheduler are also known (for example, see Patent Document 3).
特許文献1及び特許文献2のPLCでは、機器の制御に与える影響を抑制しながら、機器及びPLCの動作状態を示すデータを大量に収集することが難しい。
With the PLCs of
1つの側面において、本発明は、PLCによる機器の制御において使用される変数の値を適切に収集することを目的とする。 In one aspect, the present invention aims to appropriately collect values of variables used in controlling equipment by PLC.
1つの実施形態によれば、プログラマブルロジックコントローラは、制御部を含む。制御部は、制御処理を制御周期毎に繰り返す。制御処理は、外部機器を制御するための制御プログラムを実行するプログラム実行処理と、制御プログラムにおいて使用されている変数の値を収集するロギング処理とを含む。 According to one embodiment, a programmable logic controller includes a controller. The control unit repeats the control process every control cycle. The control process includes a program execution process that executes a control program for controlling external equipment, and a logging process that collects values of variables used in the control program.
制御部は、制御プログラムにおいて使用されている複数の変数を複数の制御周期に分割し、複数の制御周期各々において複数の変数のうち一部の変数の値を収集することで、複数の変数それぞれの値を制御周期よりも長い収集期間内に収集する。 The control unit divides a plurality of variables used in a control program into a plurality of control cycles, and collects the values of some of the plurality of variables in each of the plurality of control cycles. The value of is collected within a collection period that is longer than the control period.
別の実施形態によれば、プログラマブルロジックコントローラは、制御処理を制御周期毎に繰り返す。制御処理は、外部機器を制御するための制御プログラムを実行するプログラム実行処理と、制御プログラムにおいて使用されている変数の値を収集するロギング処理とを含む。 According to another embodiment, the programmable logic controller repeats the control process every control cycle. The control process includes a program execution process that executes a control program for controlling external equipment, and a logging process that collects values of variables used in the control program.
プログラマブルロジックコントローラは、支援装置から出力される設定情報に基づいて、制御プログラムにおいて使用されている複数の変数を複数の制御周期に分割し、複数の制御周期各々において複数の変数のうち一部の変数の値を収集する。これにより、プログラマブルロジックコントローラは、複数の変数それぞれの値を制御周期よりも長い収集期間内に収集する。 A programmable logic controller divides multiple variables used in a control program into multiple control cycles based on setting information output from a support device, and divides some of the variables in each of the multiple control cycles. Collect variable values. Thereby, the programmable logic controller collects the values of each of the plurality of variables within a collection period that is longer than the control cycle.
支援装置は、プログラム解析部、選択部、受付部、及び設定情報出力部を含む。プログラム解析部は、制御プログラムを解析して、制御プログラムにおいて使用されている変数を抽出する。選択部は、抽出された変数の中から、制御プログラムにおいて使用されている複数の変数を選択する。受付部は、収集期間の指定を受け付ける。設定情報出力部は、制御プログラムにおいて使用されている複数の変数を示す情報と収集期間を示す情報とを、設定情報として出力する。 The support device includes a program analysis section, a selection section, a reception section, and a setting information output section. The program analysis section analyzes the control program and extracts variables used in the control program. The selection unit selects a plurality of variables used in the control program from among the extracted variables. The reception department accepts the designation of the collection period. The setting information output unit outputs information indicating a plurality of variables used in the control program and information indicating a collection period as setting information.
さらに別の実施形態によれば、プログラマブルロジックコントローラは、制御処理を制御周期毎に繰り返す。制御処理は、外部機器を制御するための制御プログラムを実行するプログラム実行処理と、制御プログラムにおいて使用されている変数の値を収集するロギング処理とを含む。 According to yet another embodiment, the programmable logic controller repeats the control process every control cycle. The control process includes a program execution process that executes a control program for controlling external equipment, and a logging process that collects values of variables used in the control program.
プログラマブルロジックコントローラは、制御プログラムにおいて使用されている複数の変数を複数の制御周期に分割し、複数の制御周期各々において複数の変数のうち一部の変数の値を収集する。これにより、プログラマブルロジックコントローラは、複数の変数それぞれの値を制御周期よりも長い収集期間内に収集する。 A programmable logic controller divides a plurality of variables used in a control program into a plurality of control periods, and collects values of some of the variables in each of the plurality of control periods. Thereby, the programmable logic controller collects the values of each of the plurality of variables within a collection period that is longer than the control cycle.
プログラマブルロジックコントローラによって収集された情報を表示する表示装置は、表示部を含む。表示部は、収集期間における複数の変数それぞれの値の収集時刻と対応付けて、複数の変数それぞれの値を表示する。 A display device that displays information collected by a programmable logic controller includes a display section. The display unit displays the values of each of the plurality of variables in association with the collection time of each value of the plurality of variables during the collection period.
1つの側面によれば、PLCによる機器の制御において使用される変数の値を適切に収集することができる。 According to one aspect, values of variables used in controlling equipment by PLC can be appropriately collected.
以下、図面を参照しながら、実施形態を詳細に説明する。 Hereinafter, embodiments will be described in detail with reference to the drawings.
PLCは、ファクトリーオートメーションにおいて製造機器、搬送装置、検査装置等を制御する制御装置である。PLCは、ラダープログラム等の、ユーザにより作成されるユーザアプリケーションプログラムを実行することで様々な制御機器を制御する。 PLC is a control device that controls manufacturing equipment, transport equipment, inspection equipment, etc. in factory automation. PLCs control various control devices by executing user application programs created by users, such as ladder programs.
PLCのような制御装置による機器の制御において異常が発生した場合には、その異常の原因を特定することが望ましい。また、このような異常の発生の場合に限られず、機器の制御に関する情報を記録しておいて、その後に情報を検証したいという要望がある。そこで、ユーザが、データの履歴を残すための条件を予め制御装置に設定しておき、この条件に基づいて、制御装置が、機器及び制御装置自体の動作状態を示すデータをロギングすることがある。 When an abnormality occurs in the control of equipment by a control device such as a PLC, it is desirable to identify the cause of the abnormality. In addition, there is a desire to record information related to control of equipment and to verify the information afterward, not only in the case of occurrence of such an abnormality. Therefore, the user may set conditions in the control device in advance for keeping a data history, and based on these conditions, the control device may log data indicating the operating status of the equipment and the control device itself. .
特許文献1のPLCでは、各制御周期において、入力処理、ユーザアプリケーションプログラムを実行するプログラム実行処理、出力処理、及びロギング処理が順に実行される。しかしながら、入力処理、プログラム実行処理、及び出力処理に続いてロギング処理が追加されることで、制御周期が長くなると、次の制御周期の開始が遅延する。このため、ユーザアプリケーションがユーザの意図した通りに動作しないことがある。
In the PLC of
特許文献2のPLCでは、ロギング処理の追加によって制御周期が長くなることはないが、制御周期の伸長を抑えるために、ロギングされるデータのデータ量が制限されることがある。
In the PLC of
図1は、PLCシステムの構成例を示している。図1のPLCシステムは、PLC1と、パーソナルコンピュータ(Personal Computer,PC)2と、入出力モジュール3と、通信モジュール4とを含む。PLC1とPC2とは通信ケーブル6を介して接続されている。PLC1は、工場等に設置される各種制御機器を統括的に制御する。
FIG. 1 shows an example of the configuration of a PLC system. The PLC system in FIG. 1 includes a
PC2はPLC1を支援する支援装置としての機能を提供する。PC2は、例えば、ユーザアプリケーションプログラムの編集を行うために用いられる。ユーザアプリケーションプログラムは、外部機器を制御するための制御プログラムに対応する。なお、以降の説明では、ユーザアプリケーションプログラムを「ユーザプログラム」と称することがある。
The PC2 provides a function as a support device that supports the PLC1. The
ユーザプログラムは、例えば、IEC(International Electrotechnical Commission)61131-3準拠のラダー言語を用いて作成されてもよい。ユーザプログラムは、シーケンシャルファンクションチャート(Sequential Function Chart,SFC)等のフローチャート形式のモーションプログラム等といったグラフィカルプログラミング言語を用いて作成されてもよい。ユーザプログラムは、C言語等の高級プログラミング言語を用いて作成されてもよい。 The user program may be created using, for example, a ladder language compliant with IEC (International Electrotechnical Commission) 61131-3. The user program may be created using a graphical programming language such as a motion program in a flowchart format such as a Sequential Function Chart (SFC). The user program may be created using a high-level programming language such as the C language.
また、後述するように、PC2は、ロギング処理の実行の条件の設定を行う機能も提供する。
Furthermore, as will be described later, the
PLC1と入出力モジュール3及び通信モジュール4とは通信バス7を介して接続されている。通信バス7には、複数の入出力モジュール3や複数の通信モジュール4が接続されていてもよい。入出力モジュール3及び通信モジュール4は、着脱可能となっている。入出力モジュール3及び通信モジュール4は、外部機器に対応する。
The
入出力モジュール3は、サーボアンプやエンコーダ、あるいは、センサの信号を電気信号に変換するものであり、また、デジタル信号若しくはアナログ信号を入出力するものであってもよい。
The input/
通信モジュール4は、他の機器との通信インタフェースを提供する。
図2は、図1のPLCシステムにおいてPLC1が実行する各処理の実行期間の例を示している。
FIG. 2 shows an example of the execution period of each process executed by the
PLC1は、入力処理、プログラム実行処理、出力処理、ロギング処理、及びシステム処理を含む制御処理を、制御周期毎に繰り返す。入力処理は、入出力モジュール3から受信した入力データを取り込む処理である。プログラム実行処理は、ユーザにより作成されたユーザプログラムを実行する処理である。このユーザプログラムの実行では、入力処理により取り込まれた入力データが用いられる。出力処理は、ユーザプログラムの実行結果を出力することによって入出力モジュール3を制御して、実行結果を入出力モジュール3の出力に反映させる処理である。
The
ロギング処理は、ユーザプログラムにおいて使用されている変数の値を収集して、収集データを生成する処理である。ロギング処理は、PLC1を含むPLCシステムの各構成機器の動作状態を示すデータを記録し、履歴として保存する処理でもある。システム処理は、PLC1自身の動作を管理して、適正な動作を維持するための処理である。
The logging process is a process of collecting values of variables used in a user program and generating collected data. The logging process is also a process of recording data indicating the operating state of each component of the PLC system including the
PLC1は、ユーザプログラムの実行を妨げないように、各制御周期における出力処理の後にロギング処理を実行する。制御周期は、入力処理、プログラム実行処理、出力処理、ロギング処理、及びシステム処理の実行期間の合計である。したがって、ロギング処理の実行期間は、制御周期の帯域により制限される。制御周期は、例えば、ユーザにより指定される。
The
図3は、図1のPLCシステムにおいて用いられる収集期間の例を示している。図3の収集期間は、制御周期よりも長い期間であり、複数のロギング処理の実行期間を含む。各ロギング処理の実行期間は、複数の制御周期各々に含まれている。したがって、収集期間内において、収集対象の複数の変数が複数の制御周期それぞれのロギング処理に分割されて、制御周期とは非同期に変数の値が収集される。 FIG. 3 shows an example of a collection period used in the PLC system of FIG. 1. The collection period in FIG. 3 is longer than the control cycle, and includes the execution period of a plurality of logging processes. The execution period of each logging process is included in each of a plurality of control cycles. Therefore, within the collection period, a plurality of variables to be collected are divided into logging processes for each of a plurality of control cycles, and the values of the variables are collected asynchronously with the control cycles.
これにより、ユーザプログラムと機器の制御に関連する入力処理、プログラム実行処理、及び出力処理の実行期間に影響を与えることなく、所望のデータ量の変数の値を収集することが可能になる。したがって、機器の制御において使用される変数の値を適切に収集することができる。 This makes it possible to collect variable values in a desired amount of data without affecting the execution period of input processing, program execution processing, and output processing related to user program and device control. Therefore, values of variables used in controlling the equipment can be appropriately collected.
なお、プログラム実行処理、システム処理、及びロギング処理のそれぞれの実行期間の割合を変更することによってロギング処理の実行期間を調整可能にしてもよい。 Note that the execution period of the logging process may be adjustable by changing the ratio of the execution period of each of the program execution process, system process, and logging process.
次に、PLCシステムにおけるPLC1及びPC2についてさらに詳細に説明する。 Next, PLC1 and PC2 in the PLC system will be explained in more detail.
まず、PLC1のハードウェア構成について、図4に示されているハードウェア構成例を参照しながら説明する。図4のPLC1は通信I/F11、CPU(Central Processing Unit)12、バスコントローラ13、メモリ14、及び記憶装置I/F15を含む。これらの構成要素は何れもハードウェアであって、内部バス16に接続されており、相互にデータの授受を行うことが可能である。「I/F」とはインタフェースの略称である。CPUは、プロセッサと呼ばれることもある。
First, the hardware configuration of the
通信I/F11は通信ケーブル6に接続されており、PC2との間で行われる各種のデータの授受を管理する。
The communication I/
CPU12は、ユーザプログラム、PLC1自身の動作を管理するためのシステムプログラム、ロギング実行プログラム等の各種のプログラムを実行する。
The
バスコントローラ13は通信バス7に接続されており、入出力モジュール3や通信モジュール4との間で行われる各種のデータの授受を管理する。
The
メモリ14は、例えば半導体メモリであり、RAM(Random Access Memory)領域及びROM(Read Only Memory)領域を含む。RAM領域は、CPU12が各種のプログラムを実行する際に各種のデータを一時的に記憶しておく記憶領域として利用される。ROM領域は、各種のプログラムやデータが保存される領域であり、例えば不揮発性メモリが用いられる。
The
記憶装置I/F15は、メモリカード等の外部記憶装置17に対する各種のデータの書き込み処理や読み出し処理を管理する。
The storage device I/
次に、PC2のハードウェア構成について、図5に示されているハードウェア構成例を参照しながら説明する。図5のPC2はCPU21、メモリ22、入力装置23、表示装置24、補助記憶装置25、及び通信I/F26を含む。これらの構成要素は何れもハードウェアであって、内部バス27に接続されており、相互にデータの授受を行うことが可能である。
Next, the hardware configuration of the
CPU21は、例えば、メモリ22を利用して所定のプログラムを実行することにより、ユーザプログラムの編集機能や、ロギング処理の実行の条件の設定を行うための機能を提供する。
The
入力装置23は、例えば、キーボードやポインティングデバイス等であり、ユーザからの指示又は情報の入力に用いられる。
The
表示装置24は、例えば、ユーザへの問い合わせ又は指示や、処理結果の表示出力に用いられる。
The
補助記憶装置25は、磁気ディスク装置、光ディスク装置、光磁気ディスク装置等であり、例えば、ハードディスクドライブやフラッシュメモリであってもよい。PC2は、補助記憶装置25にプログラム及びデータを格納しておき、それらをメモリ22にロードして使用することができる。
The
通信I/F26は通信ケーブル6に接続されており、PLC1との間で行われる各種のデータの授受を管理する。
The communication I/
<ロギングの設定> <Logging settings>
次に、図1のPLCシステムにおいて、ロギング処理の実行の条件をPLC1に設定する手法について説明する。
Next, a method of setting conditions for executing logging processing in the
まず図6について説明する。図6は支援装置30の機能構成例を示した図である。この構成例は、PLC1によるロギング処理の実行の条件を設定する機能を支援装置30が提供する場合の一例である。PLCシステムでは、所定の設定ツールプログラムをPC2に実行させることによって、支援装置30の機能をPC2が提供する。
First, FIG. 6 will be explained. FIG. 6 is a diagram showing an example of the functional configuration of the
図6において、支援装置30は、プログラム解析部31、選択部32、受付部33、設定情報出力部34、計算部35、及びデータ量出力部36を含む。なお、支援装置30には、制御処理をPLC1に行わせるときの制御周期がユーザにより予め設定されているものとする。
In FIG. 6, the
プログラム解析部31は、PLC1に実行させるユーザプログラムを解析して、ユーザプログラムにおいて使用されている複数の変数を抽出する。
The
選択部32は、抽出された変数の中から、ユーザプログラムにおいて使用されている複数の変数を、収集対象の変数として選択する。
The
受付部33は、制御周期よりも長い収集期間の指定を受け付ける。設定情報出力部34は、収集対象の複数の変数を示す情報と収集期間を示す情報とを、設定情報として出力する。
The accepting
PLC1は、支援装置30から出力される設定情報に基づいて、収集対象の複数の変数を複数の制御周期に分割し、複数の制御周期各々において、収集対象の複数の変数のうち一部の変数の値を収集する。これにより、PLC1は、収集対象の複数の変数それぞれの値を収集期間内に収集する。
The
計算部35は、収集期間及び制御周期に基づいて、収集対象の複数の変数それぞれの値が分割して収集される複数の制御周期の個数を決定する。そして、計算部35は、複数の変数それぞれの値の総データ量と複数の制御周期の個数とに基づいて、複数の制御周期各々において収集される一部の変数の値のデータ量を求める。
The
データ量出力部36は、複数の制御周期各々において収集される一部の変数の値のデータ量を出力する。
The data amount
このような支援装置30によれば、機器の制御に影響を与えることなく、所望のデータ量の変数の値を収集する処理を、PLC1に実行させることが可能になる。したがって、機器の制御において使用される変数の値を適切に収集することができる。
According to the
図6のような構成を含む支援装置30によって行われる支援方法の一例である、ロギング処理の実行の条件の設定を行う方法について、図7を用いてさらに詳細に説明する。
A method for setting conditions for executing logging processing, which is an example of a support method performed by the
支援装置30には設定ツール40が備えられている。PC2では、所定の設定ツールプログラムをCPU21に実行させることによって設定ツール40の機能が提供される。
The
設定ツール40にはプロジェクトデータ41が入力される。プロジェクトデータ41は、PLCシステムのシステム構成の情報、PLC1で実行させるユーザプログラム、及び、PLCシステムが含む入出力モジュール3や通信モジュール4等についての機能設定情報を含む情報である。ここでは、このプロジェクトデータ41は、例えばPC2において所定のプロジェクトデータ編集プログラムを実行することによりユーザによって既に作成されていて、例えば補助記憶装置25に既に記憶されているものとする。
設定ツール40により、まず、このプロジェクトデータ41に対してS110の収集対象設定処理が行われる。この処理は、ユーザプログラムで使用されている変数から、ロギングの対象とする変数を設定する処理であって、図6の支援装置30におけるプログラム解析部31及び選択部32の機能を提供する処理である。
The
このS110の処理はS111のプログラム解析処理を含む。プログラム解析処理は、プロジェクトデータ41に含まれているユーザプログラムを解析して、ユーザプログラムで使用されている複数の変数を抽出する処理である。S110の収集対象設定処理では、プログラム解析処理の実行によって抽出された変数から、PLC1に行わせるロギング処理による収集対象の変数をユーザに選択させる処理がさらに行われる。
The process of S110 includes the program analysis process of S111. The program analysis process is a process of analyzing a user program included in the
ここで図8について説明する。図8は、S110の収集対象設定処理で用いられるUI(User Interface)画面100の画面例を表している。 Now, FIG. 8 will be explained. FIG. 8 shows an example of a UI (User Interface) screen 100 used in the collection target setting process of S110.
図8の画面例では、UI画面100は、プログラム選択部101、抽出変数表示部102、及び対象変数表示部103を含む。支援装置30の機能を図5のPC2が提供する場合、表示装置24は、UI画面100を表示する。
In the screen example of FIG. 8, the UI screen 100 includes a program selection section 101, an extracted variable display section 102, and a target variable display section 103. When the
プログラム選択部101には、プロジェクトデータ41に含まれていたユーザプログラムを示す情報が表示される。なお、本実施形態では、複数のプログラムの集合体としてタスクが構成され、複数のタスクの集合体としてユーザプログラムが構成されているものとする。図8の画面例において、「アプリ名称」はユーザプログラムの名称であり、「タスク1」、「タスク2」、及び「タスク3」は各タスクの名称であり、「プログラム」、「プログラムN」は各タスクに属する各プログラムの名称である。この画面例では、ユーザプログラムと各タスクと各プログラムとの関係をツリー形式で表現することが表されている。
Information indicating the user program included in the
プログラム選択部101に表示されているプログラムの名称の何れかを選択する操作がユーザにより行われると、選択された名称に対応するプログラムに対してS111のプログラム解析処理が行われ、そのプログラムで使用されている変数が抽出される。なお、プログラムの名称の代わりにタスクの名称を選択する操作が行われた場合には、選択された名称に対応するタスクに属するプログラムのそれぞれから変数が抽出される。このとき、抽出された変数の名称が抽出変数表示部102に一覧表示される。 When the user performs an operation to select one of the program names displayed in the program selection section 101, the program analysis process of S111 is performed on the program corresponding to the selected name. The variables that are specified are extracted. Note that when an operation is performed to select a task name instead of a program name, variables are extracted from each of the programs belonging to the task corresponding to the selected name. At this time, the names of the extracted variables are displayed in a list on the extracted variable display section 102.
抽出変数表示部102に表示されている変数の名称のうちから何れか1以上を選択し、登録ボタン104を押下する操作がユーザにより行われると、選択された名称に対応する変数が収集対象の変数として特定される。このとき、特定された収集対象の変数の名称が対象変数表示部103に一覧表示される。
When the user selects one or more of the variable names displayed in the extracted variable display area 102 and presses the
なお、対象変数表示部103に表示されている収集対象の変数の名称のうちから何れか1以上を選択し、解除ボタン105を押下する操作がユーザにより行われると、選択された名称に対応する変数が収集対象の変数から除外される。
Note that when the user selects one or more of the names of the variables to be collected displayed in the target variable display section 103 and presses the
また、一括登録ボタン106を押下する操作がユーザにより行われると、抽出変数表示部102に名称が表示されている変数の全てが収集対象の変数として選択され、その名称が対象変数表示部103に一覧表示される。その一方で、一括解除ボタン107を押下する操作がユーザにより行われると、対象変数表示部103に名称が表示されている変数の全てが収集対象の変数から除外される。
Furthermore, when the user presses the
また、S110の収集対象設定処理では、以上のようにして選択された収集対象の変数の全てについてロギング処理を実行した場合に収集される総データ量がプロジェクトデータ41に基づいて算出される。得られた総データ量は、UI画面100における収集データサイズ表示部108に表示される。
In addition, in the collection target setting process of S110, the total amount of data that will be collected when the logging process is executed for all of the collection target variables selected as described above is calculated based on the
ユーザにより予め設定されている制御周期は、UI画面100における制御周期表示部109に表示される。
The control cycle preset by the user is displayed on the control
図7の説明に戻る。S120では収集動作設定処理が行われる。この処理は、ロギング処理の動作設定のための情報を作成する処理であって、図6の支援装置30における受付部33の機能を提供する処理である。この情報によって、例えば、収集対象のデータである変数の値の収集タイミング、データの収集を行う収集期間、収集したデータをPLC1が外部記憶装置17に保存させる保存タイミング等の設定がPLC1に対して行われる。
Returning to the explanation of FIG. 7. In S120, collection operation setting processing is performed. This process is a process that creates information for setting the operation of the logging process, and is a process that provides the function of the
収集期間を指定する操作がユーザにより行われると、指定された収集期間が受け付けられて、UI画面100における収集期間表示部110に表示される。
When the user performs an operation to specify a collection period, the specified collection period is accepted and displayed on the collection
上述したS110及びS120の処理に続いて、S130の設定内容確認処理が行われる。この処理は、S110の処理により選択された収集対象の変数の全てについてPLC1がロギング処理を実行した場合における制御処理の実行時間が、予め設定されている制御周期に収まるかどうかを判定する処理である。この処理は、さらに、図6の支援装置30における計算部35及びデータ量出力部36の機能も提供する。
Following the processes of S110 and S120 described above, a setting content confirmation process of S130 is performed. This process is a process that determines whether the execution time of the control process when the
この処理では、例えば、PLC1により実行される制御処理における入力処理、プログラム実行処理、出力処理、及びシステム処理の実行時間がプロジェクトデータ41から算出される。そして、これらの実行時間の合計が制御周期から減算される。この減算によって得られる時間は、ロギング処理が実行可能な時間であり、この時間を「最大処理時間」と称することとする。
In this process, for example, execution times of input processing, program execution processing, output processing, and system processing in the control processing executed by the
次に、この最大処理時間に基づき、この時間内に収集可能なデータのデータ量が、制御周期で収集可能な最大サイズとして求められる。そして、この最大サイズと、S110の処理により算出していた総データ量(UI画面100における収集データサイズ表示部108に表示される値)との大小比較が行われ、総データ量が最大サイズ以下であるかどうかが判定される。
Next, based on this maximum processing time, the amount of data that can be collected within this time is determined as the maximum size that can be collected in the control cycle. Then, a comparison is made between this maximum size and the total data amount calculated in the process of S110 (the value displayed on the collected data
総データ量が最大サイズを超えている場合、制御周期に非同期でのロギングを有効にする設定ボックス112の選択が可能になる。
If the total amount of data exceeds the maximum size, it becomes possible to select a
設定ボックス112を選択する操作がユーザにより行われると、図5のCPU21は、計算部35として動作し、収集期間及び制御周期に基づいて、収集期間の分割数を決定する。分割数は、収集対象の複数の変数それぞれの値が分割して収集される複数の制御周期の個数を表す。CPU21は、例えば、収集期間を制御周期で除算することで、分割数を計算することができる。
When the user performs an operation to select the
次に、CPU21は、収集データサイズ表示部108に表示された総データ量と分割数とに基づいて、制御周期で収集可能なデータサイズを求める。制御周期で収集可能なデータサイズは、複数の制御周期各々において収集される一部の変数の値のデータ量を表す。CPU21は、例えば、総データ量を分割数で除算することで、制御周期で収集可能なデータサイズを計算することができる。
Next, the
図8の例では、制御周期が1msであり、収集期間が200msであるため、分割数は、200ms/1ms=200となる。また、総データ量は400kWである。Wは、ワード数を表す。この場合、制御周期で収集可能なデータサイズは、400kW/200=2kWとなる。 In the example of FIG. 8, the control period is 1 ms and the acquisition period is 200 ms, so the number of divisions is 200 ms/1 ms=200. Also, the total amount of data is 400kW. W represents the number of words. In this case, the data size that can be collected in the control cycle is 400kW/200=2kW.
制御周期で収集可能なデータサイズは、UI画面100におけるデータサイズ表示部111に表示される。データサイズ表示部111に表示されている2kW/30kWのうち、2kWが制御周期で収集可能なデータサイズであり、30kWは制御周期で収集可能な最大サイズである。この場合、図5の表示装置24は、データ量出力部36として動作し、制御周期で収集可能なデータサイズをUI画面100に表示する。
The data size that can be collected in a control cycle is displayed on the data
制御周期、収集期間、収集データサイズ、及び制御周期で収集可能なデータサイズをUI画面100に表示することによって、例えば、収集対象の変数の検討をユーザに想起させることが可能になる。 By displaying the control cycle, collection period, collection data size, and data size that can be collected in the control cycle on the UI screen 100, it becomes possible to remind the user to consider the variables to be collected, for example.
次に、S140の設定ファイル作成処理が行われる。この設定ファイル作成処理は、図6の支援装置30における設定情報出力部34の機能を提供する処理である。図5の通信I/F26は、設定情報出力部34として動作する。
Next, a setting file creation process of S140 is performed. This setting file creation process is a process that provides the function of the setting
設定ファイル作成処理は、S110の処理により選択された収集対象の変数を特定する情報とS120の処理により設定されたロギング処理の動作設定情報とをロギング設定データ42として出力する処理である。ロギング設定データ42は、設定情報出力部34が出力する設定情報に対応する。ロギング設定データ42はPLC1に転送され、PLC1では、ロギング処理についての動作設定が、ロギング設定データ42の内容に基づいて行われる。
The configuration file creation process is a process that outputs, as logging
ロギング設定データ42についてさらに説明する。図9は、ロギング設定データ42のデータ構造の一例を示している。
The
ロギング設定データ42は、プロジェクトデータ情報51と、収集動作設定情報52と、収集対象設定情報53とを含む。
The
プロジェクトデータ情報51は、PLC1に実行させるユーザプログラムを特定する情報であり、例えば、ユーザプログラムをコンパイルして得られるオブジェクトコードに付された名称(プロジェクト名)や、コンパイルの実行日時等の情報を含む。なお、プロジェクトデータ情報51は、プロジェクトデータ41の一部として含まれている。
The
収集動作設定情報52はS120の収集動作設定処理によって作成される情報である。収集動作設定情報52には、例えば、収集タイミング、ユーザにより指定された収集期間、及び収集方式が含まれている。収集タイミングは、収集期間が開始されるタイミングを表す。
The collection
収集方式は、同期又は非同期を示す情報である。同期は、制御周期に同期してロギングを行う収集方式であり、非同期は、制御周期とは非同期にロギングを行う収集方式である。図8の設定ボックス112が選択された場合、収集方式として非同期が設定され、それ以外の場合、収集方式として同期が設定される。
The collection method is information indicating synchronous or asynchronous. Synchronous is a collection method that performs logging in synchronization with the control cycle, and asynchronous is a collection method that performs logging asynchronously with the control cycle. If the
収集動作設定情報52には、収集したデータをPLC1が外部記憶装置17に保存させる保存タイミング、及び収集したデータを保存させる保存先の外部記憶装置17を特定する情報も含まれている。
The collection
収集対象設定情報53は、S110の収集対象設定処理によって選択された収集対象の変数についての情報である。収集対象設定情報53のデータ構造の一例が図10に示されている。
The collection
図10の例では、収集対象設定情報53には、データの収集タイミングにおける収集データの合計サイズの情報が含まれている。また、収集対象設定情報53には、収集対象の変数の個数の情報が含まれている。さらに、収集対象設定情報53には、収集対象の変数のそれぞれについての情報として、メモリ種別、データ型、メモリアドレス、及びデータサイズの情報が含まれている。これらの情報によって、PLC1においてユーザプログラムが実行されたときに収集対象の変数の値の保持に使用される記憶領域の位置についてのメモリ14上の位置が特定される。
In the example of FIG. 10, the collection
PLC1によるロギング処理の実行の条件の設定は、上述した設定ツール40を用いることによって、支援装置30によって行われる。
Setting of the conditions for execution of the logging process by the
<ロギングの実行> <Execution of logging>
次に、図1のPLCシステムにおいて、支援装置30としてのPC2によって設定された条件に従ってPLC1により行われるロギング処理について説明する。
Next, a logging process performed by the
まず図11について説明する。図11はロギング処理を行うPLC1の機能構成例を示した図である。図11に示した構成例では、PLC1は、制御部61を含む。
First, FIG. 11 will be explained. FIG. 11 is a diagram showing an example of the functional configuration of the
制御部61は、入力処理、プログラム実行処理、出力処理、ロギング処理、及びシステム処理を含む制御処理を、制御周期毎に繰り返す。制御部61は、支援装置30から出力されるロギング設定データ42に基づいて、収集対象の複数の変数を複数の制御周期に分割し、複数の制御周期各々において、収集対象の複数の変数のうち一部の変数の値を収集する。これにより、制御部61は、収集対象の複数の変数それぞれの値を収集期間内に収集する。図4に示したハードウェア構成例では、CPU12が制御部61として動作する。
The
このようなPLC1によれば、機器の制御に影響を与えることなく、所望のデータ量の変数の値を収集することが可能になる。したがって、機器の制御において使用される変数の値を適切に収集することができる。
According to such a
図11のような構成要素を含むPLC1によって行われるロギング実行方法について、図12を用いてさらに詳細に説明する。S220、S250、S260、S270、及びS280の処理は、制御部61によって行われる。
The logging execution method performed by the
S220のプログラム実行処理は、入力処理で取り込まれた、入出力モジュール3や通信モジュール4から送られてくる入力データを用いてユーザプログラムを実行する処理である。この実行結果は、入出力モジュール3や通信モジュール4の制御のために出力処理によって出力される。図5のハードウェア構成例において、このプログラム実行処理を実行するCPU12は、ユーザプログラムの実行のためにメモリ14の記憶領域を使用する。このときに使用される記憶領域を、プログラム使用領域14aと称することとする。
The program execution process of S220 is a process of executing a user program using the input data sent from the input/
S250のロギング処理は、S220のプログラム実行処理により実行されるユーザプログラムにおいて使用されている変数のうち収集対象の変数の値を収集する処理である。この収集対象の変数についての情報と、ロギング処理の動作設定情報とを含むロギング設定データ42は、支援装置30(PC2)において前述したようにして作成されてPLC1に予め提供されているものとする。
The logging process of S250 is a process of collecting values of variables to be collected among the variables used in the user program executed by the program execution process of S220. It is assumed that the
S260の時刻管理処理とS270の収集タイミング検知処理は、入力処理、プログラム実行処理、出力処理、ロギング処理、及びシステム処理を含む制御処理と並行して行われる。時刻管理処理は現在の時刻を計時する処理である。収集タイミング検知処理は、ロギング設定データ42に含まれている収集動作設定情報52により示されているデータの収集タイミングの到来を検知する処理である。
The time management process in S260 and the collection timing detection process in S270 are performed in parallel with control processes including input processing, program execution processing, output processing, logging processing, and system processing. The time management process is a process of measuring the current time. The collection timing detection process is a process of detecting the arrival of the data collection timing indicated by the collection
S250のロギング処理では、収集タイミング検知処理による収集タイミングの到来の検知に応じて、収集対象の変数の値を収集する処理が行われる。また、ロギング処理では、変数の値の収集時刻を時刻管理処理による計時結果から取得し、変数の値とその収集時刻とをそれぞれ対応付けた収集データをリングバッファ62に保存する処理が行われる。
In the logging process of S250, the process of collecting the values of the variables to be collected is performed in response to the detection of the arrival of the collection timing by the collection timing detection process. In addition, in the logging process, a process is performed in which the collection time of the variable value is acquired from the time measurement result by the time management process, and the collected data in which the variable value and the collection time are associated with each other is stored in the
リングバッファ62は、ロギング処理による変数の値の収集時刻を、その収集時刻に収集された変数の値に対応付けた収集データを、変数の値を収集する度に保存する記憶領域である。図4に示したハードウェア構成例では、メモリ14の記憶領域の一部によってリングバッファ62が構成される。
The
また、PLC1のCPU12はS280の保存処理を実行する。この保存処理は、ロギング設定データ42に含まれている収集動作設定情報52により示されている保存タイミングの到来を検知する処理を含む。また、この保存処理は、記憶装置I/F15を制御して、リングバッファ62に保存されている収集データを保存タイミングの到来の検知に応じて読み出させて、収集動作設定情報52により示されている保存先である外部記憶装置17に保存させる処理を含む。
Further, the
ここで、S250のロギング処理とS280の保存処理とについて、図13に示したフローチャートを用いてさらに詳細に説明する。 Here, the logging process in S250 and the storage process in S280 will be explained in more detail using the flowchart shown in FIG.
図13において、S258及びS259の処理は保存処理の詳細を表しており、残余のS251からS257の各処理はロギング処理の詳細を表している。 In FIG. 13, the processes of S258 and S259 represent the details of the storage process, and the remaining processes of S251 to S257 represent the details of the logging process.
図13に示されている処理は、各制御周期の制御処理において、ロギング処理の処理開始タイミングが到来すると開始される。 The processing shown in FIG. 13 is started when the processing start timing of the logging processing arrives in the control processing of each control cycle.
まず、S251において、前述したS270の収集タイミング検知処理によって収集タイミングの到来が検知されたか否かを判定する処理が行われる。この判定処理において、収集タイミングの到来が検知されたと判定されたとき(判定結果がYESのとき)には、S252において、ロギング設定データ42の収集動作設定情報52に含まれる収集方式が非同期であるか否かを判定する処理が行われる。
First, in S251, a process is performed to determine whether or not the collection timing has been detected by the collection timing detection process in S270 described above. In this determination process, when it is determined that the arrival of the collection timing has been detected (when the determination result is YES), in S252, the collection method included in the collection
収集方式が非同期であるとき(判定結果がYESのとき)には、S253の非同期収集処理が行われ、収集方式が同期であるとき(判定結果がNOのとき)には、S254の同期収集処理が行われる。 When the collection method is asynchronous (when the determination result is YES), asynchronous collection processing in S253 is performed, and when the collection method is synchronous (when the determination result is NO), synchronous collection processing in S254 is performed. will be held.
S251の判定処理において、収集タイミングの到来が検知されないと判定されたとき(判定結果がNOのとき)には、S255において、ロギング設定データ42の収集動作設定情報52に含まれる収集方式が非同期であるか否かを判定する処理が行われる。
In the determination process of S251, when it is determined that the arrival of the collection timing is not detected (when the determination result is NO), in S255, the collection method included in the collection
収集方式が非同期であるとき(判定結果がYESのとき)には、S256において、ロギング設定データ42の収集対象設定情報53に情報が含まれていた収集対象の変数の全てについて値の収集を済ませたか否かを判定する処理が行われる。この判定処理において、値の収集を済ませていない収集対象の変数が残っていると判定されたとき(判定結果がNOのとき)には、S257の非同期収集処理が行われる。
When the collection method is asynchronous (when the determination result is YES), in S256, values are collected for all the collection target variables whose information was included in the collection
S255の判定処理において、収集方式が同期であるとき(判定結果がNOのとき)には、図13に示されている処理が終了する。S256の判定処理において、収集対象の変数の全てについて値の収集を済ませたと判定されたとき(判定結果がYESのとき)には、図13に示されている処理が終了する。 In the determination process of S255, when the collection method is synchronous (when the determination result is NO), the process shown in FIG. 13 ends. In the determination process of S256, when it is determined that values have been collected for all of the variables to be collected (when the determination result is YES), the process shown in FIG. 13 ends.
S253の非同期収集処理、S254の同期収集処理、及びS257の非同期収集処理では、収集対象の変数の値が収集され、収集された値が、後述する収集データ73としてリングバッファ62に保存される。
In the asynchronous collection process of S253, the synchronous collection process of S254, and the asynchronous collection process of S257, the values of the variables to be collected are collected, and the collected values are stored in the
S253の非同期収集処理、S254の同期収集処理、又はS257の非同期収集処理に続き、S258では、ロギング設定データ42に含まれている収集動作設定情報52により示されている保存タイミングが到来したか否かを判定する処理が行われる。この判定処理において、保存タイミングが到来したと判定したとき(判定結果がYESのとき)にはS259に処理を進める。一方、この判定処理において、保存タイミングが到来しないと判定したとき(判定結果がNOのとき)には、S259の処理を行わずに、図13に示されている処理が終了する。
Following the asynchronous collection process in S253, the synchronous collection process in S254, or the asynchronous collection process in S257, in S258 it is determined whether the storage timing indicated by the collection
S259では、今回実行中のロギング処理におけるS253の非同期収集処理、S254の同期収集処理、又はS257の非同期収集処理によりリングバッファ62に保存された収集データ73を読み出す処理が行われる。S259では、読み出された収集データ73を、収集動作設定情報52で示されている保存先の外部記憶装置17にロギング収集データ70として保存する処理も行われる。
In S259, a process is performed to read the collected
ロギング収集データ70についてさらに説明する。図14は、ロギング収集データ70のデータ構造の一例を示している。
The
ロギング収集データ70は、プロジェクトデータ情報51と、収集データ数71と、収集データサイズ72と、1以上の収集データ73とを含む。
The
プロジェクトデータ情報51は、PLC1で実行されたユーザプログラムを特定する情報であり、例えば、ユーザプログラムをコンパイルして得られるオブジェクトコードに付された名称や、コンパイルの実行日時の情報を含む。つまり、ロギング収集データ70に含まれているプロジェクトデータ情報51は、ロギング設定データ42に含まれていたプロジェクトデータ情報51と同様のものである。CPU12は、S253の非同期収集処理、S254の同期収集処理、及びS257の非同期収集処理において、ロギング設定データ42からプロジェクトデータ情報51を読み出してロギング収集データ70に取り込む。
The
収集データ数71は、ロギング収集データ70に含まれている収集データ73の個数を表している情報である。また、収集データサイズ72は、ロギング収集データ70に含まれている収集データ73の総データ量を表している情報である。
The number of collected
ロギング収集データ70には、収集データ73として、収集された変数の値についてのデータが、収集された順序に従って含まれている。この収集データ73のデータ構造の一例が図15に示されている。
The logging collected
図15の例では、収集データ73にはタイムスタンプの情報が含まれている。このタイムスタンプは、変数の値の収集が行われたときの時刻を表している。
In the example of FIG. 15, the collected
また、収集データ73には、タイムスタンプの時刻において収集された1以上の変数のそれぞれの値を表す変数データが、「変数データ1」、「変数データ2」、・・・、「変数データN」として含まれている。
In addition, the collected
S259の処理では、ロギング設定データ42とリングバッファ62に保存された収集データ73とを用いて、このようなデータ構造を有するロギング収集データ70を作成して外部記憶装置17に保存する処理が行われる。
In the process of S259, the
S259の処理が終了すると、図13に示されている処理が終了する。図13の処理によれば、収集方式が非同期である場合、S251において収集タイミングの到来が検知されていない場合であっても、S257の非同期収集処理が行われる。したがって、S253の非同期収集処理に続いて、S257の非同期収集処理が制御周期毎に繰り返される。これにより、制御周期とは非同期に変数の値を収集することが可能になる。 When the process of S259 ends, the process shown in FIG. 13 ends. According to the process of FIG. 13, when the collection method is asynchronous, the asynchronous collection process of S257 is performed even if the arrival of the collection timing is not detected in S251. Therefore, following the asynchronous collection process in S253, the asynchronous collection process in S257 is repeated every control cycle. This makes it possible to collect variable values asynchronously with the control cycle.
なお、図13のフローチャートで示したロギング処理が終了したときには、CPU12は、ロギング設定データ42を外部記憶装置17にさらに保存する処理も行うようにする。このロギング設定データ42は、後述する収集データ73の表示の際に使用される。
Note that when the logging process shown in the flowchart of FIG. 13 is completed, the
次に、図13におけるS254の同期収集処理について、図16に示したフローチャートを用いてさらに詳細に説明する。 Next, the synchronous collection process of S254 in FIG. 13 will be described in more detail using the flowchart shown in FIG.
まず、S261において、今回の制御周期における制御処理についてのロギング処理の実行時間の計測を開始する処理が行われる。 First, in S261, a process is performed to start measuring the execution time of the logging process for the control process in the current control cycle.
次に、S262において、前述したS260の時刻管理処理により計時されている現在の時刻をタイムスタンプとして取得し、得られたタイムスタンプを収集データ73のタイムスタンプとしてリングバッファ62に書き込む処理が行われる。
Next, in S262, a process is performed in which the current time measured by the time management process in S260 described above is obtained as a timestamp, and the obtained timestamp is written into the
次に、S263において、収集対象の各変数の現在の値を取得し、収集データ73のタイムスタンプの書き込み位置に続けて、取得した値を、変数データとして、収集対象の変数に対応づけられた所定の順序でリングバッファ62に書き込む処理が行われる。
Next, in S263, the current value of each variable to be collected is acquired, and the acquired value is associated with the variable to be collected as variable data following the writing position of the time stamp of the collected
収集対象の変数の値は、ロギング設定データ42の収集対象設定情報53に含まれている収集対象の変数についてのメモリ種別、データ型、メモリアドレス、及びデータサイズの情報に基づいて特定される、プログラム使用領域14a上の位置で保持されている。したがって、S263の処理では、この位置で保持されているデータを読み出すことによって、収集対象の変数の値の取得が行われ、リングバッファ62への書き込みが行われる。
The value of the variable to be collected is specified based on the information on the memory type, data type, memory address, and data size regarding the variable to be collected, which is included in the collection
次に、S264において、S261の処理により計測を開始した今回のロギング処理の実行時間が、前述した最大処理時間内に収まっているか否かを判定する処理が行われる。この判定処理において、今回のロギング処理の実行時間が最大処理時間内に収まっていると判定されたとき(判定結果がYESのとき)にはS265に処理を進める。一方、この判定処理において、今回のロギング処理の実行時間が最大処理時間内に収まらなかったと判定されたとき(判定結果がNOのとき)には、今回の収集処理が終了する。なお、処理の高速化を目的として、このS264の処理を、次に説明するS265の判定処理における、収集対象の変数の全てについて値の収集を済ませたと判定されたとき(判定結果がYESのとき)の後に行うようにしてもよい。 Next, in S264, a process is performed to determine whether the execution time of the current logging process whose measurement was started in the process of S261 is within the maximum processing time described above. In this determination process, when it is determined that the execution time of the current logging process is within the maximum processing time (when the determination result is YES), the process advances to S265. On the other hand, in this determination process, when it is determined that the execution time of the current logging process does not fall within the maximum processing time (when the determination result is NO), the current collection process ends. Note that for the purpose of speeding up the process, the process in S264 is performed when it is determined that values have been collected for all the variables to be collected (when the determination result is YES) in the determination process in S265, which will be described next. ) may be performed after.
S265では、ロギング設定データ42の収集対象設定情報53に情報が含まれていた収集対象の変数の全てについて値の収集を済ませたか否かを判定する処理が行われる。この判定処理において、収集対象の変数の全てについて値の収集を済ませたと判定されたとき(判定結果がYESのとき)には今回の収集処理が終了する。一方、この判定処理において、値の収集を済ませていない収集対象の変数が残っていると判定されたとき(判定結果がNOのとき)にはS263へ処理を戻して、値の収集を済ませていない収集対象の変数について、その値を収集する処理が行われる。
In S265, a process is performed to determine whether values have been collected for all of the collection target variables whose information was included in the collection
以上の収集処理が終了すると、収集データ73のリングバッファ62への保存が完了し、続いて図13のS258の処理が行われる。
When the above collection process is completed, the storage of the collected
次に、図13におけるS253及びS257の非同期収集処理について、図17に示したフローチャートを用いてさらに詳細に説明する。 Next, the asynchronous collection processing in S253 and S257 in FIG. 13 will be described in more detail using the flowchart shown in FIG.
まず、S271において、今回の制御周期における制御処理についてのロギング処理の実行時間の計測を開始する処理が行われる。 First, in S271, a process is performed to start measuring the execution time of the logging process for the control process in the current control cycle.
次に、S272において、図13のS251における収集タイミングの到来に伴ってS253の非同期収集処理が開始されたか否かを判定する処理が行われる。この判定処理において、S253の非同期収集処理が開始されたと判定されたとき(判定結果がYESのとき)にはS273に処理を進める。一方、この判定処理において、S257の非同期収集処理が開始されたと判定されたとき(判定結果がNOのとき)にはS278に処理を進める。 Next, in S272, a process is performed to determine whether or not the asynchronous collection process in S253 has been started with the arrival of the collection timing in S251 in FIG. In this determination process, when it is determined that the asynchronous collection process in S253 has started (when the determination result is YES), the process advances to S273. On the other hand, in this determination process, when it is determined that the asynchronous collection process in S257 has been started (when the determination result is NO), the process advances to S278.
S273では、現在の時刻をタイムスタンプとして取得し、得られたタイムスタンプを収集データ73のタイムスタンプとしてリングバッファ62に書き込む処理が行われる。
In S273, a process is performed in which the current time is acquired as a timestamp and the acquired timestamp is written into the
次に、S274において、収集対象の各変数の現在の値を取得し、収集データ73のタイムスタンプの書き込み位置に続けて、取得した値を、変数データとして、収集対象の変数に対応づけられた所定の順序でリングバッファ62に書き込む処理が行われる。
Next, in S274, the current value of each variable to be collected is acquired, and the acquired value is associated with the variable to be collected as variable data following the writing position of the time stamp of the collected
次に、S275において、ロギング設定データ42の収集対象設定情報53に情報が含まれていた収集対象の変数の全てについて値の収集を済ませたか否かを判定する処理が行われる。この判定処理において、値の収集を済ませていない収集対象の変数が残っていると判定されたとき(判定結果がNOのとき)にはS276に処理を進める。
Next, in S275, a process is performed to determine whether values have been collected for all the collection target variables whose information was included in the collection
S276では、S271の処理により計測を開始した今回のロギング処理の実行時間が所定時間に達したか否かを判定する処理が行われる。所定時間としては、例えば、ユーザにより指定された時間、又は前述した最大処理時間が用いられる。この判定処理において、今回のロギング処理の実行時間が所定時間に達していないと判定されたとき(判定結果がNOのとき)にはS274へ処理を戻して、値の収集を済ませていない収集対象の変数について、その値を収集する処理が行われる。 In S276, a process is performed to determine whether the execution time of the current logging process whose measurement was started in the process of S271 has reached a predetermined time. As the predetermined time, for example, the time specified by the user or the maximum processing time described above is used. In this judgment process, if it is judged that the execution time of the current logging process has not reached the predetermined time (when the judgment result is NO), the process returns to S274, and the collection target whose values have not been collected is A process is performed to collect the values of the variables.
一方、この判定処理において、今回のロギング処理の実行時間が所定時間に達したと判定されたとき(判定結果がYESのとき)には、S277において、最後に収集された変数を示す変数情報を記録する処理が行われる。この変数情報は、ロギング設定データ42の収集対象設定情報53に情報が含まれていた収集対象の変数のうち、直前のS274の処理において収集された変数を示している。
On the other hand, in this determination process, when it is determined that the execution time of the current logging process has reached the predetermined time (when the determination result is YES), in S277, variable information indicating the last collected variable is Recording processing is performed. This variable information indicates the variable that was collected in the immediately preceding process of S274 among the collection target variables whose information was included in the collection
S275の判定処理において、収集対象の変数の全てについて値の収集を済ませたと判定されたとき(判定結果がYESのとき)にはS277に処理を進める。 In the determination process of S275, when it is determined that values have been collected for all the variables to be collected (when the determination result is YES), the process advances to S277.
S278では、次に収集する変数を特定する処理が行われる。S278の処理では、例えば、前回の非同期収集処理において記録された変数情報に基づいて、最後に収集された変数の次の変数が、次に収集する変数として特定される。最後に収集された変数が収集対象の最後の変数である場合、次に収集する変数が存在しないと判定される。 In S278, processing is performed to identify the next variable to be collected. In the process of S278, for example, based on the variable information recorded in the previous asynchronous collection process, the variable following the last collected variable is specified as the next variable to be collected. If the last variable to be collected is the last variable to be collected, it is determined that there is no variable to collect next.
次に、S279において、ロギング設定データ42の収集対象設定情報53に情報が含まれていた収集対象の変数の全てについて値の収集を済ませたか否かを判定する処理が行われる。S278の処理において次に収集する変数が存在しないと判定された場合、収集対象の変数の全てについて値の収集を済ませたと判定される。
Next, in S279, a process is performed to determine whether values have been collected for all the collection target variables whose information was included in the collection
S279の判定処理において、値の収集を済ませていない収集対象の変数が残っていると判定されたとき(判定結果がNOのとき)には、次に収集する変数を対象として、S274以降の処理が行われる。なお、今回の非同期収集処理において収集される変数の値の収集時刻を記録しておきたい場合には、次に収集する変数を対象として、S273以降の処理が行われる。収集対象の変数の全てについて値の収集を済ませたと判定されたとき(判定結果がYESのとき)には今回の非同期収集処理が終了する。 In the determination process of S279, if it is determined that there are still variables to be collected whose values have not been collected (when the determination result is NO), the processes from S274 onwards are performed for the next variable to be collected. will be held. Note that if it is desired to record the collection time of the value of the variable collected in the current asynchronous collection process, the processes from S273 onwards are performed for the next variable to be collected. When it is determined that values have been collected for all of the variables to be collected (when the determination result is YES), the current asynchronous collection process ends.
S273又はS274以降の処理が繰り返されることで、S277において、最後に収集された変数を示す変数情報が更新される。したがって、変数情報は、収集対象の複数の変数それぞれの値が分割して収集される複数の制御周期のうち、先頭の制御周期から今回の制御周期までの期間に収集された変数を示す情報である。今回の制御周期は、何れかの制御周期の一例である。 By repeating the processes after S273 or S274, variable information indicating the last collected variable is updated in S277. Therefore, variable information is information indicating variables collected during the period from the first control cycle to the current control cycle among multiple control cycles in which the values of each of the multiple variables to be collected are divided and collected. be. The current control cycle is an example of any control cycle.
以上の収集処理が終了すると、収集データ73のリングバッファ62への保存が完了し、続いて図13のS258の処理が行われる。
When the above collection process is completed, the storage of the collected
<ロギングによる収集データの表示> <Display of collected data by logging>
次に、図1のPLCシステムにおけるPLC1により行われたロギング処理により得られた収集データ73を表示する手法について説明する。
Next, a method of displaying the collected
まず、収集データ73を表示する装置のハードウェア構成について説明する。図18は収集データ表示装置80のハードウェア構成例を示している。
First, the hardware configuration of the device that displays the collected
図18の構成例では、収集データ表示装置80は、CPU81、メモリ82、入力装置83、補助記憶装置84、表示装置85、及び記憶装置I/F86を含む。これらの構成要素は何れもハードウェアであって、内部バス87に接続されており、相互にデータの授受を行うことが可能である。
In the configuration example of FIG. 18, the collected
CPU81は、例えば、メモリ82を利用して所定のプログラムを実行することにより、収集データの表示や収集データの波形表示等の各種の表示を制御する機能を提供する。
The
入力装置83は、例えば、キーボードやポインティングデバイス等であり、ユーザからの指示又は情報の入力に用いられる。
The
補助記憶装置84は、磁気ディスク装置、光ディスク装置、光磁気ディスク装置等であり、例えば、ハードディスクドライブやフラッシュメモリであってもよい。収集データ表示装置80は、補助記憶装置84にプログラム及びデータを格納しておき、それらをメモリ82にロードして使用することができる。
The
表示装置85は、例えば、ユーザへの問い合わせ又は指示や、処理結果の表示出力に用いられる。
The
記憶装置I/F86は、メモリカード等の外部記憶装置17に対する各種のデータの読み出し処理を管理する。
The storage device I/
収集データ表示装置80は以上のハードウェア構成を有している。なお、このようなハードウェア構成は、一般的なコンピュータが有している標準的な構成であるので、このようなコンピュータを用いて収集データ表示装置80を構成するようにしてもよい。また、図1のPLCシステムにおいて支援装置30として機能させたPC2をさらに用いて、収集データ表示装置80を構成するようにしてもよい。
The collected
次に図19について説明する。図19は収集データ表示装置80の機能構成例を示した図である。
Next, FIG. 19 will be explained. FIG. 19 is a diagram showing an example of the functional configuration of the collected
図19の構成例では、収集データ表示装置80は、表示部91を含み、PLC1によって収集された情報を表示する。図18の表示装置85は、表示部91として動作する。
In the configuration example of FIG. 19, the collected
表示部91は、収集期間における収集対象の複数の変数それぞれの値の収集時刻と対応付けて、複数の変数それぞれの値を表示する。
The
このような収集データ表示装置80によれば、機器の制御に影響を与えることなく収集された所望のデータ量の変数の値を、収集期間内の時刻と対応付けて表示することができる。
According to such collected
図19のような構成を含む収集データ表示装置80によって行われる、収集データを表示する方法の一例について、図20を用いてさらに詳細に説明する。
An example of a method for displaying collected data performed by the collected
収集データ表示装置80は、S310のプログラム表示処理、S320の波形表示処理、S330のロギングファイル解析・変換処理、及びS340の表示制御処理を行う。これらの各処理は、図18のCPU81によって行われる。これらの各処理をCPU81に行わせるプログラムはエンジニアリングソフトウェアと称されることもある。
The collected
S310のプログラム表示処理は、前述したプロジェクトデータ41に含まれるユーザプログラムを表示すると共に、ロギング収集データ70から作成された表示用データを用いて、ユーザプログラムについての収集対象の変数の値を表示する処理である。表示用データは、収集時刻及び変数値を含む。なお、ここでは、プロジェクトデータ41は、例えばPC2において所定のプロジェクトデータ編集プログラムを実行することによりユーザによって既に作成されていて、例えば補助記憶装置84に既に記憶されているものとする。
The program display process in S310 displays the user program included in the
S320の波形表示処理は、ロギング収集データ70から作成された表示用データを用いて、収集時刻と収集対象の変数の値との関係を波形によって表示する処理である。
The waveform display process of S320 is a process of displaying the relationship between the collection time and the value of the variable to be collected using a waveform using the display data created from the
S330のロギングファイル解析・変換処理は、ロギング設定データ42とロギング収集データ70を解析して、収集データ73を、S310のプログラム表示処理とS320の波形表示処理とのそれぞれに入力される表示用データに変換する処理である。なお、ここでは、ロギング設定データ42及びロギング収集データ70は外部記憶装置17により提供されるものとする。ロギングファイル解析・変換処理では、これらのデータが外部記憶装置17から読み出されて使用される。
The logging file analysis/conversion process at S330 analyzes the
S340の表示制御処理は、S330のロギングファイル解析・変換処理によって作成された表示用データを、S310のプログラム表示処理とS320の波形表示処理とに提供する処理を含む。また、この表示制御処理は、プログラム表示処理と波形表示処理との表示を連動させる処理を含む。 The display control process of S340 includes a process of providing the display data created by the logging file analysis/conversion process of S330 to the program display process of S310 and the waveform display process of S320. The display control process also includes a process of linking the display of the program display process and the waveform display process.
以下、収集データ表示装置80によって行われる、図20に示した各処理の詳細をさらに説明する。
The details of each process shown in FIG. 20 performed by the collected
まず、S310のプログラム表示処理の詳細について、図21を用いて説明する。 First, details of the program display process in S310 will be explained using FIG. 21.
図21で表されているように、S310のプログラム表示処理は、S311の操作UI処理と、S312の変数値表示制御処理と、S313のユーザプログラム表示処理とを含む。 As shown in FIG. 21, the program display process in S310 includes the operation UI process in S311, the variable value display control process in S312, and the user program display process in S313.
S311の操作UI処理は、収集データ表示装置80のユーザによる入力装置83に対する操作に応じた入力を受け付ける処理である。
The operation UI process in S<b>311 is a process of accepting input according to an operation on the
S312の変数値表示制御処理は、S311の操作UI処理により受け付けられた入力の情報や、S340の表示制御処理からの連動の情報を受け付けて、表示用データに含まれる変数値の表示を制御する処理である。 The variable value display control process in S312 receives the input information accepted by the operation UI process in S311 and the interlocking information from the display control process in S340, and controls the display of variable values included in the display data. It is processing.
S313のユーザプログラム表示処理は、プロジェクトデータ41に含まれるユーザプログラムを表示すると共に、S312の変数値表示制御処理による制御の下で、収集対象の変数の値を、ユーザプログラムの表示上に表示させる処理である。
The user program display process of S313 displays the user program included in the
ここで図22について説明する。図22は、収集データの表示画面の例である。この表示画面は、CPU81がS310のプログラム表示処理を実行することによって表示装置85に表示される。
Here, FIG. 22 will be explained. FIG. 22 is an example of a display screen for collected data. This display screen is displayed on the
図22の画面例は、S313のユーザプログラム表示処理により得られるユーザプログラム表示画面113に重ねて、S311の操作UI処理により得られるUI画面120が表示されている状態を表している。
The example screen in FIG. 22 shows a state in which a
S313のユーザプログラム表示処理によって、プロジェクトデータ41に含まれているユーザプログラムの内容を表す図(例えばラダープログラム)が作成され、ユーザプログラム表示画面113として表示される。
Through the user program display process in S313, a diagram (for example, a ladder program) representing the contents of the user program included in the
UI画面120は、収集時刻毎に収集されている変数の値についての表示を順次更新させる指示を与えるコマ戻りボタン121-1及びコマ送りボタン121-2やシークバー122、表示させる変数の値の収集時刻を直接入力する時刻入力欄123等を有している。なお、時刻入力欄123は、コマ戻りボタン121-1及びコマ送りボタン121-2やシークバー122への操作によって指定される収集時刻を表示する表示欄としての機能も有している。
The
S311の操作UI処理によって、コマ戻りボタン121-1及びコマ送りボタン121-2やシークバー122への操作に応じて指定された収集時刻が取得され、この時刻が時刻入力欄123に表示される。また、時刻の入力操作が時刻入力欄123に対して行われた場合には、この操作UI処理によって、入力された時刻が、指定した収集時刻として取得される。
Through the operation UI process in S311, the collection time specified in response to the operation of the frame-back button 121-1, the frame-forward button 121-2, or the seek
S312の変数値表示制御処理により、ロギング収集データ70において収集時刻が対応付けられている変数の値や、S311の操作UI処理によって取得された収集時刻の指定が取得される。なお、ロギング収集データ70はS330のロギングファイル解析・変換処理により取得されてS340の表示制御処理に送付されたものであり、変数値表示制御処理は、表示制御処理からロギング収集データ70の提供を受ける。また、この変数値表示制御処理により、指定された収集時刻における変数の値がS313のユーザプログラム表示処理に送られ、ユーザプログラム表示処理により、その変数の値についての表示が、ユーザプログラム表示画面113で行われる。
Through the variable value display control process in S312, the value of the variable associated with the collection time in the
図22の画面例において、ON/OFF表示114や変数表示115は、変数の値を表示するものである。
In the screen example shown in FIG. 22, the ON/
ON/OFF表示114は、ONとOFFとのどちらかの状態を有するプログラム構成要素の状態が収集対象の変数として選択されている場合に、変数値で示される状態に応じた異なる色彩でその要素を塗りつぶした表示を行って変数値を表すものである。図22の画面例では、ON/OFF表示114として、ユーザプログラム中の収集対象の要素が黒塗りで表示されているが、実際には、例えば、「ON」の場合には赤塗りで、また、「OFF」の場合には青塗りでその要素が表示される。
The ON/
変数表示115は、プログラム構成要素に関する数値が収集対象の変数として選択されている場合に、その数値を変数値として直接表示するものである。
The
以上のように、S311、S312、及びS313の処理によって、図22の画面例で表されているように、収集時刻とその収集時刻に収集された変数の値とが関係付けされて表示装置85で表示される。 As described above, through the processes of S311, S312, and S313, as shown in the screen example of FIG. 22, the collection time and the value of the variable collected at that collection time are associated and is displayed.
また、S310のプログラム表示処理はS314の照合処理とS315の警告処理とをさらに含む。 Furthermore, the program display process in S310 further includes a verification process in S314 and a warning process in S315.
S314の照合処理は、プロジェクトデータ41、ロギング設定データ42、及びロギング収集データ70のプロジェクトデータ情報51の照合を行う処理である。
The verification process in S314 is a process of verifying the
S315の警告処理は、S314の照合処理によって、各データのプロジェクトデータ情報51が一致しない場合に所定の警告を行う処理である。
The warning process of S315 is a process of issuing a predetermined warning when the
図23は、表示装置85に表示される警告画面の画面例を表している。S315の警告処理による所定の警告は、例えばこのような警告画面を表示装置85に表示することによって行われる。この画面例には、プロジェクトデータ情報51が一致しないことをユーザに警告する警告ダイアログ130が含まれている。なお、例えばユーザプログラムのデバッグを行う場合等には有益であるので、収集データ表示装置80では、プロジェクトデータ情報51が不一致であっても変数の値の表示の機能は利用可能としている。
FIG. 23 shows an example of a warning screen displayed on the
次に、S320の波形表示処理の詳細について、図24を用いて説明する。 Next, details of the waveform display processing in S320 will be explained using FIG. 24.
図24で表されているように、S320の波形表示処理は、S321の操作UI処理と、S322の変数値表示制御処理と、S323の波形作成処理とを含む。 As shown in FIG. 24, the waveform display process in S320 includes the operation UI process in S321, the variable value display control process in S322, and the waveform creation process in S323.
S321の操作UI処理は、S311の処理と同様の処理であり、収集データ表示装置80のユーザによる入力装置83に対する操作に応じた入力を受け付ける処理である。
The operation UI process of S321 is similar to the process of S311, and is a process of accepting input according to the operation on the
S322の変数値表示制御処理は、S312の処理と同様の処理であり、S321の操作UI処理により受け付けられた入力の情報や、S340の表示制御処理からの前述の連動の情報を受け付けて、表示用データに含まれる変数値の表示を制御する処理である。 The variable value display control process in S322 is similar to the process in S312, and receives input information accepted by the operation UI process in S321 and the above-mentioned linked information from the display control process in S340, and displays This process controls the display of variable values included in the data.
S323の波形作成処理は、S340の表示制御処理により提供される表示用データに基づいて、収集時刻と変数との関係を表している波形を作成して表示する処理である。 The waveform creation process of S323 is a process of creating and displaying a waveform representing the relationship between the collection time and the variable based on the display data provided by the display control process of S340.
ここで図25について説明する。図25は、収集データの波形表示画面140の例である。この波形表示画面140は、CPU81がS320の波形表示処理を実行することによって表示装置85に表示される。
Here, FIG. 25 will be explained. FIG. 25 is an example of a
波形表示画面140に含まれている波形141は、S323の波形作成処理によって作成されたものである。なお、図27の画面例では、「変数1」、「変数2」、及び「変数3」のそれぞれについての波形141が、それぞれ実線、破線、及び一点鎖線を用いて表示されている。また、波形表示画面140に含まれている時刻表示142は、波形141により変数値との関係が表されている収集時刻を表しており、S323の波形作成処理によって波形表示画面140に表示される。
The
また、S321の操作UI処理によって、収集時刻の範囲の移動指示が受け付けられると、S323の波形作成処理により、移動後の収集時刻の範囲についての波形141が波形表示画面140に表示される。また、波形表示画面140に表示されている太線143によって示される収集時刻が、S323の波形作成処理によって時刻表示欄144に表示される。
Furthermore, when an instruction to move the collection time range is accepted through the operation UI process in S321, the
S322の変数値表示制御処理により、S340の表示制御処理により提供される表示用データにおいて収集時刻が対応付けられている変数の値が取得される。また、このS322の変数値表示制御処理により、時刻表示欄144に表示された収集時刻が取得される。さらに、この変数値表示制御処理により、取得された収集時刻における変数の値が、波形141と太線143との交点の位置で表される変数の値として、変数値表示欄145に表示される。
The variable value display control process of S322 acquires the value of the variable associated with the collection time in the display data provided by the display control process of S340. Furthermore, the collection time displayed in the
以上のように、S321、S322、及びS323の処理によって、図25の画面例で表されているように、収集時刻とその収集時刻に収集された変数の値とが関係付けされて表示装置85で表示される。 As described above, through the processes of S321, S322, and S323, as shown in the screen example of FIG. 25, the collection time and the value of the variable collected at that collection time are correlated and is displayed.
次に、S330のロギングファイル解析・変換処理の詳細について、図26を用いて説明する。 Next, details of the logging file analysis/conversion process in S330 will be explained using FIG. 26.
図26で表されているように、S330のロギングファイル解析・変換処理は、S331のロギング設定データ取得処理、S332のロギング収集データ取得処理、及び、S333の表示用データ作成処理を含んでいる。 As shown in FIG. 26, the logging file analysis/conversion process in S330 includes the logging setting data acquisition process in S331, the logging collection data acquisition process in S332, and the display data creation process in S333.
S331のロギング設定データ取得処理は、ロギング設定データ42を外部記憶装置17から取り込む処理である。
The logging setting data acquisition process of S331 is a process of importing the
S332のロギング収集データ取得処理は、ロギング収集データ70を外部記憶装置17から読み出して取り込む処理である。
The logging collection data acquisition process of S332 is a process of reading and importing the
S333の表示用データ作成処理は、ロギング設定データ42とロギング収集データ70から、収集時刻及び変数値を含む表示用データを作成する処理である。
The display data creation process in S333 is a process for creating display data including collection times and variable values from the
次に、S340の表示制御処理の詳細について、図27を用いて説明する。 Next, details of the display control process in S340 will be explained using FIG. 27.
図27で表されているように、S340の表示制御処理は、S341の変数値提供処理、S342の再生制御処理、及び、S343の収集データ取得処理を含む。 As shown in FIG. 27, the display control process in S340 includes the variable value providing process in S341, the playback control process in S342, and the collected data acquisition process in S343.
S341の変数値提供処理は、S330のロギングファイル解析・変換処理により作成された表示用データを、収集時刻が対応付けられている変数の値として、S310のプログラム表示処理とS320の波形表示処理とに提供する処理である。 The variable value providing process in S341 uses the display data created by the logging file analysis/conversion process in S330 as the value of the variable associated with the collection time, and performs the program display process in S310 and the waveform display process in S320. This is a process provided to
S342の再生制御処理は、所定の連動の指示を受けると、S310のプログラム表示処理とS320の波形表示処理とを制御して、それぞれの処理により表示される画面の内容を連動させる処理である。この再生制御処理により、例えば、図22の画面例におけるUI画面120に対する操作により指定された収集時刻と、図25の画面例における太線143によって示される収集時刻とを同一の時刻とする処理が行われる。
The playback control process in S342 is a process in which, upon receiving a predetermined linkage instruction, the program display process in S310 and the waveform display process in S320 are controlled to link the contents of the screen displayed by each process. Through this playback control process, for example, a process is performed in which the collection time specified by the operation on the
S343の収集データ取得処理は、S330のロギングファイル解析・変換処理により作成された表示用データを取得してS341の変数値提供処理に提供する処理である。 The collected data acquisition process at S343 is a process for acquiring display data created by the logging file analysis/conversion process at S330 and providing it to the variable value providing process at S341.
以上のように、S340の表示制御処理によって、S330のロギングファイル解析・変換処理により作成された表示用データが、S310のプログラム表示処理とS320の波形表示処理とに提供される。 As described above, the display control process in S340 provides the display data created by the logging file analysis/conversion process in S330 to the program display process in S310 and the waveform display process in S320.
以上、開示の実施形態とその利点について詳しく説明したが、当業者は、特許請求の範囲に明確に記載した本発明の範囲から逸脱することなく、様々な変更、追加、省略をすることができるであろう。 Although the disclosed embodiments and their advantages have been described in detail above, those skilled in the art can make various changes, additions, and omissions without departing from the scope of the present invention as clearly stated in the claims. Will.
1 PLC
2 PC
3 入出力モジュール
4 通信モジュール
6 通信ケーブル
7 通信バス
11、26 通信I/F
12、21、81 CPU
13 バスコントローラ
14、22、82 メモリ
14a プログラム使用領域
15、86 記憶装置I/F
16、27、87 内部バス
17 外部記憶装置
23、83 入力装置
24、85 表示装置
25、84 補助記憶装置
30 支援装置
31 プログラム解析部
32 選択部
33 受付部
34 設定情報出力部
35 計算部
36 データ量出力部
40 設定ツール
41 プロジェクトデータ
42 ロギング設定データ
51 プロジェクトデータ情報
52 収集動作設定情報
53 収集対象設定情報
61 制御部
62 リングバッファ
70 ロギング収集データ
71 収集データ数
72 収集データサイズ
73 収集データ
80 収集データ表示装置
91 表示部
100、120 UI画面
101 プログラム選択部
102 抽出変数表示部
103 対象変数表示部
104 登録ボタン
105 解除ボタン
106 一括登録ボタン
107 一括解除ボタン
110 収集期間表示部
111 データサイズ表示部
112 設定ボックス
113 ユーザプログラム表示画面
114 ON/OFF表示
115 変数表示
120 UI画面
121-1 コマ戻りボタン
121-2 コマ送りボタン
122 シークバー
123 時刻入力欄
130 警告ダイアログ
140 波形表示画面
141 波形
142 時刻表示
143 太線
144 時刻表示欄
145 変数値表示欄
1 PLC
2 PCs
3 Input/
12, 21, 81 CPU
13
16, 27, 87
Claims (9)
前記制御部は、前記制御プログラムにおいて使用されている複数の変数を複数の制御周期に分割し、前記複数の制御周期各々において前記複数の変数のうち一部の変数の値を収集することで、前記複数の変数それぞれの値を前記制御周期よりも長い収集期間内に収集することを特徴とするプログラマブルロジックコントローラ。 comprising a control unit that repeats a control process for each control cycle, including a program execution process for executing a control program for controlling an external device, and a logging process for collecting values of variables used in the control program;
The control unit divides a plurality of variables used in the control program into a plurality of control cycles, and collects values of some variables among the plurality of variables in each of the plurality of control cycles, A programmable logic controller characterized in that values of each of the plurality of variables are collected within a collection period that is longer than the control cycle.
前記プログラマブルロジックコントローラは、外部機器を制御するための制御プログラムを実行するプログラム実行処理と、前記制御プログラムにおいて使用されている変数の値を収集するロギング処理とを含む制御処理を、制御周期毎に繰り返し、前記支援装置から出力される設定情報に基づいて、前記制御プログラムにおいて使用されている複数の変数を複数の制御周期に分割し、前記複数の制御周期各々において前記複数の変数のうち一部の変数の値を収集することで、前記複数の変数それぞれの値を前記制御周期よりも長い収集期間内に収集し、
前記支援装置は、
前記制御プログラムを解析して、前記制御プログラムにおいて使用されている変数を抽出するプログラム解析部と、
抽出された変数の中から、前記制御プログラムにおいて使用されている複数の変数を選択する選択部と、
前記収集期間の指定を受け付ける受付部と、
前記制御プログラムにおいて使用されている複数の変数を示す情報と前記収集期間を示す情報とを、前記設定情報として出力する設定情報出力部と、
を備えることを特徴とする支援装置。 A support device for a programmable logic controller,
The programmable logic controller performs a control process, including a program execution process for executing a control program for controlling an external device, and a logging process for collecting values of variables used in the control program, in each control cycle. Repeatedly, based on the setting information output from the support device, a plurality of variables used in the control program are divided into a plurality of control cycles, and a part of the plurality of variables is divided in each of the plurality of control cycles. By collecting the values of the variables, the values of each of the plurality of variables are collected within a collection period longer than the control cycle,
The support device includes:
a program analysis unit that analyzes the control program and extracts variables used in the control program;
a selection unit that selects a plurality of variables used in the control program from among the extracted variables;
a reception department that accepts the designation of the collection period;
a setting information output unit that outputs information indicating a plurality of variables used in the control program and information indicating the collection period as the setting information;
A support device characterized by comprising:
前記複数の制御周期各々において収集される前記一部の変数の値のデータ量を出力するデータ量出力部と、
をさらに備えることを特徴とする請求項4記載の支援装置。 The number of the plurality of control periods is determined based on the collection period and the control period, and the number of the plurality of control periods is determined based on the total data amount of the values of each of the plurality of variables and the number of the plurality of control periods. a calculation unit that calculates the amount of data of the values of some of the variables collected in each cycle;
a data amount output unit that outputs a data amount of values of the some of the variables collected in each of the plurality of control cycles;
The support device according to claim 4, further comprising:.
前記収集期間における前記複数の変数それぞれの値の収集時刻と対応付けて、前記複数の変数それぞれの値を表示する表示装置と、
を備えることを特徴とするプログラマブルロジックコントローラシステム。 A control process including a program execution process of executing a control program for controlling an external device and a logging process of collecting the values of variables used in the control program is repeated every control cycle, and the control process By dividing a plurality of variables used in a plurality of control cycles into a plurality of control cycles, and collecting values of some of the plurality of variables in each of the plurality of control cycles, the values of each of the plurality of variables can be calculated. a programmable logic controller that collects data within a collection period that is longer than the control cycle;
a display device that displays the values of each of the plurality of variables in association with the collection time of each of the values of the plurality of variables during the collection period;
A programmable logic controller system comprising:
前記プログラマブルロジックコントローラは、前記制御プログラムにおいて使用されている複数の変数を複数の制御周期に分割し、前記複数の制御周期各々において前記複数の変数のうち一部の変数の値を収集することで、前記複数の変数それぞれの値を前記制御周期よりも長い収集期間内に収集することを特徴とするロギング方法。 The programmable logic controller repeats control processing, including program execution processing for executing a control program for controlling external equipment, and logging processing for collecting the values of variables used in the control program, in each control cycle. ,
The programmable logic controller divides a plurality of variables used in the control program into a plurality of control cycles, and collects values of some of the variables in each of the plurality of control cycles. , a logging method characterized in that the values of each of the plurality of variables are collected within a collection period that is longer than the control cycle.
前記支援装置が、
前記制御プログラムを解析して、前記制御プログラムにおいて使用されている変数を抽出し、
抽出された変数を表示し、
表示された変数の中から選択された複数の変数を、前記制御プログラムにおいて使用されている複数の変数として特定し、
前記収集期間の指定を受け付け、
前記制御プログラムにおいて使用されている複数の変数を示す情報と前記収集期間を示す情報とを、前記設定情報として出力する、
ことを特徴とする支援方法。 The programmable logic controller repeats control processing, including program execution processing for executing a control program for controlling external equipment, and logging processing for collecting the values of variables used in the control program, in each control cycle. , divides a plurality of variables used in the control program into a plurality of control periods based on setting information output from a support device of the programmable logic controller, and divides a plurality of variables used in the control program into a plurality of control periods, and divides the plurality of variables in each of the plurality of control periods. By collecting the values of some of the variables, the values of each of the plurality of variables are collected within a collection period longer than the control cycle,
The support device is
Analyzing the control program and extracting variables used in the control program,
Display the extracted variables,
identifying a plurality of variables selected from the displayed variables as a plurality of variables used in the control program;
Accepting the specification of the collection period,
outputting information indicating a plurality of variables used in the control program and information indicating the collection period as the setting information;
A support method characterized by :
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2023076791A JP7375977B1 (en) | 2023-05-08 | 2023-05-08 | Programmable logic controller, support device, display device, logging method, support method, and display method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2023076791A JP7375977B1 (en) | 2023-05-08 | 2023-05-08 | Programmable logic controller, support device, display device, logging method, support method, and display method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP7375977B1 true JP7375977B1 (en) | 2023-11-08 |
Family
ID=88645960
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2023076791A Active JP7375977B1 (en) | 2023-05-08 | 2023-05-08 | Programmable logic controller, support device, display device, logging method, support method, and display method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7375977B1 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001273013A (en) | 2000-03-23 | 2001-10-05 | Omron Corp | Method and apparatus for monitoring motion |
JP2016143169A (en) | 2015-01-30 | 2016-08-08 | 株式会社キーエンス | Device monitoring apparatus and device monitoring method |
JP2021189482A (en) | 2020-05-25 | 2021-12-13 | 株式会社キーエンス | Programmable logic controller |
-
2023
- 2023-05-08 JP JP2023076791A patent/JP7375977B1/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001273013A (en) | 2000-03-23 | 2001-10-05 | Omron Corp | Method and apparatus for monitoring motion |
JP2016143169A (en) | 2015-01-30 | 2016-08-08 | 株式会社キーエンス | Device monitoring apparatus and device monitoring method |
JP2021189482A (en) | 2020-05-25 | 2021-12-13 | 株式会社キーエンス | Programmable logic controller |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110262279B (en) | Control system and control method | |
US9013574B2 (en) | Machine vision system program editing environment including synchronized user interface features | |
US10503146B2 (en) | Control system, control device, and control method | |
JP2013104877A (en) | Machine vision system program edition environment including a real time context generation function | |
CN108693822B (en) | Control device, storage medium, control system, and control method | |
US20190018385A1 (en) | Programmable logic controller, data collector, and programming support apparatus | |
JP5074896B2 (en) | Inspection support system and image processing controller | |
JP5060677B2 (en) | Image processing controller and inspection support system | |
JP7375977B1 (en) | Programmable logic controller, support device, display device, logging method, support method, and display method | |
US20200088794A1 (en) | Operation data collection system, operation data collection method, and information storage medium | |
JPH07191717A (en) | Automatic preparing device for control program | |
US20020049929A1 (en) | Humanity interface development system of testing program of circuit board | |
JP2023167381A (en) | Programmable logic controller, support device, and display device, and, logging method, support method, and display method | |
JP2023168185A (en) | Support device and support method | |
JP7168114B1 (en) | Programmable logic controller, support device, display device, logging method, support method, display method | |
JP2023168186A (en) | Display device and display method | |
JPH07129677A (en) | Production simulation device | |
JP2001005522A (en) | Data displaying device | |
US20180088914A1 (en) | Method for supporting program creation and apparatus for supporting program creation | |
WO2023286393A1 (en) | Information processing system and information processing method | |
EP4227745A1 (en) | Control system, production method, and program | |
JP2023006304A (en) | Control system, model generation method, and model generation program | |
JP5413793B2 (en) | Measuring system | |
JP2023151886A (en) | Information processing device and information processing program | |
JP2022158227A (en) | Analysis device, analysis system, and method for controlling the same |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230508 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20230508 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230801 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230906 |
|
RD03 | Notification of appointment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7423 Effective date: 20230906 |
|
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: 20230926 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20231009 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7375977 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |