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 PDF

Info

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
Application number
JP2022078537A
Other languages
Japanese (ja)
Other versions
JP2023167382A (en
Inventor
良祐 仲野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP2022078537A priority Critical patent/JP7168114B1/en
Priority to JP2022129203A priority patent/JP7226632B1/en
Priority to JP2022129204A priority patent/JP7226633B1/en
Application granted granted Critical
Publication of JP7168114B1 publication Critical patent/JP7168114B1/en
Publication of JP2023167382A publication Critical patent/JP2023167382A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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 Patent Document 2, for example).

このプログラマブルコントローラにおいて、インタフェースユニットは、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).

特開2020-13526号公報Japanese Patent Application Laid-Open No. 2020-13526 国際公開第2014/080457号WO2014/080457 特開2012-164178号公報JP 2012-164178 A

複数の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.

PLCシステムの構成例を示す図である。It is a figure which shows the structural example of a PLC system. CPUモジュールが実行する各処理の実行期間Pの例を示す図である。4 is a diagram showing an example of an execution period P of each process executed by a CPU module; FIG. CPUモジュールのハードウェア構成例を示す図である。3 is a diagram illustrating an example hardware configuration of a CPU module; FIG. PCのハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of PC. 支援装置の機能構成例を示す図である。It is a figure which shows the functional structural example of a support apparatus. ロギング処理の実行の条件の設定を行う方法を説明する図である。FIG. 7 is a diagram illustrating a method of setting conditions for executing logging processing; UI画面の画面例である。It is a screen example of a UI screen. ロギング設定データのデータ構造の一例を示す図である。FIG. 4 is a diagram showing an example of the data structure of logging setting data; 収集対象設定情報のデータ構造の一例を示す図である。FIG. 4 is a diagram showing an example of the data structure of collection target setting information; CPUモジュールの機能構成例を示す図である。3 is a diagram illustrating an example of functional configuration of a CPU module; FIG. CPUモジュールによるロギング実行方法を説明する図である。It is a figure explaining the logging execution method by a CPU module. ロギング処理及び保存処理の処理内容の詳細を示すフローチャートである。6 is a flowchart showing details of processing contents of logging processing and saving processing; ロギング収集データのデータ構造の一例を示す図である。FIG. 4 is a diagram showing an example of the data structure of logging collection data; 収集データのデータ構造の一例を示す図である。It is a figure which shows an example of the data structure of collection data. 変数データのデータ構造の一例を示す図である。It is a figure which shows an example of the data structure of variable data. 収集処理の処理内容の詳細を示すフローチャートである。FIG. 10 is a flowchart showing details of processing contents of collection processing; FIG. 収集データ表示装置のハードウェア構成例を示す図である。It is a figure which shows the hardware structural example of a collection data display apparatus. 収集データ表示装置の機能構成例を示す図である。It is a figure which shows the functional structural example of a collection data display apparatus. 収集データを表示する方法の一例を説明する図である。It is a figure explaining an example of the method of displaying collection data. プログラム表示処理の詳細を説明する図である。It is a figure explaining the detail of a program display process. 警告画面の画面例である。It is a screen example of a warning screen. 波形表示処理の詳細を説明する図である。It is a figure explaining the detail of a waveform display process. ロギングファイル解析・変換処理の詳細を説明する図である。FIG. 10 is a diagram illustrating details of logging file analysis/conversion processing; ロギングファイル解析・変換処理の処理内容を示すフローチャートである。FIG. 10 is a flowchart showing processing contents of logging file analysis/conversion processing; FIG. 変数値生成処理の処理内容の詳細を示すフローチャートである。FIG. 10 is a flowchart showing details of processing contents of variable value generation processing; FIG. 表示制御処理の詳細を説明する図である。It is a figure explaining the detail of a display control process. 収集データの表示図面の例である。It is an example of a display drawing of collected data. 収集データの波形表示画面の例である。It is an example of a waveform display screen of acquired data.

以下、図面を参照しながら、実施形態を詳細に説明する。 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 PLC 1, a personal computer (PC) 2, input/output modules 3-1 to 3-M (M is an integer of 2 or more), and communication modules 4-1 to 4-M. including.

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 PLC 1 comprehensively controls various control devices installed in a factory or the like. The PLC 1 is a multi-CPU configuration PLC, and includes CPU modules 7-1 to 7-M and a shared memory 8. FIG. The CPU modules 7-i (i=1 to M) and the shared memory 8 are connected via a bus 9. FIG. The CPU module 7-i accesses the shared memory 8 via the bus 9. FIG. The shared memory 8 operates as a storage unit that stores variable values.

CPUモジュール7-iは、着脱可能なハードウェアモジュールであり、メンテナンス等のためにPLC1から取り外されることがある。CPUモジュール7-iは、演算処理部として動作する。 The CPU module 7-i is a removable hardware module and may be removed from the PLC 1 for maintenance or the like. The CPU module 7-i operates as an arithmetic processing unit.

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 communication cable 5. FIG. The PC 2 may be connected to another CPU module 7-i via a communication cable 5. FIG. Two or more CPU modules 7-i including the CPU module 7-1 may perform the logging process. For example, the CPU module 7-1 operates as a first arithmetic processing unit, and the other CPU module 7-i operates as a second arithmetic processing unit.

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 PC 2 is used, for example, to edit user application programs. In the following description, the user application program may also be referred to as "user program". The user program may be created using, for example, a ladder language conforming to IEC (International Electrotechnical Commission) 61131-3. The user program may be written using a graphical programming language such as a motion program in the form of a flowchart such as a Sequential Function Chart (SFC). The user program may be written using a high-level programming language such as C language.

また、後述するように、PC2は、ロギング処理の実行の条件の設定を行う機能も提供する。 In addition, as will be described later, the PC 2 also provides a function of setting conditions for execution of logging processing.

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 PLC 1 and storing it as history. The system processing is processing for managing the operation of the CPU module 7-1 itself and maintaining proper operation.

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/F 11, a CPU 12, a bus controller 13, a memory 14, a storage device I/F 15, and a bus I/F 16. All of these components are hardware, are connected to the internal bus 17, and can exchange data with each other. "I/F" is an abbreviation for interface. A CPU may also be called a processor.

通信I/F11は通信ケーブル5に接続されており、PC2との間で行われる各種のデータの授受を管理する。 The communication I/F 11 is connected to the communication cable 5 and manages various data exchanges with the PC 2 .

CPU12は、ユーザプログラム、CPUモジュール7-i自身の動作を管理するためのシステムプログラム、ロギング実行プログラム等の各種のプログラムを実行する。 The CPU 12 executes various programs such as a user program, a system program for managing the operation of the CPU module 7-i itself, and a logging execution program.

バスコントローラ13は通信バス6-iに接続されており、外部機器である入出力モジュール3-iや通信モジュール4-iとの間で行われる各種のデータの授受を管理する。 The bus controller 13 is connected to the communication bus 6-i and manages various data exchanges with the input/output module 3-i and the communication module 4-i, which are external devices.

