JP2023125352A - Simulation system, method and simulation program - Google Patents

Simulation system, method and simulation program Download PDF

Info

Publication number
JP2023125352A
JP2023125352A JP2022029389A JP2022029389A JP2023125352A JP 2023125352 A JP2023125352 A JP 2023125352A JP 2022029389 A JP2022029389 A JP 2022029389A JP 2022029389 A JP2022029389 A JP 2022029389A JP 2023125352 A JP2023125352 A JP 2023125352A
Authority
JP
Japan
Prior art keywords
processing
communication
program
control
simulation system
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.)
Pending
Application number
JP2022029389A
Other languages
Japanese (ja)
Inventor
雄也 渡邉
Yuya Watanabe
義明 小林
Yoshiaki Kobayashi
貴裕 岡安
Takahiro Okayasu
実 岡
Minoru Oka
弓束 重森
Yumitsuka Shigemori
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP2022029389A priority Critical patent/JP2023125352A/en
Publication of JP2023125352A publication Critical patent/JP2023125352A/en
Pending legal-status Critical Current

Links

Images

Abstract

To communicate information related to a simulated control process to an information processor.SOLUTION: A controller includes a first connector that connects a first network to which a control target belongs and a second connector that connects a second network to which an information processor belongs; and executes a user program for performing a control process and a communication program for performing a communication process for communicating information related to the control process to the information processor. A simulation system 1 includes: a simulator 338 for the control process; and a communication unit that performs a communication process for communicating information related to a simulated control process to the information processor according to predetermined settings.SELECTED DRAWING: Figure 1

Description

本開示は、FA(Factory Automation)の機器を制御するプログラムを開発する環境を提供するための技術に関する。 The present disclosure relates to a technology for providing an environment for developing a program for controlling FA (Factory Automation) equipment.

様々な生産現場において、生産工程を自動化するためのFAシステムが普及している。FAシステムは生産工程に備えられる制御対象の機器と、制御プログラムを実行するPLC(Programmable Logic Controller)などの制御装置を備える。 FA systems for automating production processes are becoming widespread at various production sites. The FA system includes equipment to be controlled in the production process and a control device such as a PLC (Programmable Logic Controller) that executes a control program.

制御プログラムの開発環境では、通常、設計者はシミュレータを利用することができる。このようなシミュレーションに関し、例えば特開2004-5431号公報(特許文献1)には、シミュレーション対象となる物理実体(工作機械、組立機械、コンベア、プロセス制御)をモデル化した複数の仮想リソースを適宜組合わせることでシミュレーションモデルを完成させる方法を記載する。 In a control program development environment, a designer can usually use a simulator. Regarding such simulations, for example, Japanese Patent Laid-Open No. 2004-5431 (Patent Document 1) describes how to appropriately create multiple virtual resources that model physical entities to be simulated (machine tools, assembly machines, conveyors, process control). This section describes how to complete a simulation model by combining them.

特開2004-5431号公報Japanese Patent Application Publication No. 2004-5431

生産現場の多様性は高まる傾向にある。例えば、PLCでは対象の制御処理と、制御処理に関連する情報を、ネットワークを介して情報処理装置と通信する通信処理が実施される。したがって、制御プログラムの開発シーンでも、このような通信処理を実施できる環境の提供が要望されていた。しかし、特許文献1は、このような通信処理を可能にする仕組みは提案していない。 The diversity of production sites is increasing. For example, in a PLC, target control processing and communication processing for communicating information related to the control processing with an information processing device via a network are implemented. Therefore, even in the development of control programs, there has been a demand for an environment in which such communication processing can be performed. However, Patent Document 1 does not propose a mechanism that enables such communication processing.

本開示の目的は、コントローラの制御処理のシミュレーションに、シミュレーションされた制御処理に関連する情報について情報処理装置と通信可能な環境を提供することである。 An object of the present disclosure is to provide an environment for simulating control processing of a controller in which information related to the simulated control processing can be communicated with an information processing device.

本開示に係る、コントローラの処理をシミュレーションするシミュレーションシステムにおいて、コントローラは、制御対象が属する第1ネットワークを接続する第1コネクタと、情報処理装置が属する第2ネットワークを接続する第2コネクタと、制御処理を実施するためのユーザプログラムと、制御処理に関連する情報を情報処理装置と通信するための通信処理を実施するための通信プログラムを実行する実行部と、を有し、シミュレーションシステムは、制御処理をシミュレーションするシミュレータと、シミュレーションされる制御処理に関連する情報を、予め定められた設定に従って、情報処理装置と通信する通信処理を実施する通信部と、を備える。 In the simulation system for simulating processing of a controller according to the present disclosure, the controller includes a first connector that connects a first network to which a controlled object belongs, a second connector that connects a second network to which an information processing device belongs, and a second connector that connects a second network to which an information processing device belongs; The simulation system includes a user program for performing processing, and an execution unit that executes a communication program for performing communication processing for communicating information related to control processing with an information processing device. The information processing apparatus includes a simulator that simulates processing, and a communication unit that performs communication processing that communicates information related to the control processing to be simulated with the information processing device according to predetermined settings.

上述の開示によれば、シミュレーションシステムは、制御処理のシミュレーションに、当該シミュレーションされる制御処理に関連する情報を情報処理装置と通信する通信処理を実施する環境を提供できる。 According to the above disclosure, the simulation system can provide an environment for simulating a control process to perform a communication process for communicating information related to the simulated control process with an information processing device.

上述の開示において、上記の情報処理装置は、DB(データベース)を管理するDB装置を含む。 In the above disclosure, the above information processing device includes a DB device that manages a DB (database).

上述の開示によれば、シミュレーションシステムは、制御処理のシミュレーションに、当該シミュレーションされる制御処理に関連する情報をDB装置と通信する通信処理を実施する環境を提供する。 According to the above-mentioned disclosure, the simulation system provides an environment for simulating control processing to perform communication processing for communicating information related to the simulated control processing with a DB device.

上述の開示において、通信処理は、DBを操作するためのDB操作命令を、DB装置に発行する処理を含む。 In the above disclosure, the communication process includes a process of issuing a DB operation command to the DB device to operate the DB.

上述の開示によれば、シミュレーションされる制御処理に関連する情報をDB装置と通信する通信処理に、DB操作命令の発行を含めることができる。 According to the above disclosure, the communication process for communicating information related to the control process to be simulated with the DB device can include issuing a DB operation command.

上述の開示において、予め定められた設定の項目は、DB操作命令に従って、DB装置が操作する対象の指定を含む。 In the above disclosure, the predetermined setting items include designation of the target to be operated by the DB device according to the DB operation command.

上述の開示によれば、DB操作命令に従って、DB装置が操作する対象の指定を設定部によって設定することができる。 According to the above disclosure, the setting unit can specify the target to be operated by the DB device according to the DB operation command.

上述の開示において、上記のDB装置が操作する対象の指定は、DBにおいてアクセス処理されるデータの識別子を含み、制御処理に関連する情報は、アクセス処理されるデータを含む。 In the above disclosure, the specification of the target to be operated by the DB device includes an identifier of the data to be accessed in the DB, and the information related to control processing includes the data to be accessed.

上述の開示によれば、DBにおいてアクセス処理されるデータの識別子として、制御処理に関連する情報を、設定することができる。 According to the above disclosure, information related to control processing can be set as an identifier of data accessed in the DB.

上述の開示において、上記の予め定められた設定の項目は、通信処理に関するパラメータを含む。 In the above disclosure, the predetermined setting items include parameters related to communication processing.

上述の開示によれば、制御処理のシミュレーションに、制御処理に関連する情報を情報処理装置と通信する通信処理に関するパラメータを設定できる。 According to the above disclosure, parameters related to communication processing for communicating information related to control processing with an information processing device can be set in a simulation of control processing.

上述の開示において、上記の通信処理に関するパラメータは、情報処理装置との通信を確立するためのパラメータを含む。 In the above disclosure, the parameters related to the communication processing include parameters for establishing communication with the information processing device.

上述の開示によれば、通信処理を実施するために、情報処理装置との通信を確立するためのパラメータを設定できる。 According to the above disclosure, parameters for establishing communication with the information processing device can be set in order to implement communication processing.

上述の開示において、通信処理に関するパラメータは、通信処理時間のパラメータを含む。 In the above disclosure, the parameters related to communication processing include parameters of communication processing time.

上述の開示によれば、通信処理を実施するために用いる、情報処理装置との通信処理時間のパラメータを設定できる。 According to the above disclosure, it is possible to set parameters for communication processing time with an information processing device, which are used to perform communication processing.

上述の開示において、通信処理時間は、第2ネットワークの通信速度に基づいている。この開示によれば、通信処理時間を、情報処理装置が属する第2ネットワーク、すなわちコントローラが通信に用いるネットワークの通信速度に基づき設定できる。 In the above disclosure, the communication processing time is based on the communication speed of the second network. According to this disclosure, the communication processing time can be set based on the communication speed of the second network to which the information processing device belongs, that is, the network used for communication by the controller.

上述の開示においては、コントローラは、制御処理を実施するための制御タスクおよび、当該制御処理に関連する処理を実施するための関連処理タスクを含む複数のタスクを実行するマルチタスク実行部を備え、情報処理装置との通信は関連処理タスクにおいて実行され、マルチタスク実行部は、制御タスクを第1の周期で実行し、マルチタスク実行部は、関連処理タスクを第2の周期で実行し、通信処理時間は、第2の周期に基づいている。 In the above disclosure, the controller includes a multitask execution unit that executes a plurality of tasks including a control task for implementing control processing and a related processing task for implementing processing related to the control processing, Communication with the information processing device is performed in the related processing task, the multitask execution unit executes the control task in the first cycle, the multitask execution unit executes the related processing task in the second cycle, and the communication The processing time is based on the second cycle.

上述の開示によれば、コントローラは、制御処理と情報処理装置との通信を含む関連処理を、マルチタスク制御で実行する場合に、シミュレーションシステムでは、このようなタスクの実行周期に基づき、通信処理を実施するために用いる、情報処理装置との通信処理時間を設定できる。 According to the above disclosure, when the controller executes related processing including control processing and communication with an information processing device using multi-task control, in the simulation system, communication processing is performed based on the execution cycle of such tasks. You can set the communication processing time with the information processing device, which is used to implement the process.

この開示の他の局面によれば、コントローラの処理をシミュレーションする方法が提供される。コントローラは、制御対象が属する第1ネットワークを接続する第1コネクタと、情報処理装置が属する第2ネットワークを接続する第2コネクタと、制御処理を実施するためのユーザプログラムと、制御処理に関連する情報を情報処理装置と通信するための通信プログラムを実行する実行部と、を有し、方法は、制御処理をシミュレーションするステップと、シミュレーションされる制御処理に関連する情報を、予め定められた設定に従って、情報処理装置と通信する通信処理を実施するステップと、を備える。 According to other aspects of this disclosure, a method of simulating processing of a controller is provided. The controller includes a first connector that connects a first network to which the controlled object belongs, a second connector that connects a second network to which the information processing device belongs, a user program for implementing control processing, and a program related to the control processing. an execution unit that executes a communication program for communicating information with the information processing device; the method includes the steps of simulating control processing; and performing communication processing to communicate with the information processing device according to the method.

上述の開示において、方法が実施されると、制御処理のシミュレーションに、当該シミュレーションされる制御処理に関連する情報を情報処理装置と通信する通信処理を実施する環境を提供できる。 In the above-mentioned disclosure, when the method is implemented, it is possible to provide an environment for simulating a control process to perform a communication process for communicating information related to the simulated control process with an information processing device.

この開示のさらに他の局面によれば、コントローラの処理をシミュレーションする方法をコンピュータに実行させるためのシミュレーションプログラムが提供される。コントローラは、制御対象が属する第1ネットワークを接続する第1コネクタと、情報処理装置が属する第2ネットワークを接続する第2コネクタと、制御処理を実施するためのユーザプログラムと、制御処理に関連する情報を情報処理装置と通信するための通信処理を実施するための通信プログラムを実行する実行部と、を有し、方法は、制御処理をシミュレーションするステップと、シミュレーションされる制御処理に関連する情報を、予め定められた設定に従って、情報処理装置と通信する通信処理を実施するステップと、を備える。 According to still another aspect of this disclosure, a simulation program for causing a computer to execute a method of simulating processing of a controller is provided. The controller includes a first connector that connects a first network to which the controlled object belongs, a second connector that connects a second network to which the information processing device belongs, a user program for implementing control processing, and a program related to the control processing. an execution unit that executes a communication program for performing communication processing for communicating information with an information processing device; the method includes the steps of simulating control processing; and information related to the simulated control processing. and a step of performing communication processing to communicate with the information processing device according to predetermined settings.

上述の開示において、シミュレーションプログラムが実行されると、制御処理のシミュレーションに、当該シミュレーションされる制御処理に関連する情報を情報処理装置と通信する通信処理を実施する環境を提供できる。 In the above disclosure, when the simulation program is executed, it is possible to provide an environment for simulating a control process to perform a communication process for communicating information related to the simulated control process with an information processing apparatus.

本開示によれば、コントローラの制御処理のシミュレーションに、シミュレーションされた制御処理に関連する情報について情報処理装置と通信可能な環境を提供できる。 According to the present disclosure, it is possible to provide an environment in which information related to the simulated control processing can be communicated with the information processing device for simulation of the control processing of the controller.

