JP7356778B2 - Program creation support device for programmable logic controllers - Google Patents

Program creation support device for programmable logic controllers Download PDF

Info

Publication number
JP7356778B2
JP7356778B2 JP2019023078A JP2019023078A JP7356778B2 JP 7356778 B2 JP7356778 B2 JP 7356778B2 JP 2019023078 A JP2019023078 A JP 2019023078A JP 2019023078 A JP2019023078 A JP 2019023078A JP 7356778 B2 JP7356778 B2 JP 7356778B2
Authority
JP
Japan
Prior art keywords
unit
data
project
program
programmable logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019023078A
Other languages
Japanese (ja)
Other versions
JP2020134987A (en
Inventor
真人 藤村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP2019023078A priority Critical patent/JP7356778B2/en
Publication of JP2020134987A publication Critical patent/JP2020134987A/en
Application granted granted Critical
Publication of JP7356778B2 publication Critical patent/JP7356778B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Programmable Controllers (AREA)

Description

本発明は、プログラマブルロジックコントローラ用プログラム作成支援装置に関する。 The present invention relates to a program creation support device for a programmable logic controller.

プログラマブルロジックコントローラ(Programmable Logic Controller:以下、「PLC」という。)はファクトリーオートメーション(Factory Automation:FA)において製造機器や搬送装置、検査装置を制御するコントローラである。PLCはユーザによって作成されるラダープログラム等のユーザープログラムを実行することで様々な拡張ユニットや被制御機器を制御する。ユーザープログラムを実際にPLC上で実行してみて、ユーザープログラムの作成時には想定していなかった事象が見つかり、ユーザープログラムの修正が必要となることがある。ユーザは修正箇所を特定するためにユーザープログラムを見直すだけでなく、PLCが生成したログデータを参照する。ログデータにはユーザープログラムを実行しているときに収集されたデバイスの値(デバイス値)が記憶される。PLCの分野においてデバイスとは情報を記憶する記憶領域を意味する。デバイスとしては、一ビットの情報を保持するリレーデバイスや一ワードの情報を保持するワードデバイス等がある。 A programmable logic controller (hereinafter referred to as "PLC") is a controller that controls manufacturing equipment, transport equipment, and inspection equipment in factory automation (FA). The PLC controls various expansion units and controlled devices by executing user programs such as ladder programs created by the user. When a user program is actually executed on a PLC, a phenomenon that was not anticipated when the user program was created may be discovered, and the user program may need to be modified. The user not only reviews the user program to identify correction points, but also refers to the log data generated by the PLC. Log data stores device values (device values) collected while a user program is running. In the field of PLC, a device means a storage area that stores information. Devices include relay devices that hold one bit of information, word devices that hold one word of information, and the like.

FAの分野でシーケンス制御を行うため、PLC用のプログラムを、プログラム編集用のアプリケーションプログラムを設計する。設計者は、プログラムを設計した後、このプログラムのシーケンス動作をシミュレーションし、シミュレーションの結果を検証しながらプログラムをデバッグして、完成したプログラムをPLCに転送し、実行させる。しかしながら、必ずしも想定したとおりの動作が実現されるとは限らず、実運用を踏まえて、プログラムを再度デバッグするなど、編集することが行われる。特に実運用時に、想定どおりの動作が実現できていない場合は、その原因がどこにあるのか、トラブルの元となった事象の特定が重要となる。例えば、必ずしもプログラムの設計とは別の原因で、動作が止まっていることもある(一例として、想定しないワークがライン上に流れていることが原因で制御が停止している場合など)。 In order to perform sequence control in the FA field, we design programs for PLC and application programs for program editing. After designing a program, the designer simulates the sequence operation of the program, debugs the program while verifying the simulation results, and transfers the completed program to the PLC for execution. However, it is not always possible to realize the expected operation, and the program must be edited, such as debugging it again, based on actual operation. In particular, if the expected behavior is not achieved during actual operation, it is important to identify the cause and the event that caused the problem. For example, operations may be stopped for reasons other than the program design (for example, control may be stopped due to unexpected work flowing on the line).

そこで本出願人は先に、予め記録したデバイス値を用いてラダープログラムを再生する技術を開発した(特許文献1参照)。これによれば、シミュレーション時又は実制御時のシーケンス制御状態のモニタ用に表示しているスイッチ,バルブ,センサ等のデバイスの状態の経時変化を記録再生することにより、簡単な指示操作で経時変化を再生表示でき、またプログラムを、デバイスの状態の経時変化と共に表示することにより、プログラムとデバイスの状態の経時変化との対応付けが容易となる。 Therefore, the present applicant has previously developed a technique for reproducing a ladder program using device values recorded in advance (see Patent Document 1). According to this, by recording and reproducing changes over time in the states of devices such as switches, valves, and sensors that are displayed for monitoring sequence control states during simulation or actual control, changes over time can be changed with simple instruction operations. By displaying the program along with the change in the state of the device over time, it becomes easy to associate the program with the change in the state of the device over time.

特開平10-011118号公報Japanese Patent Application Publication No. 10-011118

しかしながら、上記技術によれば、トラブル発生時にその原因を究明しようとする際、特定のラダープログラムを、記録したデバイス値で再生することは可能であるものの、再生したラダープログラムがそもそも、トラブル発生の原因となったラダープログラムであるかどうかまでは確認できなかった。ここで、デバイス値と一緒にラダープログラムも保存することが考えられるものの、トラブル解決のため試行錯誤でデバッグを行う過程でラダープログラムが修正される可能性もある。このようにプロジェクトデータの一部でも意図せず変わってしまうと、信ぴょう性が損なわれて正しい動作検証などのトラブル解決に支障が生じる懸念があった。
本発明の目的の一は、トラブル解決のために、トラブル発生時の状況を保存したデータに含まれるプロジェクトデータの信ぴょう性を高めたプログラマブルロジックコントローラ用プログラム作成支援装置を提供することにある。
However, according to the above technology, when trying to investigate the cause of a trouble when it occurs, it is possible to play back a specific ladder program using the recorded device values, but it is possible that the played ladder program is the one that caused the trouble in the first place. It was not possible to confirm whether it was the ladder program that caused the problem. Although it is conceivable to save the ladder program along with the device values, there is also a possibility that the ladder program will be modified during the process of debugging by trial and error in order to solve a problem. If even a portion of the project data were to change unintentionally in this way, there was a concern that the reliability would be compromised and troubleshooting such as correct operation verification would be hindered.
One object of the present invention is to provide a program creation support device for a programmable logic controller that improves the reliability of project data included in data that stores the situation at the time of trouble occurrence, in order to solve troubles.

課題を解決するための手段及び発明の効果Means for solving the problem and effects of the invention

本発明の第1の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、一以上のユニットで構成されたプログラマブルロジックコントローラであり、ユーザープログラムを含むプロジェクトデータを記憶するプロジェクト記憶部、前記プロジェクトデータに含まれる前記ユーザープログラムを繰り返し実行するプログラム実行部、該プログラム実行部によって参照される記憶領域であるデバイスを有するデバイス部、該デバイス部に記憶されているデバイス値をログデータとして時系列に一時記録する一時記録部、及び運転時において所定の保存条件が満たされると該一時記録部に記録されているログデータ前記プロジェクト記憶部に記憶されている前記プロジェクトデータと共に保存する保存メモリを備える前記プログラマブルロジックコントローラで実行される、前記ユーザープログラムについて、当該ユーザープログラムの作成を支援するためのプログラム作成支援装置であって、前記プログラマブルロジックコントローラの運転時に前記保存メモリに保存されたログデータと、前記ログデータが前記保存メモリに保存されたときに前記プログラム実行部により実行されていた前記ユーザープログラムを含み、前記保存メモリに保存された前記プロジェクトデータとを運転記録データとして記憶する運転記録データ記憶部と、前記運転記録データ記憶部から前記運転記録データを読み出して、前記運転記録データ内のログデータとプロジェクトデータとを関連付けて表示させるログ表示制御部と、前記ログ表示制御部により表示されたプロジェクトデータの編集指示を受け付けて、該プロジェクトデータを編集するプロジェクト編集部と、前記プロジェクト編集部により編集中のプロジェクトデータが前記運転記録データ記憶部に記憶された前記運転記録データ内のプロジェクトデータであるか否かを判定し、該判定した結果に基づいて、前記運転記録データ記憶部に記憶された前記運転記録データ内のプロジェクトデータに対して、前記プロジェクト編集部により編集された編集後のプロジェクトデータの上書きを規制する上書規制制御部とを備えることができる。上記構成により、ユーザによるプロジェクトデータ内のユーザープログラム等の修正によって意図せずプロジェクトデータ全体の信ぴょう性が損なわれる事態を回避できる。
According to a program creation support device for a programmable logic controller according to a first aspect of the present invention, the programmable logic controller is configured of one or more units, and includes a project storage section that stores project data including a user program, and a project storage section that stores project data including a user program. A program execution unit that repeatedly executes the user program included in the data, a device unit that has a device that is a storage area referenced by the program execution unit, and a device value stored in the device unit that is chronologically recorded as log data. said storage memory comprising: a temporary recording section for temporarily recording; and a storage memory for storing log data recorded in said temporary recording section together with said project data stored in said project storage section when a predetermined storage condition is met during operation; A program creation support device for supporting the creation of the user program executed by the programmable logic controller, the program creation support device comprising: log data stored in the storage memory during operation of the programmable logic controller; an operation record data storage unit that includes the user program being executed by the program execution unit when the log data is saved in the storage memory, and stores the project data saved in the storage memory as operation record data; a log display control unit that reads the driving record data from the driving record data storage unit and displays log data in the driving record data in association with project data; and a project displayed by the log display control unit. a project editing section that receives a data editing instruction and edits the project data; and the project data being edited by the project editing section is project data in the driving record data stored in the driving record data storage section. and, based on the determined result, edit project data edited by the project editing unit with respect to the project data in the driving record data stored in the driving record data storage unit. and an overwrite restriction control section that restricts overwriting of the . With the above configuration, it is possible to avoid a situation where the authenticity of the entire project data is unintentionally damaged due to the user's modification of the user program, etc. in the project data.

また、第2の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記構成に加えて、前記上書規制制御部を、前記プロジェクト編集部によりプロジェクトデータに対して上書き操作が試みられたことを検出して表示される上書き禁止ポップアップとすることができる。 Further, according to the program creation support device for a programmable logic controller according to the second aspect, in addition to the above configuration, the overwrite restriction control unit is configured to control the overwrite restriction control unit when the project editing unit attempts an overwrite operation on the project data. It is possible to detect this and display an overwrite prohibition pop-up.

さらに、第3の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、前記上書規制制御部が、前記運転記録データ記憶部に記憶された前記運転記録データ内のプロジェクトデータに対して、前記プロジェクト編集部により編集されたプロジェクトデータの保存指示を受けたとき、該編集後のプロジェクトデータを、前記運転記録データに含まれるプロジェクトデータとは別のファイルとして保存するよう構成できる。 Furthermore, according to the program creation support device for a programmable logic controller according to a third aspect, in addition to any one of the above configurations, the overwrite restriction control section controls the driving record stored in the driving record data storage section. When receiving an instruction to save the project data edited by the project editing department for the project data in the data, the edited project data is saved as a separate file from the project data included in the operation record data. Can be configured to save.

さらにまた、第4の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、さらに、プロジェクトデータを編集する編集モード、及び前記ログ表示制御部による表示制御を行う履歴再生モードの少なくとも一方を選択するモード選択部を備え、前記プロジェクト編集部は、前記編集モードにおいて編集指示を受け付け、前記履歴再生モードでは編集指示の受付を禁止することができる。 Furthermore, according to the program creation support device for a programmable logic controller according to the fourth aspect, in addition to any of the above configurations, an editing mode for editing project data and display control by the log display control section are further provided. The project editing section may include a mode selection section that selects at least one of the history playback modes to be performed, and the project editing section can accept editing instructions in the editing mode and prohibit acceptance of editing instructions in the history playback mode.

さらにまた、第5の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、前記運転記録データが、第一運転記録データと第二運転記録データを含み、前記第一運転記録データと第二運転記録データとを、識別情報によって区別することができる。 Furthermore, according to the program creation support device for a programmable logic controller according to the fifth aspect, in addition to any of the above configurations, the driving record data includes first driving record data and second driving record data, The first driving record data and the second driving record data can be distinguished by identification information.

さらにまた、第6の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、前記識別情報を、データファイルの拡張子とできる。 Furthermore, according to the program creation support device for a programmable logic controller according to the sixth aspect, in addition to any of the above configurations, the identification information can be an extension of a data file.

さらにまた、第7の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、前記第一運転記録データは圧縮されており、前記ログ表示制御部は、前記第一運転記録データを読み出すときに、該第一運転記録データを解凍するよう構成できる。 Furthermore, according to the program creation support device for a programmable logic controller according to a seventh aspect, in addition to any of the above configurations, the first driving record data is compressed, and the log display control unit is configured to When reading the first driving record data, the first driving record data can be decompressed.

さらにまた、第8の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、さらに、前記第一運転記録データと第二運転記録データにおけるプロジェクトデータの比較表示を行う比較表示部を備えることができる。 Furthermore, according to the program creation support device for a programmable logic controller according to the eighth aspect, in addition to any of the above configurations, a comparison display of project data in the first operation record data and the second operation record data is provided. It is possible to include a comparison display section that performs the following.

さらにまた、第9の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、さらに、編集作業を行うための作業メモリを備え、前記ログ表示制御部が、前記運転記録データ記憶部から前記運転記録データを前記作業メモリに読み出して、前記運転記録データの内のログデータとプロジェクトデータとを関連付けて表示制御するよう構成できる。 Furthermore, according to the programmable logic controller program creation support device according to the ninth aspect, in addition to any of the above configurations, the programmable logic controller program creation support device further includes a work memory for performing editing work, and the log display control unit: The driving record data may be read from the driving record data storage unit to the working memory, and display control may be performed in association with log data and project data in the driving record data.

さらにまた、第10の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、前記ログデータが、デバイスデータを含むことができる。 Furthermore, according to the program creation support device for a programmable logic controller according to the tenth aspect, in addition to any of the above configurations, the log data can include device data.

さらにまた、第11の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、前記運転記録データが、対象物を撮像するカメラ入力拡張ユニットで撮像された画像ファイルを含むことができる。 Furthermore, according to the programmable logic controller program creation support device according to the eleventh aspect, in addition to any of the above configurations, the driving record data is an image captured by a camera input expansion unit that captures an image of a target object. Can contain files.

さらにまた、第12の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、前記ユーザープログラムがラダープログラムを含むことができる。 Furthermore, according to the program creation support device for a programmable logic controller according to the twelfth aspect, in addition to any of the above configurations, the user program can include a ladder program.

さらにまた、第13の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、上記何れかの構成に加えて、各ユニットのプログラマブルロジックコントローラが、複数のユニットで構成され、前記ユニット構成情報が、各ユニットの機能、ユニット間の接続位置の情報の少なくともいずれかを含むことができる。 Furthermore, according to the program creation support device for a programmable logic controller according to the thirteenth aspect, in addition to any of the above configurations, the programmable logic controller of each unit is configured with a plurality of units, and the unit configuration information is , the functions of each unit, and information on connection positions between units.

プログラマブルロジックコントローラシステムの概念図である。1 is a conceptual diagram of a programmable logic controller system. プログラマブルロジックコントローラシステムを示す図である。FIG. 1 is a diagram showing a programmable logic controller system. ラダープログラムを説明する図である。It is a diagram explaining a ladder program. プログラム作成支援装置を説明する図である。FIG. 2 is a diagram illustrating a program creation support device. PLCを説明する図である。It is a figure explaining PLC. ラダープログラムのスキャンを説明する図である。FIG. 3 is a diagram illustrating scanning of a ladder program. プログラム作成支援装置を示すブロック図である。FIG. 2 is a block diagram showing a program creation support device. 運転記録データとプロジェクトデータの関連付けを示す説明図である。It is an explanatory view showing association of driving record data and project data. ユーザーインターフェースを説明する図である。FIG. 3 is a diagram illustrating a user interface. 履歴再生モードのユーザープログラム作成支援プログラムのGUI画面を示すイメージ図である。FIG. 3 is an image diagram showing a GUI screen of a user program creation support program in history playback mode. 記録モードのユーザープログラム作成支援プログラムのGUI画面を示すイメージ図である。FIG. 3 is an image diagram showing a GUI screen of a user program creation support program in recording mode. モード選択欄の一例を示すイメージ図である。It is an image diagram showing an example of a mode selection field. ラダープログラムを編集する様子を示すGUIのイメージ図である。FIG. 2 is an image diagram of a GUI showing how a ladder program is edited. 図13の状態から編集画面を表示させたイメージ図である。14 is an image diagram of an editing screen displayed from the state of FIG. 13. FIG. 図14により編集が反映されたラダープログラムを示すイメージ図である。FIG. 15 is an image diagram showing a ladder program in which the edits shown in FIG. 14 are reflected; デバイス値を編集する様子を示すユーザープログラム作成支援プログラムのGUIのイメージ図である。FIG. 2 is an image diagram of a GUI of a user program creation support program showing how device values are edited. プロジェクトの保存画面を示すGUIのイメージ図である。FIG. 2 is an image diagram of a GUI showing a project save screen. 「プロジェクトの別名保存」ダイヤログ画面を示すイメージ図である。FIG. 3 is an image diagram showing a “save project under a different name” dialog screen. 「上書き保存禁止」処理の一例を示すフローチャートである。12 is a flowchart illustrating an example of "overwrite storage prohibition" processing. 「新しいプロジェクトデータとして保存」処理の一例を示すフローチャートである。12 is a flowchart illustrating an example of a "save as new project data" process. プロジェクトデータの照合機能を示すGUI画面のイメージ図である。FIG. 3 is an image diagram of a GUI screen showing a project data matching function. 照合結果の一例を示すGUI画面のイメージ図である。FIG. 3 is an image diagram of a GUI screen showing an example of a comparison result. プログラム作成支援装置の機能を説明する図である。It is a figure explaining the function of a program creation support device. CPUユニットの機能を説明する図である。It is a figure explaining the function of a CPU unit. ユニット構成情報の作成処理を説明する図である。FIG. 3 is a diagram illustrating a process for creating unit configuration information. CPUユニットのCPUの機能を説明する図である。It is a figure explaining the function of CPU of a CPU unit. デバッグ処理の概要を示すフローチャートである。3 is a flowchart showing an overview of debugging processing. プロジェクト作成部を説明する図である。FIG. 3 is a diagram illustrating a project creation section.

以下、本発明の実施形態を図面に基づいて説明する。ただし、以下に示す実施形態は、本発明の技術思想を具体化するための例示であって、本発明は以下のものに特定されない。また、本明細書は特許請求の範囲に示される部材を、実施形態の部材に特定するものでは決してない。特に実施形態に記載されている構成部品の寸法、材質、形状、その相対的配置等は特に特定的な記載がない限りは、本発明の範囲をそれのみに限定する趣旨ではなく、単なる説明例にすぎない。なお、各図面が示す部材の大きさや位置関係等は、説明を明確にするため誇張していることがある。さらに以下の説明において、同一の名称、符号については同一若しくは同質の部材を示しており、詳細説明を適宜省略する。さらに、本発明を構成する各要素は、複数の要素を同一の部材で構成して一の部材で複数の要素を兼用する態様としてもよいし、逆に一の部材の機能を複数の部材で分担して実現することもできる。 Embodiments of the present invention will be described below based on the drawings. However, the embodiment shown below is an illustration for embodying the technical idea of the present invention, and the present invention is not limited to the following. Moreover, this specification does not in any way specify the members shown in the claims to the members of the embodiments. In particular, the dimensions, materials, shapes, relative arrangements, etc. of the components described in the embodiments are not intended to limit the scope of the present invention, unless otherwise specified, and are merely illustrative examples. It's nothing more than that. Note that the sizes, positional relationships, etc. of members shown in each drawing may be exaggerated for clarity of explanation. Furthermore, in the following description, the same names and symbols indicate the same or homogeneous members, and detailed descriptions will be omitted as appropriate. Furthermore, each element constituting the present invention may be configured so that a plurality of elements are made of the same member so that one member serves as a plurality of elements, or conversely, the function of one member may be performed by a plurality of members. It can also be accomplished by sharing.

図1に、プログラマブルロジックコントローラシステムの概要図を示す。この図に示すプログラマブルロジックコントローラシステム1000は、ラインを流れる対象物WKをカメラ部98で撮像して検査するシステムを例示している。このプログラマブルロジックコントローラシステム1000は、PC2と接続されて、プロジェクトデータ編集プログラムを編集する。 FIG. 1 shows a schematic diagram of a programmable logic controller system. A programmable logic controller system 1000 shown in this figure exemplifies a system in which an object WK flowing on a line is imaged by a camera unit 98 and inspected. This programmable logic controller system 1000 is connected to the PC 2 and edits a project data editing program.

プログラマブルロジックコントローラ1は、複数のユニットを接続して構成される。複数のユニット間は、ユニット間バス90を介して通信可能に接続されている。ユニットは、CPUユニット3と拡張ユニット4に大別される。CPUユニット3はメインユニットや基本ユニットとも呼ばれ、プログラマブルロジックコントローラの基本動作を行う。また拡張ユニット4は、CPUユニット3の機能を拡張する機能拡張ユニットである。図1の例では、拡張ユニット4はカメラ入力拡張ユニット4cと、モーションユニット4dと、通信ユニット4eを含む。拡張ユニット4の一種であるカメラ入力拡張ユニット4cは、カメラ部98と接続されて、対象物WKを所定のタイミングで撮像して、CPUユニットに送出する。モーションユニット4dは、位置決めユニットとも呼ばれ、軸とよばれる制御対象の位置を制御する。一般に軸ごとにモータ等の駆動源が存在する。通信ユニット4eは、外部機器と通信を行う。またCPUユニット3は、これら拡張ユニット4からのデータを収集して、必要な制御を行う。
<システム構成>
The programmable logic controller 1 is configured by connecting a plurality of units. The plurality of units are communicably connected via an inter-unit bus 90. The units are roughly divided into a CPU unit 3 and an expansion unit 4. The CPU unit 3 is also called a main unit or basic unit, and performs basic operations of the programmable logic controller. Further, the expansion unit 4 is a function expansion unit that expands the functions of the CPU unit 3. In the example of FIG. 1, the expansion unit 4 includes a camera input expansion unit 4c, a motion unit 4d, and a communication unit 4e. A camera input expansion unit 4c, which is one type of expansion unit 4, is connected to the camera section 98, takes an image of the object WK at a predetermined timing, and sends it to the CPU unit. The motion unit 4d is also called a positioning unit and controls the position of a controlled object called an axis. Generally, a drive source such as a motor exists for each axis. The communication unit 4e communicates with external equipment. The CPU unit 3 also collects data from these expansion units 4 and performs necessary control.
<System configuration>

ここで、プログラマブルロジックコントローラ(以下「PLC」とも呼ぶ。)を当業者にとってよりよく理解できるようにするために、一般的なPLCの構成とその動作について説明する。 Here, in order to help those skilled in the art better understand the programmable logic controller (hereinafter also referred to as "PLC"), the configuration and operation of a typical PLC will be described.

図2は、本発明の実施の形態によるプログラマブルロジックコントローラシステムの一構成例を示す概念図である。図2が示すように、このシステムは、ラダープログラム等のユーザープログラムの編集を行うためのPC2と、工場等に設置される各種制御装置を統括的に制御するためのPLC1とを備えている。PCはパーソナルコンピュータの略称である。ユーザープログラムは、ラダー言語やSFC(シーケンシャルファンクションチャート)等のフローチャート形式のモーションプログラム等のグラフィカルプログラミング言語を用いて作成されてもよいし、C言語等の高級プログラミング言語を用いて作成されてもよい。以下では、説明の便宜上、ユーザープログラムはラダープログラムとする。PLC1は、CPUが内蔵されたCPUユニット3と、1つないし複数の拡張ユニット4を備えている。CPUユニット3に対して1つないし複数の拡張ユニット4が着脱可能となっている。例えば、拡張ユニット4aはモータ(フィールドデバイス10a)を駆動してワークの位置決めする位置決めユニットであり、拡張ユニット4bはカウンタユニットであってもよい。カウンタユニットは手動パルサ等のエンコーダ(フィールドデバイス10b)からの信号をカウントする。なお、参照符号の末尾に付与されているa、b、c・・・の文字は省略されることがある。なお、PLC1とPC2とを含むシステムはプログラマブルロジックコントローラシステムと呼ばれてもよい。 FIG. 2 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. 2, this system includes a PC 2 for editing user programs such as ladder programs, and a PLC 1 for comprehensively controlling various control devices installed in a factory or the like. PC is an abbreviation for personal computer. The user program may be created using a graphical programming language such as a flowchart-style motion program such as a ladder language or 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 assumed to be a ladder program. The PLC 1 includes a CPU unit 3 with a built-in CPU, and one or more expansion units 4. One or more expansion units 4 can be attached to and detached from the CPU unit 3. For example, the extension unit 4a may be a positioning unit that positions a workpiece by driving a motor (field device 10a), and the extension unit 4b may be a counter unit. The counter unit counts signals from an encoder (field device 10b) such as a manual pulser. Note that the letters a, b, c, etc. appended to the end of the reference numerals may be omitted. Note that a system including PLC1 and PC2 may be called a programmable logic controller system.

CPUユニット3には、PLC側表示部5及びPLC側操作部6が備えられている。PLC側表示部5は、CPUユニット3に取り付けられている各拡張ユニット4の動作状況等を表示することができる。PLC側操作部6の操作内容に応じてPLC側表示部5は表示内容を切り替える。またPLC側操作部6は、CPUユニット3と一体に組み込まれたボタン等とする他、、外付けのコンソールやマウスやキーボード等の入力装置としてもよい。あるいは、PLC側表示部5をタッチパネルとして操作部の機能を兼用させることもできる。 The CPU unit 3 is equipped with a PLC side display section 5 and a PLC side operation section 6. The PLC side display section 5 can display the operating status of each expansion unit 4 attached to the CPU unit 3. The PLC side display section 5 switches the display contents according to the operation contents of the PLC side operation section 6. Further, the PLC side operation section 6 may be a button or the like integrated with the CPU unit 3, or may be an external console, a mouse, a keyboard, or other input device. Alternatively, the PLC-side display section 5 can also be used as a touch panel to function as an operation section.

PLC側表示部5は、通常、PLC1内のデバイスの現在値(デバイス値)やPLC1内で生じたエラー情報等を表示する。デバイスとは、デバイス値(デバイスデータ)を格納するために設けられたメモリ上の領域を指す名称であり、デバイスメモリと呼ばれてもよい。デバイス値とは、入力機器からの入力状態、出力機器への出力状態及びユーザープログラム上で設定される内部リレー(補助リレー)、タイマ、カウンタ、データメモリ等の状態を示す情報である。デバイス値の型にはビット型とワード型がある。ビットデバイスは1ビットのデバイス値を記憶する。ワードデバイスは1ワードのデバイス値を記憶する。 The PLC-side display unit 5 normally displays current values (device values) of devices within the PLC 1, error information that has occurred within the PLC 1, and the like. A device is a name indicating an area on a memory provided for storing device values (device data), and may also 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 internal relays (auxiliary relays), timers, counters, data memories, etc. set on the user program. There are two types of device values: bit type and word type. A bit device stores a 1-bit device value. A word device stores one word of device value.

拡張ユニット4は、PLC1の機能を拡張するために用意されている。各拡張ユニット4には、その拡張ユニット4の機能に対応するフィールドデバイス(被制御装置)10が接続され、これにより、各フィールドデバイス10が拡張ユニット4を介してCPUユニット3に接続される。フィールドデバイス10は、センサやカメラ部等の入力機器であってもよいし、アクチュエータ等の出力機器であってもよい。また、一つの拡張ユニット4に対して複数のフィールドデバイスが接続されてもよい。
(プログラマブルロジックコントローラ用エンジニアリングツール)
The expansion unit 4 is prepared to expand the functions 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, and thereby each field device 10 is connected to the CPU unit 3 via the expansion unit 4. The field device 10 may be an input device such as a sensor or a camera unit, or may be an output device such as an actuator. Further, a plurality of field devices may be connected to one expansion unit 4.
(Engineering tool for programmable logic controllers)

PC2は、プログラマブルロジックコントローラ用エンジニアリングツール(以下「PLC用エンジニアリングツール」ともいう。)を実現する。PLC用エンジニアリングツールとは、PLC1と接続して、その設定や、運用時の制御や動作確認等を行うための部材である。また、PLC1やこれを含めたプログラマブルロジックコントローラシステムを動作させる各種プログラムの作成や、作成済みのプログラムの編集、修正を行うこともできる。この意味ではプログラム作成支援装置と呼ばれてもよい。さらにPLC用エンジニアリングツールは、過去のプログラマブルロジックコントローラシステムの動作を記録した運転記録データに基づいて、その当時の各デバイスの動作状況を再現することもできる。運転記録データは、ラダープログラム等のユーザープログラムや、各ユニットのユニット構成情報などの設定データを含むプロジェクトデータ、及び運転当時の各デバイスのデバイス値やカメラ部の画像データ等の運用データであるログデータを含んでいる。このPLC用エンジニアリングツールは運転記録データの内、プロジェクトデータを読み込んで編集することも可能である。この意味でPLC用エンジニアリングツールは、プロジェクトデータ編集プログラムと呼ばれてもよい。 The PC 2 realizes an engineering tool for programmable logic controllers (hereinafter also referred to as "PLC engineering tool"). The PLC engineering tool is a member that connects to the PLC 1 to perform settings, control during operation, and operation confirmation. It is also possible to create various programs for operating the PLC 1 and the programmable logic controller system including this, and to edit and modify already created programs. In this sense, it may also be called a program creation support device. Furthermore, the PLC engineering tool can also reproduce the operational status of each device at that time based on operation record data that records the past operation of the programmable logic controller system. Operation record data includes user programs such as ladder programs, project data that includes setting data such as unit configuration information for each unit, and logs that are operational data such as device values of each device at the time of operation and image data of the camera unit. Contains data. This PLC engineering tool can also read and edit project data from the driving record data. In this sense, the PLC engineering tool may be called a project data editing program.

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

なお、図2は示していないが、PC2のPC側操作部8には、PC2に接続されたマウス等のポインティングデバイスが含まれていてもよい。またPC2は、USB以外の他の通信ケーブル9を介して、PLC1のCPUユニット3に対して着脱可能に接続されるような構成であってもよい。また、通信ケーブル9を介さず、PLC1のCPUユニット3に対して無線によって接続されるような構成であってもよい。
<ラダープログラム>
Although not shown in FIG. 2, the PC-side operation unit 8 of the PC 2 may include a pointing device such as a mouse connected to the PC 2. Further, the PC 2 may be configured to be detachably connected to the CPU unit 3 of the PLC 1 via a communication cable 9 other than the USB. Alternatively, the configuration may be such that it is connected wirelessly to the CPU unit 3 of the PLC 1 without using the communication cable 9.
<Ladder program>

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

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

各入力デバイスのシンボルの上方に表示されている文字(「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 that input device. The characters (“flag 1,” “flag 2,” and “flag 3”) displayed below the symbol of each input device represent the device comment associated with that input device. The characters (“return to origin”) displayed above the symbol of the output device are labels consisting of a character string representing the function of the output device.

図3が示す例では、デバイス名「R0001」及び「R0002」にそれぞれ対応する2つの入力デバイスのシンボルが直列的に結合されることにより、AND回路が構成されている。また、これらの2つの入力デバイスのシンボルからなるAND回路に対して、デバイス名「R0003」に対応する入力デバイスのシンボルが並列的に結合されることにより、OR回路が構成されている。すなわち、このリレー回路では、一行目の2つのシンボルに対応する入力デバイスがいずれもONした場合、又は二行目のシンボルに対応する入力デバイスがONした場合にのみ、一行目のシンボルに対応する出力デバイスがONになる。
<プログラム作成支援装置>
In the example shown in FIG. 3, the symbols of two input devices corresponding to device names "R0001" and "R0002" are connected in series to form an AND circuit. Furthermore, an OR circuit is constructed by connecting in parallel the symbol of the input device corresponding to the device name "R0003" to the AND circuit composed of the symbols of these two input devices. That is, in this relay circuit, the relay circuit corresponds to the symbol in the first row only when both input devices corresponding to the two symbols on the first row are turned on, or when an input device corresponding to the symbol on the second row is turned on. The output device turns on.
<Program creation support device>

図4は、PC2の電気的構成について説明するためのブロック図である。図4が示すように、PC2は、PC側メモリ部11、PC側CPU21、表示部7、PC側操作部8、PC側記憶装置22及びPC側通信部23を備えている。表示部7、PC側操作部8、PC側記憶装置22及びPC側通信部23は、それぞれPC側CPU21に対して電気的に接続されている。 FIG. 4 is a block diagram for explaining the electrical configuration of the PC 2. As shown in FIG. As shown in FIG. 4, the PC 2 includes a PC memory section 11, a PC CPU 21, a display section 7, a PC operation section 8, a PC storage device 22, and a PC communication section 23. The display unit 7, the PC-side operation unit 8, the PC-side storage device 22, and the PC-side communication unit 23 are each electrically connected to the PC-side CPU 21.

PC側メモリ部11は、PC側CPU21が処理を実行するための作業空間となる作業メモリであり、典型的にはRAM等で構成される。PC側記憶装置22は、後述する運転記録データ記憶部36Bの機能を実現する。運転記録データは、プロジェクトデータを含んでいる。 The PC-side memory unit 11 is a work memory that serves as a work space for the PC-side CPU 21 to execute processing, and is typically composed of a RAM or the like. The PC side storage device 22 realizes the function of a driving record data storage section 36B, which will be described later. The driving record data includes project data.

PC側記憶装置22はハードディスクや半導体メモリ、ROM等を含み、さらに着脱可能なメモリカードを含んでもよい。CPUは中央演算処理装置の略称である。ROMはリードオンリーメモリの略称である。RAMはランダムアクセスメモリの略称である。 The PC side storage device 22 includes a hard disk, a semiconductor memory, a ROM, etc., and may further include a removable memory card. CPU is an abbreviation for central processing unit. ROM is an abbreviation for read-only memory. RAM is an abbreviation for random access memory.

ユーザは、PC側記憶装置22に記憶されているコンピュータプログラムである編集ソフトウエアをPC側CPU21に実行させて、PC側操作部8を通じてプロジェクトデータを編集する。この編集ソフトウエアは、プロジェクトデータ編集プログラムにあたる。
(プロジェクトデータ)
The user causes the PC CPU 21 to execute editing software, which is a computer program stored in the PC storage device 22, and edits the project data through the PC operation unit 8. This editing software corresponds to a project data editing program.
(project data)

プロジェクトデータは、一つ以上のユーザープログラム(例えばラダープログラム)と、CPUユニット3や拡張ユニット4のユニット構成情報等を含む。またプロジェクトデータは、ユーザープログラムがどのようなプログラム部品から構成されているかを示すプログラム構成情報を含めてもよい。さらにユニット構成情報は、CPUユニット3に対する複数の拡張ユニット4の接続位置や、CPUユニット3に備えられた機能(例えば通信機能や位置決め機能)を示す情報、拡張ユニット4の機能(例えば撮影機能)等を示す情報である。 The project data includes one or more user programs (for example, a ladder program), unit configuration information of the CPU unit 3 and the expansion unit 4, and the like. The project data may also include program configuration information indicating what kind of program parts the user program is composed of. Further, the unit configuration information includes information indicating the connection positions of the plurality of expansion units 4 to the CPU unit 3, functions provided in the CPU unit 3 (for example, communication function and positioning function), and functions of the expansion unit 4 (for example, shooting function). This is information indicating such things.

ここで、プロジェクトデータの編集には、プロジェクトデータの作成及び変更が含まれる。プロジェクトデータ編集プログラムを用いて作成されたプロジェクトデータは、PC側記憶装置22に記憶される。またユーザは、必要に応じてPC側記憶装置22に記憶されているプロジェクトデータを読み出し、そのプロジェクトデータを、プロジェクトデータ編集プログラムを用いて変更することができる。PC側通信部23は、通信ケーブル9を介してPC2をCPUユニット3に通信可能に接続するためのものである。PC側CPU21はPC側通信部23を介してプロジェクトデータをCPUユニット3に転送する。 Here, editing the project data includes creating and changing the project data. Project data created using the project data editing program is stored in the PC-side storage device 22. Furthermore, the user can read out the project data stored in the PC storage device 22 and change the project data using the project data editing program, if necessary. The PC-side communication unit 23 is for communicably connecting the PC 2 to the CPU unit 3 via the communication cable 9. The PC side CPU 21 transfers the project data to the CPU unit 3 via the PC side communication section 23.

プロジェクトデータ編集プログラムは、編集モードとモニタモードと履歴再生モードを備える。編集モードはエディットモード等とも呼ばれ、プロジェクトデータを編集することができる。またモニタモードはユーザープログラムのデバッグ等を行うためのシミュレーション動作を行うことができる。さらに履歴再生モードはリプレイモードやタイムマシン再生等とも呼ばれ、再生表示を行うことができる。これらの編集モード、モニタモード、履歴再生モードの切り替えは、後述するモード選択部50Dで行われる。
<PLC1>
The project data editing program has an editing mode, a monitor mode, and a history playback mode. The edit mode is also called an edit mode, and allows project data to be edited. Also, in the monitor mode, simulation operations can be performed for debugging the user program. Furthermore, the history playback mode is also called replay mode, time machine playback, etc., and allows playback and display. Switching between the editing mode, monitor mode, and history playback mode is performed by a mode selection section 50D, which will be described later.
<PLC1>

図5はPLC1の電気的構成について説明するためのブロック図である。この図に示すように、CPUユニット3は、PLC側CPU31、PLC側表示部5、PLC側操作部6、PLC側記憶装置32及びPLC側通信部33を備えている。PLC側表示部5、PLC側操作部6、PLC側記憶装置32及びPLC側通信部33は、それぞれPLC側CPU31に電気的に接続されている。
(PLC側記憶装置32)
FIG. 5 is a block diagram for explaining the electrical configuration of the PLC 1. As shown in this figure, the CPU unit 3 includes a PLC side CPU 31, a PLC side display section 5, a PLC side operation section 6, a PLC side storage device 32, and a PLC side communication section 33. The PLC-side display section 5, the PLC-side operation section 6, the PLC-side storage device 32, and the PLC-side communication section 33 are electrically connected to the PLC-side CPU 31, respectively.
(PLC side storage device 32)

PLC側記憶装置32は、プロジェクト記憶部35、デバイス部34、一時記録部91a、保存メモリ36を備えている。 The PLC side storage device 32 includes a project storage section 35, a device section 34, a temporary storage section 91a, and a storage memory 36.

プロジェクト記憶部35は、PC2から入力されたプロジェクトデータを記憶する。またPLC側記憶装置32はCPUユニット3用の制御プログラムも記憶する。 The project storage unit 35 stores project data input from the PC 2. The PLC side storage device 32 also stores a control program for the CPU unit 3.

デバイス部34はビットデバイスやワードデバイス等を有し、各デバイスはデバイス値を記憶する。このデバイス部34は、複数のデバイスの各デバイス値を記憶するデバイスメモリとして機能する。またユーザープログラムに従い参照される記憶領域として機能させてもよい。 The device section 34 has bit devices, word devices, etc., and each device stores a device value. This device section 34 functions as a device memory that stores each device value of a plurality of devices. Further, it may function as a storage area that is referenced according to a user program.

一時記録部91aは、デバイス部34に記憶されているデバイス値を時系列に記録する。この一時記録部91aは、リングバッファ等で構成できる。 The temporary recording section 91a records the device values stored in the device section 34 in chronological order. This temporary recording section 91a can be composed of a ring buffer or the like.

保存メモリ36は、一時記録部91aに時系列に記録されたデバイス値を保存する。保存メモリ36は、不揮発性メモリとして、内部メモリや着脱可能なメモリカード36A等で構成される。 The storage memory 36 stores the device values recorded in chronological order in the temporary storage section 91a. The storage memory 36 is composed of an internal memory, a removable memory card 36A, and the like as a nonvolatile memory.

このようにPLC側記憶装置32は複数の記憶領域を有している。このPLC側記憶装置32はRAMやROM、メモリカード等を含んでもよい。例えば図5の例では、保存メモリ36は着脱可能なメモリカード36Aで構成されている。
(PLC側CPU31)
In this way, the PLC side storage device 32 has a plurality of storage areas. This PLC side storage device 32 may include a RAM, ROM, memory card, etc. For example, in the example shown in FIG. 5, the storage memory 36 is composed of a removable memory card 36A.
(PLC side CPU31)

PLC側CPU31は、プログラム実行部514と、保存条件設定部45と、記録制御部39と、保存制御部50Cを備えている。プログラム実行部514は、ユーザープログラムを繰り返し実行するラダー実行エンジンとして機能する。ユーザープログラムに従い、プログラム実行部514により参照される記憶領域であるデバイス部34は、複数のデバイスの各デバイス値を記憶している。 The PLC side CPU 31 includes a program execution section 514, a storage condition setting section 45, a recording control section 39, and a storage control section 50C. The program execution unit 514 functions as a ladder execution engine that repeatedly executes a user program. The device unit 34, which is a storage area referenced by the program execution unit 514 according to the user program, stores each device value of a plurality of devices.

保存条件設定部45は、各種の条件を設定するための部材である。ここでは保存条件設定部45は、一時記録部91aに記録するための記録トリガについての第1トリガ条件と、保存メモリ36に保存するための保存トリガについての第2トリガ条件と、記録トリガが示す時点を基準時とし、この基準時までの期間及び該基準時からの期間の少なくとも一方を含む期間であって、一時記録部91aに一時的な記録を行う期間を示すバッファ記録期間を設定する。 The storage condition setting section 45 is a member for setting various conditions. Here, the storage condition setting section 45 sets a first trigger condition for a recording trigger for recording in the temporary recording section 91a, a second trigger condition for a storage trigger for storing in the storage memory 36, and a recording trigger indicated by the recording trigger. The time is set as a reference time, and a buffer recording period is set, which is a period including at least one of a period up to this reference time and a period from the reference time, and is a period during which temporary recording is performed in the temporary recording section 91a.

保存条件設定部45で、第1トリガ条件として、一時記録部91aへの記録を開始するための記録開始トリガについての条件を設定することができる。またバッファ記録期間として、この記録開始トリガが示す基準時からの期間を設定することができる。 The storage condition setting section 45 can set, as a first trigger condition, a condition for a recording start trigger for starting recording to the temporary recording section 91a. Furthermore, the period from the reference time indicated by this recording start trigger can be set as the buffer recording period.

記録制御部39は、記録トリガについての第1トリガ条件が成立すると、この記録トリガが示す時点を基準時とするバッファ記録期間に対応した時系列のデバイス値をログデータとして一時記録部91aに記録する。また記録制御部39は、保存トリガについての第2トリガ条件が成立する時点、又は次に記録トリガについての第1トリガ条件が成立する時点の、いずれか早い時点までの間、記録した該ログデータを一時記録部91aに保持させる。そして、次に記録トリガについての第1トリガ条件が成立すると、次に該記録トリガが示す時点を基準時とするバッファ記録期間に対応した時系列のデバイス値をログデータとして、一時記録部91aに記録する。 When the first trigger condition for the recording trigger is satisfied, the recording control unit 39 records the time-series device values corresponding to the buffer recording period whose reference time is the point in time indicated by this recording trigger in the temporary recording unit 91a as log data. do. The recording control unit 39 also controls the recorded log data until the time when the second trigger condition for the save trigger is satisfied or the time when the first trigger condition for the recording trigger is satisfied, whichever is earlier. is temporarily held in the recording section 91a. Then, when the first trigger condition for the recording trigger is met, the time-series device values corresponding to the buffer recording period with the time point indicated by the recording trigger as the reference time are stored as log data in the temporary recording section 91a. Record.

保存制御部50Cは、保存トリガについての第2トリガ条件が成立すると、記録制御部39により一時記録部91aに保持されたログデータを保存メモリ36に保存する。保存制御部50Cは、保存トリガについての第2トリガ条件が成立すると、記録制御部39により一時記録部91aに保持され、保存トリガからみて直前の記録トリガに対応するログデータを、保存メモリに保存する。このように保存制御部50Cは、バッファ記録期間を経過した後も、バッファ記録期間中に記録したログデータを保持しておき、保存トリガが起動すると、記録トリガに対応付けて保持されたログデータを保存する。ただ記録制御部39が保存するログデータは、直近の記録トリガに対応するログデータに限らず、2個前の記録トリガや、3回前の記録トリガとしてもよい。 The storage control unit 50C stores the log data temporarily held in the storage unit 91a by the recording control unit 39 in the storage memory 36 when the second trigger condition for the storage trigger is satisfied. When the second trigger condition for the save trigger is met, the save control unit 50C saves log data, which is temporarily held in the recording unit 91a by the record control unit 39 and corresponds to the immediately previous record trigger viewed from the save trigger, in the save memory. do. In this way, the storage control unit 50C retains the log data recorded during the buffer recording period even after the buffer recording period has elapsed, and when the storage trigger is activated, the log data stored in association with the recording trigger is stored. Save. However, the log data stored by the recording control unit 39 is not limited to the log data corresponding to the most recent recording trigger, but may be the two previous recording triggers or the third previous recording trigger.

図5が示すように,CPUユニット3と拡張ユニット4とは拡張バスの一種であるユニット間バス90を介して接続されている。なお、ユニット間バス90に関する通信機能は、PLC側通信部33の一部として実装されてもよい。またPLC側通信部33は、ネットワーク通信回路を有してもよい。PLC側CPU31は、PLC側通信部33を介してログデータ等をPC2やクラウド等に送信してもよい。 As shown in FIG. 5, the CPU unit 3 and the expansion unit 4 are connected via an inter-unit bus 90, which is a type of expansion bus. Note that the communication function regarding the inter-unit bus 90 may be implemented as part of the PLC side communication section 33. Further, the PLC side communication section 33 may include a network communication circuit. The PLC-side CPU 31 may transmit log data and the like to the PC 2, the cloud, etc. via the PLC-side communication unit 33.

ここで、ユニット間バス90について、補足説明する。このユニット間バス90は、次に説明する入出力リフレッシュ等が行われるバスである。ユニット間バス90における通信制御は、いわゆるバスマスタ38によって実現される(なお、PLC側通信部33の一部としてバスマスタを設けてもよいし、PLC側CPU31の一部としてバスマスタ38を設けてもよい)。バスマスタ38は、ユニット間バス90での通信を制御するための制御回路であって、PLC側CPU31からの通信要求を受けて、拡張ユニット4との間で、後述する入出力リフレッシュ等の通信を行う。 Here, a supplementary explanation will be given regarding the inter-unit bus 90. This inter-unit bus 90 is a bus on which input/output refresh, etc., which will be described next, is performed. Communication control on the inter-unit bus 90 is realized by a so-called bus master 38 (the bus master may be provided as a part of the PLC side communication section 33, or the bus master 38 may be provided as a part of the PLC side CPU 31). ). The bus master 38 is a control circuit for controlling communication on the inter-unit bus 90, and upon receiving a communication request from the PLC side CPU 31, performs communication such as input/output refreshing, which will be described later, with the expansion unit 4. conduct.

拡張ユニット4はCPU41とメモリ42を備えている。CPU41は、デバイスに格納されたCPUユニット3からの指示(デバイス値)に従って、フィールドデバイス10を制御する。またCPU41は、フィールドデバイス10の制御結果をバッファメモリとよばれるデバイスに格納する。デバイスに格納された制御結果は入出力リフレッシュによってCPUユニット3に転送される。またデバイスに格納されている制御結果は、CPUユニット3からの読み出し命令に従って、入出力リフレッシュとは異なるタイミングであっても、CPUユニット3に転送される。メモリ42はRAMやROM等を含む。とりわけ、RAMにはバッファメモリとして使用される記憶領域が確保されている。またメモリ42は、フィールドデバイス10によって取得されたデータ(例:静止画データや動画データ)を一時的に保持するバッファを有してもよい。 The expansion unit 4 includes a CPU 41 and a memory 42. The CPU 41 controls the field device 10 according to instructions (device values) from the CPU unit 3 stored in the device. Further, the CPU 41 stores the control results of the field device 10 in a device called a buffer memory. The control results stored in the device are transferred to the CPU unit 3 by input/output refresh. Further, the control results stored in the device are transferred to the CPU unit 3 according to a read command from the CPU unit 3 even at a timing different from the input/output refresh. The memory 42 includes RAM, ROM, etc. In particular, a storage area is reserved in the RAM to be used as a buffer memory. The memory 42 may also include a buffer that temporarily holds data (eg, still image data or video data) acquired by the field device 10.

図6はCPUユニット3のスキャンタイムを示す模式図である。図6が示すように1つのスキャンタイムTは、入出力のリフレッシュを行うためのユニット間通信201、プログラム実行202、END処理204により構成されている。ユニット間通信201で、CPUユニット3は、ラダープログラムを実行して得られた出力データをCPUユニット3内のPLC側記憶装置32から拡張ユニット4等の外部機器に送信する。さらにCPUユニット3は、拡張ユニット4等の外部機器から受信した入力データをCPUユニット3内のPLC側記憶装置32に取り込む。つまり、CPUユニット3のデバイスに記憶されているデバイス値は出力リフレッシュによって拡張ユニット4のデバイスに反映される。同様に、拡張ユニット4のデバイスに記憶されているデバイス値は、入力リフレッシュによってCPUユニット3のデバイスに反映される。このように入出力リフレッシュによって、CPUユニット3のデバイスと拡張ユニット4のデバイスが同期する。 FIG. 6 is a schematic diagram showing the scan time of the CPU unit 3. As shown in FIG. 6, one scan time T is composed of inter-unit communication 201 for refreshing input/output, program execution 202, and END processing 204. In inter-unit communication 201, the CPU unit 3 transmits output data obtained by executing the ladder program from the PLC side storage device 32 in the CPU unit 3 to an external device such as the expansion unit 4. Furthermore, the CPU unit 3 takes in input data received from an external device such as the expansion unit 4 into the PLC side storage device 32 within the CPU unit 3. In other words, the device value stored in the device of the CPU 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 CPU unit 3 by input refresh. By input/output refresh in this manner, the devices of the CPU unit 3 and the devices of the expansion unit 4 are synchronized.

なお、リフレッシュ以外のタイミングでデバイス値をユニット間で更新する仕組み(ユニット間同期)が採用されてもよい。ただ、CPUユニット3のデバイスは、CPUユニット3が随時書き換えており、同様に拡張ユニット4のデバイスは拡張ユニット4が随時書き換えている。つまり、CPUユニット3のデバイスは、CPUユニット3の内部の装置によって随時アクセス可能である。同様に、拡張ユニット4のデバイスは拡張ユニット4の内部の装置によって随時アクセス可能になっている。CPUユニット3と拡張ユニット4との間では、基本的にリフレッシュのタイミングにおいて相互にデバイス値を更新して同期する。プログラム実行202で、CPUユニット3は、更新された入力データを用いてプログラムを実行(演算)する。図6が示すように、プログラム実行202においては複数のプログラムモジュール又はラダープログラムがプロジェクトデータに従って順番に実行されてもよい。CPUユニット3はプログラムの実行によりデータを演算処理する。なお、END処理とは、PC2やCPUユニット3に接続された表示器(図示せず)等の外部機器とのデータ通信、システムのエラーチェック等の周辺サービスに関する処理全般を意味する。 Note that a mechanism (inter-unit synchronization) in which device values are updated between units at a timing other than refresh may be adopted. However, the devices of the CPU unit 3 are rewritten by the CPU unit 3 at any time, and similarly, the devices of the expansion unit 4 are rewritten by the expansion unit 4 at any time. In other words, the devices of the CPU unit 3 can be accessed by devices inside the CPU unit 3 at any time. Similarly, devices in the expansion unit 4 can be accessed at any time by devices inside the expansion unit 4. The CPU unit 3 and expansion unit 4 basically update and synchronize their device values with each other at refresh timing. In program execution 202, the CPU unit 3 executes (computes) the program using the updated input data. As shown in FIG. 6, in program execution 202, a plurality of program modules or ladder programs may be executed in sequence according to project data. The CPU unit 3 processes data by executing programs. Note that the END processing refers to all processing related to peripheral services such as data communication with external devices such as a display device (not shown) connected to the PC 2 and the CPU unit 3, and system error checking.

このように、PC2はユーザの操作に応じたラダープログラムを作成し、作成したラダープログラムをPLC1に転送する。PLC1は、入出力リフレッシュ、ラダープログラムの実行及びEND処理を1サイクル(1スキャン)として、このサイクルを周期的、すなわちサイクリックに繰り返し実行する。これにより、各種の入力機器(センサ等)からのタイミング信号に基づいて、各種の出力機器(モータ等)を制御する。なお、スキャン周期とは別に、CPUユニット3や拡張ユニット4はそれぞれ内部制御周期を有している。CPUユニット3や拡張ユニット4は内部制御周期を基準としてフィールドデバイス10等の機能を制御する。
<ロギング>
In this way, the PC 2 creates a ladder program according to the user's operation, and transfers the created ladder program to the PLC 1. The PLC 1 considers input/output refresh, ladder program execution, and END processing as one cycle (one scan), and repeatedly executes this cycle periodically, that is, cyclically. Thereby, various output devices (motors, etc.) are controlled based on timing signals from various input devices (sensors, etc.). Note that, apart from the scan cycle, the CPU unit 3 and the expansion unit 4 each have an internal control cycle. The CPU unit 3 and expansion unit 4 control the functions of the field device 10 and the like based on the internal control cycle.
<Logging>

ユーザがユーザープログラムを改良したり、修正したりする際に、PLC1がユーザープログラムを実行している際に取得されたデバイス値が役に立つことがある。そこで、PLC1は予め指定されたデバイス値を取得し、ログデータを作成する。ここで、PLC1が管理するデバイスには、ユーザープログラムによって利用されるものだけでなく、ユーザープログラムによって利用されないものも存在する。また、ユーザープログラムを改良したり、修正したりする際に役立つデバイスもあれば、役に立たないデバイスもある。一般にデバイスの数は数千個に及ぶため、ユーザが必要なデバイスを指定することは大きな負担となっていた。そこで、PC2は、ユーザープログラムを解析し、ユーザープログラムに使用又は記述されているデバイスをロギング対象として抽出する。これにより、ユーザの負担が軽減される。 When a user improves or modifies a user program, the device values acquired while the PLC 1 is executing the user program may be useful. Therefore, the PLC 1 acquires a device value specified in advance and creates log data. Here, the devices managed by the PLC 1 include not only those used by the user program but also those not used by the user program. Additionally, some devices are useful for improving or modifying user programs, while others are useless. Since the number of devices is generally in the thousands, it has been a heavy burden for users to specify the devices they need. Therefore, the PC 2 analyzes the user program and extracts devices used or described in the user program as logging targets. This reduces the burden on the user.

PLC1が管理するすべてのデバイスをロギングの対象とすると、スキャンタイムが長くなってしまう。なぜなら、ロギングは、ユーザープログラムの一つとして実行されたり、入出力リフレッシュの際に実行されたりするからである。時には、ロギングのもたらす遅延によって、ユーザープログラムがユーザの希望通りに動作しないこともありうる。したがって、ロギング対象のデバイスの数は適切に維持されるべきであろう。 If all devices managed by the PLC 1 are targeted for logging, the scan time will become long. This is because logging is executed as part of a user program or during input/output refresh. Sometimes, the delays caused by logging can prevent a user program from working as the user desires. Therefore, the number of devices to be logged should be maintained appropriately.

ユーザープログラムは、複数のプログラム部品(例えばプログラムモジュール(メインのラダープログラムとサブのラダープログラム)、ファンクションブロック)から構成されることがある。この内、ユーザが修正を希望するプログラム部品に関連したデバイスがロギングされれば、ユーザにとって十分な場合がある。また、複数のプログラム部品の内で、ユーザは特定のプログラム部品を抽出対象から除外したり、特定のプログラム部品を抽出対象に追加したりすることを希望することもあろう。よって、プログラム部品を単位として、ロギング対象からデバイスを追加又は削除できればユーザにとって便利であろう。 A user program may be composed of a plurality of program parts (eg, program modules (main ladder program and sub ladder program), function blocks). Of these, it may be sufficient for the user if devices related to the program component that the user desires to modify are logged. Furthermore, the user may desire to exclude a specific program component from being extracted from among a plurality of program components or to add a specific program component to be extracted. Therefore, it would be convenient for the user if devices could be added or deleted from the logging targets for each program component.

上述したようにCPUユニット3や拡張ユニット4は一つ以上の機能を有している。各機能には様々なデバイスが割り付けられている。よって、これらの機能を単位として、ロギング対象からデバイスを追加又は削除できれば、ユーザにとって便利であろう。例えば、CPUユニット3の通信機能に関する望ましくないイベントが発生した場合、ユーザはCPUユニット3の通信機能に関するデバイスのデバイス値を参照することで、このイベントを解消することが容易になろう。
(プログラム作成支援装置)
As described above, the CPU unit 3 and expansion unit 4 have one or more functions. Various devices are assigned to each function. Therefore, it would be convenient for the user if devices could be added or deleted from logging targets based on these functions. For example, if an undesirable event related to the communication function of the CPU unit 3 occurs, the user can easily resolve this event by referring to the device value of the device related to the communication function of the CPU unit 3.
(Program creation support device)

プログラム作成支援装置の一例を、図7のブロック図に示す。この図に示すプログラム作成支援装置1200は、一以上のユニットで構成されたPLC1で実行されるユーザープログラムの作成を支援する。このプログラム作成支援装置1200は、PC2にユーザープログラム作成支援プログラムをロードさせて実行させて実現する他、専用のハードウェアで構築してもよい。図7に示す例では、PC2にユーザープログラム作成支援プログラムをインストールして実現した例を示している。このプログラム作成支援装置1200は、PC側CPU21と、PC側メモリ部11と、PC側記憶装置22と、表示部7と、PC側操作部8と、通信部を備える。 An example of the program creation support device is shown in the block diagram of FIG. A program creation support device 1200 shown in this figure supports creation of a user program to be executed on a PLC 1 composed of one or more units. The program creation support device 1200 may be realized by loading and executing a user program creation support program on the PC 2, or may be constructed using dedicated hardware. The example shown in FIG. 7 shows an example in which a user program creation support program is installed on the PC 2. This program creation support device 1200 includes a PC side CPU 21, a PC side memory section 11, a PC side storage device 22, a display section 7, a PC side operation section 8, and a communication section.

PC側メモリ部11はPC側CPU21が処理を実行するための作業空間である。このような作業メモリとして、RAM等が利用できる。 The PC side memory section 11 is a work space for the PC side CPU 21 to execute processing. A RAM or the like can be used as such a working memory.

PC側記憶装置22は、PC2で読み取り可能なストレージである。典型的には、PC2が備えるハードディスクなどの記憶装置であるが、固定式に限らず、可搬式の媒体やメディアとすることもできる。例えば、PLC1が備えるメモリカード36Aを、PLC1側から抜き取り、PC2側に挿入して読み取る態様としてもよい。または、PC2とネットワーク接続されたPLC1のPLC側記憶装置32にアクセスする態様としてもよい。 The PC-side storage device 22 is a storage that can be read by the PC 2. Typically, it is a storage device such as a hard disk included in the PC 2, but it is not limited to a fixed type, and can also be a portable medium or media. For example, the memory card 36A included in the PLC 1 may be removed from the PLC 1 side, inserted into the PC 2 side, and read. Alternatively, a mode may be adopted in which the PLC side storage device 32 of the PLC 1 connected to the PC 2 via a network is accessed.

このPC側記憶装置22は、運転記録データを記憶する運転記録データ記憶部36Bの機能を実現する。運転記録データは、プロジェクトデータと、ログデータを含んでいる。プロジェクトデータは、PLC1のユーザープログラム及び各ユニットのユニット構成情報を含む。ユニット構成情報には、各ユニットの機能、ユニット間の接続位置の情報等が含まれる。ログデータは、PLC1の運転時におけるデバイス値等のデータである。これらプロジェクトデータとログデータとが関連付けられた運転記録データが、運転記録データ記憶部36Bに記憶されている。 This PC-side storage device 22 realizes the function of a driving record data storage section 36B that stores driving record data. The driving record data includes project data and log data. The project data includes a user program of the PLC 1 and unit configuration information of each unit. The unit configuration information includes information on the functions of each unit, connection positions between units, and the like. The log data is data such as device values during operation of the PLC 1. Driving record data in which these project data and log data are associated is stored in the driving record data storage section 36B.

運転記録データ記憶部36Bは、PLC1の運転時に保存メモリ36に保存されたログデータと、ログデータが保存された際に、プログラム実行部514により実行されていたユーザープログラムを含むプロジェクトデータとを運転記録データとして記憶する。 The operation record data storage section 36B stores the log data saved in the storage memory 36 during operation of the PLC 1 and the project data including the user program being executed by the program execution section 514 when the log data was saved. Store as recorded data.

表示部7は、ログ表示制御部61によりログを表示させる。ログ表示制御部61は、運転記録データ記憶部36Bから運転記録データをPC側メモリ部11に読み出して、運転記録データ内のログデータとプロジェクトデータとを関連付けて表示する。なお、ログ表示制御部61は、プロジェクトデータとログデータとを、必ずしも関連付けしなくともよい。 The display unit 7 causes the log display control unit 61 to display the log. The log display control unit 61 reads the driving record data from the driving record data storage unit 36B to the PC side memory unit 11, and displays the log data and project data in the driving record data in association with each other. Note that the log display control unit 61 does not necessarily need to associate the project data and the log data.

PC側CPU21は、プロジェクト編集部50B、ログ表示制御部61、上書規制制御部50E等の機能を実現する。プロジェクト編集部50Bは、ログ表示制御部61により表示部7に表示されたプロジェクトデータの編集指示を受け付けて、このプロジェクトデータを編集する。そして編集後のプロジェクトデータを保存する際には、そのプロジェクトデータと対応するログデータとを関連付けた運転記録データとして、運転記録データ記憶部36Bに記憶される。 The PC-side CPU 21 implements functions such as a project editing section 50B, a log display control section 61, and an overwrite restriction control section 50E. The project editing section 50B receives an instruction to edit the project data displayed on the display section 7 by the log display control section 61, and edits this project data. When the edited project data is saved, the project data and the corresponding log data are stored in the driving record data storage unit 36B as driving record data.

上書規制制御部60Eは、運転記録データ記憶部36Bに記憶された運転記録データ内のプロジェクトデータに対して、プロジェクト編集部50Bにより編集された編集後のプロジェクトデータの上書きを規制する。
(上書規制制御部50E)
The overwrite restriction control unit 60E restricts overwriting of the edited project data edited by the project editing unit 50B over the project data in the driving record data stored in the driving record data storage unit 36B.
(Overwrite regulation control unit 50E)

上書規制制御部50Eは、運転記録データ記憶部36Bに記憶された運転記録データ内のプロジェクトデータに対して、プロジェクト編集部50Bにより編集された編集後のプロジェクトデータの上書きを規制する。これにより、ユーザによるプロジェクトデータ内のユーザープログラム等の修正によって意図せずプロジェクトデータ全体の信ぴょう性が損なわれる事態を回避できる。具体的には、上書規制制御部50Eが、運転記録データ記憶部36Bに記憶された運転記録データ内のプロジェクトデータに対して、プロジェクト編集部50Bにより編集された状態で上書き保存することを規制する。例えば、プロジェクト編集部50Bによりプロジェクトデータに対して上書き操作が試みられたことを検出して、表示部7上に上書き禁止ポップアップが表示される。あるいは、編集後のプロジェクトデータを保存しようとしたとき、この編集後のプロジェクトデータを、運転記録データに含まれる元のプロジェクトデータとは別のファイルとして保存する。例えば別名での保存を促すよう、保存ファイル名の入力ダイヤログを表示させたり、自動で名称を変更して新たにコピー保存させてもよい。
(運転記録データ)
The overwrite restriction control unit 50E restricts overwriting of the edited project data edited by the project editing unit 50B over the project data in the driving record data stored in the driving record data storage unit 36B. Thereby, it is possible to avoid a situation where the authenticity of the entire project data is unintentionally damaged due to the user's modification of the user program, etc. in the project data. Specifically, the overwrite restriction control unit 50E restricts the project data in the driving record data stored in the driving record data storage unit 36B from being overwritten and saved in the state edited by the project editing unit 50B. do. For example, when the project editing section 50B detects that an attempt is made to overwrite the project data, an overwrite prohibition pop-up is displayed on the display section 7. Alternatively, when attempting to save the edited project data, the edited project data is saved as a separate file from the original project data included in the driving record data. For example, a save file name input dialog may be displayed to encourage saving under a different name, or the name may be automatically changed and a new copy may be saved.
(driving record data)

運転記録データは、所定のタイミングで記録される。具体的には、トラブルが発生する可能性のある時期を指定して、この間のデータを運転記録データとしてまとめて保存しておくことで、トラブル発生時の原因解析に役立てることができる。 Driving record data is recorded at predetermined timing. Specifically, by specifying the time when a problem is likely to occur and storing the data during that period as driving record data, it can be used to analyze the cause of a problem when it occurs.

運転記録データは、複数のファイルをパッケージしたものとできる。運転記録データに含める情報は、例えば管理情報データ、プロジェクトデータ、プロジェクト識別情報、デバイスデータ、画像データ、イベントデータ等が挙げられる。管理情報データは、運転記録データに何が含まれているかの情報である。その拡張子は、例えばTMNとする。プロジェクトデータは、運転記録データの記録時点(例えばトラブル発生時)でのプロジェクトデータである。その拡張子は、例えばTPJとする。詳細については後述する。 Driving record data can be a package of multiple files. Examples of the information included in the driving record data include management information data, project data, project identification information, device data, image data, and event data. The management information data is information about what is included in the driving record data. The extension is, for example, TMN. The project data is project data at the time of recording the driving record data (for example, when a trouble occurs). The extension is, for example, TPJ. Details will be described later.

プロジェクト識別情報は、この運転記録データ記録時点でのプロジェクトデータを識別するための情報である。その拡張子は、例えばTPIとする。デバイスデータは、運転記録データの記録時点でのデバイスを記録したデータであり、デバイスの数だけ存在する。その拡張子は、例えばTDVとする。画像データは、運転記録データの記録時点の画像を記録したデータである。その拡張子は、例えばTCAとする。イベントデータは、運転記録データの記録時点に発生していたイベントやエラーを記録したデータである。その拡張子は、例えばTEVとする。これらは一例であって、この内いずれかの情報のみを運転記録データに含めてもよいし、あるいはこれ以外の情報を追加してもよい。
(プロジェクトデータの構成)
The project identification information is information for identifying the project data at the time of recording this driving record data. The extension is, for example, TPI. The device data is data recording the devices at the time of recording the driving record data, and exists as many as the number of devices. The extension is, for example, TDV. The image data is data that records an image at the time of recording the driving record data. The extension is, for example, TCA. The event data is data recording events and errors that occurred at the time the driving record data was recorded. The extension is, for example, TEV. These are just examples, and only one of these pieces of information may be included in the driving record data, or other information may be added.
(Project data structure)

プロジェクトデータは、複数のデータで構成される。データの数が多い場合は、圧縮形式で保存することが好ましい。プロジェクトデータには、プロジェクトファイル、モジュール、ファンクションブロック、ユニット設定ファイル、メール設定ファイル等を含めることができる。プロジェクトファイルは、プロジェクトの設定に関する情報である。その拡張子は、例えばkprとする。モジュールは、ラダープログラムの情報である。その拡張子は、例えばmodとする。ファンクションブロックは、部品化されたラダープログラムの情報である。その拡張子は、例えばkfbとする。ユニット設定ファイルは、ユニットの構成情報である。その拡張子は、例えばue2とする。メール設定ファイルは、メールの設定情報である。その拡張子は、例えばmilとする。これら以外にも、ユニット毎に拡張子が異なるファイルを含めてもよい。またこれらは一例であって、この内いずれかの情報のみをプロジェクトデータに含めてもよいし、あるいはこれ以外の情報を追加してもよい。 Project data consists of multiple pieces of data. If there is a large amount of data, it is preferable to save it in a compressed format. Project data can include project files, modules, function blocks, unit configuration files, email configuration files, and the like. The project file is information regarding project settings. The extension is, for example, kpr. A module is information about a ladder program. The extension is, for example, mod. A function block is information of a ladder program made into components. The extension is, for example, kfb. The unit setting file is the configuration information of the unit. The extension is, for example, ue2. The email configuration file is email configuration information. The extension is, for example, mil. In addition to these, files with different extensions may be included for each unit. Further, these are just examples, and only one of these pieces of information may be included in the project data, or other information may be added.

各データファイルの種別を示す識別情報には、ファイルの拡張子を利用できる。またファイルの拡張子を用いて、運転記録データとプロジェクトデータの関連付けを行うこともできる。例えば運転記録データについてはTMNファイルが、プロジェクトデータについてはkprファイルが、それぞれPC2上でユーザープログラム作成支援プログラムに関連付けられている。PC2上の該当するファイルをダブルクリックすることで、ユーザープログラム作成支援プログラムが起動される。この様子を図8に示す。ここでは、ユーザープログラム作成支援プログラムのプロジェクト編集部50Bは、識別情報解釈部を備えている。ここでは識別情報解釈部の例として、TPJ解釈部50B1とkpr解釈部50B2を示している。表示部7上でエクスプローラ等のファイラ画面上から、TMNファイルをダブルクリックした場合、ユーザープログラム作成支援プログラムは、圧縮形式で保存されたTPJファイルを解凍し、PC側メモリ部11上にロードする。またkprファイルをダブルクリックした場合、ユーザープログラム作成支援プログラムは、kprと同じフォルダに配置された、他の設定ファイルを合わせてPC側メモリ部11上にロードする。一方、TPJファイル及びkprファイルは、TPJ解釈部50B1とkpr解釈部50B2により共通のモデルデータとして解釈され、PC側メモリ部11上にロードされる。
(モード選択部50D)
A file extension can be used as identification information indicating the type of each data file. It is also possible to associate driving record data and project data using file extensions. For example, a TMN file for driving record data and a kpr file for project data are each associated with the user program creation support program on the PC 2. By double-clicking the corresponding file on the PC 2, the user program creation support program is started. This situation is shown in FIG. Here, the project editing section 50B of the user program creation support program includes an identification information interpretation section. Here, a TPJ interpreter 50B1 and a kpr interpreter 50B2 are shown as examples of identification information interpreters. When a TMN file is double-clicked on a filer screen such as an explorer on the display unit 7, the user program creation support program decompresses the TPJ file saved in a compressed format and loads it onto the PC side memory unit 11. Further, when the kpr file is double-clicked, the user program creation support program loads other setting files placed in the same folder as the kpr file onto the PC side memory unit 11. On the other hand, the TPJ file and the kpr file are interpreted as common model data by the TPJ interpretation section 50B1 and the kpr interpretation section 50B2, and are loaded onto the PC side memory section 11.
(Mode selection section 50D)

さらにPC側CPU21は、モード選択部50Dの機能を実現することもできる。モード選択部50Dは、編集モードや履歴再生モードを選択できる。編集モードは、プロジェクトデータを編集するモードであり、エディットモード等とも呼ばれる。また履歴再生モードは、ログ表示制御部61による表示を行うモードであり、リプレイモード等とも呼ばれる。このように、ユーザープログラム作成支援プログラムでは、一のプログラム中で動作モードを切り替えて、トラブル解決のため過去のイベントを再生させつつ、原因と思われる箇所のユーザープログラムを修正するという作業に移行することができる。また履歴再生モードと編集モードとで共通のGUIを用いることで、スムーズな作業の移行を行わせることが可能となる。
(ユーザープログラム作成支援プログラム1300)
Furthermore, the PC side CPU 21 can also realize the function of the mode selection section 50D. The mode selection section 50D can select an editing mode or a history playback mode. The edit mode is a mode for editing project data, and is also called an edit mode. Further, the history playback mode is a mode in which the log display control unit 61 performs display, and is also called a replay mode or the like. In this way, the user program creation support program switches the operating mode within one program, plays back past events in order to solve the problem, and moves on to modifying the user program at the location that is thought to be the cause. be able to. Furthermore, by using a common GUI between the history playback mode and the edit mode, it is possible to perform a smooth transition of work.
(User program creation support program 1300)

まず、モード選択部50Dで履歴再生モードを選択した場合の、ユーザープログラム作成支援プログラム1300のGUIを図9に示す。この図に示すGUIは、プロジェクト表示領域420と、ラダーモニタ450と、カメラモニタ430と、ユニットモニタ440を備えている。図9において、左欄のプロジェクト表示領域420には、プロジェクトデータ71を構成する様々な情報が表示されている。上から順に、ユニット構成(CPUユニット、モーションユニット、アナログ入力ユニット、カメラ入力拡張ユニット等)、プログラム構成(毎スキャンモジュール、定周期モジュール、ユニット間同期モジュール、ファンクションブロック、マクロ等)が表示されている。モーションユニットについては、機能設定として軸構成や軸制御の設定パラメータが表示されている。ユーザは、図9に示すGUI上において、軸構成や軸制御をダブルクリックすることで、これらの設定パラメータについて、どのような設定内容になっているかを確認することができる。また、プロジェクト表示領域420において、毎スキャンモジュールに対してMainとSubが表示されているところ、ユーザがMainをクリックすると、中央のラダーモニタ450のプログラム表示領域410に、Mainプログラムが表示される。
(履歴再生モード)
First, FIG. 9 shows the GUI of the user program creation support program 1300 when the history playback mode is selected in the mode selection section 50D. The GUI shown in this figure includes a project display area 420, a ladder monitor 450, a camera monitor 430, and a unit monitor 440. In FIG. 9, various information constituting the project data 71 is displayed in the project display area 420 in the left column. From the top, the unit configuration (CPU unit, motion unit, analog input unit, camera input expansion unit, etc.) and program configuration (every scan module, fixed cycle module, inter-unit synchronization module, function block, macro, etc.) are displayed. There is. Regarding the motion unit, the axis configuration and axis control setting parameters are displayed as function settings. By double-clicking on the axis configuration or axis control on the GUI shown in FIG. 9, the user can check the settings for these setting parameters. Furthermore, in the project display area 420, Main and Sub are displayed for each scan module, and when the user clicks on Main, the Main program is displayed in the program display area 410 of the ladder monitor 450 at the center.
(history playback mode)

次に履歴再生モードにおいて、トラブル発生時等に記録された運転記録データを再生する手順を、図10に基づいて説明する。例えば、予め保存された運転記録データのデータファイル(上述した拡張子TMNの運転記録データファイル)やプロジェクトファイル(拡張子kprのプロジェクトデータファイル)をダブルクリックすると、図10に示すユーザープログラム作成支援プログラム1300が起動されると共に、ダブルクリックされたファイルを解析して、含まれているファイルを展開したり、関連付けられた別ファイルを呼び出すなどして、運転記録データ保存時の状況が自動で再現される。あるいは、ユーザープログラム作成支援プログラム1300をユーザが起動した上で、ファイルメニューなどから、運転記録データファイル等の該当するファイルを選択して展開することもできる。 Next, a procedure for reproducing driving record data recorded when a trouble occurs in the history reproducing mode will be explained based on FIG. 10. For example, if you double-click a pre-saved driving record data file (the driving record data file with the extension TMN mentioned above) or a project file (the project data file with the extension kpr), the user program creation support program shown in FIG. 1300 is started, it analyzes the double-clicked file, expands the included file, calls another associated file, etc., and automatically reproduces the situation when the driving record data was saved. Ru. Alternatively, after starting the user program creation support program 1300, the user can select and expand a corresponding file such as a driving record data file from a file menu or the like.

この例では、運転記録データをダブルクリックした場合は、図10に示す履歴再生モードでユーザープログラム作成支援プログラム1300が起動するよう構成している。一方、プロジェクトデータをダブルクリックした場合は、図11に示す編集モードでユーザープログラム作成支援プログラム1300が起動するよう構成している。このようにユーザが選択したファイルに応じて、初期選択される動作モードを異ならせることで、想定されるユーザの操作に沿った動作モードを予め選択してスムーズな操作環境を提供できる。
(履歴再生モードと編集モードの切り替え)
In this example, the user program creation support program 1300 is configured to start in the history playback mode shown in FIG. 10 when driving record data is double-clicked. On the other hand, when project data is double-clicked, the user program creation support program 1300 is configured to start in the edit mode shown in FIG. 11. In this way, by varying the initially selected operation mode depending on the file selected by the user, it is possible to select in advance an operation mode that is in line with the expected user operation and provide a smooth operation environment.
(Switching between history playback mode and edit mode)

ユーザープログラム作成支援プログラム1300の起動後に、編集モードと履歴再生モードの2つの動作モードを切り替えるには、モード選択部50Dの一形態であるモード選択欄50D1から、切り替えたい動作モードを選択する。例えばモード選択欄50D1を、図12に示すようなプルダウンメニューで構成して、ユーザは所望の動作モードを容易に選択できる。図12の例では、「リプレイ」を選択すると履歴再生モード(リプレイモード)に、「エディタ」を選択すると編集モード(エディタモード)に、それぞれ切り替えられる。またモード選択欄50D1には、現在選択中の動作モードが表示されており、ユーザに対して現在の動作モードを告知する機能も奏している。 After starting the user program creation support program 1300, to switch between the two operating modes, edit mode and history playback mode, select the desired operating mode from the mode selection column 50D1, which is one form of the mode selection section 50D. For example, the mode selection field 50D1 may be configured with a pull-down menu as shown in FIG. 12, so that the user can easily select a desired operation mode. In the example of FIG. 12, selecting "Replay" switches to history playback mode (replay mode), and selecting "Editor" switches to editing mode (editor mode). Furthermore, the mode selection field 50D1 displays the currently selected operation mode, and also has the function of notifying the user of the current operation mode.

なおプロジェクトデータをダブルクリックして編集モードで起動したユーザープログラム作成支援プログラムを、履歴再生モードに切り替える場合、プロジェクトデータにはデバイスデータ等が指定されていないため、履歴再生モードで使用するためのデバイスデータを含む運転記録データを、別途指定するように促される。例えば、運転記録データを選択するダイヤログ画面を表示させる。 Note that when switching the user program creation support program started in edit mode by double-clicking the project data to history playback mode, the device data for use in history playback mode is not specified in the project data. You will be prompted to separately specify the driving record data including the data. For example, a dialog screen for selecting driving record data is displayed.

このように履歴再生モードにおいて、保存された運転記録データを読み込んでトラブル発生時のイベントを再生し、ユーザはトラブルの原因を推定し、これを改善するように必要な処置を検討できる。例えば、トラブルを解消できるようにラダープログラムを編集する。 In this way, in the history playback mode, the saved driving record data is read and the event when the trouble occurred is played back, allowing the user to estimate the cause of the trouble and consider necessary measures to improve it. For example, edit the ladder program to resolve the problem.

図9の履歴再生モードにおいては、ユーザープログラムの編集が禁止されるようにしている。言い換えると、運転記録データの再生すなわち閲覧が許可され、改ざんは禁止される。これによってトラブル発生時の運転記録データの信ぴょう性が確保される。なお、ユーザープログラムの編集が禁止された履歴再生モードを、ログ再生モードと呼ぶ。
(編集モード)
In the history playback mode of FIG. 9, editing of the user program is prohibited. In other words, reproduction or viewing of the driving record data is permitted, but falsification is prohibited. This ensures the reliability of driving record data when trouble occurs. Note that the history playback mode in which editing of the user program is prohibited is called the log playback mode.
(edit mode)

ここで編集モードとしたユーザープログラム作成支援プログラム1300を用いて、ユーザープログラムの編集を行う手順として、ラダープログラムを修正する例を図13~図15に基づいて説明する。この例では、ユーザープログラム作成支援プログラム1300を用いてモーションユニットの位置決め制御を行っている途中で、現在座標を示すデバイスの値が12000を超えていたら、動作をトルク制御に変更するようなユーザープログラムを検討している。ここでは、履歴再生モードでトラブルの発生原因を検証した結果、図13に示すようにプログラム表示領域410に示すラダー図のデバイス値が12000を超えてから動作を変更すると、可動アームがワークに接触してしまうことが判明したため、編集モードにおいて、しきい値を12000から10000に変更したいケースを想定する。まず、図13のユーザープログラム作成支援プログラム1300において、破線で囲む部分を選択して、PC側操作部8を構成するキーボードのEnterキーを押す等して、図14のプログラム編集画面1310を表示させる。このプログラム編集画面1310から、デバイス値入力欄1312において、値12000を、10000に修正して、「上書」ボタン1314を押下する。これにより、図15のユーザープログラム作成支援プログラム1300のプログラム表示領域410に示すように、ラダープログラムが変更される。 Here, as a procedure for editing a user program using the user program creation support program 1300 in the edit mode, an example of modifying a ladder program will be described based on FIGS. 13 to 15. In this example, a user program is created that changes the operation to torque control if the value of the device indicating current coordinates exceeds 12,000 while positioning control of the motion unit is being performed using the user program creation support program 1300. We are considering. Here, as a result of verifying the cause of the trouble in the history playback mode, as shown in FIG. 13, if the operation is changed after the device value in the ladder diagram shown in the program display area 410 exceeds 12,000, the movable arm will come into contact with the workpiece. Let's assume a case where you want to change the threshold from 12,000 to 10,000 in the edit mode because it turns out that the threshold value is 12,000. First, in the user program creation support program 1300 shown in FIG. 13, select the part surrounded by the broken line and press the Enter key on the keyboard that constitutes the PC-side operation unit 8 to display the program editing screen 1310 shown in FIG. . From this program editing screen 1310, the value 12000 is corrected to 10000 in the device value input field 1312, and the "overwrite" button 1314 is pressed. As a result, the ladder program is changed as shown in the program display area 410 of the user program creation support program 1300 in FIG.

またユーザープログラムを編集する他の例として、モーションユニットの位置決め制御のパラメータを修正する手順を、図16のユーザープログラム作成支援プログラム1300に基づいて説明する。ここでは、履歴再生モードでトラブルの発生原因を検証した結果、ワークの加速が急すぎたことが判明したため、編集モードの切り替えて、ポイントパラメータNo1に移動する際のワークの速度を減少させることを考える。まず図16のユーザープログラム作成支援プログラム1300において、左側に表示されるプロジェクト表示欄420にツリー表示されるユニット構成から、モーションユニットの「ポイントパラメータ」を選択する。この状態で、変更したいパラメータを選択し、PC側操作部8であるキーボード等から値を入力する。ここで画面右側のポイントパラメータ編集欄1320において、速度指定欄1322から、速度を低い値(例えば300mm/s)に変更する。このような操作により、ユーザープログラムを所望の値に変更できる。 As another example of editing a user program, a procedure for modifying parameters for positioning control of a motion unit will be described based on the user program creation support program 1300 in FIG. 16. Here, as a result of verifying the cause of the trouble in history playback mode, it was found that the acceleration of the workpiece was too rapid, so we decided to switch the editing mode and reduce the speed of the workpiece when moving to point parameter No. 1. think. First, in the user program creation support program 1300 of FIG. 16, the "point parameter" of the motion unit is selected from the unit configuration displayed in a tree in the project display field 420 displayed on the left side. In this state, select the parameter you want to change and input the value from the keyboard or the like that is the PC side operation section 8. Here, in the point parameter editing field 1320 on the right side of the screen, change the speed to a lower value (for example, 300 mm/s) from the speed specification field 1322. Through such operations, the user program can be changed to desired values.

このようにしてユーザープログラムを編集した結果を保存する手順を、図17~図18に基づいて説明する。ユーザープログラムを保存する際、運転記録データに含まれる元のユーザープログラムを編集してしまうと、履歴再生モードにおいてトラブル発生時のユーザープログラムを再現できなくなるため、元のユーザープログラムとは別に保存する必要がある。ここでは、別のプロジェクトデータとして保存する場合を考える。まず、図17に示すユーザープログラム作成支援プログラム1300のファイルメニュー1330のように、通常のプロジェクトと同様の手順で、プロジェクトデータの保存操作を行う。ここで、ファイルメニュー1330から「プロジェクトを別名保存」1332を選択する場合は、図18に示すように「プロジェクトの別名保存」ダイヤログ画面1340が表示され、ユーザはプロジェクト名やデータファイルの保存場所を指定するよう促される。この手順であれば、運転記録データに含まれるユーザープログラムを維持したまま、新たなプロジェクトデータとして保存される。 The procedure for saving the result of editing a user program in this way will be explained based on FIGS. 17 and 18. When saving a user program, if you edit the original user program included in the driving record data, you will not be able to reproduce the user program when a problem occurred in history playback mode, so it is necessary to save it separately from the original user program. There is. Here, we will consider the case of saving as separate project data. First, the project data is saved using the same procedure as for a normal project, as shown in the file menu 1330 of the user program creation support program 1300 shown in FIG. Here, when selecting "Save project as" 1332 from the file menu 1330, a "Save project as" dialog screen 1340 is displayed as shown in FIG. You will be prompted to specify. With this procedure, the user program included in the driving record data is preserved as new project data.

一方、図17のファイルメニュー1330において「プロジェクトを上書き保存」1334や、一般的なショートカットキーであるCtrl+Sのキーボード操作を行って上書き保存しようとすると、上書規制制御部50Eが上書き保存を制御する。すなわち、上書き保存の指示に拘わらず、図18に示す「プロジェクトの別名保存」ダイヤログ画面1340を表示させて、別名でのプロジェクトデータの保存を促す。あるいは、図17の保存画面において、上書き保存を禁止するように、該当する「プロジェクトを上書き保存」をグレーアウトさせて選択できないようにしたり、「プロジェクトを上書き保存」をファイルメニューの選択肢として表示させないようにしてもよい。あるいは、自動的にプロジェクトデータを別名で保存することもできる。例えばファイル名に「-1」等の枝番号を付すなどして、別名のファイルを自動生成する。あるいはまた「プロジェクトを上書き保存」を選択すると、上書き保存操作が禁止されていることを示す上書き禁止ポップアップを表示させてもよい。 On the other hand, if an attempt is made to overwrite and save the file menu 1330 in FIG. 17 by using the "Save Project" button 1334 or the general keyboard shortcut keys Ctrl+S, the overwrite restriction control unit 50E controls the overwrite save. . That is, regardless of the overwrite save instruction, a "save project under a different name" dialog screen 1340 shown in FIG. 18 is displayed to prompt the user to save the project data under a different name. Alternatively, on the save screen in Figure 17, to prohibit overwriting, the corresponding "Save project" may be grayed out so that it cannot be selected, or "Save project" may not be displayed as an option in the file menu. You can also do this. Alternatively, you can automatically save project data under a different name. For example, a file with a different name is automatically generated by adding a branch number such as "-1" to the file name. Alternatively, when "overwrite save project" is selected, an overwrite prohibition pop-up may be displayed indicating that overwrite save operation is prohibited.

なお、既に別名での保存を行ったユーザープログラムに対して、さらに上書き保存を指示した場合は、運転記録データに含まれる元のユーザープログラムに対する操作ではないため、そのまま上書き保存が実行される。すなわち、上述した上書き保存操作を規制する上書規制制御部50Eの動作は、トラブル発生時の運転記録データに含まれる元のプロジェクトデータやユーザープログラムが未だ別名でコピーされて保存されていない場合に実行され、一旦別名で保存されると、上書き保存操作が許容される。
(運転記録データの保存操作)
Note that if you instruct to overwrite and save a user program that has already been saved under a different name, the overwrite save will be executed as is since this is not an operation for the original user program included in the driving record data. That is, the operation of the overwrite restriction control unit 50E that restricts the overwrite storage operation described above is performed when the original project data and user program included in the driving record data at the time of trouble occurrence have not been copied and saved under a different name. Once executed and saved under a different name, overwrite save operations are allowed.
(Save operation of driving record data)

以上のように、ユーザはPC2上にあらかじめ保存された、装置のバックアッププロジェクトに基づいて、運転記録データを再生できる。また、装置のバックアッププロジェクトがない場合は、運転記録データに保存されたプロジェクトデータに基づいて、運転記録を再生できる。ユーザは履歴再生モードで運転記録データを再生することにより、そのプロジェクトデータが対象とする処理の問題個所を見つけ、編集モードにてその問題個所を修正した場合、その変更内容をPC2上に保存する操作を行うことができる。 As described above, the user can reproduce the driving record data based on the backup project of the device stored in advance on the PC 2. Furthermore, if there is no backup project for the device, the driving record can be reproduced based on the project data saved in the driving record data. By playing back the driving record data in the history playback mode, the user finds a problem in the process targeted by the project data, and when the problem is corrected in the edit mode, the changes are saved on the PC2. operations can be performed.

一方で運転記録の再生に、運転記録データ内のプロジェクトデータを使用していた場合、編集モードで編集したプロジェクトデータの保存操作実行時に、ユーザープログラム作成支援プログラムは、保存制御部で上書き保存禁止メッセージを出して、保存をブロックしてもよい。あるいは、新しいプロジェクトデータとして、PCのハードディスク等に保存してもよい。
(「上書き保存禁止」の手順)
On the other hand, if project data in the driving record data is used to play back the driving record, when executing the save operation for the project data edited in edit mode, the user program creation support program will display an overwrite save prohibition message in the save control section. You can block the save by issuing . Alternatively, the data may be saved as new project data on the hard disk of the PC.
(Procedure for "Prohibit overwriting")

このような上書規制制御部50Eによる「上書き保存禁止」処理の一例を、図19のフローチャートに基づいて説明する。まずステップS1901において、保存操作を開始をすると、ステップS1902において、運転記録データに保存されたプロジェクトデータを編集中か否かを判定する。編集中の場合は、ステップS1903において、ユーザに対して、保存できない旨のメッセージを表示し、保存処理をキャンセルする。一方、編集中でない場合は、ステップS1904に進んで保存処理を実行する。
(「新しいプロジェクトデータとして保存」の手順)
An example of such "overwrite storage prohibition" processing by the overwrite restriction control unit 50E will be described based on the flowchart of FIG. 19. First, in step S1901, when a save operation is started, it is determined in step S1902 whether or not project data saved in driving record data is being edited. If editing is in progress, in step S1903, a message indicating that saving is not possible is displayed to the user, and the saving process is canceled. On the other hand, if editing is not in progress, the process advances to step S1904 and save processing is executed.
(Procedure for "Save as new project data")

また上書規制制御部50Eによる「新しいプロジェクトデータとして保存」処理の一例を、図20のフローチャートに基づいて説明する。まずステップS2001において、保存操作を開始をすると、ステップS2002において、運転記録データに保存されたプロジェクトデータを編集中か否かを判定する。編集中の場合は、ステップS2003において、ユーザに対して、新しいプロジェクトとして保存するため、PC2上のファイル保存パスの入力を要求する。そしてステップS2004において、入力された保存パスに、プロジェクトの保存を実行する。一方、ステップS2002において編集中でない場合は、ステップS2005に進み、保存処理を実行する。なお、入力された保存パスにプロジェクトの保存を実行すると、運転記録データ内のプロジェクトデータとは異なる別のプロジェクトデータに対応する新たなファイル(拡張子はkprのままであるがファイル名が異なるファイル)が生成される。このファイルを便宜上「編集後ファイル」と呼ぶ。編集後ファイルを用いて、ログデータの再生(リプレイ)をすることも可能である。この場合、ユーザは、表示部7のUI上で編集後ファイルを開くとともに、運転記録データ内のログデータが保存されているパスを指定する。これにより、編集後ファイルに含まれるラダープログラム上でログデータを再生することができる。なお、編集後ファイルに、運転記録データ内のログデータが保存されているパスを自動的に関連付けておくことにより(パスを編集後ファイルに自動で埋め込む等)、ユーザは、表示部7のUI上でのログデータのパス指定は不要になる。また、例えば、運転記録データ内のプロジェクトデータに含まれるユーザープログラムAと、編集後ファイルに含まれるユーザープログラムBとを比較した場合に、ユーザープログラムAには記述されているがユーザープログラムBには記述されていないデバイスについては、そもそもデバイス値が表示されない一方で、ユーザープログラムBには記述されているがユーザープログラムAには記述されていないデバイスについては、運転記録データ内にデバイス値が記録されていないことを示す視覚的な表示(例えば赤塗表示など)がなされる。
(保存したプロジェクトの照合機能)
An example of the "save as new project data" process by the overwrite restriction control unit 50E will be described based on the flowchart of FIG. 20. First, in step S2001, when a save operation is started, in step S2002, it is determined whether or not project data saved in driving record data is being edited. If editing is in progress, in step S2003 the user is requested to input a file save path on the PC 2 in order to save it as a new project. Then, in step S2004, the project is saved to the input save path. On the other hand, if editing is not in progress in step S2002, the process advances to step S2005 and save processing is executed. Note that if you save the project to the input save path, a new file corresponding to different project data from the project data in the driving record data (a file with the same extension kpr but a different file name) will be created. ) is generated. For convenience, this file will be referred to as an "edited file." It is also possible to replay log data using the edited file. In this case, the user opens the edited file on the UI of the display unit 7 and specifies the path where the log data in the driving record data is saved. This allows the log data to be played back on the ladder program included in the edited file. Note that by automatically associating the edited file with the path where the log data in the driving record data is saved (such as automatically embedding the path in the edited file), the user can Specifying the log data path above is no longer necessary. Also, for example, when comparing user program A included in the project data in the driving record data and user program B included in the edited file, it is possible to see that there are some things written in user program A but not in user program B. For devices that are not described, the device value is not displayed in the first place, while for devices that are described in user program B but not in user program A, the device value is recorded in the driving record data. A visual indication (for example, a red color display) will be provided to indicate that this is not the case.
(Verification function for saved projects)