メモリ14は、例えば半導体メモリであり、RAM(Random Access Memory)領域及びROM(Read Only Memory)領域を含む。RAM領域は、CPU12が各種のプログラムを実行する際に各種のデータを一時的に記憶しておく記憶領域として利用される。ROM領域は、各種のプログラムやデータが保存される領域であり、例えば不揮発性メモリが用いられる。 The memory 14 is, for example, a semiconductor memory, and includes a RAM (Random Access Memory) area and a ROM (Read Only Memory) area. The RAM area is used as a storage area for temporarily storing various data when the CPU 12 executes various programs. The ROM area is an area in which various programs and data are stored, and non-volatile memory is used, for example.

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 memory 8 in FIG. 1 may be omitted. The memory 14 used as a shared memory operates as a storage unit that stores the values of variables used by the CPU modules 7-i.

記憶装置I/F15は、メモリカード等の外部記憶装置18に対する各種のデータの書き込み処理や読み出し処理を管理する。 The storage device I/F 15 manages writing processing and reading processing of various data to and from an external storage device 18 such as a memory card.

バスI/F16はバス9に接続されており、共有メモリ8との間で行われる各種のデータの授受を管理する。CPU12は、バスI/F16を介して共有メモリ8にアクセスする。他のCPUモジュール7-iのメモリ14が共有メモリとして利用される場合、CPU12は、バスI/F16を介して、他のCPUモジュール7-iのメモリ14にアクセスすることもできる。バスI/F16は、変数の値を記憶する記憶部にアクセスするインタフェースとして動作する。 The bus I/F 16 is connected to the bus 9 and manages various data exchanges with the shared memory 8 . CPU 12 accesses shared memory 8 via bus I/F 16 . When the memory 14 of the other CPU module 7-i is used as a shared memory, the CPU 12 can also access the memory 14 of the other CPU module 7-i via the bus I/F16. The bus I/F 16 operates as an interface for accessing a storage section that stores variable values.

次に、PC2のハードウェア構成について、図4に示されているハードウェア構成例を参照しながら説明する。図4のPC2はCPU21、メモリ22、入力装置23、表示装置24、補助記憶装置25、及び通信I/F26を含む。これらの構成要素はいずれもハードウェアであって、内部バス27に接続されており、相互にデータの授受を行うことが可能である。 Next, the hardware configuration of the PC 2 will be described with reference to the hardware configuration example shown in FIG. The PC 2 of FIG. 4 includes a CPU 21, a memory 22, an input device 23, a display device 24, an auxiliary storage device 25, and a communication I/F26. All of these components are hardware, are connected to the internal bus 27, and can exchange data with each other.

CPU21は、例えば、メモリ22を利用して所定のプログラムを実行することにより、ユーザプログラムの編集機能や、ロギング処理の実行の条件の設定を行うための機能を提供する。 The CPU 21 provides, for example, a user program editing function and a function for setting conditions for executing logging processing by executing a predetermined program using the memory 22 .

入力装置23は、例えば、キーボードやポインティングデバイス等であり、ユーザからの指示又は情報の入力に用いられる。 The input device 23 is, for example, a keyboard, a pointing device, or the like, and is used to input instructions or information from the user.

表示装置24は、例えば、ユーザへの問い合わせ又は指示や、処理結果の表示出力に用いられる。 The display device 24 is used, for example, to make an inquiry or instruction to the user and to display and output the processing result.

補助記憶装置25は、磁気ディスク装置、光ディスク装置、光磁気ディスク装置等であり、例えば、ハードディスクドライブやフラッシュメモリであってもよい。PC2は、補助記憶装置25にプログラム及びデータを格納しておき、それらをメモリ22にロードして使用することができる。 The auxiliary storage device 25 is a magnetic disk device, an optical disk device, a magneto-optical disk device, or the like, and may be, for example, a hard disk drive or a flash memory. The PC 2 can store programs and data in the auxiliary storage device 25 and load them into the memory 22 for use.

通信I/F26は通信ケーブル5に接続されており、PLC1との間で行われる各種のデータの授受を管理する。 The communication I/F 26 is connected to the communication cable 5 and manages various data exchanges with the PLC 1 .

<ロギングの設定> <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 PLC 1 will be described.

まず図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 support device 30. As shown in FIG. This configuration example is an example in which the support device 30 provides a function of setting conditions for execution of logging processing by the PLC 1 . In the PLC system, the PC 2 provides the functions of the support device 30 by causing the PC 2 to execute a predetermined setting tool program.

図5において、支援装置30は、プログラム解析部31、表示部32、特定部33、及び出力部34を含む。 5, the support device 30 includes a program analysis unit 31, a display unit 32, an identification unit 33, and an output unit .

プログラム解析部31は、PLC1に実行させるユーザプログラムを解析して、ユーザプログラムにおいて使用されている複数の変数を抽出する。表示部32は、プログラム解析部31により抽出された変数のうち、各CPUモジュール7-iによって使用されている変数を表示する。 The program analysis unit 31 analyzes a user program to be executed by the PLC 1 and extracts multiple variables used in the user program. The display unit 32 displays the variables used by each CPU module 7-i among the variables extracted by the program analysis unit 31. FIG.

特定部33は、各CPUモジュール7-iによって使用されている変数の中から選択された変数を、収集対象の変数として特定する。出力部34は、収集対象の変数を示す情報を、設定情報として出力する。 The specifying unit 33 specifies a variable selected from variables used by each CPU module 7-i as a variable to be collected. The output unit 34 outputs information indicating the variables to be collected as setting information.

このような支援装置30によれば、ユーザは、各CPUモジュール7-iによって使用されている変数の中から、ロギング処理における収集対象の変数を選択して、設定情報を容易に生成することができる。従って、複数のCPUモジュール7-iを含むPLCにおいてロギングを行うことが可能になる。 According to the support device 30, the user can easily generate the setting information by selecting the variables to be collected in the logging process from among the variables used by each CPU module 7-i. can. Therefore, it becomes possible to perform logging in a PLC including a plurality of CPU modules 7-i.

図5のような構成を含む支援装置30によって行われる支援方法の一例である、ロギング処理の実行の条件の設定を行う方法について、図6を用いて更に詳細に説明する。 A method of setting conditions for execution of logging processing, which is an example of a support method performed by the support device 30 including the configuration shown in FIG. 5, will be described in more detail with reference to FIG.

支援装置30には設定ツール40が備えられている。PC2では、所定の設定ツールプログラムをCPU21に実行させることによって設定ツール40の機能が提供される。 The support device 30 is equipped with a setting tool 40 . The PC 2 provides the function of the setting tool 40 by causing the CPU 21 to execute a predetermined setting tool program.

設定ツール40にはプロジェクトデータ41が入力される。プロジェクトデータ41は、PLCシステムのシステム構成の情報、PLC1で実行させるユーザプログラム、及び、PLCシステムが含む外部機器である入出力モジュール3-iや通信モジュール4-i等についての機能設定情報を含む情報である。ここでは、このプロジェクトデータ41は、例えばPC2において所定のプロジェクトデータ編集プログラムを実行することによりユーザによって既に作成されていて、例えば補助記憶装置25に既に記憶されているものとする。 Project data 41 is input to the setting tool 40 . The project data 41 includes information on the system configuration of the PLC system, a user program to be executed by the PLC 1, and function setting information on the input/output module 3-i, the communication module 4-i, etc., which are external devices included in the PLC system. Information. Here, it is assumed that the project data 41 has already been created by the user by executing a predetermined project data editing program on the PC 2, for example, and is already stored in the auxiliary storage device 25, for example.

