JP6175759B2 - Controller, control system, program, and information processing apparatus - Google Patents
Controller, control system, program, and information processing apparatus Download PDFInfo
- Publication number
- JP6175759B2 JP6175759B2 JP2012250656A JP2012250656A JP6175759B2 JP 6175759 B2 JP6175759 B2 JP 6175759B2 JP 2012250656 A JP2012250656 A JP 2012250656A JP 2012250656 A JP2012250656 A JP 2012250656A JP 6175759 B2 JP6175759 B2 JP 6175759B2
- Authority
- JP
- Japan
- Prior art keywords
- controller
- connection
- database system
- processing apparatus
- information processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 230000010365 information processing Effects 0.000 title claims description 53
- 238000012790 confirmation Methods 0.000 claims description 65
- 238000012545 processing Methods 0.000 claims description 34
- 238000004891 communication Methods 0.000 claims description 22
- 230000004044 response Effects 0.000 claims description 10
- 230000006870 function Effects 0.000 description 36
- 238000010586 diagram Methods 0.000 description 16
- 238000000034 method Methods 0.000 description 10
- 230000008569 process Effects 0.000 description 5
- 238000012360 testing method Methods 0.000 description 4
- 238000012937 correction Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
Images
Landscapes
- Programmable Controllers (AREA)
Description
本発明は、プログラマブルロジックコントローラ(PLC:Programmable Logic Controller)等のコントローラ、制御システム、プログラム、および情報処理装置に関し、特に、データベースシステムへデータを送信するコントローラ、制御システム、プログラム、および情報処理装置に関する。 The present invention relates to a controller such as a programmable logic controller (PLC), a control system, a program, and an information processing device, and more particularly to a controller, a control system, a program, and an information processing device that transmit data to a database system. .
PLC等のコントローラは、工場などの自動機械の制御などに用いられ、複数の入出力機能を有して、例えば、センサ等から出力される値を逐次、読みこんでデータを保持する。 A controller such as a PLC is used for controlling an automatic machine in a factory or the like, and has a plurality of input / output functions, for example, sequentially reads values output from sensors or the like and holds data.
また、近年、PLCは、データベースシステムと接続して、PLCで保持しているデータを、データベースシステムに蓄積する。これにより、データベースに接続する情報処理装置同士でのデータの共有を容易にしたり、各種データを収集して、データの集計や解析などを容易にしたりすることができる。例えば、特開2012−108642号公報(特許文献1)は、データベースをアクセスするSQL文を複数含むSQL処理群をデータベースに送信する機能を有するPLCを開示している。 In recent years, a PLC is connected to a database system and accumulates data held in the PLC in the database system. As a result, it is possible to easily share data between information processing apparatuses connected to the database, or to collect various data to facilitate data aggregation and analysis. For example, Japanese Patent Laying-Open No. 2012-108642 (Patent Document 1) discloses a PLC having a function of transmitting a SQL processing group including a plurality of SQL statements for accessing a database to the database.
PLC等で動作させるユーザプログラムは、PLCに接続されるPC(Personal Computer)等の情報処理装置を用いて作成されることがある。しかし、技術者がデータベースへのアクセスを伴うユーザプログラムを作成した場合に、PLCがデータベースシステムとアクセスするための設定が不適切であると、データベースに接続できない等の不都合が生じ、ユーザプログラムが期待したとおりに動作しないこととなる。 A user program operated by a PLC or the like may be created using an information processing apparatus such as a PC (Personal Computer) connected to the PLC. However, when the engineer creates a user program with access to the database, if the setting for the PLC to access the database system is inappropriate, problems such as inability to connect to the database occur, and the user program is expected. Will not work as expected.
そこで、本発明は、PLC等の制御プログラミングにおいて、データベースシステムへのアクセスを伴うプログラミングを容易にする技術を提供することを目的とする。 Therefore, an object of the present invention is to provide a technique for facilitating programming that accompanies access to a database system in control programming such as PLC.
一実施形態に従う制御システムは、コントローラと、コントローラと接続される情報処理装置とを含んで構成される。情報処理装置は、コントローラがデータベースシステムと接続が可能か否かの接続確認をコントローラに実行させる要求実行部を備え、コントローラは、コントローラとデータベースシステムとが接続可能か否かの接続確認の指示を情報処理装置から受け付ける受付部と、データベースシステムへのアクセスを制御するアクセス処理部とを備え、アクセス処理部は、情報処理装置から接続確認の指示を受け付けた場合に、コントローラがデータベースシステムと通信接続するための設定を示す接続設定情報に従ってデータベースシステムとの接続可否の確認を行い、さらに、アクセス処理部によるデータベースシステムとの接続可否の確認の結果を情報処理装置へ送信する応答部を備える。 A control system according to an embodiment includes a controller and an information processing apparatus connected to the controller. The information processing apparatus includes a request execution unit that causes the controller to perform connection confirmation as to whether or not the controller can connect to the database system. The controller issues a connection confirmation instruction as to whether or not the controller and the database system can be connected. A reception unit that receives from the information processing device and an access processing unit that controls access to the database system. When the access processing unit receives a connection confirmation instruction from the information processing device, the controller communicates with the database system. A response unit that confirms whether or not connection to the database system is possible according to the connection setting information indicating the setting for performing the connection, and further transmits a result of confirmation of whether or not connection to the database system is possible by the access processing unit to the information processing apparatus.
好ましくは、情報処理装置は、接続設定情報を生成するための生成部をさらに備え、コントローラのアクセス処理部は、情報処理装置が生成した接続設定情報に従ってデータベースシステムとの接続可否の確認を行うこととしてもよい。 Preferably, the information processing apparatus further includes a generation unit for generating connection setting information, and the access processing unit of the controller confirms whether or not connection with the database system is possible according to the connection setting information generated by the information processing apparatus. It is good.
好ましくは、情報処理装置の要求実行部は、コントローラとデータベースシステムとが接続可能か否かの接続確認をコントローラに指示する際に、生成部により生成する接続設定情報を送信し、アクセス処理部は、接続確認の指示を受け付けて、指示とともに情報処理装置から送信される接続設定情報に基づいて、接続対象のデータベースシステムを特定し、特定したデータベースシステムとの接続可否の確認を行うこととしてもよい。 Preferably, the request execution unit of the information processing device transmits connection setting information generated by the generation unit when instructing the controller to check whether the controller and the database system can be connected, and the access processing unit The connection confirmation instruction may be received, the connection target database system may be identified based on the connection setting information transmitted from the information processing apparatus together with the instruction, and the connection possibility with the identified database system may be confirmed. .
別の実施形態に従うと、コントローラが提供される。コントローラは、コントローラは、コントローラにおいて実行されるユーザプログラムを作成するための情報処理装置と接続され、コントローラがデータベースシステムと接続可能か否かの接続確認の指示を情報処理装置から受け付ける受付部と、データベースシステムとのアクセスを制御するアクセス処理部とを備え、アクセス処理部は、情報処理装置から接続確認の指示を受け付けた場合に、コントローラがデータベースシステムと通信接続するための設定を示す接続設定情報に従ってデータベースシステムとの接続可否の確認を行い、さらに、アクセス処理部によるデータベースシステムとの接続可否の確認の結果を情報処理装置へ送信する応答部を備える。 According to another embodiment, a controller is provided. The controller is connected to an information processing apparatus for creating a user program executed in the controller, and a receiving unit that receives a connection confirmation instruction from the information processing apparatus as to whether or not the controller can be connected to the database system; An access processing unit that controls access to the database system, and the access processing unit indicates connection setting information indicating a setting for the controller to establish a communication connection with the database system when a connection confirmation instruction is received from the information processing apparatus. A response unit that confirms whether or not the connection to the database system is possible, and further transmits a result of confirmation of whether or not the connection to the database system is possible by the access processing unit to the information processing apparatus.
好ましくは、接続設定情報は、情報処理装置により生成され、アクセス処理部は、情報処理装置が生成した接続設定情報に従ってデータベースシステムとの接続可否の確認を行うこととしてもよい。 Preferably, the connection setting information is generated by the information processing apparatus, and the access processing unit may confirm whether or not the connection with the database system is possible according to the connection setting information generated by the information processing apparatus.
好ましくは、接続設定情報は、情報処理装置により接続確認の指示とともにコントローラへ送信され、アクセス処理部は、接続確認の指示を受け付けて、指示とともに情報処理装置から送信される接続設定情報に基づいて、接続対象のデータベースシステムを特定し、特定したデータベースシステムとの接続可否の確認を行うこととしてもよい。 Preferably, the connection setting information is transmitted to the controller together with a connection confirmation instruction by the information processing apparatus, and the access processing unit accepts the connection confirmation instruction and based on the connection setting information transmitted from the information processing apparatus together with the instruction. The database system to be connected may be specified, and whether or not connection with the specified database system is possible may be confirmed.
好ましくは、接続設定情報は、データベースシステムとの通信接続を確立するための複数の設定項目を含み、応答部は、データベースシステムとの接続可否の確認においてエラーが発生した場合に、エラー内容を解析する解析部を含み、エラー内容の解析結果に従って、複数の設定項目のうち、エラー内容に関する設定項目を抽出して情報処理装置へ送信することとしてもよい。 Preferably, the connection setting information includes a plurality of setting items for establishing a communication connection with the database system, and the response unit analyzes the error content when an error occurs in checking whether the connection with the database system is possible. In accordance with the analysis result of the error content, a setting item related to the error content among a plurality of setting items may be extracted and transmitted to the information processing apparatus.
別の実施形態に従うと、コントローラの動作を制御するためのプログラムが提供される。コントローラは、コントローラにおいて実行されるユーザプログラムを作成するための情報処理装置と接続され、プロセッサと、メモリとを備え、プログラムは、プロセッサに、データベースシステムとのアクセスを制御するステップと、コントローラとデータベースシステムとが接続可能か否かの接続確認の指示を情報処理装置から受け付けるステップと、情報処理装置から接続確認の指示を受け付けた場合に、コントローラがデータベースシステムと通信接続するための設定を示す接続設定情報に従ってデータベースシステムとの接続可否の確認を行うステップと、データベースシステムとの接続可否の確認の結果を情報処理装置へ送信するステップとを実行させる。 According to another embodiment, a program for controlling the operation of the controller is provided. The controller is connected to an information processing apparatus for creating a user program executed in the controller, and includes a processor and a memory. The program controls the processor to access the database system, and the controller and the database. A step of accepting a connection confirmation instruction from the information processing apparatus as to whether or not the system can be connected, and a connection indicating a setting for the controller to communicate with the database system when the connection confirmation instruction is accepted from the information processing apparatus A step of confirming whether or not connection to the database system is possible according to the setting information and a step of transmitting a result of confirmation of whether or not to connect to the database system to the information processing apparatus are executed.
別の実施形態に従うと、コントローラと接続される情報処理装置が提供される。情報処理装置は、接続設定情報を生成するための生成部と、コントローラとデータベースシステムとが接続可能か否かの接続確認をコントローラに実行させる要求実行部と、コントローラとデータベースシステムとの接続可否の確認の結果をコントローラから受信し、受信内容に、コントローラとデータベースシステムとの接続可否の確認において発生したエラーの内容が含まれる場合に、エラー内容に応じた表示をモニタに行う表示制御部とを備える。 According to another embodiment, an information processing apparatus connected to a controller is provided. The information processing apparatus includes: a generation unit for generating connection setting information; a request execution unit that causes the controller to perform connection confirmation as to whether the controller and the database system can be connected; and whether the controller and the database system can be connected A display control unit that receives the result of the confirmation from the controller, and displays the content corresponding to the error content on the monitor when the received content includes the content of the error that occurred in the confirmation of the connection possibility between the controller and the database system. Prepare.
上記の一実施形態によると、PLC上でユーザプログラムを実行する前に、PLCがデータベースシステムと接続するための接続設定情報が適切であるか否かを判別することができ、例えばユーザプログラムの作成等が容易になる。 According to the above-described embodiment, before the user program is executed on the PLC, it is possible to determine whether or not the connection setting information for connecting the PLC to the database system is appropriate. Etc. becomes easy.
この発明の上記および他の目的、特徴、局面および利点は、添付の図面と関連して理解されるこの発明に関する次の詳細な説明から明らかとなるであろう。 The above and other objects, features, aspects and advantages of the present invention will become apparent from the following detailed description of the present invention taken in conjunction with the accompanying drawings.
以下、図面を参照しつつ、本発明の実施の形態について説明する。以下の説明では、同一の部品には同一の符号を付してある。それらの名称および機能も同じである。したがって、それらについての詳細な説明は繰り返さない。 Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following description, the same parts are denoted by the same reference numerals. Their names and functions are also the same. Therefore, detailed description thereof will not be repeated.
<実施の形態1>
図1は、本実施形態における制御システム全体の構成を示す図である。
<Embodiment 1>
FIG. 1 is a diagram showing a configuration of the entire control system in the present embodiment.
まず概要を説明する。図1を参照して、制御システムには、PC(Personal Computer)10と、DB(Database)サーバ20と、PLC30と、PLC40とが含まれる。PC10は、PLC30で動作させるユーザプログラムをユーザが作成するための情報処理装置である。DBサーバ20は、データベースを管理するため、DBMS(database management system)として機能するサーバである。
First, an outline will be described. Referring to FIG. 1, the control system includes a PC (Personal Computer) 10, a DB (Database)
PLC30は、PC10と、DBサーバ20と、PLC40と接続される。PLC30は、DBサーバ20と接続するための設定(後述する接続設定情報51)を保持しており、設定に従ってDBサーバ20へアクセスする。本実施形態では、PC10において接続設定情報51を作成してPLC30に保持させることができ、PC10からPLC30に対し、PLC30とDBサーバ20とが通信接続されているか否かの接続確認の指示を行うことができる。PLC30は、PC10からの接続確認の指示に応じてDBサーバ20との接続可否の確認を行い、確認の結果をPC10へ通知する。
The
また、PLC30は、センサ出力などを外部から受け付けてデータを蓄積し、蓄積されたデータを、後述するDBアクセス処理プログラム35によりDBサーバ20へ送信する。PLC30は、他のPLC(図1の例ではPLC40)がDBサーバ20へ送信するデータを受け付けて、受け付けたデータをDBサーバ20へ送信する。PLC40は、センサ出力などを外部から受け付けてデータを蓄積し、蓄積されたデータを、PLC30を介してDBサーバ20へ送信する。
In addition, the
<各機器の構成の詳細>
次に、各機器の構成の詳細について説明する。
<Details of the configuration of each device>
Next, details of the configuration of each device will be described.
図2は、PC10の機能を示すブロック図である。
PC10は、MCU(Micro Control Unit)、ROM(Read Only Memory)、RAM(Random Access Memory)等を備えるコンピュータシステム(情報処理装置)である。図2を参照して、PC10は、PLC30を動作させるためのユーザプログラムをユーザが作成するためのプログラミングツール12の機能を発揮する。プログラミングツール12は、接続設定情報生成部14と、接続確認要求部15と、プログラミング機能16との機能を含む。ユーザがプログラミングツール12により作成したユーザプログラムは、PLC30へ送信され、PLC30で実行される。
FIG. 2 is a block diagram illustrating functions of the
The
接続設定情報生成部14は、PLC30がDBサーバ20と通信接続するための設定情報(接続設定情報51)を生成するためのソフトウェアである。接続設定情報生成部14は、DBサーバ20のアドレス、データベース名などの設定の入力をユーザから受け付けて接続設定情報51を生成し、生成した接続設定情報51をDBサーバ20へ送信する。
The connection setting
接続確認要求部15は、PLC30とDBサーバ20とが通信接続されているか否かの接続確認の指示をPC10からPLC30へ通知するためのソフトウェアである。例えば、接続確認の指示の操作をユーザから受け付けることで接続確認要求部15の機能が発揮される。
The connection
プログラミング機能16は、ユーザによるプログラム作成を支援するためのソフトウェアである。これらソフトウェアがPC10において実行されることにより、接続設定情報生成部14、接続確認要求部15およびプログラミング機能16の機能が発揮される。
The
図3は、DBサーバ20の機能を示すブロック図である。DBサーバ20は、大容量の記憶装置などを備えるコンピュータシステムである。
FIG. 3 is a block diagram showing functions of the
DBサーバ20は、データベースへの読み出しおよび書き込みを管理するDBMS22の機能を発揮する。DBMS22は、データベースとして機能するDB24へのデータの書き込みおよび読み出しを制御する。DB24は、複数件のデータレコードを保持するための記憶領域であり、DBMS22の制御に従ってデータの保持等を行う。
The
図4は、PLC30の機能を示すブロック図である。PLC30は、コンピュータシステムであり、ユーザプログラムを周期的に実行する。PLC30は、PLC30内のメモリ領域の情報を読み書きして、ユーザプログラムに示される命令を順に実行する。PLC30は、入出力機能を備えており、センサ出力などPLC30の外部からデータを受け付けて、データを蓄積する。PLC30は、蓄積されたデータをDBサーバ20へ送信する。
FIG. 4 is a block diagram showing functions of the
図4を参照して、PLC30の各機能は、OS31と、システムプログラム33と、ユーザプログラム32等が動作することで発揮される。PLC30は、接続設定情報51とを保持している。
Referring to FIG. 4, each function of
OS31は、PLC30の資源を管理するオペレーティングシステムであり、タスクのスケジューリングや、DBサーバ20へのアクセス処理などの機能をPLC30に発揮させる。
The
システムプログラム33は、PLC30としての基本的な機能を提供するためのソフトウェア群である。具体的には、システムプログラム33は、シーケンス命令プログラム34と、DBアクセス処理プログラム35と、入出力処理プログラム36と、ツールインタフェース処理プログラム37と、スケジューラ38とを含んでいる。
The
シーケンス命令プログラム34は、PLC30内のメモリ領域の情報を読み書きしながら、ユーザプログラム32の命令を順に実行する機能をPLC30に発揮させる。
The
DBアクセス処理プログラム35は、シーケンス命令プログラム34がユーザプログラム32を実行することに伴って呼び出され、ユーザプログラム32がDBサーバ20へアクセスするための処理、例えばSQL文の生成などの処理を実行する機能をPLC30に発揮させる。
The DB
入出力処理プログラム36は、PLC30が備える複数の入出力機能によるPLC30へのデータ入力およびPLC30からのデータ出力を制御する機能をPLC30に発揮させる。各入出力機能は、それぞれメモリのアドレスが割りあてられている。各入出力機能に対応するメモリに保持されるデータは、PLC30の外部のデータと一括して交換される。ツールインタフェース処理プログラム37は、PC10において動作するプログラミングツール12の機能によりPC10からPLC30へ通知される指示を受けて、DBアクセス処理プログラム35等へ処理を渡し、処理の結果等をPC10へ応答する機能をPLC30に発揮させる。スケジューラ38は、PLC30で実行するタスクの優先度に基づいて、タスクのスケジューリングを行う機能をPLC30に発揮させる。
The input /
ユーザプログラム32は、PC10により作成され、PLC30のメモリに保持されている。図4を参照して、ユーザプログラム32とシーケンス命令プログラム34とが制御プログラム39を構成する。すなわち、シーケンス命令プログラム34がユーザプログラム32を読み出して、命令が順に実行されることで、PLC30が動作する。
The
接続設定情報51は、PLC30がDBサーバ20と通信接続するための設定を示す。
図5は、本実施形態のコンピュータシステムのハードウェアの構成を示す図である。図5(A)は、コンピュータシステムとしてPC10の構成を示す。図5(A)を参照して、PC10は、CPU101と、ROM102と、RAM103と、通信インタフェース104と、ディスプレイ105と、入出力インタフェース106とを備える。CPU101は、プログラムを読み出して実行することでPC10に各種機能を発揮させる。ROM102は、不揮発性の記憶領域であり、システムデータ等が記憶される。RAM103は、揮発性のメモリであり、プログラムやデータが格納される。通信インタフェース104は、PC10が外部の機器と通信するためのインタフェースである。ディスプレイ105は、CPU101等による演算の結果を画像により出力するための表示機器である。入出力インタフェース106は、PC10がユーザの入力操作等を受け付け、PC10の動作状態を出力するためのインタフェースである。
The
FIG. 5 is a diagram illustrating a hardware configuration of the computer system according to the present embodiment. FIG. 5A shows the configuration of the
図5(B)は、PLC30のハードウェア構成を示す図である。PLC30は、CPU101と、ROM102と、RAM103と、通信インタフェース104と、バス107等を備える。PLC40もPLC30と同様のハードウェア構成を備える。
FIG. 5B is a diagram illustrating a hardware configuration of the
<データ>
次に、本実施形態で用いるデータについて、説明する。
<Data>
Next, data used in the present embodiment will be described.
図6は、接続設定情報51を示す図である。接続設定情報51は、上述の通り、PC10において生成し、PLC30で保持される。
FIG. 6 is a diagram showing the
PLC30は、DBサーバ20との接続の設定を複数保持することができ、コネクション名51Aは、PLC30がDBサーバ20と接続するための設定を識別するための名称を示す。
The
DB種別51Bは、DBサーバ20において稼働しているデータベースシステムの種類を示す。
The DB type 51B indicates the type of database system operating in the
データベース名51Cは、DBサーバ20において稼働しており、PLC30が接続先とするデータベースシステムの名称を示す。
The
サーバ指定方法51Dは、通信接続先のDBサーバ20を指定するための方法を示す。図6では、サーバをIPアドレスによって指定する例を示している。
The server designation method 51D indicates a method for designating the communication connection
IPアドレス51Eは、サーバ指定方法51Dで指定された方法に基づいて通信接続先のDBサーバ20を特定するための情報(IPアドレス等)を示している。
The IP address 51E indicates information (IP address or the like) for specifying the communication connection
ホスト名51Fは、PLC30が通信接続先のDBサーバ20を特定するためのホスト名を示す。
The host name 51F indicates a host name for the
ポート番号51Gは、PLC30がDBサーバ20と接続するためのポート番号を示す。
The port number 51G indicates a port number for the
ユーザ名51Hは、PLC30がDBサーバ20と接続するためのユーザ名を示す。
パスワード51Iは、PLC30がユーザ名51Hに示すユーザ名によってDBサーバ20と接続するためのパスワードを示す。
The
The password 51I indicates a password for the
ログインタイムアウト期間51Jは、PLC30がDBサーバ20と接続した場合に、ログイン状態をタイムアウトさせるための期間の長さを示す。
The
クエリ実行タイムアウト時間51Kは、DBサーバ20がクエリを実行した場合のタイムアウトの期間を示す。
The query
コメント51Lは、接続設定情報51に示される設定について、ユーザから入力されるコメントを示す。
The
<PC10における操作画面>
図7は、PC10の接続設定情報生成部14が機能することで、ユーザから接続設定情報51の入力操作を受けつけるための画面をディスプレイに表示する例を示す図である。
<Operation screen on PC10>
FIG. 7 is a diagram illustrating an example in which a screen for receiving an input operation of the
コネクション設定画面60は、ユーザから接続設定情報51を生成するための入力操作を受け付けるための画面である。
The
入力領域61は、接続設定情報51の各構成要素の入力をユーザから受け付けるため、テキストボックスやラジオボタン等を表示している。コネクション名61Aは、図6のコネクション名51Aに対応している。以下、同様に、DB種別61Bからコメント61Lは、DB種別51Bからコメント51Lと対応している。接続設定情報生成部14は、これら入力領域61に対しユーザからの入力操作を受け付けることで、接続設定情報51を生成する。
The
通信テストボタン62は、ユーザの操作を受け付けて、接続確認要求部15の機能をPC10に発揮させるためのボタンである。通信テストボタン62に対しユーザの操作がなされることで、PC10からPLC30に対し、PLC30とDBサーバ20とで接続確認の指示が通知される。
The
タブ63Aは、コネクション設定画面60においてアクティブな(編集可能な)接続設定情報51を示す。タブ63Bは、コネクション設定画面60においてユーザが選択することでアクティブとなる。タブ63Cは、新たに接続設定情報51を生成するための領域である。
The
<動作>
次に、本実施形態におけるPC10、PLC30の動作について、図面を用いて詳しく説明する。
<Operation>
Next, operations of the
実施の形態1における動作の概要は、以下のとおりである。PC10は、ユーザの操作入力に基づいて、PLC30で実行させるユーザプログラムを作成する。PLC30は、PC10からユーザプログラムを受信して記憶する。PLC30は、シーケンス命令プログラム34によるユーザプログラム32の実行に伴ってDBアクセス処理プログラム35を呼び出す。PLC30は、ユーザプログラム32がDBサーバ20へアクセスするための処理、例えばSQL文の生成と送信等をDBアクセス処理プログラム35により行う。
The outline of the operation in the first embodiment is as follows. The
PC10は、例えばユーザによるユーザプログラムの作成前に、ユーザの操作入力に基づいて接続設定情報51を生成し、PLC30に記憶させる。この接続設定情報51が適切に設定されているか否かを確認するため、PC10は、ユーザから接続確認の指示の操作を受け付けて(例えば、図7に示す通信テストボタン62への操作の受け付け)、PLC30に対しDBサーバ20との接続確認を指示する。PLC30は、DBサーバ20との接続可否の確認の結果を、PC10へ送信する。PC10は、PLC30から受信した接続可否の確認の結果に、接続が不可(エラー)と示されている場合は、エラー内容に応じた表示をする。
For example, before the user program is created by the user, the
図8は、PC10が接続設定情報51を生成してPLC30へ送信する処理を示す図である。
FIG. 8 is a diagram illustrating a process in which the
ステップS11において、PC10は、コネクション設定画面60を表示することにより、ユーザから接続設定情報51を生成するための操作を受け付ける。
In step S <b> 11, the
ステップS13において、PC10は、接続設定情報51を更新してPLC30へ送信する。
In step S <b> 13, the
ステップS61において、PLC30は、PC10から送信される接続設定情報51を受信してメモリ等の記憶領域に記憶する。
In step S61, the
図9は、PC10がPLC30に対し、PLC30とDBサーバ20との接続確認の指示を送信し、PLC30が確認結果をPC10へ送信する処理を示す図である。
FIG. 9 is a diagram illustrating processing in which the
ステップS62において、PLC30は、PC10から送信された接続設定情報51を記憶する。
In step S62, the
ステップS15において、PC10は、ユーザによる入力操作等に基づいて、PLC30がDBサーバ20と接続可能か否かの接続確認を指示するための操作を受け付ける。
In step S <b> 15, the
ステップS17において、PC10は、PLC30に対し、DBサーバ20との接続確認の指示(DB接続確認指示)を送信する。
In step S <b> 17, the
ステップS63において、PLC30は、PLC30とDBサーバ20との接続確認の指示をPC10から受信する。
In step S <b> 63, the
ステップS65において、PLC30は、接続設定情報51に基づいて、DBサーバ20との接続の可否を試行する。
In step S <b> 65, the
ステップS67において、PLC30は、接続設定情報51に基づくDBサーバ20との接続の可否の確認結果をPC10へ送信する。PLC30は、接続設定情報51に基づくDBサーバ20との接続が不可の場合は、エラー内容を含めて接続の可否の確認結果をPC10へ送信する。
In step S <b> 67, the
ステップS19において、PC10は、接続設定情報51に基づくPLC30とDBサーバ20との接続確認の可否の結果を表示し、エラー内容が含まれている場合は、エラー内容を表示してユーザによるエラー箇所の修正を促すための処理を行う。
In step S19, the
図10は、PLC30がステップS65においてDBサーバ20との接続可否を試行するために生成する命令の例を示す。例えば、PLC30は、ツールインタフェース処理プログラム37によってPC10からの接続確認の指示を受け付けて、接続設定情報51に基づいて命令文を生成し、DBアクセス処理プログラム35に処理を渡す。
FIG. 10 shows an example of an instruction generated by the
図10(A)は、コネクション名51Aが「DB_Connection001」の命令文の例であり、その他データベース名51C、ホスト名51F、ポート番号51G、ユーザ名51H、パスワード51I等、PLC30とDBサーバ20との接続に必要な情報が命令文に含まれている。
FIG. 10A is an example of a command statement in which the connection name 51A is “DB_Connection001”.
図10(B)は、コネクション名51Aが「DB_Connection002」の命令文の例である。PLC30は、DBアクセス処理プログラム35により、これら命令に基づいてDBサーバ20との通信接続を試みる。
FIG. 10B shows an example of a statement in which the connection name 51A is “DB_Connection002”. The
PLC30は、DBアクセス処理プログラム35によるDBサーバ20との接続が正常に終了した場合は、DBサーバ20との接続が可能であることを示す応答をツールインタフェース処理プログラム37に通知する。PLC30は、DBアクセス処理プログラム35によるDBサーバ20との接続に失敗した場合は、例えばユーザ名51H、パスワード51I等の設定が原因である場合は、これらエラー内容を含めてツールインタフェース処理プログラム37にDBサーバ20との接続が失敗したことを示す応答を通知する。PLC30は、ツールインタフェース処理プログラム37により、PLC30とDBサーバ20との接続可否の確認結果をPC10へ送信する。
When the connection with the
図11は、PC10がステップS19においてPLC30からの応答にエラー内容が含まれている場合に、エラー内容に応じた表示を行う場合の一例を示す図である。
FIG. 11 is a diagram illustrating an example of a case where the
図11の例では、PLC30とDBサーバ20との接続が失敗し、そのエラーの内容に、ユーザ名51Hとパスワード51Iとが不適切であることが示されている場合を示している。PC10は、コネクション設定画面60において、エラーの内容を示す表示をエラー内容表示領域に行う。
In the example of FIG. 11, the connection between the
例えば、PC10は、エラー内容表示領域に「”ユーザ名”と”パスワード”が違います」と表示して、ユーザ名51Hとパスワード51Iの設定に不備があることを表示する。また、PC10は、入力領域61において、ユーザ名61Hとパスワード61Iとを強調表示することで、ユーザに対し、エラー内容に対応する箇所の訂正入力を促す表示を行う。
For example, the
<実施の形態2>
実施の形態1では、図8と図9を参照して説明したように、PC10が接続設定情報51を生成するための操作の入力を受け付けて(ステップS11)接続設定情報51をPLC30に送信する処理(ステップS13)を行ってPLC30に接続設定情報51が保持された後(ステップS61)に、PC10からPLC30へ接続確認の指示を送信する(ステップS17)場合を説明している。
<
In the first embodiment, as described with reference to FIGS. 8 and 9, the
実施の形態2では、PC10がPLC30とDBサーバ20との接続確認の指示をPLC30へ送信する際に、接続設定情報51を併せて送信する。すなわち、PC10は、接続設定情報51を生成して保持し、PLC30へ接続確認の指示を送信する際に、接続設定情報51を添付して送信する。PLC30は、接続確認の指示を受け付けて、DBアクセス処理プログラム35へ接続設定情報51を引き渡す。
In the second embodiment, when the
図12は、実施の形態2においてPC10がPLC30に対し、PLC30とDBサーバ20との接続確認の指示を送信し、PLC30が確認結果をPC10へ送信する処理を示す図である。
FIG. 12 is a diagram illustrating processing in which the
ステップS16において、PC10は、ユーザによる入力操作等に基づいて、ユーザから接続設定情報51を生成するための操作を受け付け、また、PLC30がDBサーバ20と接続可能か否かの接続確認を指示するための操作を受け付ける。
In step S <b> 16, the
ステップS18において、PC10は、PLC30に対し、DBサーバ20との接続確認の指示(DB接続確認指示)と、接続設定情報51とを送信する。
In step S <b> 18, the
ステップS64において、PLC30は、PLC30とDBサーバ20との接続確認の指示と、接続設定情報51とをPC10から受信する。
In step S <b> 64, the
ステップS66において、PLC30は、受信した情報のうち接続設定情報51を抽出し、抽出した接続設定情報51に示される設定に従って、接続確認を行うデータベースシステムを特定し、特定したデータベースシステムとの接続可否の確認を行う。
In step S66, the
ステップS67、S19の処理については図9の説明と同様である。
このように各実施形態について説明してきたが、これら実施形態を組み合わせてもよいことはいうまでもない。以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は前記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。
The processing in steps S67 and S19 is the same as that described in FIG.
Each embodiment has been described above, but it goes without saying that these embodiments may be combined. As mentioned above, the invention made by the present inventor has been specifically described based on the embodiment. However, the present invention is not limited to the embodiment, and various modifications can be made without departing from the scope of the invention. Needless to say.
今回開示された実施の形態はすべての点で例示であって制限的なものでないと考えられるべきである。この発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time must be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
101 CPU、102 ROM、103 RAM、104 通信インタフェース、105 ディスプレイ、106 入出力インタフェース、10 PC、12 プログラミングツール、14 接続設定情報生成部、15 接続確認要求部、16 プログラミング機能、20 DBサーバ、22 DBMS、24 DB、30 PLC、31 OS、32 ユーザプログラム、33 システムプログラム、34 シーケンス命令プログラム、35 DBアクセス処理プログラム、36 入出力処理プログラム、37 ツールインタフェース処理プログラム、38 スケジューラ、39 制御プログラム、40 PLC、51 接続設定情報、60 コネクション設定画面、61 入力領域、62 通信テストボタン、63 タブ、64 エラー内容表示領域。 101 CPU, 102 ROM, 103 RAM, 104 Communication interface, 105 Display, 106 Input / output interface, 10 PC, 12 Programming tool, 14 Connection setting information generation unit, 15 Connection confirmation request unit, 16 Programming function, 20 DB server, 22 DBMS, 24 DB, 30 PLC, 31 OS, 32 user program, 33 system program, 34 sequence instruction program, 35 DB access processing program, 36 input / output processing program, 37 tool interface processing program, 38 scheduler, 39 control program, 40 PLC, 51 connection setting information, 60 connection setting screen, 61 input area, 62 communication test button, 63 tab, 64 error content display area.
Claims (9)
前記情報処理装置は、
前記コントローラがデータベースシステムと通信接続するための設定を示す接続設定情報を、ユーザ入力に基づいて生成する生成部と、
前記コントローラが前記データベースシステムと接続が可能か否かの接続確認を前記コントローラに実行させる要求実行部とを備え、
前記コントローラは、
前記接続設定情報と、前記コントローラと前記データベースシステムとが接続可能か否かの接続確認の指示とを前記情報処理装置から受け付ける受付部と、
前記データベースシステムへのアクセスを制御するアクセス処理部とを備え、
前記アクセス処理部は、前記情報処理装置から前記接続確認の指示を受け付けた場合に、前記接続設定情報に従って前記データベースシステムとの接続可否の確認を行い、
前記コントローラは、さらに、前記アクセス処理部による前記データベースシステムとの接続可否の確認の結果を前記情報処理装置へ送信する応答部を備える、制御システム。 A control system including a controller and an information processing apparatus connected to the controller,
The information processing apparatus includes:
A generation unit that generates connection setting information indicating a setting for the controller to establish communication connection with the database system based on a user input;
Wherein the controller comprises a request execution unit to execute one of the connection confirmation whether possible to connect to the database system to said controller,
The controller is
A receiving unit that receives from the information processing apparatus the connection setting information and a connection confirmation instruction as to whether or not the controller and the database system are connectable;
An access processing unit for controlling access to the database system,
The access processing unit, when the information processing apparatus receives an instruction of the connection confirmation, according to the previous Kise' connection setting information confirms the connection possibility with the database system,
The controller further includes a response unit that transmits a result of checking whether or not the access processing unit can be connected to the database system to the information processing apparatus.
前記アクセス処理部は、前記接続確認の指示を受け付けて、前記指示とともに前記情報処理装置から送信される接続設定情報に基づいて、接続対象のデータベースシステムを特定し、特定したデータベースシステムとの接続可否の確認を行う、請求項1または2記載の制御システム。 The request execution unit of the information processing device transmits the connection setting information generated by the generation unit when instructing the controller to check whether the controller and the database system can be connected.
The access processing unit accepts the connection confirmation instruction, identifies a database system to be connected based on connection setting information transmitted from the information processing apparatus together with the instruction, and determines whether or not to connect to the identified database system The control system according to claim 1 or 2, wherein the confirmation is performed.
前記コントローラがデータベースシステムと接続可能か否かの接続確認の指示を前記情報処理装置から受け付ける受付部と、
前記データベースシステムとのアクセスを制御するアクセス処理部とを備え、
前記アクセス処理部は、前記情報処理装置から前記接続確認の指示を受け付けた場合に、前記コントローラがデータベースシステムと通信接続するための設定を示す接続設定情報に従って前記データベースシステムとの接続可否の確認を行い、
前記接続設定情報は、前記アクセス処理部が前記データベースシステムにアクセスするためのユーザ名とパスワードとを含み、
前記コントローラは、さらに、前記アクセス処理部による前記データベースシステムとの接続可否の確認の結果を前記情報処理装置へ送信する応答部を備える、コントローラ。 A controller, wherein the controller is connected to an information processing device for creating a user program executed in the controller;
A receiving unit that receives from the information processing apparatus an instruction for connection confirmation as to whether or not the controller can connect to the database system;
An access processing unit for controlling access to the database system,
When the access processing unit receives the connection confirmation instruction from the information processing apparatus, the access processing unit confirms whether the connection with the database system is possible according to connection setting information indicating a setting for the controller to establish communication connection with the database system. Done
The connection setting information includes a user name and a password for the access processing unit to access the database system,
The controller further includes a response unit that transmits a result of confirmation of whether the access processing unit can connect to the database system to the information processing apparatus.
前記アクセス処理部は、前記情報処理装置が生成した接続設定情報に従って前記データベースシステムとの接続可否の確認を行う、請求項4記載のコントローラ。 The connection setting information is generated by the information processing apparatus,
The controller according to claim 4, wherein the access processing unit confirms whether or not connection with the database system is possible according to connection setting information generated by the information processing apparatus.
前記アクセス処理部は、前記接続確認の指示を受け付けて、前記指示とともに前記情報処理装置から送信される接続設定情報に基づいて、接続対象のデータベースシステムを特定し、特定したデータベースシステムとの接続可否の確認を行う、請求項5記載のコントローラ。 The connection setting information is transmitted to the controller together with the connection confirmation instruction by the information processing apparatus,
The access processing unit accepts the connection confirmation instruction, identifies a database system to be connected based on connection setting information transmitted from the information processing apparatus together with the instruction, and determines whether or not to connect to the identified database system 6. The controller according to claim 5, wherein the controller is checked.
前記応答部は、
前記データベースシステムとの接続可否の確認においてエラーが発生した場合に、エラー内容を解析する解析部を含み、
前記エラー内容の解析結果に従って、前記複数の設定項目のうち、エラー内容に関する設定項目を抽出して前記情報処理装置へ送信する、請求項4から6のいずれか1項に記載のコントローラ。 The connection setting information includes a plurality of setting items for establishing a communication connection with the database system,
The response unit is:
When an error occurs in the confirmation of whether or not the database system can be connected, an analysis unit that analyzes the error content includes
7. The controller according to claim 4, wherein setting items relating to error contents are extracted from the plurality of setting items and transmitted to the information processing apparatus according to the analysis result of the error contents.
前記プログラムは、前記プロセッサに、
データベースシステムとのアクセスを制御するステップと、
前記コントローラと前記データベースシステムとが接続可能か否かの接続確認の指示を前記情報処理装置から受け付けるステップと、
前記情報処理装置から前記接続確認の指示を受け付けた場合に、前記コントローラがデータベースシステムと通信接続するための設定を示す接続設定情報に従って前記データベースシステムとの接続可否の確認を行うステップと、
前記データベースシステムとの接続可否の確認の結果を前記情報処理装置へ送信するステップとを実行させ、
前記接続設定情報は、前記コントローラが前記データベースシステムにアクセスするためのユーザ名とパスワードとを含む、プログラム。 A program for controlling the operation of a controller, the controller being connected to an information processing device for creating a user program executed in the controller, comprising a processor and a memory,
The program is stored in the processor.
Controlling access to the database system;
Receiving from the information processing apparatus a connection confirmation instruction as to whether or not the controller and the database system are connectable;
When accepting the connection confirmation instruction from the information processing apparatus, the controller confirms whether or not the database system can be connected according to connection setting information indicating settings for communication connection with the database system;
Transmitting a result of confirmation of whether or not connection with the database system is possible to the information processing apparatus;
The connection setting information includes a user name and a password for the controller to access the database system .
前記コントローラがデータベースシステムと通信接続するための設定を示す接続設定情報を、ユーザ入力に基づいて生成する生成部と、
前記コントローラとデータベースシステムとが接続可能か否かの接続確認を前記コントローラに実行させる要求実行部と、
前記コントローラと前記データベースシステムとの接続可否の確認の結果を前記コントローラから受信し、受信内容に、前記コントローラと前記データベースシステムとの接続可否の確認において発生したエラーの内容が含まれる場合に、エラー内容に応じた表示をモニタに行う表示制御部とを備える、情報処理装置。 An information processing apparatus connected to a controller,
A generation unit that generates connection setting information indicating a setting for the controller to establish communication connection with the database system based on a user input ;
A request execution unit that causes the controller to execute connection confirmation as to whether or not the controller and the database system can be connected;
When the result of confirming whether or not the controller and the database system can be connected is received from the controller, and the received content includes the content of an error that occurred in the confirmation of whether or not the controller and the database system can be connected, an error An information processing apparatus comprising: a display control unit that performs display according to contents on a monitor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012250656A JP6175759B2 (en) | 2012-11-14 | 2012-11-14 | Controller, control system, program, and information processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012250656A JP6175759B2 (en) | 2012-11-14 | 2012-11-14 | Controller, control system, program, and information processing apparatus |
Publications (3)
Publication Number | Publication Date |
---|---|
JP2014099060A JP2014099060A (en) | 2014-05-29 |
JP2014099060A5 JP2014099060A5 (en) | 2016-01-07 |
JP6175759B2 true JP6175759B2 (en) | 2017-08-09 |
Family
ID=50941019
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012250656A Active JP6175759B2 (en) | 2012-11-14 | 2012-11-14 | Controller, control system, program, and information processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6175759B2 (en) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2006277733A (en) * | 2005-03-01 | 2006-10-12 | Omron Corp | Programmable controller system |
JP5549556B2 (en) * | 2010-11-16 | 2014-07-16 | 富士電機株式会社 | Data collection system, data collection system abnormality factor determination method |
-
2012
- 2012-11-14 JP JP2012250656A patent/JP6175759B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014099060A (en) | 2014-05-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20190363932A1 (en) | Data collecting apparatus, data collecting method, and program | |
US9984244B2 (en) | Controller, information processing apparatus, and recording medium | |
JP6171386B2 (en) | Controller, information processing apparatus and program | |
JP2015176370A (en) | Control system, method, program and information processor | |
US9130923B2 (en) | Credential provider that encapsulates other credential providers | |
JP6201298B2 (en) | Controller and program | |
WO2012056537A1 (en) | Programmable controller | |
JP6442131B2 (en) | Control system and control device | |
JP6436705B2 (en) | Test execution device, test execution method, and computer program | |
JP6175759B2 (en) | Controller, control system, program, and information processing apparatus | |
JP6064749B2 (en) | Controller and program | |
JP6436704B2 (en) | Test execution device, test execution method, and computer program | |
JP6833109B1 (en) | Data collection device, data collection method and program | |
JP2004362029A (en) | Control equipment setting system | |
JP6438842B2 (en) | Management device, management system, and management program | |
JP6353759B2 (en) | Test execution device, test execution method, and computer program | |
WO2024154275A1 (en) | Control device and computer-readable storage medium | |
JP7536217B1 (en) | PROGRAMMABLE CONTROLLER, TERMINAL DEVICE, INFORMATION PROVIDING METHOD AND PROGRAM | |
JP5414909B2 (en) | Programmable controller | |
JP2012080378A (en) | Protocol test device, protocol test method, and protocol test program | |
CN115509544A (en) | NVME continuous integration method and device, readable storage medium and electronic equipment | |
CN118612125A (en) | Industrial control protocol fuzzy test method and system | |
JP2020021255A (en) | Numerical control device | |
JP2004140748A (en) | Data repeater, data repeating system, and computer program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20151112 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20151113 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160923 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20161025 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20161214 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20170613 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170626 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6175759 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |