JP2019016325A - Programmable logic controller and data collection device - Google Patents

Programmable logic controller and data collection device Download PDF

Info

Publication number
JP2019016325A
JP2019016325A JP2017135375A JP2017135375A JP2019016325A JP 2019016325 A JP2019016325 A JP 2019016325A JP 2017135375 A JP2017135375 A JP 2017135375A JP 2017135375 A JP2017135375 A JP 2017135375A JP 2019016325 A JP2019016325 A JP 2019016325A
Authority
JP
Japan
Prior art keywords
unit
data
time
logic controller
program
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2017135375A
Other languages
Japanese (ja)
Other versions
JP6996886B2 (en
Inventor
祐介 曽根田
Yusuke Soneta
祐介 曽根田
和晃 杉村
Kazuaki Sugimura
和晃 杉村
友樹登 南
Yukito Minami
友樹登 南
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.)
Keyence Corp
Original Assignee
Keyence Corp
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 Keyence Corp filed Critical Keyence Corp
Priority to JP2017135375A priority Critical patent/JP6996886B2/en
Publication of JP2019016325A publication Critical patent/JP2019016325A/en
Application granted granted Critical
Publication of JP6996886B2 publication Critical patent/JP6996886B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Abstract

To make it easy for a user to extract individual data from time series data.SOLUTION: A collection unit 81 repeatedly collects device data stored in at last one device to form time series data. A determination unit 82 determines an extraction period to extract individual data for every period from the time series data. An extraction unit 84 extracts individual data in the extraction periods from the time series data. A providing unit 85 provides, to the pieces of individual data extracted by the extraction unit 84, identification information to identify the pieces of individual data.SELECTED DRAWING: Figure 12

Description

本発明は、プログラマブル・ロジック・コントローラおよびデータ収集装置に関する。   The present invention relates to a programmable logic controller and a data collection device.

プログラマブル・ロジック・コントローラ(以下、PLCと称す)は、FA(Factory Automation)制御システムにおいて広く使用されているシーケンス制御装置であり、ラダープログラムなどのユーザプログラムにしたがって動作する。操作者(オペレータ)は、リミットスイッチ、センサ、温度計などの入力機器や、電磁開閉器、ソレノイド、モータ、アクチュエータ、シリンダ、リレー、位置決めシステムなどの出力機器をPLCに接続し、ラダープログラムによってこれらの被制御機器を制御する。オペレータは、パーソナルコンピュータ(以下、PCと称す)などのプログラム作成支援装置上でラダープログラムを作成し、PCとPLCを接続し、ラダープログラムをPLCの記憶部に記憶させる。PLCの記憶部にはデバイス情報等の各種データも記憶される。デバイス情報とは、入力機器からの入力状態、出力機器への出力状態およびラダープログラム上で設定される内部リレー(補助リレー)、タイマー、カウンタ、データメモリ等の状態を示す情報である。デバイスとは、デバイス情報を格納するために設けられたメモリ上の領域を指す名称である。PLCにプログラム作成支援装置を接続することで、PLCが保持しているデバイス情報(デバイスの値)をプログラム作成支援装置に表示させ、視認することもできる。PLCは一般に基本ユニット(CPUユニット)と拡張ユニットにより構成される。CPUユニットと拡張ユニットは予め割り付けられたデバイスを通じてスキャン周期ごとに実行されるリフレッシュによってデバイス値を相互に交換する。   A programmable logic controller (hereinafter referred to as “PLC”) is a sequence control device widely used in FA (Factory Automation) control systems, and operates according to a user program such as a ladder program. The operator (operator) connects input devices such as limit switches, sensors, and thermometers, and output devices such as electromagnetic switches, solenoids, motors, actuators, cylinders, relays, and positioning systems to the PLC. Control the controlled device. An operator creates a ladder program on a program creation support device such as a personal computer (hereinafter referred to as a PC), connects the PC and the PLC, and stores the ladder program in the storage unit of the PLC. Various data such as device information is also stored in the storage unit of the PLC. The device information is information indicating an input state from the input device, an output state to the output device, and states of an internal relay (auxiliary relay), a timer, a counter, a data memory, and the like set on the ladder program. A device is a name indicating an area on a memory provided for storing device information. By connecting the program creation support apparatus to the PLC, the device information (device value) held by the PLC can be displayed on the program creation support apparatus for visual recognition. The PLC is generally composed of a basic unit (CPU unit) and an extension unit. The CPU unit and the expansion unit exchange device values with each other by a refresh executed every scan cycle through a device assigned in advance.

ところで、ワーク(部品)の生産工程において安定してワークを生産するためには、生産工程の予知保全が必要となる。これは生産工程において使用される製造機械にはメンテナンスが必要な部分が存在するからである。特許文献1によれば、産業機械が所定のテンプレートにしたがってデータをクラウドに転送することで、クラウドがデータを分析することが提案されている。   By the way, in order to stably produce a workpiece in a workpiece (part) production process, predictive maintenance of the production process is required. This is because a manufacturing machine used in the production process has a portion requiring maintenance. According to Patent Literature 1, it is proposed that an industrial machine transfers data to the cloud according to a predetermined template so that the cloud analyzes the data.

米国特許第9128472号明細書U.S. Pat. No. 9,128,472

特許文献1によれば、予め用意されたテンプレートが必要となる。つまり、ユーザのニーズに応じたテンプレートがなければ、ユーザは自らテンプレートを作成しなければならず、面倒であった。また、上述した予知保全においては時系列データの中から個々の部品に対応した個別データの検討が必要となる。しかし、デバイス値の時系列データは膨大な量となるため、その中からユーザが必要な個別データを抽出することは困難であった。   According to Patent Document 1, a template prepared in advance is required. That is, if there is no template that meets the user's needs, the user has to create the template himself, which is troublesome. Further, in the predictive maintenance described above, it is necessary to examine individual data corresponding to individual parts from time-series data. However, since the time-series data of device values is enormous, it is difficult for the user to extract necessary individual data.

そこで、本発明は、時系列データから個別データを抽出することをユーザにとって容易にすることを目的とする。   Therefore, an object of the present invention is to make it easy for a user to extract individual data from time-series data.

本発明は、たとえば、
ユーザプログラムを繰り返し実行するプログラマブル・ロジック・コントローラであって、
前記ユーザプログラムを記憶するプログラム記憶部と、
前記ユーザプログラムにより指定可能であり、1ビットの情報を記憶するビットデバイスおよび1ワード又は数ワードの情報を記憶するワードデバイスを含む複数のデバイスを保持するデバイス記憶部と、
前記プログラム記憶部に記憶されているユーザプログラムを繰り返し実行し、当該ユーザプログラムにしたがって前記複数のデバイスに記憶されている情報を演算処理するプログラム実行部と、
少なくとも一つのデバイスに記憶されているデバイスデータを繰り返し収集することで、周期性を有する時系列デバイスデータを形成するデータ収集部と、
前記時系列デバイスデータから周期ごとの個別データを抽出するための抽出期間を決定する決定部と、
前記決定部により決定された各抽出期間における個別データを前記時系列デバイスデータから抽出する抽出部と、
前記抽出部により抽出された各個別データに対して各個別データを識別するための識別情報を付与する付与部と
を有するプログラマブル・ロジック・コントローラを提供する。
The present invention is, for example,
A programmable logic controller that repeatedly executes a user program,
A program storage unit for storing the user program;
A device storage unit that can be specified by the user program and holds a plurality of devices including a bit device that stores 1-bit information and a word device that stores information of one word or several words;
A program execution unit that repeatedly executes a user program stored in the program storage unit and performs arithmetic processing on information stored in the plurality of devices according to the user program;
A data collection unit that forms time-series device data having periodicity by repeatedly collecting device data stored in at least one device;
A determination unit for determining an extraction period for extracting individual data for each period from the time-series device data;
An extraction unit for extracting individual data in each extraction period determined by the determination unit from the time-series device data;
Provided is a programmable logic controller having a granting unit for giving identification information for identifying each individual data to each individual data extracted by the extraction unit.

本発明によれば、時系列データから個別データを抽出することがユーザにとって容易になる。   According to the present invention, it is easy for a user to extract individual data from time-series data.

PLCシステムを示す図Diagram showing PLC system ラダープログラムを説明する図Diagram explaining the ladder program プログラム作成支援装置を説明する図The figure explaining the program creation support device PLCを説明する図Diagram explaining PLC ラダープログラムのスキャンを説明する図Diagram explaining ladder program scan IPCを説明する図Illustration explaining IPC クラウドを説明する図Illustration explaining the cloud 時系列データと抽出期間を説明する図Diagram explaining time series data and extraction period 抽出期間の決定方法を説明する図Diagram explaining how to determine the extraction period 抽出期間の基準時の決定方法を説明する図Diagram explaining how to determine the extraction period reference time 抽出期間の決定方法を説明する図Diagram explaining how to determine the extraction period データ収集と抽出に関連する機能を説明する図Diagram explaining functions related to data collection and extraction データ収集と抽出に関連する機能を説明する図Diagram explaining functions related to data collection and extraction データ収集と抽出に関連する機能を説明する図Diagram explaining functions related to data collection and extraction 収集処理を説明するフローチャートFlow chart explaining the collection process 時系列データを説明する図Diagram explaining time series data 抽出処理を説明するフローチャートFlow chart explaining the extraction process 個別データを説明する図Diagram explaining individual data 個別データを表示するUIを説明する図The figure explaining UI which displays individual data 個別データを表示するUIを説明する図The figure explaining UI which displays individual data 個別データを表示するUIを説明する図The figure explaining UI which displays individual data 個別データの送受信に関するシーケンス図Sequence diagram for sending and receiving individual data 個別データの送受信に関するシーケンス図Sequence diagram for sending and receiving individual data 個別データの送受信に関するシーケンス図Sequence diagram for sending and receiving individual data 個別データの送受信に関するシーケンス図Sequence diagram for sending and receiving individual data 個別データの表示例を示す図Figure showing a display example of individual data

<システム構成>
はじめにプログラマブル・ロジック・コントローラ(PLC、単にプログラマブルコントローラと呼ばれてもよい)を当業者にとってよりよく理解できるようにするために、一般的なPLCの構成とその動作について説明する。
<System configuration>
First, in order to allow a person skilled in the art to better understand a programmable logic controller (PLC, which may be simply referred to as a programmable controller), the configuration and operation of a general PLC will be described.

図1は、本発明の実施の形態によるプログラマブル・ロジック・コントローラシステムの一構成例を示す概念図である。図1が示すように、このシステムは、ラダープログラムなどのユーザプログラムの編集を行うためのプログラム作成支援装置2と、工場等に設置される各種制御装置を統括的に制御するためのPLC(プログラマブル・ロジック・コントローラ)1とを備えている。ユーザプログラムは、ラダー言語やSFC(シーケンシャルファンクションチャート)などのフローチャート形式のモーションプログラムなどのグラフィカルプログラミング言語を用いて作成されてもよいし、C言語などの高級プログラミング言語を用いて作成されてもよい。以下では、説明の便宜上、ユーザプログラムはラダープログラムとする。PLC1は、CPUが内蔵された基本ユニット3と、1つないし複数の拡張ユニット4を備えている。基本ユニット3に対して1つないし複数の拡張ユニット4が着脱可能となっている。基本ユニット3はCPUユニットと呼ばれることもある。   FIG. 1 is a conceptual diagram showing a configuration example of a programmable logic controller system according to an embodiment of the present invention. As shown in FIG. 1, this system includes a program creation support device 2 for editing a user program such as a ladder program, and a PLC (programmable) for comprehensively controlling various control devices installed in a factory or the like. A logic controller 1 is provided. The user program may be created using a graphical programming language such as a ladder language or a flowchart-type motion program such as SFC (sequential function chart), or may be created using a high-level programming language such as C language. . In the following, for convenience of explanation, the user program is a ladder program. The PLC 1 includes a basic unit 3 having a built-in CPU and one or more expansion units 4. One or a plurality of expansion units 4 can be attached to and detached from the basic unit 3. The basic unit 3 may be called a CPU unit.

基本ユニット3には、表示部5および操作部6が備えられている。表示部5は、基本ユニット3に取り付けられている各拡張ユニット4の動作状況などを表示することができる。操作部6の操作内容に応じて表示部5は表示内容を切り替える。表示部5は、通常、PLC1内のデバイスの現在値(デバイス値)やPLC1内で生じたエラー情報などを表示する。デバイスとは、デバイス値(デバイスデータ)を格納するために設けられたメモリ上の領域を指す名称であり、デバイスメモリと呼ばれてもよい。デバイス値とは、入力機器からの入力状態、出力機器への出力状態およびユーザプログラム上で設定される内部リレー(補助リレー)、タイマー、カウンタ、データメモリ等の状態を示す情報である。デバイス値の型にはビット型とワード型がある。ビットデバイスは1ビットのデバイス値を記憶する。ワードデバイスは1ワードのデバイス値を記憶する。   The basic unit 3 includes a display unit 5 and an operation unit 6. The display unit 5 can display the operation status of each expansion unit 4 attached to the basic unit 3. The display unit 5 switches the display content according to the operation content of the operation unit 6. The display unit 5 normally displays a current value (device value) of a device in the PLC 1 and error information generated in the PLC 1. The device is a name indicating an area on a memory provided for storing a device value (device data), and may be called a device memory. The device value is information indicating the input state from the input device, the output state to the output device, and the state of the internal relay (auxiliary relay), timer, counter, data memory, etc. set on the user program. There are two types of device values: bit type and word type. The bit device stores a 1-bit device value. The word device stores a device value of one word.

拡張ユニット4は、PLC1の機能を拡張するために用意されている。各拡張ユニット4には、その拡張ユニット4の機能に対応するフィールドデバイス(被制御装置)10が接続され、これにより、各フィールドデバイス16が拡張ユニット4を介して基本ユニット3に接続される。フィールドデバイス10には、センサなどの入力機器や、アクチュエータなどの出力機器が含まれる。なお、複数のフィールドデバイス10を識別する必要があるときには、10a、10bのように参照符号の末尾にa、b、c・・・の文字が付与される。   The expansion unit 4 is prepared for expanding the function of the PLC 1. Each expansion unit 4 is connected to a field device (controlled device) 10 corresponding to the function of the expansion unit 4, whereby each field device 16 is connected to the basic unit 3 via the expansion unit 4. The field device 10 includes input devices such as sensors and output devices such as actuators. When it is necessary to identify a plurality of field devices 10, letters a, b, c... Are added to the end of the reference numerals as in 10a and 10b.