設定ツール40により、まず、このプロジェクトデータ41に対してS110の収集対象設定処理が行われる。この処理は、ユーザプログラムで使用されている変数から、ロギングの対象とする変数を設定する処理であって、図5の支援装置30におけるプログラム解析部31及び特定部33の機能を提供する処理である。 The setting tool 40 first performs the collection target setting process of S<b>110 for the project data 41 . This process is a process of setting variables to be logged from the variables used in the user program, and is a process of providing the functions of the program analysis unit 31 and the identification unit 33 in the support device 30 of FIG. be.

この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 project data 41 and extracting multiple variables used in the user program. In the collection target setting process of S110, a process of allowing the user to select a variable to be collected by the logging process performed by the PLC 1 from the variables extracted by executing the program analysis process is further performed.

ここで図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 PC 2 in FIG. 4 provides the functions of the support device 30 , the display device 24 operates as the display unit 32 and displays the UI screen 100 .

プログラム選択部101には、プロジェクトデータ41に含まれていたユーザプログラムを示す情報が表示される。なお、本実施形態では、複数のプログラムの集合体としてタスクが構成され、複数のタスクの集合体としてCPU処理が構成され、複数のCPU処理とグローバル変数の集合体としてユーザプログラムが構成されているものとする。 Information indicating the user program included in the project data 41 is displayed in the program selection portion 101 . In this embodiment, a task is configured as an aggregate of a plurality of programs, a CPU process is configured as an aggregate of a plurality of tasks, and a user program is configured as an aggregate of a plurality of CPU processes and global variables. shall be

図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. "Task 1" is the name of each task belonging to each CPU process, and "Program" and "Program N" are the names of each program belonging to each task. A "global variable" is a variable that is accessible from multiple programs and is defined by the user. This screen example shows that the relationship between the user program, each CPU process, each task, each program, and global variables is expressed in a tree format.

プログラム選択部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 registration button 104, the variable corresponding to the selected name is registered as the collection target. Identified as a variable. At this time, the names of the specified variables to be collected are listed in the target variable display section 103 .

なお、対象変数表示部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 release button 105, the name corresponding to the selected name is displayed. The variable is excluded from being collected.

また、一括登録ボタン106を押下する操作がユーザにより行われると、抽出変数表示部102に名称が表示されている変数の全てが収集対象の変数として選択され、その名称が対象変数表示部103に一覧表示される。その一方で、一括解除ボタン107を押下する操作がユーザにより行われると、対象変数表示部103に名称が表示されている変数の全てが収集対象の変数から除外される。 When the user presses the collective registration button 106, all the variables whose names are displayed in the extracted variable display section 102 are selected as variables to be collected, and the names are displayed in the target variable display section 103. A list is displayed. On the other hand, when the user presses the collective release button 107, all the variables whose names are displayed in the target variable display section 103 are excluded from the variables to be collected.

図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 PLC 1 to save the collected data in the external storage device 18 are performed on the PLC 1. will be

上述した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 output unit 34 in the support device 30 of FIG.

設定ファイル作成処理は、S110の処理により選択された収集対象の変数を特定する情報とS120の処理により設定されたロギング処理の動作設定情報とをロギング設定データ42として出力する処理である。ロギング設定データ42は、出力部34が出力する設定情報に対応する。ロギング設定データ42はPLC1に転送され、PLC1では、ロギング処理についての動作設定が、ロギング設定データ42の内容に基づいて行われる。 The setting file creation process is a process of outputting, as the logging setting data 42, the information specifying the variables to be collected selected by the process of S110 and the operation setting information of the logging process set by the process of S120. The logging setting data 42 corresponds to setting information output by the output unit 34 . The logging setting data 42 is transferred to the PLC 1 , and the PLC 1 sets the operation for logging processing based on the contents of the logging setting data 42 .

ロギング設定データ42について更に説明する。図8は、ロギング設定データ42のデータ構造の一例を示している。 The logging setting data 42 will be further explained. FIG. 8 shows an example of the data structure of the logging setting data 42. As shown in FIG.

ロギング設定データ42は、プロジェクトデータ情報51と、収集動作設定情報52と、収集対象設定情報53とを含む。 The logging setting data 42 includes project data information 51 , collection operation setting information 52 , and collection target setting information 53 .

プロジェクトデータ情報51は、PLC1に実行させるユーザプログラムを特定する情報であり、例えば、ユーザプログラムをコンパイルして得られるオブジェクトコードに付された名称(プロジェクト名)や、コンパイルの実行日時等の情報を含む。なお、プロジェクトデータ情報51は、プロジェクトデータ41の一部として含まれている。 The project data information 51 is information for specifying a user program to be executed by the PLC 1. For example, information such as the name (project name) attached to the object code obtained by compiling the user program and the execution date and time of compilation are included in the project data information 51. include. Note that the project data information 51 is included as part of the project data 41 .

収集動作設定情報52はS120の収集動作設定処理によって作成される情報である。収集動作設定情報52には、例えば、データの収集タイミングや収集を行う期間、収集したデータをPLC1が外部記憶装置18に保存させる保存タイミング、収集したデータを保存させる保存先の外部記憶装置18を特定する情報が含まれている。 The collection operation setting information 52 is information created by the collection operation setting process of S120. The collection operation setting information 52 includes, for example, the data collection timing, the collection period, the save timing when the PLC 1 saves the collected data in the external storage device 18, and the external storage device 18 where the collected data is saved. Contains identifying information.

収集対象設定情報53は、S110の収集対象設定処理によって選択された収集対象の変数についての情報である。収集対象設定情報53のデータ構造の一例が図9に示されている。 The collection target setting information 53 is information about the collection target variable selected by the collection target setting process of S110. An example of the data structure of the collection target setting information 53 is shown in FIG.

図9の例では、収集対象設定情報53には、データの収集タイミングにおける収集データの合計サイズの情報が含まれている。また、収集対象設定情報53には、収集対象の変数の個数の情報が含まれている。 In the example of FIG. 9, the collection target setting information 53 includes information on the total size of collected data at the data collection timing. The collection target setting information 53 also includes information on the number of variables to be collected.

更に、収集対象設定情報53には、収集対象の変数のそれぞれについての情報として、メモリ種別、データ型、メモリアドレス、及びデータサイズの情報が含まれている。メモリ種別は、共有メモリ8の識別情報を含んでいてもよく、CPUモジュール7-1~7-Mそれぞれに含まれるメモリ14のうち、収集対象の変数の値を記憶しているメモリ14の識別情報を含んでいてもよい。これらの情報によって、PLC1においてユーザプログラムが実行されたときに収集対象の変数の値の保持に使用される記憶領域の位置を特定することが可能になる。 Furthermore, the collection target setting information 53 includes information on memory type, data type, memory address, and data size as information on each of the variables to be collected. The memory type may include identification information of the shared memory 8, and identifies the memory 14 storing the values of the variables to be collected among the memories 14 included in each of the CPU modules 7-1 to 7-M. May contain information. These pieces of information make it possible to identify the location of the storage area used to hold the values of the variables to be collected when the user program is executed in the PLC1.

PLC1によるロギング処理の実行の条件の設定は、上述した設定ツール40を用いることによって、支援装置30によって行われる。 Setting of conditions for execution of logging processing by the PLC 1 is performed by the support device 30 by using the setting tool 40 described above.

<ロギングの実行> <Run logging>

次に、図1のPLCシステムにおいて、支援装置30としてのPC2によって設定された条件に従ってPLC1により行われるロギング処理について説明する。 Next, in the PLC system of FIG. 1, logging processing performed by the PLC 1 according to conditions set by the PC 2 as the support device 30 will be described.