編集後のプロジェクトデータは、通常のプロジェクトデータと同様に、ユーザープログラム作成支援プログラム1300が提供する照合機能によって、現在ユーザープログラム作成支援プログラムで表示しているプロジェクトと、PC2上に保存した編集後のプロジェクトデータの間の差分を確認することができる。例えば図21のユーザープログラム作成支援プログラム1300の画面において、ファイルメニュー1330から「プロジェクト-プロジェクトの照合」1336を選択すると、指定されたプロジェクトデータの差分を自動で抽出して、ユーザープログラム作成支援プログラム1300の画面上に表示させる。例えば、照合先のプロジェクトデータに対して追加された部分や変更された部分をハイライトさせつつ、削除された部分をグレーアウトさせる。また、差分を一覧表示させてハイライトさせてもよい。一例として、図13~図15で編集したラダープログラムに対して、照合機能を実行した結果を図22に示す。図22はユーザープログラム作成支援プログラム1300でプロジェクトデータの比較表示を行う比較表示画面1350の一例を示している。この図に示す例では、ラダープログラム中で編集された項目について、ステップ番号と、照合元の値及び照合先の値を、赤文字で示している。このようにしてユーザは、参照先のプロジェクトデータ、例えばトラブル発生時のユーザープログラムに対して、編集した箇所を視覚的に把握することが容易となる。
●ロギングの設定(自動抽出と加除)
Like normal project data, the edited project data can be compared with the project currently displayed in the user program creation support program and the edited project data saved on the PC 2 using the collation function provided by the user program creation support program 1300. You can check the differences between project data. For example, on the screen of the user program creation support program 1300 in FIG. display on the screen. For example, parts that have been added to or changed from the target project data are highlighted, while deleted parts are grayed out. Alternatively, the differences may be displayed as a list and highlighted. As an example, FIG. 22 shows the results of executing the matching function on the ladder program edited in FIGS. 13 to 15. FIG. 22 shows an example of a comparison display screen 1350 for displaying a comparison of project data in the user program creation support program 1300. In the example shown in this figure, for items edited in the ladder program, the step number, collation source value, and collation destination value are shown in red. In this way, the user can easily visually grasp the edited portion of the referenced project data, for example, the user program at the time of trouble occurrence.
●Logging settings (automatic extraction and addition/subtraction)