プログラム作成支援装置2は、たとえば、携帯可能なノートタイプやタブレットタイプのパーソナルコンピュータであって、表示部7および操作部8を備えている。PLC1を制御するためのユーザプログラムの一例であるラダープログラムは、プログラム作成支援装置2を用いて作成される。その作成されたラダープログラムは、プログラム作成支援装置2内でニモニックコードに変換される。プログラム作成支援装置2は、USB(Universal Serial Bus)などの通信ケーブル9を介してPLC1の基本ユニット3に接続され、ニモニックコードに変換されたラダープログラムを基本ユニット3に送る。基本ユニット3はラダープログラムをマシンコードに変換し、基本ユニット3に備えられたメモリ内に記憶する。なお、ここではニモニックコードが基本ユニット3に送信されているが、本発明はこれに限られない。たとえば、プログラム作成支援装置2は、ニモニックコードを中間コードに変換し、中間コードを基本ユニット3に送信してもよい。   The program creation support apparatus 2 is a portable notebook type or tablet type personal computer, for example, and includes a display unit 7 and an operation unit 8. A ladder program which is an example of a user program for controlling the PLC 1 is created using the program creation support apparatus 2. The created ladder program is converted into a mnemonic code in the program creation support apparatus 2. The program creation support device 2 is connected to the basic unit 3 of the PLC 1 via a communication cable 9 such as a USB (Universal Serial Bus), and sends the ladder program converted into a mnemonic code to the basic unit 3. The basic unit 3 converts the ladder program into machine code and stores it in the memory provided in the basic unit 3. Although the mnemonic code is transmitted to the basic unit 3 here, the present invention is not limited to this. For example, the program creation support device 2 may convert the mnemonic code into an intermediate code and transmit the intermediate code to the basic unit 3.

なお、図1は示していないが、プログラム作成支援装置2の操作部8には、プログラム作成支援装置2に接続されたマウスなどのポインティングデバイスが含まれていてもよい。また、プログラム作成支援装置2は、USB以外の他の通信ケーブル9を介して、PLC1の基本ユニット3に対して着脱可能に接続されるような構成であってもよい。また、通信ケーブル9を介さず、PLC1の基本ユニット3に対して無線によって接続されるような構成であってもよい。   Although not shown in FIG. 1, the operation unit 8 of the program creation support apparatus 2 may include a pointing device such as a mouse connected to the program creation support apparatus 2. The program creation support device 2 may be configured to be detachably connected to the basic unit 3 of the PLC 1 via a communication cable 9 other than the USB. Moreover, the structure connected by radio | wireless with respect to the basic unit 3 of PLC1 may be sufficient not via the communication cable 9. FIG.

IPC11はPLC1から時系列データを収集するデータ収集装置である。IPC11は時系列データをクラウド12に送信してもよい。クラウドとは、データを蓄積したり、データに所定の処理を実行したりするサーバ装置の集合体である。   The IPC 11 is a data collection device that collects time-series data from the PLC 1. The IPC 11 may transmit time series data to the cloud 12. The cloud is a collection of server devices that accumulate data and perform predetermined processing on the data.

<ラダープログラム>
図2は、ラダープログラムの作成時にプログラム作成支援装置2の表示部7に表示されるラダー図Ldの一例を示す図である。プログラム作成支援装置2はマトリックス状に配置された複数のセルを表示部7に表示する。各セルには仮想デバイスのシンボルが配置される。シンボルは入力リレーや出力リレーなどを示している。複数のシンボルによってリレー回路が形成される。ラダー図Ldには、たとえば、10列×N行(Nは任意の自然数)のセルが配置されている。そして、各行のセル内には仮想デバイスのシンボルが適宜配置される。
<Ladder program>
FIG. 2 is a diagram illustrating an example of a ladder diagram Ld displayed on the display unit 7 of the program creation support apparatus 2 when creating a ladder program. The program creation support apparatus 2 displays a plurality of cells arranged in a matrix on the display unit 7. A virtual device symbol is arranged in each cell. Symbols indicate input relays and output relays. A relay circuit is formed by a plurality of symbols. In the ladder diagram Ld, for example, cells of 10 columns × N rows (N is an arbitrary natural number) are arranged. Then, symbols of virtual devices are appropriately arranged in the cells of each row.

図2が示すリレー回路は、入力装置からの入力信号に基づいてオン/オフされる3つの仮想デバイス(以下、「入力デバイス」と呼ぶ。)のシンボルと、出力装置の動作を制御するためにオン/オフされる仮想デバイス(以下、「出力デバイス」と呼ぶ。)のシンボルとが適宜結合されることにより構成されている。   The relay circuit shown in FIG. 2 controls symbols of three virtual devices (hereinafter referred to as “input devices”) that are turned on / off based on an input signal from the input device and the operation of the output device. It is configured by appropriately combining symbols of virtual devices to be turned on / off (hereinafter referred to as “output devices”).

各入力デバイスのシンボルの上方に表示されている文字(「R0001」、「R0002」および「R0003」)は、その入力デバイスのデバイス名(アドレス名)を表している。各入力デバイスのシンボルの下方に表示されている文字(「フラグ1」、「フラグ2」および「フラグ3」)は、その入力デバイスに対応付けられたデバイスコメントを表している。出力デバイスのシンボルの上方に表示されている文字(「原点復帰」)は、その出力デバイスの機能を表す文字列からなるラベルである。   The characters (“R0001”, “R0002”, and “R0003”) displayed above the symbol of each input device represent the device name (address name) of the input device. The characters (“Flag 1”, “Flag 2”, and “Flag 3”) displayed below the symbol of each input device represent a device comment associated with the input device. The character (“origin return”) displayed above the symbol of the output device is a label composed of a character string representing the function of the output device.

図2が示す例では、デバイス名「R0001」および「R0002」にそれぞれ対応する2つの入力デバイスのシンボルが直列的に結合されることにより、AND回路が構成されている。また、これらの2つの入力デバイスのシンボルからなるAND回路に対して、デバイス名「R0003」に対応する入力デバイスのシンボルが並列的に結合されることにより、OR回路が構成されている。すなわち、このリレー回路では、一行目の2つのシンボルに対応する入力デバイスがいずれもオンした場合、または、二行目のシンボルに対応する入力デバイスがオンした場合にのみ、一行目のシンボルに対応する出力デバイスがオンになる。   In the example shown in FIG. 2, an AND circuit is configured by serially coupling two input device symbols respectively corresponding to device names “R0001” and “R0002”. In addition, an OR circuit is configured by combining the input device symbol corresponding to the device name “R0003” in parallel with the AND circuit including the symbols of these two input devices. In other words, in this relay circuit, only when the input device corresponding to the two symbols in the first row is turned on, or when the input device corresponding to the symbol in the second row is turned on, the first row symbol is supported. The output device to turn on.

<プログラム作成支援装置>
図3は、プログラム作成支援装置2の電気的構成について説明するためのブロック図である。図3が示すように、プログラム作成支援装置2は、CPU21、表示部7、操作部8、記憶装置22および通信部23を備えている。表示部7、操作部8、記憶装置22および通信部23は、それぞれCPU21に対して電気的に接続されている。記憶装置22は、少なくともRAMを含み、プログラム記憶部24と、編集ソフト記憶部25とを備えている。
<Program creation support device>
FIG. 3 is a block diagram for explaining the electrical configuration of the program creation support apparatus 2. As illustrated in FIG. 3, the program creation support device 2 includes a CPU 21, a display unit 7, an operation unit 8, a storage device 22, and a communication unit 23. The display unit 7, the operation unit 8, the storage device 22, and the communication unit 23 are electrically connected to the CPU 21. The storage device 22 includes at least a RAM and includes a program storage unit 24 and an editing software storage unit 25.

ユーザは、編集ソフト記憶部25に記憶されている編集ソフトをCPU21に実行させて、操作部8を通じてラダープログラムを編集する。ここで、ラダープログラムの編集には、ラダープログラムの作成および変更が含まれる。編集ソフトを用いて作成されたラダープログラムは、プログラム記憶部24に記憶される。また、ユーザは、必要に応じてプログラム記憶部24に記憶されているラダープログラムを読み出し、そのラダープログラムを、編集ソフトを用いて変更することができる。通信部23は、通信ケーブル9を介してプログラム作成支援装置2を基本ユニット3に通信可能に接続するためのものである。   The user causes the CPU 21 to execute editing software stored in the editing software storage unit 25 and edits the ladder program through the operation unit 8. Here, the ladder program editing includes creation and modification of the ladder program. The ladder program created using the editing software is stored in the program storage unit 24. In addition, the user can read out the ladder program stored in the program storage unit 24 as necessary, and can change the ladder program using editing software. The communication unit 23 is for connecting the program creation support apparatus 2 to the basic unit 3 through the communication cable 9 so as to be communicable.

<PLC>
図4は、PLC1の電気的構成について説明するためのブロック図である。図4が示すように、基本ユニット3は、CPU31、表示部5、操作部6、記憶装置32および通信部33を備えている。表示部5、操作部6、記憶装置32、および通信部33は、それぞれCPU31に電気的に接続されている。記憶装置32は、RAMやROM、メモリカードなどを含んでもよい。記憶装置32はデバイス部34やプログラム記憶部35などの複数の記憶領域を有している。デバイス部34はビットデバイスやワードデバイスなどを有し、各デバイスはデバイス値を記憶する。プログラム記憶部35は、プログラム作成支援装置2から入力されたラダープログラムやユーザデータを記憶する。プログラム記憶部35は、基本ユニット3用の制御プログラムも記憶する。図4が示すように基本ユニット3と拡張ユニット4とは拡張バスの一種であるユニット外部バス90を介して接続されている。なお、ユニット外部バス90に関する通信機能は通信部33の一部として実装されてもよい。
<PLC>
FIG. 4 is a block diagram for explaining the electrical configuration of the PLC 1. As shown in FIG. 4, the basic unit 3 includes a CPU 31, a display unit 5, an operation unit 6, a storage device 32, and a communication unit 33. The display unit 5, the operation unit 6, the storage device 32, and the communication unit 33 are each electrically connected to the CPU 31. The storage device 32 may include a RAM, a ROM, a memory card, and the like. The storage device 32 has a plurality of storage areas such as a device unit 34 and a program storage unit 35. The device unit 34 includes a bit device and a word device, and each device stores a device value. The program storage unit 35 stores a ladder program and user data input from the program creation support device 2. The program storage unit 35 also stores a control program for the basic unit 3. As shown in FIG. 4, the basic unit 3 and the expansion unit 4 are connected via a unit external bus 90 which is a kind of expansion bus. The communication function related to the unit external bus 90 may be implemented as a part of the communication unit 33.

図5は、基本ユニット3のスキャンタイムを示す模式図である。図5が示すように1つのスキャンタイムTは、入出力のリフレッシュを行うためのユニット間通信201、プログラム実行202、END処理204により構成されている。ユニット間通信201で、基本ユニット3は、ラダープログラムを実行して得られた出力データを基本ユニット3内の記憶装置32から拡張ユニット4など外部機器などに送信する。さらに、基本ユニット3は、拡張ユニット4など外部機器などから受信した入力データを基本ユニット3内の記憶装置32に取り込む。つまり、基本ユニット3のデバイスに記憶されているデバイス値は出力リフレッシュによって拡張ユニット4のデバイスに反映される。同様に、拡張ユニット4のデバイスに記憶されているデバイス値は入力リフレッシュによって基本ユニット3のデバイスに反映される。このように入出力リフレッシュによって基本ユニット3のデバイスと拡張ユニット4のデバイスが同期する。なお、リフレッシュ以外のタイミングでデバイス値をユニット間で更新する仕組みが採用されてもよい。ただし、基本ユニット3のデバイスは基本ユニット3が随時書き換えており、同様に、拡張ユニット4のデバイスは拡張ユニット4が随時書き換えている。つまり、基本ユニット3のデバイスは基本ユニット3の内部の装置によって随時アクセス可能である。同様に、拡張ユニット4のデバイスは拡張ユニット4の内部の装置によって随時アクセス可能になっている。基本ユニット3と拡張ユニット4との間では基本的にリフレッシュのタイミングにおいて相互にデバイス値を更新して同期する。プログラム実行202で、基本ユニット3は、更新された入力データを用いてプログラムを実行(演算)する。基本ユニット3はプログラムの実行によりデータを演算処理する。なお、END処理とは、プログラム作成支援装置2や基本ユニット3に接続された表示器(図示せず)等の外部機器とのデータ通信、システムのエラーチェック等の周辺サービスに関する処理全般を意味する。IPC11はEND処理204においてPLC1から時系列データを収集してもよい。   FIG. 5 is a schematic diagram showing the scan time of the basic unit 3. As shown in FIG. 5, one scan time T is composed of inter-unit communication 201 for executing input / output refresh, program execution 202, and END processing 204. In the inter-unit communication 201, the basic unit 3 transmits output data obtained by executing the ladder program from the storage device 32 in the basic unit 3 to an external device such as the expansion unit 4. Further, the basic unit 3 captures input data received from an external device such as the expansion unit 4 into the storage device 32 in the basic unit 3. That is, the device value stored in the device of the basic unit 3 is reflected in the device of the expansion unit 4 by output refresh. Similarly, the device value stored in the device of the expansion unit 4 is reflected in the device of the basic unit 3 by the input refresh. In this way, the device of the basic unit 3 and the device of the expansion unit 4 are synchronized by the input / output refresh. Note that a mechanism for updating device values between units at a timing other than refresh may be employed. However, the device of the basic unit 3 is rewritten as needed by the basic unit 3, and similarly, the device of the expansion unit 4 is rewritten as needed by the expansion unit 4. That is, the device of the basic unit 3 can be accessed at any time by a device inside the basic unit 3. Similarly, the devices of the expansion unit 4 can be accessed at any time by the devices inside the expansion unit 4. The basic unit 3 and the expansion unit 4 synchronize by updating the device values at the refresh timing basically. In the program execution 202, the basic unit 3 executes (calculates) the program using the updated input data. The basic unit 3 computes data by executing a program. The END processing means general processing related to peripheral services such as data communication with an external device such as a display (not shown) connected to the program creation support device 2 and the basic unit 3, and system error checking. . The IPC 11 may collect time series data from the PLC 1 in the END process 204.

このように、プログラム作成支援装置2はユーザの操作に応じたラダープログラムを作成し、作成したラダープログラムをPLC1に転送する。PLC1は、入出力リフレッシュ、ラダープログラムの実行およびEND処理を1サイクル(1スキャン)として、このサイクルを周期的、すなわちサイクリックに繰り返し実行する。これにより、各種入力機器(センサ等)からのタイミング信号に基づいて、各種出力機器(モータ等)を制御する。よって、PLC1は汎用のパーソナルコンピュータ(PC)とは全く異なる動きをする。   As described above, the program creation support device 2 creates a ladder program according to the user's operation, and transfers the created ladder program to the PLC 1. The PLC 1 executes input / output refresh, execution of a ladder program, and END processing as one cycle (one scan), and periodically executes this cycle cyclically, that is, cyclically. Thus, various output devices (motors, etc.) are controlled based on timing signals from various input devices (sensors, etc.). Therefore, the PLC 1 moves completely different from a general-purpose personal computer (PC).