まず図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 collection unit 62, a ring buffer 63, and a storage unit 64.

前述したように、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 collection unit 62 executes logging processing. In the hardware configuration example shown in FIG. 3, the CPU 12 operates as the processing execution unit 61 and the collection unit 62 .

リングバッファ63は、ロギング処理による変数の値の収集時刻を、その収集時刻に収集された変数の値に対応付けた収集データを、変数の値を収集する度に保存する記憶領域である。図3に示したハードウェア構成例では、メモリ14の記憶領域の一部によってリングバッファ63が構成される。 The ring buffer 63 is a storage area that saves collected data in which the time when the value of the variable was collected by the logging process is associated with the value of the variable collected at that collection time each time the value of the variable is collected. In the hardware configuration example shown in FIG. 3, part of the storage area of the memory 14 constitutes the ring buffer 63 .

収集部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 collection unit 62 sets missing information indicating the missing value of the predetermined variable in the collected data. For example, if there is a difference between the system configuration of the PLC system indicated by the project data 41 and the actual system configuration of the PLC system, access to the value of the predetermined variable may fail. For example, such a difference may occur when another CPU module 7-i is removed from the PLC 1 for maintenance or the like.

保存部64は、リングバッファ63に保存されている収集データを順次読み出して外部記憶装置18に保存する。図3に示したハードウェア構成例では記憶装置I/F15がCPU12による制御の下で保存部64の機能を提供する。この記憶装置I/F15に対する制御を、例えば、CPU12によって提供される収集部62がロギング処理の一部として行ってもよい。 The storage unit 64 sequentially reads the collected data stored in the ring buffer 63 and stores it in the external storage device 18 . In the hardware configuration example shown in FIG. 3 , the storage device I/F 15 provides the function of the storage unit 64 under the control of the CPU 12 . For example, the collection unit 62 provided by the CPU 12 may control the storage device I/F 15 as part of the logging process.

他の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 collection unit 62, ring buffer 63, and storage unit 64 from the CPU module 7-1 of FIG.

このようなPLC1によれば、各CPUモジュール7-iが使用している変数の値へのアクセスに成功した場合、変数の値が収集データに記録される。また、ロギング処理を行うCPUモジュール7-1以外のCPUモジュール7-iが使用している変数の値へのアクセスに失敗した場合であっても、失敗に起因する変数の値の欠損を示す欠損情報が収集データに記録される。従って、複数のCPUモジュール7-iを含むPLCにおいてロギングを行うことが可能になる。 According to such a PLC 1, when the value of the variable used by each CPU module 7-i is successfully accessed, the value of the variable is recorded in the collected data. Also, even if access to the value of the variable used by the CPU module 7-i other than the CPU module 7-1 that performs the logging process fails, the loss indicating the loss of the value of the variable caused by the failure Information is recorded in the collected data. Therefore, it becomes possible to perform logging in a PLC including a plurality of CPU modules 7-i.

図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 CPU 12 that executes this program execution process uses the storage area of the memory 14 for executing the user program. The storage area used at this time is called a program use area 14a.

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 logging setting data 42, which includes the information about the variables to be collected and the operation setting information for the logging process, is created in the support device 30 (PC2) as described above and provided to the CPU module 7-1 in advance. It is assumed that there is

CPUモジュール7-1のCPU12は、制御処理と並行して、S230の時刻管理処理とS240の収集タイミング検知処理とを行っている。時刻管理処理は現在の時刻を計時する処理である。収集タイミング検知処理は、ロギング設定データ42に含まれている収集動作設定情報52により示されているデータの収集タイミングの到来を検知する処理である。 The CPU 12 of the CPU module 7-1 performs the time management process of S230 and the collection timing detection process of S240 in parallel with the control process. The time management process is a process of counting the current time. The collection timing detection process is a process for detecting the arrival of the data collection timing indicated by the collection operation setting information 52 included in the logging setting data 42 .

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 ring buffer 63 .

また、CPUモジュール7-1のCPU12はS250の保存処理を実行する。この保存処理は、ロギング設定データ42に含まれている収集動作設定情報52により示されている保存タイミングの到来を検知する処理を含む。また、この保存処理は、記憶装置I/F15を制御して、リングバッファ63に保存されている収集データを保存タイミングの到来の検知に応じて読み出させて、収集動作設定情報52により示されている保存先である外部記憶装置18に保存させる処理を含む。 Also, the CPU 12 of the CPU module 7-1 executes the saving process of S250. This saving process includes a process of detecting the arrival of the saving timing indicated by the collection operation setting information 52 included in the logging setting data 42 . Also, in this saving process, the storage device I/F 15 is controlled to read the collected data saved in the ring buffer 63 in response to detection of arrival of the save timing, and the collected data indicated by the collection operation setting information 52 is read out. It includes a process of saving in the external storage device 18, which is the save destination.

ここで、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 ring buffer 63 as collected data 73, which will be described later. The details of this collection processing will be described later.

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 operation setting information 52 included in the logging setting data 42 has arrived. In this determination process, when it is determined that the save timing has arrived (when the determination result is YES), the process proceeds to S254. On the other hand, when it is determined in this determination process that the save timing has not arrived (when the determination result is NO), the process shown in FIG. 12 ends without performing the process of S254.

S254では、今回実行中のロギング処理におけるS252の収集処理によりリングバッファ63に保存された収集データ73を読み出し、収集動作設定情報52で示されている保存先の外部記憶装置18にロギング収集データ70として保存する処理が行われる。 In S254, the collected data 73 stored in the ring buffer 63 by the collection processing of S252 in the logging processing currently being executed is read out, and the logging collection data 70 is stored in the external storage device 18 of the save destination indicated by the collection operation setting information 52. The process to save as is performed.

ロギング収集データ70について更に説明する。図13は、ロギング収集データ70のデータ構造の一例を示している。 The logging collection data 70 will be further explained. FIG. 13 shows an example of the data structure of the logging collection data 70. As shown in FIG.

ロギング収集データ70は、プロジェクトデータ情報51と、収集データ数71と、収集データサイズ72と、1以上の収集データ73とを含む。 The logging collection data 70 includes project data information 51 , collection data count 71 , collection data size 72 , and one or more collection data 73 .

プロジェクトデータ情報51は、PLC1で実行されたユーザプログラムを特定する情報であり、例えば、ユーザプログラムをコンパイルして得られるオブジェクトコードに付された名称や、コンパイルの実行日時の情報を含む。つまり、ロギング収集データ70に含まれているプロジェクトデータ情報51は、ロギング設定データ42に含まれていたプロジェクトデータ情報51と同様のものである。CPU12は、S252の収集処理において、ロギング設定データ42からプロジェクトデータ情報51を読み出してロギング収集データ70に取り込む。 The project data information 51 is information that specifies the user program executed by the PLC 1, and includes, for example, the name given to the object code obtained by compiling the user program and the date and time of compilation. That is, the project data information 51 included in the logging collection data 70 is the same as the project data information 51 included in the logging setting data 42 . The CPU 12 reads the project data information 51 from the logging setting data 42 and incorporates it into the logging collection data 70 in the collection processing of S252.

収集データ数71は、ロギング収集データ70に含まれている収集データ73の個数を表している情報である。また、収集データサイズ72は、ロギング収集データ70に含まれている収集データ73の総データ量を表している情報である。 The collected data count 71 is information representing the number of collected data 73 included in the logging collected data 70 . Also, the collected data size 72 is information representing the total data amount of the collected data 73 included in the logging collected data 70 .