図23は、PC2のPC側CPU21が、PC側記憶装置22に記憶されているプロジェクトデータ編集プログラムを実行することで実現される機能を示している。これらの機能の一部又はすべては、ASICやFPGA等のハードウエア回路により実現されてもよい。ASICは特定用途集積回路の略称である。FPGAはフィールドプログラマブルゲートアレイの略称である。 FIG. 23 shows functions realized by the PC-side CPU 21 of the PC 2 executing the project data editing program stored in the PC-side storage device 22. Some or all of these functions may be realized by a hardware circuit such as ASIC or FPGA. ASIC is an abbreviation for application specific integrated circuit. FPGA is an abbreviation for field programmable gate array.

図23のPC側CPU21は、プロジェクト作成部50と、ログ設定部51と、ログ表示制御部61の機能を実現する。なお本実施形態では、図23に示す機能をPC2上で実現することとしたが、本発明はこれに限られず、PLC1上で実現しても構わない。
(プロジェクト作成部50)
The PC-side CPU 21 in FIG. 23 realizes the functions of a project creation section 50, a log setting section 51, and a log display control section 61. In this embodiment, the functions shown in FIG. 23 are realized on the PC2, but the present invention is not limited to this, and may be realized on the PLC1.
(Project creation department 50)

プロジェクト作成部50は、プログラム作成部63と、機能設定部62の機能を実現する。このプロジェクト作成部50は、表示部7にプロジェクトデータ71を作成するためのUIを表示し、PC側操作部8から入力されたユーザ指示に従ってプロジェクトデータ71を作成し、PC側記憶装置22に記憶する。UIはユーザーインターフェースの略称である。プロジェクトデータ71には、ユーザープログラムと、PLC1のユニット構成情報等が含まれている。 The project creation section 50 realizes the functions of the program creation section 63 and the function setting section 62. This project creation unit 50 displays a UI for creating project data 71 on the display unit 7, creates project data 71 according to user instructions input from the PC side operation unit 8, and stores it in the PC side storage device 22. do. UI is an abbreviation for user interface. The project data 71 includes a user program, unit configuration information of the PLC 1, and the like.

