JP6171385B2 - Controller and information processing apparatus - Google Patents
Controller and information processing apparatus Download PDFInfo
- Publication number
- JP6171385B2 JP6171385B2 JP2013027892A JP2013027892A JP6171385B2 JP 6171385 B2 JP6171385 B2 JP 6171385B2 JP 2013027892 A JP2013027892 A JP 2013027892A JP 2013027892 A JP2013027892 A JP 2013027892A JP 6171385 B2 JP6171385 B2 JP 6171385B2
- Authority
- JP
- Japan
- Prior art keywords
- access
- program
- user program
- unit
- access request
- 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
Images
Landscapes
- Programmable Controllers (AREA)
Description
本発明は、制御対象を制御するコントローラおよびそのコントローラで実行されるユーザプログラムを生成する情報処理装置に関する。 The present invention relates to a controller that controls an object to be controlled and an information processing apparatus that generates a user program executed by the controller.
多くの生産現場で使用される機械や設備といった制御対象は、プログラマブルコントローラ(Programmable Logic Controller;以下「PLC」とも称す。)といったコントローラによって制御される。近年の情報処理技術の進歩によって、このようなコントローラについても多機能化が進んでいる。 Control objects such as machines and facilities used in many production sites are controlled by a controller such as a programmable controller (hereinafter also referred to as “PLC”). With the progress of information processing technology in recent years, such controllers are becoming more multifunctional.
例えば、特開2012−108642号公報(特許文献1)は、プログラマブルコントローラ(PLC)等の制御装置が収集した所定のデータをデータベースに保存するデータ収集システムを開示する。このプログラマブルコントローラは、通信路を介して、データベースをアクセスするSQL文を複数含むSQL処理群をデータベースに送信するSQL送信部を含む。 For example, JP 2012-108642 A (Patent Document 1) discloses a data collection system that stores predetermined data collected by a control device such as a programmable controller (PLC) in a database. The programmable controller includes an SQL transmission unit that transmits an SQL processing group including a plurality of SQL statements for accessing the database to the database via the communication path.
上述のようなコントローラは、データをデータベース装置へ書込んだり、データベース装置上のデータを削除したりするためのアクセス要求を発行する。このようなアクセス要求としては、典型的には、リレーショナルデータベース管理システムにおいて用いられるSQL文がよく知られている。 The controller as described above issues an access request for writing data to the database device or deleting data on the database device. As such an access request, a SQL sentence typically used in a relational database management system is well known.
PLCなどのコントローラでは、典型的には、制御対象に応じて設計されるユーザプログラムが実行されることで、このようなアクセス要求が生成および送信される。このようなユーザプログラムを用いてアクセス要求を発行するような構成では、プログラムの再利用性などを考慮して、可変な変数(パラメータ)を用いてデータの書込みや削除の対象となる範囲を指定するように設計されることが多い。 A controller such as a PLC typically generates and transmits such an access request by executing a user program designed according to a control target. In such a configuration that issues an access request using a user program, a variable variable (parameter) is used to specify the range to which data is to be written or deleted in consideration of program reusability. Often designed to do.
このようなプログラム設計においては、ユーザプログラム自体の間違い、参照するパラメータの指定間違い、パラメータへの誤った値の設定などによって、不適切な範囲を対象とするアクセス要求が発行されてしまう可能性がある。このような不適切な範囲を対象とするアクセス要求がデータベース装置へ送信されることで、意図しないデータ処理が実行されるおそれがある。 In such a program design, there is a possibility that an access request for an inappropriate range may be issued due to an error in the user program itself, an incorrect specification of a parameter to be referred to, an incorrect value setting for the parameter, etc. is there. When an access request for such an inappropriate range is transmitted to the database device, there is a possibility that unintended data processing may be executed.
本発明は、このような状況を鑑みてなされたものであり、その目的は、ユーザプログラムの実行によって、不適切なアクセス要求が生成および送信されてしまうことを防止できるコントローラ、およびそのコントローラで実行されるユーザプログラムを生成する情報処理装置を提供することである。 The present invention has been made in view of such a situation, and an object of the present invention is to execute a controller that can prevent an inappropriate access request from being generated and transmitted due to execution of a user program, and the controller. It is providing the information processing apparatus which produces | generates the user program to be performed.
本発明のある局面に係る制御対象を制御するコントローラは、データベース部と通信するための通信インターフェイスと、制御対象の制御に係るユーザプログラムを実行する命令実行部と、ユーザプログラムに含まれるデータベース部にアクセスするためのアクセス命令が命令実行部によって実行されることに応答して、通信インターフェイスにアクセス要求を送信させるアクセス処理部と、ユーザプログラムに含まれるアクセス命令に従って生成されるアクセス要求が予め定められた条件と一致するときに、アクセス要求の送信を制限する制限部とを含む。 A controller for controlling a control target according to an aspect of the present invention includes a communication interface for communicating with a database unit, a command execution unit for executing a user program related to control of the control target, and a database unit included in the user program In response to an access command for access being executed by the command execution unit, an access processing unit for transmitting an access request to the communication interface and an access request generated according to the access command included in the user program are predetermined. And a restricting unit that restricts transmission of the access request when the condition matches.
好ましくは、制限部は、アクセス命令またはアクセス要求により定義されるアクセス対象の範囲として、無効な値が設定されているときに、アクセス要求の送信を制限する。 Preferably, the restricting unit restricts transmission of the access request when an invalid value is set as the access target range defined by the access command or the access request.
好ましくは、制限部は、アクセス命令またはアクセス要求により定義されるアクセス対象を指定するための条件として、予め定められた不正な条件が設定されているときに、アクセス要求の送信を制限する。 Preferably, the restriction unit restricts transmission of the access request when a predetermined illegal condition is set as a condition for designating an access target defined by the access command or the access request.
好ましくは、制限部は、ユーザプログラムとは独立してコントローラに格納されるプログラムとして実装される。 Preferably, the restriction unit is implemented as a program stored in the controller independently of the user program.
好ましくは、命令実行部は、コントローラに接続された外部装置から設定された値に従って、ユーザプログラムを実行し、制限部は、予め定められた条件と一致するか否かの判断を、ユーザプログラムの実行毎に行う。 Preferably, the instruction execution unit executes the user program in accordance with a value set from an external device connected to the controller, and the restriction unit determines whether or not the predetermined condition matches the predetermined condition. This is done every execution.
本発明の別の局面に係る制御対象を制御するコントローラは、1または複数のプロセッサと、システムプログラムとユーザプログラムとを格納するメモリと、データベース部と通信するための通信インターフェイスとを含む。コントローラは、ユーザプログラムの実行を繰返すことによって制御対象を制御するように構成されている。ユーザプログラムは、データベース部にアクセスするためのアクセス命令を含む。アクセス命令は、データベース部にアクセスするアクセス範囲を指定する情報を含む。システムプログラムは、ユーザプログラムの実行に伴ってアクセス命令が実行されると、アクセス範囲を指定する情報に従って、データベース部に対するアクセス要求を生成する処理と、アクセス要求を通信インターフェイスを介して実行する処理とを含む。システムプログラムは、アクセス範囲を指定する情報が予め定められた複数の条件のいずれかと一致するときに、アクセス要求の実行を制限する処理を含む。 A controller for controlling a controlled object according to another aspect of the present invention includes one or a plurality of processors, a memory storing a system program and a user program, and a communication interface for communicating with a database unit. The controller is configured to control the control target by repeating the execution of the user program. The user program includes an access command for accessing the database unit. The access command includes information specifying an access range for accessing the database unit. When an access instruction is executed in accordance with the execution of the user program, the system program generates an access request for the database unit according to information specifying an access range, and executes an access request via a communication interface. including. The system program includes processing for restricting execution of an access request when information specifying an access range matches any of a plurality of predetermined conditions.
本発明のさらに別の局面に係れば、制御対象を制御するコントローラで実行されるユーザプログラムを生成する情報処理装置が提供される。コントローラは、データベース部と通信するための通信インターフェイスを含むとともに、ユーザプログラムに含まれるデータベース部にアクセスするためのアクセス命令の実行に応答して、アクセス要求を送信するように構成されている。情報処理装置は、ユーザプログラムに係るソースプログラムを作成するためのユーザインターフェイスを提供するユーザインターフェイス部と、ソースプログラムからユーザプログラムを生成するためのプログラム生成部とを含む。プログラム生成部は、ソースプログラムに含まれるアクセス命令の定義が予め定められた条件と一致するときに、ユーザプログラムの生成を制限または中止する。 According to still another aspect of the present invention, an information processing apparatus that generates a user program to be executed by a controller that controls a control target is provided. The controller includes a communication interface for communicating with the database unit, and is configured to transmit an access request in response to execution of an access command for accessing the database unit included in the user program. The information processing apparatus includes a user interface unit that provides a user interface for creating a source program related to the user program, and a program generation unit for generating a user program from the source program. The program generation unit restricts or cancels the generation of the user program when the definition of the access instruction included in the source program matches a predetermined condition.
本発明によれば、ユーザプログラムの実行によって、不適切なアクセス要求が生成および送信されてしまうことを防止できる。 According to the present invention, it is possible to prevent an inappropriate access request from being generated and transmitted due to execution of a user program.
本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。 Embodiments of the present invention will be described in detail with reference to the drawings. Note that the same or corresponding parts in the drawings are denoted by the same reference numerals and description thereof will not be repeated.
<A.概要>
まず、本実施の形態に係るコントローラの概要を機能面から説明する。以下の説明においては、機械や設備などの制御対象を制御するプログラマブルコントローラ(PLC)をコントローラの具現化例として説明を行う。但し、本発明に係るコントローラは、PLCに限られることなく、各種のコントローラや情報処理装置へ適用可能である。
<A. Overview>
First, an overview of the controller according to the present embodiment will be described from the functional aspect. In the following description, a programmable controller (PLC) that controls an object to be controlled such as a machine or equipment will be described as an embodiment of the controller. However, the controller according to the present invention is not limited to the PLC and can be applied to various controllers and information processing apparatuses.
図1は、本実施の形態に係るPLC100の機能的な概要を説明するための図である。図1を参照して、PLC100は、データベース装置400との間でデータの送受信が可能に構成される。つまり、PLC100およびデータベース装置400は、イーサネット(登録商標)などのネットワーク112を介して、データを互いに遣り取りできるように構成される。
FIG. 1 is a diagram for describing a functional outline of
より具体的には、PLC100は、命令実行部2と、アクセス処理部4と、通信インターフェイス6とを含む。これらのコンポーネントの一部または全部は、後述するようなプロセッサがプログラムを実行することで実現されてもよし、専用のハードウエアで実現されてもよい。すなわち、図1に示されるコンポーネントは、機能的な観点から模式的に表現したものであって、それぞれのコンポーネントの実現方法については、何ら限定されるものではない。
More specifically,
命令実行部2は、機械や装置などの制御対象の制御に係るユーザプログラム186を実行する。基本的には、命令実行部2は、ユーザプログラム186を周期的またはイベント的に実行する。すなわち、PLC100は、ユーザプログラム186の実行を繰返すことによって制御対象を制御するように構成されている。このユーザプログラム186は、典型的には、後述するようなサポート装置300で作成され、PLC100へ送信される。命令実行部2によって実行するユーザプログラム186が、データベース装置400にアクセスするための命令(アクセス命令)を含んでいる場合もあり、この場合には、このアクセス命令が実行されることで、データベース装置400へのアクセスを要求する内部コマンドがアクセス処理部4へ発行される。
The
アクセス処理部4は、データベース装置400へのアクセスを要求する内部コマンドを命令実行部2から受信すると、データベース装置400へのアクセス要求発行のために必要な内部コマンドを通信インターフェイス6へ発行される。つまり、アクセス処理部4は、ユーザプログラム186に含まれるデータベース装置400にアクセスするためのアクセス命令が命令実行部2によって実行されることに応答して、通信インターフェイス6にアクセス要求を送信させる。すなわち、システムプログラム188は、ユーザプログラム186の実行に伴ってアクセス命令が実行されると、アクセス範囲を指定する情報に従って、データベース装置400に対するアクセス要求を生成する処理と、アクセス要求を通信インターフェイス6を介して実行する処理とのための命令を含む。
When the
通信インターフェイス6は、アクセス処理部4からの内部コマンドに従って、データベース装置400と通信するために必要なコマンド(要求)を生成し、ネットワーク112を介して送信する。また、通信インターフェイス6は、データベース装置400などからネットワーク112を介して送信されたデータ(実行結果)を受信する。
The
図1に示すPLC100におけるデータベース装置へのアクセス要求を送信するまでの処理は、(1)命令実行部2によるユーザプログラム186の周期的/イベント実行、(2)ユーザプログラム186に含まれるアクセス命令の実行に応答した、アクセス処理部4によるアクセス要求発行のための内部コマンド発行、(3)アクセス処理部4からの内部コマンドの発行に応答した、通信インターフェイス6によるアクセス要求の送信、となる。
The processing until the access request to the database device in the
PLC100は、さらに、ユーザプログラム186に含まれるアクセス命令に従って生成されるアクセス要求が予め定められた条件と合致するときに、アクセス要求の送信を制限する制限部8を含む。すなわち、制限部8は、生成されたアクセス要求の内容、または、生成される予定のアクセス要求の内容が不適切または不正であるか否かを逐次判断し、その内容が不適切または不正であると判断すると、アクセス要求の送信を阻止する。
典型的には、制限部8は、送信を阻止すべきアクセス要求の内容を示す制限条件9を予め保持しており、アクセス要求の内容が制限条件9に定義されたいずれかの条件と合致するか否かを必要なタイミングで判断する。
Typically, the
制限部8は、上述したアクセス要求の送信に係る一連の手順のうち、適宜の段階または信号(コマンド)において、いずれかの条件と合致するか否かを判断する。言い換えれば、制限部8がアクセス要求の送信を制限するか否かを判断する段階および対象のデータについては、特に限定されることなく、実装に応じて適宜設計されればよい。すなわち、システムプログラム188は、アクセス範囲を指定する情報が予め定められた複数の条件のいずれかと一致するときに、アクセス要求の実行を制限する処理のための命令を含む。
The
より具体的には、(a)命令実行部2においてユーザプログラム186に含まれるアクセス命令が解釈されたタイミング、(b)ユーザプログラム186に含まれるアクセス命令の実行によって命令実行部2からアクセス処理部4へ内部コマンドが発行されたタイミング、(c)アクセス処理部4がアクセス要求発行のための内部コマンドを生成したタイミング、(d)アクセス処理部4から通信インターフェイス6へ内部コマンドが発行されたタイミング、(e)通信インターフェイス6がアクセス要求を発行するタイミング、といった段階および対象データに基づいて、対象のアクセス要求が制限対象であるか否かが判断されてもよい。
More specifically, (a) the timing at which the access instruction included in the
このような構成を採用することで、ユーザプログラム186および/またはユーザプログラム186が参照する変数(パラメータ)に誤りがある場合などに、不適切なアクセス要求が生成および送信されてしまうことを事前に防止できる。また、制限条件9の内容を適切に定義することで、データベース装置400への不正なアクセスなどを事前に防止することもできる。
By adopting such a configuration, an inappropriate access request is generated and transmitted in advance when the
以下、本実施の形態に係るPLC100およびそれに実装される機能について、より詳細に説明する。
Hereinafter,
<B.システム構成>
図2は、本実施の形態に係るPLC100を含む制御システム1のシステム構成を示す模式図である。図2を参照して、制御システム1は、PLC100と、PLC100に接続されるサポート装置300と、PLC100からのアクセスを受けるデータベース装置400とを含む。PLC100は、ユーザプログラムを周期的またはイベント的に実行する。このユーザプログラムに含まれるアクセス命令が実行されることで、データベース装置400への処理が実行される。
<B. System configuration>
FIG. 2 is a schematic diagram showing a system configuration of the
サポート装置300は、PLC100で実行されるユーザプログラムを生成する情報処理装置の典型例である。さらに、サポート装置300は、接続ケーブル114を介してPLC100に接続され、PLC100との間で各種パラメータの設定、プログラミング、モニタ、デバッグなどの機能を提供する。PLC100とサポート装置300との間は、典型的には、USB(Universal Serial Bus)規格に従って通信可能に構成される。
The
PLC100は、制御演算を実行するCPUユニット104と、1つ以上のIO(Input/Output)ユニット106とを含む。これらのユニットは、PLCシステムバス108を介して、データを互いに遣り取りできるように構成される。また、これらのユニットには、電源ユニット102によって適切な電圧の電源が供給される。
The
制御システム1において、PLC100は、(PLCシステムバス108を介して接続される)IOユニット106を介して、および/または、フィールドバス110を介して、各種のフィールド機器との間でデータを遣り取りする。これらのフィールド機器は、制御対象に対して何らかの処理を行うためのアクチュエータや、制御対象から各種情報を取得するためのセンサなどを含む。図2には、このようなフィールド機器の一例として、検出スイッチ10と、リレー20と、モータ32を駆動するサーボモータドライバ30とを含む。PLC100には、フィールドバス110を介してリモートIOターミナル200も接続されている。リモートIOターミナル200は、基本的には、IOユニット106と同様に、一般的な入出力処理に関する処理を行う。より具体的には、リモートIOターミナル200は、フィールドバス110でのデータ伝送に係る処理を行うための通信カプラ202と、1つ以上のIOユニット204とを含む。これらのユニットは、リモートIOターミナルバス208を介して、データを互いに遣り取りできるように構成される。
In the
<C.PLC100の構成>
次に、本実施の形態に係るPLC100の構成について説明する。図3は、本実施の形態に係るPLC100の主要部を示すハードウエア構成を示す模式図である。図4は、本実施の形態に係るPLC100のソフトウェア構成を示す模式図である。
<C. Configuration of
Next, the configuration of
図3を参照して、PLC100のCPUユニット104のハードウエア構成について説明する。CPUユニット104は、プロセッサ120と、チップセット122と、システムクロック124と、主メモリ126と、不揮発性メモリ128と、USBコネクタ130と、PLCシステムバスコントローラ140と、フィールドバスコントローラ150と、上位通信コントローラ160と、メモリカードインターフェイス170とを含む。チップセット122と他のコンポーネントとの間は、各種のバスを介してそれぞれ結合されている。
The hardware configuration of the
プロセッサ120およびチップセット122は、典型的には、汎用的なコンピュータアーキテクチャに準じて構成される。すなわち、プロセッサ120は、チップセット122から内部クロックに従って順次供給される命令コードを解釈して実行する。説明の便宜上、単一のプロセッサ120のみを例示するが、これらに限られることなく、任意の構成を採用できる。例えば、単一のコアを含むプロセッサを複数含む構成や、単一のプロセッサを複数含む構成、複数のコアを含むプロセッサを複数含む構成などを採用してもよい。つまり、本実施の形態に係るコントローラは、1または複数のプロセッサがプログラムを実行することで実現されてもよい。
The
チップセット122は、接続されている各種コンポーネントとの間で内部的なデータを遣り取りするとともに、プロセッサ120に必要な命令コードを生成する。システムクロック124は、予め定められた周期のシステムクロックを発生してプロセッサ120に提供する。チップセット122は、プロセッサ120での演算処理の実行の結果得られたデータなどをキャッシュする機能を有する。
The chip set 122 exchanges internal data with various connected components and generates instruction codes necessary for the
CPUユニット104は、記憶手段として、主メモリ126および不揮発性メモリ128を有する。主メモリ126は、揮発性の記憶領域であり、プロセッサ120で実行されるべき各種プログラムを保持するとともに、各種プログラムの実行時の作業用メモリとしても使用される。不揮発性メモリ128は、OS(Operating System)、システムプログラム、ユーザプログラム、データ定義情報、ログ情報などを不揮発的に保持する。
The
USBコネクタ130は、サポート装置300とCPUユニット104とを接続するためのインターフェイスである。典型的には、サポート装置300から転送される実行可能なプログラムなどは、USBコネクタ130を介してCPUユニット104に取込まれる。
The
CPUユニット104は、通信手段として、PLCシステムバスコントローラ140、フィールドバスコントローラ150、および上位通信コントローラ160を有する。これらの通信回路は、データの送信および受信を行う。
The
PLCシステムバスコントローラ140は、PLCシステムバス108を介したデータの遣り取りを制御する。より具体的には、PLCシステムバスコントローラ140は、バッファメモリ142と、PLCシステムバス制御回路144と、DMA(Dynamic Memory Access)制御回路146とを含む。PLCシステムバスコントローラ140は、PLCシステムバスコネクタ148を介してPLCシステムバス108と接続される。
The PLC
フィールドバスコントローラ150は、バッファメモリ152と、フィールドバス制御回路154と、DMA制御回路156とを含む。フィールドバスコントローラ150は、フィールドバスコネクタ158を介してフィールドバス110と接続される。上位通信コントローラ160は、バッファメモリ162と、上位通信制御回路164と、DMA制御回路166とを含む。上位通信コントローラ160は、上位通信コネクタ168を介してネットワーク112と接続される。
メモリカードインターフェイス170は、CPUユニット104に対して着脱可能なメモリカード172とプロセッサ120とを接続する。
The
次に、図4を参照して、本実施の形態に係るPLC100が提供する各種機能を実現するためのソフトウェア構成について説明する。これらのソフトウェアに含まれる命令コードは、適切なタイミングで読み出され、CPUユニット104のプロセッサ120によって実行される。
Next, a software configuration for realizing various functions provided by the
図4を参照して、CPUユニット104で実行されるソフトウェアとしては、OS180と、システムプログラム188と、ユーザプログラム186との3階層になっている。
Referring to FIG. 4, the software executed by
OS180は、プロセッサ120がシステムプログラム188およびユーザプログラム186を実行するための基本的な実行環境を提供する。
The
システムプログラム188は、PLC100としての基本的な機能を提供するためのソフトウェア群である。具体的には、システムプログラム188は、シーケンス命令ライブラリ190と、DB(データベース)アクセス処理ライブラリ191と、監視処理ライブラリ192と、入出力処理ライブラリ193と、Toolインターフェイス処理プログラム194と、スケジューラ195とを含む。
The
これに対して、ユーザプログラム186は、制御対象に対する制御目的に応じて任意に作成されたプログラムである。すなわち、ユーザプログラム186は、制御システム1を用いて制御する対象のライン(プロセス)などに応じて、任意に設計される。
On the other hand, the
ユーザプログラム186は、シーケンス命令ライブラリ190と協働して、ユーザにおける制御目的を実現する。すなわち、ユーザプログラム186は、シーケンス命令ライブラリ190によって提供される命令、関数、機能モジュールなどを利用することで、プログラムされた動作を実現する。そのため、ユーザプログラム186およびシーケンス命令ライブラリ190を「制御プログラム」と総称する場合もある。
The
これらのプログラムやライブラリなどは、不揮発性メモリ128に格納される。すなわち、不揮発性メモリ128は、システムプログラム188とユーザプログラム186とを格納するメモリに相当する。
These programs and libraries are stored in the
データ定義情報182は、ユーザプログラム186などが実行される際に、参照されるデータ(入力データ、出力データ、内部データ)をユニークな変数として扱うための定義を含む。稼動ログ184には、システムプログラム188およびユーザプログラム186の実行に伴って、予め定められた事象が発生した際に、当該発生した事象の情報が時刻情報と関連付けて格納される。すなわち、稼動ログ184には、システムプログラム188および/またはユーザプログラム186の実行に伴う各種情報がログ(履歴情報)として格納される。
The
以下、各プログラムについてより詳細に説明する。
シーケンス命令ライブラリ190は、ユーザプログラム186の実行に伴って、ユーザプログラム186内で指定されているシーケンス命令の実体を呼び出して、その命令の内容を実現するための命令コード群を含む。
Hereinafter, each program will be described in more detail.
The
DBアクセス処理ライブラリ191は、ユーザプログラム186の実行に伴って、データベース装置400にアクセスするために必要な処理を実現するための命令コード群を含む。DBアクセス処理ライブラリ191は、ユーザプログラム186において指定可能な命令に対応する実行コードを含む。
The DB
監視処理ライブラリ192は、本実施の形態に係るアクセス要求の制限機能を実現するためのプログラムである。監視処理ライブラリ192によって提供される機能の詳細については、後述する。
The
入出力処理ライブラリ193は、IOユニット106や各種のフィールド機器との間で、入力データの取得および出力データの送信を管理するためのプログラムである。
The input /
Toolインターフェイス処理プログラム194は、サポート装置300との間でデータを遣り取りするためのインターフェイスを提供する。
The Tool
スケジューラ195は、予め定められた優先度やシステムタイマの値などに従って、制御プログラムを実行するためのスレッドやプロシージャを生成する。
The
ユーザプログラム186は、上述したように、ユーザにおける制御目的(例えば、対象のラインやプロセス)に応じて作成される。ユーザプログラム186は、典型的には、CPUユニット104のプロセッサ120で実行可能なオブジェクトプログラム形式になっている。ユーザプログラム186は、サポート装置300などにおいて、ラダー形式やファンクションブロック形式で記述されたソースプログラムがコンパイルされることで生成される。そして、生成されたオブジェクトプログラム形式のユーザプログラムは、サポート装置300からCPUユニット104へ転送され、不揮発性メモリ128などに格納される。
As described above, the
上述の説明においては、プロセッサ120がメモリに格納されているユーザプログラム186の実行にあたって、システムプログラムを読み出し、システムプログラム内のDBアクセス処理ライブラリ191および監視処理ライブラリ192に含まれるプログラムを実行する形態について例示した。しかしながら、ユーザプログラム186で記述される、アクセス命令の実行を受けて、データベース装置に対するアクセス要求を送受信するプログラム(一例として、データベース接続サービス)、および、命令実行にあたってのデータベースにアクセスする範囲を指定する情報を監視するプログラム(一例として、監視サービス)を含む構成であれば、上述の実施の形態に限定されない。
In the above description, when the
<D.サポート装置300の構成>
次に、本実施の形態に係るサポート装置300について説明する。サポート装置300は、PLC100のCPUユニット104の使用を支援するためのものであり、PLC100との間で各種パラメータの設定、プログラミング、モニタ、デバッグなどの機能を提供する。
<D. Configuration of
Next, the
図5は、本実施の形態に係るPLC100に接続して用いられるサポート装置300のハードウエア構成を示す模式図である。サポート装置300は、典型的には、汎用のコンピュータで構成される。
FIG. 5 is a schematic diagram showing a hardware configuration of
図5を参照して、サポート装置300は、OSを含む各種プログラムを実行するCPU302と、BIOSや各種データを格納するROM(Read Only Memory)304と、CPU302でのプログラムの実行に必要なデータを格納するための作業領域を提供するメモリRAM306と、CPU302で実行されるプログラムなどを不揮発的に格納するハードディスク(HDD)308とを含む。より具体的には、ハードディスク308には、サポート装置300が提供する機能を実現するためのサポートプログラム330が格納されている。
Referring to FIG. 5, the
サポート装置300は、さらに、ユーザからの操作を受付けるキーボード310およびマウス312と、情報をユーザに提示するためのモニタ314とを含む。さらに、サポート装置300は、PLC100(CPUユニット104)などと通信するための通信インターフェイス(IF)318を含む。
サポート装置300で実行されるサポートプログラム330などは、典型的には、コンピュータ読取可能な記録媒体の一例である光学ディスク332に格納されて流通する。光学ディスク332に格納されたサポートプログラムは、光学ディスク読取装置316によって読み取られ、ハードディスク308などへ格納される。あるいは、上位のホストコンピュータなどからネットワークを通じてプログラムをダウンロードするように構成してもよい。
The
<E.データベース装置400の構成>
次に、本実施の形態に係るデータベース装置400について説明する。データベース装置400としては、データベースを提供する公知の構成を採用することができる。このようなデータベースとしては、リレーショナルデータ型やオブジェクトデータ型といった任意の構成を採用できる。データベース装置400は、汎用的なコンピュータアーキテクチャに従って構成されるため、ここではその詳細な説明は繰返さない。
<E. Configuration of
Next, the
データベース装置400は、PLC100からの接続要求やアクセス要求(リレーショナルデータ型では、SQL文)を受けて、必要な処理を実行し、その処理結果などをPLC100へ応答する。典型的には、SQL文によって、指定されたデータを指定された位置または範囲に書込む、指定された位置または範囲に格納されているデータを読出す、指定された位置または範囲に格納されているデータを削除する、といった処理が実行される。
The
上述の説明においては、データベースを提供する装置であるデータベース装置400を例示したが、このような構成に限定されることなく、各種の構成を採用できる。すなわち、データを保持する機能、アクセス要求に応じて処理を行う機能、処理結果をクライエントに応答する機能といった、データベースとしての基本的な機能を有する構成であれば、任意の構成を採用できる。そのため、単一の装置にデータベース機能に加えて、他の機能を有する構成や、複数の装置が連係して単一のデータベース機能を提供する構成などを採用できる。
In the above description, the
<F.アクセス要求の制限機能>
次に、本実施の形態に係るPLC100により提供されるアクセス要求の制限機能の実装例について説明する。
<F. Access request restriction function>
Next, an implementation example of the access request restriction function provided by the
図6は、本実施の形態に係るPLC100により提供されるアクセス要求の制限機能の実装例を説明するための模式図である。図6には、ユーザプログラム186においてデータベース装置400にアクセスするためのアクセス命令が定義されている例を示す。図6には、アクセス命令の一例として、格納されているデータを削除するための「DB_DELETE」命令を示すが、これに限られることなく、データベース装置400に送信する対象のデータやデータベース装置400のデータにアクセスする範囲(アクセス範囲)を指定される情報などを含む、様々な命令を指定できる。このように、アクセス命令は、データベース装置400にアクセスするアクセス範囲を指定する情報を含む。
FIG. 6 is a schematic diagram for explaining an implementation example of the access request restriction function provided by the
典型的には、ユーザがサポート装置300を操作して、ユーザプログラム186内でDBアクセス命令(DB_DELETE)を指定したとする。このユーザプログラム186が実行され、DBアクセス命令の実行タイミングになると、DBアクセス処理ライブラリ191(図4)の対応する命令コードが呼び出されて、データベース装置400へのアクセス要求を含むSQL文が生成および送信される。すなわち、システムプログラム188に含まれるDBアクセス処理ライブラリ191によって実現されるDB接続サービスが提供されており、ユーザプログラム186内のDBアクセス命令の実行に伴って、DB接続サービスがトリガーされる。そして、DB接続サービスは、SQL文を生成し、生成したSQL文をデータベース装置に対応するドライバソフトを介してデータベース装置に送信する。具体的には、DBアクセス機能は、上位通信コントローラ160(図3)およびDBアクセス処理ライブラリ191(図4)によって、DB接続サービスが生成したSQL文を、ネットワーク112を介してデータベース装置400へ送信する。
Typically, it is assumed that the user operates the
データベース装置400は、PLC100からのSQL文を受信すると、それに従って処理を実行し、必要に応じて、その結果をPLC100へ応答する。
When the
本実施の形態に係るPLC100では、さらに、DBアクセス命令の実行に伴って生成される(または、生成される予定の)SQL文が予め定められた制限条件と合致するときに、アクセス要求の送信を制限する機能(アクセス要求の制限機能)が実装される。このアクセス要求の制限機能は、システムプログラム188に含まれる監視処理ライブラリ192によって実現される監視サービスによって提供される。監視サービスは、図1に示す制限部8に相当し、DB接続サービスと連係して、アクセス要求のうち、その内容が不適切または不正であるものを検知し、その送信を制限する。
In
図6には、DB接続サービスとは独立に監視サービスを構成する例を示すが、DB接続サービスに含まれる一部の機能として監視サービスを実装してもよいし、その他の任意の実装形態を採用してもよい。但し、監視サービスは、ユーザプログラム186とは独立してPLC100に格納されるプログラム(あるいは、ライブラリ)として実装されることが好ましい。
FIG. 6 shows an example in which the monitoring service is configured independently of the DB connection service. However, the monitoring service may be implemented as a part of functions included in the DB connection service, or any other implementation form may be used. It may be adopted. However, the monitoring service is preferably implemented as a program (or library) stored in the
DB接続サービスおよび監視サービスは、処理の実行に応じて、その処理の内容を時刻情報と関連付けて(つまり、実行ログとして)稼動ログ184(図6に示す例では、メモリカード172に格納されるログファイル1842)に書込む。つまり、PLC100の稼動状況のログが保存される。DB接続サービスは、アクセス命令の実行に伴って、SQL文を生成および送信したときに、その内容を稼動ログ184に書込み、また、監視サービスは、生成されたSQL文が所定の制限条件に合致して送信が制限されたときに、その内容(例えば、いずれの制限条件に合致したのかという情報など)を稼動ログ184に書込む。
The DB connection service and the monitoring service are stored in the operation log 184 (in the example shown in FIG. 6, in the memory card 172) in association with the time information (that is, as an execution log) according to the execution of the process. Write to log file 1842). That is, a log of the operating status of the
サポート装置300は、稼動ログ184の内容を確認するための機能を有しており、何らかのエラーが発生した場合に、ユーザはそのサポート装置300の機能を利用して、エラーの原因や内容などを確認することができる。
The
<G.制限条件>
次に、本実施の形態に係るアクセス要求の制限機能で用いる制限条件の一例について説明する。
<G. Restriction conditions>
Next, an example of restriction conditions used in the access request restriction function according to the present embodiment will be described.
(g1:誤操作/誤処理の防止)
SQL文などのアクセス要求において、データベース装置400に格納されているデータの選択(SELECT命令)、データの更新(UPDATE命令)、データの削除(DELETE命令)などを実行する場合には、実行の対象となるデータの位置や範囲を指定する必要がある。このような命令を実行する際に、実行の対象となるデータの位置や範囲が指定されていないと、無条件に処理が実行されてしまう。この結果、データベース装置400に格納されているすべてのデータを誤って削除してしまったり、すべてのデータを誤って更新してしまったりする。
(G1: Prevention of erroneous operation / processing)
When an access request such as an SQL statement is executed to select data stored in the database device 400 (SELECT instruction), update data (UPDATE instruction), delete data (DELETE instruction), etc. It is necessary to specify the position and range of the data. When executing such an instruction, if the position or range of the data to be executed is not specified, the process is executed unconditionally. As a result, all data stored in the
特に、ユーザプログラム186において、これらの命令の対象となる位置や範囲について、変数(パラメータ)を用いて指定することもできる。例えば、正式稼動前の調整時やデバック時には、ユーザがサポート装置300を操作して、PLC100上のこれらの変数を任意に変更しつつ、その実行結果を確認するような手順が行われる。このような場合、ユーザが変数として誤った値を設定してしまうと、意図しないアクセス要求が生成および送信されてしまう。
In particular, in the
そこで、アクセス命令またはアクセス要求により定義されるアクセス対象の範囲として、無効な値が設定されているときに、アクセス要求の送信が制限される。より具体的には、アクセス対象の範囲として、「null」や「*(ワイルドカード)」が設定されているような場合に、アクセス要求の送信が制限される。 Therefore, when an invalid value is set as the access target range defined by the access command or access request, transmission of the access request is restricted. More specifically, transmission of an access request is restricted when “null” or “* (wild card)” is set as the access target range.
例えば、「Table1」という名前が付与されたデータベースのあるデータを削除するために、ユーザプログラム186において、(1)に示すようなアクセス命令が定義されているとする。ここで、(variable1)は、削除対象の範囲を指定する変数を意味する。
For example, it is assumed that an access command as shown in (1) is defined in the
DELETE (variable1) FROM Table1 …(1)
この変数の設定値に応じて、(1)のアクセス命令は、以下の(2)〜(4)に示すようなコマンドとして解釈され得る。
DELETE (variable1) FROM Table1 (1)
Depending on the setting value of this variable, the access instruction (1) can be interpreted as a command as shown in the following (2) to (4).
DELETE 100 FROM Table1 …(2)
DELETE (null) FROM Table1 …(3)
DELETE * FROM Table1 …(4)
これらのコマンドのうち、(2)については、例えば、削除対象が100番目のカラムであることが明示されており、すべてのデータを削除対象にはしないので、データベース装置400への送信が許可される。
DELETE 100 FROM Table1 (2)
DELETE (null) FROM Table1 (3)
DELETE * FROM Table1 (4)
Among these commands, for (2), for example, it is clearly indicated that the deletion target is the 100th column, and not all data is the deletion target, so transmission to the
一方、(3)および(4)については、すべてのデータが削除対象になり得るので、データベース装置400への送信が制限される。より具体的には、(3)については、アクセス要求によって削除されるデータの範囲が明示的に指定されていない(つまり、null(ヌル)コード)ので、すべてのデータが削除されてしまう可能性があり、送信が制限される。
On the other hand, regarding (3) and (4), since all data can be a deletion target, transmission to the
同様に、(3)については、アクセス要求によって削除されるデータの範囲がすべてに指定されている(つまり、*(ワイルドカード))ので、送信が制限される。 Similarly, regarding (3), since the range of data to be deleted by the access request is specified for all (that is, * (wild card)), transmission is restricted.
SELECT命令やUPDATE命令についても同様に、送信が制限される。このような対象の位置や範囲を指定するパラメータは、SQLにおいては、where句と呼ばれており、このwhere句の内容が監視される。 Similarly, transmission is restricted for the SELECT command and the UPDATE command. Such a parameter for designating the position and range of an object is called a where phrase in SQL, and the contents of the where phrase are monitored.
このように、送信を阻止すべきアクセス要求の内容を示す制限条件9としては、「アクセス対象の範囲として無効な値」が設定されているという条件を含む。この無効な値とは、nullコードやワイルドカードなどを含む。
As described above, the
(g2:不正操作/不正処理の防止)
命令の実行の対象となるデータの範囲を条件式としてユーザに指定させるように構成する場合においては、悪意のユーザが、データベース装置400からデータを抜き取るような操作を行うことも想定される。
(G2: Prevention of unauthorized operation / unauthorized processing)
In the case where the user is allowed to designate the range of data to be executed as an instruction as a conditional expression, it is also assumed that a malicious user performs an operation of extracting data from the
そこで、アクセス命令またはアクセス要求により定義されるアクセス対象を指定するための条件として、予め定められた不正な条件式が設定されているときに、アクセス要求の送信が制限される。より具体的には、常に成立する(真になる)ような条件式を含めてアクセス対象が定義されているような場合には、そのアクセス要求の送信が制限される。例えば、このような条件の一例としては、公知のセキュリティホールとして知られているInjectionがある。 Therefore, transmission of an access request is restricted when a predetermined illegal conditional expression is set as a condition for specifying an access target defined by an access command or an access request. More specifically, when an access target is defined including a conditional expression that always holds (becomes true), transmission of the access request is restricted. For example, as an example of such a condition, there is Injection known as a known security hole.
<H.処理手順>
次に、本実施の形態に係るPLC100により提供されるアクセス要求の制限機能の処理手順について説明する。図7は、本実施の形態に係るPLC100により提供されるアクセス要求の制限機能の処理手順を示すシーケンス図である。図7に示すシーケンス図においては、PLC100の内部処理に加えて、サポート装置300およびデータベース装置400との遣り取りについても示す。
<H. Processing procedure>
Next, the processing procedure of the access request restriction function provided by the
あるタイミングにおいて、ユーザがサポート装置300を操作して、PLC100が保持している変数(パラメータ)を変更する操作を行ったとする(シーケンスSQ100)。この操作に応答して、サポート装置300は、PLC100が保持している変数(パラメータ)を更新する(シーケンスSQ102)。
Assume that at a certain timing, the user operates
続いて、PLC100は、ユーザプログラム186を周期的またはイベント的に実行する。このとき、ユーザプログラム186において参照されている変数は、変数テーブルなどに格納されている値に更新される。つまり、PLC100の命令実行部は、PLC100(コントローラ)に接続されたサポート装置300(外部装置)から設定された値に従って、ユーザプログラム186を実行する。
Subsequently, the
ユーザプログラム186にアクセス命令が含まれている場合には、このアクセス命令が実行される(シーケンスSQ104)ことで、アクセス要求を指示する内部コマンドがシステムプログラム188によって提供されるDB接続サービスへ発行される(シーケンスSQ106)。すると、システムプログラム188によって提供される監視サービスは、その発行された内部コマンドによって指示されるアクセス要求の内容を判断する(シーケンスSQ108)。より具体的には、内部コマンドによって指示されるアクセス要求の内容が制限条件に定義されたいずれかの条件と合致するか否かを判断する。
If the
制限条件に定義されたいずれの条件とも合致しなければ(シーケンスSQ108において「OK」)、DB接続サービスは、データベース装置400に対して、アクセス命令に含まれるデータアクセス範囲に対するアクセス要求を発行し、アクセス要求をデータベース装置400へ送信する(シーケンスSQ110)。
If none of the conditions defined in the restriction conditions is met (“OK” in sequence SQ108), the DB connection service issues an access request for the data access range included in the access command to
データベース装置400は、受信したアクセス要求に従って処理を実行し、その実行結果をDB接続サービスへ返送する(シーケンスSQ116)。DB接続サービスは、その実行結果をユーザプログラム186の実行による戻り値として返す(シーケンスSQ118)。
また、DB接続サービスは、アクセス要求の送信および実行結果の受信に係る処理を示す履歴を稼動ログ184へ出力する(シーケンスSQ120)。 Further, the DB connection service outputs a history indicating processing related to transmission of the access request and reception of the execution result to the operation log 184 (sequence SQ120).
これに対して、制限条件に定義されたいずれかの条件と合致すれば(シーケンスSQ108において「NG」)、監視サービスは、アクセス要求の送信を遮断する(シーケンスSQ122)。そして、監視サービスは、アクセス要求の遮断に係る処理を示す履歴を稼動ログ184へ出力する(シーケンスSQ124)。 On the other hand, if any of the conditions defined in the restriction conditions is met ("NG" in sequence SQ108), the monitoring service blocks the transmission of the access request (sequence SQ122). Then, the monitoring service outputs a history indicating processing related to blocking of the access request to the operation log 184 (sequence SQ124).
その後、所定の周期または条件が成立することで、ユーザプログラム186が再実行される。このように、PLC100の制限部は、予め定められた制限条件と一致するか否かの判断を、ユーザプログラム186の実行毎に行う。
Thereafter, the
<I.その他の実施の形態>
本実施の形態に係るアクセス要求の制限機能を、PLC100のシステムプログラムの一部として実装する例について説明したが、サポート装置300においてユーザプログラム186を生成する機能の一部として実装してもよい。すなわち、ユーザが作成したユーザプログラム(ソースプログラム)を実行可能な形式に変換(コンパイル)する際の機能として、本実施の形態に係るアクセス要求の制限機能を実装してもよい。ここで、サポート装置300は、制御対象を制御するPLC100で実行されるユーザプログラム186を生成する情報処理装置に相当する。
<I. Other Embodiments>
The example in which the access request restriction function according to the present embodiment is implemented as a part of the system program of the
図8は、本実施の形態に係るアクセス要求の制限機能に搭載したサポート装置300における処理手順を示すフローチャートである。図8に示す各ステップは、典型的には、コンピュータがサポートプログラム330を実行することで実現される。
FIG. 8 is a flowchart showing a processing procedure in the
図8を参照して、サポート装置300は、ユーザからのユーザプログラム186の作成操作を受付ける(ステップS100)。ステップS100において、サポート装置300は、ユーザプログラムに係るソースプログラムを作成するためのユーザインターフェイスを提供する。より具体的には、サポート装置300は、ユーザプログラム186の作成に係る編集画面やデバッグ画面を表示するとともに、ユーザ操作を受付ける。
Referring to FIG. 8,
続いて、サポート装置300は、実行可能な形式のユーザプログラム186を生成(コンパイル)するようにユーザ操作を受けたか否かを判断する(ステップS102)。ユーザ操作を受けていなければ(ステップS102においてNO)、ステップS100以下の処理が繰返される。
Subsequently, the
これに対して、ユーザ操作を受けると(ステップS102においてYES)、サポート装置300は、作成されたユーザプログラム(ソースプログラム)を解釈(パース)する(ステップS104)。そして、サポート装置300は、作成されたユーザプログラム(ソースプログラム)に含まれるアクセス命令に従って生成されるアクセス要求が予め定められた条件(送信を阻止すべきアクセス要求の内容を示す制限条件)と合致するか否かを判断する(ステップS106)。
On the other hand, when a user operation is received (YES in step S102), the
アクセス要求が予め定められた条件と合致しなければ(ステップS106においてNO)、サポート装置300は、作成されたユーザプログラム(ソースプログラム)から実行可能な形式のユーザプログラム186を生成する(ステップS108)。すなわち、サポート装置300は、ソースプログラムからユーザプログラム186を生成する。そして、一連の処理は終了する。この処理の後、生成されたユーザプログラム186は、PLC100へ転送される。
If the access request does not match a predetermined condition (NO in step S106),
これに対して、アクセス要求が予め定められた条件と合致すれば(ステップS106においてYES)、サポート装置300は、実行可能な形式のユーザプログラム186の生成を制限または中止する(ステップS110)。併せて、サポート装置300は、作成されたユーザプログラム(ソースプログラム)の不備をユーザに対して通知してもよい。より具体的には、サポート装置300は、制限条件に定義されたいずれかの条件と合致するアクセス命令がユーザプログラム(ソースプログラム)に含まれる場合には、ユーザプログラム186を生成しない。あるいは、サポート装置300は、対象のアクセス命令を無視して、残りの部分のみを含むユーザプログラム186を生成してもよい。
On the other hand, if the access request matches a predetermined condition (YES in step S106),
つまり、サポート装置300のプログラム生成部は、ソースプログラムに含まれるアクセス命令の定義が予め定められた条件と一致するときに、ユーザプログラム186の生成を制限または中止する。そして、一連の処理は終了する。
That is, the program generation unit of the
<J.利点>
本実施の形態によれば、何らかの理由によって、データベース装置に対して不適切なアクセス要求が生成および送信されてしまうことを事前に防止できる。これによって、ユーザのミスや意図的なアクセスによってデータベース装置に格納されているデータの破損や不正アクセスを防止できる。
<J. Advantage>
According to the present embodiment, it is possible to prevent an inappropriate access request from being generated and transmitted to the database device for some reason. As a result, it is possible to prevent data stored in the database device from being damaged or illegally accessed due to a user error or intentional access.
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time should 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.
1 制御システム、10 検出スイッチ、20 リレー、30 サーボモータドライバ、32 モータ、100 PLC、102 電源ユニット、104 CPUユニット、106 IOユニット、108 PLCシステムバス、110 フィールドバス、112 ネットワーク、114 接続ケーブル、120 プロセッサ、122 チップセット、124 システムクロック、126 主メモリ、128 不揮発性メモリ、130 USBコネクタ、140 PLCシステムバスコントローラ、142,152,162 バッファメモリ、144 PLCシステムバス制御回路、146,156,166 DMA制御回路、148 PLCシステムバスコネクタ、150 フィールドバスコントローラ、154 フィールドバス制御回路、158 フィールドバスコネクタ、160 上位通信コントローラ、164 上位通信制御回路、168 上位通信コネクタ、170 メモリカードインターフェイス、172 メモリカード、180 OS、182 データ定義情報、184 稼動ログ、1842 ログファイル、186 ユーザプログラム、188 システムプログラム、190 シーケンス命令ライブラリ、191 DB(データベース)アクセス処理ライブラリ、192 監視処理ライブラリ、193 入出力処理ライブラリ、194 Toolインターフェイス処理プログラム、195 スケジューラ、200 リモートIOターミナル、202 通信カプラ、208 ターミナルバス、300 サポート装置、302 CPU、304 ROM、306 RAM、308 ハードディスク、310 キーボード、312 マウス、314 モニタ、316 光学ディスク読取装置、330 サポートプログラム、332 光学記録媒体、400 データベース装置。 1 control system, 10 detection switch, 20 relay, 30 servo motor driver, 32 motor, 100 PLC, 102 power supply unit, 104 CPU unit, 106 IO unit, 108 PLC system bus, 110 field bus, 112 network, 114 connection cable, 120 processor, 122 chipset, 124 system clock, 126 main memory, 128 non-volatile memory, 130 USB connector, 140 PLC system bus controller, 142, 152, 162 buffer memory, 144 PLC system bus control circuit, 146, 156, 166 DMA control circuit, 148 PLC system bus connector, 150 field bus controller, 154 field bus control circuit, 158 feel Bus connector, 160 host communication controller, 164 host communication control circuit, 168 host communication connector, 170 memory card interface, 172 memory card, 180 OS, 182 data definition information, 184 operation log, 1842 log file, 186 user program, 188 system Program, 190 sequence instruction library, 191 DB (database) access processing library, 192 monitoring processing library, 193 input / output processing library, 194 Tool interface processing program, 195 scheduler, 200 remote IO terminal, 202 communication coupler, 208 terminal bus, 300 Support device, 302 CPU, 304 ROM, 306 RAM, 308 hard disk, 310 Bodo, 312 mouse, 314 monitor, 316 optical disc reader, 330 support program, 332 an optical recording medium, 400 the database device.
Claims (7)
データベース部と通信するための通信インターフェイスと、
前記制御対象の制御に係るユーザプログラムを実行する命令実行部と、
前記ユーザプログラムに含まれる前記データベース部にアクセスするためのアクセス命令が前記命令実行部によって実行されることに応答して、前記通信インターフェイスにアクセス要求を送信させるアクセス処理部と、
前記ユーザプログラムに含まれるアクセス命令に従って生成されるアクセス要求が予め定められた条件と一致するときに、前記アクセス要求の送信を制限する制限部とを備える、コントローラ。 A controller for controlling a controlled object,
A communication interface for communicating with the database unit;
An instruction execution unit for executing a user program related to the control of the control target;
An access processing unit for transmitting an access request to the communication interface in response to an access command for accessing the database unit included in the user program being executed by the command execution unit;
A controller comprising: a restriction unit that restricts transmission of the access request when an access request generated according to an access command included in the user program matches a predetermined condition.
前記制限部は、前記予め定められた条件と一致するか否かの判断を、前記ユーザプログラムの実行毎に行う、請求項1に記載のコントローラ。 The instruction execution unit executes the user program according to a value set from an external device connected to the controller,
2. The controller according to claim 1, wherein the restriction unit determines whether or not the predetermined condition matches with the predetermined condition every time the user program is executed.
1または複数のプロセッサと、
システムプログラムとユーザプログラムとを格納するメモリと、
データベース部と通信するための通信インターフェイスとを備え、
前記コントローラは、前記ユーザプログラムの実行を繰返すことによって制御対象を制御するように構成されており、
前記ユーザプログラムは、前記データベース部にアクセスするためのアクセス命令を含み、
前記アクセス命令は、前記データベース部にアクセスするアクセス範囲を指定する情報を含み、
前記システムプログラムは、前記ユーザプログラムの実行に伴って前記アクセス命令が実行されると、前記アクセス範囲を指定する情報に従って、前記データベース部に対するアクセス要求を生成する処理と、前記アクセス要求を前記通信インターフェイスを介して実行する処理とを含み、
前記システムプログラムは、前記アクセス範囲を指定する情報が予め定められた複数の条件のいずれかと一致するときに、前記アクセス要求の実行を制限する処理を含む、コントローラ。 A controller for controlling a controlled object,
One or more processors;
Memory for storing system programs and user programs;
A communication interface for communicating with the database unit;
The controller is configured to control an object to be controlled by repeating execution of the user program,
The user program includes an access command for accessing the database unit,
The access instruction includes information specifying an access range for accessing the database unit,
When the access command is executed along with the execution of the user program, the system program generates a request for access to the database unit in accordance with information specifying the access range; And processing to be executed via
The system program includes a process of restricting execution of the access request when information specifying the access range matches any of a plurality of predetermined conditions.
前記コントローラは、データベース部と通信するための通信インターフェイスを含むとともに、前記ユーザプログラムに含まれる前記データベース部にアクセスするためのアクセス命令の実行に応答して、アクセス要求を送信するように構成されており、
前記情報処理装置は、
前記ユーザプログラムに係るソースプログラムを作成するためのユーザインターフェイスを提供するユーザインターフェイス部と、
前記ソースプログラムから前記ユーザプログラムを生成するためのプログラム生成部とを備え、
前記プログラム生成部は、前記ソースプログラムに含まれる前記アクセス命令の定義が予め定められた条件と一致するときに、前記ユーザプログラムの生成を制限または中止する、情報処理装置。 An information processing apparatus that generates a user program to be executed by a controller that controls a control target,
The controller includes a communication interface for communicating with a database unit, and is configured to transmit an access request in response to execution of an access command for accessing the database unit included in the user program. And
The information processing apparatus includes:
A user interface unit that provides a user interface for creating a source program related to the user program;
A program generation unit for generating the user program from the source program,
The information processing apparatus, wherein the program generation unit restricts or cancels the generation of the user program when a definition of the access instruction included in the source program matches a predetermined condition.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013027892A JP6171385B2 (en) | 2013-02-15 | 2013-02-15 | Controller and information processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2013027892A JP6171385B2 (en) | 2013-02-15 | 2013-02-15 | Controller and information processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014157483A JP2014157483A (en) | 2014-08-28 |
JP6171385B2 true JP6171385B2 (en) | 2017-08-02 |
Family
ID=51578323
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013027892A Active JP6171385B2 (en) | 2013-02-15 | 2013-02-15 | Controller and information processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6171385B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020095672A (en) | 2018-11-28 | 2020-06-18 | オムロン株式会社 | Controller system |
JP7251171B2 (en) * | 2019-01-30 | 2023-04-04 | オムロン株式会社 | Controller system, control unit and control program |
JP7423920B2 (en) * | 2019-07-03 | 2024-01-30 | オムロン株式会社 | Control systems, configuration devices and computer programs |
JP7331507B2 (en) * | 2019-07-08 | 2023-08-23 | オムロン株式会社 | Controller, control system and control method |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002023812A (en) * | 2000-07-05 | 2002-01-25 | Mitsubishi Materials Corp | Automatic control system and automatic control method |
JP2005293196A (en) * | 2004-03-31 | 2005-10-20 | Dainippon Printing Co Ltd | Database access controller and control method, customer information database system |
JP2007004685A (en) * | 2005-06-27 | 2007-01-11 | Hitachi Ltd | Communication information monitoring device |
JP2008287524A (en) * | 2007-05-17 | 2008-11-27 | Canon Inc | Authentication method, authentication device, and program |
JP5491060B2 (en) * | 2009-04-20 | 2014-05-14 | シャープ株式会社 | Communication speed setting apparatus, communication speed setting apparatus control method, content filtering system, communication speed setting apparatus control program, and computer-readable recording medium |
JP5501156B2 (en) * | 2010-08-23 | 2014-05-21 | キヤノン株式会社 | Information processing apparatus, information processing method, and program |
JP5584588B2 (en) * | 2010-10-27 | 2014-09-03 | 株式会社エヌ・ティ・ティ・データ | Database processing apparatus, database processing system, database processing method, and program |
-
2013
- 2013-02-15 JP JP2013027892A patent/JP6171385B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2014157483A (en) | 2014-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5039428B2 (en) | Programmable controller and PLC system | |
JP6357770B2 (en) | Control device and communication control method | |
JP6171386B2 (en) | Controller, information processing apparatus and program | |
JP6171387B2 (en) | Controller, information processing apparatus and program | |
JP2018525697A (en) | Method and environment for safely executing program instructions | |
CN109964181B (en) | Controller for an industrial automation device and method for programming and operating such a controller | |
US9898388B2 (en) | Non-intrusive software verification | |
JP6171385B2 (en) | Controller and information processing apparatus | |
JP6945646B2 (en) | Responsive failover of industrial programmable logic controllers | |
CN107430659B (en) | Method and device for processing and transmitting data in a functionally secure electrical, electronic and/or programmable electronic system | |
JP6442131B2 (en) | Control system and control device | |
US20120310379A1 (en) | Programmable controller | |
JP6135247B2 (en) | Information processing apparatus and information processing program | |
EP3104236A1 (en) | Control device, control system, support apparatus, and control-device maintenance management method | |
CN114641735B (en) | System and method for managing drive components | |
JP6455096B2 (en) | Control system, its support device, programmable control device | |
JP6705464B2 (en) | Control device and communication control method | |
CN114072738B (en) | Controller, control system and control method | |
JP6680313B2 (en) | Control device and communication control method | |
CN105278497A (en) | Industrial control system and method for transferring data | |
US10621312B2 (en) | Method for operating a computer system to authorize use of software on a process computer | |
JP6357769B2 (en) | Control device and communication control method | |
KR101539253B1 (en) | A PLC device provided with a function for managing program quality | |
CN119658657A (en) | Teaching method, system, device and robot | |
WO2023166820A1 (en) | Information processing system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160108 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20161110 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20161122 |
|
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: 20170606 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170619 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6171385 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 |