本実施の形態に係るシミュレーションシステム1の構成を模式的に示す図である。1 is a diagram schematically showing the configuration of a simulation system 1 according to the present embodiment. 本実施の形態に係る制御システム10のシステム構成を示す模式図である。FIG. 1 is a schematic diagram showing a system configuration of a control system 10 according to the present embodiment. 本実施の形態に係るPLC100の主要部を示すハードウェア構成を示す模式図である。FIG. 1 is a schematic diagram showing a hardware configuration showing the main parts of a PLC 100 according to the present embodiment. 本実施の形態に係るPLC100のソフトウェア構成を示す模式図である。FIG. 1 is a schematic diagram showing the software configuration of PLC 100 according to the present embodiment. 実施の形態に係るPLC100における周期制御の一例を示す模式図である。It is a schematic diagram showing an example of periodic control in PLC100 concerning an embodiment. 本実施の形態に係るサポート装置300のハードウェア構成を示す模式図である。FIG. 3 is a schematic diagram showing the hardware configuration of a support device 300 according to the present embodiment. 本実施の形態に係るサポート装置300のソフトウェア構成を示す模式図である。FIG. 3 is a schematic diagram showing the software configuration of support device 300 according to the present embodiment. 本実施の形態に係るプログラム開発環境の構成を模式的に示す図である。1 is a diagram schematically showing the configuration of a program development environment according to the present embodiment. 本実施の形態に係るDBアクセス処理に関するユーザプログラム186のコード例を簡略的に示す図である。3 is a diagram schematically showing a code example of a user program 186 related to DB access processing according to the present embodiment. FIG. 本実施の形態に係る設定ファイル345の一例を示す図である。It is a diagram showing an example of a settings file 345 according to the present embodiment. 本実施の形態に係る設定ツール339を説明する図である。FIG. 3 is a diagram illustrating a setting tool 339 according to the present embodiment. 本実施の形態に係るシミュレーションシステム1がクラウド環境に実装される構成を示す図である。1 is a diagram showing a configuration in which a simulation system 1 according to the present embodiment is implemented in a cloud environment. 本実施の形態に係るシミュレーションのフローチャートである。3 is a flowchart of simulation according to the present embodiment.

以下、図面を参照しつつ、本発明に従う実施の形態について説明する。以下の説明では、同一の部品および構成要素には同一の符号を付してある。それらの名称および機能も同じである。したがって、これらについての詳細な説明は繰り返さない。 Embodiments according to the present invention will be described below with reference to the drawings. In the following description, the same parts and components are given the same reference numerals. Their names and functions are also the same. Therefore, detailed explanations thereof will not be repeated.

<A.適用例>
本発明の適用例について説明する。本実施の形態に係るシミュレーションシステム1は、生産ラインの機械・設備を駆動する駆動機器等のフィールド機器を制御するためのプログラムを含むユーザプログラムを開発する環境に適用され得る。本実施の形態においては、フィールド機器を制御するPLCをコントローラの典型例として説明する。但し、本発明に係るコントローラは、PLCに限られることなく、各種の制御装置へ適用可能である。
<A. Application example>
An application example of the present invention will be explained. The simulation system 1 according to the present embodiment can be applied to an environment for developing user programs including programs for controlling field devices such as drive devices that drive machines and equipment on a production line. In this embodiment, a PLC that controls field devices will be described as a typical example of a controller. However, the controller according to the present invention is not limited to PLC, and can be applied to various control devices.

図1は、本実施の形態に係るシミュレーションシステム1の構成を模式的に示す図である。図1では、シミュレーションシステム1の構成が、実機のPLC100の構成と関連付けて示される。図1を参照して、PLC100は、フィールド機器95が属する通信ネットワークの一例であるフィールドバス110を接続するフィールドバスコネクタ158と、DB(データベースの略)を管理するDB装置400が属する上位のネットワーク112を接続する上位通信コネクタ168を有する。DB装置400は、PLC100と制御処理に関連する情報を通信する情報処理装置の一例である。 FIG. 1 is a diagram schematically showing the configuration of a simulation system 1 according to the present embodiment. In FIG. 1, the configuration of a simulation system 1 is shown in association with the configuration of an actual PLC 100. Referring to FIG. 1, the PLC 100 includes a fieldbus connector 158 that connects the fieldbus 110, which is an example of a communication network to which the field device 95 belongs, and an upper network to which a DB device 400 that manages a DB (abbreviation for database) belongs. 112 is connected to the upper communication connector 168. The DB device 400 is an example of an information processing device that communicates information related to control processing with the PLC 100.

本実施の形態では、フィールドバス110は、狭義の通信ネットワークの概念を含み得る。フィールドバス110は、データの到達時間が保証される、定周期通信を行なうバスまたはネットワークを採用することが好ましい。このような定周期通信を行なうバスまたはネットワークとしては、EtherCAT(登録商標)、EtherNet/IP(登録商標)、DeviceNet(登録商標)、CompoNet(登録商標)などが知られている。これに対し、上位のネットワーク112には、一般的なネットワークプロトコルであるイーサネット(登録商標)やEtherNet/IP(登録商標)が採用され得る。 In this embodiment, fieldbus 110 may include the concept of a communication network in a narrow sense. It is preferable that the field bus 110 employs a bus or network that performs fixed-cycle communication in which data arrival time is guaranteed. EtherCAT (registered trademark), EtherNet/IP (registered trademark), DeviceNet (registered trademark), CompoNet (registered trademark), and the like are known as buses or networks that perform such periodic communication. On the other hand, the upper network 112 may employ general network protocols such as Ethernet (registered trademark) or EtherNet/IP (registered trademark).

また、PLC100は、フィールド機器95の制御処理を実施するためのユーザプログラム186(図中では、ユーザプログラムは“UPG”と略される)を実行する環境を提供する実行部189を有する。実行部189は、ユーザプログラム186を含むアプリケーションプログラムを実行するための、システムプログラム188を含むプラットフォームとして構成される。システムプログラム188は、OS(Operating System)、各種ライブラリ、およびDB通信プログラム192を含む各種通信プログラムを有する。DB通信プログラム192が実行されることにより、PLC100は、制御処理に関連する情報をDB装置400と通信する通信処理を実施する。 Further, the PLC 100 includes an execution unit 189 that provides an environment for executing a user program 186 (in the figure, the user program is abbreviated as “UPG”) for implementing control processing for the field device 95. The execution unit 189 is configured as a platform including a system program 188 for executing application programs including a user program 186. The system program 188 includes an OS (Operating System), various libraries, and various communication programs including a DB communication program 192. By executing the DB communication program 192, the PLC 100 performs communication processing to communicate information related to control processing with the DB device 400.

制御処理では、フィールド機器95から受信される状態値を用いて、制御指令を算出する制御演算が実施され、算出された制御指令はフィールド機器95に送信される。フィールド機器95は制御指令に従って動作し、動作結果である当該フィールド機器95の状態値をPLC100に送信する。PLC100ではUPG189は周期的に実行される。これにより、当該周期に同期して算出される制御指令に基づきフィールド機器95は動作を継続する。また、PLC100は、DB通信プログラム192をUPG189の実行周期に同期した周期で実行する。このような周期制御により、PLC100は、制御処理に関連する情報を周期的にDB装置400と通信することができる。 In the control process, a control calculation for calculating a control command is performed using the state value received from the field device 95, and the calculated control command is transmitted to the field device 95. The field device 95 operates according to the control command, and transmits the state value of the field device 95, which is the operation result, to the PLC 100. In the PLC 100, the UPG 189 is executed periodically. As a result, the field device 95 continues to operate based on the control command calculated in synchronization with the period. Further, the PLC 100 executes the DB communication program 192 at a cycle synchronized with the execution cycle of the UPG 189. Such periodic control allows the PLC 100 to periodically communicate information related to control processing with the DB device 400.

DB装置400としては、データベースを提供する公知の構成を採用することができる。このようなデータベースとしては、リレーショナルデータ型やオブジェクトデータ型といった任意の構成を採用できる。DB装置400は、汎用的なコンピュータアーキテクチャに従って構成されるため、ここではその詳細な説明は繰り返さない。DB装置400は、PLC100から受信する情報に基づきDBについてアクセス処理を実施し、処理結果に基づく応答をPLC100に送信する。より具体的には、DB装置400は、PLC100からの接続要求やアクセス要求(リレーショナルデータ型では、データベース操作言語の1種であるSQL文で規定される命令コード)を受けて、当該要求に基づき必要なデータ処理を実行し、その処理結果などをPLC100へ応答する。 As the DB device 400, a known configuration that provides a database can be adopted. Any configuration such as a relational data type or an object data type can be adopted as such a database. Since the DB device 400 is configured according to a general-purpose computer architecture, its detailed description will not be repeated here. The DB device 400 performs access processing on the DB based on information received from the PLC 100, and transmits a response based on the processing result to the PLC 100. More specifically, the DB device 400 receives a connection request or an access request (for relational data type, an instruction code defined in an SQL statement, which is a type of database operation language) from the PLC 100, and executes a request based on the request. It executes necessary data processing and responds to the PLC 100 with the processing results.

DB通信プログラム192の通信処理では、制御処理において出力される接続要求やアクセス要求を、DB装置400で処理可能なフォーマット、例えばSQL文に変換し、変換後の接続要求やアクセス要求を含むDB操作命令をDB装置400に送信(発行)する。また、通信処理では、当該DB操作命令に基づく処理結果の応答をDB装置400から受信し、実行部189に渡す。 In the communication processing of the DB communication program 192, connection requests and access requests output in the control processing are converted into a format that can be processed by the DB device 400, for example, SQL statements, and DB operations including the converted connection requests and access requests are performed. A command is transmitted (issued) to the DB device 400. In the communication process, a response of the processing result based on the DB operation command is received from the DB device 400 and passed to the execution unit 189.

シミュレーションシステム1は、汎用コンピュータを含んで構成されるサポート装置300上に構成される。シミュレーションシステム1は、主に制御処理をシミュレーションするシミュレーション部を構成するシミュレータ338と、PLC100の通信処理を実施する通信部を構成するDB接続システム351と、設定ツール339を含む。DB接続システム351は、DB通信プログラム192の少なくとも1つの命令コードを含んで構成される実行可能形式の通信モジュールを含む。DB接続システム351は、シミュレータ338とは独立したモジュールとして提供される。より具体的には、シミュレータ338とDB接続システム351とは互いに呼び出し、または呼び出されることなく、独立して動作可能に構成されている。 The simulation system 1 is configured on a support device 300 that includes a general-purpose computer. The simulation system 1 includes a simulator 338 that constitutes a simulation section that mainly simulates control processing, a DB connection system 351 that constitutes a communication section that executes communication processing of the PLC 100, and a setting tool 339. The DB connection system 351 includes an executable communication module configured to include at least one instruction code of the DB communication program 192. The DB connection system 351 is provided as a module independent of the simulator 338. More specifically, the simulator 338 and the DB connection system 351 are configured to be able to call each other or operate independently without being called.

設定ツール339は、シミュレータ338によってシミュレーションされる制御処理に関連する情報についてDB装置400との通信処理をDB接続システム351に実施させるための設定をする設定部として構成される。すなわち、設定ツール339は、このように互いに独立したシミュレータ338とDB接続システム351との間の情報の遣り取り(授受)と、DB接続システム351がDB装置400と通信する処理を実現するための設定をする設定部として構成される。シミュレータ338とDB接続システム351との間で遣り取りされる情報は、シミュレータ338がシミュレーションする制御処理に関連する情報であって、例えば、上記に述べた制御指令や状態値を含むが、これらに限定されない。 The setting tool 339 is configured as a setting unit that performs settings for causing the DB connection system 351 to perform communication processing with the DB device 400 regarding information related to the control processing simulated by the simulator 338. That is, the setting tool 339 performs settings for realizing the exchange of information between the simulator 338 and the DB connection system 351, which are independent from each other, and the processing for the DB connection system 351 to communicate with the DB device 400. It is configured as a setting section that performs. The information exchanged between the simulator 338 and the DB connection system 351 is information related to the control processing simulated by the simulator 338, and includes, for example, the control commands and status values described above, but is not limited to these. Not done.

シミュレーションシステム1では、シミュレータ338が起動されると、DB接続システム351も起動される。シミュレータ338によって、ユーザプログラム186が実行されることにより制御処理がシミュレーションされる。より具体的には、例えば状態値が目標値となるようにシミュレーションが繰り返し実行されることで、状態値や制御指令が時系列に取得される。DB接続システム351は、設定ツール339の設定に従って通信処理を実施する。より具体的には、当該設定に従って、DB接続システム351は、シミュレータ338からの状態値または制御指令の制御処理に関連する情報を取得し、取得された情報を、DBの接続要求やアクセス要求のDB操作命令とともに、サポート装置300の通信IF(インターフェイスの略)318を介してネットワーク112上のDB装置400と通信処理する。DB装置400は、サポート装置300からのDB操作命令に基づくデータ処理を実行し、その処理結果の応答をサポート装置300(DB接続システム351)へ送信する。 In the simulation system 1, when the simulator 338 is started, the DB connection system 351 is also started. The control processing is simulated by the simulator 338 by executing the user program 186. More specifically, for example, a simulation is repeatedly executed so that the state value becomes the target value, so that the state value and the control command are acquired in time series. The DB connection system 351 performs communication processing according to the settings of the setting tool 339. More specifically, according to the settings, the DB connection system 351 acquires information related to the control processing of the status value or control command from the simulator 338, and uses the acquired information to respond to the DB connection request or access request. Along with the DB operation command, communication processing is performed with the DB device 400 on the network 112 via the communication IF (abbreviation for interface) 318 of the support device 300 . The DB device 400 executes data processing based on the DB operation command from the support device 300, and transmits a response of the processing result to the support device 300 (DB connection system 351).

DB接続システム351は、通信処理においてDB装置400からの応答を受信し、設定ツール339の設定に従って、シミュレータ338に当該応答を出力する。シミュレータ338は、当該応答をシミュレーションに利用する、または、UI(ユーザインターフェイス)等で出力する。このようなUIが提供されることにより、ユーザ(プログラム開発者)に対し、応答を分析するための情報が提供される。ユーザは、応答の分析に基づき、ユーザプログラム186のデバッグ、例えばDBアクセス処理を構成する命令コードのデバッグが可能となる。 The DB connection system 351 receives a response from the DB device 400 in communication processing, and outputs the response to the simulator 338 according to the settings of the setting tool 339. The simulator 338 uses the response for simulation or outputs it on a UI (user interface) or the like. By providing such a UI, the user (program developer) is provided with information for analyzing the response. Based on the analysis of the response, the user can debug the user program 186, for example, the instruction code that constitutes the DB access process.