プログラム作成部63は、UIを介したユーザ操作に基づいて、ユーザープログラムを構成する複数のプログラム部品(各モジュール)を作成する。機能設定部62は、CPUユニット3の機能や拡張ユニット4の機能に関する設定を実行する。例えば、機能設定部62は、CPUユニット3に設けられた機能に対していずれかのデバイスを割り付けたり、拡張ユニット4に設けられた機能に対していずれかのデバイスを割り付けたりし、機能とデバイスとの関係を示す割付情報をユニット構成情報に書き込む。なおプロジェクト作成部50は、ユーザープログラムがどのようなプログラム部品から構成されているかを示すプログラム構成情報も、プロジェクトデータ71として記憶させる。PLC1全体がどのようなユニットから構成されるかを示すユニット構成情報も、プロジェクトデータ71として記憶させる。
(ログ設定部51)
The program creation unit 63 creates a plurality of program parts (each module) that constitute a user program based on user operations via the UI. The function setting section 62 executes settings regarding the functions of the CPU unit 3 and the functions of the expansion unit 4. For example, the function setting section 62 assigns any device to a function provided in the CPU unit 3, or assigns any device to a function provided in the expansion unit 4, and assigns a function and a device. Writes allocation information indicating the relationship with the unit configuration information. Note that the project creation unit 50 also stores program configuration information indicating what kind of program parts the user program is composed of as the project data 71. Unit configuration information indicating what kind of units the entire PLC 1 is composed of is also stored as project data 71.
(Log setting section 51)