<データ収集装置>
図6はIPC11の電気的構成について説明するためのブロック図である。IPC11は、CPU51、記憶装置52、通信部53、表示部57、操作部58などを備えている。記憶装置52、通信部53、表示部57および操作部58は、内部バスなどを介してそれぞれCPU51に電気的に接続されている。記憶装置52は、RAMやROM、メモリカード、ハードディスクドライブ(HDD)、ソリッドステートドライブ(SSD)などを含んでもよい。記憶装置52には、PLC1から収集された時系列記憶データを記憶する時系列データ記憶部54や、CPU51により実行される制御プログラムを記憶するプログラム記憶部55が設けられている。IPC11は、通信部53を介してPLC1やクラウド12と通信する。たとえば、CPU51は通信部53を介してPLC1からデバイス値またはその集合体である時系列データを収集して時系列データ記憶部54に記憶する。また、CPU51は時系列データを時系列データ記憶部54から読み出して、通信部53を介してクラウド12へ送信してもよい。
<Data collection device>
FIG. 6 is a block diagram for explaining the electrical configuration of the IPC 11. The IPC 11 includes a CPU 51, a storage device 52, a communication unit 53, a display unit 57, an operation unit 58, and the like. The storage device 52, the communication unit 53, the display unit 57, and the operation unit 58 are each electrically connected to the CPU 51 via an internal bus or the like. The storage device 52 may include a RAM, a ROM, a memory card, a hard disk drive (HDD), a solid state drive (SSD), and the like. The storage device 52 is provided with a time series data storage unit 54 that stores time series storage data collected from the PLC 1 and a program storage unit 55 that stores a control program executed by the CPU 51. The IPC 11 communicates with the PLC 1 and the cloud 12 via the communication unit 53. For example, the CPU 51 collects device values or time-series data that is an aggregate thereof from the PLC 1 via the communication unit 53 and stores them in the time-series data storage unit 54. Further, the CPU 51 may read time-series data from the time-series data storage unit 54 and transmit it to the cloud 12 via the communication unit 53.

<クラウド>
図7はクラウド12の電気的構成について説明するためのブロック図である。クラウド12は、CPU61、記憶装置62、通信部63、表示部67および操作部68を備えている。記憶装置62、通信部63、表示部67および操作部68は、内部バスなどを介してそれぞれCPU61に電気的に接続されている。記憶装置62は、RAMやROM、メモリカード、ハードディスクドライブ(HDD)、ソリッドステートドライブ(SSD)などを含んでもよい。記憶装置62には、IPC11を介してPLC1から収集された時系列記憶データを記憶する時系列データ記憶部64や、CPU61により実行される制御プログラムを記憶するプログラム記憶部65が設けられている。クラウド12は、通信部63を介してPLC1やIPC11、クライアント(例:プログラム作成支援装置2)と通信する。たとえば、CPU61は通信部63を介してPLC1またはIPC11から時系列データを収集して時系列データ記憶部64に記憶する。また、CPU61は時系列データに演算を施し、通信部63を介してクライアントに送信してもよい。
<Cloud>
FIG. 7 is a block diagram for explaining the electrical configuration of the cloud 12. The cloud 12 includes a CPU 61, a storage device 62, a communication unit 63, a display unit 67, and an operation unit 68. The storage device 62, the communication unit 63, the display unit 67, and the operation unit 68 are each electrically connected to the CPU 61 via an internal bus or the like. The storage device 62 may include a RAM, a ROM, a memory card, a hard disk drive (HDD), a solid state drive (SSD), and the like. The storage device 62 is provided with a time series data storage unit 64 that stores time series storage data collected from the PLC 1 via the IPC 11 and a program storage unit 65 that stores a control program executed by the CPU 61. The cloud 12 communicates with the PLC 1, the IPC 11, and the client (for example, the program creation support device 2) via the communication unit 63. For example, the CPU 61 collects time series data from the PLC 1 or the IPC 11 via the communication unit 63 and stores it in the time series data storage unit 64. Further, the CPU 61 may perform an operation on the time series data and transmit it to the client via the communication unit 63.

<抽出期間>
ある部品を製造する工場のラインにおいて部品の加工を制御したり、完成した部品を検査したりするためにPLC1が使用されることがある。たとえば、PLC1はユーザプログラムにしたがって部品に圧力を加えて切断したり、部品に熱を加えたりすることもある。また、PLC1は拡張ユニット4に接続されたXYステージなどを制御して部品の位置を移動させることもあろう。いずれの場合であっても部品の加工精度に問題が発生したときや発生しそうなときにその原因を探るにはPLC1のデバイス値を収集して分析することが必要となる。デバイス値は時々刻々と変化する。たとえば、一つの部品の加工や検査において数百回も変化することもあろう。これは、一つの部品につきラダープログラムが数百スキャンされることを意味する。また、時系列データの収集期間が長くなると、時系列データのうちどの部分がどの部品に対応した個別データであるかをユーザが目で確認して見つけ出すことは簡単ではない。そこで、本実施例では、PLC1やIPC11またはクラウド12が部品ごとの個別データを抽出することで、ユーザの負担を軽減する。ユーザは、プログラム作成支援装置2などのクライアントを通じて個別データを確認する。
<Extraction period>
The PLC 1 may be used to control the processing of a part in a factory line for manufacturing a part or to inspect a completed part. For example, the PLC 1 may cut the component by applying pressure to the component according to the user program, or may apply heat to the component. In addition, the PLC 1 may control the XY stage connected to the extension unit 4 to move the position of the component. In any case, it is necessary to collect and analyze the device value of the PLC 1 in order to find out the cause when a problem occurs in the processing accuracy of the component or when it is likely to occur. Device values change from moment to moment. For example, it may change hundreds of times in the processing and inspection of a single part. This means that hundreds of ladder programs are scanned per part. Further, when the collection period of time series data becomes long, it is not easy for the user to visually confirm and find out which part of the time series data corresponds to which part. Therefore, in this embodiment, the PLC 1, the IPC 11, or the cloud 12 extracts individual data for each component, thereby reducing the burden on the user. The user confirms the individual data through a client such as the program creation support apparatus 2.

図8はデバイス値の時系列データを示す図である。ここでは4つのデバイス値91aないし91dが例示されているが、デバイス値は一つ以上である。抽出期間とは時系列データのうち個別データの時間的な位置を示す情報である。抽出期間は、個別データの開始位置(開始時刻)tsと終了位置(終了時刻)teにより定義される。また、抽出期間は、抽出期間の時間的な長さPと基準時trとによって定義されてもよい。長さPは位相期間と呼ばれてもよい。基準時trは基準位相と呼ばれてもよい。なお、抽出期間の長さPは開始位置tsから終了位置teまでの時間的な長さである。基準時trは、開始位置tsから終了位置teまでのいずれかの位置(時刻)を示している。たとえば、開始位置tsは基準時trからΔoffset1だけマイナスした時刻として定義されてもよい。終了位置teは基準時trからΔoffset2だけプラスした時刻として定義されてもよい。Δoffset1は0であり、Δoffset2はPであってもよい。つまり、終了位置teは開始位置tsから長さPをプラスした時刻として定義されてもよい。図8では基準時trが開始位置tsに一致している事例を示している。図8では横軸は時間を示しているが、スキャンの回数やデバイス値の収集回数(サンプリング数)であってもよい。なお、一スキャンの時間的な長さは必ずしも一定ではない。   FIG. 8 is a diagram showing time-series data of device values. Here, four device values 91a to 91d are illustrated, but the device value is one or more. The extraction period is information indicating the temporal position of individual data in the time series data. The extraction period is defined by the start position (start time) ts and end position (end time) te of the individual data. Further, the extraction period may be defined by the time length P of the extraction period and the reference time tr. The length P may be referred to as a phase period. The reference time tr may be referred to as a reference phase. The length P of the extraction period is the time length from the start position ts to the end position te. The reference time tr indicates any position (time) from the start position ts to the end position te. For example, the start position ts may be defined as a time minus Δoffset1 from the reference time tr. The end position te may be defined as a time obtained by adding Δoffset2 from the reference time tr. Δoffset1 may be 0 and Δoffset2 may be P. That is, the end position te may be defined as a time obtained by adding the length P from the start position ts. FIG. 8 shows a case where the reference time tr coincides with the start position ts. In FIG. 8, the horizontal axis indicates time, but it may be the number of scans or the number of device value collections (sampling number). Note that the time length of one scan is not necessarily constant.

図8においてデバイス値91aはフィールドデバイスであるXYステージのX軸の座標変化を示している。デバイス値91bはXYステージのY軸の座標変化を示している。デバイス値91cは要求リレーを示している。要求リレーとは、基本ユニット3が拡張ユニット4に対して所定の処理の実行開始を指示するリレーである。デバイス値91dは完了リレーを示している。完了リレーとは、拡張ユニット4が基本ユニット3に対して所定の処理が完了したことを通知するリレーである。   In FIG. 8, a device value 91a indicates a change in the coordinate of the X axis of the XY stage which is a field device. A device value 91b indicates a change in the coordinate of the Y axis of the XY stage. A device value 91c indicates a request relay. The request relay is a relay in which the basic unit 3 instructs the expansion unit 4 to start executing a predetermined process. A device value 91d indicates a completion relay. The completion relay is a relay that notifies the basic unit 3 that the expansion unit 4 has completed predetermined processing.

図8が示すように部品ごとの個別データには周期性がある。したがって、CPU31などが時系列データを解析して周期性を特定し、特定された周期性にしたがって個別データを抽出してもよい。   As shown in FIG. 8, the individual data for each part has periodicity. Therefore, the CPU 31 or the like may analyze the time series data to identify periodicity and extract individual data according to the identified periodicity.

●タクトタイムに基づく基準時の決定手法
CPU31は、ユーザにより入力されたタクトタイムttに基づいて基準時trを決定してもよい。タクトタイムttとは、一つの部品あたりの処理時間である。したがって、CPU31は、様々なビットデバイスのデバイス値の立ち上がりから次の立ち上がりまでの時間を求め、タクトタイムttに最も近い時間を求められたデバイス値の立ち上がりを基準時trに決定してもよい。
Method for determining the reference time based on the tact time The CPU 31 may determine the reference time tr based on the tact time tt input by the user. The tact time tt is a processing time per part. Therefore, the CPU 31 may obtain the time from the rise of the device value of various bit devices to the next rise and determine the rise of the device value for which the time closest to the tact time tt is obtained as the reference time tr.

図9はタクトタイムttに基づく基準時trの決定方法を示している。ここでは4つの一ビットデバイスのデバイス値91eないし91hが例示されている。デバイス値91eについての立ち上がり周期は0.4秒である。デバイス値91fについての立ち上がり周期は0.9秒である。デバイス値91gについての立ち上がり周期は3.2秒である。デバイス値91hについての立ち上がり周期は3.2秒である。ユーザはタクトタイムttとして3.2秒を設定したものとする。CPU31は、ユーザにより入力されたタクトタイムttに最も近い立ち上がり周期のデバイス値91gまたはデバイス値91hの立ち上がりを基準時trに決定する。デバイス値91gとデバイス値91hのように複数の候補が見つかった場合、CPU31は最も長い周期を採用する。デバイス値91gとデバイス値91hが同一であれば、CPU31は乱数によりいずれか一つを決定してもよい。   FIG. 9 shows a method for determining the reference time tr based on the tact time tt. Here, device values 91e to 91h of four 1-bit devices are illustrated. The rising period for the device value 91e is 0.4 seconds. The rising period for the device value 91f is 0.9 seconds. The rising period for the device value 91g is 3.2 seconds. The rising period for the device value 91h is 3.2 seconds. Assume that the user sets 3.2 seconds as the tact time tt. The CPU 31 determines the rising edge of the device value 91g or the device value 91h having the rising period closest to the tact time tt input by the user as the reference time tr. When a plurality of candidates are found like the device value 91g and the device value 91h, the CPU 31 adopts the longest cycle. If the device value 91g and the device value 91h are the same, the CPU 31 may determine one by a random number.

●微分エッジに基づく基準時の決定手法
CPU31は時系列データの微分エッジを演算により求め、微分エッジが得られた位置を基準時trに決定してもよい。図10が示すようにあるデバイスのデバイス値91iの時系列データを微分することで微分エッジ99が得られる。複数の位置に微分エッジ99が得られた場合、CPU31が閾値フィルタを用いて小さな微分エッジを除去する。CPU31は微分エッジ99が得られた時刻(位相)を基準時ttrに決定する。このようなエッジの検出方法としてはキャニー法やハイパスフィルタなどが採用されてもよい。
Method for determining reference time based on differential edge The CPU 31 may determine the differential edge of the time-series data by calculation and determine the position where the differential edge is obtained as the reference time tr. As shown in FIG. 10, the differential edge 99 is obtained by differentiating the time series data of the device value 91i of a certain device. When differential edges 99 are obtained at a plurality of positions, the CPU 31 removes small differential edges using a threshold filter. The CPU 31 determines the time (phase) when the differential edge 99 is obtained as the reference time ttr. As such an edge detection method, a Canny method, a high-pass filter, or the like may be employed.

●FFTやARモデルに基づく抽出期間の長さの決定手法
一般に時系列データには様々な周期の信号が重畳されている。部品の加工や検査では同様の工程が繰り返される。つまり、複数の部品についてのデバイス値は周期性を有している。特に、加工周期や検査周期などはほぼ一定期間であるため、これらの周期のスペクトルは最大となりやすい。そこで、CPU31は、時系列データを分析して見つかった複数のスペクトルのうち最も大きなスペクトルを見つけ、見つかった最大スペクトルの周期を抽出期間の長さPとしてもよい。たとえば、CPU31は高速フーリエ変換(FFT)やAR(自己回帰)モデルを用いて時系列データを分析し、抽出期間の長さPを決定してもよい。
A method for determining the length of the extraction period based on the FFT or AR model Generally, signals with various periods are superimposed on time-series data. Similar processes are repeated in the processing and inspection of parts. That is, the device values for a plurality of parts have periodicity. In particular, since the machining cycle and the inspection cycle are almost constant, the spectrum of these cycles tends to be maximum. Therefore, the CPU 31 may find the largest spectrum among the plurality of spectra found by analyzing the time series data, and may set the period of the found maximum spectrum as the length P of the extraction period. For example, the CPU 31 may analyze the time series data using a fast Fourier transform (FFT) or an AR (autoregressive) model to determine the length P of the extraction period.

●個別データの波形の類似性に基づく抽出期間の長さの決定手法
CPU31は、個別データの波形の類似性に基づき周期を特定してもよい。これは同じ種類の部品であれば、その部品に対する加工や検査に対する処理も共通であるため、加工や検査についてのデバイス値の波形も類似するからである。図11は部品ごとに抽出期間の長さPが変化しうるデバイス値91jを示している。図11が示すようにある部品の抽出期間P1と、他の部品の抽出期間P2とが異なっていることがある。そこで、CPU31は、動的時間伸縮法などを用いて時系列データから波形の類似している複数の期間を抽出し、それぞれ抽出期間として決定する。この方法は部品ごとの抽出期間が一定でない場合に特に有用であろう。
Method for Determining Length of Extraction Period Based on Similarity of Individual Data Waveforms The CPU 31 may specify the period based on the similarity of individual data waveforms. This is because, if the parts are of the same type, the processing for the parts and the processing for the inspection are also common, so the waveforms of the device values for the processing and the inspection are similar. FIG. 11 shows a device value 91j in which the length P of the extraction period can change for each part. As shown in FIG. 11, the extraction period P1 of a certain part may be different from the extraction period P2 of another part. Therefore, the CPU 31 extracts a plurality of periods having similar waveforms from the time-series data using a dynamic time expansion / contraction method, and determines each period as an extraction period. This method may be particularly useful when the extraction period for each part is not constant.