このように、シミュレーションシステム1を利用してデバッグ等がされて開発が完了したユーザプログラム186は、実行可能形式のプログラムに変換されて、サポート装置300から実機のPLC100に転送され、例えばHDD(Hard Disk Drive)等の不揮発性記憶部に格納される。PLC100は、起動されると、ユーザプログラム186を不揮発性記憶部から、RAM(Random Access Memory)を含む揮発性メモリの作業領域に読出し展開する。PLC100は、展開されたプログラムを解釈および実行することで制御処理を実施し、DB装置400と制御処理に関連する情報を通信する。 In this way, the user program 186, which has been debugged and developed using the simulation system 1, is converted into an executable program and transferred from the support device 300 to the actual PLC 100. The data is stored in a non-volatile storage unit such as a disk drive. When the PLC 100 is started, the user program 186 is read from a non-volatile storage section and expanded into a volatile memory work area including a RAM (Random Access Memory). The PLC 100 performs control processing by interpreting and executing the expanded program, and communicates information related to the control processing with the DB device 400.

なお、図1において、シミュレーションシステム1が通信する情報処理装置はDB装置400に限定されない。例えば、DB装置400と同様の性能・動作を実現するネットワーク112上の他のデバイスを利用してもよい。また、この他のデバイスが属するネットワークは、ネットワーク112に限定されず、ネットワーク112と同様の性能を有するものであれば、他のネットワークであってもよい。 Note that in FIG. 1, the information processing device with which the simulation system 1 communicates is not limited to the DB device 400. For example, other devices on the network 112 that achieve the same performance and operation as the DB device 400 may be used. Further, the network to which this other device belongs is not limited to the network 112, but may be any other network as long as it has the same performance as the network 112.

また、図1のサポート装置300の構成はPLC100に内蔵されてもよい。この場合、PLC100は、例えば、産業用PC(IPC:Industrial Personal Computer)で実現され得る。 Further, the configuration of the support device 300 in FIG. 1 may be built into the PLC 100. In this case, the PLC 100 may be realized by, for example, an industrial personal computer (IPC).

以下、本実施の形態のより具体的な応用例について説明する。
<B.システム構成>
図2は、本実施の形態に係る制御システム10のシステム構成を示す模式図である。図2を参照して、制御システム10は、PLC100と、PLC100に接続可能なサポート装置300と、PLC100からのアクセスを受けるDB装置400とを含む。PLC100は、ユーザプログラム186を周期的またはイベント的に実行する。ユーザプログラム186は、データベースのアクセスに関する命令を含めることができ、PLC100は、この命令に従って、DB装置400にアクセスすることができる。PLC100およびDB装置400は、イーサネット(登録商標)などのネットワーク112を介して、データを互いに遣り取りできるように構成される。また、ネットワーク112に属する情報処理装置は、さらに、PLC100から収集する収集データ512を管理するデータサーバ500と、Webサーバ600とを含む。
A more specific application example of this embodiment will be described below.
<B. System configuration>
FIG. 2 is a schematic diagram showing the system configuration of the control system 10 according to this embodiment. Referring to FIG. 2, control system 10 includes PLC 100, a support device 300 connectable to PLC 100, and a DB device 400 that receives access from PLC 100. PLC 100 executes user program 186 periodically or on an event basis. The user program 186 can include instructions regarding database access, and the PLC 100 can access the DB device 400 in accordance with the instructions. The PLC 100 and the DB device 400 are configured to be able to exchange data with each other via a network 112 such as Ethernet (registered trademark). Further, the information processing apparatus belonging to the network 112 further includes a data server 500 that manages collected data 512 collected from the PLC 100 and a web server 600.

サポート装置300は、PLC100に接続可能に構成される。サポート装置300はシミュレーションシステム1の環境を提供するとともに、PLC100との間で各種パラメータの設定、プログラミング、モニタ、デバッグなどの機能を提供する。サポート装置300は、接続ケーブル114を介してPLC100に接続され、PLC100とサポート装置300との間は、典型的には、USB(Universal Serial Bus)規格に従って通信可能に構成される。なお、サポート装置300は、接続ケーブル114が脱着自在に構成され得て、接続ケーブル114が接続されない、すなわちスタンドアロンで動作することもできる。 The support device 300 is configured to be connectable to the PLC 100. The support device 300 provides an environment for the simulation system 1, and also provides functions such as setting various parameters, programming, monitoring, and debugging with the PLC 100. The support device 300 is connected to the PLC 100 via the connection cable 114, and the PLC 100 and the support device 300 are typically configured to be communicable according to the USB (Universal Serial Bus) standard. Note that the support device 300 may be configured such that the connection cable 114 is detachable, and may also be operated stand-alone without the connection cable 114 being connected.

PLC100は、制御演算を実行するCPUユニット104と、1つ以上のIO(Input/Output)ユニット106とを含む。これらのユニットは、PLCシステムバス108を介して、データを互いに遣り取りできるように構成される。また、これらのユニットには、電源ユニット102によって適切な電圧の電源が供給される。 PLC 100 includes a CPU unit 104 that executes control calculations and one or more IO (Input/Output) units 106. These units are configured to be able to exchange data with each other via the PLC system bus 108. Further, power of appropriate voltage is supplied to these units by the power supply unit 102.

制御システム10において、PLC100は、IOユニット106を介して、および/または、フィールドバス110を介して、各種のフィールド機器95との間で制御指令および状態値を含むデータを遣り取りする。これらのフィールド機器95は、生産ラインに備えられるアクチュエータや、生産ラインから各種情報を取得するためのセンサなどを含む。図1には、このようなフィールド機器95の一例として、検出スイッチ11、リレー20およびモータ32を駆動するサーボモータドライバ30を含む。また、PLC100は、フィールドバス110を介してリモートIOターミナル200も接続されている。リモートIOターミナル200は、基本的には、IOユニット106と同様に、一般的な入出力処理に関する処理を行う。より具体的には、リモートIOターミナル200は、フィールドバス110でのデータ伝送に係る処理を行うための通信カプラ205と、1つ以上のIOユニット204とを含む。これらのユニットは、リモートIOターミナルバス208を介して、データを互いに遣り取りできるように構成される。 In the control system 10, the PLC 100 exchanges data including control commands and status values with various field devices 95 via the IO unit 106 and/or the field bus 110. These field devices 95 include actuators provided in the production line, sensors for acquiring various information from the production line, and the like. FIG. 1 includes a detection switch 11, a relay 20, and a servo motor driver 30 that drives a motor 32 as an example of such a field device 95. Further, the PLC 100 is also connected to a remote IO terminal 200 via a field bus 110. The remote IO terminal 200 basically performs general input/output processing similarly to the IO unit 106. More specifically, remote IO terminal 200 includes a communication coupler 205 for processing data transmission on fieldbus 110 and one or more IO units 204. These units are configured to be able to exchange data with each other via remote IO terminal bus 208 .

<C.PLC100の構成>
次に、本実施の形態に係るPLC100の構成について説明する。図3は、本実施の形態に係るPLC100の主要部を示すハードウェア構成を示す模式図である。図4は、本実施の形態に係るPLC100のソフトウェア構成を示す模式図である。
<C. Configuration of PLC100>
Next, the configuration of PLC 100 according to this embodiment will be explained. FIG. 3 is a schematic diagram showing the hardware configuration of the main parts of the PLC 100 according to the present embodiment. FIG. 4 is a schematic diagram showing the software configuration of PLC 100 according to this embodiment.

図3を参照して、PLC100のCPUユニット104のハードウェア構成について説明する。CPUユニット104は、プロセッサ120と、チップセット122と、システムクロック124と、主メモリ126と、不揮発性メモリ128と、USBコネクタ130と、PLCシステムバスコントローラ140と、フィールドバスコントローラ150と、上位通信コントローラ160と、メモリカードインターフェイス170とを含む。チップセット122と他のコンポーネントとの間は、各種のバスを介してそれぞれ結合されている。 The hardware configuration of the CPU unit 104 of the PLC 100 will be described with reference to FIG. 3. The CPU unit 104 includes a processor 120, a chipset 122, a system clock 124, a main memory 126, a non-volatile memory 128, a USB connector 130, a PLC system bus controller 140, a field bus controller 150, and upper level communication. It includes a controller 160 and a memory card interface 170. The chipset 122 and other components are coupled via various buses.

プロセッサ120およびチップセット122は、典型的には、汎用的なコンピュータアーキテクチャに準じて構成される。すなわち、プロセッサ120は、チップセット122から内部クロックに従って順次供給される命令コードを解釈して実行する。チップセット122は、接続されている各種コンポーネントとの間で内部的なデータを遣り取りするとともに、プロセッサ120に必要な命令コードを生成する。システムクロック124は、予め定められた周期のシステムクロックを発生してプロセッサ120に提供する。チップセット122は、プロセッサ120での演算処理の実行の結果得られたデータなどをキャッシュする機能を有する。 Processor 120 and chipset 122 are typically configured according to a general purpose computer architecture. That is, the processor 120 interprets and executes instruction codes sequentially supplied from the chipset 122 according to the internal clock. The chipset 122 exchanges internal data with various connected components and generates instruction codes necessary for the processor 120. The system clock 124 generates a system clock with a predetermined cycle and provides it to the processor 120. The chipset 122 has a function of caching data obtained as a result of execution of arithmetic processing by the processor 120.

CPUユニット104は、記憶部として、主メモリ126および不揮発性メモリ128を有する。主メモリ126は、揮発性の記憶領域であり、プロセッサ120で実行されるべき各種プログラムを保持するとともに、各種プログラムの実行時の作業用メモリとしても使用される。不揮発性メモリ128は、システムプログラム、ユーザプログラム186、データ定義情報、稼働ログの情報などを不揮発的に保持する。 The CPU unit 104 has a main memory 126 and a nonvolatile memory 128 as storage units. The main memory 126 is a volatile storage area that holds various programs to be executed by the processor 120 and is also used as a working memory when executing various programs. The nonvolatile memory 128 nonvolatilely stores system programs, user programs 186, data definition information, operation log information, and the like.

USBコネクタ130は、サポート装置300とCPUユニット104とを接続するためのインターフェイスである。典型的には、サポート装置300から転送される実行可能なプログラムなどは、USBコネクタ130を介してCPUユニット104に取込まれる。 The USB connector 130 is an interface for connecting the support device 300 and the CPU unit 104. Typically, executable programs and the like transferred from the support device 300 are loaded into the CPU unit 104 via the USB connector 130.

CPUユニット104は、通信回路として、PLCシステムバスコントローラ140、フィールドバスコントローラ150、および上位通信コントローラ160を有する。これらの通信回路は、データの送信および受信を行う。 The CPU unit 104 includes a PLC system bus controller 140, a fieldbus controller 150, and an upper communication controller 160 as communication circuits. These communication circuits transmit and receive data.

PLCシステムバスコントローラ140は、PLCシステムバス108を介したデータの遣り取りを制御する。より具体的には、PLCシステムバスコントローラ140は、バッファメモリ142と、PLCシステムバス制御回路144と、DMA(Dynamic Memory Access)制御回路146とを含む。PLCシステムバスコントローラ140は、PLCシステムバスコネクタ148を介してPLCシステムバス108と接続される。 PLC system bus controller 140 controls data exchange via PLC system bus 108. More specifically, the PLC system bus controller 140 includes a buffer memory 142, a PLC system bus control circuit 144, and a DMA (Dynamic Memory Access) control circuit 146. PLC system bus controller 140 is connected to PLC system bus 108 via PLC system bus connector 148.

フィールドバスコントローラ150は、バッファメモリ152と、フィールドバス制御回路154と、DMA制御回路156とを含む。フィールドバスコントローラ150は、フィールドバスコネクタ158を介してフィールドバス110と接続される。上位通信コントローラ160は、バッファメモリ162と、上位通信制御回路164と、DMA制御回路166とを含む。上位通信コントローラ160は、上位通信コネクタ168を介してネットワーク112と接続される。 Fieldbus controller 150 includes a buffer memory 152, a fieldbus control circuit 154, and a DMA control circuit 156. Fieldbus controller 150 is connected to fieldbus 110 via fieldbus connector 158. Upper communication controller 160 includes a buffer memory 162, an upper communication control circuit 164, and a DMA control circuit 166. Upper communication controller 160 is connected to network 112 via upper communication connector 168.

メモリカードインターフェイス170は、CPUユニット104に対して脱着可能なメモリカード172とプロセッサ120とを接続する。 A memory card interface 170 connects a memory card 172 that is removable to the CPU unit 104 and the processor 120 .

次に、図4を参照して、本実施の形態に係るPLC100が提供する各種機能を実現するためのソフトウェア構成について説明する。これらのソフトウェアに含まれる命令コードは、適切なタイミングで読み出され、CPUユニット104のプロセッサ120によって実行される。 Next, with reference to FIG. 4, a software configuration for realizing various functions provided by PLC 100 according to the present embodiment will be described. The instruction codes included in these software are read out at appropriate timing and executed by the processor 120 of the CPU unit 104.

図4を参照して、CPUユニット104で実行されるソフトウェアとしては、OS180と、システムプログラム188と、ユーザプログラム186との3階層になっている。 Referring to FIG. 4, the software executed by CPU unit 104 has three layers: OS 180, system program 188, and user program 186.

OS180は、プロセッサ120がシステムプログラム188およびユーザプログラム186を実行するための基本的な環境を提供する。システムプログラム188は、PLC100としての基本的な機能を提供するためのソフトウェア群である。具体的には、システムプログラム188は、シーケンス命令プログラム190と、DB通信プログラム192と、ファイル転送プログラム193と、入出力処理プログラム194と、Toolインターフェイス処理プログラム196と、スケジューラ198を有するマルチタスク実行プログラム199とを含む。OS180およびシステムプログラム188は、協働して実行部189を構成する。 OS 180 provides the basic environment for processor 120 to execute system program 188 and user program 186. The system program 188 is a software group for providing the basic functions of the PLC 100. Specifically, the system program 188 is a multitask execution program having a sequence instruction program 190, a DB communication program 192, a file transfer program 193, an input/output processing program 194, a tool interface processing program 196, and a scheduler 198. 199. The OS 180 and the system program 188 cooperate to form an execution unit 189.