ログ設定部51は、部品指定部52と、機能指定部60と、デバイス抽出部53と、手動設定部58と、推定部59の機能を実現する。このログ設定部51は、プロジェクトデータ71を解析することで、このプロジェクトデータ71に記述されているデバイスを抽出し、抽出されたデバイスをロギング対象として設定するためのログ設定データ72を作成する。ログ設定部51は各種の機能を有している。部品指定部52は、PC側操作部8から入力されるユーザ指示に従って、デバイスの抽出対象となるプログラム部品を指定する。また部品指定部52は、PC側操作部8から入力されるユーザ指示に従って、デバイスの抽出対象から除外されるプログラム部品を指定する。 The log setting section 51 realizes the functions of a component specifying section 52, a function specifying section 60, a device extracting section 53, a manual setting section 58, and an estimating section 59. The log setting unit 51 extracts the devices described in the project data 71 by analyzing the project data 71, and creates log setting data 72 for setting the extracted devices as logging targets. The log setting section 51 has various functions. The component designation unit 52 designates a program component to be extracted from a device according to a user instruction input from the PC-side operation unit 8. Further, the component designation unit 52 designates program components to be excluded from device extraction targets in accordance with user instructions input from the PC-side operation unit 8.

デバイス抽出部53は、追加部54と、削除部55と、マージ部56と、特定部57の機能を実現する。このデバイス抽出部53は、プロジェクトデータ71を解析することでプロジェクトデータ71に記述されているデバイスを抽出し、ログ設定データ72を作成する。追加部54は、部品指定部52により抽出対象として指定されたプログラム部品を解析し、プログラム部品に記述されているデバイスを抽出し、抽出リストに追加する。 削除部55は、部品指定部52により除外対象として指定されたプログラム部品を解析し、プログラム部品に記述されているデバイスを抽出し、抽出されたデバイスを抽出リストから削除する。あるいは、削除部55は、抽出されたデバイスを除外リストに追加する。マージ部56は、複数のプログラム部品からそれぞれ抽出されたデバイスの内、重複して抽出されたデバイスを抽出リストから削除する。特定部57は、プロジェクトデータ71においてメモリカードに対する命令語を検知し、当該命令語の対象となっているデバイスを特定し、特定されたデバイスを抽出リストに追加する。 The device extracting section 53 realizes the functions of the adding section 54, the deleting section 55, the merging section 56, and the specifying section 57. The device extraction unit 53 extracts the devices described in the project data 71 by analyzing the project data 71, and creates log setting data 72. The adding unit 54 analyzes the program component specified as an extraction target by the component specifying unit 52, extracts the device described in the program component, and adds it to the extraction list. The deletion unit 55 analyzes the program component designated as an exclusion target by the component designation unit 52, extracts the device described in the program component, and deletes the extracted device from the extraction list. Alternatively, the deletion unit 55 adds the extracted device to the exclusion list. The merging unit 56 deletes duplicately extracted devices from the extraction list among the devices extracted from each of the plurality of program parts. The specifying unit 57 detects a command for a memory card in the project data 71, specifies the device targeted by the command, and adds the specified device to the extraction list.

本実施形態では、部品指定部52がプログラム部品を指定した後、追加部54が、その指定されたプログラム部品を解析することにより、ロギング対象となるデバイスを抽出・追加することとしたが、本発明はこれに限られない。例えば、追加部54は、プロジェクトデータ71に含まれる一又は複数のプログラム部品を先に解析することでデバイスを抽出し、抽出されたデバイスを抽出リストに追加した後で、部品指定部52によって指定されたプログラム部品に記述されたデバイスを抽出し、これを抽出リストへ追加するようにしてもよい。 In this embodiment, after the component specifying unit 52 specifies a program component, the adding unit 54 extracts and adds devices to be logged by analyzing the specified program component. The invention is not limited to this. For example, the adding unit 54 extracts a device by first analyzing one or more program parts included in the project data 71, adds the extracted device to an extraction list, and then specifies it using the part specifying unit 52. The device described in the program component may be extracted and added to the extraction list.

同様にして、削除部55は、プロジェクトデータ71に含まれる一又は複数のプログラム部品を先に解析することで抽出リストを作成した後で、部品指定部52によって指定されたプログラム部品に記述されたデバイスを抽出し、これを抽出リストから削除するようにしてもよい。 Similarly, the deletion unit 55 creates an extraction list by first analyzing one or more program parts included in the project data 71, and then deletes the information written in the program parts specified by the part specification unit 52. The device may be extracted and removed from the extraction list.

なお、本実施形態では、説明の便宜上、追加部54と削除部55を分けているが、一つの機能ブロックであってもよいことは言うまでもない。 Note that in this embodiment, for convenience of explanation, the adding section 54 and the deleting section 55 are separated, but it goes without saying that they may be one functional block.

手動設定部58は、PC側操作部8を通じて入力されるユーザ指示に従って一つのデバイスや、関連した一連のデバイスを抽出リストに追加する。推定部59は、デバイス抽出部53により記録対象として抽出されたデバイスの数に基づきPLC1によるデバイス値の記録がユーザープログラムの実行に与える影響を推定する。ロギングによってデバイス値の数に相関した遅延時間がスキャンタイムに加算される。よって、推定部59は、デバイス値の数に所定係数を乗算することで遅延時間を求め、遅延時間を推定結果として表示部7に表示してもよい。この遅延時間はスキャンタイムの伸びと呼ばれてもよい。 The manual setting unit 58 adds one device or a series of related devices to the extraction list according to user instructions input through the PC-side operation unit 8. The estimation unit 59 estimates the influence that the recording of device values by the PLC 1 has on the execution of the user program based on the number of devices extracted as recording targets by the device extraction unit 53. Logging adds a delay time correlated to the number of device values to the scan time. Therefore, the estimation unit 59 may calculate the delay time by multiplying the number of device values by a predetermined coefficient, and display the delay time on the display unit 7 as the estimation result. This delay time may be referred to as scan time elongation.

機能指定部60は、PC側操作部8から入力されるユーザ指示に従って、デバイスの抽出対象となるCPUユニット3の機能や拡張ユニット4の機能を指定する。また、機能指定部60は、PC側操作部8から入力されるユーザ指示に従って、デバイスの抽出対象から除外されるCPUユニット3の機能や拡張ユニット4の機能を指定する。追加部54は、機能指定部60により抽出対象として指定された機能のユニット構成情報を解析し、ユニット構成情報により当該機能に割り付けられたデバイスを抽出し、抽出リストに追加する。 削除部55は、機能指定部60により除外対象として指定された機能のユニット構成情報を解析し、ユニット構成情報により当該機能に割り付けられているデバイスを抽出し、抽出されたデバイスを抽出リストから削除する。マージ部56は、複数の機能のそれぞれについて抽出されたデバイスの内、重複して抽出されたデバイスを抽出リストから削除する。特定部57は、プロジェクトデータ71においてメモリカードに対する命令語を検知し、当該命令語の対象となっているデバイスを特定し、特定されたデバイスを抽出リストに追加する。 The function specifying section 60 specifies the function of the CPU unit 3 and the function of the expansion unit 4 from which devices are to be extracted, according to user instructions input from the PC-side operation section 8 . Further, the function specifying unit 60 specifies the functions of the CPU unit 3 and the functions of the expansion unit 4 to be excluded from the device extraction target according to user instructions input from the PC-side operation unit 8. The adding unit 54 analyzes the unit configuration information of the function specified as an extraction target by the function specifying unit 60, extracts the device assigned to the function based on the unit configuration information, and adds it to the extraction list. The deletion unit 55 analyzes the unit configuration information of the function specified as an exclusion target by the function specification unit 60, extracts the device assigned to the function based on the unit configuration information, and deletes the extracted device from the extraction list. do. The merging unit 56 deletes duplicately extracted devices from the extraction list among the devices extracted for each of the plurality of functions. The specifying unit 57 detects a command for a memory card in the project data 71, specifies the device targeted by the command, and adds the specified device to the extraction list.

ログ表示制御部61は、PLC1において生成されたログデータ73を、ログデータ保存部74に保存する。ログデータ保存部74は、メモリカード36A等が利用できる。ログデータ保存部74に保存されたログデータ73を、メモリカード36Aを介して読み出し、表示部7にログデータ73を表示する。例えば、ログ表示制御部61は、ログデータ73に記録されているデバイス値と、プロジェクトデータ71のプログラム部品とを関連付けて表示部7に表示してもよい。ログ表示制御部61は、プログラマブルロジックコントローラ用のエンジニアリングツールの中核をなす。またログデータ73は、デバイス値の他、カメラ部で撮像した画像データ等を含めてもよい(詳細は後述)。これらプロジェクトデータとログデータを含めて運転記録データとしてパッケージ化して保存する。あるいはプロジェクトデータとログデータとを関連付けて別々のファイルで保存し、プロジェクトデータ又はログデータの一方を開くと、他方のファイルも関連付け情報を参照して読み出し可能としてもよい(詳細は後述)。
●ロギングの実行
The log display control unit 61 stores the log data 73 generated in the PLC 1 in the log data storage unit 74. As the log data storage section 74, a memory card 36A or the like can be used. The log data 73 stored in the log data storage section 74 is read out via the memory card 36A, and the log data 73 is displayed on the display section 7. For example, the log display control section 61 may display the device values recorded in the log data 73 and the program components of the project data 71 in association with each other on the display section 7 . The log display control unit 61 forms the core of an engineering tool for programmable logic controllers. In addition to device values, the log data 73 may also include image data captured by a camera unit (details will be described later). These project data and log data are packaged and saved as operation record data. Alternatively, project data and log data may be associated and saved as separate files, and when either the project data or the log data is opened, the other file may also be readable by referring to the association information (details will be described later).
● Executing logging