<機能ブロック>
図12は個別データの抽出処理に関与する機能を説明する図である。ここではPLC1に時系列データの収集と個別データの抽出に関与する機能が実装されている。ただし、図13や図14が示すようにこれらの機能はIPC11に実装されてもよいし、クラウド12に実装されてもよい。
<Functional block>
FIG. 12 is a diagram for explaining functions involved in individual data extraction processing. Here, functions related to collection of time series data and extraction of individual data are implemented in the PLC 1. However, as shown in FIGS. 13 and 14, these functions may be implemented in the IPC 11 or in the cloud 12.

図12において基本ユニット3のCPU31は記憶装置32に記憶されている制御プログラムを実行することで以下の機能を実現する。ラダー実行部80はユーザプログラムを実行し、当該ユーザプログラムにしたがって複数のデバイスに記憶されている情報を演算処理するプログラム実行部である。ここではユーザプログラムの一例としてラダープログラム36が使用されている。ラダー実行部80は記憶装置32に記憶されているラダープログラム36を実行し、一スキャンごとにデバイス値91を更新する。収集部81は少なくとも一つのデバイスに記憶されているデバイスデータ(デバイス値91)を繰り返し収集することで時系列デバイスデータ(時系列データ92)を形成するデータ収集部である。選択部87は、収集部81により収集されるデバイス値を選択する。たとえば、選択部87はユーザによりプログラム作成支援装置2において作成された設定情報を分析し、収集対象のデバイス値を選択してもよい。ユーザはプログラム作成支援装置2において複数のデバイスをいくつかのグループに分け、各グループにロギング対象IDを付与することがある。さらに、ユーザは、プログラム作成支援装置2においてロギング対象IDを選択することでグループを選択する。選択されたグループのID、つまり、ロギング対象IDは設定情報に格納されて、ユーザプログラムとともにPLC1に転送される。そこで、選択部87は設定情報に格納されているロギング対象IDを取得し、さらにロギング対象IDに関連付けられている一つ以上のデバイスを取得し、取得したデバイスの識別情報を収集部81に設定する。収集部81は設定されたデバイスからデバイス値を収集する。   In FIG. 12, the CPU 31 of the basic unit 3 implements the following functions by executing a control program stored in the storage device 32. The ladder execution unit 80 is a program execution unit that executes a user program and performs arithmetic processing on information stored in a plurality of devices according to the user program. Here, a ladder program 36 is used as an example of the user program. The ladder execution unit 80 executes the ladder program 36 stored in the storage device 32 and updates the device value 91 for each scan. The collection unit 81 is a data collection unit that forms time-series device data (time-series data 92) by repeatedly collecting device data (device value 91) stored in at least one device. The selection unit 87 selects device values collected by the collection unit 81. For example, the selection unit 87 may analyze setting information created by the user in the program creation support apparatus 2 and select a device value to be collected. The user may divide a plurality of devices into several groups in the program creation support apparatus 2 and give a logging target ID to each group. Furthermore, the user selects a group by selecting a logging target ID in the program creation support apparatus 2. The ID of the selected group, that is, the logging target ID is stored in the setting information and transferred to the PLC 1 together with the user program. Therefore, the selection unit 87 acquires the logging target ID stored in the setting information, acquires one or more devices associated with the logging target ID, and sets the acquired device identification information in the collection unit 81. To do. The collection unit 81 collects device values from the set devices.

ユーザはプログラム作成支援装置2においてリアルタイムでのチャート形式モニタやデバッグ用に一つ以上のデバイスを選択し、選択したデバイスの識別情報を設定情報に格納して、ユーザプログラムとともにPLC1に転送することがある。選択部87は設定情報に格納されているデバイスの識別情報を収集部81に設定してもよい。リアルタイムでのチャート形式モニタとは、プログラム作成支援装置2がPLC1からデバイス値を高速に読み出して、時系列のデバイス値を、チャート形式(グラフ形式)でリアルタイムに表示部7に表示する機能である。デバッグとはユーザプログラムのデバッグのことである。デバッグ用のデバイスの識別情報も設定情報に格納されて、ユーザプログラムとともにPLC1に転送される。プログラム作成支援装置2は、デバッグ用のデバイスのデバイス値をPLC1から取得して、表示部7に表示する。このように、リアルタイムでのチャート形式モニタやデバッグ用のデバイスが個別データ93の抽出のために選択されてもよい。   The user can select one or more devices for real-time chart format monitoring and debugging in the program creation support apparatus 2, store the identification information of the selected devices in the setting information, and transfer it to the PLC 1 together with the user program. is there. The selection unit 87 may set the device identification information stored in the setting information in the collection unit 81. The real-time chart format monitor is a function in which the program creation support apparatus 2 reads device values from the PLC 1 at high speed and displays time-series device values on the display unit 7 in real time in a chart format (graph format). . Debugging is debugging of a user program. The identification information of the device for debugging is also stored in the setting information and transferred to the PLC 1 together with the user program. The program creation support apparatus 2 acquires the device value of the debugging device from the PLC 1 and displays it on the display unit 7. Thus, a real-time chart format monitor or a debugging device may be selected for extracting the individual data 93.

プログラム作成支援装置2の表示部7だけではなく、PLC1の表示部5に一つ以上のデバイス値が表示されることもある。この場合にも取得対象のデバイスの識別情報は設定情報に格納されて、ユーザプログラムとともにPLC1に転送される。したがって、選択部87は設定情報を解析することで、収集部81に取得させるデバイス値を選択してもよい。選択部87は収集部81の内部に設けられていてもよい。   One or more device values may be displayed not only on the display unit 7 of the program creation support apparatus 2 but also on the display unit 5 of the PLC 1. Also in this case, the identification information of the device to be acquired is stored in the setting information and transferred to the PLC 1 together with the user program. Therefore, the selection unit 87 may select a device value to be acquired by the collection unit 81 by analyzing the setting information. The selection unit 87 may be provided inside the collection unit 81.

決定部82は、時系列データ92から各部品ごとの個別データ93を抽出するための抽出期間を決定する。上述した抽出期間の基準時trを決定する手法や長さPを決定する手法を用いて抽出期間を決定する。調整部83はオプションであり、決定部82により決定された抽出期間を、ユーザの指示に応じて調整する。これにより抽出期間をユーザの意図したとおりに調整することが可能となる。調整部83は決定部82の内部に設けられていてもよい。調整部83が決定部82の外部に設けられている場合、調整部83は調整量を含む調整指示を決定部82に送信するように構成されてもよい。この場合、決定部82は、自ら決定した抽出期間を、調整部83により指示された調整量にしたがって、オフセットする。   The determination unit 82 determines an extraction period for extracting the individual data 93 for each part from the time series data 92. The extraction period is determined using the above-described method for determining the reference time tr of the extraction period and the method for determining the length P. The adjustment unit 83 is an option, and adjusts the extraction period determined by the determination unit 82 in accordance with a user instruction. As a result, the extraction period can be adjusted as intended by the user. The adjustment unit 83 may be provided inside the determination unit 82. When the adjustment unit 83 is provided outside the determination unit 82, the adjustment unit 83 may be configured to transmit an adjustment instruction including the adjustment amount to the determination unit 82. In this case, the determination unit 82 offsets the extraction period determined by itself according to the adjustment amount instructed by the adjustment unit 83.

抽出部84は、決定部82により決定された各抽出期間における個別データ93を時系列データ92から抽出する。付与部85は、抽出部84により抽出された各個別データに対して各個別データを識別するための識別情報を付与する。識別情報は、たとえば、シリアル番号であってもよいが、各個別データを区別できる情報であれば他の情報であってもよい。送信部86はオプションであり、個別データ93をクライアントであるプログラム作成支援装置2へ送信する。ユーザによる個別データ93の検討がPLC1において実行される場合、CPU31は表示部5に個別データ93を表示してもよい。表示部5はPLC1に接続された外部表示装置であってもよい。個別データ93のフォーマットはCSV形式であってもよいし、SQL形式であってもよい。SQLはデータベース言語の一種である。   The extraction unit 84 extracts the individual data 93 in each extraction period determined by the determination unit 82 from the time series data 92. The assigning unit 85 assigns identification information for identifying each individual data to each individual data extracted by the extracting unit 84. The identification information may be, for example, a serial number, but may be other information as long as the information can distinguish each individual data. The transmission unit 86 is an option, and transmits the individual data 93 to the program creation support apparatus 2 that is a client. When the examination of the individual data 93 by the user is executed in the PLC 1, the CPU 31 may display the individual data 93 on the display unit 5. The display unit 5 may be an external display device connected to the PLC 1. The format of the individual data 93 may be a CSV format or an SQL format. SQL is a kind of database language.

図13はIPC11がデバイス値の収集機能や抽出機能を有している事例を示している。すでに説明されている機能については説明が省略されるか、簡潔に説明される。IPC11のCPU51はプログラム記憶部55に記憶されている制御プログラムを実行することで様々な機能を実現する。図13が示すように、収集部81、選択部87、決定部82、調整部83、抽出部84、付与部85および送信部86などを実装する。収集部81は、取得条件(例:定期的)が満たされたときにPLC1からデバイス値91を取得し、記憶装置52の時系列データ記憶部54に記憶する。決定部82は時系列データ記憶部54に記憶されている時系列データ92の抽出期間を決定する。抽出部84は決定された抽出期間にしたがって部品ごとの個別データ93を抽出する。付与部85は抽出された個別データ93に識別情報を付与する。送信部86はオプションであり、クラウド12やプログラム作成支援装置2に個別データ93を送信する。なお、IPC11において個別データ93の検討が実行される場合、CPU51は表示部57に個別データ93を表示する。なお、IPC11が省略される場合、これらの機能はクラウド12のCPU61と記憶装置62、表示部67などにより実現される。   FIG. 13 shows an example in which the IPC 11 has a device value collection function and an extraction function. Descriptions of functions that have already been described are omitted or briefly described. The CPU 51 of the IPC 11 implements various functions by executing a control program stored in the program storage unit 55. As shown in FIG. 13, a collection unit 81, a selection unit 87, a determination unit 82, an adjustment unit 83, an extraction unit 84, a provision unit 85, a transmission unit 86, and the like are mounted. The collection unit 81 acquires a device value 91 from the PLC 1 when an acquisition condition (eg, regular) is satisfied, and stores the device value 91 in the time-series data storage unit 54 of the storage device 52. The determination unit 82 determines the extraction period of the time series data 92 stored in the time series data storage unit 54. The extraction unit 84 extracts individual data 93 for each part according to the determined extraction period. The assigning unit 85 assigns identification information to the extracted individual data 93. The transmission unit 86 is an option, and transmits the individual data 93 to the cloud 12 and the program creation support apparatus 2. When the examination of the individual data 93 is executed in the IPC 11, the CPU 51 displays the individual data 93 on the display unit 57. When the IPC 11 is omitted, these functions are realized by the CPU 61 of the cloud 12, the storage device 62, the display unit 67, and the like.

図14はIPC11がデバイス値の収集機能を有し、クラウド12が抽出機能を有している事例を示している。クラウド12のCPU61はプログラム記憶部65に記憶されている制御プログラムを実行することで、決定部82、調整部83(オプション)、抽出部84および付与部85などを実現する。IPC11はPLC1から収集したデバイス値91を時系列データ92にまとめてクラウド12に転送する。IPC11は時系列データ92を一時的に記憶装置52に記憶してもよい。クラウド12のCPU61はIPC11から受信した時系列データ92を時系列データ記憶部64に記憶する。決定部82は時系列データ記憶部64に記憶されている時系列データ92の抽出期間を決定する。抽出部84は決定された抽出期間にしたがって部品ごとの個別データ93を抽出する。付与部85は抽出された個別データ93に識別情報を付与する。また、CPU61は表示部67に個別データ93を表示する。あるいは、プログラム作成支援装置2の表示部7に個別データ93を表示させるために、送信部86は個別データ93をプログラム作成支援装置に送信してもよい。   FIG. 14 shows an example where the IPC 11 has a device value collection function and the cloud 12 has an extraction function. The CPU 61 of the cloud 12 executes a control program stored in the program storage unit 65, thereby realizing a determination unit 82, an adjustment unit 83 (option), an extraction unit 84, a grant unit 85, and the like. The IPC 11 collects the device values 91 collected from the PLC 1 as time-series data 92 and transfers them to the cloud 12. The IPC 11 may temporarily store the time series data 92 in the storage device 52. The CPU 61 of the cloud 12 stores the time series data 92 received from the IPC 11 in the time series data storage unit 64. The determination unit 82 determines the extraction period of the time series data 92 stored in the time series data storage unit 64. The extraction unit 84 extracts individual data 93 for each part according to the determined extraction period. The assigning unit 85 assigns identification information to the extracted individual data 93. Further, the CPU 61 displays the individual data 93 on the display unit 67. Alternatively, in order to display the individual data 93 on the display unit 7 of the program creation support apparatus 2, the transmission unit 86 may transmit the individual data 93 to the program creation support apparatus.

<フローチャート>
●収集処理
図15はPLC1のCPU31が実行する収集処理を示すフローチャートである。操作部6には設定モードと運転モードとを切り替えるスイッチが設けられている。設定モードとは、プログラム作成支援装置2からユーザプログラムや設定情報を受信する処理である。運転モードとはユーザプログラムを実行するモードである。CPU31は設定モードから運転モードへの切り替えが指示されると、以下の処理を実行する。
・S1でCPU31(ラダー実行部80)はユーザプログラムをRAMにロードする。
・S2でCPU31(ラダー実行部80)はユーザプログラムのスキャンを実行する。ラダー実行部80はユーザプログラムにしたがって各種のデバイスに格納されているデバイス値に所定の演算を実行し、デバイス値を更新する。所定の演算の内容はユーザプログラムによって定義されている。
・S3でCPU31(収集部81)はデバイス値を収集する。収集部81は、選択部87により選択された取得対象のデバイス値をデバイスから読み出し、時系列データ92に追加する。上述したように収集処理はIPC11のCPU51により実行されてもよいし、クラウド12のCPU61により実行されてもよい。デバイス値の収集タイミング(サンプリングタイミング)は、一スキャンごとであってもよいし、数スキャンごとであってもよい。また、収集はエンド処理において実行されてもよいし、スキャン中であってもよい。また、一スキャンにおいて複数回の収集が実行されてもよい。
・S4でCPU31(ラダー実行部80)はプログラムの停止が指示されたかどうかを判定する。たとえば、CPU31は上述したスイッチが運転モードから設定モードに切り替えられると、プログラムの停止が指示されたと判定する。プログラムの停止が指示されていなければ、CPU31はS2ないしS4の処理を繰り返し実行する。プログラムの停止が指示されると、CPU31はユーザプログラムを停止する。このようにして時系列データ92が収集される。
<Flowchart>
Collecting Process FIG. 15 is a flowchart showing the collecting process executed by the CPU 31 of the PLC 1. The operation unit 6 is provided with a switch for switching between a setting mode and an operation mode. The setting mode is a process for receiving a user program and setting information from the program creation support apparatus 2. The operation mode is a mode for executing a user program. When the CPU 31 is instructed to switch from the setting mode to the operation mode, the CPU 31 executes the following processing.
In S1, the CPU 31 (ladder execution unit 80) loads the user program into the RAM.
In S2, the CPU 31 (ladder execution unit 80) executes a user program scan. The ladder execution unit 80 performs a predetermined operation on the device values stored in various devices according to the user program, and updates the device values. The content of the predetermined calculation is defined by the user program.
In S3, the CPU 31 (collection unit 81) collects device values. The collection unit 81 reads the acquisition target device value selected by the selection unit 87 from the device and adds it to the time-series data 92. As described above, the collection process may be executed by the CPU 51 of the IPC 11 or may be executed by the CPU 61 of the cloud 12. The device value collection timing (sampling timing) may be every scan or every few scans. Further, the collection may be executed in the end process or during the scan. Further, multiple acquisitions may be executed in one scan.
In S4, the CPU 31 (ladder execution unit 80) determines whether or not the stop of the program is instructed. For example, when the switch described above is switched from the operation mode to the setting mode, the CPU 31 determines that an instruction to stop the program has been issued. If the stop of the program is not instructed, the CPU 31 repeatedly executes the processes of S2 to S4. When the stop of the program is instructed, the CPU 31 stops the user program. In this way, time series data 92 is collected.