これに対して、ユーザプログラム186は、制御対象に対する制御目的に応じて任意に作成されたプログラムである。すなわち、ユーザプログラム186は、制御システム10を用いて制御する対象のライン(プロセス)などに応じて、任意に設計される。 On the other hand, the user program 186 is a program arbitrarily created according to the purpose of controlling the controlled object. That is, the user program 186 is arbitrarily designed depending on the line (process) to be controlled using the control system 10.

ユーザプログラム186は、シーケンス命令プログラム190と協働して、ユーザにおける制御目的を実現する。すなわち、ユーザプログラム186は、シーケンス命令プログラム190によって提供される命令、関数、機能モジュールなどを利用することで、プログラムされた動作を実現する。そのため、ユーザプログラム186およびシーケンス命令プログラム190により制御プログラムが構成され得る。 User program 186 cooperates with sequence instruction program 190 to implement control objectives at the user. That is, the user program 186 implements programmed operations by using instructions, functions, functional modules, etc. provided by the sequence instruction program 190. Therefore, the user program 186 and the sequence instruction program 190 can constitute a control program.

データ定義情報182は、ユーザプログラム186などが実行される際に、参照されるデータ(入力データ、出力データ、内部データ)をユニークな変数として扱うための定義を含む。稼働ログ184には、PLC100によって、収集されたフィールド機器95の制御(稼働)に伴ってロギングされるべき情報を示す。稼働ログ184は、通常のユーザプログラム186の実行に伴って出力される状態値または制御指令等を含むログ、DB装置400との通信に係る情報(要求や応答)のログ等を含む。なお、PLC100が収集するログは、プログラムの実行失敗やハードウェアの不具合の発生に伴って出力されるログや、ユーザプログラム186において任意に指定された位置および内容のログも含み得る。また、稼働ログ184には、稼働時のログの情報が時刻情報と関連付けて格納されるファイル形式を有する。 The data definition information 182 includes definitions for handling referenced data (input data, output data, internal data) as unique variables when the user program 186 and the like are executed. The operation log 184 shows information to be logged by the PLC 100 as the field device 95 is controlled (operated). The operation log 184 includes a log including status values or control commands outputted with the execution of the normal user program 186, a log of information (requests and responses) related to communication with the DB device 400, and the like. Note that the logs collected by the PLC 100 may include logs output when a program fails to execute or a hardware malfunction occurs, and logs whose locations and contents are arbitrarily specified in the user program 186. Further, the operation log 184 has a file format in which log information during operation is stored in association with time information.

DB通信プログラム192は、ユーザプログラム186の実行に伴って、DB装置400へアクセスするために必要な処理を実現するための命令コード群を含む。DB通信プログラム192は、ユーザプログラム186において指定可能な命令に対応する実行コードを含む。 The DB communication program 192 includes a group of instruction codes for implementing the processing necessary to access the DB device 400 as the user program 186 is executed. The DB communication program 192 includes execution codes corresponding to instructions that can be specified in the user program 186.

ファイル転送プログラム193は、例えば稼働ログ184を転送可能な形式のファイルに編集し、編集後のファイルを、ネットワーク112を介して転送するプログラムである。入出力処理プログラム194は、IOユニット106や各種のフィールド機器との間で、入力データの取得および出力データの送信を管理するためのプログラムである。Toolインターフェイス処理プログラム196は、サポート装置300との間でデータを遣り取りするためのインターフェイスを提供する。 The file transfer program 193 is a program that edits the operation log 184 into a file in a transferable format, for example, and transfers the edited file via the network 112. The input/output processing program 194 is a program for managing acquisition of input data and transmission of output data between the IO unit 106 and various field devices. The Tool interface processing program 196 provides an interface for exchanging data with the support device 300.

スケジューラ198は、マルチタスク制御のもとで、予め定められた優先度やシステムタイマの値などに従って、制御プログラムやユーザプログラム186を実行するためのスレッドやプロシージャを生成する。 The scheduler 198 generates threads and procedures for executing the control program and the user program 186 according to predetermined priorities, system timer values, etc. under multitasking control.

ユーザプログラム186は、上述したように、ユーザにおける制御目的(たとえば、対象のラインやプロセス)に応じて作成される。ユーザプログラム186は、典型的には、プロセッサ120で実行可能なオブジェクトプログラム形式になっている。ユーザプログラム186は、サポート装置300などにおいて、ラダー形式やファンクションブロック形式で記述されたソースプログラムがコンパイルされることで生成される。そして、生成されたオブジェクトプログラム形式のユーザプログラム186は、サポート装置300からCPUユニット104へ転送され、不揮発性メモリ128などに格納される。 As described above, the user program 186 is created according to the user's control purpose (for example, target line or process). User program 186 is typically in the form of an object program executable by processor 120. The user program 186 is generated by compiling a source program written in a ladder format or a function block format in the support device 300 or the like. The generated user program 186 in the object program format is then transferred from the support device 300 to the CPU unit 104 and stored in the nonvolatile memory 128 or the like.

<D.周期制御>
図5は、実施の形態に係るPLC100における周期制御の一例を示す模式図である。PLC100は、マルチタスク実行プログラム199を実行することにより、タスク単位でプロセッサ120などのリソースを割当てるマルチタスク実行部を構成する。マルチタスク実行部は、制御処理45を実施するための制御タスクおよび、当該制御処理45に関連する関連処理46を実施するための関連処理タスクを含む複数のタスクを実行する。関連処理46のタスクは、DB通信プログラム192に基づくタスクであるDB接続サービス47のタスクと、ファイル転送プログラム193に基づくアスクであるファイル転送サービス185とを含む。関連処理46のタスクは、更に別の種類のタスクが含まれてもよい。
<D. Periodic control>
FIG. 5 is a schematic diagram showing an example of periodic control in the PLC 100 according to the embodiment. The PLC 100 constitutes a multitask execution unit that allocates resources such as the processor 120 on a task-by-task basis by executing a multitask execution program 199. The multitask execution unit executes a plurality of tasks including a control task for implementing control processing 45 and a related processing task for implementing related processing 46 related to the control processing 45. The tasks of the related processing 46 include the DB connection service 47 task, which is a task based on the DB communication program 192, and the file transfer service 185, which is an ask based on the file transfer program 193. The related processing 46 tasks may further include other types of tasks.

マルチタスク実行部は、スケジューラ198を利用して、予め定められた周期、例えば制御周期Tに同期して、タスクの優先度に従って、リソースを割当てるべきタスクを切替える。例えば、図5に示されるように、最も優先度の高い制御処理45のタスクは制御周期Tの第1の周期で実行されることが保証され、優先度の低い関連処理46のタスクは、例えば制御周期Tのリソース(プロセッサ120)の空き時間で実行される。限定されないが、関連処理46のタスクは、例えば制御周期Tの整数倍の周期で実行される。実施の形態では、DB接続サービス47のタスクは、例えば周期2T、すなわち2倍の制御周期T毎に実行され、ファイル転送サービス185のタスクは、例えば周期4T、すなわち4倍の制御周期T毎に実行される。このように、マルチタスク実行部によって、PLC100では、制御処理と、DB装置400との通信処理とが並行して実行される。 The multitask execution unit uses the scheduler 198 to switch tasks to which resources should be allocated in synchronization with a predetermined period, for example, a control period T, according to the priority of the task. For example, as shown in FIG. 5, the task of the control process 45 with the highest priority is guaranteed to be executed in the first cycle of the control cycle T, and the task of the related process 46 with the lowest priority is It is executed during the free time of the resource (processor 120) in the control period T. Although not limited to this, the tasks of the related processing 46 are executed, for example, at a cycle that is an integral multiple of the control cycle T. In the embodiment, the task of the DB connection service 47 is executed, for example, every cycle 2T, that is, twice the control cycle T, and the task of the file transfer service 185 is executed, for example, every cycle 4T, that is, every four times the control cycle T. executed. In this way, the multitask execution unit executes control processing and communication processing with the DB device 400 in parallel in the PLC 100.

<E.サポート装置300の構成>
次に、本実施の形態に係るサポート装置300について説明する。図6は、本実施の形態に係るサポート装置300のハードウェア構成を示す模式図である。図7は、本実施の形態に係るサポート装置300のソフトウェア構成を示す模式図である。
<E. Configuration of support device 300>
Next, support device 300 according to this embodiment will be explained. FIG. 6 is a schematic diagram showing the hardware configuration of support device 300 according to this embodiment. FIG. 7 is a schematic diagram showing the software configuration of support device 300 according to this embodiment.

図6を参照して、サポート装置300は、OSを含む各種プログラムを実行するCPU302と、BIOSや各種データを格納するROM(Read Only Memory)304と、CPU302でのプログラムの実行に必要なデータを格納するための作業領域を提供するメモリのRAM309と、CPU302で実行されるプログラムなどを不揮発的に格納するHDD308とを含む。より具体的には、HDD308には、サポート装置300が提供する機能を実現するためのサポートプログラム335を含む各種プログラムとデータが格納されている。 Referring to FIG. 6, the support device 300 includes a CPU 302 that executes various programs including the OS, a ROM (Read Only Memory) 304 that stores the BIOS and various data, and data necessary for the CPU 302 to execute the programs. It includes a RAM 309 that is a memory that provides a work area for storage, and an HDD 308 that non-volatilely stores programs and the like that are executed by the CPU 302. More specifically, the HDD 308 stores various programs and data including a support program 335 for realizing the functions provided by the support device 300.

サポート装置300は、さらに、ユーザからサポート装置300に対する操作を受け付けるキーボード310およびマウス312と、情報をユーザに提示するためのモニタ314とを含む。さらに、サポート装置300は、DB装置400,データサーバ500およびWebサーバ600などのネットワーク112に属する情報処理装置と通信するための通信IF(インターフェイスの略)318、およびPLC100と通信するためのUSBコネクタ319を含む。 The support device 300 further includes a keyboard 310 and a mouse 312 that accept operations on the support device 300 from the user, and a monitor 314 that presents information to the user. Furthermore, the support device 300 includes a communication IF (abbreviation for interface) 318 for communicating with information processing devices belonging to the network 112 such as the DB device 400, data server 500, and web server 600, and a USB connector for communicating with the PLC 100. Contains 319.

サポート装置300で実行されるサポートプログラム335などは、光学ディスク332またはメモリカード333に格納されて流通する。光学ディスク332に格納されたプログラムは、光学ディスク読取装置316によって読み取られ、また、メモリカード333に格納されたプログラムはメモリカードI/F334によって読み取られ、HDD308などへ格納される。あるいは、プログラムは、上位のホストコンピュータなどからネットワーク112を通じて、サポート装置300にダウンロードされるように構成されてもよい。サポート装置300では、これら構成要素は内部バス320を介して相互に通信する。 The support program 335 and the like executed by the support device 300 are stored in the optical disk 332 or the memory card 333 and distributed. The program stored in the optical disc 332 is read by the optical disc reader 316, and the program stored in the memory card 333 is read by the memory card I/F 334 and stored in the HDD 308 or the like. Alternatively, the program may be configured to be downloaded to the support device 300 from an upper host computer or the like via the network 112. In support device 300, these components communicate with each other via internal bus 320.

図7を参照して、サポート装置300は、HDD308において、OS330、サポートプログラム335、開発対象のユーザプログラム186、設定ツール339の設定を格納する設定ファイル345、シミュレーションによる取得される稼働ログが格納されるログファイル346、DB接続システム351に対応の実行可能な形式のDB接続システムモジュール350、およびファイル転送モジュール360を含む。DB接続システムモジュール350は、DB通信プログラム192の少なくとも1つの命令コードを含む、実行可能な形式のモジュールである。または、ファイル転送モジュール360は、ログファイル346の収集データを例えばCSV(Comma Separated Value)ファイルに編集し、ネットワーク112に介してデータサーバ500に転送する、実行可能な形式のモジュールである。 Referring to FIG. 7, the support device 300 stores the OS 330, the support program 335, the user program 186 to be developed, a configuration file 345 that stores the settings of the configuration tool 339, and an operation log obtained by simulation in the HDD 308. DB connection system module 350 in an executable format corresponding to DB connection system 351 , and file transfer module 360 . DB connection system module 350 is a module in executable form that includes at least one instruction code of DB communication program 192 . Alternatively, the file transfer module 360 is an executable module that edits the collected data of the log file 346 into, for example, a CSV (Comma Separated Value) file and transfers the file to the data server 500 via the network 112.

サポートプログラム335は、開発プログラム336およびPLCインターフェイスプログラム340を含む。開発プログラム336は、開発対象のユーザプログラム186を含む各種のプログラムを設計するためのプログラミングツール(エディット、コンパイル、実行可能形式への変換(ビルド)など)、設計されたプログラムをテストするシミュレータ338、設定ツール339、設計されたプログラムをデバッグするツールなどを構成する各種プログラムを含む。PLCインターフェイスプログラム340は、サポート装置300とPLC100との間にデータの遣り取りを司る。 Support program 335 includes development program 336 and PLC interface program 340. The development program 336 includes programming tools (editing, compiling, converting to an executable format (build), etc.) for designing various programs including the user program 186 to be developed, a simulator 338 for testing the designed programs, It includes various programs constituting a setting tool 339, a tool for debugging a designed program, and the like. The PLC interface program 340 manages data exchange between the support device 300 and the PLC 100.