図24はCPUユニット3のPLC側CPU31の機能を示している。これらの機能の一部又はすべてはASICやFPGA等のハードウエア回路により実現されてもよい。ASICは特定用途集積回路の略称である。FPGAはフィールドプログラマブルゲートアレイの略称である。 FIG. 24 shows the functions of the PLC side CPU 31 of the CPU unit 3. Some or all of these functions may be realized by a hardware circuit such as ASIC or FPGA. ASIC is an abbreviation for application specific integrated circuit. FPGA is an abbreviation for field programmable gate array.

PLC側CPU31は、PC2から受信したプロジェクトデータ71とログ設定データ72をPLC側記憶装置32に記憶しているものとする。実行部80は、ユーザープログラムを繰り返し実行するラダー実行エンジン80aと、このラダー実行エンジン80aを制御したり、拡張ユニット4との入出力リフレッシュを実行したりするユニット制御部80bと、を有している。実行部80のラダー実行エンジン80aは、プロジェクトデータ71に含まれるユーザープログラムを繰り返し実行し、ユーザープログラムに従って拡張ユニット4を制御する。なお、実行部80のラダー実行エンジン80aは、ユーザープログラムに従って、デバイス部34のCPUユニットデバイス部34aに保持されている出力系のデバイスにデバイス値を書き込んだり、CPUユニットデバイス部34aに保持されている入力系のデバイスからデバイス値を読み込んだりする。 It is assumed that the PLC side CPU 31 stores the project data 71 and log setting data 72 received from the PC 2 in the PLC side storage device 32. The execution unit 80 includes a ladder execution engine 80a that repeatedly executes a user program, and a unit control unit 80b that controls the ladder execution engine 80a and performs input/output refresh with the expansion unit 4. There is. The ladder execution engine 80a of the execution unit 80 repeatedly executes the user program included in the project data 71, and controls the expansion unit 4 according to the user program. Note that the ladder execution engine 80a of the execution unit 80 writes device values to output devices held in the CPU unit device unit 34a of the device unit 34, and writes device values to output devices held in the CPU unit device unit 34a according to the user program. Read device values from input devices.

一方で、実行部80のユニット制御部80bは、入出力リフレッシュにより取得した拡張ユニット4に関するデバイス値を、拡張ユニットデバイス部34bに読み書きする。また、CPUユニット3と拡張ユニット4は、ユニット間バス90によって電気的に接続されており、ユニット制御部80bは、このユニット間バス90における通信制御を行う機能、いわゆるバスマスタとしての機能を有している。ユニット制御部80bがバスマスタとして機能する場合には、図23を用いて説明したユニット構成情報、すなわち、PLC1全体がどのようなユニットから構成されるかを示す情報に基づいて、各拡張ユニット4とリフレッシュ通信を行う。 On the other hand, the unit control section 80b of the execution section 80 reads and writes the device value related to the expansion unit 4 obtained by input/output refresh to and from the expansion unit device section 34b. Further, the CPU unit 3 and the expansion unit 4 are electrically connected by an inter-unit bus 90, and the unit control section 80b has a function of controlling communication on this inter-unit bus 90, that is, a so-called bus master function. ing. When the unit control section 80b functions as a bus master, each expansion unit 4 and Perform refresh communication.

記録部81は、ログ設定データ72に従ってデバイス部34(CPUユニットデバイス部34a又は拡張ユニットデバイス部34b)からデバイス値を取得したり、拡張ユニット4のバッファメモリからデバイス値を取得したりして、ログデータ73としてメモリ(例えばリングバッファ)に書き込む。上述されたように、記録部81は、END処理の際等に、ロギング処理を実行する。 The recording unit 81 acquires a device value from the device unit 34 (CPU unit device unit 34a or expansion unit device unit 34b) according to the log setting data 72, or acquires a device value from the buffer memory of the expansion unit 4, It is written as log data 73 in a memory (for example, a ring buffer). As described above, the recording unit 81 executes the logging process during the END process and the like.

END処理におけるロギング処理について、更に詳細に説明する。ログ設定データ72には、部品指定部52によって指定されたプログラム部品に記述されたデバイスや、機能指定部60によって指定された機能(例えばユニットモニタによる監視の対象)に割り付けられたデバイスが、ロギング対象として含まれている。前者のデバイスについては、END処理の際に、ログデータ73に書き込む一方で、後者のデバイスについては、END処理の際に、拡張ユニット4から対象となるデバイス(UG)のデバイス値を読み出して、ログデータ73に書き込む。 The logging process in the END process will be explained in more detail. The log setting data 72 includes devices written in program parts specified by the component specification section 52 and devices assigned to functions specified by the function specification section 60 (for example, targets for monitoring by a unit monitor). Included as a target. For the former device, the device value of the target device (UG) is read from the expansion unit 4 during the END process, and for the latter device, the device value is written to the log data 73 during the END process. Write to log data 73.

ここで、モータの現在座標や指令座標の更新周期(いわゆる制御周期)は、ラダープログラムのスキャン周期と比べて格段に短い。したがって、本実施形態では、スキャン周期と同期してUGのデバイス値を読み出すようにしているので、全ての現在座標や指令座標がログデータ73に書き込まれるわけではない。しかし、本発明はこれに限られず、例えば、拡張ユニット4のメモリに、制御周期ごとに現在座標や指令座標を格納していき、スキャン周期のタイミングで、それまで格納した複数の現在座標や指令座標等を読み出すように構成することも可能である。 Here, the update cycle (so-called control cycle) of the current coordinates and command coordinates of the motor is much shorter than the scan cycle of the ladder program. Therefore, in this embodiment, since the device values of the UG are read out in synchronization with the scan cycle, not all current coordinates and command coordinates are written to the log data 73. However, the present invention is not limited to this, and for example, current coordinates and command coordinates are stored in the memory of the expansion unit 4 for each control cycle, and at the timing of the scan cycle, a plurality of previously stored current coordinates and command coordinates are stored in the memory of the expansion unit 4. It is also possible to configure it to read out coordinates and the like.

また、記録部81は、時刻管理部83により保持されている時刻情報をログデータ73の各レコードに付与する。これによりログデータ73には時系列にデバイス値が並べられる。 Furthermore, the recording unit 81 adds time information held by the time management unit 83 to each record of the log data 73. As a result, device values are arranged in chronological order in the log data 73.

ロギング対象となるデバイスは、基本的に、ログ設定データ72のロギング対象リストによって指定されるが、検知部82によって追加のデバイスが指定されてもよい。検知部82は、例えば、デバイス部34に含まれているいずれかのデバイスに対する外部機器からのデバイス値の書き換えを検知してもよい。一般にデバイス値はユーザープログラムに従って書き換えられる場合と、外部機器によって書き換えられることがある。このような書き換えはユーザープログラムを解析するだけでは事前に把握することができない。記録部81は、検知部82によりデバイス値の書き換えが検知されたデバイスをロギング対象に追加してもよい。一般に外部機器からのデバイス値の書き換えは、ユーザにとって想定外の事象の原因となりやすい。よって、記録部81は、外部機器により書き換えられたデバイス値をロギングすることで、ユーザによるプログラムの改良に役立つであろう。 Devices to be logged are basically designated by the logging target list of the log setting data 72, but additional devices may be designated by the detection unit 82. The detection unit 82 may detect, for example, rewriting of a device value from an external device to any device included in the device unit 34. Generally, device values may be rewritten according to a user program or may be rewritten by an external device. Such rewriting cannot be detected in advance simply by analyzing the user program. The recording unit 81 may add a device whose device value has been detected to be rewritten by the detection unit 82 as a logging target. Generally, rewriting device values from an external device tends to cause unexpected events for the user. Therefore, the recording unit 81 will be useful for the user to improve the program by logging the device values rewritten by the external device.

ところで、END処理において、ユーザープログラムとは無関係に発行されるUG読み出し命令が発行されることがある。UGはバッファメモリを示すデバイス種別である。検知部82は、ユーザープログラムとは無関係に発行されるUG読み出し命令を検知してもよい。記録部81は、検知部82により検知されたUG読み出し命令の対象となっているバッファメモリを特定し、特定したバッファメモリを記録対象として追加してもよい。この拡張ユニット4がモーションユニットである場合、このようなバッファメモリには、トルク値や現在座標位置等が記憶されている。 By the way, in the END process, a UG read command may be issued regardless of the user program. UG is a device type indicating a buffer memory. The detection unit 82 may detect a UG read command issued regardless of the user program. The recording unit 81 may identify the buffer memory that is the target of the UG read command detected by the detection unit 82, and add the identified buffer memory as a recording target. When the expansion unit 4 is a motion unit, such a buffer memory stores torque values, current coordinate positions, and the like.

検知部82はFPGA等により実現されてもよい。実行部80はASICにより実現されてもよい。この場合、実行部80はPLC側記憶装置32に対してアドレス線を用いて読み出し/書き込み対象となっているデバイスのアドレスを指定する。よって、検知部82はこのアドレス線を監視することで、動的に、デバイス値を更新されたデバイスを検知してもよい。これはユーザープログラムに記述されていないデバイスを記録対象として追加する際に有用であろう。 The detection unit 82 may be realized by FPGA or the like. The execution unit 80 may be realized by ASIC. In this case, the execution unit 80 specifies the address of the device to be read/written to the PLC side storage device 32 using an address line. Therefore, the detection unit 82 may dynamically detect a device whose device value has been updated by monitoring this address line. This may be useful when adding a device that is not described in the user program as a recording target.

検知部82は実行部80に設けられてもよい。この場合、実行部80は、デバイス部34の特定のデバイスに対してデバイス値を書き込むと共に、このデバイス値とデバイス名(デバイス番号)をログデータ73に書き込んでもよい。この手法は、ユーザープログラムに記述されていないデバイスであって、動的に割り付け割れるデバイスを記録対象として追加する際に有用であろう。 The detection unit 82 may be provided in the execution unit 80. In this case, the execution unit 80 may write a device value to a specific device in the device unit 34, and may also write this device value and the device name (device number) to the log data 73. This method is useful when adding a device that is not described in the user program and can be dynamically allocated as a recording target.

このように記録部81はログ設定データ72に含まれているデバイスリストとは無関係にデバイスを記録してもよい。極端な場合、ユーザはログ設定データ72を作成せずに、ログデータ73を取得可能となる。例えば、実行部80が起動すると、実行部80は、デバイス部34におけるすべてのデバイスからデバイス値を取得する。検知部82は、デバイスを監視しているため、実行部80がデバイス値を読み出したことを検知し、記録部81にデバイス値を読み出されたデバイスの情報(アドレス情報)を伝達する。記録部81は、検知部82により伝達されたアドレス情報に基づきデバイス部34に含まれているすべてのデバイスからデバイス値を読み出してログデータ73に書き込む。それ以降もデバイス部34へのアクセスを検知部82が検知するたびに、記録部81はデバイス値をロギングする。 In this way, the recording unit 81 may record devices regardless of the device list included in the log setting data 72. In an extreme case, the user can obtain log data 73 without creating log setting data 72. For example, when the execution unit 80 is activated, the execution unit 80 acquires device values from all devices in the device unit 34. Since the detection unit 82 monitors the device, it detects that the execution unit 80 has read the device value, and transmits information (address information) about the device from which the device value has been read to the recording unit 81. The recording unit 81 reads device values from all devices included in the device unit 34 based on the address information transmitted by the detection unit 82 and writes them in the log data 73. Thereafter, every time the detection section 82 detects an access to the device section 34, the recording section 81 logs the device value.

ところで、記録部81はスキャン周期ごと、又は所定の収集周期ごとにデバイス値をログデータ73に書き込んでもよい。例えば、一周期内で検知部82が複数回にわたるデバイスへのアクセスを検知したとしても、記録部81は、最後のアクセスが検知されたときのデバイス値だけでログデータ73に書き込んでもよい。これにより、ログデータ73のデータサイズを削減することが可能となる。 By the way, the recording unit 81 may write the device value to the log data 73 every scan cycle or every predetermined collection cycle. For example, even if the detection unit 82 detects multiple accesses to the device within one cycle, the recording unit 81 may write to the log data 73 only the device value when the last access was detected. This makes it possible to reduce the data size of the log data 73.

実行部80はデバイスを保持するキャッシュを有していてもよい。この場合、検知部82はキャッシュを監視することで、デバイスの書き込みを検知してもよい。 The execution unit 80 may have a cache that holds devices. In this case, the detection unit 82 may detect writing by the device by monitoring the cache.

ログ設定データ72には記録対象となるデバイスを示すデバイスリストが含まれているが、記録の除外対象となるデバイスを示すデバイスリストが含まれていてもよい。この場合、記録部81は、除外対象となるデバイスへのアクセスを検知部82が検知すると、そのデバイスについてのデバイス値の記録をスキップする。 The log setting data 72 includes a device list indicating devices to be recorded, but may also include a device list indicating devices to be excluded from recording. In this case, when the detection unit 82 detects an access to a device to be excluded, the recording unit 81 skips recording the device value for that device.

検知部82は実行部80による拡張ユニット4のバッファメモリへのアクセスを検知してもよい。この場合、実行部80は、拡張ユニット4のバッファメモリから読み出したデバイス値をPLC側記憶装置32内に確保されたバッファ等に書き込む。記録部81はバッファからデバイス値を読み出してログデータ73に書き込む。 The detection unit 82 may detect access by the execution unit 80 to the buffer memory of the expansion unit 4. In this case, the execution unit 80 writes the device value read from the buffer memory of the expansion unit 4 into a buffer etc. secured within the PLC side storage device 32. The recording unit 81 reads the device value from the buffer and writes it into the log data 73.

実行部80はユーザープログラムを繰り返し実行し、ユーザープログラムに従ってデバイス値を書き換える。検知部82が実行部80に実装されている場合、実行部80はデバイス値を書き換える命令語を検知すると、その命令語と共にデバイス値を記録部81に出力する。記録部81は、命令語、デバイス値及びタイムスタンプ(デバイス値を取得した時刻)をログデータ73に書き込んでもよい。 The execution unit 80 repeatedly executes the user program and rewrites device values according to the user program. When the detection unit 82 is installed in the execution unit 80, when the execution unit 80 detects a command word for rewriting a device value, it outputs the device value together with the command word to the recording unit 81. The recording unit 81 may write the command word, the device value, and the time stamp (time when the device value was acquired) to the log data 73.

ところで、ログ設定データ72には、ログデータ73のデータ形式(例:バイナリー形式やテキスト形式)が含まれてもよい。データ形式としては、10進数16ビット、10進数32ビット、±10進数16ビット、±10進数32ビット、16進数16ビット、16進数32ビット、文字列、Float、DoubleFloat等が、デバイスごとに設定されてもよい。このようなデータ形式はプログラム部品における命令語を解析することで判別可能である。 Incidentally, the log setting data 72 may include the data format (eg, binary format or text format) of the log data 73. Data formats include 16-bit decimal, 32-bit decimal, 16-bit decimal, 32-bit decimal, 16-bit hexadecimal, 32-bit hexadecimal, character string, Float, DoubleFloat, etc., set for each device. may be done. Such a data format can be determined by analyzing the instruction words in the program component.

出力部84は、ユーザープログラムの実行が終了したとき、或いは、メモリカードへの保存トリガリレーがONした場合等、所定の出力条件が満たされると、プロジェクトデータ71、ログデータ73、画像データをメモリカード36Aに書き込む。所定の出力条件が満たされるまでは、ログデータ73がメモリ(例えばリングバッファ)に記録されていき、容量が一杯になると、一番古いログデータ73が消去され、新しいログデータ73が追加記録されていく(いわゆるFIFO形式で記録する)。このメモリカード36AはCPUユニット3から取り外されて、PC2の装着部に装着される。これにより、PC2の表示部7にログデータ73が表示されるようになる。なお、出力部84は、PLC側通信部33を介してPC2やクラウド等にログデータ73を送信してもよい。 The output unit 84 outputs the project data 71, log data 73, and image data to the memory when a predetermined output condition is met, such as when the execution of the user program is finished or when the save trigger relay to the memory card is turned on. Write to card 36A. Until a predetermined output condition is met, log data 73 is recorded in a memory (for example, a ring buffer), and when the capacity is full, the oldest log data 73 is deleted and new log data 73 is added and recorded. (records in so-called FIFO format). This memory card 36A is removed from the CPU unit 3 and installed in the mounting section of the PC 2. As a result, the log data 73 comes to be displayed on the display section 7 of the PC 2. Note that the output unit 84 may transmit the log data 73 to the PC 2, the cloud, etc. via the PLC side communication unit 33.

なお、本実施形態では、所定の出力条件が満たされたときに、ログデータ73等をメモリカード36Aに書き込むこととしたが、本発明はこれに限られず、例えば、内部メモリ37(フラッシュメモリやハードディスク等の不揮発性メモリ)に保存しても構わない。また、少なくともログデータ73については、所定の出力条件が満たされたときにメモリカード36A又は内部メモリ37に保存される必要がある一方、プロジェクトデータ71については、所定の出力条件が満たされたときに限られない。例えば、PLC1が設定モード(PROGRAMモード)から運転モード(RUNモード)になったタイミングで、予めメモリカード36Aや内部メモリ37に保存しておいてもよい。
●ユニット構成情報の作成
In this embodiment, the log data 73 and the like are written to the memory card 36A when a predetermined output condition is met, but the present invention is not limited to this, and for example, the internal memory 37 (flash memory, etc.) is written to the memory card 36A. It may also be saved in a non-volatile memory such as a hard disk. Furthermore, at least the log data 73 needs to be saved in the memory card 36A or internal memory 37 when a predetermined output condition is met, while the project data 71 needs to be saved when a predetermined output condition is met. Not limited to. For example, the information may be stored in the memory card 36A or internal memory 37 in advance at the timing when the PLC 1 changes from the setting mode (PROGRAM mode) to the operation mode (RUN mode).
●Creation of unit configuration information

図25は機能設定部62が実行するユニット構成情報の作成処理(ユニット設定)を説明する図である。機能設定部62はユニットエディタと呼ばれてもよい。機能設定部62はユニットエディタの起動を支持されると、ユニット設定UI150を表示部7に表示する。名称欄151は各ユニットの名称(例:型番等)を表示する欄である。なお、各ユニットには自動的にユニット番号が付与される。この例では、CPUユニット3にユニット番号として“0”が付与されている。入力領域欄152は入力系のデバイスを割り付けるための欄である。この例では、CPUユニット3に入力系のデバイスとしてR000からR015までのデバイスが割り付けられている。出力領域欄153は出力系のデバイスを割り付けるための欄である。この例では、CPUユニット3に出力系のデバイスとしてR500からR507までのデバイスが割り付けられている。占有領域欄154は、入出力混合系のデバイスを割り付けるための欄である。エンドユニットは、いわゆる終端ユニットである。ユーザはPC側操作部8を通じて拡張ユニット4の種類、接続順番、割り付けられるデバイスを設定する。機能設定部62は、拡張ユニット4の種類、接続順番(ユニット番号)、CPUユニット3と拡張ユニット4とのそれぞれに割り付けられるデバイスを示す情報をユニット構成情報に格納する。ユニット構成情報はユニット設定情報と呼ばれてもよい。ここでは、ユニットごとにデバイスが割り付けられているが、各ユニットの機能ごとにデバイスが割り付けられてもよい。機能設定部62はユニット構成情報をプロジェクトデータ71の一部として管理している。 FIG. 25 is a diagram illustrating the unit configuration information creation process (unit setting) executed by the function setting section 62. The function setting section 62 may be called a unit editor. When the function setting section 62 receives permission to start the unit editor, it displays the unit setting UI 150 on the display section 7. The name column 151 is a column for displaying the name (eg, model number, etc.) of each unit. Note that each unit is automatically assigned a unit number. In this example, "0" is assigned to the CPU unit 3 as a unit number. The input area column 152 is a column for allocating input devices. In this example, devices R000 to R015 are assigned to the CPU unit 3 as input devices. The output area column 153 is a column for allocating output-related devices. In this example, devices R500 to R507 are assigned to the CPU unit 3 as output devices. The occupied area column 154 is a column for allocating mixed input/output type devices. The end unit is a so-called terminal unit. The user sets the type of expansion unit 4, connection order, and assigned device through the PC-side operation unit 8. The function setting section 62 stores information indicating the type of expansion unit 4, the connection order (unit number), and the devices allocated to each of the CPU unit 3 and expansion unit 4 in the unit configuration information. Unit configuration information may be called unit setting information. Here, devices are assigned to each unit, but devices may be assigned to each function of each unit. The function setting section 62 manages unit configuration information as part of the project data 71.

このようにユニット構成情報には各ユニットに割り付けられているデバイスを示す情報や各機能に割り付けられているデバイスを示す情報が含まれている。そのため、デバイス抽出部53はユニット構成情報を参照することで、各ユニットに割り付けられているデバイスや各機能に割り付けられているデバイスを抽出することができる。
<大容量データのロギング>
In this way, the unit configuration information includes information indicating devices assigned to each unit and information indicating devices assigned to each function. Therefore, by referring to the unit configuration information, the device extraction unit 53 can extract the devices assigned to each unit and the devices assigned to each function.
<Logging large amounts of data>