図16は時系列データ92の一例を示している。時刻情報は分:秒:1/100秒により表記されている。ここでは、選択部87により取得対象としてデバイスa、b、c、dが選択されている。デバイスa,bはXYステージのX座標とY座標など、1ワードのデータを格納している。デバイスcは、ビットデバイスであり、ここでは要求リレーである。デバイスdは、ビットデバイスであり、ここでは完了リレーである。図16が示すようにこの段階では時系列データ92のどの部分がどの部品に対応しているかをユーザは特定しにくいだろう。   FIG. 16 shows an example of the time series data 92. The time information is expressed in minutes: seconds: 1/100 second. Here, the devices a, b, c, and d are selected as acquisition targets by the selection unit 87. Devices a and b store one word of data such as the X and Y coordinates of the XY stage. Device c is a bit device, here a request relay. Device d is a bit device, here a completion relay. As shown in FIG. 16, at this stage, it is difficult for the user to specify which part of the time-series data 92 corresponds to which part.

●抽出処理
図17は個別データの抽出処理を示すフローチャートである。上述したように抽出処理はCPU21、31、51、61の何れにより実行されてもよいが、ここではCPU31により実行されるものとする。
・S11でCPU31(決定部82)は個別データの抽出期間を決定する。決定部82は、タクトタイムttに基づいて基準時trを決定したり、FFTなどにより時系列データ92から抽出期間の長さPを決定したりする。決定部82は抽出期間を抽出部84に設定する。
・S12でCPU31(抽出部84)は決定部82により決定された抽出期間にしたがって部品ごとの個別データ93を時系列データ92から抽出する。
・S13でCPU31(付与部85)は、抽出部84により抽出された各個別データ93に識別情報を付与する。
Extraction Process FIG. 17 is a flowchart showing the individual data extraction process. As described above, the extraction process may be executed by any of the CPUs 21, 31, 51, 61, but here, it is assumed that the extraction process is executed by the CPU 31.
In S11, the CPU 31 (determination unit 82) determines the individual data extraction period. The determination unit 82 determines the reference time tr based on the tact time tt, or determines the length P of the extraction period from the time series data 92 by FFT or the like. The determination unit 82 sets the extraction period in the extraction unit 84.
In S12, the CPU 31 (extraction unit 84) extracts the individual data 93 for each part from the time series data 92 according to the extraction period determined by the determination unit 82.
In S <b> 13, the CPU 31 (giving unit 85) gives identification information to each individual data 93 extracted by the extracting unit 84.

図18は個別データ93の一例を示している。抽出部84は時系列データ92から部品ごとの個別データ93を切り出して、各個別データ93に識別情報を付与している。図18においては二つの個別データ93が例示されており、それぞれ異なる識別情報として"01"と"02"が付与されている。   FIG. 18 shows an example of the individual data 93. The extraction unit 84 cuts out the individual data 93 for each part from the time-series data 92 and gives identification information to each individual data 93. In FIG. 18, two individual data 93 are illustrated, and “01” and “02” are given as different identification information, respectively.

S14でCPU31は個別データ93を表示部5に表示する。上述したようにCPU31は個別データ93をプログラム作成支援装置2に送信することで、表示部7に個別データ93を表示してもよい。なお、S13からS14は、同期実行であってもよいし、非同期実行であってもよい。すなわち、例えばCPU31は、ユーザの表示指示に基づきS14の処理へ移行してもよい。この場合、例えば操作部8を介してユーザの表示指示がなされるまでは、CPU31は、S12及びS13の処理を繰り返し実行し、ユーザの表示指示があったときに、S14の処理へと移行してもよい。   In S <b> 14, the CPU 31 displays the individual data 93 on the display unit 5. As described above, the CPU 31 may display the individual data 93 on the display unit 7 by transmitting the individual data 93 to the program creation support device 2. Note that S13 to S14 may be synchronous execution or asynchronous execution. That is, for example, the CPU 31 may move to the process of S14 based on a user display instruction. In this case, for example, the CPU 31 repeatedly executes the processes of S12 and S13 until a user's display instruction is issued via the operation unit 8, and when the user's display instruction is issued, the process proceeds to S14. May be.

図19は個別データ93を表示するユーザインタフェース(UI100)の一例を示している。個別データ表示部101は、個別データ93を表示する表示領域である。この例では二つの個別データ93が表示されている。UI100が抽出期間の調整UIを兼ねていてもよい。バー102は基準時trの位置を示すオブジェクトである。フレーム103は抽出期間を示すUIである。調整部83は、ユーザが操作部6を通じてバー102を右方向または左方向に移動させると、バー102の移動量と移動方向に応じて基準時trを調整する。また、調整部83は、ユーザが操作部6を通じてフレーム103の右辺を右方向または左方向に移動させると、フレーム103の右辺の移動量と移動方向に応じて位相期間の長さPを調整する。なお、フレーム103の左辺とバー102とが統合されてもよい。メニュー104は、基準時trの決定手法の選択を受け付けるメニューである。この例ではタクトタイム指定や微分エッジの検出などが選択可能となっている。数値入力ボックス105は、タクトタイムの入力を受け付けるオブジェクトである。メニュー106は抽出期間の長さPの決定手法の選択を受け付けるメニューである。この例では、FFTやARモデルなどが選択可能となっている。数値入力ボックス107はデバイス値の収集周期の入力を受け付けるオブジェクトである。収集部81はこの収集周期にしたがってデバイス値をサンプリングする。ここでは、操作部6を通じて抽出期間が調整されているが、プログラム作成支援装置2の操作部8を通じて抽出期間が調整されてもよい。   FIG. 19 shows an example of a user interface (UI 100) that displays the individual data 93. The individual data display unit 101 is a display area for displaying the individual data 93. In this example, two individual data 93 are displayed. The UI 100 may also serve as an extraction period adjustment UI. The bar 102 is an object indicating the position of the reference time tr. A frame 103 is a UI indicating an extraction period. When the user moves the bar 102 in the right direction or the left direction through the operation unit 6, the adjustment unit 83 adjusts the reference time tr according to the moving amount and moving direction of the bar 102. Further, when the user moves the right side of the frame 103 in the right direction or the left direction through the operation unit 6, the adjustment unit 83 adjusts the length P of the phase period according to the movement amount and the movement direction of the right side of the frame 103. . Note that the left side of the frame 103 and the bar 102 may be integrated. The menu 104 is a menu for accepting selection of a determination method for the reference time tr. In this example, it is possible to select tact time designation or differential edge detection. The numerical value input box 105 is an object that receives an input of tact time. The menu 106 is a menu for accepting selection of a method for determining the length P of the extraction period. In this example, FFT or AR model can be selected. A numerical value input box 107 is an object that receives an input of a device value collection cycle. The collection unit 81 samples device values according to this collection cycle. Here, the extraction period is adjusted through the operation unit 6, but the extraction period may be adjusted through the operation unit 8 of the program creation support apparatus 2.

図20は個別データ表示部101の他の例を示している。この例では二つの個別データ93が縦に並んで表示されている。図21は個別データ表示部101の他の例を示している。この例では二つの個別データ93が重ねて表示されている。たとえば、CPU31は、二つの個別データ93の抽出期間が重なるように二つの個別データ93を重ねてもよい。CPU31は、二つの個別データ93の重なっている部分が多くなるように、一方の個別データ93を他方の個別データ93に対して位置合わせしてもよい。とりわけ、二つの個別データ93を重ねて表示することで、ユーザは二つの個別データ93の微妙な差を視覚的に見つけやすくなろう。   FIG. 20 shows another example of the individual data display unit 101. In this example, two individual data 93 are displayed vertically. FIG. 21 shows another example of the individual data display unit 101. In this example, two individual data 93 are displayed in an overlapping manner. For example, the CPU 31 may superimpose the two individual data 93 so that the extraction periods of the two individual data 93 overlap. The CPU 31 may align one individual data 93 with respect to the other individual data 93 so that the overlapping portion of the two individual data 93 increases. In particular, by displaying the two individual data 93 in an overlapping manner, the user can easily find a subtle difference between the two individual data 93 visually.

図20や図21においてもCPU31はバー102やフレーム103を二つの個別データ93に重ね、かつ、調整可能に表示してもよい。なお、バー102の調整量やフレーム103の調整量は、個別データ93ごとに適用されてもよいし、すべての個別データ93に対して共通に適用されてもよい。   20 and 21, the CPU 31 may superimpose the bar 102 and the frame 103 on the two individual data 93 and display them in an adjustable manner. It should be noted that the adjustment amount of the bar 102 and the adjustment amount of the frame 103 may be applied to each individual data 93 or may be applied to all the individual data 93 in common.

図17のS15でCPU31(調整部83)は操作部6を通じて調整実行の指示が入力されたかどうかを判定する。調整実行の指示が入力されていなければ、CPU31は、個別データ93の抽出処理を終了する。一方で、調整実行の指示が入力されると、CPU31は、S16に進む。   In S <b> 15 of FIG. 17, the CPU 31 (adjustment unit 83) determines whether an adjustment execution instruction has been input through the operation unit 6. If the adjustment execution instruction has not been input, the CPU 31 ends the individual data 93 extraction process. On the other hand, when an instruction to execute adjustment is input, the CPU 31 proceeds to S16.

S16でCPU31(調整部83)は操作部6を通じてユーザにより入力される抽出期間の調整を受け付ける。調整部83は、たとえば、図19に示したUI100を通じて基準時trや抽出期間の長さPの調整を受け付けてもよい。抽出期間の調整が終了すると、調整部83は抽出期間の調整結果を抽出部84に設定し、S12に戻る。S12で抽出部84は、調整された抽出期間にしたがって個別データ93を抽出する。その後、CPU31はS13からS15また、または、S16まで実行する。なお、基準時trの調整量は決定部82により決定された基準時trに対するオフセット量として保持されてもよい。同様に、長さPの調整量は決定部82により決定された長さPに対するオフセット量として保持されてもよい。S16では、基準時trの決定手法や長さPの決定手法が変更されてもよい。この場合、CPU31はS11に戻り、変更後の決定手法にしたがって抽出期間を再度決定し、抽出部84に設定する。CPU31は、プログラム作成支援装置2に個別データ93や時系列データ92を送信し、プログラム作成支援装置2から抽出期間の調整結果を受け付けてもよい。   In S <b> 16, the CPU 31 (adjustment unit 83) receives adjustment of the extraction period input by the user through the operation unit 6. For example, the adjustment unit 83 may accept adjustment of the reference time tr and the length P of the extraction period through the UI 100 illustrated in FIG. When the adjustment of the extraction period is completed, the adjustment unit 83 sets the adjustment result of the extraction period in the extraction unit 84, and returns to S12. In S12, the extraction unit 84 extracts the individual data 93 according to the adjusted extraction period. Thereafter, the CPU 31 executes S13 to S15 or S16. The adjustment amount of the reference time tr may be held as an offset amount with respect to the reference time tr determined by the determination unit 82. Similarly, the adjustment amount of the length P may be held as an offset amount with respect to the length P determined by the determination unit 82. In S16, the determination method of the reference time tr and the determination method of the length P may be changed. In this case, the CPU 31 returns to S11, determines the extraction period again according to the changed determination method, and sets the extraction period in the extraction unit 84. The CPU 31 may transmit the individual data 93 and the time series data 92 to the program creation support apparatus 2 and accept the adjustment result of the extraction period from the program creation support apparatus 2.

<シーケンス>
図22は個別データ93の送受信に関連したシーケンスを示している。この例では、PLC1のCPU31に収集部81、選択部87、決定部82、抽出部84、付与部85、送信部86が実装される。プログラム作成支援装置2のCPU21には個別データ93の表示制御部や調整部83が実装される。
・Sq1でプログラム作成支援装置2はユーザプログラムと設定情報を送信し、PLC1がこれを受信して記憶装置32に記憶する。
・Sq2でPLC1はユーザプログラムにしたがってデバイス値を求め、時系列データ92を収集し、個別データ93を抽出して、プログラム作成支援装置2に送信する。プログラム作成支援装置2は個別データ93を受信して表示部7に表示する。なお、プログラム作成支援装置2のCPU21や通信部23は、個別データをPLC1から受信する受信部として機能する。
・Sq3は、プログラム作成支援装置2が調整部83を実装している場合に実行される。プログラム作成支援装置2は抽出期間(基準時trや長さP、これらの決定手法など)の調整を受け付けて調整指示を作成し、PLC1に送信する。
・Sq4でPLC1は調整指示にしたがって抽出期間を調整し、時系列データ92から個別データ93を再度抽出して、プログラム作成支援装置2に送信する。プログラム作成支援装置2は個別データ93を受信して表示部7に表示する。
<Sequence>
FIG. 22 shows a sequence related to transmission / reception of the individual data 93. In this example, a collection unit 81, a selection unit 87, a determination unit 82, an extraction unit 84, a grant unit 85, and a transmission unit 86 are mounted on the CPU 31 of the PLC 1. A display control unit and an adjustment unit 83 for individual data 93 are mounted on the CPU 21 of the program creation support apparatus 2.
In Sq1, the program creation support apparatus 2 transmits the user program and setting information, and the PLC 1 receives this and stores it in the storage device 32.
In Sq2, the PLC 1 obtains a device value according to the user program, collects the time series data 92, extracts the individual data 93, and transmits it to the program creation support apparatus 2. The program creation support apparatus 2 receives the individual data 93 and displays it on the display unit 7. The CPU 21 and the communication unit 23 of the program creation support device 2 function as a receiving unit that receives individual data from the PLC 1.
Sq3 is executed when the program creation support apparatus 2 is equipped with the adjustment unit 83. The program creation support apparatus 2 accepts the adjustment of the extraction period (reference time tr, length P, and the determination method thereof), creates an adjustment instruction, and transmits it to the PLC 1.
In Sq4, the PLC 1 adjusts the extraction period according to the adjustment instruction, extracts the individual data 93 again from the time series data 92, and transmits it to the program creation support apparatus 2. The program creation support apparatus 2 receives the individual data 93 and displays it on the display unit 7.