サポートプログラム335は、プログラム開発におけるユーザ操作をサポートするツール、およびPLC100との通信に係るユーザ操作をサポートするツールなどを提供する。このようなサポートツールはGUI(Graphical User Interface)またはUI(User Interface)を含む。本実施の形態では、OS330の元で開発プログラム336が実行されることにより、シミュレータ338が提供され、DB接続システムモジュール350が実行されることで、DB接続システム351が提供される。 The support program 335 provides tools that support user operations in program development, tools that support user operations related to communication with the PLC 100, and the like. Such support tools include a GUI (Graphical User Interface) or a UI (User Interface). In this embodiment, a simulator 338 is provided by executing a development program 336 under the OS 330, and a DB connection system 351 is provided by executing a DB connection system module 350.

<F.プログラム開発環境のモジュール構成>
図8は、本実施の形態に係るプログラム開発環境の構成を模式的に示す図である。図8に示されるように、サポート装置300におけるシミュレーションシステム1は、プログラミングツール337、シミュレータ338、設定ツール339、およびDB接続システム351を含む。
<F. Module configuration of program development environment>
FIG. 8 is a diagram schematically showing the configuration of a program development environment according to this embodiment. As shown in FIG. 8, the simulation system 1 in the support device 300 includes a programming tool 337, a simulator 338, a setting tool 339, and a DB connection system 351.

(f1.プログラミングツール337の構成)
プログラミングツール337は、ユーザプログラム186の開発と、ユーザの操作を受け付けてシミュレータ338の実行を制御する。プログラミングツール337は、GUI部41と、プログラム管理部43と、シミュレータ338とデータを遣り取りする通信部44と、シミュレーションIF(インターフェイスの略)部42とを含む。
(f1. Configuration of programming tool 337)
The programming tool 337 controls the development of the user program 186 and the execution of the simulator 338 by accepting user operations. The programming tool 337 includes a GUI section 41, a program management section 43, a communication section 44 that exchanges data with the simulator 338, and a simulation IF (abbreviation for interface) section 42.

GUI部41は、サポート装置300に対するユーザ操作を受付け、受付けたユーザ操作に基づき、シミュレーションやデバック等に関する種々の情報(例えば、シミュレーションの開始、停止等)をユーザとやり取りする機能を有する。 The GUI unit 41 has a function of accepting user operations on the support device 300 and exchanging various information regarding simulation, debugging, etc. (for example, start, stop, etc. of simulation) with the user based on the accepted user operations.

プログラム管理部43は、プログラムの作成や編集をする機能を有する。プログラム管理部43は、GUI部41を介してユーザから与えられる指示に従った処理を行う。具体的には、プログラム管理部43は、通信部44を介してのHDD308からのプログラムの読み込み又はプログラムの書き込み等の機能を有する。通信部44は、シミュレータ338の通信部54との通信インターフェイスを有する。 The program management section 43 has a function of creating and editing programs. The program management section 43 performs processing according to instructions given by the user via the GUI section 41. Specifically, the program management unit 43 has functions such as reading a program from the HDD 308 via the communication unit 44 or writing a program. The communication unit 44 has a communication interface with the communication unit 54 of the simulator 338.

シミュレーションI/F部42は、シミュレータ338との間で、シミュレーションやデバック等に関する種々の情報(例えば、シミュレータ338の起動、停止)をやり取りする機能を有する。 The simulation I/F unit 42 has a function of exchanging various information regarding simulation, debugging, etc. (for example, starting and stopping the simulator 338) with the simulator 338.

(f2.シミュレータ338の構成)
シミュレータ338は、ユーザの操作に基づいて動作し、DB接続システム351と協働してシミュレーションを実施する。この協働のために、シミュレータ338は、DB接続システム351とデータを遣り取りする。この詳細は、後述する。
(f2. Configuration of simulator 338)
The simulator 338 operates based on user operations and performs simulations in cooperation with the DB connection system 351. For this cooperation, the simulator 338 exchanges data with the DB connection system 351. The details will be described later.

シミュレータ338は、プログラミングツール337からのシミュレータ起動または停止の指令を受けて、起動または停止する。シミュレータ338は、プログラム制御部51と、停止条件保持部52と、プログラム実行部53と、通信部54と、プログラム実行部53によるプログラム実行のための情報を格納する記憶部301を含む。 The simulator 338 starts or stops in response to a command to start or stop the simulator from the programming tool 337. The simulator 338 includes a program control section 51, a stop condition holding section 52, a program execution section 53, a communication section 54, and a storage section 301 that stores information for program execution by the program execution section 53.

記憶部301は、プログラミングツール337によって作成されたユーザプログラム186と、シミュレーションのためのデータ306を格納する。データ306は、シミュレーションのための目標値、変数テーブル307およびログファイル346などを含む。記憶部301はHDD308およびRAM309の記憶領域を含んで構成され得る。変数テーブル307は、PLC100のデータ定義情報182により定義される各変数について、その識別子、例えば変数名と、当該変数に設定される値の組を含む。シミュレータ338によってユーザプログラム186が実行されると、当該実行によって取得された各変数の値(入力データの状態値、出力データの制御指令、中間値などの内部データ、およびDBアクセス処理の応答)が設定される。 The storage unit 301 stores the user program 186 created by the programming tool 337 and data 306 for simulation. Data 306 includes target values for simulation, variable table 307, log file 346, and the like. The storage unit 301 may include storage areas of an HDD 308 and a RAM 309. The variable table 307 includes, for each variable defined by the data definition information 182 of the PLC 100, a set of an identifier, for example, a variable name, and a value set for the variable. When the user program 186 is executed by the simulator 338, the values of each variable acquired by the execution (internal data such as input data status values, output data control commands, intermediate values, and responses of DB access processing) are Set.

プログラム実行部53は、所定の起動停止指令が与えられるのに応答して、記憶部301よりユーザプログラム186を読み出して実行するとともに、実行に伴いデータ306を読み書きする。記憶部301に保持されるユーザプログラム186とデータ306は、通信部54を介して、プログラミングツール337からモニタ可能とされている。さらに、データ306は、通信部54を介して、DB接続システム351からも読み込み又は書き込み可能とされている。 In response to being given a predetermined activation/stop command, the program execution unit 53 reads out and executes the user program 186 from the storage unit 301, and reads and writes data 306 along with the execution. The user program 186 and data 306 held in the storage unit 301 can be monitored by the programming tool 337 via the communication unit 54. Furthermore, the data 306 can also be read or written from the DB connection system 351 via the communication unit 54.

通信部54は、データの読み込みや書き込みをする機能を有する。また、通信部54は、DB接続システム351に対してデータを遣り取りするインターフェイスも提供している。通信部54を用いることにより、DB接続システム351は、シミュレータ338が実行中に読み書きするデータ306の変数の値を、読み書きすることができる。 The communication unit 54 has a function of reading and writing data. The communication unit 54 also provides an interface for exchanging data with the DB connection system 351. By using the communication unit 54, the DB connection system 351 can read and write variable values of the data 306 that the simulator 338 reads and writes during execution.

プログラム制御部51は、プログラミングツール337から与えられる起動停止指令に応答して、プログラム実行部53によるユーザプログラム186の実行の起動、停止を制御する機能を有する。また、プログラム制御部51は、プログラミングツール337から与えられる停止条件設定に応答して、その停止条件設定に含まれる「停止条件」を停止条件保持部52に設定保持させる機能を有する。 The program control unit 51 has a function of controlling the start and stop of execution of the user program 186 by the program execution unit 53 in response to a start and stop command given from the programming tool 337. Further, the program control unit 51 has a function of responding to the stop condition setting given from the programming tool 337 and causing the stop condition holding unit 52 to set and hold the “stop condition” included in the stop condition setting.

プログラム制御部51は、停止条件保持部52に設定保持される「停止条件」が満たされるかを常時監視し、「停止条件」が満たされたことが判定されたならば、プログラム実行部53におけるユーザプログラム186の実行を直ちに停止させる機能を有する。したがって、停止条件保持部52に所望の「停止条件」を設定保持させることで、シミュレーションを任意のタイミングで停止させる。これによりシミュレーションしながら、ユーザプログラム186のデバッグが可能とされている。 The program control unit 51 constantly monitors whether the “stop condition” set and held in the stop condition holding unit 52 is satisfied, and if it is determined that the “stop condition” is satisfied, the program execution unit 53 It has a function to immediately stop the execution of the user program 186. Therefore, by setting and holding a desired "stop condition" in the stop condition holding unit 52, the simulation is stopped at an arbitrary timing. This makes it possible to debug the user program 186 while simulating it.