フィールドデバイス10としてカメラ部98が存在する。ユーザはワークや制御対象の状態をカメラ部98により取得し、画像とデバイス値とを対比しながら、ユーザープログラムを改良することを望むことがある。したがって、相互に関連した画像とデバイス値とをどのように管理するかが問題となる。なぜなら、画像は拡張ユニット4により取得され、デバイス値はCPUユニット3によって取得されることが一般的だからである。さらに、画像の取得周期と、デバイス値の取得周期とは異なることが一般的である。このような事情から画像等の大容量データと、デバイス値のような比較的に小容量のデータとをどのように紐付けて管理するかが問題となる。 A camera section 98 exists as the field device 10. The user may desire to improve the user program by acquiring the state of the workpiece or the controlled object using the camera unit 98 and comparing the image with device values. Therefore, the problem is how to manage images and device values that are related to each other. This is because images are generally acquired by the expansion unit 4 and device values are acquired by the CPU unit 3. Furthermore, the image acquisition cycle and the device value acquisition cycle are generally different. Under these circumstances, a problem arises as to how to link and manage large-capacity data such as images and relatively small-capacity data such as device values.

図26はCPUユニット3のPLC側CPU31の機能を示している。すでに説明された箇所には同一の参照符号が付与されている。この例では記録部81は収集部92aを有している。収集部92aは、所定の収集開始条件が満たされると、デバイス部34に保持されているデバイス値の内、ログ設定データ72により指定されたデバイス値をデバイス部から読み出すと共に、時刻管理部83aから時刻情報を取得する。収集部92aはデバイス値と時刻情報とを関連付けて一時記録部91aに格納する。なお、収集部92aは、ログ設定データ72により指定された収集周期(例:スキャン周期)毎にデバイス値と時刻情報とを取得して一時記録部91aに格納する。一時記録部91aには、リングバッファが好適に採用される。リングバッファが採用されている理由は、リングバッファに記憶されているすべてのデータがログデータ73としてメモリカード36Aに保存されるわけではないからである。例えば、保存部93は、所定の保存条件が満たされたときに、リングバッファの一時記録部91aからデバイス値と時刻情報とを読み出し、ログデータ73を作成してメモリカード36Aに保存してもよい。同様に、保存部93は、所定の保存条件が満たされたときに、拡張ユニット4から大容量データと時刻情報とを読み出し、ログデータ73を作成してメモリカード36Aに保存してもよい。保存部93は、上述したデバイス値及び時刻情報と、上述した大容量データ及び時刻情報とを、対応付けて保存する。ここで、「対応付けて」保存とは、PC2にて再生しやすい形で保存されていればよく、例えば、複数のファイルを対応付けたファイル管理がなされていてもよい。具体的に説明すると、メモリカード36Aにおいて、特定のフォルダの下に、デバイス値及び時刻情報が格納された第1サブフォルダと、大容量データ及び時刻情報が格納された第2サブフォルダとが置かれている場合には、特定のフォルダまでのパス(ディレクトリパス)が共通フラグとなり、この共通フラグを使って、第1サブフォルダ内のファイルと第2サブフォルダ内のファイルを「対応付けて」保存することが可能になる。また、上述した特定のフォルダと同じレベル(ディレクトリ)に置かれた別フォルダがある場合、その別フォルダは、他のタイミングで保存されたデータパッケージを意味する。もちろん、この別フォルダの下にも上述同様のサブフォルダが置かれている。このように、保存部93は、上述したデバイス値及び時刻情報と、上述したデータ(大容量データ)及び時刻情報とを、共通フラグ(所定のディレクトリパス)により識別される複数のファイルに格納し、それら複数のファイルを保存してもよい。その他、例えば、共通フラグとしてファイル名を採用し、同一又は対応するファイル名をもつファイルを生成することで、「対応付けて」保存することも可能である。他にも例えば、時刻情報をキーとして、デバイス値とデータ(大容量データ)を対応付けてリスト化し、これを1つのファイルに纏めることによっても、「対応付けて」保存することが可能である。なお、本実施形態では、監視機器からのデータの一例として大容量データを考えたが、他にも例えば、モーションデータや通信データ、音声データ等の連続データであってもよいことは言うまでもない。送信部94は、PC2やクラウド等にログデータ73を送信してもよい。リングバッファの一時記録部91aが満杯になると、収集部92aは、リングバッファに保持されている最も古い情報に対して、最も新しい情報を上書きする。 FIG. 26 shows the functions of the PLC side CPU 31 of the CPU unit 3. The same reference numerals are given to parts that have already been explained. In this example, the recording section 81 has a collecting section 92a. When a predetermined collection start condition is satisfied, the collection unit 92a reads out the device value specified by the log setting data 72 from among the device values held in the device unit 34, and also reads the device value from the time management unit 83a. Get time information. The collection unit 92a associates the device value and time information and stores them in the temporary storage unit 91a. Note that the collection unit 92a acquires device values and time information at every collection cycle (eg, scan cycle) specified by the log setting data 72, and stores them in the temporary recording unit 91a. A ring buffer is preferably employed as the temporary recording section 91a. The reason why a ring buffer is employed is that not all data stored in the ring buffer is saved as log data 73 in the memory card 36A. For example, when a predetermined storage condition is met, the storage unit 93 reads the device value and time information from the temporary storage unit 91a of the ring buffer, creates log data 73, and stores it in the memory card 36A. good. Similarly, when a predetermined storage condition is met, the storage unit 93 may read the large-capacity data and time information from the expansion unit 4, create log data 73, and store the log data 73 in the memory card 36A. The storage unit 93 stores the above-mentioned device value and time information, and the above-mentioned large-capacity data and time information in association with each other. Here, "storing in association" means that the files may be saved in a format that is easy to play on the PC 2, and for example, file management may be performed in which a plurality of files are associated with each other. Specifically, in the memory card 36A, a first subfolder in which device values and time information are stored and a second subfolder in which large capacity data and time information are stored are placed under a specific folder. If so, the path (directory path) to a specific folder becomes a common flag, and this common flag can be used to "correspond" and save files in the first subfolder and files in the second subfolder. It becomes possible. Further, if there is another folder placed at the same level (directory) as the above-mentioned specific folder, that other folder means a data package saved at another time. Of course, subfolders similar to those described above are also placed under this other folder. In this way, the storage unit 93 stores the above-mentioned device value and time information, and the above-mentioned data (large capacity data) and time information in a plurality of files identified by the common flag (predetermined directory path). , you may save multiple files. In addition, for example, it is also possible to save files in a "corresponding manner" by using a file name as a common flag and generating files with the same or corresponding file names. For example, it is also possible to associate device values and data (large amount of data) using time information as a key, create a list, and compile them into a single file to save them in an "associated" manner. . In this embodiment, large-capacity data is considered as an example of data from the monitoring equipment, but it goes without saying that continuous data such as motion data, communication data, audio data, etc. may also be used. The transmitter 94 may transmit the log data 73 to the PC 2, the cloud, or the like. When the temporary recording section 91a of the ring buffer becomes full, the collection section 92a overwrites the oldest information held in the ring buffer with the newest information.

ここでは一時記録部91aに、バッファの一例としてリングバッファが採用されているが、これは一例にすぎない。バッファとしては、FIFO形式のバッファが採用されれば十分であろう。
<デバッグ>
Here, a ring buffer is employed as an example of a buffer in the temporary recording section 91a, but this is only an example. It would be sufficient to use a FIFO format buffer as the buffer.
<Debug>

図27はユーザにより実行されるユーザープログラムのデバッグ処理の概要を示すフローチャートである。 FIG. 27 is a flowchart showing an overview of the user program debugging process executed by the user.

ステップS2701でユーザはPC2を操作し、複数のプログラム部品から構成されるユーザープログラムを作成し、ユーザープログラムを含むプロジェクトデータ71を作成する。プログラム作成部63はユーザ入力に従ってユーザープログラムを作成し、PC側記憶装置22に格納する。プロジェクト作成部50はユーザ入力に従ってプロジェクトデータ71を作成し、PC側記憶装置22に格納する。プロジェクトデータ71は、プロジェクトデータ71又はユーザープログラムを識別するための識別情報を含む。プロジェクト作成部50は、プロジェクトデータ71又はユーザープログラムに対して演算を実行してハッシュ値又は誤り検出符号等を求め、これらを識別情報としてプロジェクトデータ71に付加してもよい。なお、識別情報はGUID(グローバル一意識別子)等であってもよい。 In step S2701, the user operates the PC 2, creates a user program composed of a plurality of program parts, and creates project data 71 including the user program. The program creation unit 63 creates a user program according to user input and stores it in the PC storage device 22. The project creation unit 50 creates project data 71 according to user input, and stores it in the PC storage device 22. The project data 71 includes identification information for identifying the project data 71 or the user program. The project creation unit 50 may perform calculations on the project data 71 or the user program to obtain a hash value or an error detection code, and add these to the project data 71 as identification information. Note that the identification information may be a GUID (globally unique identifier) or the like.

ステップS2702でユーザはPC2を操作し、プロジェクトデータ71をPLC1に転送する。プロジェクト作成部50はプロジェクトデータ71をPC側記憶装置22から読み出し、PC側通信部23を介してPLC1へ送信する。PLC1のCPUユニット3はプロジェクトデータ71を受信すると、PLC側記憶装置32に書き込む。 In step S2702, the user operates the PC 2 to transfer the project data 71 to the PLC 1. The project creation unit 50 reads project data 71 from the PC storage device 22 and transmits it to the PLC 1 via the PC communication unit 23. When the CPU unit 3 of the PLC 1 receives the project data 71, it writes it into the PLC side storage device 32.

ステップS2703でユーザはCPUユニット3のPLC側操作部6を操作し(例えば、PROGRAMモードからRUNモードに切り替えるモード切替スイッチを操作することにより)、プロジェクトの実行を指示する。実行部80はプロジェクトデータ71に含まれているユーザープログラムを実行する。記録部81はデバイス値等をロギングし、ロギングしたデバイス値を一時記録部91aに格納(記録)する。出力部84の内の保存部93は、所定の出力条件が満たされると、一時記録部91aに記録されているデバイス値や、上述した画像データを、メモリカード36A又は内部メモリ37に保存することで、ログデータ73を作成する。 In step S2703, the user operates the PLC side operation unit 6 of the CPU unit 3 (for example, by operating a mode changeover switch for switching from PROGRAM mode to RUN mode) to instruct execution of the project. The execution unit 80 executes the user program included in the project data 71. The recording unit 81 logs device values and the like, and temporarily stores (records) the logged device values in the recording unit 91a. The storage unit 93 of the output unit 84 stores the device values recorded in the temporary storage unit 91a and the above-mentioned image data in the memory card 36A or the internal memory 37 when a predetermined output condition is satisfied. Then, log data 73 is created.

また、保存部93は、図26に示すように、ログデータ73に加えて、プロジェクトデータ71をメモリに保存する。これにより、PC2において、トラブル発生時のプロジェクトデータ71を使って、トラブル発生時の動きをモニタ上で再現できるようになる。詳細については後述する。 Furthermore, as shown in FIG. 26, the storage unit 93 stores project data 71 in memory in addition to the log data 73. This allows the PC 2 to use the project data 71 at the time of the trouble to reproduce on the monitor the behavior at the time of the trouble. Details will be described later.

また、保存部93は、プロジェクトデータ71に加えて、プロジェクトデータ71の識別情報(ハッシュ値等)をメモリに保存する。これにより、PC2は、その識別情報を使って、現在の(リプレイ対象にしようとしている)プロジェクトデータが、実際のトラブル発生時のプロジェクトデータ71と一致するか否かを検証できるようになる。詳細については後述する。 In addition to the project data 71, the storage unit 93 stores identification information (such as a hash value) of the project data 71 in the memory. This allows the PC 2 to use the identification information to verify whether the current project data (to be replayed) matches the project data 71 at the time of the actual trouble occurrence. Details will be described later.

なお、本実施形態では、所定の出力条件が満たされたタイミングで、ログデータ73に加えて、プロジェクトデータ71及びその識別情報をメモリに保存することとしたが、本発明はこれに限られない。例えば、PLC1の運転開始前、運転開始時、又は運転中に、プロジェクトデータ71及びその識別情報をメモリに保存しておき、所定の出力条件が満たされたタイミングで、ログデータ73のみをメモリに保存するようにしてもよい。要するに、所定の出力条件が満たされた時点で、ログデータ73と、プロジェクトデータ71と、その識別情報とが対応付けられた状態で、メモリに保存されていればよい。 Note that in this embodiment, the project data 71 and its identification information are stored in the memory in addition to the log data 73 at the timing when a predetermined output condition is met, but the present invention is not limited to this. . For example, the project data 71 and its identification information are stored in memory before, at the time of, or during operation of the PLC 1, and only the log data 73 is stored in the memory at the timing when a predetermined output condition is met. You may also save it. In short, it is only necessary that the log data 73, the project data 71, and their identification information be stored in the memory in a state in which they are associated with each other when a predetermined output condition is satisfied.

また、本実施形態では、プロジェクトデータ71をメモリに保存しているが、本発明はこれに限られず、例えば、プロジェクトデータ71に代えて、プロジェクトデータ71の識別情報のみをメモリに保存するようにしてもよい。この場合、PC2における現在のプロジェクトデータは、実際のトラブル発生時のプロジェクトデータ71と一致することを前提としている。すなわち、プロジェクトデータをPLC1に転送した後、現在のプロジェクトデータは編集・改変されていないことを前提としている。仮に、両データが不一致と判定された場合には、ユーザは、現在のプロジェクトデータが、実際のトラブル発生時のプロジェクトデータ71とは異なることを認識した上でリプレイを行えばよいので、ユーザがこれを認識しない状態でリプレイ(不正確なトラブルシューティング)が行われるのを防ぐことができる。 Further, in this embodiment, the project data 71 is stored in the memory, but the present invention is not limited to this. For example, instead of the project data 71, only the identification information of the project data 71 may be stored in the memory. It's okay. In this case, it is assumed that the current project data on the PC 2 matches the project data 71 at the time of the actual trouble occurrence. That is, it is assumed that the current project data is not edited or modified after the project data is transferred to the PLC 1. If it is determined that the two data do not match, the user can perform a replay after recognizing that the current project data is different from the project data 71 at the time of the actual trouble. This can prevent replays (inaccurate troubleshooting) from being performed without being aware of this.

ステップS2704でユーザはCPUユニット3のPLC側操作部6を操作し、プロジェクトデータ71とログデータ73をPC2へ転送するよう指示する。或いは、PC2のPC側操作部8を操作して、メモリカード36Aに書き込まれたプロジェクトデータ71、プロジェクトデータ71の識別情報、及びログデータ73を読み出してもよい。出力部84はプロジェクトデータ71とログデータ73をPC2へ送信する。なお、出力部84はプロジェクトデータ71の転送が禁止されていると判定した場合に、プロジェクトデータ71の識別情報をログデータ73に付加する構成を採用してもよい。プロジェクトデータ71の識別情報とログデータ73とは別々に送信されてもよい。出力部84は、メモリカード36Aに書き込むための所定の条件が成立したタイミングで、プロジェクトデータ71又はユーザープログラムに対して(例えばハッシュ関数を用いた)演算を実行してハッシュ値又は誤り検出符号等を求め、これらを識別情報としてログデータ73に付加してもよい。なお、PC2が実行する識別情報の作成ルールと、CPUユニット3が実行する識別情報の作成ルールとが一致していれば、どのようなルールが採用されてもよい。 In step S2704, the user operates the PLC side operation section 6 of the CPU unit 3 and instructs to transfer the project data 71 and log data 73 to the PC 2. Alternatively, the project data 71 written in the memory card 36A, the identification information of the project data 71, and the log data 73 may be read out by operating the PC-side operation unit 8 of the PC 2. The output unit 84 transmits the project data 71 and log data 73 to the PC 2. Note that the output unit 84 may adopt a configuration in which the identification information of the project data 71 is added to the log data 73 when it is determined that the transfer of the project data 71 is prohibited. The identification information of the project data 71 and the log data 73 may be transmitted separately. The output unit 84 executes an operation (for example, using a hash function) on the project data 71 or the user program to generate a hash value, an error detection code, etc. at the timing when a predetermined condition for writing to the memory card 36A is satisfied. may be obtained and added to the log data 73 as identification information. Note that any rule may be adopted as long as the identification information creation rule executed by the PC 2 and the identification information creation rule executed by the CPU unit 3 match.

ステップS2705でユーザはPC2を操作し、ログデータ73を再生(リプレイ)しつつトラブルの原因究明を行って、プロジェクトデータ71を構成するユーザープログラムのデバッグを実行する。ログデータ73の再生は、ログデータ73に含まれている時系列のデバイス値を波形として表示部7に表示することや、デバイス値をユーザープログラムに関連付けて表示することや、ログデータ73に含まれている時系列の画像データを表示部7に表示することを含む。ログ表示制御部61は、仮想的な時刻を計時する内部時計を有しており、内部時計に同期してログデータ73からデバイス値を取得して表示部7に表示する。プロジェクトデータ71がPLC1から送信されないこともある。この場合、ログ表示制御部61は、PC側記憶装置22に保持されているプロジェクトデータ71(マスタデータ)のユーザープログラムを使用して、デバイス値をユーザープログラムに関連付けて表示してもよい。ログデータ73を再生することによるトラブルの原因究明の詳細については、後述する。 In step S2705, the user operates the PC 2 to investigate the cause of the trouble while replaying the log data 73, and debugs the user program constituting the project data 71. Reproduction of the log data 73 includes displaying the time-series device values included in the log data 73 as waveforms on the display unit 7, displaying the device values in association with the user program, and displaying the device values included in the log data 73 in association with the user program. This includes displaying time-series image data on the display unit 7. The log display control section 61 has an internal clock that measures virtual time, acquires device values from the log data 73 in synchronization with the internal clock, and displays them on the display section 7 . The project data 71 may not be transmitted from the PLC 1. In this case, the log display control unit 61 may use the user program of the project data 71 (master data) held in the PC storage device 22 to display the device value in association with the user program. Details of investigating the cause of the trouble by reproducing the log data 73 will be described later.

ここで注意すべき点としては、ログデータ73を取得するために使用されたプロジェクトデータ71のバージョンと、PC2に保持されているプロジェクトデータ71のバージョンとが異なることがある。この場合、デバイス値をユーザープログラムに関連付けて表示することが不可能となるか、又はユーザープログラムとデバイス値との関連付が誤ってしまうことも考えられる。この場合、ログ表示制御部61は、プロジェクトデータの識別情報を使って、ログデータ73を取得するために使用されたプロジェクトデータ71のバージョンと、PC2に保持されているプロジェクトデータ71のバージョンとが異なることを示す警告を表示部7に表示してもよい。なお、ログ表示制御部61は、第一のバージョンのプロジェクトデータ71を使用して取得されたログデータ73を、PC2に保持されている第2のバージョンのプロジェクトデータ71に関連付けて表示するかどうかをユーザに問い合わせもよい。ユーザがこのような表示を希望する場合、ログ表示制御部61は、第一のバージョンのプロジェクトデータ71を使用して取得されたログデータ73を、PC2に保持されている第2のバージョンのプロジェクトデータ71に関連付けて表示部7に表示する。なお、バージョンは識別情報によって管理される。ユーザがログデータ73に問題がないことを確認すると、デバッグは不要であり、後続のステップS2706やステップS2707も不要である。ユーザはログデータ73を分析し、ユーザープログラムのバグ等を発見し、ユーザープログラムを修正する。プロジェクト作成部50はユーザ入力に従ってプロジェクトデータ71を修正(更新)し、PC側記憶装置22に格納する。 It should be noted here that the version of the project data 71 used to obtain the log data 73 may be different from the version of the project data 71 held in the PC 2. In this case, it is possible that it becomes impossible to display the device value in association with the user program, or that the association between the user program and the device value becomes incorrect. In this case, the log display control unit 61 uses the identification information of the project data to determine whether the version of the project data 71 used to obtain the log data 73 and the version of the project data 71 held in the PC 2 are different from each other. A warning indicating the difference may be displayed on the display unit 7. Note that the log display control unit 61 determines whether to display the log data 73 acquired using the first version of the project data 71 in association with the second version of the project data 71 held in the PC 2. You can also ask the user. If the user desires such a display, the log display control unit 61 displays the log data 73 obtained using the first version of the project data 71 as the second version of the project held in the PC 2. It is displayed on the display section 7 in association with the data 71. Note that the version is managed using identification information. If the user confirms that there is no problem with the log data 73, debugging is unnecessary, and subsequent steps S2706 and S2707 are also unnecessary. The user analyzes the log data 73, discovers bugs, etc. in the user program, and corrects the user program. The project creation unit 50 modifies (updates) the project data 71 according to user input, and stores it in the PC storage device 22.

ステップS2706でユーザはPC2を操作し、プロジェクトデータ71をPLC1に転送する。なお、プロジェクトデータ71内のユーザープログラムが変更されると、識別情報が更新される。これにより、修正前のプロジェクトデータ71と修正後のプロジェクトデータ71とが区別可能となる。 In step S2706, the user operates the PC2 to transfer the project data 71 to the PLC1. Note that when the user program in the project data 71 is changed, the identification information is updated. This makes it possible to distinguish between the project data 71 before modification and the project data 71 after modification.

ステップS2707でユーザはCPUユニット3を操作し、プロジェクトデータ71に含まれるユーザープログラムの実行を指示することで、プロジェクトデータ71を検証する。実行部80はプロジェクトデータ71に含まれているユーザープログラムを実行する。PLC1がユーザの想定通りに稼働していれば、ユーザはプロジェクトデータ71のデバッグに成功したと判断する。なお、PLC1がユーザの想定通りに稼働していなければ、記録部81によって再びデバイス値等をロギングし、保存部93によってログデータ73を作成する。そして、ユーザはステップS2704ないしステップS2707を再び実行する。 In step S2707, the user operates the CPU unit 3 to instruct execution of the user program included in the project data 71, thereby verifying the project data 71. The execution unit 80 executes the user program included in the project data 71. If the PLC 1 is operating as expected by the user, the user determines that the project data 71 has been successfully debugged. Note that if the PLC 1 is not operating as expected by the user, the recording unit 81 logs the device values and the like again, and the storage unit 93 creates log data 73. Then, the user executes steps S2704 to S2707 again.