図23は個別データ93の送受信に関連した別のシーケンスを示している。この例では、IPC11のCPU51に収集部81、選択部87、決定部82、抽出部84、付与部85および送信部86が実装される。プログラム作成支援装置2のCPU21には個別データ93の表示制御部や調整部83が実装される。
・Sq1でプログラム作成支援装置2はユーザプログラムと設定情報を送信し、PLC1がこれを受信して記憶装置32に記憶する。
・Sq11でPLC1はユーザプログラムにしたがってデバイス値を求める。IPC11はデバイス値をPLC1から読み出す(受信する)。
・Sq12でIPC11は収集したデバイス値から時系列データ92を作成する。IPC11は、時系列データ92から個別データ93を抽出し、プログラム作成支援装置2に個別データ93を送信する。プログラム作成支援装置2は個別データ93をIPC11から受信すると、表示部7に個別データ93を表示する。なお、プログラム作成支援装置2のCPU21や通信部23は、個別データをIPC11から受信する受信部として機能する。
・Sq13は、プログラム作成支援装置2が調整部83を実装している場合に実行される。プログラム作成支援装置2は抽出期間(基準時trや長さP、これらの決定手法など)の調整を受け付けて調整指示を作成し、IPC11に送信する。
・Sq14でIPC11は調整指示にしたがって抽出期間を調整し、時系列データ92から個別データ93を再度抽出して、プログラム作成支援装置2に送信する。プログラム作成支援装置2は個別データ93を受信して表示部7に表示する。
FIG. 23 shows another sequence related to transmission / reception of the individual data 93. In this example, a collection unit 81, a selection unit 87, a determination unit 82, an extraction unit 84, a grant unit 85, and a transmission unit 86 are mounted on the CPU 51 of the IPC 11. A display control unit and an adjustment unit 83 for individual data 93 are mounted on the CPU 21 of the program creation support apparatus 2.
In Sq1, the program creation support apparatus 2 transmits the user program and setting information, and the PLC 1 receives this and stores it in the storage device 32.
-In Sq11, PLC1 calculates a device value according to the user program. The IPC 11 reads (receives) the device value from the PLC 1.
In Sq12, the IPC 11 creates time series data 92 from the collected device values. The IPC 11 extracts the individual data 93 from the time series data 92 and transmits the individual data 93 to the program creation support apparatus 2. When receiving the individual data 93 from the IPC 11, the program creation support apparatus 2 displays the individual data 93 on the display unit 7. The CPU 21 and the communication unit 23 of the program creation support device 2 function as a receiving unit that receives individual data from the IPC 11.
Sq13 is executed when the program creation support apparatus 2 is equipped with the adjustment unit 83. The program creation support apparatus 2 accepts the adjustment of the extraction period (reference time tr, length P, and the determination method thereof), creates an adjustment instruction, and transmits it to the IPC 11.
In Sq14, the IPC 11 adjusts the extraction period according to the adjustment instruction, extracts the individual data 93 from the time series data 92 again, and transmits it to the program creation support apparatus 2. The program creation support apparatus 2 receives the individual data 93 and displays it on the display unit 7.

図24は個別データ93の送受信に関連したさらに別のシーケンスを示している。この例では、IPC11のCPU51に収集部81と選択部87が実装されている。クラウド12のCPU61に決定部82、抽出部84、付与部85、送信部86が実装される。プログラム作成支援装置2のCPU21には個別データ93の表示制御部や調整部83が実装される。
・Sq1でプログラム作成支援装置2はユーザプログラムと設定情報を送信し、PLC1がこれを受信して記憶装置32に記憶する。
・Sq11でPLC1はユーザプログラムにしたがってデバイス値を求める。IPC11はデバイス値をPLC1から読み出す(受信する)。
・Sq22でIPC11は収集したデバイス値から時系列データ92を作成し、クラウド12に時系列データ92を送信する。クラウド12はIPC11から時系列データ92を受信する。
・Sq23でからクラウド12は時系列データ92から個別データ93を抽出し、プログラム作成支援装置2に個別データ93を送信する。プログラム作成支援装置2はクラウド12から個別データ93を受信すると、表示部7に個別データ93を表示する。なお、プログラム作成支援装置2のCPU21や通信部23は、個別データをクラウド12から受信する受信部として機能する。同様の受信部がPLC1に設けられていてもよい。
・Sq24は、プログラム作成支援装置2が調整部83を実装している場合に実行される。プログラム作成支援装置2は抽出期間(基準時trや長さP、これらの決定手法など)の調整を受け付けて調整指示を作成し、クラウド12に送信する。
・Sq25でクラウド12は調整指示にしたがって抽出期間を調整し、時系列データ92から個別データ93を再度抽出して、プログラム作成支援装置2に送信する。プログラム作成支援装置2は個別データ93をクラウド12から受信して表示部7に表示する。
FIG. 24 shows still another sequence related to transmission / reception of the individual data 93. In this example, a collection unit 81 and a selection unit 87 are mounted on the CPU 51 of the IPC 11. A determination unit 82, an extraction unit 84, a grant unit 85, and a transmission unit 86 are mounted on the CPU 61 of the cloud 12. A display control unit and an adjustment unit 83 for individual data 93 are mounted on the CPU 21 of the program creation support apparatus 2.
In Sq1, the program creation support apparatus 2 transmits the user program and setting information, and the PLC 1 receives this and stores it in the storage device 32.
-In Sq11, PLC1 calculates a device value according to the user program. The IPC 11 reads (receives) the device value from the PLC 1.
In Sq22, the IPC 11 creates time series data 92 from the collected device values, and transmits the time series data 92 to the cloud 12. The cloud 12 receives the time series data 92 from the IPC 11.
From Sq23, the cloud 12 extracts the individual data 93 from the time-series data 92, and transmits the individual data 93 to the program creation support apparatus 2. When receiving the individual data 93 from the cloud 12, the program creation support apparatus 2 displays the individual data 93 on the display unit 7. The CPU 21 and the communication unit 23 of the program creation support device 2 function as a receiving unit that receives individual data from the cloud 12. A similar receiving unit may be provided in the PLC 1.
Sq24 is executed when the program creation support apparatus 2 is equipped with the adjustment unit 83. The program creation support apparatus 2 accepts the adjustment of the extraction period (reference time tr, length P, and the determination method thereof), creates an adjustment instruction, and transmits it to the cloud 12.
In Sq25, the cloud 12 adjusts the extraction period according to the adjustment instruction, extracts again the individual data 93 from the time series data 92, and transmits it to the program creation support apparatus 2. The program creation support apparatus 2 receives the individual data 93 from the cloud 12 and displays it on the display unit 7.

図25は個別データ93の送受信に関連したさらに別のシーケンスを示している。この例では、クラウド12のCPU61に収集部81、選択部87、決定部82、抽出部84、付与部85、送信部86が実装される。プログラム作成支援装置2のCPU21には個別データ93の表示制御部や調整部83が実装される。
・Sq1でプログラム作成支援装置2はユーザプログラムと設定情報を送信し、PLC1がこれを受信して記憶装置32に記憶する。
・Sq31でPLC1はユーザプログラムにしたがってデバイス値を求める。PLC1はクラウド12へデバイス値を送信する。クラウド12は収集したデバイス値から時系列データ92を作成する。その後、Sq23ないしSq25が実行される。
FIG. 25 shows still another sequence related to transmission / reception of the individual data 93. In this example, a collection unit 81, a selection unit 87, a determination unit 82, an extraction unit 84, a grant unit 85, and a transmission unit 86 are mounted on the CPU 61 of the cloud 12. A display control unit and an adjustment unit 83 for individual data 93 are mounted on the CPU 21 of the program creation support apparatus 2.
In Sq1, the program creation support apparatus 2 transmits the user program and setting information, and the PLC 1 receives this and stores it in the storage device 32.
In Sq31, the PLC 1 obtains a device value according to the user program. The PLC 1 transmits the device value to the cloud 12. The cloud 12 creates time series data 92 from the collected device values. Thereafter, Sq23 to Sq25 are executed.

図22ないし図24において個別データ93の表示制御部と調整部83がプログラム作成支援装置2に実装されているが、別のクライアントコンピュータに実装されてもよい。クライアントコンピュータの内部構成はプログラム作成支援装置2からプログラム作成支援機能を除いた内部構成と同じであってもよい。   22 to 24, the display control unit and the adjustment unit 83 for the individual data 93 are mounted on the program creation support apparatus 2, but may be mounted on another client computer. The internal configuration of the client computer may be the same as the internal configuration excluding the program creation support function from the program creation support device 2.

<表示結果>
図26は個別データ93の表示例を示している。プログラム作成支援装置2のCPU21(表示制御部)は複数の個別データ93を表示部7に表示する。この例では00:00:00から00:02:70までに取得されたデバイス値により第一の個別データ93が形成され、識別情報として"01"が付与されている。00:03:00から00:06:00までに取得されたデバイス値により第二の個別データ93が形成され、識別情報として"02"が付与されている。00:06:30から00:09:00までに取得されたデバイス値により第三の個別データ93が形成され、識別情報として"03"が付与されている。CPU21は各デバイス値と公差(閾値)とを比較し、公差を逸脱しているデバイス値を強調表示してもよい。また、CPU21は、通常のタイミングとは異なるタイミングに完了リレーが1となっているデバイス値を強調表示してもよい。
<Display result>
FIG. 26 shows a display example of the individual data 93. The CPU 21 (display control unit) of the program creation support apparatus 2 displays a plurality of individual data 93 on the display unit 7. In this example, the first individual data 93 is formed from the device values acquired from 00:00:00 to 00:02:70, and “01” is given as identification information. The second individual data 93 is formed by the device values acquired from 00:03:00 to 00:06:00, and “02” is given as identification information. The third individual data 93 is formed from the device values acquired from 00:06:30 to 00: 09: 0, and “03” is given as identification information. The CPU 21 may compare each device value with a tolerance (threshold value) and highlight a device value that deviates from the tolerance. Further, the CPU 21 may highlight a device value whose completion relay is 1 at a timing different from the normal timing.

図26に示した事例では第一の個別データ93における時刻00:01:50に取得されたデバイス値cがNGと判定されており、強調表示されている。ユーザは、時刻00:01:20に取得されたデバイス値aと、第二の個別データ93と第三の個別データ93における同位相(時刻00:04:20、00:07:20)のデバイス値aを比較する。時刻00:04:20に取得されたデバイス値aは5.9であり、ユーザは適正な値であると判断する。また、時刻00:07:20に取得されたデバイス値aは4.4であり、ユーザは適正な値であるが、NGである4.2に対するマージンはほとんどないと判断できる。これによりユーザはデバイス値aに関して何らかの対策が必要であると判断できる。   In the case shown in FIG. 26, the device value c acquired at time 00:01:50 in the first individual data 93 is determined to be NG and is highlighted. The user obtains the device value a acquired at time 00:01:20 and the device having the same phase (time 00:04:20, 00:07:20) in the second individual data 93 and the third individual data 93. Compare the values a. The device value a acquired at time 00:04:20 is 5.9, and the user determines that it is an appropriate value. The device value a acquired at time 00:07:20 is 4.4, which is an appropriate value for the user, but it can be determined that there is almost no margin for 4.2 that is NG. As a result, the user can determine that some countermeasure is necessary for the device value a.

<まとめ>
以上の実施例から導かれる技術思想について説明する。PLC1はユーザプログラムを繰り返し実行するプログラマブル・ロジック・コントローラの一例である。なお、PLC1はユーザプログラムにしたがって複数の部品に対する検査または加工を制御してもよい。部品はワークと呼ばれてもよく、完成品を含む用語である。記憶装置32はユーザプログラムを記憶するプログラム記憶部の一例である。記憶装置32はユーザプログラムにより指定可能であり、1ビットの情報を記憶するビットデバイスおよび1ワード又は数ワードの情報を記憶するワードデバイスを含む複数のデバイスを保持するデバイス記憶部の一例である。ラダー実行部80はプログラム記憶部に記憶されているユーザプログラムを繰り返し実行し、当該ユーザプログラムにしたがって複数のデバイスに記憶されている情報を演算処理するプログラム実行部の一例である。収集部81は少なくとも一つのデバイスに記憶されているデバイスデータを繰り返し収集することで、周期性を有する時系列デバイスデータを形成するデータ収集部の一例である。決定部82は時系列デバイスデータから周期ごとの個別データを抽出するための抽出期間を決定する決定部の一例である。抽出部84は決定部82により決定された各抽出期間における個別データを時系列デバイスデータから抽出する抽出部の一例である。付与部85は抽出部84により抽出された各個別データに対して各個別データを識別するための識別情報を付与する付与部の一例である。このように、本実施例によれば、時系列データから個別データを抽出することがユーザにとって容易になる。
<Summary>
The technical idea derived from the above embodiment will be described. The PLC 1 is an example of a programmable logic controller that repeatedly executes a user program. In addition, PLC1 may control the test | inspection or process with respect to several components according to a user program. A part may be called a workpiece and is a term including a finished product. The storage device 32 is an example of a program storage unit that stores a user program. The storage device 32 can be specified by a user program, and is an example of a device storage unit that holds a plurality of devices including a bit device that stores 1-bit information and a word device that stores information of one word or several words. The ladder execution unit 80 is an example of a program execution unit that repeatedly executes a user program stored in the program storage unit and performs arithmetic processing on information stored in a plurality of devices according to the user program. The collection unit 81 is an example of a data collection unit that forms time-series device data having periodicity by repeatedly collecting device data stored in at least one device. The determination unit 82 is an example of a determination unit that determines an extraction period for extracting individual data for each period from the time-series device data. The extraction unit 84 is an example of an extraction unit that extracts individual data in each extraction period determined by the determination unit 82 from time-series device data. The assigning unit 85 is an example of an assigning unit that assigns identification information for identifying each individual data to each individual data extracted by the extracting unit 84. Thus, according to the present embodiment, it becomes easy for the user to extract individual data from time-series data.

抽出期間の開始位置と終了位置は、個別データ93の抽出の基準位置を示す情報(例:基準時tr)と、抽出期間の時間的な長さ(例:長さP)を示す情報によって定義されてもよい。時系列デバイスデータは、収集部81が複数のデバイスからそれぞれ収集したデータを含むデータ群と、当該データを収集したタイミングを示すタイミング情報とを含んでもよい。図16などに示したように時系列データ92においてデバイスa〜dの各デバイス値はデータ群の一例である。取得時刻の情報はタイミング情報の一例である。   The start position and end position of the extraction period are defined by information indicating the extraction reference position of the individual data 93 (eg, reference time tr) and information indicating the time length of the extraction period (eg: length P). May be. The time-series device data may include a data group including data collected by the collection unit 81 from each of a plurality of devices, and timing information indicating the timing at which the data is collected. As shown in FIG. 16 and the like, each device value of the devices a to d in the time series data 92 is an example of a data group. The acquisition time information is an example of timing information.