ロギング収集データ70には、収集データ73として、収集された変数の値についてのデータが、収集された順序に従って含まれている。この収集データ73のデータ構造の一例が図14に示されている。 The logging collection data 70 includes, as collection data 73, data on the values of the collected variables in the order in which they were collected. An example of the data structure of this collected data 73 is shown in FIG.

図14の例では、収集データ73にはタイムスタンプ74の情報が含まれている。このタイムスタンプ74は、変数の値の収集が行われたときの時刻を表している。 In the example of FIG. 14, the collected data 73 includes information of time stamp 74 . This time stamp 74 represents the time when the value of the variable was collected.

また、収集データ73には、タイムスタンプ74の時刻において収集された1以上の変数のそれぞれの値を表す変数データ75が含まれている。この変数データ75のデータ構造の一例が図15に示されている。 The collected data 73 also includes variable data 75 representing values of one or more variables collected at the time of the time stamp 74 . An example of the data structure of this variable data 75 is shown in FIG.

図15の例では、変数データ75には変数有効フラグ76、変数サイズ77、及び変数値78の情報が含まれている。 In the example of FIG. 15, the variable data 75 includes information on a variable validity flag 76, a variable size 77, and a variable value 78. FIG.

変数有効フラグ76は変数値78が有効又は無効のいずれであるかを示す。変数値78が有効である場合、変数有効フラグ76にONが設定され、変数値78が無効である場合、変数有効フラグ76にOFFが設定される。OFFが設定された変数有効フラグ76は、変数の値の欠損を示す欠損情報の一例である。変数有効フラグ76を設けることで、変数データ75に変数の値の欠損を記録することが可能になる。 A variable valid flag 76 indicates whether the variable value 78 is valid or invalid. When the variable value 78 is valid, the variable valid flag 76 is set to ON, and when the variable value 78 is invalid, the variable valid flag 76 is set to OFF. The variable valid flag 76 set to OFF is an example of missing information indicating a missing variable value. By providing the variable validity flag 76, it becomes possible to record the lack of the value of the variable in the variable data 75. FIG.

変数サイズ77は変数値78のデータ量を表す。変数値78は、収集された変数の値を表す。 A variable size 77 represents the data amount of the variable value 78 . Variable value 78 represents the value of the collected variable.

S254の処理では、ロギング設定データ42とリングバッファ63に保存された収集データとを用いて、このようなデータ構造を有するロギング収集データ70を作成して外部記憶装置18に保存する処理が行われる。 In the process of S254, the logging setting data 42 and the collected data saved in the ring buffer 63 are used to create the logging collected data 70 having such a data structure and save it in the external storage device 18. .

その後、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 CPU 12 also performs a process of further saving the logging setting data 42 in the external storage device 18 . This logging setting data 42 is used when collecting data 73 to be described later is displayed.

次に、図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 ring buffer 63 as the time stamp 74 of the collected data 73. .

次に、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 memory 8 or other CPU modules 7-i through the bus I/F 16 may fail due to a situation such as no access target. For example, if another CPU module 7-i is removed from the PLC 1 for maintenance or the like, access to the variable values stored in the memory 14 of that CPU module 7-i may fail.