(f3.設定ツール339の構成>
設定ツール339は、シミュレーションされる制御処理に関連する情報について、DB装置400と通信する処理(すなわち、PLC100がDB通信プログラム192を実行して実施する通信処理)を実施可能にするための設定をサポートする。設定ツール339は、このようなサポートのためにUIツール341を提供する。UIツール341を介して受付けたユーザ操作に基づく項目が設定ファイル345に設定されることにより設定ファイル345において設定が管理される。設定ファイル345には、シミュレータ338によってシミュレーションされる制御処理に関連する情報を、DB接続システム351に、DB装置400と通信させるための項目が設定される。設定ファイル345には、例えば、制御処理に関連する情報である変数テーブル307の値の変数名(例えば記憶部301のアドレス)、通信処理に関する時間のパラメータなどを含むが、設定項目は、これらに限定されない。
(f3. Configuration of setting tool 339>
The setting tool 339 configures settings to enable communication processing with the DB device 400 (that is, communication processing performed by the PLC 100 by executing the DB communication program 192) regarding information related to the control processing to be simulated. to support. Configuration tool 339 provides UI tool 341 for such support. Settings are managed in the setting file 345 by setting items in the setting file 345 based on user operations received via the UI tool 341 . In the configuration file 345, items are set for causing the DB connection system 351 to communicate information related to the control processing simulated by the simulator 338 with the DB device 400. The setting file 345 includes, for example, variable names of values in the variable table 307 (for example, addresses of the storage unit 301), which are information related to control processing, time parameters related to communication processing, etc., but the setting items are Not limited.

(f4.DB接続システム351の構成>
DB接続システム351は、通信部352と、実行部353とを含んでいる。通信部352は、DB接続システム351がシミュレータ338と制御に関連する情報を遣り取りする機能と、DB接続システム351がDB装置400とネットワーク112を介して通信する機能とを担う。
(f4. Configuration of DB connection system 351>
The DB connection system 351 includes a communication section 352 and an execution section 353. The communication unit 352 has a function in which the DB connection system 351 exchanges control-related information with the simulator 338, and a function in which the DB connection system 351 communicates with the DB device 400 via the network 112.

実行部353は、DB接続システムモジュール350に対応する所定のプログラム354に従って動作する。プログラム354は、DB通信プログラム192の少なくとも1つの命令コードを含んで構成されて、実行されると、シミュレーションされる制御処理に関連する情報をDB装置400との間で通信する処理を実施可能なように構成される。プログラム354は、設定ファイル345の設定に従って、シミュレータ338の記憶部301の変数テーブル307の該当する変数への値の書き込み、または読み出しを行うコードと、読み出された値についてDBアクセス処理を実施するためのDB操作命令(SQL文)を生成するコードと、DB操作命令をDB装置400に発行(送信)するためのコードと、DB装置400から受信するDB操作命令の実行結果の応答を変数テーブル307に書き込むコード等の複数の命令コードを含む。DB操作命令は、DBの接続要求や変数テーブルから読出された値等をDBに書き込むアクセス要求の命令を含む。DB装置400は、このようなDB操作命令に従ってDBを処理(操作)し、処理結果の応答を要求元のサポート装置300に送信する。 The execution unit 353 operates according to a predetermined program 354 corresponding to the DB connection system module 350. The program 354 is configured to include at least one instruction code of the DB communication program 192, and when executed, can carry out a process of communicating information related to the control process to be simulated with the DB device 400. It is configured as follows. The program 354 implements a code for writing or reading a value to a corresponding variable in the variable table 307 of the storage unit 301 of the simulator 338, and DB access processing for the read value, according to the settings of the configuration file 345. The code for generating the DB operation command (SQL statement) for the DB operation, the code for issuing (sending) the DB operation command to the DB device 400, and the response of the execution result of the DB operation command received from the DB device 400 are stored in a variable table. It includes multiple instruction codes such as codes to be written to 307. The DB operation command includes a DB connection request and an access request command to write a value read from a variable table into the DB. The DB device 400 processes (operates) the DB according to such a DB operation command, and transmits a response of the processing result to the requesting support device 300.

DB接続システム351は、設定ファイル345から、DBアクセス処理の対象となる変数名を検索し、検索された変数名に基づき変数テーブル307からデータ(値)を検索する。検索されたデータは、DB操作命令とともにDB装置400に送信され、DB装置400は、DB操作命令に従って、データを処理し、処理結果を応答する。このように、DB接続システム351は設定ファイル345に従って動作することにより、シミュレーションされる制御処理において取得される制御処理に関連する情報について、DBアクセス処理およびDB装置400との通信処理を実施することができる。 The DB connection system 351 searches the configuration file 345 for a variable name to be subjected to DB access processing, and searches for data (value) from the variable table 307 based on the searched variable name. The retrieved data is sent to the DB device 400 along with the DB operation instruction, and the DB device 400 processes the data according to the DB operation instruction and responds with the processing results. In this way, the DB connection system 351 operates according to the configuration file 345 to perform DB access processing and communication processing with the DB device 400 regarding information related to control processing acquired in the simulated control processing. I can do it.

<G.ユーザプログラム186の例>
上記のDBアクセス処理は、プログラミングツール337によって、ユーザプログラム186中にコードとして記述される。図9は、本実施の形態に係るDBアクセス処理に関するユーザプログラム186のコード例を簡略的に示す図である。
<G. Example of user program 186>
The above DB access processing is written as code in the user program 186 by the programming tool 337. FIG. 9 is a diagram schematically showing a code example of the user program 186 regarding DB access processing according to the present embodiment.

図9では、ユーザプログラム186のセクション90~93には、制御処理に関連する情報をDBに書込む命令(INSERT、インサート)と、その周辺のDB操作命令が示される。これら命令は、セクション90,91,92,93の順に実行される。 In FIG. 9, sections 90 to 93 of the user program 186 show an instruction (INSERT) for writing information related to control processing into the DB and peripheral DB operation instructions. These instructions are executed in the order of sections 90, 91, 92, and 93.

より具体的には、実行開始条件として、実行開始フラグ“DBconnectionTrigger”が定義されており、このフラグがオンになると、DB接続処理が実行される。このDB接続処理として、DB接続命令ブロック910と、DB接続用マップ選択ブロック911と、INSERT用/SELECT用DBマップ生成ブロック914とが記述されている。DB接続用マップ選択ブロック911は、DBに書き込むべき値(変数名“lightVar”)9Aが入力として設定されている。ブロック912は、値をDBに書き込み可能なデータ型に変換する命令を示す。ブロック912によって、値9Aの“lightVar”は、変換後のデータ型を有した値9Bの“lightVar.LightValue”に変換される。 More specifically, an execution start flag "DBconnectionTrigger" is defined as an execution start condition, and when this flag is turned on, the DB connection process is executed. As this DB connection processing, a DB connection command block 910, a DB connection map selection block 911, and an INSERT/SELECT DB map generation block 914 are described. In the DB connection map selection block 911, a value (variable name "lightVar") 9A to be written to the DB is set as an input. Block 912 shows instructions to convert the value to a data type that can be written to the DB. Block 912 converts "lightVar" with value 9A to "lightVar.LightValue" with value 9B having the converted data type.

セクション93では、変換後の値をDBに書込み開始するフラグ9Cがオンになると、ブロック913が実行される。ブロック913は、通信処理の処理時間を変数9Fに出力(設定)する。より具体的には、フラグ9Cがオンになると、ブロック913は、入力9Dが示す現在時間、すなわち通信処理の開始時間から、書き込み命令を実行したDB装置400からの応答を受信するまでの時間、すなわちブロック914のフラグ9Eがオンに変化した時間までを計測し、計測時間を変数9Fに設定する。また、ブロック914は、入力変数“TimeOut”に基づき、処理時間のタイムアウトを検出するように構成されている。また、ブロック914は、DB装置400からの応答を変数“SendStatus”で取得する。 In section 93, block 913 is executed when flag 9C to start writing the converted value to DB is turned on. Block 913 outputs (sets) the processing time of communication processing to variable 9F. More specifically, when the flag 9C is turned on, the block 913 calculates the time from the current time indicated by the input 9D, that is, the start time of the communication process until receiving the response from the DB device 400 that executed the write command. That is, the time up to when the flag 9E in block 914 turns on is measured, and the measured time is set in the variable 9F. Block 914 is also configured to detect a timeout of processing time based on the input variable "TimeOut." Further, block 914 obtains a response from the DB device 400 using the variable “SendStatus”.

シミュレータ338のシミュレーションによって、変数“lightVar”の値が変数テーブル307に格納されて、ユーザプログラム186中の図9に示されたコードを実行する。このときと、シミュレータ338と並行して起動している、DB接続システム351は、設定ファイル345に設定された変数“lightVar”に基づき、変数テーブル307から変数“lightVar”の値を検索し、検索された値を、DB操作命令とともにDB装置400に送信する。このような、DB操作命令は、DB接続、マップ選択、変数“lightVar”の値をDBにインサート(書込)するなどの命令を含む。DB装置400は、当該DB操作命令に基づく処理を実施する。DB接続システム351は、DB装置400から受信する処理結果の応答を、変数テーブル307の対応する変数に設定する。シミュレータ338では、変数テーブル307の設定された応答に基づき、制御処理が継続して実施される。 Through the simulation of the simulator 338, the value of the variable "lightVar" is stored in the variable table 307, and the code shown in FIG. 9 in the user program 186 is executed. At this time, the DB connection system 351, which is running in parallel with the simulator 338, searches for the value of the variable "lightVar" from the variable table 307 based on the variable "lightVar" set in the configuration file 345. The calculated value is sent to the DB device 400 together with the DB operation command. Such DB operation commands include commands such as DB connection, map selection, and inserting (writing) the value of the variable "lightVar" into the DB. The DB device 400 executes processing based on the DB operation command. The DB connection system 351 sets the response of the processing result received from the DB device 400 in the corresponding variable of the variable table 307. In the simulator 338, control processing is continuously performed based on the responses set in the variable table 307.

シミュレータ338では、タイマを利用することで、上記に述べた制御処理と通信処理を、PLC100のマルチタスクを模擬するように周期的に実施される。 The simulator 338 uses a timer to periodically perform the control processing and communication processing described above so as to simulate the multitasking of the PLC 100.

図9では、DB操作命令は、ライブラリにおいて部品化されたファンクションブロックを用いて、すなわちファンクションブロック内で定義された命令で記述されているが、記述はファンクションブロックを用いた方法に限定されず、ラダーロジックまたはラダー言語を用いた方法であってもよい。 In FIG. 9, the DB operation instructions are described using function blocks made into components in the library, that is, instructions defined within the function blocks, but the description is not limited to the method using function blocks. A method using ladder logic or a ladder language may also be used.

<H.設定ファイル345>
DB接続システム351は、シミュレータ338およびDB装置400との制御処理に関連する情報についてデータの遣り取りを実施する場合、設定ファイル345を参照する。図10は、本実施の形態に係る設定ファイル345の一例を示す図である。図11は、本実施の形態に係る設定ツール339を説明する図である。
<H. Settings file 345>
The DB connection system 351 refers to the configuration file 345 when exchanging data regarding information related to control processing with the simulator 338 and the DB device 400. FIG. 10 is a diagram showing an example of the settings file 345 according to this embodiment. FIG. 11 is a diagram illustrating the setting tool 339 according to this embodiment.

図10を参照して設定ファイル345は、DB操作命令に従って、DB装置400によって操作される対象を含む。例えば、操作される対象として、ユーザプログラム186で処理(読み出し、または、書き込み)されるデータの識別子71を含む。このようなDB操作の対象には、アクセスの対象となるDBのマップの指定が含まれてもよい。 Referring to FIG. 10, configuration file 345 includes targets to be operated by DB device 400 according to the DB operation command. For example, the object to be operated includes an identifier 71 of data processed (read or written) by the user program 186. The target of such DB operation may include designation of a DB map to be accessed.

また、設定ファイル345は、DB装置400との通信処理に関するパラメータを含む。例えば、通信処理に関するパラメータは、DB接続システム351がDB装置400と、通信セッションまたは通信コネクションなどの通信を確立するためのパラメータを含む。より具体的には、シミュレータ338が起動しているホスト(DB操作命令の送信元のサポート装置300)を指定するパラメータ70と送信先のDB装置400を指定するパラメータ73とを含む。 Further, the configuration file 345 includes parameters related to communication processing with the DB device 400. For example, the parameters related to communication processing include parameters for the DB connection system 351 to establish communication with the DB device 400, such as a communication session or a communication connection. More specifically, it includes a parameter 70 that specifies the host on which the simulator 338 is running (the support device 300 that is the source of the DB operation command) and a parameter 73 that specifies the DB device 400 that is the destination.

また、通信処理に関するパラメータは処理時間(“Interval_ms:10”)を含む。設定ファイル345は、DB装置400からの応答が設定される変数名の指定74と、処理時間の設定される変数72を含む。また、設定ファイル345には、DB装置400に対して発行されるDB操作命令の種類が含まれてもよい。DB接続システム351は、設定ファイル345に設定されたDB操作命令の種類に対応のコードを生成し、DB装置400に発行する。 Further, the parameters related to communication processing include processing time (“Interval_ms: 10”). The configuration file 345 includes a variable name designation 74 in which a response from the DB device 400 is set, and a variable 72 in which a processing time is set. Further, the configuration file 345 may include the type of DB operation command issued to the DB device 400. The DB connection system 351 generates a code corresponding to the type of DB operation command set in the configuration file 345 and issues it to the DB device 400.

(h1.設定ツール339)
図10の設定ファイル345は、設定ツール339が提供するUIツール341を操作することによって、ユーザが項目を設定できる。図11を参照して、UIツール341は、モニタ314にユーザ操作を受け付ける画面を表示する。図11の画面は、例えば通信処理の処理時間を設定するユーザ操作を受け付ける、ユーザがスライド操作可能なスライダー741と、スライダー741の操作量に応じた時間を示すデータ75を含む。データ75は、例えば10秒を示す。データ75の値は、設定ファイル345の処理時間に設定される。
(h1. Setting tool 339)
The settings file 345 in FIG. 10 allows the user to set items by operating the UI tool 341 provided by the settings tool 339. Referring to FIG. 11, UI tool 341 displays a screen on monitor 314 that accepts user operations. The screen in FIG. 11 includes a slider 741 that can be slid by the user and accepts a user operation to set, for example, a processing time for communication processing, and data 75 indicating a time corresponding to the amount of operation of the slider 741. Data 75 indicates, for example, 10 seconds. The value of the data 75 is set to the processing time of the configuration file 345.

DB接続システム351は、DB装置400から応答を受信した場合に、応答を内部バッファに保持し、応答受信の時刻から設定ファイル345の処理時間(10秒)が経過したとき、保持していた応答を、シミュレータ338の変数テーブル307に設定する。このように、処理時間を設定可能であるから、実機の環境において要求される処理時間に変更することも可能となり、LC100が接続されるネットワーク112の性能(通信速度)を模擬することができる。また、ユーザ操作によらず、処理時間が設定されてもよい。より具体的には、設定ツール339は、実機のPLC100が接続するネットワーク112の通信速度を検出し、検出した通信速度に基づき、処理時間を設定してもよい。 When the DB connection system 351 receives a response from the DB device 400, it retains the response in an internal buffer, and when the processing time (10 seconds) of the configuration file 345 has elapsed from the time of response reception, the retained response is saved. is set in the variable table 307 of the simulator 338. Since the processing time can be set in this way, it is also possible to change the processing time to the one required in the environment of the actual machine, and it is possible to simulate the performance (communication speed) of the network 112 to which the LC 100 is connected. Further, the processing time may be set regardless of user operation. More specifically, the setting tool 339 may detect the communication speed of the network 112 to which the actual PLC 100 is connected, and set the processing time based on the detected communication speed.

また、処理時間は、PLC100において実施される周期制御の時間に基づいて設定されてもよい。より具体的には、通信処理を含むDB接続サービス47は、図5に示されたように、関連処理46として、制御周期Tのプロセッサ120の空き時間で実行される。すなわち、制御処理45の処理負荷が高く制御周期Tにおいてプロセッサ120の空き時間が十分でない場合、関連処理46のタスクは、次の実行周期まで実行されない。この場合、図5に示すように、通信処理を含むDB接続サービス47の実施間隔は周期4Tとなる。このようなケースについてシミュレーションできるように、設定ツール339によって、処理時間を関連処理46のタスクの実行周期に基づき設定されるようにしてもよい。なお、処理時間は、通信速度と実行周期との組み合わせに基づき設定されてもよい。 Further, the processing time may be set based on the periodic control time performed in the PLC 100. More specifically, the DB connection service 47 including communication processing is executed as the related processing 46 during the free time of the processor 120 in the control period T, as shown in FIG. That is, if the processing load of the control process 45 is high and the idle time of the processor 120 is insufficient in the control cycle T, the tasks of the related process 46 will not be executed until the next execution cycle. In this case, as shown in FIG. 5, the execution interval of the DB connection service 47 including communication processing is a cycle of 4T. In order to simulate such a case, the processing time may be set by the setting tool 339 based on the execution cycle of the task of the related processing 46. Note that the processing time may be set based on a combination of communication speed and execution cycle.

<I.クラウド環境>
シミュレーションシステム1はサポート装置300に限定されず、クラウドベースの環境に実装されてもよい。図12は、本実施の形態に係るシミュレーションシステム1がクラウド環境に実装される構成を示す図である。図12では、シミュレーションシステム1がWebサーバ600に実装される。ユーザは、サポート装置300が有するWebブラウザを利用して、Webサーバ600のシミュレーションシステム1と、プログラミングツール337、シミュレータ338および設定ツール339を操作するためのデータを遣り取りすることができる。なお、プログラミングツール337は、サポート装置300に実装されて、シミュレータ338、DB接続システム351および設定ツール339はWebサーバ600に実装される構成であってもよい。
<I. Cloud environment>
The simulation system 1 is not limited to the support device 300, and may be implemented in a cloud-based environment. FIG. 12 is a diagram showing a configuration in which the simulation system 1 according to the present embodiment is implemented in a cloud environment. In FIG. 12, the simulation system 1 is installed on a web server 600. The user can exchange data for operating the programming tool 337, simulator 338, and setting tool 339 with the simulation system 1 of the web server 600 using the web browser included in the support device 300. Note that the programming tool 337 may be installed in the support device 300, and the simulator 338, DB connection system 351, and setting tool 339 may be installed in the Web server 600.

<J.フローチャート>
次に、シミュレータ338とDB接続システム351の処理手順について説明する。図13は、本実施の形態に係るシミュレーションのフローチャートである。図13に示す各ステップは、CPU302がシミュレータ338によってユーザプログラム186を実行し、また、CPU302がDB接続システム351を実現する接続システムモジュール350を実行することで実現される。
<J. Flowchart>
Next, the processing procedure of the simulator 338 and the DB connection system 351 will be explained. FIG. 13 is a flowchart of simulation according to this embodiment. Each step shown in FIG. 13 is realized by the CPU 302 executing the user program 186 by the simulator 338, and by the CPU 302 executing the connection system module 350 that realizes the DB connection system 351.

図13を参照して、CPU302は、シミュレータ338とDB接続システム351を起動する(ステップS10)。これにより、CPU302は、シミュレータ338として、ユーザプログラム186に含まれる命令を実行し、命令に従う処理(制御処理など)をシミュレーションする。シミュレーションされる制御処理において導出される制御処理に関連する情報(制御指令、状態値など)は、変数テーブル307に設定される。 Referring to FIG. 13, CPU 302 starts simulator 338 and DB connection system 351 (step S10). Thereby, the CPU 302, as the simulator 338, executes the instructions included in the user program 186 and simulates the processing (control processing, etc.) according to the instructions. Information related to control processing (control commands, state values, etc.) derived in the simulated control processing is set in the variable table 307.

ユーザプログラム186の実行におけるDBアクセス処理の命令(図9のファンクションブロック命令)が実行されるタイミングであることが検出される(ステップS12)。より具体的には、CPU302は、DB接続システム351として、設定ファイル345から処理の対象となる変数名(アドレス)を取得し、取得された変数名に基づき変数テーブル307を検索し、検索結果に基づき、当該変数名に値が設定されたことを検出する。このような変数テーブル307の検索によって、DBアクセス処理が実行されるタイミングであることが検出される(ステップS12)。 It is detected that the timing for executing the DB access processing command (function block command in FIG. 9) in the execution of the user program 186 is reached (step S12). More specifically, the CPU 302, as the DB connection system 351, acquires the variable name (address) to be processed from the configuration file 345, searches the variable table 307 based on the acquired variable name, and applies the search results to the variable table 307. Based on this, it is detected that a value has been set for the variable name. By searching the variable table 307 in this way, it is detected that it is time to execute the DB access process (step S12).

CPU302は、実機のPLC100が行う通信処理に相当の処理を実施する。具体的には、CPU302は、DB接続システム351として、設定ファイル345の設定に従って、変数テーブル307から値(すなわち、制御処理に関連する情報)を検索(取得)し、取得された値についてDB装置400と通信処理を実施する、すなわちDBアクセス処理を実施するためにDB操作命令を生成しDB装置400に発行し、DB装置400からの応答をシミュレータ338に出力する、すなわち変数テーブル307に書き込む処理を実施する(ステップS14)。DB装置400から受信された応答は、設定ファイル345において設定された処理時間のパラメータに従った時間の経過後に、変数テーブル307の対応の変数に設定(書き込み)される。 The CPU 302 performs processing equivalent to the communication processing performed by the actual PLC 100. Specifically, the CPU 302, as the DB connection system 351, searches for (obtains) a value (that is, information related to control processing) from the variable table 307 according to the settings of the configuration file 345, and uses the DB device for the obtained value. 400, i.e., generates and issues a DB operation command to the DB device 400 in order to perform DB access processing, and outputs the response from the DB device 400 to the simulator 338, i.e., writes it into the variable table 307. (Step S14). The response received from the DB device 400 is set (written) in the corresponding variable of the variable table 307 after a period of time according to the processing time parameter set in the configuration file 345 has elapsed.

<K.変形例>
本実施の形態では、PLC100が制御処理の関連処理のうち、ネットワーク112を介して通信処理を実施する情報処理装置はDB装置400であったが、このような情報処理装置はDB装置400に限定されない。例えば、PLC100が、ファイル転送プログラム193を実行することにより、ファイル転送サービス185において、データサーバ500の一例であるFTP(File Transfer Protocol)サーバと稼働ログ184をCSVファイル形式で通信する場合がある。このような場合、サポート装置300は、ファイル転送モジュール360を起動することにより、FTPサーバを接続して、ログファイル346を、FTPサーバと通信するシステムを利用できる。このようなFTP接続システムは、FTPサーバ内のファイルのリストを取得(FTPGetFileList)、ファイルのアップロード(FTPPutFile)、ファイルの削除(FTPRemoveFile)などの操作命令をFTPサーバに発行し、その応答を受信するように構成される。
<K. Modified example>
In this embodiment, the information processing device for which the PLC 100 performs the communication processing via the network 112 among the related processing of the control processing is the DB device 400, but such an information processing device is limited to the DB device 400. Not done. For example, the PLC 100 may communicate the operation log 184 in the CSV file format with an FTP (File Transfer Protocol) server, which is an example of the data server 500, in the file transfer service 185 by executing the file transfer program 193. In such a case, the support device 300 can utilize a system for connecting the FTP server and communicating the log file 346 with the FTP server by activating the file transfer module 360. Such an FTP connection system issues operation commands to the FTP server, such as obtaining a list of files in the FTP server (FTPGetFileList), uploading a file (FTPPutFile), and deleting a file (FTPRemoveFile), and receives the responses. It is configured as follows.

また、例えば、PLC100が、制御処理において、制御周期に関する時刻情報を取得するために、ネットワーク112上のNTP(Network Time Protocol)サーバと情報を通信する場合がある。このような場合、サポート装置300は、NTPサーバを接続するシステムを利用する。このような接続システムは、NTPサーバにステータスを取得(GetNTPStatus)するための操作命令を発行し、その応答を受信するように構成される。 Further, for example, in the control process, the PLC 100 may communicate information with an NTP (Network Time Protocol) server on the network 112 in order to obtain time information regarding the control cycle. In such a case, the support device 300 uses a system that connects an NTP server. Such a connection system is configured to issue an operation command to get the status (GetNTPStatus) to the NTP server and receive the response.

図13では、プロセッサ120がプログラムを実行することで、開発環境が実現される例を示したが、開発環境を実現するために必要な処理および機能の一部を、ASIC(Application Specific Integrated Circuit)またはFPGA(Field-Programmable Gate Array)などの回路を用いて実装するようにしてもよい。 Although FIG. 13 shows an example in which a development environment is realized by the processor 120 executing a program, some of the processing and functions necessary to realize the development environment are implemented using an ASIC (Application Specific Integrated Circuit). Alternatively, it may be implemented using a circuit such as an FPGA (Field-Programmable Gate Array).

また、本実施の形態では、サポート装置300のシミュレーション環境は、シミュレータ338と設定ツール339とDB接続システム351とから構成されてもよく、その場合、プログラミングツール337は必須の構成とはならない。 Further, in this embodiment, the simulation environment of the support device 300 may be configured from the simulator 338, the setting tool 339, and the DB connection system 351, and in that case, the programming tool 337 is not an essential component.

<L.プログラム>
本実施の形態において提供されるシミュレータ338、設定ツール339およびDB接続システム351などの開発環境を実現するためのプログラム・モジュールおよびデータは、通信IF318およびネットワーク112を介してHDD308にダウンロードされてもよい。または、記録媒体(例えば、メモリカード333または光学ディスク332)を介してHDD308にダウンロードされるとしてもよい。このような記録媒体は、コンピュータその他装置、機械等が記録されたプログラム等の情報を読み取り可能なように、当該プログラム・データ等の情報を、電気的、磁気的、光学的、機械的または化学的作用によって蓄積する媒体である。開発環境を実現するためのプログラムはプロセッサにより、またはプロセッサとASIC(Application Specific Integrated Circuit),FPGA(Field-Programmable Gate Array)などの回路との組合せにより実行され得る。
<L. Program>
Program modules and data for realizing a development environment such as the simulator 338, setting tool 339, and DB connection system 351 provided in this embodiment may be downloaded to the HDD 308 via the communication IF 318 and the network 112. . Alternatively, the information may be downloaded to the HDD 308 via a recording medium (for example, the memory card 333 or the optical disc 332). Such recording media are used to store information such as programs and data electrically, magnetically, optically, mechanically, or chemically so that computers, other devices, machines, etc. can read the recorded programs and other information. It is a medium that accumulates due to physical action. A program for realizing a development environment can be executed by a processor or by a combination of a processor and a circuit such as an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array).

(利点)
本実施の形態では、シミュレータ338に、シミュレーションされる制御処理に関連する情報をDB装置400と通信する処理を含むDBアクセス処理を実施可能な環境を提供できる。すなわち、ユーザプログラム186にDBアクセス処理の命令が含まれるとしても、シミュレーションシステム1にDB接続システム351を備えるように構成し、DB接続システム351を設定ファイル345の設定に従って動作させることで、当該環境を提供できる。また、ユーザプログラム186に特別コードを挿入することなく(プログラムを改造することなく)、このような環境を提供できるので、ユーザプログラム186の開発に係るコスト(時間、費用)を節約できる。
(advantage)
In this embodiment, it is possible to provide the simulator 338 with an environment in which DB access processing, including processing for communicating information related to the control processing to be simulated, with the DB device 400 can be performed. That is, even if the user program 186 includes instructions for DB access processing, by configuring the simulation system 1 to include the DB connection system 351 and operating the DB connection system 351 according to the settings in the configuration file 345, the environment can be adjusted. can be provided. Further, since such an environment can be provided without inserting special code into the user program 186 (without modifying the program), costs (time and money) related to the development of the user program 186 can be saved.

また、通信処理を含むDBアクセス処理の条件が変更された場合でも、例えばユーザプログラム186が変更された場合でも、設定ファイル345の設定を、変更後の条件に整合するように設定しなおすことで、同様のシミュレーション環境を利用(または再利用)できる。 Furthermore, even if the conditions for DB access processing including communication processing are changed, for example, even if the user program 186 is changed, the settings in the configuration file 345 can be reset to match the changed conditions. , similar simulation environments can be used (or reused).

<M.付記>
上述したような本実施の形態は、以下のような技術思想を含む。
[構成1]
コントローラ(100)の処理をシミュレーションするシミュレーションシステム(1)であって、
前記コントローラは、
制御対象(90)が属する第1ネットワーク(110)を接続する第1コネクタ(158)と、
情報処理装置(400、500、600)が属する第2ネットワーク(112)を接続する第2コネクタ(168)と、
制御処理を実施するためのユーザプログラム(186)と、前記制御処理に関連する情報を前記情報処理装置と通信する通信処理を実施するための通信プログラム(192)を実行する実行部と、を有し、
前記シミュレーションシステムは、
前記制御処理をシミュレーションするシミュレータ(338)と、
シミュレーションされる制御処理に関連する情報を、予め定められた設定(345)に従って、情報処理装置と通信する通信処理を実施する通信部(351)と、を備える、シミュレーションシステム。
[構成2]
前記情報処理装置は、DB(データベース)を管理するDB装置(400)を含む、構成1に記載のシミュレーションシステム。
[構成3]
前記通信処理は、前記DBを操作するためのDB操作命令を、前記DB装置に発行する処理を含む、構成2に記載のシミュレーションシステム。
[構成4]
前記予め定められた設定の項目は、
前記DB操作命令に従って、前記DB装置が操作する対象の指定を含む、構成3に記載のシミュレーションシステム。
[構成5]
前記DB装置が操作する対象の指定は、前記DBにおいてアクセス処理されるデータの識別子を含み、
前記制御処理に関連する情報は、前記アクセス処理されるデータを含む、構成4に記載のシミュレーションシステム。
[構成6]
前記予め定められた設定の項目は、
前記通信処理に関するパラメータを含む、構成1~5のいずれか1に記載のシミュレーションシステム。
[構成7]
前記通信処理に関するパラメータは、前記情報処理装置との通信を確立するためのパラメータを含む、構成6に記載のシミュレーションシステム。
[構成8]
前記通信処理に関するパラメータは、通信処理時間のパラメータを含む、構成6または7に記載のシミュレーションシステム。
[構成9]
前記通信処理時間は、前記第2ネットワークの通信速度に基づいている、構成8に記載のシミュレーションシステム。
[構成10]
前記コントローラは、前記制御処理を実施するための制御タスク(45)および、当該制御処理に関連する処理を実施するための関連処理タスク(47)を含む複数のタスクを実行するマルチタスク実行部(199)を備え、前記情報処理装置との通信は前記関連処理タスクにおいて実行され、
前記マルチタスク実行部は、前記制御タスクを第1の周期(T)で実行し、
前記マルチタスク実行部は、前記関連処理タスクを第2の周期(2T、4T)で実行し、
前記通信処理時間は、前記第2の周期に基づいている、構成8または9に記載のシミュレーションシステム。
[構成11]
コントローラ(100)の処理をシミュレーションする方法であって、
前記コントローラは、
制御対象(95)が属する第1ネットワーク(110)を接続する第1コネクタ(158)と、
情報処理装置(400、500、600)が属する第2ネットワーク(112)を接続する第2コネクタ(168)と、
制御処理を実施するためのユーザプログラム(186)と、前記制御処理に関連する情報を前記情報処理装置と通信する通信処理を実施するための通信プログラム(192)を実行する実行部と、を有し、
前記方法は、
前記制御処理をシミュレーションするステップと、
シミュレーションされる制御処理に関連する情報を、予め定められた設定(345)に従って、前記情報処理装置と通信する通信処理を実施するステップと、を備える、方法。
[構成12]
コントローラ(100)の処理をシミュレーションする方法をコンピュータ(302)に実行させるためのシミュレーションプログラムであって、
前記コントローラは、
制御対象(95)が属する第1ネットワーク(110)を接続する第1コネクタ(158)と、
情報処理装置(400、500、600)が属する第2ネットワーク(112)を接続する第2コネクタ(168)と、
制御処理を実施するためのユーザプログラム(186)と、前記制御処理に関連する情報を前記情報処理装置と通信する通信処理を実施するための通信プログラム(192)を実行する実行部と、を有し、
前記方法は、
前記制御処理をシミュレーションするステップと、
シミュレーションされる前記制御処理に関連する情報を、予め定められた設定(345)に従って、前記情報処理装置と通信する通信処理を実施するステップと、を備える、シミュレーションプログラム。
<M. Additional notes>
This embodiment as described above includes the following technical idea.
[Configuration 1]
A simulation system (1) that simulates processing of a controller (100),
The controller includes:
a first connector (158) connecting a first network (110) to which the controlled object (90) belongs;
a second connector (168) that connects a second network (112) to which the information processing device (400, 500, 600) belongs;
It has an execution unit that executes a user program (186) for implementing control processing and a communication program (192) for implementing communication processing for communicating information related to the control processing with the information processing device. death,
The simulation system includes:
a simulator (338) that simulates the control process;
A simulation system comprising: a communication unit (351) that performs communication processing to communicate information related to a control process to be simulated with an information processing device according to predetermined settings (345).
[Configuration 2]
The simulation system according to configuration 1, wherein the information processing device includes a DB device (400) that manages a DB (database).
[Configuration 3]
The simulation system according to configuration 2, wherein the communication process includes a process of issuing a DB operation command for operating the DB to the DB device.
[Configuration 4]
The predetermined setting items are:
The simulation system according to configuration 3, including designation of a target to be operated by the DB device according to the DB operation instruction.
[Configuration 5]
The designation of the target to be operated by the DB device includes an identifier of data to be accessed in the DB,
The simulation system according to configuration 4, wherein the information related to the control processing includes the data to be accessed.
[Configuration 6]
The predetermined setting items are:
The simulation system according to any one of configurations 1 to 5, including parameters related to the communication processing.
[Configuration 7]
The simulation system according to configuration 6, wherein the parameters related to the communication processing include parameters for establishing communication with the information processing device.
[Configuration 8]
8. The simulation system according to configuration 6 or 7, wherein the communication processing-related parameters include a communication processing time parameter.
[Configuration 9]
9. The simulation system according to configuration 8, wherein the communication processing time is based on a communication speed of the second network.
[Configuration 10]
The controller includes a multi-task execution unit (45) that executes a plurality of tasks including a control task (45) for carrying out the control process and a related processing task (47) for carrying out processes related to the control process. 199), wherein communication with the information processing device is executed in the related processing task,
The multitask execution unit executes the control task in a first cycle (T),
The multitask execution unit executes the related processing task in a second cycle (2T, 4T),
The simulation system according to configuration 8 or 9, wherein the communication processing time is based on the second cycle.
[Configuration 11]
A method of simulating processing of a controller (100), the method comprising:
The controller includes:
a first connector (158) connecting a first network (110) to which the controlled object (95) belongs;
a second connector (168) that connects a second network (112) to which the information processing device (400, 500, 600) belongs;
It has an execution unit that executes a user program (186) for implementing control processing and a communication program (192) for implementing communication processing for communicating information related to the control processing with the information processing device. death,
The method includes:
simulating the control process;
A method comprising: implementing a communication process for communicating information related to a control process to be simulated with the information processing device according to predetermined settings (345).
[Configuration 12]
A simulation program for causing a computer (302) to execute a method of simulating processing of a controller (100),
The controller includes:
a first connector (158) connecting a first network (110) to which the controlled object (95) belongs;
a second connector (168) that connects a second network (112) to which the information processing device (400, 500, 600) belongs;
It has an execution unit that executes a user program (186) for implementing control processing and a communication program (192) for implementing communication processing for communicating information related to the control processing with the information processing device. death,
The method includes:
simulating the control process;
A simulation program comprising: implementing a communication process for communicating information related to the control process to be simulated with the information processing apparatus according to predetermined settings (345).

今回開示された実施の形態は全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内での全ての変更が含まれることが意図される。 The embodiments disclosed this time should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is indicated by the claims rather than the above description, and it is intended that all changes within the scope and meanings equivalent to the claims are included.

1 シミュレーションシステム、10 制御システム、11 検出スイッチ、20 リレー、30 サーボモータドライバ、32 モータ、43 プログラム管理部
44,54,352 通信部、45 制御処理、46 関連処理、47 DB接続サービス、51 プログラム制御部、52 停止条件保持部、53 プログラム実行部、90,91,92,93 セクション、95 フィールド機器、110 フィールドバス、112 ネットワーク、114 接続ケーブル、120 プロセッサ、122 チップセット、124 システムクロック、126 主メモリ、128 不揮発性メモリ、148 システムバスコネクタ、158 フィールドバスコネクタ、168 上位通信コネクタ、170 メモリカードインターフェイス、184 稼働ログ、185 ファイル転送サービス、186 ユーザプログラム、188 システムプログラム、192 通信プログラム、193 ファイル転送プログラム、198 スケジューラ、199 マルチタスク実行プログラム、300 サポート装置、307 変数テーブル、400 DB装置、335 サポートプログラム、336 開発プログラム、337 プログラミングツール、338 シミュレータ、339 設定ツール、345 設定ファイル、350 DB接続システムモジュール、351 DB接続システム、354 プログラム、360 ファイル転送モジュール、500 データサーバ、600 Webサーバ、741 スライダー、S10,S12,S14 ステップ、T 制御周期。
1 simulation system, 10 control system, 11 detection switch, 20 relay, 30 servo motor driver, 32 motor, 43 program management section 44, 54, 352 communication section, 45 control processing, 46 related processing, 47 DB connection service, 51 program Control unit, 52 Stop condition holding unit, 53 Program execution unit, 90, 91, 92, 93 Section, 95 Field device, 110 Field bus, 112 Network, 114 Connection cable, 120 Processor, 122 Chip set, 124 System clock, 126 Main memory, 128 Nonvolatile memory, 148 System bus connector, 158 Fieldbus connector, 168 Upper communication connector, 170 Memory card interface, 184 Operation log, 185 File transfer service, 186 User program, 188 System program, 192 Communication program, 193 File transfer program, 198 Scheduler, 199 Multitask execution program, 300 Support device, 307 Variable table, 400 DB device, 335 Support program, 336 Development program, 337 Programming tool, 338 Simulator, 339 Setting tool, 345 Setting file, 350 DB Connection system module, 351 DB connection system, 354 Program, 360 File transfer module, 500 Data server, 600 Web server, 741 Slider, S10, S12, S14 Step, T Control cycle.

Claims (12)

コントローラの処理をシミュレーションするシミュレーションシステムであって、
前記コントローラは、
制御対象が属する第1ネットワークを接続する第1コネクタと、
情報処理装置が属する第2ネットワークを接続する第2コネクタと、
制御処理を実施するためのユーザプログラムと、前記制御処理に関連する情報を前記情報処理装置と通信する通信処理を実施するための通信プログラムを実行する実行部と、を有し、
前記シミュレーションシステムは、
前記制御処理をシミュレーションするシミュレータと、
シミュレーションされる前記制御処理に関連する情報を、予め定められた設定に従って、前記情報処理装置と通信する通信処理を実施する通信部と、を備える、シミュレーションシステム。
A simulation system that simulates processing of a controller,
The controller includes:
a first connector connecting a first network to which the controlled object belongs;
a second connector connecting a second network to which the information processing device belongs;
an execution unit that executes a user program for implementing control processing; and a communication program for implementing communication processing for communicating information related to the control processing with the information processing device;
The simulation system includes:
a simulator that simulates the control processing;
A simulation system comprising: a communication unit that performs communication processing to communicate information related to the control processing to be simulated with the information processing device according to predetermined settings.
前記情報処理装置は、DB(データベース)を管理するDB装置を含む、請求項1に記載のシミュレーションシステム。 The simulation system according to claim 1, wherein the information processing device includes a DB device that manages a DB (database). 前記通信処理は、前記DBを操作するためのDB操作命令を、前記DB装置に発行する処理を含む、請求項2に記載のシミュレーションシステム。 3. The simulation system according to claim 2, wherein the communication process includes a process of issuing a DB operation command for operating the DB to the DB device. 前記予め定められた設定の項目は、
前記DB操作命令に従って、前記DB装置が操作する対象の指定を含む、請求項3に記載のシミュレーションシステム。
The predetermined setting items are:
The simulation system according to claim 3, further comprising designating a target to be operated by the DB device according to the DB operation instruction.
前記DB装置が操作する対象の指定は、前記DBにおいてアクセス処理されるデータの識別子を含み、
前記制御処理に関連する情報は、前記アクセス処理されるデータを含む、請求項4に記載のシミュレーションシステム。
The designation of the target to be operated by the DB device includes an identifier of data to be accessed in the DB,
The simulation system according to claim 4, wherein the information related to the control processing includes the data to be accessed.
前記予め定められた設定の項目は、
前記通信処理に関するパラメータを含む、請求項1~5のいずれか1項に記載のシミュレーションシステム。
The predetermined setting items are:
The simulation system according to any one of claims 1 to 5, comprising parameters related to the communication processing.
前記通信処理に関するパラメータは、前記情報処理装置との通信を確立するためのパラメータを含む、請求項6に記載のシミュレーションシステム。 The simulation system according to claim 6, wherein the parameters related to the communication processing include parameters for establishing communication with the information processing device. 前記通信処理に関するパラメータは、通信処理時間のパラメータを含む、請求項6または7に記載のシミュレーションシステム。 The simulation system according to claim 6 or 7, wherein the parameters related to communication processing include a parameter of communication processing time. 前記通信処理時間は、前記第2ネットワークの通信速度に基づいている、請求項8に記載のシミュレーションシステム。 The simulation system according to claim 8, wherein the communication processing time is based on a communication speed of the second network. 前記コントローラは、前記制御処理を実施するための制御タスクおよび、当該制御処理に関連する処理を実施するための関連処理タスクを含む複数のタスクを実行するマルチタスク実行部を備え、前記情報処理装置との通信は前記関連処理タスクにおいて実行され、
前記マルチタスク実行部は、前記制御タスクを第1の周期で実行し、
前記マルチタスク実行部は、前記関連処理タスクを第2の周期で実行し、
前記通信処理時間は、前記第2の周期に基づいている、請求項8または9に記載のシミュレーションシステム。
The controller includes a multitask execution unit that executes a plurality of tasks including a control task for implementing the control processing and a related processing task for implementing processing related to the control processing, communication with is performed in the related processing task,
The multitask execution unit executes the control task in a first cycle,
The multitask execution unit executes the related processing task in a second cycle,
The simulation system according to claim 8 or 9, wherein the communication processing time is based on the second period.
コントローラの処理をシミュレーションする方法であって、
前記コントローラは、
制御対象が属する第1ネットワークを接続する第1コネクタと、
情報処理装置が属する第2ネットワークを接続する第2コネクタと、
制御処理を実施するためのユーザプログラムと、前記制御処理に関連する情報を前記情報処理装置と通信する通信処理を実施するための通信プログラムを実行する実行部と、を有し、
前記方法は、
前記制御処理をシミュレーションするステップと、
シミュレーションされる前記制御処理に関連する情報を、予め定められた設定に従って、前記情報処理装置と通信する通信処理を実施するステップと、を備える、方法。
A method for simulating processing of a controller, the method comprising:
The controller includes:
a first connector connecting a first network to which the controlled object belongs;
a second connector connecting a second network to which the information processing device belongs;
an execution unit that executes a user program for implementing control processing; and a communication program for implementing communication processing for communicating information related to the control processing with the information processing device;
The method includes:
simulating the control process;
A method comprising: implementing a communication process to communicate information related to the control process to be simulated with the information processing apparatus according to predetermined settings.
コントローラの処理をシミュレーションする方法をコンピュータに実行させるためのシミュレーションプログラムであって、
前記コントローラは、
制御対象が属する第1ネットワークを接続する第1コネクタと、
情報処理装置が属する第2ネットワークを接続する第2コネクタと、
制御処理を実施するためのユーザプログラムと、前記制御処理に関連する情報を前記情報処理装置と通信する通信処理を実施するための通信プログラムを実行する実行部と、を有し、
前記方法は、
前記制御処理をシミュレーションするステップと、
シミュレーションされる前記制御処理に関連する情報を、予め定められた設定に従って、前記情報処理装置と通信する通信処理を実施するステップと、を備える、シミュレーションプログラム。
A simulation program for causing a computer to execute a method of simulating processing of a controller,
The controller includes:
a first connector connecting a first network to which the controlled object belongs;
a second connector connecting a second network to which the information processing device belongs;
an execution unit that executes a user program for implementing control processing; and a communication program for implementing communication processing for communicating information related to the control processing with the information processing device;
The method includes:
simulating the control process;
A simulation program comprising: implementing a communication process for communicating information related to the control process to be simulated with the information processing apparatus according to predetermined settings.
JP2022029389A 2022-02-28 2022-02-28 Simulation system, method and simulation program Pending JP2023125352A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022029389A JP2023125352A (en) 2022-02-28 2022-02-28 Simulation system, method and simulation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022029389A JP2023125352A (en) 2022-02-28 2022-02-28 Simulation system, method and simulation program

Publications (1)

Publication Number Publication Date
JP2023125352A true JP2023125352A (en) 2023-09-07

Family

ID=87887470

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022029389A Pending JP2023125352A (en) 2022-02-28 2022-02-28 Simulation system, method and simulation program

Country Status (1)

Country Link
JP (1) JP2023125352A (en)

Similar Documents

Publication Publication Date Title
JP6965798B2 (en) Control system and control method
JP6822153B2 (en) Improved test manager for industrial automation controllers
WO2015136959A1 (en) Control system, method, program and information processing device
CN107612962B (en) Distributed simulation evaluation test management system
CA2617913A1 (en) System and method for rapid prototyping and implementation of distributed scalable task control architecture
JP6881256B2 (en) Controls, control methods, and programs
JP6442131B2 (en) Control system and control device
JP6362821B2 (en) Control device, control method and instruction set
WO2019167512A1 (en) Display device, screen generation method, and screen generation program
JP6135247B2 (en) Information processing apparatus and information processing program
CN112199273B (en) Virtual machine pressure/performance testing method and system
JP7172864B2 (en) Support equipment and support programs
JP2023125352A (en) Simulation system, method and simulation program
JP5212508B2 (en) Debug device
JP2010033192A (en) Information processor, method of controlling the same, computer program, and storage medium
JP5492573B2 (en) Device / PLC simulator device, method, and program having trace function
JP4877257B2 (en) Programmable controller, programmable controller support apparatus, and programmable controller system
KR102282850B1 (en) System for Evaluating Communication Performance Between Soft PLC and IO Device Using Robot Process Automation
WO2023166820A1 (en) Information processing system
CN116126366B (en) Chip input/output interface configuration method, device, medium and electronic equipment
EP4270121A1 (en) Method and system for seamless transition of runtime system from controller device to digitalization platform
JP7234810B2 (en) Support equipment and support programs
CN109918727B (en) Dynamic management method for multiple simulation scenes
JP2024062823A (en) Engineering Tools Equipment
JP2023547855A (en) Systems and equipment for authoring and developing automation interfaces and processes without writing code