決定部82は、複数のデバイスのうち少なくとも一つのデバイスから収集された時系列デバイスデータの周期に基づき、各抽出期間の基準位置を決定してもよい。数値入力ボックス105、部品に対するタクトタイムttの入力を受け付ける受付部の一例である。図9に示したように、決定部82は、複数のデバイスからそれぞれ収集されたデータの周期を求め、タクトタイムttに対して相対的に近い周期のデータに基づき各抽出期間の基準位置を決定してもよい。図10を用いて説明したように、決定部82は、時系列デバイスデータを微分して微分エッジを求め、当該求められた微分エッジの位置を抽出期間の基準位置に決定してもよい。メニュー104に関連して説明したように、決定部82は、基準位置を決定する複数の決定手法を有していてもよい。決定部82は、ユーザにより選択された決定手法を用いて基準位置を決定してもよい。   The determination unit 82 may determine the reference position of each extraction period based on the period of time-series device data collected from at least one device among the plurality of devices. It is an example of a reception unit that receives an input of a numerical input box 105 and a tact time tt for a part. As illustrated in FIG. 9, the determination unit 82 determines the period of data collected from each of a plurality of devices, and determines the reference position of each extraction period based on data having a period relatively close to the tact time tt. May be. As described with reference to FIG. 10, the determination unit 82 may differentiate the time-series device data to obtain a differential edge, and may determine the position of the obtained differential edge as the reference position of the extraction period. As described in relation to the menu 104, the determination unit 82 may have a plurality of determination methods for determining the reference position. The determination unit 82 may determine the reference position using a determination method selected by the user.

決定部82は時系列デバイスデータをフーリエ変換または自己回帰モデルにより複数のスペクトルを取得し、当該複数のスペクトルのうち相対的に大きなスペクトルの周波数の逆数を抽出期間の時間的な長さに決定してもよい。部品などのワークは一定の周期で生産または検査される。そのため、時系列データは周期性を有する。よって、FFTやARモデルを用いることで比較的に正確に抽出期間の時間的な長さPが特定されよう。図11を用いて説明したように、決定部82は時系列デバイスデータにおける波形の類似性に基づき抽出期間の時間的な長さPを決定してもよい。決定部82は、抽出期間の時間的な長さPを決定する複数の決定手法を有しており、ユーザにより選択された決定手法を用いて抽出期間の時間的な長さPを決定してもよい。ユーザはより適切と考える決定方法を選択しやすくなろう。たとえば、決定部82はFFTにより決定手法、ARモデルに基づく決定手法、形状類似性に基づく決定手法などからユーザにより選択された決定手法を採用してもよい。決定手法を選択するためのメニューがUI100に追加されてもよい。   The determination unit 82 acquires a plurality of spectra from the time series device data by Fourier transform or autoregressive model, and determines the reciprocal of the relatively large spectrum frequency among the plurality of spectra as the time length of the extraction period. May be. Workpieces such as parts are produced or inspected at regular intervals. Therefore, time series data has periodicity. Therefore, the time length P of the extraction period will be specified relatively accurately by using the FFT or AR model. As described with reference to FIG. 11, the determination unit 82 may determine the time length P of the extraction period based on the similarity of waveforms in the time-series device data. The determination unit 82 has a plurality of determination methods for determining the temporal length P of the extraction period, and determines the temporal length P of the extraction period using the determination method selected by the user. Also good. It will be easier for the user to select a decision method that he considers more appropriate. For example, the determination unit 82 may employ a determination method selected by the user from a determination method based on FFT, a determination method based on an AR model, a determination method based on shape similarity, or the like. A menu for selecting a determination method may be added to the UI 100.

記憶装置32はユーザプログラムを管理するためのプロジェクト情報(設定情報)を記憶していてもよい。収集部81は、プロジェクト情報に基づきデバイスデータを収集される複数のデバイスを選択し、当該選択された複数のデバイスのそれぞれからデバイスデータを収集してもよい。たとえば、プロジェクト情報にはユーザにより登録されたデバック用のデバイスを指定する情報が含まれていてもよい。収集部81や選択部87は、デバック用のデバイスを指定する情報に基づきデバイスデータを収集される複数のデバイスを選択し、当該選択された複数のデバイスのそれぞれからデバイスデータを収集してもよい。これにより、収集対象のデバイスを指定するためのユーザの負担が軽減されよう。   The storage device 32 may store project information (setting information) for managing user programs. The collection unit 81 may select a plurality of devices from which device data is collected based on the project information, and collect device data from each of the selected plurality of devices. For example, the project information may include information for designating a debugging device registered by the user. The collection unit 81 and the selection unit 87 may select a plurality of devices from which device data is collected based on information for specifying a device for debugging, and collect device data from each of the selected plurality of devices. . This will reduce the burden on the user to specify the device to be collected.

プロジェクト情報にはユーザにより登録された表示対象のデバイスを指定する情報が含まれていてもよい。収集部81や選択部87は、表示対象のデバイスを指定する情報に基づきデバイスデータを収集される複数のデバイスを選択し、当該選択された複数のデバイスのそれぞれからデバイスデータを収集してもよい。   The project information may include information specifying a display target device registered by the user. The collection unit 81 and the selection unit 87 may select a plurality of devices from which device data is collected based on information designating a display target device, and collect device data from each of the selected plurality of devices. .

図19などに示したように、調整部83は、決定部82により決定された抽出期間をユーザの操作に基づき調整する調整部の一例である。決定部82により決定された抽出期間に誤差があると、ワークごとの個別データを正確に抽出することが困難となる。したがって、ユーザに抽出期間の調整する機会を付与することで、より正確に個別データが抽出されるようになろう。図19に示したように、プログラム作成支援装置2の表示部7は、時系列デバイスデータまたは個別データ93と抽出期間とを表示する表示部の一例である。調整部83は、表示部7に表示された抽出期間に対するユーザの操作を受け付けてもよい。ユーザは個別データ93などを目で見て確認しながら、抽出期間を正しく調整できるであろう。   As illustrated in FIG. 19 and the like, the adjustment unit 83 is an example of an adjustment unit that adjusts the extraction period determined by the determination unit 82 based on a user operation. If there is an error in the extraction period determined by the determination unit 82, it is difficult to accurately extract individual data for each workpiece. Therefore, by giving the user an opportunity to adjust the extraction period, individual data will be extracted more accurately. As shown in FIG. 19, the display unit 7 of the program creation support apparatus 2 is an example of a display unit that displays time-series device data or individual data 93 and an extraction period. The adjustment unit 83 may accept a user operation for the extraction period displayed on the display unit 7. The user will be able to adjust the extraction period correctly while visually checking the individual data 93 and the like.

図19や図20に示したように、表示部7は、第一デバイスから収集された時系列デバイスデータの波形と、第二デバイスから収集された時系列デバイスデータの波形とを共通の時間軸上において並べて表示してもよい。図21に示したように、表示部7は、第一デバイスから収集された時系列デバイスデータの波形と、第二デバイスから収集された時系列デバイスデータの波形とを共通の時間軸上において重ねて表示してもよい。これによりワークごとの個別データの違いをユーザは見つけやすくなろう。なお、表示部7は、PLC1に接続され、ユーザによるユーザプログラムの作成を支援するプログラム作成支援装置2に設けられていてもよい。   As shown in FIG. 19 and FIG. 20, the display unit 7 uses a common time axis for the waveform of the time-series device data collected from the first device and the waveform of the time-series device data collected from the second device. They may be displayed side by side above. As shown in FIG. 21, the display unit 7 superimposes the waveform of the time series device data collected from the first device and the waveform of the time series device data collected from the second device on a common time axis. May be displayed. This will make it easier for users to find differences in individual data for each workpiece. The display unit 7 may be provided in the program creation support apparatus 2 that is connected to the PLC 1 and supports the creation of a user program by the user.

送信部86は、時系列データ92や識別情報を付与された個別データ93をクラウド12に送信する送信部の一例である。これにより、クラウド12は時系列データ92から個別データを抽出してもよいし、個別データ93をさらに詳細に分析してもよい。たとえば、クラウド12のCPU61は、複数の個別データ93を比較したり、NGデータを含む個別データ93を特定したりしてもよい。NGはno goodの略称である。   The transmission unit 86 is an example of a transmission unit that transmits time-series data 92 and individual data 93 to which identification information is assigned to the cloud 12. Thereby, the cloud 12 may extract individual data from the time-series data 92 or may analyze the individual data 93 in more detail. For example, the CPU 61 of the cloud 12 may compare a plurality of individual data 93 or specify the individual data 93 including NG data. NG is an abbreviation for no good.

IPC11やクラウド12は、複数の部品に対する検査または加工を制御するプログラマブル・ロジック・コントローラに接続されたデータ収集装置の一例である。図23ないし図25を用いて説明したように、IPC11やクラウド12は、収集部81、決定部82、抽出部84、付与部85を適宜に有する。   The IPC 11 and the cloud 12 are an example of a data collection device connected to a programmable logic controller that controls inspection or processing for a plurality of parts. As described with reference to FIGS. 23 to 25, the IPC 11 and the cloud 12 appropriately include a collection unit 81, a determination unit 82, an extraction unit 84, and a grant unit 85.

図12においてタクトタイムttは時間を単位とするデータであるが、単位時間あたりに処理される部品の数に置換されてもよい。また、タクトタイムttに代えて、一つのワークの検査に必要となる検査時間やワークの到着周期が採用されてもよい。   In FIG. 12, the tact time tt is data in units of time, but may be replaced with the number of parts processed per unit time. Further, instead of the tact time tt, an inspection time required for inspection of one workpiece or an arrival cycle of the workpiece may be employed.

抽出部84は、個別データ93からさらに所定期間のサブデータを抽出してもよい。所定期間は抽出期間よりも短い時間である。たとえば、ユーザが要求リレーの立ち上がり前後のデバイス値を確認することを希望すると、抽出部84は、要求リレーの立ち上がり前後の所定期間にわたるサブデータを抽出してもよい。なお、個別データ93とサブデータとは同時に表示されてもよい。サブデータはもともと個別データ93の一部分である。そのため、個別データ93の抽出期間を示すフレーム103に加え、サブデータの部分を囲むようなフレームが表示されてもよい。デバイス値の波形における面積(たとえば、上凸となっている領域の面積など)をユーザが確認したいと希望する場合、抽出部84は、この面積に相当するサブデータを個別データ93から抽出してもよい。このサブデータにもフレームが表示されてもよい。   The extraction unit 84 may further extract sub-data for a predetermined period from the individual data 93. The predetermined period is shorter than the extraction period. For example, if the user desires to check the device values before and after the rising of the request relay, the extraction unit 84 may extract sub-data over a predetermined period before and after the rising of the request relay. The individual data 93 and the sub data may be displayed at the same time. The sub data is originally a part of the individual data 93. Therefore, in addition to the frame 103 indicating the extraction period of the individual data 93, a frame surrounding the sub data portion may be displayed. When the user wishes to confirm the area in the waveform of the device value (for example, the area of the upwardly convex region), the extraction unit 84 extracts the sub data corresponding to this area from the individual data 93. Also good. A frame may also be displayed in this sub data.

CPU31、51はそれぞれ識別情報を付与された複数の個別データ93から形成されたデータファイルを記憶装置32、52に記憶させてもよい。たとえば、CSV形式やSQL形式のデータファイルが作成されてもよい。CPU31、51の送信部86はデータファイルをクラウド12へ転送する。なお、CSV形式やSQL形式は一例にすぎず、クラウド12が要求する形式が採用されればよい。また、個別データ93は、データファイルの形式で記憶されるのではなく、時系列データ92の一部として記憶装置32、52に記憶されてもよい。すなわち、「個別データ93を時系列データ92から抽出する」とは、時系列データ92から個別データ93を切り出し又はコピーすることにより、時系列データ92から分離されたデータとして抽出することは勿論、時系列データ92中で個別データ93に相当する部分を特定することをも含む。この場合、個別データ93は、時系列データ92から分離されず、時系列データ92の一部として記憶装置32、52に記憶される。   The CPUs 31 and 51 may cause the storage devices 32 and 52 to store data files formed from a plurality of individual data 93 to which identification information is assigned. For example, a data file in CSV format or SQL format may be created. The transmission unit 86 of the CPUs 31 and 51 transfers the data file to the cloud 12. The CSV format and the SQL format are merely examples, and the format requested by the cloud 12 may be adopted. Further, the individual data 93 may be stored in the storage devices 32 and 52 as a part of the time-series data 92 instead of being stored in a data file format. That is, “extracting the individual data 93 from the time-series data 92” means that the individual data 93 is extracted from the time-series data 92 by extracting or copying the individual data 93 from the time-series data 92. It also includes specifying a portion corresponding to the individual data 93 in the time series data 92. In this case, the individual data 93 is not separated from the time series data 92 but is stored in the storage devices 32 and 52 as a part of the time series data 92.

Claims (21)