変数の値に対するアクセスが成功したと判定されたとき(判定結果が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 valid flag 76 of that variable is set to ON in S293.

次に、S294において、変数有効フラグ76がONに設定された変数の現在の値を取得し、取得した値を、変数データ75の変数値78としてリングバッファ63に書き込む処理が行われる。 Next, in S294, a process of acquiring the current value of the variable whose valid variable flag 76 is set to ON and writing the acquired value to the ring buffer 63 as the variable value 78 of the variable data 75 is performed.

収集対象の変数の値は、共有メモリ8又はCPUモジュール7-1~7-Mそれぞれに含まれるメモリ14に記憶されている。変数の値の記憶領域は、ロギング設定データ42の収集対象設定情報53に含まれている収集対象の変数についてのメモリ種別、データ型、メモリアドレス、及びデータサイズの情報に基づいて特定される。従って、S294の処理では、特定された記憶領域に保持されているデータを読み出すことによって、収集対象の変数の値の取得が行われる。 The values of the variables to be collected are stored in the shared memory 8 or the memory 14 included in each of the CPU modules 7-1 to 7-M. The storage area for the value of the variable is specified based on the information on the memory type, data type, memory address, and data size of the variable to be collected included in the collection target setting information 53 of the logging setting data 42 . Therefore, in the process of S294, the value of the variable to be collected is acquired by reading the data held in the specified storage area.

変数の値に対するアクセスが失敗したと判定されたとき(判定結果が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 variable validity flag 76 of that variable is set to OFF in S296.

次に、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 target setting information 53 of the logging setting data 42 has been collected is performed. In this determination process, when it is determined that values have been collected for all the variables to be collected (when the determination result is YES), the current collection process ends. On the other hand, in this determination process, when it is determined that there are variables to be collected whose values have not yet been collected (when the determination result is NO), the process returns to S292 and the values have been collected. For the variables to be collected that do not exist, processing is performed to collect their values.

以上の収集処理が終了すると、収集データ73のリングバッファ63への保存が完了し、続いて図12のS253の処理が行われる。 When the collection process described above is completed, the storage of the collected data 73 in the ring buffer 63 is completed, and then the process of S253 in FIG. 12 is performed.

<ロギングによる収集データの表示> <Display of collected data by logging>

次に、図1のPLCシステムにおけるPLC1により行われたロギング処理により得られた収集データ73を表示する手法について説明する。 Next, a method of displaying collected data 73 obtained by logging processing performed by PLC 1 in the PLC system of FIG. 1 will be described.

まず、収集データ73を表示する装置のハードウェア構成について説明する。図17は収集データ表示装置80のハードウェア構成例を示している。 First, the hardware configuration of the device that displays the collected data 73 will be described. FIG. 17 shows a hardware configuration example of the collected data display device 80. As shown in FIG.

図17の構成例では、収集データ表示装置80は、CPU81、メモリ82、入力装置83、補助記憶装置84、表示装置85、及び記憶装置I/F86を含む。これらの構成要素はいずれもハードウェアであって、内部バス87に接続されており、相互にデータの授受を行うことが可能である。 In the configuration example of FIG. 17, the collected data display device 80 includes a CPU 81, a memory 82, an input device 83, an auxiliary storage device 84, a display device 85, and a storage device I/F86. All of these components are hardware, are connected to the internal bus 87, and can exchange data with each other.

CPU81は、例えば、メモリ82を利用して所定のプログラムを実行することにより、収集データの表示や収集データの波形表示、データ欠損時の不定値表示等の各種の表示を制御する機能を提供する。 The CPU 81, for example, by executing a predetermined program using the memory 82, provides a function of controlling various displays such as display of collected data, waveform display of collected data, display of indefinite values when data is missing, and the like. .

入力装置83は、例えば、キーボードやポインティングデバイス等であり、ユーザからの指示又は情報の入力に用いられる。 The input device 83 is, for example, a keyboard, a pointing device, or the like, and is used to input instructions or information from the user.

補助記憶装置84は、磁気ディスク装置、光ディスク装置、光磁気ディスク装置等であり、例えば、ハードディスクドライブやフラッシュメモリであってもよい。収集データ表示装置80は、補助記憶装置84にプログラム及びデータを格納しておき、それらをメモリ82にロードして使用することができる。 The auxiliary storage device 84 is a magnetic disk device, an optical disk device, a magneto-optical disk device, or the like, and may be, for example, a hard disk drive or a flash memory. The collected data display device 80 can store programs and data in the auxiliary storage device 84 and load them into the memory 82 for use.

表示装置85は、例えば、ユーザへの問い合わせ又は指示や、処理結果の表示出力に用いられる。 The display device 85 is used, for example, for making inquiries or instructions to the user and for displaying and outputting processing results.

記憶装置I/F86は、メモリカード等の外部記憶装置18に対する各種のデータの読み出し処理を管理する。 The storage device I/F 86 manages reading processing of various data from the external storage device 18 such as a memory card.

収集データ表示装置80は以上のハードウェア構成を有している。なお、このようなハードウェア構成は、一般的なコンピュータが有している標準的な構成であるので、このようなコンピュータを用いて収集データ表示装置80を構成するようにしてもよい。また、図1のPLCシステムにおいて支援装置30として機能させたPC2を更に用いて、収集データ表示装置80を構成するようにしてもよい。 The collected data display device 80 has the above hardware configuration. Since such a hardware configuration is a standard configuration that a general computer has, the collected data display device 80 may be configured using such a computer. Further, the collected data display device 80 may be configured by further using the PC 2 functioning as the support device 30 in the PLC system of FIG.

次に図18について説明する。図18は収集データ表示装置80の機能構成例を示した図である。 Next, FIG. 18 will be described. FIG. 18 is a diagram showing a functional configuration example of the collected data display device 80. As shown in FIG.

図18において、外部記憶装置18には、前述したロギング収集データ70がPLC1によって保存されているものとする。図13及び図14を用いて説明したように、ロギング収集データ70には、PLC1が実行したS220のロギング処理により収集された収集対象の変数の値を収集時刻に対応付けた収集データ73が収集時刻順に並べられている。 In FIG. 18, it is assumed that the logging collection data 70 described above is stored in the external storage device 18 by the PLC 1 . As described with reference to FIGS. 13 and 14, the logging collection data 70 includes collection data 73 in which the values of the variables to be collected collected by the logging process of S220 executed by the PLC 1 are associated with the collection time. They are arranged in chronological order.

図18の構成例では、収集データ表示装置80は、表示制御部91及び表示部92を含む。図17のCPU81は表示制御部91として動作し、表示装置85は表示部92として動作する。 In the configuration example of FIG. 18 , the collected data display device 80 includes a display control section 91 and a display section 92 . The CPU 81 in FIG. 17 operates as the display control section 91 and the display device 85 operates as the display section 92 .

表示制御部91は、収集データ73に含まれる各変数データ75について、変数の値又は変数の値の欠損を示す欠損情報のいずれが含まれているかをチェックする。 The display control unit 91 checks whether each variable data 75 included in the collected data 73 includes a variable value or missing information indicating a missing variable value.

表示部92は、変数の値が収集データ73に含まれている変数について、変数の値を表示し、欠損情報が収集データ73に含まれている変数について、変数の値の欠損を示す欠損表示情報を表示する。表示部92は、欠損表示情報として、例えば、変数の値が不定値であることを示す不定値情報を表示してもよい。 The display unit 92 displays the values of the variables whose values are included in the collected data 73, and the missing display indicating the missing values of the variables whose missing information is included in the collected data 73. Display information. The display unit 92 may display, for example, indefinite value information indicating that the value of the variable is an indefinite value as the missing display information.

このような収集データ表示装置80によれば、CPUモジュール7-1~7-Mから収集された収集データ73に含まれている変数の値が表示されると共に、変数の値が含まれていない場合には、変数の値の欠損を示す欠損表示情報が表示される。従って、複数のCPUモジュール7-iを含むPLCにおいてロギングを行うことが可能になる。 According to the collected data display device 80, the values of the variables included in the collected data 73 collected from the CPU modules 7-1 to 7-M are displayed, and the values of the variables are not included. missing display information indicating the missing value of the variable is displayed. Therefore, it becomes possible to perform logging in a PLC including a plurality of CPU modules 7-i.

図18のような構成を含む収集データ表示装置80によって行われる、収集データを表示する方法の一例について、図19を用いて更に詳細に説明する。 An example of a method of displaying collected data performed by the collected data display device 80 including the configuration shown in FIG. 18 will be described in more detail with reference to FIG.

収集データ表示装置80は、S310のプログラム表示処理、S320の波形表示処理、S330のロギングファイル解析・変換処理、及びS340の表示制御処理を行う。これらの各処理は、表示制御部91によって行われる。これらの各処理をCPU81に行わせるプログラムはエンジニアリングソフトウェアと称されることもある。 The collected data display device 80 performs program display processing in S310, waveform display processing in S320, logging file analysis/conversion processing in S330, and display control processing in S340. Each of these processes is performed by the display control unit 91 . A program that causes the CPU 81 to perform each of these processes is sometimes called engineering software.

S310のプログラム表示処理は、前述したプロジェクトデータ41に含まれるユーザプログラムを表示すると共に、ロギング収集データ70から作成された表示用データを用いて、ユーザプログラムについての収集対象の変数の値を表示する処理である。表示用データは、収集時刻及び変数値を含む。なお、ここでは、プロジェクトデータ41は、例えばPC2において所定のプロジェクトデータ編集プログラムを実行することによりユーザによって既に作成されていて、例えば補助記憶装置84に既に記憶されているものとする。 The program display process of S310 displays the user program included in the project data 41 described above, and displays the values of the variables to be collected for the user program using the display data created from the logging collection data 70. processing. Display data includes collection times and variable values. It is assumed here that the project data 41 has already been created by the user by executing a predetermined project data editing program on the PC 2, for example, and is already stored in the auxiliary storage device 84, for example.

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 logging collection data 70 in the form of a waveform.

S330のロギングファイル解析・変換処理は、ロギング設定データ42とロギング収集データ70を解析して、収集データ73を、S310のプログラム表示処理とS320の波形表示処理とのそれぞれに入力される表示用データに変換する処理である。なお、ここでは、ロギング設定データ42及びロギング収集データ70は外部記憶装置18により提供されるものとする。ロギングファイル解析・変換処理では、これらのデータが外部記憶装置18から読み出されて使用される。 The logging file analysis/conversion process of S330 analyzes the logging setting data 42 and the logging collection data 70, converts the collected data 73 into display data input to the program display process of S310 and the waveform display process of S320. This is the process of converting to Here, it is assumed that the logging setting data 42 and the logging collection data 70 are provided by the external storage device 18 . These data are read from the external storage device 18 and used in the logging file analysis/conversion process.

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 data display device 80 will be further described below.

まず、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 input device 83 by the user of the collected data display device 80. FIG.

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 project data 41, and displays the values of the variables to be collected on the display of the user program under the control of the variable value display control processing of S312. processing.

S314の照合処理は、プロジェクトデータ41、ロギング設定データ42、及びロギング収集データ70のプロジェクトデータ情報51の照合を行う処理である。 The collation process of S314 is a process of collating the project data information 51 of the project data 41, the logging setting data 42, and the logging collection data 70. FIG.

S315の警告処理は、S314の照合処理によって、各データのプロジェクトデータ情報51が一致しない場合に所定の警告を行う処理である。 The warning process of S315 is a process of giving a predetermined warning when the project data information 51 of each data does not match by the matching process of S314.

図21は、表示装置85に表示される警告画面の画面例を表している。S315の警告処理による所定の警告は、例えばこのような警告画面を表示装置85に表示することによって行われる。この画面例には、プロジェクトデータ情報51が一致しないことをユーザに警告する警告ダイアログ130が含まれている。なお、例えばユーザプログラムのデバッグを行う場合等には有益であるので、収集データ表示装置80では、プロジェクトデータ情報51が不一致であっても変数の値の表示の機能は利用可能としている。 FIG. 21 shows an example of a warning screen displayed on the display device 85. As shown in FIG. The predetermined warning by the warning process of S315 is performed by displaying such a warning screen on the display device 85, for example. This screen example includes a warning dialog 130 that warns the user that the project data information 51 does not match. It should be noted that the function of displaying the values of variables can be used in the collected data display device 80 even if the project data information 51 is inconsistent, since it is useful when debugging a user program, for example.

次に、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 input device 83 by the user of the collected data display device 80. FIG.

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 logging setting data 42 from the external storage device 18 .

S332のロギング収集データ取得処理は、ロギング収集データ70を外部記憶装置18から読み出して取り込む処理である。 The logging collection data acquisition process of S332 is a process of reading out the logging collection data 70 from the external storage device 18 and fetching it.

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 logging collection data 70 read from the external storage device 18 . More specifically, this variable data loss determination process refers to the variable data 75 included in the logging collection data 70 acquired by the logging collection data acquisition process of S332, thereby causing a loss of variable values. This is the process of determining whether or not there is.

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 logging setting data 42 and the logging collection data 70 . If the variable data loss determination process of S333 determines that there is a loss, indefinite value information indicating that the value of the variable is an indefinite value is created instead of the missing variable value.

次に図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 logging setting data 42 and the logging collection data 70 from the external storage device 18 and importing them is performed. This process corresponds to the logging setting data acquisition process of S331 and the logging collection data acquisition process of S332 in FIG.

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 data 73 included in the logging collection data 70 . The process of S402 is a process corresponding to the display data creation process of S334 in FIG.

S403では、S402の処理による収集データ73の取り出しの回数を計数するカウンタをインクリメントする(1増加させる)処理が行われる。 In S403, a process of incrementing (by 1) a counter that counts the number of times the collected data 73 is retrieved by the process of S402 is performed.

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 data 70 . In this determination process, when it is determined that the value of the counter has reached the value indicated by the number of collected data 71 (when the determination result is YES), this logging file analysis/conversion process is terminated. On the other hand, when it is determined in this determination process that the value of the counter has not yet reached the value indicated by the number of collected data 71 (when the determination result is NO), the process returns to S402. At this time, the remaining collected data 73 that has not yet been extracted from the logging collected data 70 is processed after S402.

以上の処理が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 valid flag 76 of the variable data 75 included in the collected data 73 is ON. In this determination process, when it is determined that the variable valid flag 76 is ON (when the determination result is YES), the variable value 78 is used as it is as the variable value of the display data. On the other hand, when it is determined that the variable validity flag 76 is OFF in this determination process (when the determination result is NO), in S412, the undefined value information of the data amount indicated by the variable size 77 is set to the variable of the display data. Processing to create as a value is performed. As the collection time of the display data, the collection time associated with the collected data 73 including the variable data 75 is used.

S413では、S411において判定された変数データ75の個数を計数するカウンタをインクリメントする(1増加させる)処理が行われる。 In S413, a process of incrementing (by 1) a counter that counts the number of variable data 75 determined in S411 is performed.

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 variable data 75 included in the collected data 73 is performed. In this determination process, when it is determined that the value of the counter has reached the number of variable data 75 (when the determination result is YES), this logging file analysis/conversion process is terminated. On the other hand, when it is determined in this determination process that the counter value has not yet reached the number of variable data 75 (when the determination result is NO), the process returns to S411. At this time, the processing after S411 is performed for the remaining variable data 75 that has not yet been determined.

次に、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 display device 85 by the program display process and the waveform display process will be described.

まず図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 display device 85 by the CPU 81 executing the program display process of S310.

図27の画面例は、S313のユーザプログラム表示処理により得られるユーザプログラム表示画面110に重ねて、S311の操作UI処理により得られるUI画面120が表示されている状態を表している。 The screen example of FIG. 27 shows a state in which the UI screen 120 obtained by the operation UI process of S311 is displayed over the user program display screen 110 obtained by the user program display process of S313.

S313のユーザプログラム表示処理によって、プロジェクトデータ41に含まれているユーザプログラムの内容を表す図(例えばラダープログラム)が作成され、ユーザプログラム表示画面110として表示される。 A diagram (for example, a ladder program) representing the contents of the user program included in the project data 41 is created by the user program display processing of S313 and displayed as the user program display screen 110 .

UI画面120は、収集タイミング毎に収集されている変数の値についての表示を順次更新させる指示を与えるコマ送りボタン121やシークバー122、表示させる変数の値の収集タイミングの時刻を直接入力する時刻入力欄123等を有している。なお、時刻入力欄123は、コマ送りボタン121やシークバー122への操作によって指定される収集タイミングの時刻を表示する表示欄としての機能も有している。 The UI screen 120 has a frame advance button 121 and a seek bar 122 that give instructions to sequentially update the display of the values of the variables collected at each collection timing, and a time input that directly inputs the time of the collection timing of the values of the variables to be displayed. It has a column 123 and the like. The time input field 123 also has a function as a display field for displaying the time of collection timing designated by operating the frame advance button 121 or the seek bar 122 .

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 frame advance button 121 or the seek bar 122 is acquired, and the time of this timing is displayed in the time input field 123 . Further, when a time input operation is performed in the time input field 123, the input time is acquired as the designated collection timing by this operation UI processing.

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 logging collection data 70 and the specification of the collection timing obtained by the operation UI processing of S311 are acquired. Further, by this variable value display control processing, the value of the variable at the specified collection timing is sent to the user program display processing of S313, and by the user program display processing, the display of the variable value is displayed on the user program display screen 110. done.

図27の画面例において、ON/OFF表示111、ON/OFF不定表示112、変数表示113、変数表示114、及び変数不定値表示115は、収集対象の変数の値を表示するものである。 In the screen example of FIG. 27, an ON/OFF display 111, an ON/OFF undefined display 112, a variable display 113, a variable display 114, and an undefined variable value display 115 display values of variables to be collected.

ON/OFF表示111は、ONとOFFとのどちらかの状態を有するプログラム構成要素の状態が収集対象の変数として選択されている場合に、変数値で示される状態に応じた異なる色彩で要素を塗りつぶした表示を行って変数値を表すものである。図27の画面例では、ON/OFF表示111として、ユーザプログラム中の要素が黒塗りで表示されているが、実際には、例えば、「ON」の場合には赤塗りで、また、「OFF」の場合には青塗りで要素が表示される。 The ON/OFF display 111 displays elements in different colors according to the state indicated by the variable value when the state of a program component having either ON or OFF state is selected as a variable to be collected. A variable value is represented by solid display. In the screen example of FIG. 27, elements in the user program are displayed in black as the ON/OFF display 111, but in reality, for example, "ON" is displayed in red, and "OFF" is displayed in red. , the element is displayed in blue.

塗りつぶしが施されていないON/OFF不定表示112は、ONとOFFとのどちらかの状態を有するプログラム構成要素の状態が収集対象の変数として選択されており、且つ、その変数値が欠損している場合の表示である。ON/OFF不定表示112は、不定値情報の一例である。 The unfilled ON/OFF indefinite display 112 indicates that the state of a program component having either ON or OFF state is selected as a variable to be collected, and the variable value is missing. This is the display when there is The ON/OFF indefinite display 112 is an example of indefinite value information.

変数表示113及び変数表示114は、プログラム構成要素に関する数値が収集対象の変数として選択されている場合に、その数値を変数値として直接表示するものである。 The variable display 113 and the variable display 114 directly display the numerical value as the variable value when the numerical value related to the program component is selected as the variable to be collected.

変数不定値表示115は、プログラム構成要素に関する数値の表示として「???」なる表示を含む。この変数不定値表示115は、プログラム構成要素に関する数値が収集対象の変数として選択されており、且つ、その変数の値が欠損している場合の表示である。変数不定値表示115は、不定値情報の一例である。 The variable undefined value display 115 includes a display of "???" as a display of numerical values relating to program components. This variable indefinite value display 115 is displayed when a numerical value related to a program component is selected as a variable to be collected and the value of that variable is missing. The variable undefined value display 115 is an example of undefined value information.

変数データ75の変数有効フラグ76がOFFである場合には、ON/OFF不定表示112や変数不定値表示115がユーザプログラム表示画面110で表示される。この表示はS313のユーザプログラム表示処理によって行われる。 When the variable validity flag 76 of the variable data 75 is OFF, the ON/OFF indefinite display 112 and the variable indefinite value display 115 are displayed on the user program display screen 110 . This display is performed by the user program display processing of S313.

以上のように、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 display device 85, as shown in the screen example of FIG. .

次に図28について説明する。図28は、収集データの波形表示画面140の例である。この波形表示画面140は、CPU81がS320の波形表示処理を実行することによって表示装置85に表示される。 Next, FIG. 28 will be described. FIG. 28 is an example of a waveform display screen 140 of acquired data. This waveform display screen 140 is displayed on the display device 85 by the CPU 81 executing the waveform display processing of S320.

波形表示画面140に含まれている波形141は、S323の波形作成処理によって作成されたものである。なお、図28の画面例では、「変数1」、「変数2」、及び「変数3」のそれぞれについての波形141が、それぞれ実線、破線、及び一点鎖線を用いて表示されている。また、波形表示画面140に含まれている時刻表示142は、波形141により変数値との関係が表されている収集タイミングを表しており、S323の波形作成処理によって波形表示画面140に表示される。 A waveform 141 included in the waveform display screen 140 is created by the waveform creating process of S323. In the screen example of FIG. 28, the waveforms 141 for each of "variable 1," "variable 2," and "variable 3" are displayed using solid lines, broken lines, and dashed-dotted lines, respectively. A time display 142 included in the waveform display screen 140 represents collection timings in which the relationship with the variable value is represented by the waveform 141, and is displayed on the waveform display screen 140 by the waveform generation processing in S323. .

また、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 waveform 141 for the collection timing range after movement is displayed on the waveform display screen 140 by the waveform creation processing of S323. Also, the time of the acquisition timing indicated by the thick line 143 displayed on the waveform display screen 140 is displayed in the time display field 144 by the waveform generation process of S323.

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 time display field 144 is acquired by the variable value display control processing of S322. Furthermore, by this variable value display control processing, the variable value at the acquired collection timing is displayed in the variable value display column 145 as the variable value represented by the position of the intersection of the waveform 141 and the thick line 143 .

変数値表示欄145における変数不定値表示146は、図27の変数不定値表示115と同様に、変数の値が欠損している場合の表示である。変数3の波形141の一部を覆い隠している波形不定表示147は、変数不定値表示146と同様に、変数の値が欠損している場合の表示である。 An indefinite variable value display 146 in the variable value display column 145 is a display when the value of the variable is missing, like the indefinite variable value display 115 in FIG. A waveform indeterminate display 147 covering a part of the waveform 141 of the variable 3 is a display when the value of the variable is missing, like the variable indeterminate value display 146 .

変数有効フラグ76がOFFである場合には、波形表示画面140における収集タイミングに対応する位置に、このような波形不定表示147が波形141の代わりに表示される。この表示はS323の波形作成処理によって作成される。 When the variable valid flag 76 is OFF, such an undefined waveform display 147 is displayed instead of the waveform 141 at a position corresponding to the acquisition timing on the waveform display screen 140 . This display is created by the waveform creating process of S323.

以上のように、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 display device 85 as shown in the screen example of FIG. .

S342の再生制御処理により、例えば、図27の画面例におけるUI画面120に対する操作により指定された収集タイミングと、図28の画面例における太線143によって示される収集タイミングとを同一の時刻とする処理が行われる。 By the reproduction control process of S342, for example, the collection timing designated by the operation on the UI screen 120 in the screen example of FIG. 27 and the collection timing indicated by the thick line 143 in the screen example of FIG. done.

以上、開示の実施形態とその利点について詳しく説明したが、当業者は、特許請求の範囲に明確に記載した本発明の範囲から逸脱することなく、様々な変更、追加、省略をすることができるであろう。 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-M Communication module 5 Communication cable 6-1 to 6-M Communication bus 7-1 to 7-M CPU module 8 Shared memory 9 Bus 11, 26 Communication I /F
12, 21, 81 CPUs
13 Bus controller 14, 22, 82 Memory 14a Program use area 15, 86 Storage device I/F
16 Bus I/F
17, 27, 87 internal bus 18 external storage device 23, 83 input device 24, 85 display device 25, 84 auxiliary storage device 30 support device 31 program analysis unit 32 display unit 33 identification unit 34 output unit 40 setting tool 41 project data 42 Logging setting data 51 Project data information 52 Collection operation setting information 53 Collection target setting information 61 Processing execution part 62 Collection part 63 Ring buffer 64 Storage part 70 Logging collection data 71 Number of collected data 72 Collected data size 73 Collected data 74 Timestamp 75 Variable Data 76 Variable valid flag 77 Variable size 78 Variable value 80 Collected data display device 91 Display control unit 92 Display unit 100, 120 UI screen 101 Program selection unit 102 Extraction variable display unit 103 Target variable display unit 104 Register button 105 Cancel button 106 Collective Registration button 107 Batch cancellation button 110 User program display screen 111 ON/OFF display 112 ON/OFF undefined display 113, 114 Variable display 115, 146 Variable undefined value display 120 UI screen 121 Frame advance button 122 Seek bar 123 Time input field 130 Warning dialog 140 Waveform display screen 141 Waveform 142 Time display 143 Thick line 144 Time display field 145 Variable value display field 147 Waveform indefinite display

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演算処理部は、前記複数の演算処理部のうち、前記第1演算処理部以外の他の演算処理部によって使用されている、変数の値を記憶する記憶部にアクセスするインタフェースを更に含み、
前記収集部は、前記インタフェースを介して、前記所定変数の値に対するアクセスを実行し、前記所定変数の値に対するアクセスが成功したか否かを判定することを特徴とする請求項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.
JP2022078537A 2022-05-12 2022-05-12 Programmable logic controller, support device, display device, logging method, support method, display method Active JP7168114B1 (en)

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)

* Cited by examiner, † Cited by third party
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

Patent Citations (2)

* Cited by examiner, † Cited by third party
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