このようにユーザはログデータ73を参照しながらプロジェクトデータ71をデバッグできる。そのため、デバッグの効率が向上すると考えられる。 In this way, the user can debug the project data 71 while referring to the log data 73. Therefore, it is thought that debugging efficiency will improve.

なお、プロジェクトデータ71の転送はメモリカード36Aを介して実行されてもよい。つまり、PC2はメモリカード36Aに書き込む。ユーザはメモリカード36AをPC2から取り外し、CPUユニット3にメモリカード36Aを取り付ける。CPUユニット3はメモリカード36Aからプロジェクトデータ71を読み出してPLC側記憶装置32に書き込む。同様に、ログデータ73の転送もメモリカード36Aを介して実行されてもよい。
<プロジェクト作成部50>
Note that the project data 71 may be transferred via the memory card 36A. That is, the PC 2 writes to the memory card 36A. The user removes the memory card 36A from the PC 2 and attaches the memory card 36A to the CPU unit 3. The CPU unit 3 reads the project data 71 from the memory card 36A and writes it to the PLC side storage device 32. Similarly, the transfer of log data 73 may also be performed via the memory card 36A.
<Project creation department 50>

図28はプロジェクト作成部50の詳細を示している。機能設定部62はPC側操作部8から入力される情報に基づき拡張ユニット4のユニット構成情報、CPUユニット3の機能及び拡張ユニット4の機能を設定し、設定内容を示すユニット構成情報を作成する。CPUユニット3の機能の設定としては、IPアドレスの設定、FTPクライアントに関する設定、プロジェクトデータ71のアクセス権限の設定等がある。拡張ユニット4の機能の設定としては、入力チャネルの設定やPLC同士の通信に関する設定等がある。ユニット構成情報はプロジェクトデータ71の一部である。編集部311(図23に示すプログラム作成部63を兼ねてもよい)は、表示部7にユーザープログラムの編集UIを表示し、PC側操作部8から入力される情報に基づきユーザープログラムを編集する。デバッグ部314はプロジェクトデータ71を使用してユーザープログラムをデバッグする。付加部312はプロジェクトデータ71に識別情報を付加する。演算部313は識別情報(例:ハッシュ値や誤り検出符号)を演算により求める。なお、この演算部313による識別情報の演算(算出)機能については、出力部84が、同機能を発揮するようにしてもよい。 FIG. 28 shows details of the project creation section 50. The function setting unit 62 sets the unit configuration information of the expansion unit 4, the functions of the CPU unit 3, and the functions of the expansion unit 4 based on information input from the PC-side operation unit 8, and creates unit configuration information indicating the setting contents. . Functional settings of the CPU unit 3 include IP address settings, FTP client settings, access authority settings for the project data 71, and the like. Settings for the functions of the expansion unit 4 include settings for input channels, settings for communication between PLCs, and the like. The unit configuration information is part of the project data 71. The editing unit 311 (which may also serve as the program creation unit 63 shown in FIG. 23) displays an editing UI for the user program on the display unit 7 and edits the user program based on information input from the PC-side operation unit 8. . The debug unit 314 uses the project data 71 to debug the user program. The adding unit 312 adds identification information to the project data 71. The calculation unit 313 calculates identification information (eg, a hash value or an error detection code) by calculation. Note that the output unit 84 may perform the same function as the identification information calculation function performed by the calculation unit 313.

本発明のプログラマブルロジックコントローラ用プログラム作成支援装置は、FAにおけるPLCシステムのトラブルシューティングに好適に利用できる。 The program creation support device for a programmable logic controller of the present invention can be suitably used for troubleshooting a PLC system in an FA.

1…PLC
2…PC
3…CPUユニット
4、4a、4b…拡張ユニット
4c…カメラ入力拡張ユニット
4d…モーションユニット
4e…通信ユニット
5…PLC側表示部
6…PLC側操作部
7…表示部
8…PC側操作部
9…通信ケーブル
10、10a、10b…フィールドデバイス
11…PC側メモリ部
21、21B…PC側CPU
22…PC側記憶装置
23…PC側通信部
31…PLC側CPU
32…PLC側記憶装置
33…PLC側通信部
34…デバイス部;34a…CPUユニットデバイス部;34b…拡張ユニットデバイス部
35…プロジェクト記憶部
36…保存メモリ;36A…メモリカード
36B…運転記録データ記憶部
37…内部メモリ
38…バスマスタ
39…記録制御部
41…CPU
42…メモリ
45…保存条件設定部
46…記録バッファ設定部
47…保存トリガ設定部
50…プロジェクト作成部
50B…プロジェクト編集部
50B1…TPJ解釈部;50B2…kpr解釈部
50C…保存制御部
50D…モード選択部;50D1…モード選択欄
50E…上書規制制御部
51、51B…ログ設定部
52…部品指定部
53…デバイス抽出部
54…追加部
55…削除部
56…マージ部
57…特定部
58…手動設定部
59…推定部
60…機能指定部
61…ログ表示制御部
62…機能設定部
63…プログラム作成部
71…プロジェクトデータ
72…ログ設定データ
73…ログデータ
74…ログデータ保存部
80…実行部
80a…ラダー実行エンジン
80b…ユニット制御部
81…記録部
82…検知部
83、83a…時刻管理部
84…出力部
90…ユニット間バス
91a…一時記録部
92a…収集部
93…保存部
94…送信部
98…カメラ部
150…ユニット設定UI
151…名称欄
152…入力領域欄
153…出力領域欄
154…占有領域欄
201…ユニット間通信
202…プログラム実行
204…END処理
311…編集部
312…付加部
313…演算部
314…デバッグ部
404、404a…時刻指定カーソル
406…再生ボタン
407…ワンステップ逆再生ボタン
408…ワンステップ再生ボタン
409…時刻表示領域
410…プログラム表示領域
420…プロジェクト表示領域
430…カメラモニタ
440…ユニットモニタ
450…ラダーモニタ
514…プログラム実行部
1000、2000…プログラマブルロジックコントローラシステム
1200…プログラム作成支援装置
1300…ユーザープログラム作成支援プログラム
1310…プログラム編集画面
1312…デバイス値入力欄
1314…「上書」ボタン
1320…ポイントパラメータ編集欄
1322…速度指定欄
1330…ファイルメニュー
1332…「プロジェクトを別名保存」
1334…「プロジェクトを上書き保存」
1340…「プロジェクトの別名保存」ダイヤログ画面
1336…「プロジェクト-プロジェクトの照合」
1350…比較表示画面
Ld…ラダー図
T…スキャンタイム
WK…対象物
1...PLC
2...PC
3...CPU units 4, 4a, 4b...Extension unit 4c...Camera input extension unit 4d...Motion unit 4e...Communication unit 5...PLC side display section 6...PLC side operation section 7...Display section 8...PC side operation section 9... Communication cables 10, 10a, 10b...Field device 11...PC side memory section 21, 21B...PC side CPU
22...PC side storage device 23...PC side communication unit 31...PLC side CPU
32... PLC side storage device 33... PLC side communication section 34... device section; 34a... CPU unit device section; 34b... expansion unit device section 35... project storage section 36... storage memory; 36A... memory card 36B... operation record data storage Unit 37... Internal memory 38... Bus master 39... Recording control unit 41... CPU
42...Memory 45...Save condition setting unit 46...Record buffer setting unit 47...Save trigger setting unit 50...Project creation unit 50B...Project editing unit 50B1...TPJ interpretation unit; 50B2...kpr interpretation unit 50C...Save control unit 50D...Mode Selection section; 50D1...Mode selection field 50E...Overwrite restriction control section 51, 51B...Log setting section 52...Component specification section 53...Device extraction section 54...Addition section 55...Deletion section 56...Merge section 57...Identification section 58... Manual setting section 59...Estimation section 60...Function specification section 61...Log display control section 62...Function setting section 63...Program creation section 71...Project data 72...Log setting data 73...Log data 74...Log data storage section 80...Execution Section 80a... Ladder execution engine 80b... Unit control section 81... Recording section 82... Detection section 83, 83a... Time management section 84... Output section 90... Inter-unit bus 91a... Temporary recording section 92a... Collection section 93... Storage section 94... Transmission unit 98...Camera unit 150...Unit setting UI
151...Name column 152...Input area column 153...Output area column 154...Occupied area column 201...Inter-unit communication 202...Program execution 204...END processing 311...Editing section 312...Adding section 313...Calculating section 314...Debug section 404, 404a... Time designation cursor 406... Play button 407... One step reverse play button 408... One step play button 409... Time display area 410... Program display area 420... Project display area 430... Camera monitor 440... Unit monitor 450... Ladder monitor 514 …Program execution unit 1000, 2000…Programmable logic controller system 1200…Program creation support device 1300…User program creation support program 1310…Program editing screen 1312…Device value input field 1314…“Overwrite” button 1320…Point parameter editing field 1322 ...Speed specification field 1330...File menu 1332..."Save project under another name"
1334..."Save project"
1340..."Save project under another name" dialog screen 1336..."Project - project matching"
1350...Comparison display screen Ld...Ladder diagram T...Scan time WK...Target

Claims (13)

一以上のユニットで構成されたプログラマブルロジックコントローラであり、ユーザープログラムを含むプロジェクトデータを記憶するプロジェクト記憶部、前記プロジェクトデータに含まれる前記ユーザープログラムを繰り返し実行するプログラム実行部、該プログラム実行部によって参照される記憶領域であるデバイスを有するデバイス部、該デバイス部に記憶されているデバイス値をログデータとして時系列に一時記録する一時記録部、及び運転時において所定の保存条件が満たされると該一時記録部に記録されているログデータを前記プロジェクト記憶部に記憶されている前記プロジェクトデータと共に保存する保存メモリを備える前記プログラマブルロジックコントローラで実行される、前記ユーザープログラムについて、当該ユーザープログラムの作成を支援するためのプログラム作成支援装置であって、
前記プログラマブルロジックコントローラの運転時に前記保存メモリに保存されたログデータと、
前記ログデータが前記保存メモリに保存されたときに前記プログラム実行部により実行されていた前記ユーザープログラムを含み、前記保存メモリに保存された前記プロジェクトデータと
を運転記録データとして記憶する運転記録データ記憶部と、
前記運転記録データ記憶部から前記運転記録データを読み出して、前記運転記録データ内のログデータとプロジェクトデータとを関連付けて表示させるログ表示制御部と、
前記ログ表示制御部により表示されたプロジェクトデータの編集指示を受け付けて、該プロジェクトデータを編集するプロジェクト編集部と、
前記プロジェクト編集部により編集中のプロジェクトデータが前記運転記録データ記憶部に記憶された前記運転記録データ内のプロジェクトデータであるか否かを判定し、該判定した結果に基づいて、前記運転記録データ記憶部に記憶された前記運転記録データ内のプロジェクトデータに対して、前記プロジェクト編集部により編集された編集後のプロジェクトデータの上書きを規制する上書規制制御部と、
を備えるプログラマブルロジックコントローラ用プログラム作成支援装置。
A programmable logic controller composed of one or more units, including a project storage section that stores project data including a user program, a program execution section that repeatedly executes the user program included in the project data, and a program execution section that is referenced by the program execution section. a device section that has a device that is a storage area for storage; a temporary storage section that temporarily records the device values stored in the device section in chronological order as log data; Supporting the creation of a user program for the user program executed by the programmable logic controller, which includes a storage memory that stores log data recorded in the recording unit together with the project data stored in the project storage unit. A program creation support device for
log data stored in the storage memory during operation of the programmable logic controller;
Driving record data storage that includes the user program being executed by the program execution unit when the log data was stored in the storage memory, and stores the project data stored in the storage memory as driving record data. Department and
a log display control unit that reads the driving record data from the driving record data storage unit and displays log data and project data in the driving record data in association with each other;
a project editing section that receives an editing instruction for the project data displayed by the log display control section and edits the project data;
The project editing unit determines whether or not the project data being edited is the project data in the driving record data stored in the driving record data storage unit, and based on the determined result, the driving record data is edited. an overwrite restriction control unit that restricts overwriting of edited project data edited by the project editing unit with respect to project data in the driving record data stored in a storage unit;
A program creation support device for a programmable logic controller.
請求項1に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、
前記上書規制制御部が、前記プロジェクト編集部によりプロジェクトデータに対して上書き操作が試みられたことを検出して表示される上書き禁止ポップアップであるプログラマブルロジックコントローラ用プログラム作成支援装置。
The program creation support device for a programmable logic controller according to claim 1,
The program creation support device for a programmable logic controller, wherein the overwrite restriction control unit detects that the project editing unit attempts an overwrite operation on project data and displays an overwrite prohibition popup.
請求項2に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、
前記上書規制制御部が、前記運転記録データ記憶部に記憶された前記運転記録データ内のプロジェクトデータに対して、前記プロジェクト編集部により編集されたプロジェクトデータの保存指示を受けたとき、該編集後のプロジェクトデータを、前記運転記録データに含まれるプロジェクトデータとは別のファイルとして保存するよう構成してなるプログラマブルロジックコントローラ用プログラム作成支援装置。
The program creation support device for a programmable logic controller according to claim 2,
When the overwriting restriction control unit receives an instruction to save project data edited by the project editing unit with respect to project data in the driving record data stored in the driving record data storage unit, the overwriting restriction control unit controls the editing process. A program creation support device for a programmable logic controller configured to save subsequent project data as a file separate from the project data included in the driving record data.
請求項1~3のいずれか一項に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、さらに、
プロジェクトデータを編集する編集モード、及び
前記ログ表示制御部による表示制御を行う履歴再生モードの少なくとも一方を選択するモード選択部を備え、
前記プロジェクト編集部は、
前記編集モードにおいて編集指示を受け付け、
前記履歴再生モードでは編集指示の受付を禁止してなるプログラマブルロジックコントローラ用プログラム作成支援装置。
A program creation support device for a programmable logic controller according to any one of claims 1 to 3, further comprising:
comprising a mode selection section for selecting at least one of an editing mode for editing project data, and a history playback mode for controlling display by the log display control section;
The project editorial department is
Accepting an editing instruction in the editing mode,
A program creation support device for a programmable logic controller that prohibits reception of editing instructions in the history playback mode.
請求項1~4のいずれか一項に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、
前記運転記録データが、第一運転記録データと第二運転記録データを含み、
前記第一運転記録データと第二運転記録データとが、識別情報によって区別されてなるプログラマブルロジックコントローラ用プログラム作成支援装置。
A program creation support device for a programmable logic controller according to any one of claims 1 to 4,
The driving record data includes first driving record data and second driving record data,
A program creation support device for a programmable logic controller, wherein the first driving record data and the second driving record data are distinguished by identification information.
請求項5に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、
前記識別情報が、データファイルの拡張子であるプログラマブルロジックコントローラ用プログラム作成支援装置。
The program creation support device for a programmable logic controller according to claim 5,
A program creation support device for a programmable logic controller, wherein the identification information is an extension of a data file.
請求項5又は6に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、
前記第一運転記録データは圧縮されており、
前記ログ表示制御部は、前記第一運転記録データを読み出すときに、該第一運転記録データを解凍するよう構成してなるプログラマブルロジックコントローラ用プログラム作成支援装置。
A program creation support device for a programmable logic controller according to claim 5 or 6,
The first driving record data is compressed,
A program creation support device for a programmable logic controller, wherein the log display control section is configured to decompress the first driving record data when reading the first driving record data.
請求項5~7のいずれか一項に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、さらに、
前記第一運転記録データと第二運転記録データにおけるプロジェクトデータの比較表示を行う比較表示部を備えてなるプログラマブルロジックコントローラ用プログラム作成支援装置。
The program creation support device for a programmable logic controller according to any one of claims 5 to 7, further comprising:
A program creation support device for a programmable logic controller, comprising a comparison display unit that compares and displays project data in the first operation record data and the second operation record data.
請求項1~8のいずれか一項に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、さらに、
編集作業を行うための作業メモリを備え、
前記ログ表示制御部が、前記運転記録データ記憶部から前記運転記録データを前記作業メモリに読み出して、前記運転記録データの内のログデータとプロジェクトデータとを関連付けて表示制御するよう構成してなるプログラマブルロジックコントローラ用プログラム作成支援装置。
A program creation support device for a programmable logic controller according to any one of claims 1 to 8, further comprising:
Equipped with working memory for editing work,
The log display control unit is configured to read the driving record data from the driving record data storage unit to the working memory, and to display and control log data and project data in association with each other in the driving record data. Program creation support device for programmable logic controllers.
請求項1~9のいずれか一項に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、
前記ログデータが、デバイスデータを含むプログラマブルロジックコントローラ用プログラム作成支援装置。
A program creation support device for a programmable logic controller according to any one of claims 1 to 9,
A program creation support device for a programmable logic controller, wherein the log data includes device data.
請求項1~10のいずれか一項に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、
前記運転記録データが、対象物を撮像するカメラ入力拡張ユニットで撮像された画像ファイルを含んでなるプログラマブルロジックコントローラ用プログラム作成支援装置。
A program creation support device for a programmable logic controller according to any one of claims 1 to 10,
A program creation support device for a programmable logic controller, wherein the driving record data includes an image file captured by a camera input expansion unit that captures an image of a target object.
請求項1~11のいずれか一項に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、
前記ユーザープログラムがラダープログラムを含むプログラマブルロジックコントローラ用プログラム作成支援装置。
A program creation support device for a programmable logic controller according to any one of claims 1 to 11,
A program creation support device for a programmable logic controller, wherein the user program includes a ladder program.
請求項1~12のいずれか一項に記載のプログラマブルロジックコントローラ用プログラム作成支援装置であって、
前記プログラマブルロジックコントローラが、複数のユニットで構成され、
各ユニットのユニット構成情報が、各ユニットの機能、ユニット間の接続位置の情報の少なくともいずれかを含んでなるプログラマブルロジックコントローラ用プログラム作成支援装置。
A program creation support device for a programmable logic controller according to any one of claims 1 to 12,
The programmable logic controller is composed of a plurality of units,
A program creation support device for a programmable logic controller, wherein unit configuration information of each unit includes at least one of the functions of each unit and information on connection positions between units.
JP2019023078A 2019-02-12 2019-02-12 Program creation support device for programmable logic controllers Active JP7356778B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019023078A JP7356778B2 (en) 2019-02-12 2019-02-12 Program creation support device for programmable logic controllers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019023078A JP7356778B2 (en) 2019-02-12 2019-02-12 Program creation support device for programmable logic controllers

Publications (2)

Publication Number Publication Date
JP2020134987A JP2020134987A (en) 2020-08-31
JP7356778B2 true JP7356778B2 (en) 2023-10-05

Family

ID=72278558

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019023078A Active JP7356778B2 (en) 2019-02-12 2019-02-12 Program creation support device for programmable logic controllers

Country Status (1)

Country Link
JP (1) JP7356778B2 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001014152A (en) 1999-06-30 2001-01-19 Canon Inc Method and device for data processing, and storage medium
JP2006222752A (en) 2005-02-10 2006-08-24 Murata Mach Ltd Image reading apparatus
JP2014052669A (en) 2012-09-04 2014-03-20 Keyence Corp Programmable logic controller
WO2014167726A1 (en) 2013-04-12 2014-10-16 三菱電機株式会社 Programmable controller peripheral device and debug assistance program
JP2015176370A (en) 2014-03-14 2015-10-05 オムロン株式会社 Control system, method, program and information processor
WO2018073868A1 (en) 2016-10-17 2018-04-26 三菱電機株式会社 Debugging assistance device and debugging assistance method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001014152A (en) 1999-06-30 2001-01-19 Canon Inc Method and device for data processing, and storage medium
JP2006222752A (en) 2005-02-10 2006-08-24 Murata Mach Ltd Image reading apparatus
JP2014052669A (en) 2012-09-04 2014-03-20 Keyence Corp Programmable logic controller
WO2014167726A1 (en) 2013-04-12 2014-10-16 三菱電機株式会社 Programmable controller peripheral device and debug assistance program
JP2015176370A (en) 2014-03-14 2015-10-05 オムロン株式会社 Control system, method, program and information processor
WO2018073868A1 (en) 2016-10-17 2018-04-26 三菱電機株式会社 Debugging assistance device and debugging assistance method

Also Published As

Publication number Publication date
JP2020134987A (en) 2020-08-31

Similar Documents

Publication Publication Date Title
US11188048B2 (en) Programmable logic controller and main unit
JP6757386B2 (en) Programmable logic controller and program creation support device
JP7320953B2 (en) Programmable logic controller and its log data storage method
US20120131456A1 (en) Capture and Playback for GUI-Based Tasks
JP2023164999A (en) Program creation assistance device for programmable logic controller
JP4295775B2 (en) GUI test support system and application program for test support
CN101311897B (en) Method and device for snatching at application program graphical user interface resource
US20030217038A1 (en) Data file history management method and apparatus thereof
US8001552B1 (en) Model merger using an export map
CN110659197A (en) Application test case generation method and device and software test system
JP2022016659A (en) Externally setting device, logging setting method and program
JP6442131B2 (en) Control system and control device
JP7356778B2 (en) Program creation support device for programmable logic controllers
JP7212496B2 (en) Programmable logic controller system, programming support device and computer program
JP6806946B2 (en) External setting devices and programs
JP7405714B2 (en) programmable logic controller
JP6948450B2 (en) Programmable logic controller and main unit
JP5481267B2 (en) Control program creation device and control program creation device drive method
JP6986125B2 (en) Programmable logic controller and main unit
JP7412076B2 (en) Engineering tools for programmable logic controllers
JP2009032214A (en) Software test support system
JP6911082B2 (en) How to generate scripts for mobile terminals based on actual use with status information
JPH1091477A (en) Control microcomputer device and maintenance tool for the same
JP3300156B2 (en) Recovery method in case of CAD system failure
CN114116876A (en) Method, system, device, processor and storage medium for realizing modular processing of process management based on database technology

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20211217

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20221128

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221220

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230216

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230613

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230724

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230923

R150 Certificate of patent or registration of utility model

Ref document number: 7356778

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150