ユーザプログラムを繰り返し実行するプログラマブル・ロジック・コントローラであって、
前記ユーザプログラムを記憶するプログラム記憶部と、
前記ユーザプログラムにより指定可能であり、1ビットの情報を記憶するビットデバイスおよび1ワード又は数ワードの情報を記憶するワードデバイスを含む複数のデバイスを保持するデバイス記憶部と、
前記プログラム記憶部に記憶されているユーザプログラムを繰り返し実行し、当該ユーザプログラムにしたがって前記複数のデバイスに記憶されている情報を演算処理するプログラム実行部と、
少なくとも一つのデバイスに記憶されているデバイスデータを繰り返し収集することで、周期性を有する時系列デバイスデータを形成するデータ収集部と、
前記時系列デバイスデータから周期ごとの個別データを抽出するための抽出期間を決定する決定部と、
前記決定部により決定された各抽出期間における個別データを前記時系列デバイスデータから抽出する抽出部と、
前記抽出部により抽出された各個別データに対して各個別データを識別するための識別情報を付与する付与部と
を有するプログラマブル・ロジック・コントローラ。
A programmable logic controller that repeatedly executes a user program,
A program storage unit for storing the user program;
A device storage unit that can be specified by the user program and holds a plurality of devices including a bit device that stores 1-bit information and a word device that stores information of one word or several words;
A program execution unit that repeatedly executes a user program stored in the program storage unit and performs arithmetic processing on information stored in the plurality of devices according to the user program;
A data collection unit that forms time-series device data having periodicity by repeatedly collecting device data stored in at least one device;
A determination unit for determining an extraction period for extracting individual data for each period from the time-series device data;
An extraction unit for extracting individual data in each extraction period determined by the determination unit from the time-series device data;
A programmable logic controller comprising: an assigning unit that assigns identification information for identifying each individual data to each individual data extracted by the extracting unit.
前記抽出期間の開始位置と終了位置は、前記個別データの抽出の基準位置を示す情報と、前記抽出期間の時間的な長さを示す情報によって定義されていることを特徴とする請求項1に記載のプログラマブル・ロジック・コントローラ。   The start position and the end position of the extraction period are defined by information indicating a reference position for extraction of the individual data and information indicating a time length of the extraction period. Programmable logic controller as described. 前記時系列デバイスデータは、前記データ収集部が複数のデバイスからそれぞれ収集したデータを含むデータ群と、当該データを収集したタイミングを示すタイミング情報とを含むことを特徴とする請求項2に記載のプログラマブル・ロジック・コントローラ。   The time-series device data includes a data group including data collected from a plurality of devices by the data collection unit, and timing information indicating a timing at which the data is collected. Programmable logic controller. 前記決定部は、前記複数のデバイスのうち少なくとも一つのデバイスから収集された時系列デバイスデータの周期に基づき、各抽出期間の基準位置を決定することを特徴とする請求項3に記載のプログラマブル・ロジック・コントローラ。   The programmable unit according to claim 3, wherein the determination unit determines a reference position of each extraction period based on a period of time-series device data collected from at least one of the plurality of devices. Logic controller. 部品に対するタクトタイムの入力を受け付ける受付部をさらに有し、
前記決定部は、複数のデバイスからそれぞれ収集されたデータの周期を求め、前記タクトタイムに対して相対的に近い周期のデータに基づき各抽出期間の基準位置を決定することを特徴とする請求項4に記載のプログラマブル・ロジック・コントローラ。
It further has a reception unit that accepts an input of tact time for the part,
The determination unit obtains a period of data collected from each of a plurality of devices, and determines a reference position of each extraction period based on data of a period relatively close to the tact time. 4. The programmable logic controller according to 4.
前記決定部は、前記時系列デバイスデータを微分して微分エッジを求め、当該求められた微分エッジの位置を前記抽出期間の基準位置に決定することを特徴とする請求項4に記載のプログラマブル・ロジック・コントローラ。   The programmable unit according to claim 4, wherein the determination unit differentiates the time-series device data to obtain a differential edge, and determines the position of the obtained differential edge as a reference position of the extraction period. Logic controller. 前記決定部は、前記基準位置を決定する複数の決定手法を有しており、ユーザにより選択された決定手法を用いて前記基準位置を決定することを特徴とする請求項2ないし6のいずれか一項に記載のプログラマブル・ロジック・コントローラ。   The determination unit includes a plurality of determination methods for determining the reference position, and determines the reference position using a determination method selected by a user. The programmable logic controller according to one item. 前記決定部は前記時系列デバイスデータをフーリエ変換または自己回帰モデルにより複数のスペクトルを取得し、当該複数のスペクトルのうち相対的に大きなスペクトルの周波数の逆数を前記抽出期間の時間的な長さに決定することを特徴とする請求項2ないし7のいずれか一項に記載のプログラマブル・ロジック・コントローラ。   The determination unit obtains a plurality of spectra by Fourier transform or autoregressive model from the time series device data, and sets the reciprocal of the relatively large spectrum frequency among the plurality of spectra to the time length of the extraction period. 8. The programmable logic controller according to claim 2, wherein the programmable logic controller is determined. 前記決定部は前記時系列デバイスデータにおける波形の類似性に基づき前記抽出期間の時間的な長さを決定することを特徴とする請求項2ないし7いずれか一項に記載のプログラマブル・ロジック・コントローラ。   The programmable logic controller according to any one of claims 2 to 7, wherein the determination unit determines a time length of the extraction period based on a similarity of waveforms in the time-series device data. . 前記決定部は、前記抽出期間の時間的な長さを決定する複数の決定手法を有しており、ユーザにより選択された決定手法を用いて前記抽出期間の時間的な長さを決定することを特徴とする請求項8または9に記載のプログラマブル・ロジック・コントローラ。   The determination unit has a plurality of determination methods for determining a temporal length of the extraction period, and determines a temporal length of the extraction period using a determination method selected by a user. A programmable logic controller according to claim 8 or 9. 前記プログラム記憶部は前記ユーザプログラムを管理するためのプロジェクト情報を記憶しており、
前記データ収集部は、前記プロジェクト情報に基づきデバイスデータを収集される複数のデバイスを選択し、当該選択された複数のデバイスのそれぞれからデバイスデータを収集することを特徴とする請求項1ないし10のいずれか一項に記載のプログラマブル・ロジック・コントローラ。
The program storage unit stores project information for managing the user program,
The data collection unit selects a plurality of devices from which device data is collected based on the project information, and collects device data from each of the selected plurality of devices. The programmable logic controller according to any one of the above.
前記プロジェクト情報にはユーザにより登録されたデバック用のデバイスを指定する情報が含まれており、
前記データ収集部は、前記デバック用のデバイスを指定する情報に基づきデバイスデータを収集される複数のデバイスを選択し、当該選択された複数のデバイスのそれぞれからデバイスデータを収集することを特徴とする請求項11に記載のプログラマブル・ロジック・コントローラ。
The project information includes information for specifying a debugging device registered by the user,
The data collection unit selects a plurality of devices from which device data is collected based on information designating the device for debugging, and collects device data from each of the selected plurality of devices. The programmable logic controller of claim 11.
前記プロジェクト情報にはユーザにより登録された表示対象のデバイスを指定する情報が含まれており、
前記データ収集部は、前記表示対象のデバイスを指定する情報に基づきデバイスデータを収集される複数のデバイスを選択し、当該選択された複数のデバイスのそれぞれからデバイスデータを収集することを特徴とする請求項11に記載のプログラマブル・ロジック・コントローラ。
The project information includes information specifying a display target device registered by the user,
The data collection unit selects a plurality of devices from which device data is collected based on information designating the display target device, and collects device data from each of the selected plurality of devices. The programmable logic controller of claim 11.
前記決定部により決定された抽出期間をユーザの操作に基づき調整する調整部をさらに有することを特徴とする請求項1ないし13のいずれか一項に記載のプログラマブル・ロジック・コントローラ。   The programmable logic controller according to claim 1, further comprising an adjustment unit that adjusts the extraction period determined by the determination unit based on a user operation. 前記時系列デバイスデータと前記抽出期間とを表示する表示部をさらに有しているか、または接続されており、
前記調整部は、前記表示部に表示された前記抽出期間に対するユーザの操作を受け付けることを特徴とする請求項14に記載のプログラマブル・ロジック・コントローラ。
It further has or is connected to a display unit that displays the time series device data and the extraction period,
The programmable logic controller according to claim 14, wherein the adjustment unit receives a user operation for the extraction period displayed on the display unit.
前記表示部は、第一デバイスから収集された時系列デバイスデータの波形と、第二デバイスから収集された時系列デバイスデータの波形とを共通の時間軸上において並べて表示することを特徴とする請求項15に記載のプログラマブル・ロジック・コントローラ。   The display unit displays the waveform of the time-series device data collected from the first device and the waveform of the time-series device data collected from the second device side by side on a common time axis. Item 16. A programmable logic controller according to Item 15. 前記表示部は、第一デバイスから収集された時系列デバイスデータの波形と、第二デバイスから収集された時系列デバイスデータの波形とを共通の時間軸上において重ねて表示することを特徴とする請求項15に記載のプログラマブル・ロジック・コントローラ。   The display unit displays the waveform of the time-series device data collected from the first device and the waveform of the time-series device data collected from the second device so as to overlap each other on a common time axis. The programmable logic controller of claim 15. 前記表示部は、前記プログラマブル・ロジック・コントローラに接続され、ユーザによる前記ユーザプログラムの作成を支援するプログラム作成支援装置に設けられていることを特徴とする請求項15ないし17のいずれか一項に記載のプログラマブル・ロジック・コントローラ。   The said display part is connected to the said programmable logic controller, and is provided in the program creation assistance apparatus which assists creation of the said user program by a user, The Claim 15 thru | or 17 characterized by the above-mentioned. Programmable logic controller as described. 前記識別情報を付与された個別データをクラウドに送信する送信部及び該個別データをクラウドから受信する受信部をさらに有することを特徴とする請求項1ないし18のいずれか一項に記載のプログラマブル・ロジック・コントローラ。   The programmable unit according to any one of claims 1 to 18, further comprising: a transmission unit that transmits the individual data to which the identification information is assigned to the cloud; and a reception unit that receives the individual data from the cloud. Logic controller. ユーザプログラムを繰り返し実行するプログラマブル・ロジック・コントローラに接続されたデータ収集装置であって、
前記プログラマブル・ロジック・コントローラは、
ユーザプログラムを記憶するプログラム記憶部と、
前記ユーザプログラムにより指定可能であり、1ビットの情報を記憶するビットデバイスおよび1ワード又は数ワードの情報を記憶するワードデバイスを含む複数のデバイスを保持するデバイス記憶部と、
前記プログラム記憶部に記憶されているユーザプログラムを繰り返し実行し、当該ユーザプログラムにしたがって前記複数のデバイスに記憶されている情報を演算処理するプログラム実行部と、を有し、
前記データ収集装置は、
少なくとも一つのデバイスに記憶されているデバイスデータを繰り返し収集することで、周期性を有する時系列デバイスデータを形成するデータ収集部と、
前記時系列デバイスデータから周期ごとの個別データを抽出するための抽出期間を決定する決定部と、
前記決定部により決定された各抽出期間における個別データを前記時系列デバイスデータから抽出する抽出部と、
前記抽出部により抽出された各個別データに対して各個別データを識別するための識別情報を付与する付与部と
を有するデータ収集装置。
A data collection device connected to a programmable logic controller that repeatedly executes a user program,
The programmable logic controller is
A program storage unit for storing a user program;
A device storage unit that can be specified by the user program and holds a plurality of devices including a bit device that stores 1-bit information and a word device that stores information of one word or several words;
A program execution unit that repeatedly executes a user program stored in the program storage unit and performs arithmetic processing on information stored in the plurality of devices according to the user program;
The data collection device includes:
A data collection unit that forms time-series device data having periodicity by repeatedly collecting device data stored in at least one device;
A determination unit for determining an extraction period for extracting individual data for each period from the time-series device data;
An extraction unit for extracting individual data in each extraction period determined by the determination unit from the time-series device data;
A data collection apparatus comprising: an assigning unit that assigns identification information for identifying each individual data to each individual data extracted by the extraction unit.
前記データ収集装置は、クラウドを構成するサーバであることを特徴とする請求項20に記載のデータ収集装置。   The data collection apparatus according to claim 20, wherein the data collection apparatus is a server that constitutes a cloud.
JP2017135375A 2017-07-11 2017-07-11 Programmable logic controller, programmable logic controller system and data acquisition device Active JP6996886B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017135375A JP6996886B2 (en) 2017-07-11 2017-07-11 Programmable logic controller, programmable logic controller system and data acquisition device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017135375A JP6996886B2 (en) 2017-07-11 2017-07-11 Programmable logic controller, programmable logic controller system and data acquisition device

Publications (2)

Publication Number Publication Date
JP2019016325A true JP2019016325A (en) 2019-01-31
JP6996886B2 JP6996886B2 (en) 2022-01-17

Family

ID=65356935

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017135375A Active JP6996886B2 (en) 2017-07-11 2017-07-11 Programmable logic controller, programmable logic controller system and data acquisition device

Country Status (1)

Country Link
JP (1) JP6996886B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021033729A (en) * 2019-08-27 2021-03-01 株式会社日立製作所 Information processing system, information processing method, and information processing program
US11971696B2 (en) 2021-04-01 2024-04-30 Keyence Corporation Programmable logic controller

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0756961A (en) * 1993-08-16 1995-03-03 Mitsubishi Electric Corp Process monitoring device
JP2000235412A (en) * 1999-02-15 2000-08-29 Omron Corp Logging device
JP2005115426A (en) * 2003-10-02 2005-04-28 Omron Corp Anomaly recovery support apparatus and anomaly recovery support system
JP2008287559A (en) * 2007-05-18 2008-11-27 Keyence Corp Plc operation display system
JP2010250382A (en) * 2009-04-10 2010-11-04 Omron Corp Operation information output device, method for controlling the same, and control program
JP2010250381A (en) * 2009-04-10 2010-11-04 Omron Corp Energy monitoring device, control method thereof, and energy monitoring program
JP2013218497A (en) * 2012-04-06 2013-10-24 Toshiba Corp Plant data storage device, plant data storage method and plant data storage program
JP2016143169A (en) * 2015-01-30 2016-08-08 株式会社キーエンス Device monitoring apparatus and device monitoring method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0756961A (en) * 1993-08-16 1995-03-03 Mitsubishi Electric Corp Process monitoring device
JP2000235412A (en) * 1999-02-15 2000-08-29 Omron Corp Logging device
JP2005115426A (en) * 2003-10-02 2005-04-28 Omron Corp Anomaly recovery support apparatus and anomaly recovery support system
JP2008287559A (en) * 2007-05-18 2008-11-27 Keyence Corp Plc operation display system
JP2010250382A (en) * 2009-04-10 2010-11-04 Omron Corp Operation information output device, method for controlling the same, and control program
JP2010250381A (en) * 2009-04-10 2010-11-04 Omron Corp Energy monitoring device, control method thereof, and energy monitoring program
JP2013218497A (en) * 2012-04-06 2013-10-24 Toshiba Corp Plant data storage device, plant data storage method and plant data storage program
JP2016143169A (en) * 2015-01-30 2016-08-08 株式会社キーエンス Device monitoring apparatus and device monitoring method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021033729A (en) * 2019-08-27 2021-03-01 株式会社日立製作所 Information processing system, information processing method, and information processing program
US11971696B2 (en) 2021-04-01 2024-04-30 Keyence Corporation Programmable logic controller

Also Published As

Publication number Publication date
JP6996886B2 (en) 2022-01-17

Similar Documents

Publication Publication Date Title
JP6996888B2 (en) Programmable logic controller, data acquisition device and programming support device
US10319087B2 (en) Control system, control device, image processing device, and control method
EP3361330B1 (en) Event analyzing device, event analyzing system, event analyzing method, event analyzing program, and non-transitory computer readable storage medium
JP6493506B1 (en) INDUSTRIAL CONTROL SYSTEM, ITS SUPPORT DEVICE, CONTROL SUPPORT METHOD AND PROGRAM
US10838938B2 (en) Process monitorer, process monitering system, process monitering method, process monitering program, and recording mediam
CN110036372B (en) Data processing device, data processing method, setting management device, and data processing system
EP3422214B1 (en) Control system, coupling method, and computer program
JP7450471B2 (en) Programmable logic controller and PLC system
CN107370823B (en) Data acquisition and remote control method, device and computer readable storage medium
CN107944005B (en) Data display method and device
JP2018084894A (en) Control system and control apparatus
JP2016012172A (en) Communication system, programmable display, information processing device, operation control method, information processing method, and program
JP6996886B2 (en) Programmable logic controller, programmable logic controller system and data acquisition device
JP2018133037A (en) Control device
JP6996887B2 (en) Programmable logic controller system and data acquisition device
KR101566358B1 (en) System and method of alarming uncommon state of automatic process
JP2020123230A (en) Trace data acquisition system, trace data acquisition method, and program
CN110073302B (en) Information processing apparatus, control method for information processing apparatus, and storage medium
JP2019159868A (en) Control system, controller and display device
EP4071570A1 (en) Prediction system, information processing device, and information processing program
WO2020166432A1 (en) Control device, control program, and control system
US20220317650A1 (en) Analysis apparatus, control method thereof, and analysis system
EP4254104A1 (en) Device and program for collecting data
US20240095589A1 (en) Information processing device, information processing program, and information processing method
EP4254108A1 (en) Operating assistance system and operating assistance method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200326

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20210113

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210301

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210226

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210422

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210625

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210820

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: 20211129

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211216

R150 Certificate of patent or registration of utility model

Ref document number: 6996886

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150