JP7168114B1 - Programmable logic controller, support device, display device, logging method, support method, display method - Google Patents
Programmable logic controller, support device, display device, logging method, support method, display method Download PDFInfo
- Publication number
- JP7168114B1 JP7168114B1 JP2022078537A JP2022078537A JP7168114B1 JP 7168114 B1 JP7168114 B1 JP 7168114B1 JP 2022078537 A JP2022078537 A JP 2022078537A JP 2022078537 A JP2022078537 A JP 2022078537A JP 7168114 B1 JP7168114 B1 JP 7168114B1
- Authority
- JP
- Japan
- Prior art keywords
- data
- variable
- display
- logging
- collection
- 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 abstract description 263
- 230000008569 process Effects 0.000 claims abstract description 250
- 238000012545 processing Methods 0.000 claims abstract description 175
- 238000003860 storage Methods 0.000 claims description 55
- 230000015654 memory Effects 0.000 description 47
- 101100408464 Caenorhabditis elegans plc-1 gene Proteins 0.000 description 26
- 238000004891 communication Methods 0.000 description 24
- 238000004458 analytical method Methods 0.000 description 16
- 238000006243 chemical reaction Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 12
- 238000001514 detection method Methods 0.000 description 6
- 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
- 238000013480 data collection Methods 0.000 description 3
- 238000012423 maintenance Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012806 monitoring device Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Landscapes
- Debugging And Monitoring (AREA)
- Programmable Controllers (AREA)
Abstract
【課題】複数の演算処理部を含むプログラマブルロジックコントローラにおいてロギングを行う。【解決手段】外部機器を制御するプログラマブルロジックコントローラは、外部機器を制御する制御処理を分散して実行する、着脱可能な複数の演算処理部を含む。プログラマブルロジックコントローラは、制御処理のためのユーザアプリケーションプログラムを実行する。複数の演算処理部は、第1演算処理部及び第2演算処理部を含む。第1演算処理部は、収集部を含む。収集部は、所定の収集タイミングで、ユーザアプリケーションプログラムにおいて使用されている複数の変数それぞれの値を収集して、収集データを生成するロギング処理を行う。収集部は、ロギング処理において、複数の変数のうち、第2演算処理部によって使用されている所定変数の値に対するアクセスに失敗した場合、所定変数の値の欠損を示す欠損情報を収集データに設定する。【選択図】図1A programmable logic controller including a plurality of arithmetic processing units performs logging. A programmable logic controller for controlling an external device includes a plurality of detachable arithmetic processing units that distribute and execute control processing for controlling the external device. The programmable logic controller executes user application programs for control processing. The multiple arithmetic processing units include a first arithmetic processing unit and a second arithmetic processing unit. The first arithmetic processing unit includes a collection unit. The collection unit collects the values of each of the plurality of variables used in the user application program at a predetermined collection timing, and performs a logging process of generating collected data. In the logging process, if access to the value of the predetermined variable used by the second arithmetic processing unit fails among the plurality of variables, the collection unit sets missing information indicating the lack of the value of the predetermined variable in the collected data. do. [Selection drawing] Fig. 1
Description
本発明は、プログラマブルロジックコントローラ(Programmable Logic Controller,PLC)の技術に関する。 The present invention relates to technology of programmable logic controllers (PLC).
PLCは、ファクトリーオートメーションにおいて製造機器や搬送装置、検査装置を制御するコントローラである。PLCは、ラダープログラム等の、ユーザにより作成されるユーザアプリケーションプログラムを実行することで様々な制御機器を制御する。 A PLC is a controller that controls manufacturing equipment, transport equipment, and inspection equipment in factory automation. The PLC controls 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 demand for recording information related to device control and verifying the information afterward, not limited to the case of occurrence of such an abnormality. Therefore, there are cases where the user presets the conditions for recording data history in the control device, and the control device logs the data indicating the operation state of the equipment and the control device itself based on these conditions. .
データのロギングに関連して、監視機器から入力される各種データとデバイス値との時間的な関係を特定しやすくするPLCが知られている(例えば、特許文献1参照)。 In relation to data logging, a PLC is known that makes it easy to identify temporal relationships between various data input from monitoring equipment and device values (see, for example, Patent Document 1).
このPLCは、複数のデバイスのいずれかに記憶されているデバイス値を収集し、デバイス値の収集時刻に関する情報とデバイス値とを関連付けて第一バッファに記憶する。PLCは、監視機器から入力されるデータを収集し、データが取得された取得時刻に関する情報とデータとを関連付けて第二バッファに記憶する。保存部は、所定の保存条件が満たされると、第一バッファに記憶されているデバイス値と収集時刻に関する情報と、第二バッファに記憶されているデータと取得時刻に関する情報とを対応付けて保存する。 This PLC collects device values stored in any one of a plurality of devices, associates information about the collection time of the device values with the device values, and stores them in a first buffer. The PLC collects the data input from the monitoring device, associates the data with information about the acquisition time when the data was acquired, and stores the data in the second buffer. When a predetermined storage condition is satisfied, the storage unit associates and stores the device value stored in the first buffer and the information regarding the collection time with the data stored in the second buffer and the information regarding the acquisition time. do.
複数のインタフェースユニットと複数のCPU(Central Processing Unit)モジュールとを含むプログラマブルコントローラも知られている(例えば、特許文献2参照)。
A programmable controller including a plurality of interface units and a plurality of CPU (Central Processing Unit) modules is also known (see
このプログラマブルコントローラにおいて、インタフェースユニットは、CPUモジュールと接続可能であって、接続されたCPUモジュールに向けて複数の異なる電位状態を有する第1電位信号を送出可能である。CPUモジュールは、インタフェースユニットと接続可能であると共に他のCPUモジュールと接続可能であり、その内部に演算処理を実行するためのCPUと、判別ビット及び定義情報を格納するためのメモリとを有する。 In this programmable controller, an interface unit is connectable with a CPU module and is capable of sending a first potential signal having a plurality of different potential states toward the connected CPU module. The CPU module is connectable to the interface unit as well as to other CPU modules, and has therein a CPU for executing arithmetic processing and a memory for storing discrimination bits and definition information.
判別ビットは、2値化情報を有する。2値化情報は、判別ビットを有するCPUモジュールの接続先であるインタフェースユニットからCPUモジュールに入力された第1電位信号の電位状態に基づいて、CPUモジュール内のCPUがメインCPUであるかサブCPUであるかを示す。定義情報は、定義情報を有するCPUモジュール内のCPUが予めメインCPUとして設定されているかサブCPUとして設定されているかを示す設定情報を有する。 The discrimination bit has binarization information. The binarized information is based on the potential state of the first potential signal input to the CPU module from the interface unit to which the CPU module having the discrimination bit is connected, and determines whether the CPU in the CPU module is the main CPU or the sub CPU. indicates whether The definition information has setting information indicating whether the CPU in the CPU module having the definition information is set in advance as a main CPU or as a sub CPU.
ユーザが、プロセッサへのプログラムの割り当てを意識することなく、グローバル変数の宣言を可能とするプログラマブルコントローラ用プログラム作成支援装置も知られている(例えば、特許文献3参照)。 There is also known a program creation support device for programmable controllers that enables a user to declare global variables without being aware of the allocation of programs to processors (see, for example, Patent Document 3).
複数のCPUモジュールを含むマルチCPU構成のPLCでは、1台のCPUモジュールで行っていた高負荷処理を、複数のCPUモジュールに分散させることにより、PLC全体のメモリ容量を増加させ、制御処理を高速化することができる。 In a multi-CPU configuration PLC that includes multiple CPU modules, by distributing the high-load processing performed by a single CPU module to multiple CPU modules, the memory capacity of the entire PLC is increased and control processing is speeded up. can be
マルチCPU構成のPLCにおいても、ロギングを行うCPUモジュール内のメモリが記憶しているデータと、そのCPUモジュールに入力されるデータについては、容易にロギングを行うことができる。しかしながら、このようなPLCでは、CPU間の共有資源として共有メモリが使用されることがある。共有メモリが記憶しているデータをロギングする技術は知られていない。 Even in a multi-CPU configuration PLC, data stored in a memory in a CPU module that performs logging and data input to the CPU module can be easily logged. However, such a PLC may use a shared memory as a shared resource between CPUs. There is no known technology for logging data stored in shared memory.
なお、かかる問題は、複数のCPUモジュールを含むPLCに限らず、複数の演算処理部を含む様々なPLCにおいて生ずるものである。 This problem is not limited to PLCs that include multiple CPU modules, but occurs in various PLCs that include multiple arithmetic processing units.
1つの側面において、本発明は、複数の演算処理部を含むPLCにおいてロギングを行うことを目的とする。 In one aspect, an object of the present invention is to perform logging in a PLC including multiple processing units.
1つの実施形態によれば、外部機器を制御するプログラマブルロジックコントローラは、外部機器を制御する制御処理を分散して実行する、着脱可能な複数の演算処理部を含む。プログラマブルロジックコントローラは、制御処理のためのユーザアプリケーションプログラムを実行する。複数の演算処理部は、第1演算処理部及び第2演算処理部を含む。 According to one embodiment, a programmable logic controller that controls an external device includes a plurality of detachable arithmetic processing units that distribute and execute control processing that controls the external device. The programmable logic controller executes user application programs for control processing. The multiple arithmetic processing units include a first arithmetic processing unit and a second arithmetic processing unit.
第1演算処理部は、収集部を含む。収集部は、所定の収集タイミングで、ユーザアプリケーションプログラムにおいて使用されている複数の変数それぞれの値を収集して、収集データを生成するロギング処理を行う。収集部は、ロギング処理において、複数の変数のうち、第2演算処理部によって使用されている所定変数の値に対するアクセスに失敗した場合、所定変数の値の欠損を示す欠損情報を収集データに設定する。 The first arithmetic processing unit includes a collection unit. The collection unit collects the values of each of the plurality of variables used in the user application program at a predetermined collection timing, and performs a logging process of generating collected data. In the logging process, if access to the value of the predetermined variable used by the second arithmetic processing unit fails among the plurality of variables, the collection unit sets missing information indicating the lack of the value of the predetermined variable in the collected data. do.
別の実施形態によれば、外部機器を制御するプログラマブルロジックコントローラは、外部機器を制御する制御処理を分散して実行する複数の演算処理部を含む。プログラマブルロジックコントローラは、制御処理のためのユーザアプリケーションプログラムを実行する。複数の演算処理部のうちいずれかの演算処理部は、設定情報に基づいて、所定の収集タイミングで、ユーザアプリケーションプログラムにおいて使用されている収集対象の変数の値を収集して、収集データを生成するロギング処理を行う。 According to another embodiment, a programmable logic controller that controls an external device includes a plurality of arithmetic processing units that distribute and execute control processing that controls the external device. The programmable logic controller executes user application programs for control processing. One of the plurality of arithmetic processing units collects the values of the variables to be collected used in the user application program at a predetermined collection timing based on the setting information, and generates collected data. Perform logging processing.
プログラマブルロジックコントローラの支援装置は、プログラム解析部、表示部、特定部、及び出力部を含む。プログラム解析部は、ユーザアプリケーションプログラムを解析して、ユーザアプリケーションプログラムにおいて使用されている複数の変数を抽出する。 The supporting device of the programmable logic controller includes a program analysis part, a display part, an identification part and an output part. The program analysis unit analyzes the user application program and extracts multiple variables used in the user application program.
表示部は、複数の変数のうち、複数の演算処理部各々によって使用されている変数を表示する。特定部は、複数の演算処理部各々によって使用されている変数の中から選択された変数を、収集対象の変数として特定する。出力部は、収集対象の変数を示す情報を、設定情報として出力する。 The display unit displays variables used by each of the plurality of arithmetic processing units among the plurality of variables. The identifying unit identifies a variable selected from variables used by each of the plurality of arithmetic processing units as a variable to be collected. The output unit outputs information indicating the variables to be collected as setting information.
更に別の実施形態によれば、外部機器を制御するプログラマブルロジックコントローラは、外部機器を制御する制御処理を分散して実行する複数の演算処理部を含む。プログラマブルロジックコントローラは、制御処理のためのユーザアプリケーションプログラムを実行する。複数の演算処理部のうちいずれかの演算処理部は、所定の収集タイミングで、ユーザアプリケーションプログラムにおいて使用されている複数の変数それぞれの値を収集して、収集データを生成するロギング処理を行う。 According to yet another embodiment, a programmable logic controller that controls an external device includes a plurality of arithmetic processing units that distribute and execute control processing that controls the external device. The programmable logic controller executes user application programs for control processing. One of the plurality of arithmetic processing units collects values of each of the plurality of variables used in the user application program at a predetermined collection timing, and performs logging processing to generate collected data.
収集データを表示する表示装置は、表示制御部及び表示部を含む。表示制御部は、複数の変数それぞれについて、変数の値又は変数の値の欠損を示す欠損情報のいずれが収集データに含まれているかをチェックする。表示部は、変数の値が収集データに含まれている変数について、変数の値を表示し、欠損情報が収集データに含まれている変数について、変数の値の欠損を示す欠損表示情報を表示する。 A display device for displaying collected data includes a display control unit and a display unit. For each of the plurality of variables, the display control unit checks whether the collected data includes the value of the variable or missing information indicating the missing value of the variable. The display unit displays the values of the variables whose values are included in the collected data, and displays missing display information indicating the missing values of the variables for the variables whose missing information is included in the collected data. do.
1つの側面によれば、複数の演算処理部を含むPLCにおいてロギングを行うことができる。 According to one aspect, logging can be performed in a PLC that includes multiple processors.
以下、図面を参照しながら、実施形態を詳細に説明する。 Hereinafter, embodiments will be described in detail with reference to the drawings.
図1は、PLCシステムの構成例を示している。図1のPLCシステムは、PLC1と、パーソナルコンピュータ(Personal Computer,PC)2と、入出力モジュール3-1~3-M(Mは2以上の整数)と、通信モジュール4-1~4-Mとを含む。
FIG. 1 shows a configuration example of a PLC system. The PLC system of FIG. 1 includes a
PLC1は、工場等に設置される各種制御機器を統括的に制御する。PLC1は、マルチCPU構成のPLCであり、CPUモジュール7-1~7-Mと共有メモリ8とを含む。CPUモジュール7-i(i=1~M)と共有メモリ8とはバス9を介して接続されている。CPUモジュール7-iは、バス9を介して、共有メモリ8にアクセスする。共有メモリ8は、変数の値を記憶する記憶部として動作する。
The
CPUモジュール7-iは、着脱可能なハードウェアモジュールであり、メンテナンス等のためにPLC1から取り外されることがある。CPUモジュール7-iは、演算処理部として動作する。
The CPU module 7-i is a removable hardware module and may be removed from the
CPUモジュール7-1は、後述するロギング処理を行う。CPUモジュール7-1とPC2とは通信ケーブル5を介して接続されている。PC2は通信ケーブル5を介して他のCPUモジュール7-iと接続されていてもよい。CPUモジュール7-1を含む2以上のCPUモジュール7-iがロギング処理を行ってもよい。例えば、CPUモジュール7-1は、第1演算処理部として動作し、他のCPUモジュール7-iは、第2演算処理部として動作する。
The CPU module 7-1 performs logging processing, which will be described later. The CPU module 7-1 and PC2 are connected via a
PC2はPLC1を支援する支援装置としての機能を提供する。PC2は、例えば、ユーザアプリケーションプログラムの編集を行うために用いられる。なお、以降の説明では、ユーザアプリケーションプログラムを「ユーザプログラム」と称することもある。ユーザプログラムは、例えば、IEC(International Electrotechnical Commission)61131-3準拠のラダー言語を用いて作成されてもよい。ユーザプログラムは、シーケンシャルファンクションチャート(Sequential Function Chart,SFC)等のフローチャート形式のモーションプログラム等といったグラフィカルプログラミング言語を用いて作成されてもよい。ユーザプログラムは、C言語等の高級プログラミング言語を用いて作成されてもよい。
PC2 provides a function as a support device that supports PLC1. The
また、後述するように、PC2は、ロギング処理の実行の条件の設定を行う機能も提供する。
In addition, as will be described later, the
CPUモジュール7-iと入出力モジュール3-i及び通信モジュール4-iとは通信バス6-iを介して接続されている。通信バス6-iには、複数の入出力モジュール3-iや複数の通信モジュール4-iが接続されていてもよい。入出力モジュール3-i及び通信モジュール4-iは、着脱可能となっている。 The CPU module 7-i, the input/output module 3-i and the communication module 4-i are connected via a communication bus 6-i. A plurality of input/output modules 3-i and a plurality of communication modules 4-i may be connected to the communication bus 6-i. The input/output module 3-i and the communication module 4-i are detachable.
入出力モジュール3-iは、サーボアンプやエンコーダ、あるいは、センサの信号を電気信号に変換するものであり、また、デジタル信号若しくはアナログ信号を入出力するものであってもよい。 The input/output module 3-i converts a signal from a servo amplifier, an encoder, or a sensor into an electric signal, and may input/output a digital signal or an analog signal.
通信モジュール4-iは、他の機器との通信インタフェースを提供する。 A communication module 4-i provides a communication interface with other devices.
図2は、図1のPLCシステムにおいてCPUモジュール7-1が実行する各処理の実行期間の例を示している。 FIG. 2 shows an example of the execution period of each process executed by the CPU module 7-1 in the PLC system of FIG.
CPUモジュール7-1は、入力処理、プログラム実行処理、出力処理、ロギング処理、及びシステム処理を含む制御処理のサイクルを繰り返し実行する。入力処理は、外部機器である入出力モジュール3-1から受信した入力データを取り込む処理である。プログラム実行処理は、ユーザにより作成されたユーザプログラムを実行する処理である。このユーザプログラムの実行では、入力処理により取り込まれた入力データが用いられる。出力処理は、ユーザプログラムの実行結果を出力することによって入出力モジュール3-1を制御して、実行結果を入出力モジュール3-1の出力に反映させる処理である。 The CPU module 7-1 repeatedly executes a cycle of control processing including input processing, program execution processing, output processing, logging processing, and system processing. The input process is a process of fetching input data received from the input/output module 3-1, which is an external device. The program execution process is a process of executing a user program created by the user. Execution of this user program uses the input data taken in by the input process. The output process is a process of controlling the input/output module 3-1 by outputting the execution result of the user program and reflecting the execution result in the output of the input/output module 3-1.
ロギング処理は、ユーザプログラムにおいて使用されている変数の値を収集して、収集データを生成する処理である。ロギング処理は、PLC1を含むPLCシステムの各構成機器の動作状態を示すデータを記録し、履歴として保存する処理でもある。システム処理は、CPUモジュール7-1自身の動作を管理して、適正な動作を維持するための処理である。
The logging process is a process of collecting values of variables used in the 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
CPUモジュール7-1は、ユーザプログラムの実行を妨げないように、各制御周期における出力処理の後の所定の収集タイミングで、ロギング処理を実行する。制御周期は、入力処理、プログラム実行処理、出力処理、ロギング処理、及びシステム処理の実行期間の合計である。CPUモジュール7-2~7-Mも、入力処理、プログラム実行処理、出力処理、及びシステム処理を含む制御処理のサイクルを繰り返し実行する。 The CPU module 7-1 executes the logging process at a predetermined collection timing after the output process in each control cycle so as not to interfere with the execution of the user program. The control cycle is the total execution period of input processing, program execution processing, output processing, logging processing, and system processing. The CPU modules 7-2 to 7-M also repeatedly execute control processing cycles including input processing, program execution processing, output processing, and system processing.
次に、PLCシステムにおけるPLC1及びPC2ついて更に詳細に説明する。 Next, the PLC1 and PC2 in the PLC system will be explained in more detail.
まず、CPUモジュール7-iのハードウェア構成について、図3に示されているハードウェア構成例を参照しながら説明する。図3のCPUモジュール7-iは通信I/F11、CPU12、バスコントローラ13、メモリ14、記憶装置I/F15、及びバスI/F16を含む。これらの構成要素はいずれもハードウェアであって、内部バス17に接続されており、相互にデータの授受を行うことが可能である。「I/F」とはインタフェースの略称である。CPUは、プロセッサと呼ばれることもある。
First, the hardware configuration of the CPU module 7-i will be described with reference to the hardware configuration example shown in FIG. The CPU module 7-i of FIG. 3 includes a communication I/
通信I/F11は通信ケーブル5に接続されており、PC2との間で行われる各種のデータの授受を管理する。
The communication I/
CPU12は、ユーザプログラム、CPUモジュール7-i自身の動作を管理するためのシステムプログラム、ロギング実行プログラム等の各種のプログラムを実行する。
The
バスコントローラ13は通信バス6-iに接続されており、外部機器である入出力モジュール3-iや通信モジュール4-iとの間で行われる各種のデータの授受を管理する。
The
メモリ14は、例えば半導体メモリであり、RAM(Random Access Memory)領域及びROM(Read Only Memory)領域を含む。RAM領域は、CPU12が各種のプログラムを実行する際に各種のデータを一時的に記憶しておく記憶領域として利用される。ROM領域は、各種のプログラムやデータが保存される領域であり、例えば不揮発性メモリが用いられる。
The
RAM領域は、CPUモジュール7-1~7-Mの共有メモリとして利用することもできる。RAM領域が共有メモリとして利用される場合、図1の共有メモリ8を省略してもよい。共有メモリとして利用されるメモリ14は、CPUモジュール7-iによって使用されている変数の値を記憶する記憶部として動作する。
The RAM area can also be used as a shared memory for the CPU modules 7-1 to 7-M. If the RAM area is used as shared memory, shared
記憶装置I/F15は、メモリカード等の外部記憶装置18に対する各種のデータの書き込み処理や読み出し処理を管理する。
The storage device I/
バスI/F16はバス9に接続されており、共有メモリ8との間で行われる各種のデータの授受を管理する。CPU12は、バスI/F16を介して共有メモリ8にアクセスする。他のCPUモジュール7-iのメモリ14が共有メモリとして利用される場合、CPU12は、バスI/F16を介して、他のCPUモジュール7-iのメモリ14にアクセスすることもできる。バスI/F16は、変数の値を記憶する記憶部にアクセスするインタフェースとして動作する。
The bus I/
次に、PC2のハードウェア構成について、図4に示されているハードウェア構成例を参照しながら説明する。図4の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は通信ケーブル5に接続されており、PLC1との間で行われる各種のデータの授受を管理する。
The communication I/
<ロギングの設定> <Logging settings>
次に、図1のPLCシステムにおいて、ロギング処理の実行の条件をPLC1に設定する手法について説明する。
Next, in the PLC system of FIG. 1, a method of setting conditions for execution of logging processing to the
まず図5について説明する。図5は支援装置30の機能構成例を示した図である。この構成例は、PLC1によるロギング処理の実行の条件を設定する機能を支援装置30が提供する場合の一例である。PLCシステムでは、所定の設定ツールプログラムをPC2に実行させることによって、支援装置30の機能をPC2が提供する。
First, FIG. 5 will be described. FIG. 5 is a diagram showing an example of the functional configuration of the
図5において、支援装置30は、プログラム解析部31、表示部32、特定部33、及び出力部34を含む。
5, the
プログラム解析部31は、PLC1に実行させるユーザプログラムを解析して、ユーザプログラムにおいて使用されている複数の変数を抽出する。表示部32は、プログラム解析部31により抽出された変数のうち、各CPUモジュール7-iによって使用されている変数を表示する。
The program analysis unit 31 analyzes a user program to be executed by the
特定部33は、各CPUモジュール7-iによって使用されている変数の中から選択された変数を、収集対象の変数として特定する。出力部34は、収集対象の変数を示す情報を、設定情報として出力する。
The specifying
このような支援装置30によれば、ユーザは、各CPUモジュール7-iによって使用されている変数の中から、ロギング処理における収集対象の変数を選択して、設定情報を容易に生成することができる。従って、複数のCPUモジュール7-iを含むPLCにおいてロギングを行うことが可能になる。
According to the
図5のような構成を含む支援装置30によって行われる支援方法の一例である、ロギング処理の実行の条件の設定を行う方法について、図6を用いて更に詳細に説明する。
A method of setting conditions for execution of 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-iや通信モジュール4-i等についての機能設定情報を含む情報である。ここでは、このプロジェクトデータ41は、例えばPC2において所定のプロジェクトデータ編集プログラムを実行することによりユーザによって既に作成されていて、例えば補助記憶装置25に既に記憶されているものとする。
設定ツール40により、まず、このプロジェクトデータ41に対してS110の収集対象設定処理が行われる。この処理は、ユーザプログラムで使用されている変数から、ロギングの対象とする変数を設定する処理であって、図5の支援装置30におけるプログラム解析部31及び特定部33の機能を提供する処理である。
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 the user program included in the
ここで図7について説明する。図7は、S110の収集対象設定処理で用いられるUI(User Interface)画面100の画面例を表している。 FIG. 7 will now be described. FIG. 7 shows an example of a UI (User Interface) screen 100 used in the collection target setting process of S110.
図7の画面例では、UI画面100は、プログラム選択部101、抽出変数表示部102、及び対象変数表示部103を含む。支援装置30の機能を図4のPC2が提供する場合、表示装置24は表示部32として動作し、UI画面100を表示する。
In the screen example of FIG. 7 , 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に含まれていたユーザプログラムを示す情報が表示される。なお、本実施形態では、複数のプログラムの集合体としてタスクが構成され、複数のタスクの集合体としてCPU処理が構成され、複数のCPU処理とグローバル変数の集合体としてユーザプログラムが構成されているものとする。
Information indicating the user program included in the
図7の画面例において、「アプリ名称」はユーザプログラムの名称であり、「CPU1」及び「CPU2」は各CPU処理の名称である。「CPUi」は、CPUモジュール7-iによって実行される処理を表す。「タスク1」は各CPU処理に属する各タスクの名称であり、「プログラム」及び「プログラムN」は各タスクに属する各プログラムの名称である。「グローバル変数」は複数のプログラムからアクセス可能な変数であり、ユーザによって定義される。この画面例では、ユーザプログラムと各CPU処理と各タスクと各プログラムとグローバル変数との関係をツリー形式で表現することが表されている。
In the screen example of FIG. 7, "application name" is the name of the user program, and "CPU1" and "CPU2" are the names of each CPU process. "CPUi" represents processing executed by the CPU module 7-i. "
プログラム選択部101に表示されているプログラムの名称のいずれかを選択する操作がユーザにより行われると、選択された名称に対応するプログラムに対してS111のプログラム解析処理が行われ、そのプログラムで使用されている変数が抽出される。 When the user performs an operation to select one of the names of the programs displayed in the program selection section 101, the program corresponding to the selected name is subjected to the program analysis processing of S111, and the program is used in the program. variables are extracted.
なお、プログラムの名称の代わりにタスクの名称を選択する操作が行われた場合には、選択された名称に対応するタスクに属するプログラムのそれぞれから変数が抽出される。また、CPU処理の名称を選択する操作が行われた場合には、選択された名称に対応するCPU処理に含まれるタスクに属するプログラムのそれぞれから変数が抽出される。このとき、抽出された変数の名称が抽出変数表示部102に一覧表示される。 Note that when an operation is performed to select a task name instead of a program name, variables are extracted from each program belonging to the task corresponding to the selected name. Further, when an operation to select the name of the CPU process is performed, variables are extracted from each program belonging to the task included in the CPU process corresponding to the selected name. At this time, the extracted variable names are listed in the extracted variable display section 102 .
抽出変数表示部102に表示されている変数の名称のうちからいずれか1以上を選択し、登録ボタン104を押下する操作がユーザにより行われると、選択された名称に対応する変数が収集対象の変数として特定される。このとき、特定された収集対象の変数の名称が対象変数表示部103に一覧表示される。
When the user selects one or more of the names of the variables displayed in the extracted variable display area 102 and presses the
なお、対象変数表示部103に表示されている収集対象の変数の名称のうちからいずれか1以上を選択し、解除ボタン105を押下する操作がユーザにより行われると、選択された名称に対応する変数が収集対象の変数から除外される。
When the user selects one or more of the names of the variables to be collected displayed in the target variable display area 103 and presses the
また、一括登録ボタン106を押下する操作がユーザにより行われると、抽出変数表示部102に名称が表示されている変数の全てが収集対象の変数として選択され、その名称が対象変数表示部103に一覧表示される。その一方で、一括解除ボタン107を押下する操作がユーザにより行われると、対象変数表示部103に名称が表示されている変数の全てが収集対象の変数から除外される。
When the user presses the
図6の説明に戻る。S120では収集動作設定処理が行われる。この処理はロギング処理の動作設定のための情報を作成する処理である。この情報によって、例えば、収集対象のデータである変数の値の収集タイミング、データの収集を行う期間、収集したデータをPLC1が外部記憶装置18に保存させる保存タイミング等の設定がPLC1に対して行われる。
Returning to the description of FIG. In S120, collection operation setting processing is performed. This process is a process of creating information for setting the operation of the logging process. Based on this information, for example, settings such as the collection timing of the variable value that is the data to be collected, the period during which the data is collected, and the save timing for the
上述したS110及びS120の処理に続いて、S130の設定ファイル作成処理が行われる。この設定ファイル作成処理は、図5の支援装置30における出力部34の機能を提供する処理である。
Following the processes of S110 and S120 described above, the setting file creation process of S130 is performed. This setting file creation process is a process for providing the function of the
設定ファイル作成処理は、S110の処理により選択された収集対象の変数を特定する情報とS120の処理により設定されたロギング処理の動作設定情報とをロギング設定データ42として出力する処理である。ロギング設定データ42は、出力部34が出力する設定情報に対応する。ロギング設定データ42はPLC1に転送され、PLC1では、ロギング処理についての動作設定が、ロギング設定データ42の内容に基づいて行われる。
The setting file creation process is a process of outputting, as the
ロギング設定データ42について更に説明する。図8は、ロギング設定データ42のデータ構造の一例を示している。
The
ロギング設定データ42は、プロジェクトデータ情報51と、収集動作設定情報52と、収集対象設定情報53とを含む。
The
プロジェクトデータ情報51は、PLC1に実行させるユーザプログラムを特定する情報であり、例えば、ユーザプログラムをコンパイルして得られるオブジェクトコードに付された名称(プロジェクト名)や、コンパイルの実行日時等の情報を含む。なお、プロジェクトデータ情報51は、プロジェクトデータ41の一部として含まれている。
The
収集動作設定情報52はS120の収集動作設定処理によって作成される情報である。収集動作設定情報52には、例えば、データの収集タイミングや収集を行う期間、収集したデータをPLC1が外部記憶装置18に保存させる保存タイミング、収集したデータを保存させる保存先の外部記憶装置18を特定する情報が含まれている。
The collection
収集対象設定情報53は、S110の収集対象設定処理によって選択された収集対象の変数についての情報である。収集対象設定情報53のデータ構造の一例が図9に示されている。
The collection
図9の例では、収集対象設定情報53には、データの収集タイミングにおける収集データの合計サイズの情報が含まれている。また、収集対象設定情報53には、収集対象の変数の個数の情報が含まれている。
In the example of FIG. 9, the collection
更に、収集対象設定情報53には、収集対象の変数のそれぞれについての情報として、メモリ種別、データ型、メモリアドレス、及びデータサイズの情報が含まれている。メモリ種別は、共有メモリ8の識別情報を含んでいてもよく、CPUモジュール7-1~7-Mそれぞれに含まれるメモリ14のうち、収集対象の変数の値を記憶しているメモリ14の識別情報を含んでいてもよい。これらの情報によって、PLC1においてユーザプログラムが実行されたときに収集対象の変数の値の保持に使用される記憶領域の位置を特定することが可能になる。
Furthermore, the collection
PLC1によるロギング処理の実行の条件の設定は、上述した設定ツール40を用いることによって、支援装置30によって行われる。
Setting of conditions for execution of logging processing by the
<ロギングの実行> <Run logging>
次に、図1のPLCシステムにおいて、支援装置30としてのPC2によって設定された条件に従ってPLC1により行われるロギング処理について説明する。
Next, in the PLC system of FIG. 1, logging processing performed by the
まず図10について説明する。図10はロギング処理を行うCPUモジュール7-1の機能構成例を示した図である。 First, FIG. 10 will be described. FIG. 10 is a diagram showing an example of the functional configuration of the CPU module 7-1 that performs logging processing.
図10に示した構成例では、CPUモジュール7-1は、処理実行部61、収集部62、リングバッファ63、及び保存部64を含む。
In the configuration example shown in FIG. 10, the CPU module 7-1 includes a process execution unit 61, a
前述したように、CPUモジュール7-1は、入力処理、プログラム実行処理、出力処理、ロギング処理、及びシステム処理を含む制御処理のサイクルを繰り返し実行する。図10に示した機能構成例では、処理実行部61が入力処理、プログラム実行処理、出力処理、及びシステム処理を実行し、収集部62がロギング処理を実行する。図3に示したハードウェア構成例では、CPU12が処理実行部61及び収集部62として動作する。
As described above, the CPU module 7-1 repeatedly executes a cycle of control processing including input processing, program execution processing, output processing, logging processing, and system processing. In the functional configuration example shown in FIG. 10, the processing execution unit 61 executes input processing, program execution processing, output processing, and system processing, and the
リングバッファ63は、ロギング処理による変数の値の収集時刻を、その収集時刻に収集された変数の値に対応付けた収集データを、変数の値を収集する度に保存する記憶領域である。図3に示したハードウェア構成例では、メモリ14の記憶領域の一部によってリングバッファ63が構成される。
The
収集部62は、ロギング処理において、他のCPUモジュール7-iによって使用されている所定変数の値に対するアクセスに失敗した場合、所定変数の値の欠損を示す欠損情報を収集データに設定する。例えば、プロジェクトデータ41が示すPLCシステムのシステム構成と、実際のPLCシステムのシステム構成との間に差異が生じている場合、所定変数の値に対するアクセスに失敗することがある。例えば、他のCPUモジュール7-iがメンテナンス等のためにPLC1から取り外されている場合、このような差異が生じ得る。
In the logging process, if access to the value of the predetermined variable used by another CPU module 7-i fails, the
保存部64は、リングバッファ63に保存されている収集データを順次読み出して外部記憶装置18に保存する。図3に示したハードウェア構成例では記憶装置I/F15がCPU12による制御の下で保存部64の機能を提供する。この記憶装置I/F15に対する制御を、例えば、CPU12によって提供される収集部62がロギング処理の一部として行ってもよい。
The
他のCPUモジュール7-iは、例えば、図10のCPUモジュール7-1から収集部62、リングバッファ63、及び保存部64を除外した構成を有する。
The other CPU module 7-i has, for example, a configuration obtained by removing the
このようなPLC1によれば、各CPUモジュール7-iが使用している変数の値へのアクセスに成功した場合、変数の値が収集データに記録される。また、ロギング処理を行うCPUモジュール7-1以外のCPUモジュール7-iが使用している変数の値へのアクセスに失敗した場合であっても、失敗に起因する変数の値の欠損を示す欠損情報が収集データに記録される。従って、複数のCPUモジュール7-iを含むPLCにおいてロギングを行うことが可能になる。
According to such a
図10のような構成要素を含むCPUモジュール7-1によって行われるロギング実行方法について、図11を用いて更に詳細に説明する。 A logging execution method performed by the CPU module 7-1 including the components shown in FIG. 10 will be described in more detail with reference to FIG.
S210のプログラム実行処理は、入力処理で取り込まれた、入出力モジュール3-1や通信モジュール4-1等の外部機器から送られてくる入力データを用いてユーザプログラムを実行する処理である。この実行結果は、外部機器の制御のために出力処理によって出力される。図3のハードウェア構成例において、このプログラム実行処理を実行するCPU12は、ユーザプログラムの実行のためにメモリ14の記憶領域を使用する。このときに使用される記憶領域を、プログラム使用領域14aと称することとする。
The program execution process of S210 is a process of executing a user program using the input data sent from an external device such as the input/output module 3-1 or the communication module 4-1, which has been captured in the input process. This execution result is output by the output process for controlling the external device. In the hardware configuration example of FIG. 3, the
S220のロギング処理は、S210のプログラム実行処理により実行されるユーザプログラムにおいて使用されている変数のうちの前述した収集対象の変数のそれぞれの値を収集する処理である。この収集対象の変数についての情報と、ロギング処理の動作設定情報とを含むロギング設定データ42は、支援装置30(PC2)において前述したようにして作成されてCPUモジュール7-1に予め提供されているものとする。
The logging process of S220 is a process of collecting the values of the variables to be collected among the variables used in the user program executed by the program execution process of S210. The
CPUモジュール7-1のCPU12は、制御処理と並行して、S230の時刻管理処理とS240の収集タイミング検知処理とを行っている。時刻管理処理は現在の時刻を計時する処理である。収集タイミング検知処理は、ロギング設定データ42に含まれている収集動作設定情報52により示されているデータの収集タイミングの到来を検知する処理である。
The
S220のロギング処理では、収集タイミング検知処理による収集タイミングの到来の検知に応じて、収集対象の変数のそれぞれの値を収集する処理が行われる。また、ロギング処理では、変数の値の収集時刻を時刻管理処理による計時結果から取得し、変数の値と収集時刻とをそれぞれ対応付けた収集データをリングバッファ63に保存する処理が行われる。
In the logging process of S220, 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, the collection time of the variable value is acquired from the time measurement result of the time management process, and the collected data in which the variable value and the collection time are associated with each other are stored in the
また、CPUモジュール7-1のCPU12はS250の保存処理を実行する。この保存処理は、ロギング設定データ42に含まれている収集動作設定情報52により示されている保存タイミングの到来を検知する処理を含む。また、この保存処理は、記憶装置I/F15を制御して、リングバッファ63に保存されている収集データを保存タイミングの到来の検知に応じて読み出させて、収集動作設定情報52により示されている保存先である外部記憶装置18に保存させる処理を含む。
Also, the
ここで、S220のロギング処理とS250の保存処理とについて、図12に示したフローチャートを用いて更に詳細に説明する。 Here, the logging process of S220 and the saving process of S250 will be described in more detail using the flowchart shown in FIG.
図12において、S251及びS252の処理はロギング処理の詳細を表しており、S253及びS254の処理は保存処理の詳細を表している。 In FIG. 12, the processes of S251 and S252 represent the details of the logging process, and the processes of S253 and S254 represent the details of the saving process.
図12に示されている処理は、制御処理の各サイクルにおいて、ロギング処理の処理開始タイミングが到来すると開始される。 The processing shown in FIG. 12 is started when the logging processing start timing arrives in each cycle of the control processing.
まず、S251において、前述したS240の収集タイミング検知処理によって収集タイミングの到来が検知されたか否かを判定する処理が行われる。この判定処理において、収集タイミングの到来が検知されたと判定されたとき(判定結果がYESのとき)には、S252の収集処理が行われる。一方、この判定処理において、収集タイミングの到来が検知されないと判定されたとき(判定結果がNOのとき)には、図12に示されている処理が終了する。 First, in S251, a process of determining whether or not the arrival of the collection timing is detected by the collection timing detection process of S240 is performed. In this determination process, when it is determined that the arrival of the collection timing has been detected (when the determination result is YES), the collection process of S252 is performed. On the other hand, when it is determined in this determination process that the collection timing has not been detected (when the determination result is NO), the process shown in FIG. 12 ends.
S252の収集処理は、収集対象の変数のそれぞれの値を収集し、収集した値を、後述する収集データ73として、リングバッファ63に保存する処理である。この収集処理の詳細については後述する。
The collection process of S252 is a process of collecting the values of the variables to be collected and storing the collected values in the
S252の収集処理に続き、S253では、ロギング設定データ42に含まれている収集動作設定情報52により示されている保存タイミングが到来したか否かを判定する処理が行われる。この判定処理において、保存タイミングが到来したと判定したとき(判定結果がYESのとき)にはS254に処理を進める。一方、この判定処理において、保存タイミングが到来しないと判定したとき(判定結果がNOのとき)には、S254の処理を行わずに、図12に示されている処理が終了する。
Following the collection process of S252, in S253, a process of determining whether or not the save timing indicated by the collection
S254では、今回実行中のロギング処理におけるS252の収集処理によりリングバッファ63に保存された収集データ73を読み出し、収集動作設定情報52で示されている保存先の外部記憶装置18にロギング収集データ70として保存する処理が行われる。
In S254, the collected
ロギング収集データ70について更に説明する。図13は、ロギング収集データ70のデータ構造の一例を示している。
The
ロギング収集データ70は、プロジェクトデータ情報51と、収集データ数71と、収集データサイズ72と、1以上の収集データ73とを含む。
The
プロジェクトデータ情報51は、PLC1で実行されたユーザプログラムを特定する情報であり、例えば、ユーザプログラムをコンパイルして得られるオブジェクトコードに付された名称や、コンパイルの実行日時の情報を含む。つまり、ロギング収集データ70に含まれているプロジェクトデータ情報51は、ロギング設定データ42に含まれていたプロジェクトデータ情報51と同様のものである。CPU12は、S252の収集処理において、ロギング設定データ42からプロジェクトデータ情報51を読み出してロギング収集データ70に取り込む。
The
収集データ数71は、ロギング収集データ70に含まれている収集データ73の個数を表している情報である。また、収集データサイズ72は、ロギング収集データ70に含まれている収集データ73の総データ量を表している情報である。
The collected data count 71 is information representing the number of collected
ロギング収集データ70には、収集データ73として、収集された変数の値についてのデータが、収集された順序に従って含まれている。この収集データ73のデータ構造の一例が図14に示されている。
The
図14の例では、収集データ73にはタイムスタンプ74の情報が含まれている。このタイムスタンプ74は、変数の値の収集が行われたときの時刻を表している。
In the example of FIG. 14, the collected
また、収集データ73には、タイムスタンプ74の時刻において収集された1以上の変数のそれぞれの値を表す変数データ75が含まれている。この変数データ75のデータ構造の一例が図15に示されている。
The collected
図15の例では、変数データ75には変数有効フラグ76、変数サイズ77、及び変数値78の情報が含まれている。
In the example of FIG. 15, the
変数有効フラグ76は変数値78が有効又は無効のいずれであるかを示す。変数値78が有効である場合、変数有効フラグ76にONが設定され、変数値78が無効である場合、変数有効フラグ76にOFFが設定される。OFFが設定された変数有効フラグ76は、変数の値の欠損を示す欠損情報の一例である。変数有効フラグ76を設けることで、変数データ75に変数の値の欠損を記録することが可能になる。
A variable
変数サイズ77は変数値78のデータ量を表す。変数値78は、収集された変数の値を表す。
A
S254の処理では、ロギング設定データ42とリングバッファ63に保存された収集データとを用いて、このようなデータ構造を有するロギング収集データ70を作成して外部記憶装置18に保存する処理が行われる。
In the process of S254, the
その後、S254の処理が終了すると、図12に示されている処理が終了する。 After that, when the process of S254 ends, the process shown in FIG. 12 ends.
なお、図12のフローチャートで示したロギング処理が終了したときには、CPU12は、ロギング設定データ42を外部記憶装置18に更に保存する処理も行うようにする。このロギング設定データ42は、後述する収集データ73の表示の際に使用される。
Note that when the logging process shown in the flowchart of FIG. 12 is completed, the
次に、図12におけるS252の収集処理について、図16に示したフローチャートを用いて更に詳細に説明する。 Next, the collection processing of S252 in FIG. 12 will be described in more detail using the flowchart shown in FIG.
まず、S291において、前述したS230の時刻管理処理により計時されている現在の時刻をタイムスタンプとして取得し、得られたタイムスタンプを収集データ73のタイムスタンプ74としてリングバッファ63に書き込む処理が行われる。
First, in S291, the current time measured by the time management process of S230 described above is obtained as a time stamp, and the obtained time stamp is written in the
次に、S292において、収集対象の変数の値に対するアクセスが成功したか否かを判定する判定処理が行われる。ロギング処理を行っているCPUモジュール7-1内の変数の値に対するアクセスは、CPUモジュール7-1の故障が発生しない限り成功する。一方、バスI/F16を介して行われる共有メモリ8又は他のCPUモジュール7-iに対するアクセスは、アクセス対象が存在しない等の状況によって失敗することがある。例えば、他のCPUモジュール7-iがメンテナンス等のためにPLC1から取り外されている場合、そのCPUモジュール7-iのメモリ14が記憶している変数の値に対するアクセスは失敗することがある。
Next, in S292, determination processing is performed to determine whether or not the value of the variable to be collected has been successfully accessed. Access to the values of the variables in the CPU module 7-1 that is performing the logging process will succeed unless the CPU module 7-1 fails. On the other hand, access to the shared
変数の値に対するアクセスが成功したと判定されたとき(判定結果がYESのとき)には、S293において、その変数の変数有効フラグ76がONに設定される。
When it is determined that the access to the value of the variable has succeeded (when the determination result is YES), the variable
次に、S294において、変数有効フラグ76がONに設定された変数の現在の値を取得し、取得した値を、変数データ75の変数値78としてリングバッファ63に書き込む処理が行われる。
Next, in S294, a process of acquiring the current value of the variable whose valid
収集対象の変数の値は、共有メモリ8又はCPUモジュール7-1~7-Mそれぞれに含まれるメモリ14に記憶されている。変数の値の記憶領域は、ロギング設定データ42の収集対象設定情報53に含まれている収集対象の変数についてのメモリ種別、データ型、メモリアドレス、及びデータサイズの情報に基づいて特定される。従って、S294の処理では、特定された記憶領域に保持されているデータを読み出すことによって、収集対象の変数の値の取得が行われる。
The values of the variables to be collected are stored in the shared
変数の値に対するアクセスが失敗したと判定されたとき(判定結果がNOのとき)には、S296において、その変数の変数有効フラグ76がOFFに設定される。
When it is determined that the access to the value of the variable has failed (when the determination result is NO), the
次に、S295において、ロギング設定データ42の収集対象設定情報53に情報が含まれていた収集対象の変数の全てについて値の収集を済ませたか否かを判定する処理が行われる。この判定処理において、収集対象の変数の全てについて値の収集を済ませたと判定されたとき(判定結果がYESのとき)には今回の収集処理が終了する。一方、この判定処理において、値の収集を済ませていない収集対象の変数が残っていると判定されたとき(判定結果がNOのとき)にはS292へ処理を戻して、値の収集を済ませていない収集対象の変数について、その値を収集する処理が行われる。
Next, in S295, a process of determining whether or not the values of all the collection target variables whose information is included in the collection
以上の収集処理が終了すると、収集データ73のリングバッファ63への保存が完了し、続いて図12のS253の処理が行われる。
When the collection process described above is completed, the storage of the collected
<ロギングによる収集データの表示> <Display of collected data by logging>
次に、図1のPLCシステムにおけるPLC1により行われたロギング処理により得られた収集データ73を表示する手法について説明する。
Next, a method of displaying collected
まず、収集データ73を表示する装置のハードウェア構成について説明する。図17は収集データ表示装置80のハードウェア構成例を示している。
First, the hardware configuration of the device that displays the collected
図17の構成例では、収集データ表示装置80は、CPU81、メモリ82、入力装置83、補助記憶装置84、表示装置85、及び記憶装置I/F86を含む。これらの構成要素はいずれもハードウェアであって、内部バス87に接続されており、相互にデータの授受を行うことが可能である。
In the configuration example of FIG. 17, the collected
CPU81は、例えば、メモリ82を利用して所定のプログラムを実行することにより、収集データの表示や収集データの波形表示、データ欠損時の不定値表示等の各種の表示を制御する機能を提供する。
The
入力装置83は、例えば、キーボードやポインティングデバイス等であり、ユーザからの指示又は情報の入力に用いられる。
The
補助記憶装置84は、磁気ディスク装置、光ディスク装置、光磁気ディスク装置等であり、例えば、ハードディスクドライブやフラッシュメモリであってもよい。収集データ表示装置80は、補助記憶装置84にプログラム及びデータを格納しておき、それらをメモリ82にロードして使用することができる。
The
表示装置85は、例えば、ユーザへの問い合わせ又は指示や、処理結果の表示出力に用いられる。
The
記憶装置I/F86は、メモリカード等の外部記憶装置18に対する各種のデータの読み出し処理を管理する。
The storage device I/
収集データ表示装置80は以上のハードウェア構成を有している。なお、このようなハードウェア構成は、一般的なコンピュータが有している標準的な構成であるので、このようなコンピュータを用いて収集データ表示装置80を構成するようにしてもよい。また、図1のPLCシステムにおいて支援装置30として機能させたPC2を更に用いて、収集データ表示装置80を構成するようにしてもよい。
The collected
次に図18について説明する。図18は収集データ表示装置80の機能構成例を示した図である。
Next, FIG. 18 will be described. FIG. 18 is a diagram showing a functional configuration example of the collected
図18において、外部記憶装置18には、前述したロギング収集データ70がPLC1によって保存されているものとする。図13及び図14を用いて説明したように、ロギング収集データ70には、PLC1が実行したS220のロギング処理により収集された収集対象の変数の値を収集時刻に対応付けた収集データ73が収集時刻順に並べられている。
In FIG. 18, it is assumed that the
図18の構成例では、収集データ表示装置80は、表示制御部91及び表示部92を含む。図17のCPU81は表示制御部91として動作し、表示装置85は表示部92として動作する。
In the configuration example of FIG. 18 , the collected
表示制御部91は、収集データ73に含まれる各変数データ75について、変数の値又は変数の値の欠損を示す欠損情報のいずれが含まれているかをチェックする。
The
表示部92は、変数の値が収集データ73に含まれている変数について、変数の値を表示し、欠損情報が収集データ73に含まれている変数について、変数の値の欠損を示す欠損表示情報を表示する。表示部92は、欠損表示情報として、例えば、変数の値が不定値であることを示す不定値情報を表示してもよい。
The
このような収集データ表示装置80によれば、CPUモジュール7-1~7-Mから収集された収集データ73に含まれている変数の値が表示されると共に、変数の値が含まれていない場合には、変数の値の欠損を示す欠損表示情報が表示される。従って、複数のCPUモジュール7-iを含むPLCにおいてロギングを行うことが可能になる。
According to the collected
図18のような構成を含む収集データ表示装置80によって行われる、収集データを表示する方法の一例について、図19を用いて更に詳細に説明する。
An example of a method of displaying collected data performed by the collected
収集データ表示装置80は、S310のプログラム表示処理、S320の波形表示処理、S330のロギングファイル解析・変換処理、及びS340の表示制御処理を行う。これらの各処理は、表示制御部91によって行われる。これらの各処理をCPU81に行わせるプログラムはエンジニアリングソフトウェアと称されることもある。
The collected
S310のプログラム表示処理は、前述したプロジェクトデータ41に含まれるユーザプログラムを表示すると共に、ロギング収集データ70から作成された表示用データを用いて、ユーザプログラムについての収集対象の変数の値を表示する処理である。表示用データは、収集時刻及び変数値を含む。なお、ここでは、プロジェクトデータ41は、例えばPC2において所定のプロジェクトデータ編集プログラムを実行することによりユーザによって既に作成されていて、例えば補助記憶装置84に既に記憶されているものとする。
The program display process of 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 the display data created from the
S330のロギングファイル解析・変換処理は、ロギング設定データ42とロギング収集データ70を解析して、収集データ73を、S310のプログラム表示処理とS320の波形表示処理とのそれぞれに入力される表示用データに変換する処理である。なお、ここでは、ロギング設定データ42及びロギング収集データ70は外部記憶装置18により提供されるものとする。ロギングファイル解析・変換処理では、これらのデータが外部記憶装置18から読み出されて使用される。
The logging file analysis/conversion process of 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. Further, the display control processing includes processing for interlocking the display of the program display processing and the waveform display processing.
以下、収集データ表示装置80によって行われる、図19に示した各処理の詳細を更に説明する。
Details of each process shown in FIG. 19 performed by the collected
まず、S310のプログラム表示処理の詳細について、図20を用いて説明する。 First, the details of the program display processing of S310 will be described with reference to FIG.
図20で表されているように、S310のプログラム表示処理は、S311の操作UI処理と、S312の変数値表示制御処理と、S313のユーザプログラム表示処理と、S314の照合処理と、S315の警告処理とを含む。 As shown in FIG. 20, the program display process of S310 includes the operation UI process of S311, the variable value display control process of S312, the user program display process of S313, the verification process of S314, and the warning process of S315. including processing.
S311の操作UI処理は、収集データ表示装置80のユーザによる入力装置83に対する操作に応じた入力を受け付ける処理である。
The operation UI process of S311 is a process of receiving an input corresponding to an operation on the
S312の変数値表示制御処理は、S311の操作UI処理により受け付けられた入力の情報や、S340の表示制御処理からの連動の情報を受け付けて、表示用データに含まれる変数値の表示を制御する処理である。 The variable value display control process of S312 receives the input information received by the operation UI process of S311 and the linked information from the display control process of S340, and controls the display of the variable values included in the display data. processing.
S313のユーザプログラム表示処理は、プロジェクトデータ41に含まれるユーザプログラムを表示すると共に、S312の変数値表示制御処理による制御の下で、収集対象の変数の値を、ユーザプログラムの表示上に表示させる処理である。
The user program display processing of S313 displays the user program included in the
S314の照合処理は、プロジェクトデータ41、ロギング設定データ42、及びロギング収集データ70のプロジェクトデータ情報51の照合を行う処理である。
The collation process of S314 is a process of collating the
S315の警告処理は、S314の照合処理によって、各データのプロジェクトデータ情報51が一致しない場合に所定の警告を行う処理である。
The warning process of S315 is a process of giving a predetermined warning when the
図21は、表示装置85に表示される警告画面の画面例を表している。S315の警告処理による所定の警告は、例えばこのような警告画面を表示装置85に表示することによって行われる。この画面例には、プロジェクトデータ情報51が一致しないことをユーザに警告する警告ダイアログ130が含まれている。なお、例えばユーザプログラムのデバッグを行う場合等には有益であるので、収集データ表示装置80では、プロジェクトデータ情報51が不一致であっても変数の値の表示の機能は利用可能としている。
FIG. 21 shows an example of a warning screen displayed on the
次に、S320の波形表示処理の詳細について、図22を用いて説明する。 Next, details of the waveform display processing of S320 will be described using FIG.
図22で表されているように、S320の波形表示処理は、S321の操作UI処理と、S322の変数値表示制御処理と、S323の波形作成処理とを含む。 As shown in FIG. 22, the waveform display process of S320 includes the operation UI process of S321, the variable value display control process of S322, and the waveform creation process of S323.
S321の操作UI処理は、S311の処理と同様の処理であり、収集データ表示装置80のユーザによる入力装置83に対する操作に応じた入力を受け付ける処理である。
The operation UI process of S321 is the same process as the process of S311, and is a process of receiving an input according to the operation of the
S322の変数値表示制御処理は、S312の処理と同様の処理であり、S321の操作UI処理により受け付けられた入力の情報や、S340の表示制御処理からの前述の連動の情報を受け付けて、表示用データに含まれる変数値の表示を制御する処理である。 The variable value display control process of S322 is the same process as the process of S312. This is processing for controlling the display of variable values included in data for use.
S323の波形作成処理は、S340の表示制御処理により提供される表示用データに基づいて、収集タイミングと変数との関係を表している波形を作成して表示する処理である。 The waveform creation process of S323 is a process of creating and displaying a waveform representing the relationship between the acquisition timing and the variables based on the display data provided by the display control process of S340.
次に、S330のロギングファイル解析・変換処理の詳細について、図23を用いて説明する。 Next, details of the logging file analysis/conversion process of S330 will be described using FIG.
図23で表されているように、S330のロギングファイル解析・変換処理は、S331のロギング設定データ取得処理、S332のロギング収集データ取得処理、S333の変数データ欠損判定処理、及び、S334の表示用データ作成処理を含んでいる。 As shown in FIG. 23, the logging file analysis/conversion process of S330 includes the logging setting data acquisition process of S331, the logging collection data acquisition process of S332, the missing variable data determination process of S333, and the display data of S334. Includes data preparation process.
S331のロギング設定データ取得処理は、ロギング設定データ42を外部記憶装置18から取り込む処理である。
The logging setting data acquisition process of S<b>331 is a process of fetching the
S332のロギング収集データ取得処理は、ロギング収集データ70を外部記憶装置18から読み出して取り込む処理である。
The logging collection data acquisition process of S332 is a process of reading out the
S333の変数データ欠損判定処理は、外部記憶装置18から読み出したロギング収集データ70において、変数値が欠損しているか否かを判定する処理である。より具体的には、この変数データ欠損判定処理は、S332のロギング収集データ取得処理により取得されたロギング収集データ70に含まれている変数データ75を参照することによって、変数値の欠損が生じているか否かを判定する処理である。
The variable data loss determination process of S333 is a process of determining whether or not the variable value is missing in the
S334の表示用データ作成処理は、ロギング設定データ42とロギング収集データ70から、収集時刻及び変数値を含む表示用データを作成する処理である。S333の変数データ欠損判定処理によって欠損が生じていると判定された場合は、欠損していた変数値の代わりに、変数の値が不定値であることを示す不定値情報が作成される。
The display data creation process of S334 is a process of creating display data including collection times and variable values from the
次に図24について説明する。図24は、S330のロギングファイル解析・変換処理の処理内容を示したフローチャートである。 Next, FIG. 24 will be described. FIG. 24 is a flow chart showing the processing contents of the logging file analysis/conversion processing of S330.
図24において、まず、S401では、ロギング設定データ42とロギング収集データ70とを外部記憶装置18から読み出して取り込む処理が行われる。この処理は、図23におけるS331のロギング設定データ取得処理とS332のロギング収集データ取得処理とに相当する処理である。
In FIG. 24, first, in S401, a process of reading the
S402では、ロギング収集データ70に含まれている収集データ73から、収集時刻及び変数値を含む表示用データを作成する変数値生成処理が行われる。S402の処理は、図23におけるS334の表示用データ作成処理に相当する処理である。
In S<b>402 , variable value generation processing is performed to generate display data including collection time and variable values from the collected
S403では、S402の処理による収集データ73の取り出しの回数を計数するカウンタをインクリメントする(1増加させる)処理が行われる。
In S403, a process of incrementing (by 1) a counter that counts the number of times the collected
S404では、カウンタの現在の値がロギング収集データ70に含まれている収集データ数71で示されている値に達したか否かを判定する処理が行われる。この判定処理において、カウンタの値が収集データ数71で示されている値に達したと判定したとき(判定結果がYESのとき)には、このロギングファイル解析・変換処理を終了する。一方、この判定処理において、カウンタの値が収集データ数71で示されている値には未だ達してはいないと判定したとき(判定結果がNOのとき)には、S402に処理を戻す。このときには、ロギング収集データ70から未だ取り出されていない残余の収集データ73についてS402以降の処理が行われる。
In S<b>404 , processing is performed to determine whether or not the current value of the counter has reached the value indicated by the collected data count 71 included in the logging collected
以上の処理がS330のロギングファイル解析・変換処理である。 The above processing is the logging file analysis/conversion processing of S330.
次に、図24におけるS402の変数値生成処理について、図25に示したフローチャートを用いて更に詳細に説明する。 Next, the variable value generation processing of S402 in FIG. 24 will be described in more detail using the flowchart shown in FIG.
まず、S411において、収集データ73に含まれている変数データ75の変数有効フラグ76がONであるか否かを判定する処理が行われる。この判定処理において、変数有効フラグ76がONであると判定したとき(判定結果がYESのとき)には、変数値78がそのまま表示用データの変数値として用いられる。一方、この判定処理において、変数有効フラグ76がOFFであると判定したとき(判定結果がNOのとき)には、S412において、変数サイズ77が示すデータ量の不定値情報を表示用データの変数値として作成する処理が行われる。なお、表示用データの収集時刻としては、変数データ75を含む収集データ73に対応付けられている収集時刻が用いられる。
First, in S411, processing is performed to determine whether or not the variable
S413では、S411において判定された変数データ75の個数を計数するカウンタをインクリメントする(1増加させる)処理が行われる。
In S413, a process of incrementing (by 1) a counter that counts the number of
S414では、カウンタの現在の値が収集データ73に含まれている変数データ75の個数に達したか否かを判定する処理が行われる。この判定処理において、カウンタの値が変数データ75の個数に達したと判定したとき(判定結果がYESのとき)には、このロギングファイル解析・変換処理を終了する。一方、この判定処理において、カウンタの値が変数データ75の個数には未だ達してはいないと判定したとき(判定結果がNOのとき)には、S411に処理を戻す。このときには、未だ判定されていない残余の変数データ75についてS411以降の処理が行われる。
In S414, a process of determining whether or not the current value of the counter has reached the number of
次に、S340の表示制御処理の詳細について、図26を用いて説明する。 Next, details of the display control processing of S340 will be described using FIG.
図26で表されているように、S340の表示制御処理は、S341の変数値提供処理、S342の再生制御処理、及び、S343の収集データ取得処理を含む。 As shown in FIG. 26, the display control process of S340 includes the variable value provision process of S341, the reproduction control process of S342, and the collected data acquisition process of S343.
S341の変数値提供処理は、S330のロギングファイル解析・変換処理により作成された表示用データを、収集タイミングが対応付けられている変数の値として、S310のプログラム表示処理とS320の波形表示処理とに提供する処理である。なお、提供される表示用データには、ロギングファイル解析・変換処理により作成された不定値情報が含まれている場合がある。 In the variable value providing process of S341, the data for display created by the logging file analysis/conversion process of S330 is used as the value of the variable associated with the collection timing, and the program display process of S310 and the waveform display process of S320 are performed. It is a process to provide to Note that the provided display data may contain undefined value information created by logging file analysis/conversion processing.
S342の再生制御処理は、所定の連動の指示を受けると、S310のプログラム表示処理とS320の波形表示処理とを制御して、それぞれの処理により表示される画面の内容を連動させる処理である。 The reproduction control process of S342 is a process of controlling the program display process of S310 and the waveform display process of S320 when a predetermined interlocking instruction is received, and interlocking the contents of the screen displayed by each process.
S343の収集データ取得処理は、S330のロギングファイル解析・変換処理により作成された表示用データを取得してS341の変数値提供処理に提供する処理である。 The collected data acquisition process of S343 is a process of acquiring the display data created by the logging file analysis/conversion process of S330 and providing it to the variable value provision process of S341.
以上のように、S340の表示制御処理によって、S330のロギングファイル解析・変換処理により作成された表示用データが、S310のプログラム表示処理とS320の波形表示処理とに提供される。次に、プログラム表示処理と波形表示処理とが表示装置85にそれぞれ表示させる画面について説明する。
As described above, the display control process of S340 provides 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. Next, screens displayed on the
まず図27について説明する。図27は、収集データの表示画面の例である。この表示画面は、CPU81がS310のプログラム表示処理を実行することによって表示装置85に表示される。
First, FIG. 27 will be described. FIG. 27 is an example of a display screen of collected data. This display screen is displayed on the
図27の画面例は、S313のユーザプログラム表示処理により得られるユーザプログラム表示画面110に重ねて、S311の操作UI処理により得られるUI画面120が表示されている状態を表している。
The screen example of FIG. 27 shows a state in which the
S313のユーザプログラム表示処理によって、プロジェクトデータ41に含まれているユーザプログラムの内容を表す図(例えばラダープログラム)が作成され、ユーザプログラム表示画面110として表示される。
A diagram (for example, a ladder program) representing the contents of the user program included in the
UI画面120は、収集タイミング毎に収集されている変数の値についての表示を順次更新させる指示を与えるコマ送りボタン121やシークバー122、表示させる変数の値の収集タイミングの時刻を直接入力する時刻入力欄123等を有している。なお、時刻入力欄123は、コマ送りボタン121やシークバー122への操作によって指定される収集タイミングの時刻を表示する表示欄としての機能も有している。
The
S311の操作UI処理によって、コマ送りボタン121やシークバー122への操作に応じて指定された収集タイミングが取得され、このタイミングの時刻が時刻入力欄123に表示される。また、時刻の入力操作が時刻入力欄123に対して行われた場合には、この操作UI処理によって、入力された時刻が、指定した収集タイミングとして取得される。
By the operation UI processing of S<b>311 , the collection timing specified according to the operation of the
S312の変数値表示制御処理により、ロギング収集データ70において収集タイミングが対応付けられている変数の値や、S311の操作UI処理によって取得された収集タイミングの指定が取得される。また、この変数値表示制御処理により、指定された収集タイミングにおける変数の値がS313のユーザプログラム表示処理に送られ、ユーザプログラム表示処理により、変数の値についての表示が、ユーザプログラム表示画面110で行われる。
By the variable value display control processing of S312, the value of the variable associated with the collection timing in the
図27の画面例において、ON/OFF表示111、ON/OFF不定表示112、変数表示113、変数表示114、及び変数不定値表示115は、収集対象の変数の値を表示するものである。
In the screen example of FIG. 27, an ON/
ON/OFF表示111は、ONとOFFとのどちらかの状態を有するプログラム構成要素の状態が収集対象の変数として選択されている場合に、変数値で示される状態に応じた異なる色彩で要素を塗りつぶした表示を行って変数値を表すものである。図27の画面例では、ON/OFF表示111として、ユーザプログラム中の要素が黒塗りで表示されているが、実際には、例えば、「ON」の場合には赤塗りで、また、「OFF」の場合には青塗りで要素が表示される。
The ON/
塗りつぶしが施されていないON/OFF不定表示112は、ONとOFFとのどちらかの状態を有するプログラム構成要素の状態が収集対象の変数として選択されており、且つ、その変数値が欠損している場合の表示である。ON/OFF不定表示112は、不定値情報の一例である。
The unfilled ON/OFF
変数表示113及び変数表示114は、プログラム構成要素に関する数値が収集対象の変数として選択されている場合に、その数値を変数値として直接表示するものである。
The
変数不定値表示115は、プログラム構成要素に関する数値の表示として「???」なる表示を含む。この変数不定値表示115は、プログラム構成要素に関する数値が収集対象の変数として選択されており、且つ、その変数の値が欠損している場合の表示である。変数不定値表示115は、不定値情報の一例である。
The variable
変数データ75の変数有効フラグ76がOFFである場合には、ON/OFF不定表示112や変数不定値表示115がユーザプログラム表示画面110で表示される。この表示はS313のユーザプログラム表示処理によって行われる。
When the
以上のように、S311、S312、及びS313の処理によって、図27の画面例で表されているように、収集時刻と収集された変数の値とが関係付けされて表示装置85で表示される。
As described above, through the processing of S311, S312, and S313, the collection time and the collected variable values are associated with each other and displayed on the
次に図28について説明する。図28は、収集データの波形表示画面140の例である。この波形表示画面140は、CPU81がS320の波形表示処理を実行することによって表示装置85に表示される。
Next, FIG. 28 will be described. FIG. 28 is an example of a
波形表示画面140に含まれている波形141は、S323の波形作成処理によって作成されたものである。なお、図28の画面例では、「変数1」、「変数2」、及び「変数3」のそれぞれについての波形141が、それぞれ実線、破線、及び一点鎖線を用いて表示されている。また、波形表示画面140に含まれている時刻表示142は、波形141により変数値との関係が表されている収集タイミングを表しており、S323の波形作成処理によって波形表示画面140に表示される。
A
また、S321の操作UI処理によって、収集タイミングの範囲の移動指示が受け付けられると、S323の波形作成処理により、移動後の収集タイミングの範囲についての波形141が波形表示画面140に表示される。また、波形表示画面140に表示されている太線143によって示される収集タイミングの時刻が、S323の波形作成処理によって時刻表示欄144に表示される。
Further, when an instruction to move the collection timing range is accepted by the operation UI processing of S321, the
S322の変数値表示制御処理により、S340の表示制御処理により提供される変数値の表示データにおいて収集タイミングが対応付けられている変数の値が取得される。また、このS322の変数値表示制御処理により、時刻表示欄144に表示された収集タイミングの時刻が取得される。更に、この変数値表示制御処理により、取得された収集タイミングにおける変数の値が、波形141と太線143との交点の位置で表される変数の値として、変数値表示欄145に表示される。
By the variable value display control process of S322, the value of the variable associated with the collection timing in the display data of the variable value provided by the display control process of S340 is acquired. In addition, the time of the collection timing displayed in the
変数値表示欄145における変数不定値表示146は、図27の変数不定値表示115と同様に、変数の値が欠損している場合の表示である。変数3の波形141の一部を覆い隠している波形不定表示147は、変数不定値表示146と同様に、変数の値が欠損している場合の表示である。
An indefinite
変数有効フラグ76がOFFである場合には、波形表示画面140における収集タイミングに対応する位置に、このような波形不定表示147が波形141の代わりに表示される。この表示はS323の波形作成処理によって作成される。
When the variable
以上のように、S321、S322、及びS323の処理によって、図28の画面例で表されているように、収集時刻と収集された変数の値とが関係付けされて表示装置85で表示される。
As described above, by the processing of S321, S322, and S323, the collection time and the collected variable values are associated and displayed on the
S342の再生制御処理により、例えば、図27の画面例におけるUI画面120に対する操作により指定された収集タイミングと、図28の画面例における太線143によって示される収集タイミングとを同一の時刻とする処理が行われる。
By the reproduction control process of S342, for example, the collection timing designated by the operation on the
以上、開示の実施形態とその利点について詳しく説明したが、当業者は、特許請求の範囲に明確に記載した本発明の範囲から逸脱することなく、様々な変更、追加、省略をすることができるであろう。 While the disclosed embodiments and their advantages have been described in detail above, those skilled in the art can make various modifications, additions, and omissions without departing from the scope of the invention, which is clearly defined in the appended claims. Will.
1 PLC
2 PC
3-1~3-M 入出力モジュール
4-1~4-M 通信モジュール
5 通信ケーブル
6-1~6-M 通信バス
7-1~7-M CPUモジュール
8 共有メモリ
9 バス
11、26 通信I/F
12、21、81 CPU
13 バスコントローラ
14、22、82 メモリ
14a プログラム使用領域
15、86 記憶装置I/F
16 バスI/F
17、27、87 内部バス
18 外部記憶装置
23、83 入力装置
24、85 表示装置
25、84 補助記憶装置
30 支援装置
31 プログラム解析部
32 表示部
33 特定部
34 出力部
40 設定ツール
41 プロジェクトデータ
42 ロギング設定データ
51 プロジェクトデータ情報
52 収集動作設定情報
53 収集対象設定情報
61 処理実行部
62 収集部
63 リングバッファ
64 保存部
70 ロギング収集データ
71 収集データ数
72 収集データサイズ
73 収集データ
74 タイムスタンプ
75 変数データ
76 変数有効フラグ
77 変数サイズ
78 変数値
80 収集データ表示装置
91 表示制御部
92 表示部
100、120 UI画面
101 プログラム選択部
102 抽出変数表示部
103 対象変数表示部
104 登録ボタン
105 解除ボタン
106 一括登録ボタン
107 一括解除ボタン
110 ユーザプログラム表示画面
111 ON/OFF表示
112 ON/OFF不定表示
113、114 変数表示
115、146 変数不定値表示
120 UI画面
121 コマ送りボタン
122 シークバー
123 時刻入力欄
130 警告ダイアログ
140 波形表示画面
141 波形
142 時刻表示
143 太線
144 時刻表示欄
145 変数値表示欄
147 波形不定表示
1 PLC
2 PCs
3-1 to 3-M Input/output module 4-1 to 4-
12, 21, 81 CPUs
13
16 Bus I/F
17, 27, 87
Claims (4)
前記プログラマブルロジックコントローラは、前記外部機器を制御する制御処理を分散して実行する、着脱可能な複数の演算処理部を備え、前記制御処理のためのユーザアプリケーションプログラムを実行し、
前記複数の演算処理部は、第1演算処理部及び第2演算処理部を含み、
前記第1演算処理部は、所定の収集タイミングで、前記ユーザアプリケーションプログラムにおいて使用されている複数の変数それぞれの値を収集して、収集データを生成するロギング処理を行う収集部を含み、
前記収集部は、前記ロギング処理において、前記複数の変数のうち、前記第2演算処理部によって使用されている所定変数の値を記憶するアクセス対象の状況に起因して、前記所定変数の値に対するアクセスに失敗した場合、前記所定変数の値の欠損を示す欠損情報を前記収集データに設定することを特徴とするプログラマブルロジックコントローラ。 A programmable logic controller that controls an external device,
The programmable logic controller includes a plurality of detachable arithmetic processing units that distribute and execute control processing for controlling the external device, and executes a user application program for the control processing,
The plurality of arithmetic processing units include a first arithmetic processing unit and a second arithmetic processing unit,
The first arithmetic processing unit includes a collection unit that collects values of each of a plurality of variables used in the user application program at a predetermined collection timing and performs a logging process for generating collection data,
In the logging process, the collection unit stores the value of a predetermined variable used by the second arithmetic processing unit among the plurality of variables due to a situation of an access target that stores the value of the predetermined variable . A programmable logic controller characterized in that, when access fails, loss information indicating a loss of a value of said predetermined variable is set in said collected data.
前記収集部は、前記インタフェースを介して、前記所定変数の値に対するアクセスを実行し、前記所定変数の値に対するアクセスが成功したか否かを判定することを特徴とする請求項1に記載のプログラマブルロジックコントローラ。 The first arithmetic processing unit further includes an interface for accessing a storage unit storing values of variables used by other arithmetic processing units other than the first arithmetic processing unit among the plurality of arithmetic processing units. including
2. The programmable variable according to claim 1, wherein the collection unit accesses the value of the predetermined variable via the interface, and determines whether or not the access to the value of the predetermined variable is successful. logic controller.
前記収集部は、前記所定変数の値に対するアクセスに失敗した場合、前記欠損情報として、前記所定変数のフラグに無効を設定することを特徴とする請求項1又は2に記載のプログラマブルロジックコントローラ。 The collected data includes a flag indicating whether each of the plurality of variables is valid or invalid,
3. The programmable logic controller according to claim 1, wherein when the access to the value of the predetermined variable fails, the collection unit sets the flag of the predetermined variable to invalid as the missing information.
所定の収集タイミングで、前記ユーザアプリケーションプログラムにおいて使用されている複数の変数それぞれの値を収集して、収集データを生成するロギング処理を、前記複数の演算処理部のうち第1演算処理部が実行し、
前記ロギング処理は、前記複数の変数のうち所定変数の値を記憶するアクセス対象の状況に起因して、前記所定変数の値に対するアクセスに失敗した場合、前記所定変数の値の欠損を示す欠損情報を前記収集データに設定する処理を含み、
前記所定変数は、前記複数の演算処理部のうち第2演算処理部によって使用されている変数であることを特徴とするロギング方法。 A programmable logic controller including a plurality of detachable arithmetic processing units that distributes and executes control processing for controlling an external device executes a user application program for the control processing,
A first arithmetic processing unit among the plurality of arithmetic processing units executes a logging process of collecting values of each of a plurality of variables used in the user application program at a predetermined collection timing and generating collected data. death,
In the logging process, when access to the value of the predetermined variable fails due to a condition of the access target that stores the value of the predetermined variable among the plurality of variables, loss information indicating the lack of the value of the predetermined variable. to the collected data,
The logging method, wherein the predetermined variable is a variable used by a second arithmetic processing unit among the plurality of arithmetic processing units.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022078537A JP7168114B1 (en) | 2022-05-12 | 2022-05-12 | Programmable logic controller, support device, display device, logging method, support method, display method |
JP2022129203A JP7226632B1 (en) | 2022-05-12 | 2022-08-15 | Support device and support method |
JP2022129204A JP7226633B1 (en) | 2022-05-12 | 2022-08-15 | Display device and display method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2022078537A JP7168114B1 (en) | 2022-05-12 | 2022-05-12 | Programmable logic controller, support device, display device, logging method, support method, display method |
Related Child Applications (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022129204A Division JP7226633B1 (en) | 2022-05-12 | 2022-08-15 | Display device and display method |
JP2022129203A Division JP7226632B1 (en) | 2022-05-12 | 2022-08-15 | Support device and support method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP7168114B1 true JP7168114B1 (en) | 2022-11-09 |
JP2023167382A JP2023167382A (en) | 2023-11-24 |
Family
ID=83977452
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2022078537A Active JP7168114B1 (en) | 2022-05-12 | 2022-05-12 | Programmable logic controller, support device, display device, logging method, support method, display method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7168114B1 (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007233593A (en) | 2006-02-28 | 2007-09-13 | Mitsubishi Electric Corp | Logging system |
JP2020191069A (en) | 2019-05-17 | 2020-11-26 | 富士電機株式会社 | Information processor and information processing method |
-
2022
- 2022-05-12 JP JP2022078537A patent/JP7168114B1/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007233593A (en) | 2006-02-28 | 2007-09-13 | Mitsubishi Electric Corp | Logging system |
JP2020191069A (en) | 2019-05-17 | 2020-11-26 | 富士電機株式会社 | Information processor and information processing method |
Also Published As
Publication number | Publication date |
---|---|
JP2023167382A (en) | 2023-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109983412A (en) | Control device, control program and control method | |
JPS6188346A (en) | Operation monitor for digital device | |
JP2000235511A (en) | Performance analysis method for application program and system/device used for performance analysis for application program | |
JP6788235B1 (en) | Information management system, information management method | |
JP2022028338A (en) | Prediction system, information processing apparatus, and information processing program | |
JP6568017B2 (en) | Test support apparatus and test support method | |
JP7168114B1 (en) | Programmable logic controller, support device, display device, logging method, support method, display method | |
JP7226633B1 (en) | Display device and display method | |
JP7226632B1 (en) | Support device and support method | |
JP2014041390A (en) | Design and development support system | |
US20180088914A1 (en) | Method for supporting program creation and apparatus for supporting program creation | |
EP3926428B1 (en) | Control device, control program, and control system | |
JP7188631B1 (en) | Programmable logic controller, support device, display device, logging method, support method, display method | |
JP7375977B1 (en) | Programmable logic controller, support device, display device, logging method, support method, and display method | |
CN111596619A (en) | Computer system and facility monitoring method | |
US20090177928A1 (en) | Apparatus, Method and Computer Program Product for Generating Trace Data | |
JP2595082B2 (en) | Operation state monitoring device for programmable controller | |
JP4282961B2 (en) | System that defines data input / output in the controller | |
JP2005275713A (en) | Maintenance information management system | |
US11971696B2 (en) | Programmable logic controller | |
WO2021065033A1 (en) | Program development device, and program for implementing program development device | |
JPH0934754A (en) | Instrument and method for measuring performance of program | |
JPH0546377A (en) | Method and device for generating control program | |
JPH08249049A (en) | Monitoring device | |
JPH03144705A (en) | Operation state monitor for programmable controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220512 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20220512 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220621 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220815 |
|
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: 20220927 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20221010 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7168114 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |