JP7294391B2 - Controller, control method and program - Google Patents
Controller, control method and program Download PDFInfo
- Publication number
- JP7294391B2 JP7294391B2 JP2021189951A JP2021189951A JP7294391B2 JP 7294391 B2 JP7294391 B2 JP 7294391B2 JP 2021189951 A JP2021189951 A JP 2021189951A JP 2021189951 A JP2021189951 A JP 2021189951A JP 7294391 B2 JP7294391 B2 JP 7294391B2
- Authority
- JP
- Japan
- Prior art keywords
- communication
- program
- data
- controller
- external device
- 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
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Programmable Controllers (AREA)
Description
本開示は、プログラマブルロジックコントローラ(PLC:Programmable Logic Controller)等のコントローラ、制御方法およびプログラムに関し、特に、コントローラと外部装置との通信を実施する通信部が多重化されたコントローラ、制御方法およびプログラムに関する。 The present disclosure relates to a controller such as a programmable logic controller (PLC: Programmable Logic Controller), a control method, and a program, and more particularly to a controller, a control method, and a program having multiplexed communication units that perform communication between the controller and an external device. .
PLC等のコントローラは、工場などの自動機械の制御などに用いられ、複数の入出力機能を有して、例えば、センサ等から出力される値を逐次、読みこんでデータを保持する。近年、PLCは、データベースシステム等の外部装置と接続して、PLCで保持しているデータを、データベースシステムに蓄積する。これにより、データベースに接続する情報処理装置同士でのデータの共有を容易にしたり、各種データを収集して、データの集計や解析などを容易にしたりすることができる。 Controllers such as PLCs are used to control automatic machines in factories and the like, have a plurality of input/output functions, and for example, sequentially read values output from sensors and the like and store data. In recent years, a PLC is connected to an external device such as a database system, and stores data held in the PLC in the database system. This makes it possible to easily share data between information processing apparatuses connected to the database, collect various data, and facilitate aggregation and analysis of the data.
例えば特開2014-194592号公報(特許文献1)では、機器監視端末が、複数の通信仲介機器を接続する設定情報管理装置と接続する。各通信仲介機器は、複数の通信対応機器を接続する。機器監視端末は、設定情報管理装置を介して通信仲介機器を管理する。 For example, in Japanese Unexamined Patent Application Publication No. 2014-194592 (Patent Document 1), a device monitoring terminal connects to a setting information management device that connects a plurality of communication mediating devices. Each communication mediating device connects a plurality of communication-enabled devices. The equipment monitoring terminal manages the communication mediation equipment via the setting information management device.
また、特開2014-078253号公報(特許文献2)は、ホストコンピュータ上で実行する構成ツールソフトウェアを使用して、フィールド機器を構成する。ホストコンピュータは、構成ツールを用いて複数のフィールド機器にメッセージを送信し、また設定を転送する。 Japanese Patent Laying-Open No. 2014-078253 (Patent Document 2) configures a field device using configuration tool software that runs on a host computer. The host computer uses the configuration tool to send messages and transfer settings to multiple field devices.
PLC等のコントローラが、データベースシステム等の外部装置と通信し、データを集計する場合は、コントローラの信頼性を維持するために、データの消失がなく集計することが望まれる。特許文献1は、複数の通信仲介機器を備えることで通信機器を冗長または多重化した構成を備えるが、PLC等の既存のハードウェア設備に、特許文献1の多重化の構成を組み入れる場合は、PLCを含む設備の交換が必要となる。 When a controller such as a PLC communicates with an external device such as a database system and aggregates data, it is desired that the data be aggregated without data loss in order to maintain the reliability of the controller. Patent Document 1 has a configuration in which communication devices are redundant or multiplexed by providing a plurality of communication mediating devices. Replacement of equipment including PLC is required.
本開示は、既存の設備を活かしつつ、コントローラ内において外部装置との通信機能が多重化された環境を提供することを目的とする。 An object of the present disclosure is to provide an environment in which communication functions with external devices are multiplexed within a controller while utilizing existing equipment.
この開示に係るコントローラは、複数の通信プログラムを実行する通信プログラム実行部と、制御対象を制御するためのユーザープログラムであって、外部装置と通信するための命令を含むユーザープログラムを実行するためのユーザープログラム実行部と、複数の通信プログラムのいずれにも接続可能に構成されて、複数の通信プログラムと外部装置との通信を制御する通信インターフェイスと、ユーザープログラム実行部による命令の実行時に、ユーザープログラム実行部から外部装置と通信するデータを受付け、当該データの宛先に基づき、複数の通信プログラムのうちから当該データを外部装置に送信する通信プログラムを決定する決定部と、を備える。 A controller according to this disclosure includes a communication program execution unit that executes a plurality of communication programs, and a user program for controlling a controlled object, the user program including instructions for communicating with an external device. a user program execution unit; a communication interface configured to be connectable to any of a plurality of communication programs and controlling communication between the plurality of communication programs and an external device; a determination unit that receives data to be communicated with the external device from the execution unit, and determines a communication program for transmitting the data to the external device from among a plurality of communication programs based on the destination of the data.
この開示によれば、コントローラ内において、コントローラが有する通信インターフェイスを共用しながら、外部装置と通信する複数のプログラムが備えられる。これにより、コントローラ内で外部装置と通信するための多重化された通信環境が提供される。 According to this disclosure, the controller includes a plurality of programs that communicate with an external device while sharing the communication interface of the controller. This provides a multiplexed communication environment for communicating with external devices within the controller.
上述の開示において、各通信プログラムについて、通信スタックが備えられてもよい。 In the above disclosure, a communication stack may be provided for each communication program.
この開示によれば、通信スタックが、各通信プログラムについて個別に備えられることで、通信スタックレベルでの上記に述べた多重化が可能となる。 According to this disclosure, a separate communication stack is provided for each communication program, thereby enabling the above-described multiplexing at the communication stack level.
上述の開示において、決定部は、各通信プログラムの実行状態と上記の宛先に基づき、複数の通信プログラムのうちからデータを外部装置に送信する通信プログラムを決定してもよい。 In the above disclosure, the determination unit may determine a communication program for transmitting data to the external device from among the plurality of communication programs based on the execution status of each communication program and the destination.
この開示によれば、データの宛先に基づき、複数の通信プログラムのうちから、当該データを外部装置に送信するための通信プログラムを決定することができる。 According to this disclosure, a communication program for transmitting the data to the external device can be determined from among a plurality of communication programs based on the destination of the data.
上述の開示において、決定部は、宛先に基づく通信プログラムの実行状態が予め定められた条件を満たすとき、当該通信プログラムを、データを外部装置に送信する通信プログラムとして決定してもよい。 In the above disclosure, the determination unit may determine the communication program as the communication program for transmitting data to the external device when the execution state of the destination-based communication program satisfies a predetermined condition.
この開示によれば、データを外部装置に送信するための通信プログラムを、データの宛先と通信プログラムの実行状態とに基づいて決定することができる。 According to this disclosure, a communication program for transmitting data to an external device can be determined based on the destination of the data and the execution status of the communication program.
上述の開示において、通信プログラムの実行状態は、実行中における当該通信プログラムの通信の応答性能により示されてもよい。 In the above disclosure, the execution state of the communication program may be indicated by the communication response performance of the communication program during execution.
この開示によれば、通信プログラムの応答性能を、当該通信プログラムの実行状態によって示すことができる。 According to this disclosure, the response performance of the communication program can be indicated by the execution state of the communication program.
上述の開示において、予め定められた条件は、応答性能の閾値を含み、当該閾値は、応答性能に関連した通信特徴量を用いた機械学習により決定してもよい。 In the above disclosure, the predetermined condition includes a response performance threshold, and the threshold may be determined by machine learning using communication feature values related to response performance.
この開示によれば、応答性能を評価するための閾値を、応答性能に関連した通信特徴量を用いた機械学習で決定することができる。 According to this disclosure, a threshold for evaluating response performance can be determined by machine learning using communication feature values related to response performance.
上述の開示において、決定部は、宛先に基づく通信プログラムの実行状態が予め定められた条件を満たさないとき、他の通信プログラムを、データを外部装置に送信する通信プログラムとして決定してもよい。 In the above disclosure, the determination unit may determine another communication program as the communication program for transmitting data to the external device when the execution state of the communication program based on the destination does not satisfy a predetermined condition.
この開示によれば、宛先に基いて決定された通信プログラムの実行状態が予め定められた条件を満たさなければ、他の通信プログラムによりデータを外部装置に送信することができる。 According to this disclosure, if the execution state of the communication program determined based on the destination does not satisfy a predetermined condition, data can be transmitted to the external device by another communication program.
上述の開示において、決定部は、宛先に基づく通信プログラムの実行状態が予め定められた条件を満たさないとき、データを格納部に出力してもよい。 In the above disclosure, the determination unit may output data to the storage unit when the execution status of the destination-based communication program does not satisfy a predetermined condition.
この開示によれば、宛先に基づく通信プログラムの実行状態が予め定められた条件を満たさないときは、データを格納しておくことで保存することが可能となる。 According to this disclosure, when the execution state of the destination-based communication program does not satisfy a predetermined condition, data can be saved by storing it.
上述の開示において、宛先に基づく通信プログラムの種類と、上記の所定の通信プログラムの種類とは異なり、通信プログラムの種類は、当該通信プログラムがデータを伝送するための通信プロトコルの種類に対応してもよい。 In the above disclosure, unlike the destination-based communication program type and the predetermined communication program type described above, the communication program type corresponds to the communication protocol type for the communication program to transmit data. good too.
この開示によれば、データの宛先に基づいた種類の通信プログラムとは異なる種類の通信プログラムを用いて、すなわち異なる伝送プロトコルに従いデータを外部装置に送信することが可能になる。 This disclosure allows data to be sent to an external device using a different type of communication program, ie, according to a different transmission protocol, than the type of communication program based on the destination of the data.
上述の開示において、外部装置は、データベースサーバーまたはデータベースサーバーとコントローラとの通信を制御する通信部を含み、通信プロトコルの種類は、当該データベースサーバーに接続するための通信プロトコルを含んでもよい。 In the above disclosure, the external device may include a database server or a communication unit that controls communication between the database server and the controller, and the type of communication protocol may include a communication protocol for connecting to the database server.
この開示によれば、コントローラは、上記の多重化された通信環境として、ユーザープログラムからのデータを用いてデータベースへアクセスするための通信環境、またはデータベースサーバーとコントローラとの通信を制御する通信部を中継することによるデータベースへアクセスするための通信環境を提供することが可能となる。 According to this disclosure, the controller has, as the multiplexed communication environment, a communication environment for accessing the database using data from the user program, or a communication unit that controls communication between the database server and the controller. It is possible to provide a communication environment for accessing the database by relaying.
本開示の一例によれば、外部装置と接続するための通信インターフェイスを備えたコントローラによる制御方法が提供される。制御方法は、制御対象を制御するためのユーザープログラムであって、外部装置と通信するための命令を含むユーザープログラムを実行するステップと、通信インターフェイスを介した外部装置との通信を制御する複数の通信プログラムを実行するステップと、命令の実行時に、ユーザープログラムか外部装置と通信するデータを受付け、データの宛先に基づき、複数の通信プログラムのうちからデータを外部装置に送信する通信プログラムを決定するステップ、とを備える。 According to one example of the present disclosure, a control method is provided by a controller having a communication interface for connecting with an external device. A control method includes a step of executing a user program for controlling a control target, the user program including instructions for communicating with an external device, and a plurality of processes for controlling communication with the external device via a communication interface. a step of executing a communication program; receiving data to be communicated with a user program or an external device when executing an instruction; and determining, from among a plurality of communication programs, a communication program for transmitting data to the external device based on the destination of the data. step.
この開示によれば、コントローラ内において、外部装置と通信するための複数のプログラムが備えられることで、コントローラ内で外部装置と通信するための多重化された通信環境が提供される。 According to this disclosure, a plurality of programs for communicating with an external device are provided within the controller, thereby providing a multiplexed communication environment for communicating with the external device within the controller.
本開示の一例によれば、上記に述べた制御方法をコンピュータに実行させるためのプログラムが提供される。 According to an example of the present disclosure, there is provided a program for causing a computer to execute the control method described above.
本開示の一例によれば、コントローラ内において、外部装置と通信するための複数のプログラムが備えられることで、コントローラ内で外部装置と通信するための多重化された通信環境が提供される。 According to an example of the present disclosure, a plurality of programs for communicating with external devices are provided within the controller to provide a multiplexed communication environment for communicating with the external devices within the controller.
本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰返さない。 Embodiments of the present invention will be described in detail with reference to the drawings. The same or corresponding parts in the drawings are denoted by the same reference numerals, and the description thereof will not be repeated.
<A.適用例>
まず、図1を参照して、本発明が適用される場面の一例について説明する。図1は、本実施の形態に係るコントローラの適用場面の一例を示す模式図である。PLC100は、本実施の形態に係る制御システムのコントローラの一例である。コントローラ(例えば、PLC100)は、1または複数の外部装置(例えば、サーバー400)と接続するための通信インターフェイス(例えば、上位通信コントローラ160)と、制御対象を制御するためのユーザープログラム186であって、外部装置と通信するための命令を含む当該ユーザープログラム186を実行するためのユーザープログラム実行部(例えば、CPUユニット104)と、通信インターフェイスを介した外部装置との通信を制御する複数の通信プログラム(例えば、通信クライン(X)プログラム181,通信クライアント(Y)プログラム182)を実行する通信プログラム実行部(例えば、CPUユニット104)と、割付部188とを備える。
<A. Application example>
First, with reference to FIG. 1, an example of a scene to which the present invention is applied will be described. FIG. 1 is a schematic diagram showing an example of an application scene of a controller according to this embodiment.
通信クライアント(X)プログラム181と通信クライアント(Y)プログラム182とは、実行されることにより、同じ通信機能を提供する。例えば、通信クライアント(Y)プログラム182は、通信クライアント(X)プログラム181をコピーすることにより作成される。
The communication client (X)
図1の制御システムでは、例えばサーバークライアントシステムが適用され得る。クライアントとしてのPLC100は、アプリケーション層のユーザープログラム186を実行しながら、物理層にある電気的な通信回路に相当する通信インターフェイス(例えば、上位通信コントローラ160)を介して、例えばTCP/IP(Transmission Control Protocol/Internet Protocol)に従い外部装置のサーバー400と通信する。
In the control system of FIG. 1, for example, a server-client system can be applied. The
PLC100内では、アプリケーション層と物理層との間の層において、例えばセッション層において、割付部188および通信クライアント(X)181,通信クライアント(Y)182を備えている。PLC100内では、このように階層化を採用することで、各層のプログラムまたはモジュール(回路を含む)を他の層から分離することができる。
In the
PLC100は、例えば汎用のコンピュータが適用され得る。ユーザープログラム186は、汎用のコンピュータが備えるOS(Operating System)(より典型的にはリアルタイムOS)のもとで実行されて、各種のフィールド機器との間でデータを遣り取りする。これらのフィールド機器は、制御対象に対して何らかの処理を行うためのアクチュエータまたは制御対象から情報を取得するためのセンサ等を含む。
A general-purpose computer, for example, may be applied to the
割付部188は、ユーザープログラム実行部による命令の実行時に、ユーザープログラム実行部からサーバー400と通信するデータを受付け、データの宛先に基づき、複数の通信プログラムのうちからデータをサーバー400に送信するための通信プログラムを決定する「決定部」の一実施例である。割付部188は、典型的にはソフトウェア(プログラム)により提供される。
The
このように本実施の形態では、PLC100の内部において、実行されることで同じ通信機能を提供する複数の通信プログラムを備えることが可能となる。これにより、PLC100に、複数の通信機器を接続せずとも、PLC100内においてサーバー400との通信手段を多重化(または冗長化)することができる。また、既存のPLC100に複数の通信プログラムおよび決定部(割付部188)のプログラムをインストールすることで、PLC100等の機器を交換することなく既存の設備を活かしつつ、PLC100内において上記の多重化を実現することが可能となる。
As described above, in the present embodiment, it is possible to provide a plurality of communication programs that provide the same communication function by being executed inside the
また、図1のPLC100は、複数の通信プログラム(通信クライアント(X)181,通信クライアント(Y)182)が1個の通信インターフェイスを共用するよう構成される。すなわち、1個の通信インターフェイスが複数の通信プログラムのいずれにも接続可能に構成されて、複数の通信プログラムとサーバー400の通信を制御する。これにより、PLC100内における通信手段の多重化の構成を、PLC100の通信インターフェイス160等の回路点数の増加を伴わずに実現することができる。
The
また、本実施の形態では、PLC100は、複数の通信プログラムを、データの宛先によって切替えながら使用することが可能となり、PLC100とサーバー400の間での通信にかかる負荷を、複数の通信プログラム間で分散し得る環境も提供し得る。
In addition, in this embodiment, the
上記のサーバー400は、例えば各種のサーバーを含み得る。サーバー400には、データベースサーバーが含まれ得る。ユーザープログラム186からのデータは、このデータベースサーバーにアクセスするためのデータベース操作命令(SQL文等)を含み得る。また、データには、当該データを伝送するためにユーザープログラム186が指定したプロトコル(例えば、FTP(File Transfer Protocol)等)が含まれ得る。これのSQL文または伝送プロトコルは、データの種類を示し得る。
The
また、割付部188は、各通信プログラムの実行状態に基づき、複数の通信プログラムのうちから、データをサーバー400に送信する通信プログラムを決定する。この実行状態は、各通信プログラムについて測定される通信の応答性能により示され得て、この応答性能は、通信プログラムの実行中に、すなわちデータを送信する場合に測定され得る。
Also, the
通信プログラムの応答性能としては、例えば通信プログラムの応答時間が含まれ得る。応答時間は、例えば、通信プログラムにデータ通信の要求をしてから要求に対する応答(Ack)を受信するまでの所要時間を測定することで取得され得る。または、通信プログラムにデータを送信し、それに対する応答(例えば、データをサーバー400に送信完了した旨の応答)を受信するまでの所要時間を測定することにより取得され得る。本実施の形態では、例えば、割付部188が有する監視部189により、各通信プログラムについて、この応答性能(応答時間)が測定され得る。
The response performance of the communication program may include, for example, the response time of the communication program. The response time can be obtained, for example, by measuring the time required from sending a request for data communication to the communication program until receiving a response (Ack) to the request. Alternatively, it can be obtained by measuring the time required to send data to a communication program and receive a response (for example, a response to the effect that the data has been sent to the server 400). In this embodiment, for example, the
PLC100では、各通信プログラムについて、通信スタック(図4の通信スタック191,192)が個別に備えられる。通信スタックは、1種のメモリ領域であり、例えばPLC100の不揮発性メモリの一部に相当する。このように、通信プログラム毎に通信スタックを備えることで、通信スタックレベルでの多重化が可能となる。
In the
通信スタックは、通信プログラムが実行されるときに生成されるオブジェクトを格納する領域に使用される。通信スタックは、使用済領域のサイズが大きくなると、使用済領域を使用可能領域に解放するための処理、いわゆるガベージコレクションがなされる。したがって、一方の通信スタックでガベージコレクションがなされる間は、他方の通信スタックを、この間で生成されるオブジェクトを格納する領域に利用することができる。これにより、上記の多重化において、複数の通信プログラム間で(すなわち、複数の通信スタック間で)通信負荷を分散しながら、PLC100とサーバー400との通信を継続することが可能になる。
The communication stack is used as an area for storing objects created when the communication program is executed. When the size of the used area of the communication stack increases, processing for releasing the used area to a usable area, ie, garbage collection, is performed. Therefore, while garbage collection is being performed in one communication stack, the other communication stack can be used as an area for storing objects generated during this period. As a result, in the multiplexing described above, it is possible to continue communication between the
以下、本発明のより具体的な応用例として、本実施の形態に係るコントローラ100のより詳細な構成および処理について説明する。
Hereinafter, more detailed configuration and processing of
<B.システム構成>
本実施の形態に係る制御システムのシステム構成について説明する。本実施の形態においては、機械や設備などの制御対象を制御するPLCをコントローラの典型例として説明を行う。但し、本発明に係るコントローラは、PLCに限られることなく、各種のコントローラへ適用可能である。
<B. System configuration>
A system configuration of a control system according to this embodiment will be described. In the present embodiment, a PLC that controls a controlled object such as a machine or facility will be described as a typical example of a controller. However, the controller according to the present invention is applicable to various controllers without being limited to PLC.
図2は、本実施の形態に係る制御システムの全体構成例を示す図である。図2を参照して、制御システム1は、PLC100と、PLC100に接続されるサポート装置300と、PLC100からのアクセスを受けるDB(データベース)430を備えるサーバー400とを含む。本実施の形態では、制御システム1が備えるサーバー400は複数台としているが、少なくとも1台以上を備えていればよい。サーバー400は、DB430と、DB430へのデータの書き込みおよび読み出しを制御する後述するDBMS(Database Management System)を備える。
FIG. 2 is a diagram showing an example of the overall configuration of a control system according to this embodiment. Referring to FIG. 2 , control system 1 includes
PLC100は、ユーザープログラム186を周期的またはイベント的に実行する。このユーザープログラム186にDB430へのアクセス命令を含めることができ、PLC100は、このアクセスに従って、サーバー400にアクセスすることができる。すなわち、PLC100およびサーバー400は、イーサネット(登録商標)などのネットワーク112を介して、データを互いに遣り取りできるように構成される。
サポート装置300は、PLC100に接続可能な情報処理装置の典型例である。サポート装置300は、接続ケーブル114を介してPLC100に接続され、PLC100との間で各種パラメータの設定、プログラミング、モニタ、デバッグなどの機能を提供する。PLC100とサポート装置300との間は、典型的には、USB(Universal Serial Bus)規格に従って通信可能に構成される。
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 control system 1,
<C.PLC100のハードウェア構成>
次に、本実施の形態に係るPLC100のハードウェア構成について説明する。図3は、本実施の形態に係るPLC100の主要部を示すハードウェア構成の一例を示す模式図である。
<C. Hardware configuration of
Next, a hardware configuration of the
図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から内部クロックに従って順次供給される命令コードを解釈して実行する。チップセット122は、接続されている各種コンポーネントとの間で内部的なデータを遣り取りするとともに、プロセッサ120に必要な命令コードを生成する。システムクロック124は、予め定められた周期のシステムクロックを発生してプロセッサ120に提供する。チップセット122は、プロセッサ120での演算処理の実行の結果得られたデータなどをキャッシュする機能を有する。
CPUユニット104は、記憶手段として、主メモリ126および不揮発性メモリ128を有する。主メモリ126は、揮発性の記憶領域であり、プロセッサ120で実行されるべき各種プログラムを保持するとともに、各種プログラムの実行時の作業用メモリとしても使用される。不揮発性メモリ128は、OS、システムプログラム、ユーザープログラム、データ定義情報、ログ情報などの各種プログラムおよびデータを不揮発的に保持する。
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と接続される。
PLC
フィールドバスコントローラ150は、バッファメモリ152と、フィールドバス制御回路154と、DMA制御回路156とを含む。フィールドバスコントローラ150は、フィールドバスコネクタ158を介してフィールドバス110と接続される。上位通信コントローラ160は、バッファメモリ162と、上位通信制御回路164と、DMA制御回路166とを含む。上位通信コントローラ160は、通信ポート168を介してネットワーク112と接続される。通信ポート168は、上位システムと接続するための物理的なポートに相当し、例えば、通信ポート168を接続する上位通信コントローラ160は、「通信インターフェイス」の一実施例である。
メモリカードインターフェイス170は、CPUユニット104に対して着脱可能なメモリカード172とプロセッサ120とを接続する。
<D.PLC100のソフトウェア構成>
図4は、本実施の形態に係るPLC100のソフトウェア構成の一例を示す模式図である。次に、図4を参照して、本実施の形態に係るPLC100が提供する各種機能を実現するためのソフトウェア構成について説明する。これらのソフトウェアに含まれる命令コードは、適切なタイミングで読み出され、CPUユニット104のプロセッサ120によって実行される。
<D. Software configuration of
FIG. 4 is a schematic diagram showing an example of the software configuration of the
PLC100は、OS180の元で実行されるユーザープログラム186、通信クライアント(X)プログラム181および通信クライアント(Y)プログラム182を含む各プログラムを周期的に実行するためのスケジューラを有する。PLC100は、ユーザープログラム186を実行する場合、PLC100内のメモリ領域の情報を読み書きして、ユーザープログラム186に示される命令を順に実行する。PLC100は、入出力機能を備えており、センサ出力などPLC100の外部からデータを受け付けて、データを蓄積する。PLC100は、蓄積されたデータをDB430に格納するためにサーバー400と通信する。なお、PLC100は、サーバー400からDB430のデータを読出し、ユーザープログラム186等に渡すことができる。
図4を参照して、PLC100の各機能は、OS180、システムプログラム187、ユーザープログラム186等が動作することで発揮される。
With reference to FIG. 4, each function of PLC100 is demonstrated by operating OS180, the
OS180は、PLC100のメモリ等を含むハードウェアリソース190を管理するオペレーティングシステムであり、タスクのスケジューリングや、サーバー400へのアクセス処理等を行う機能をPLC100に発揮させる。OS180は、例えばリアルタイムOSであって、システムプログラム187およびユーザープログラム186を実行するための基本的な実行環境を提供する。
The
システムプログラム187は、PLC100としての基本的な機能を提供するためのソフトウェア群である。本実施の形態では、システムプログラム187は、PLC100がサーバー400へアクセスするためのプログラム群を含む。このプログラム群は、例えばJava(登録商標)プログラムで実現される通信クライアント(X)プログラム181および通信クライアント(Y)プログラム182、これらJavaプログラムを実行するための仮想計算機として実装されたJVM(Java virtual machine)183,184、およびOS180を介して仮想計算機がハードウェアリソース190を利用するために実装されるハイパーバイザ185を含む。
The
例えば、通信クライアント(X)プログラム181および通信クライアント(Y)プログラム182は、それぞれ、実行されることによりPLC100に対して、サーバー400と通信するための共通した通信環境を提供する。以下では、通信クライアント(X)プログラム181を、通信クライアント(X)181とも称し、通信クライアント(Y)プログラム182を、通信クライアント(Y)182とも称する。また、通信クライアント(X)181と通信クライアント(Y)182を総称する場合は、通信クライアントと称する。
For example, the communication client (X)
通信クライアント(X)181はJVM183により実行され、通信クライアント(Y)182はJVM184により実行されることにより、通信クライアント(X)181と通信クライアント(Y)182は並列に実行され得る。通信クライアント(X)181および通信クライアント(Y)182が実行中は、JVM183およびJVM184は、ハイパーバイザ185およびOS180を介してハードウェアリソース190等の資源を利用する。
Communication client (X) 181 is executed by
このように、PLC100内において、サーバー400と通信するための通信クライアントを多重化(または冗長化)することができる。なお、ここでは、JVM183,184上で実行されるプログラムは、通信クライアント(X)181および通信クライアント(Y)182の2つとしているが、この2つに限定されず、他のJavaプログラムが含まれてもよい。
Thus, within the
ハードウェアリソース190の不揮発性メモリ128等の記憶領域には、通信クライアント(X)181および通信クライアント(Y)18のそれぞれについて、予め定められたサイズに制限された通信スタック191および通信スタック192が備えられる。図4では、通信スタック191と通信スタック192は分離した領域として示されるが、両者は連続した領域であってもよい。
In a storage area such as the
本実施の形態では、ユーザープログラム186は、ユーザにおける制御目的(たとえば、対象のラインやプロセス)に応じて作成される。また、通信クライアントのプログラムも、ユーザにおけるPLC100とサーバー400との間の通信の目的に応じて作成される。ユーザープログラム186は、典型的には、CPUユニット104のプロセッサ120で実行可能なオブジェクトプログラム形式になっている。また、通信クライアント(X)181および通信クライアント(Y)182は、JVM183および184により実行可能な形式になっている。ユーザープログラム186または通信クライアント(X)181,通信クライアント(Y)182は、サポート装置300等において、作成されてコンパイルされることで生成される。そして、生成されたこれらプログラムは、サポート装置300からCPUユニット104へ転送され、不揮発性メモリ128などに格納される。
In this embodiment, the
なお、本実施の形態では、通信クライアント(X)181および通信クライアント(Y)182等の通信クライアントのプログラムは、仮想計算機により実行されるとしているが、通信クライアントのプログラムの実行環境は仮想計算機によるものに限定されない。例えば、ユーザープログラム186と同様にCPUユニット104が備えるOS180により実行されるとしてもよい。
In this embodiment, communication client programs such as the communication client (X) 181 and the communication client (Y) 182 are assumed to be executed by a virtual computer, but the execution environment of the communication client program is a virtual computer. not limited to For example, similar to the
<E.サーバー400の構成>
次に、本実施の形態に係るサーバー400の構成について説明する。図5は、本実施の形態に係るサーバー400の構成の一例を示す模式図である。サーバー400は、典型的には、汎用のコンピュータで構成される。
<E. Configuration of
Next, the configuration of
図5を参照して、サーバー400は、OSを含む各種プログラムを実行するCPU402と、BIOSや各種データを格納するROM(Read Only Memory)404と、CPU402でのプログラムの実行に必要なデータを格納するための作業領域を提供するメモリRAM406と、CPU402で実行されるプログラムなどを不揮発的に格納するハードディスク(HDD)408とを含む。より具体的には、ハードディスク408には、DB430およびDBMS431のプログラムを含む各種のプログラムおよびデータが格納されている。
Referring to FIG. 5,
サーバー400は、さらに、ユーザからの操作を受け付けるキーボード310およびマウス312と、情報をユーザに提示するためのモニタ314とを含む。さらに、サーバー400は、PLC100(CPUユニット104)などと通信するための通信インターフェイス(IF)418を含む。
サーバー400は、DB430を提供するための公知の構成を有する。DB430としては、例えばリレーショナルデータ型やオブジェクトデータ型といった任意の構成を採用できる。サーバー400は、汎用的なコンピュータアーキテクチャに従って構成されるため、ここではその詳細な説明は繰り返さない。
サーバー400は、PLC100からの接続要求またはアクセス要求(リレーショナルデータ型では、SQL文)を受けて、必要な処理を実行し、その処理結果などをPLC100へ応答する。ここでは、例えば、DB430は、リレーショナルデータ型であって、DBMS431は、SQL文に従いDB430にデータを読書きするが、DB430の型およびDB430の操作言語はSQLに限定されない。
The
<F.データの流れと設定データ>
図6は、本実施の形態に係るデータの流れとともにPLCの構成の一例を示す模式図である。図7は、本実施の形態に係る割付ルールと状態情報の一例を示す模式図である。図7(A)を参照して、割付ルール90は、複数の異なるレコードを有する。各レコードは、宛先91と、通信クライアントを識別するためのクライアント識別子92、および条件93を関連付けて含む。条件93は、対応の通信クライアントの応答性能を判断するための閾値96を含む。条件93は、例えば、応答時間<Tms(ただし、T>0)を示す。なお、本実施の形態では、通信クライアントの応答性能として例えば応答時間を示すが、応答時間に限定されない。
<F. Data flow and setting data>
FIG. 6 is a schematic diagram showing an example of the configuration of the PLC along with the flow of data according to this embodiment. FIG. 7 is a schematic diagram showing an example of allocation rules and status information according to this embodiment. Referring to FIG. 7A,
図7(B)を参照して、状態情報95は、通信クライアント(X)181および通信クライアント(Y)182のそれぞれに対応して、クライアント識別子92および当該通信クライアントの状態94を有する。状態94は、実行中における当該通信プログラムの通信の応答性能により示される。すなわち、プログラムの実行速度が遅い状態(プログラムの異常も含む)であれば応答性能は低下し(例えば応答時間が長くなる)、プログラムの実行速度が早い状態であれば応答性能は高くなる(例えば応答時間は短くなる)。このような背景のもと、例えば、状態94には、応答性能の一例である応答時間が閾値96を含む条件93(例えば応答時間<Tms)(ただし、T>0)を満たさないことを示す「Time Out発生」、または応答時間が条件93(例えば応答時間<Tms)を満たすことを示す「Good」のいずれかが設定される。状態94は、応答性能の変化に従い、「Time Out発生」→「Good」に切替わり、または「Good」→「Time Out発生」に切替わる。なお、閾値96は、例えば予め実験等により決定される。
Referring to FIG. 7B,
図8は、本実施の形態に係るアドレス変換テーブル80の一例を示す模式図である。アドレス変換テーブル80は、宛先91と、各宛先91に対応してIPアドレス82を有する。割付ルール90、状態情報95およびアドレス変換テーブル80は、不揮発性メモリ128等に格納される。
FIG. 8 is a schematic diagram showing an example of the address conversion table 80 according to this embodiment. The address translation table 80 has
図6を参照して、PLC100内でのサーバー400宛のデータの流れを説明する。図6では、PLC100に接続する複数のサーバー400は、例えばサーバーA、サーバーBおよびサーバーCの3種類に分類されている。まず、ユーザープログラム186中のサーバー400と通信するための命令が実行されてデータ70が出力されるとき、ユーザープログラム186は、データ70を、割付部188が備える複数のポート68のうちの1のポートに出力する。このとき、ユーザープログラム186は、データ70の種類に基づき複数のポート68のうちから1を選択し、選択したポート68にデータ70を出力する。
The flow of data addressed to
監視部189は、通信クライアント(X)181と通信クライアント(Y)182の応答時間を測定し、測定の結果に基づき割付指令を出力し、また、状態情報95を変更する。監視部189による割付指令の出力および状態情報95の変更の詳細は後述する。
The
割付部188は、割付処理を実施する。割付処理では、割付部188は、データ70を受付けたポート68の番号(識別子に相当する)を、予め定められた変換規則に従い宛先91に変換する。これにより、データ70は、その種類毎に宛先91が決まる。割付部188は、監視部189からの後述する割付指令に基づき、データ70を割付ける通信クライアント(通信クライアント(X)181および通信クライアント(Y)182のいずれか1方)を決定し、決定した通信クライアントに、宛先91を付加してデータ70を渡す。
The
通信クライアントは、割付部188からデータ70を受付けると、受付けたデータ70に付加されている宛先91に基づき、図8のアドレス変換テーブル80から宛先91に関連付けられたIPアドレス82を検索する。通信クライアントは、検索されたIPアドレス82をデータ70に付加し、データ70を上位通信コントローラ160に出力する。上位通信コントローラ160は、通信コントローラからデータ70を受付けて、TCP/IPに従い、サーバー400に送信する。
Upon receiving the
本実施の形態では、上記のように、データ70の種類に対応したサーバー400宛に、データ70を送信することが可能となる。
In this embodiment, as described above, it is possible to transmit
割付ルール90の優先度に従う検索を説明する。図7(A)を参照して、割付ルール90は例えばテーブル形式を有する。割付ルール90では、例えば通信クライアント(X)181のクライアント識別子92を含むレコードが、テーブルのより先頭側に登録され、通信クライアント(Y)182のクライアント識別子92を含むレコードが、それ以降に続いて登録されている。割付部188は、割付ルール90を検索する場合、割付ルール90のテーブルの先頭側のレコードから下方向に順に検索する。このように、割付ルール90でレコードが検索される優先度は、通信クライアント毎に異なるように設定され得る、すなわち、データ70を送信するべき通信クライアントとして割付けられる優先度は、複数の通信クライアント間で異なるように設定され得る。本実施の形態では、図7(A)に示すように、この優先度は、通信クライアント(X)181の方が、通信クライアント(Y)182よりも高い。
Retrieval according to the priority of
本実施の形態では、上記の優先度を考慮して、優先度が高い通信クライアント(X)181の閾値96は「Tms」と設定されて、優先度が低い通信クライアント(Y)182の条件93の閾値96は「なし」に設定される。
In the present embodiment, considering the above priority, the
具体的には、閾値96は、本実施の形態では通信クライアントの通信負荷の大きさにより変更され得る。つまり、通信クライアント(X)181は、データ70を送信するべき通信クライアントとして割付けられる優先度が高いので、データ70の送信にかかる負荷が、優先度が低い通信クライアント(Y)182の通信負荷に比較して大きくなりやすい。
Specifically, the
このような通信負荷のばらつきを考慮して、本実施の形態では、優先度の高い通信クライアント(X)181の閾値96には、上記のように優先度の低い通信クライアント(Y)182の閾値96よりも厳しめの値が設定される。これにより、通信クライアント(X)181の通信負荷が過剰となり通信不能に陥る前に「Time out発生」に切替えて、通信クライアント(Y)182を割付けて、通信負荷の分散を実現することが可能となる。
Considering such variations in communication load, in the present embodiment, the
<G.フローチャート>
図9は、本実施の形態に係る割付処理のフローチャートの一例を模式的に示す図である。図10は、本実施の形態に係る通信監視処理の一例を模式的に示す図である。まず、図10を参照して、通信監視処理を説明する。監視部189は、割付部188がユーザープログラム186からデータ70を受付けたとき、複数の通信クライアントに対して、上記に述べた優先度の高→低の順番に従い、通信の要求を送信する。図10では、優先度の高い方の通信クライアント(X)181にデータ70の送信の要求を送信し、要求に対する応答(Ack)を受信するまでの所要時間、すなわち応答時間を測定する(ステップS11)。
<G. Flowchart>
FIG. 9 is a diagram schematically showing an example of a flowchart of allocation processing according to the present embodiment. FIG. 10 is a diagram schematically showing an example of communication monitoring processing according to this embodiment. First, the communication monitoring process will be described with reference to FIG. When the assigning
監視部189は応答時間が通信クライアント(X)181に対応の条件93を満たさないと判断した、すなわち応答時間が条件93の閾値96を超えると判断した場合(ステップS13でNO)、監視部189は、状態情報95の通信クライアント(X)181に対応の状態94の現在値が「Time Out発生」を示すと判断したときは(ステップS15でYES)、通信クライアント(Y)182を指定する割付指令を生成し、割付部188に出力する(ステップS19)。一方、監視部189は、通信クライアント(X)181に対応の状態94の現在値が「Time Out発生」を示さないと判断したときは(ステップS15でNO)、監視部189は、通信クライアント(X)181に対応の状態94を「Time Out発生」に設定し(ステップS17)、ステップS19の処理に移行する。これにより、PLC100では、データ70を送信する場合に、優先度が高い通信クライアント(X)181の応答時間が条件93を満たさない場合は、データ70を送信するための通信クライアントに、次の優先度(すなわち、優先度の低い)である通信クライアント(Y)182が割付けられる。
When the
監視部189は応答時間が通信クライアント(X)181に対応の条件93を満たすと判断した、すなわち応答時間が条件93の閾値96を超えないと判断した場合(ステップS13でYES)、監視部189は、通信クライアント(X)181に対応の状態94の現在値が「Time Out発生」を示すと判断したときは(ステップS19でYES)、監視部189は、通信クライアント(X)181に対応の状態94を「Good」に設定し(ステップS21)、通信クライアント(X)181を指定する割付指令を生成し、割付部188に出力する(ステップS23)。一方、監視部189は、通信クライアント(X)181に対応の状態94の現在値が「Time Out発生」を示さないと判断したときは(ステップS19でNO)、ステップS23の処理に移行する。これにより、PLC100では、データ70を送信する場合に、優先度が高い通信クライアント(X)181の応答時間が条件93を満たす場合は、データ70を送信するための通信クライアントに、優先度の高い通信クライアント(X)181が割付けられる。
When the
図9を参照して、割付部188の処理を説明する。ユーザープログラム186は、実行されると(ステップR1)、データ70を割付部188に出力する(ステップR3)。その後、プログラムの実行を終了すると判断したときは(ステップR5でYES)、実行を終了するが、実行を終了しないと判断すると(ステップR5でNO)、ステップR1に戻る。
The processing of the
割付部188は、ユーザープログラム186からポート68を介してデータ70を受付けるか否かを判断する(ステップS1)。データ70を受付けないと判断すると(ステップS1でNO)、ステップS1の処理を繰り返すが、データ70を受付けたと判断すると(ステップS1でYES)、監視部189は、上記に述べた図10の通信監視処理を実施して、割付指令を割付部188に出力する(ステップS3)。割付部188は、監視部189から割付指令を用いて上記に述べた割付処理を実施する(ステップS5)。
The
通信クライアント(X)181または通信クライアント(Y)182は、プログラム実行中(ステップR7)、割付部188からデータ70を受付けて、受付けたデータ70にIPアドレス82を付加して、上位通信コントローラ160に出力する。その後、通信コントローラはプログラムの実行を終了すると判断したときは(ステップR8でYES)、実行を終了するが、実行を終了しないと判断すると(ステップR8でNO)、ステップR7に戻る。
During program execution (step R7), communication client (X) 181 or communication client (Y) 182 receives
(応答時間の変形例)
上記の割付処理では、データ70を送信する前に、監視部189が通信クライアントに要求を送信し、応答(Ack)を受信するまでの時間を測定することで、応答時間を検出したが、応答時間の測定方法は、この方法に限定されない。例えば、割付部188は、データ70を、優先度が高い通信クライアント(X)181に送信し、通信クライアント(X)181から応答(例えば、データ70をサーバー400に送信完了した旨の応答等)を受信するまでの時間を測定することで応答時間を取得してもよい。この場合、割付部188は、応答時間が通信クライアント(X)181に対応の条件93を満たすかを判断し、満たさないと判断したときは、次位の優先度の通信クライアント、すなわち通信クライアント(Y)182にデータ70を送信する。また、この変形例においても、割付部188は、上述と同様に、通信クライアントの状態94を設定(変更)する。
(Modified example of response time)
In the allocation process described above, the response time is detected by measuring the time required for the
上記で述べたように、割付部188は、データ70を送信する通信クライアントとして優先的に通信クライアント(X)181を割付けるが、通信クライアント(X)181の応答時間が条件93を満たさなくなると、割付け先は通信クライアント(Y)182に切り替わる。その後、通信クライアント(X)181の応答時間が条件93を満たすようになると、割付先は通信クライアント(X)181に戻る。これにより、PLC100はデータ70をサーバー400に通信する場合に、PLC100内の多重化された通信クライアント間で通信にかかる負荷を分散させながら、当該通信を継続することができる。
As described above, the
<H.割付ルールの変更>
本実施の形態では、割付ルール90の条件93を可変に設定することができる。図11は、本実施の形態に係るデータの流れとともにPLCの構成の他の例を示す模式図である。図12は、本実施の形態に係る割付ルールの他の例を示す模式図である。図13は、本実施の形態に係る機械学習による閾値の変化パターンの一例を模式的に示す図である。図11を参照して、PLC500は、図6に示したPLC100の構成に追加して学習部1872と、図12の割付ルール901を備える。PLC500の他の部分は、図6に示したPLC100のそれらと同様であるので、説明は繰返さない。
<H. Change of allocation rule>
In this embodiment, the
図12を参照して、割付ルール901の各レコードは、宛先91、クライアント識別子92および条件931を含む。条件931は例えば(応答時間<学習閾値97)を示す。学習部1872は、割付ルール901の学習閾値97を設定(または変更)する。学習部1872は、通信クライアントとの通信における各種の通信特徴量を用いた機械学習により、応答性能を予め定められた値に保証するための閾値の変化パターンを検出する。学習部1872は、検出した変化パターンに従い、割付ルール901の学習閾値97を設定する。
Referring to FIG. 12, each record of
図13を参照して、学習部1872が検出する変化パターンP1,P2がグラフで示される。このグラフでは、横軸に「Time Out発生」の間隔(すなわち、「Time Out発生」の検出から次に「Time Out発生」までの時間)、またはサーバー400への送信データ量がとられて、縦軸に学習閾値97がとられている。また、図13のパターンP1とP2は、応答性能を保証するための最適な閾値の変化パターンの一例である。パターンP1は、例えば「Time Out発生」の間隔に対応し、パターンP2は例えば送信データ量に対応する。学習部1872は、生成した図13の閾値の変化パターンを不揮発性メモリ128に格納する。なお、図13では、応答性能の変化を、「Time Out発生」の間隔および送信データ量の2種類を例示したが、これらに限定されず、例えば「Good」の継続時間であってもよい。
Referring to FIG. 13, change patterns P1 and P2 detected by learning
学習部1872は、例えば、パターンP1に基づき学習閾値97を設定する場合は、PLC500とサーバー400との通信を実施中に通信クライアント(X)181の「Time Out発生」の間隔の代表値(所定期間における平均値、最頻値等)RPを測定する。学習部1872は、パターンP1から代表値RPに対応する閾値THを取得(決定)し、取得した閾値THを割付ルール901の学習閾値97に設定する。
For example, when setting the
これにより、例えば通信クライアントのソフトウェア異常が発生すると、または通信の負荷が過剰になると「Time Out発生」の間隔が変化(長くなる)するが、この場合であっても、「Time Out発生」の間隔の変化に連動して、応答性能を保証するような学習閾値97に変更することが可能になる。
As a result, for example, when a software error occurs in the communication client or when the communication load becomes excessive, the interval of "Time Out occurrence" changes (increases). It becomes possible to change the
また、学習部1872は、PLC500とサーバー400とのネットワーク112の輻輳等により通信クライアントの通信負荷が過剰になる事態に対応するように学習閾値97を変更してもよい。この場合は、学習部1872は、ネットワーク112の輻輳が発生する時系列・時間帯パターンを学習し、学習結果に基づき、輻輳が発生する前に、閾値を変更するとしてもよい。
Also, the
<I.通信クライアントの種類による割付け>
上記に述べた通信クライアント(X)181および通信クライアント(Y)182は実行されると、同じ種類の通信機能を提供したが、提供される通信機能は異なる種類であってもよい。図14は、本実施の形態に係るデータの流れとともにPLCの構成のさらなる他の例を示す模式図である。図15は、本実施の形態に係る割付ルールのさらなる他の例を模式的に示す図である。図16は、本実施の形態に係る割付処理の他の例を示すフローチャートである。図17は、本実施の形態に係る通信監視処理の他の例を示すフローチャートであある。
<I. Allocation according to communication client type>
Although communication client (X) 181 and communication client (Y) 182 described above provide the same type of communication functionality when executed, the communication functionality provided may be of different types. FIG. 14 is a schematic diagram showing still another example of the configuration of the PLC together with the flow of data according to this embodiment. FIG. 15 is a diagram schematically showing yet another example of allocation rules according to this embodiment. FIG. 16 is a flowchart showing another example of allocation processing according to this embodiment. FIG. 17 is a flowchart showing another example of communication monitoring processing according to this embodiment.
図14を参照してPLC600は、アプリケーション層が用いるデータ伝送のプロトコルとして、データベースサーバーに接続するための通信プロトコルであるDB接続プロトコルに従う通信処理を実施するDB接続通信クライアント(X)1811およびFTP(File Transfer Protocol)通信クライアント(Y)1821の2種類を備える。なお、通信クライアントに適用されるデータ伝送のプロトコルの種類はこれらに限定されない。また、PLC600がデータベースサーバーに接続する場合に、当該データベースサーバーとPLC600(より特定的にはDB接続通信クライアント(X)1811)との間において、DB接続プロトコルに従い両者の通信を制御する通信部が介在してもよい。このような通信部としては、例えば両者の通信を中継る通信機器(例えば中継器)またはソフトウェア等を含み得る。また、図14のPLC600は、監視部1891を有する割付部188と、ユーザープログラム186から受付けたデータ70をデータバッファ1874に格納する格納部1875を備える。割付部188は、割付ルール902と状態情報95を検索する。PLC600の他の部分は、図6または図11に示されたものと同様であり、説明は繰返さない。
Referring to FIG. 14,
図15を参照して割付ルール902の各レコードは、図12の割付ルール901のレコードの内容に追加して、アクション識別子98を含む。アクション識別子98は、ユーザープログラム186からデータ70を受付けた場合に、割付部188がとるべきアクション(処理)を示す。本実施の形態では、このアクション識別子98は「通信クライアントへ送信」または「バッファ送信」のいずれかを示す。
Referring to FIG. 15, each record of
PLC600では、監視部1891が、DB接続通信クライアント(X)1811の応答性能(例えば、応答時間)を監視し、応答性能が良いと判断する期間は、DB接続通信クライアント(X)1811を利用してリアルタイムにデータをサーバー400のいずれかに送出し、応答性能が劣化している期間に受付けたデータ70は、格納部1875によりデータバッファ1874に格納させる。これにより、優先度の高いDB接続通信クライアント(X)1811の応答性能が劣化している期間にユーザープログラム186から受付けたデータ70は、データバッファ1874に格納(保存)される。割付部188は、データバッファ1874に格納されたデータ70を一括して、FTP通信クライアント(Y)1821に送出する。FTP通信クライアント(Y)1821は、データバッファ1874格納されていたデータを、サーバー400にファイル転送する。
In the
これにより、サーバーAまたはサーバーBのサーバー400がダウンしたとしても、サーバーCのサーバー400に上記の保存されていたデータ70を一括転送することができる。サーバーCはPLC600からファイル転送による受信したデータ70を、サーバーAまたはサーバーBへ送出することができる。サーバーAまたはサーバーBのDBMS431は、サーバーCからのデータ70をトレーサビリティ情報として用いて、ダウン期間における更新内容を反映した状態にDB430を回復させる。これにより、サーバーAまたはサーバーBのDB430の正確性を保証することが可能となる。具体的な処理を、図16と図17を参照して説明する。
As a result, even if the
まず、図17を参照して監視部1891による通信監視処理を説明する。監視部1891は、割付部1881がユーザープログラム186からデータ70を受付けたとき、上記に述べた優先度の高→低の順番に従い、通信クライアントに通信の要求を送信する。図14では、優先度の高い方のDB接続通信クライアント(X)181に要求を送信し、要求に対する応答(Ack)を受信するまでの所要時間、すなわち応答時間を測定する(ステップS11)。
First, communication monitoring processing by the
監視部1891は応答時間がDB接続通信クライアント(X)1811に対応の条件931を満たさないと判断する、すなわち応答時間が条件931の学習閾値97を超えると判断する場合(ステップS13でNO)、監視部1891は、状態情報95のDB通信クライアント(X)181に対応の状態94の現在値が「Time Out発生」を示すと判断したときは(ステップS15でYES)、割付先として格納部1875を指定する割付指令を生成し、割付部188に出力する(ステップS22)。監視部1891は、この割付指令に、割付ルール902から読出された対応のアクション識別子98(「バッファ送信」)を含める。
When the
一方、監視部1891は、DB接続通信クライアント(X)1811に対応の状態94の現在値が「Time Out発生」を示さないと判断したときは(ステップS15でNO)、監視部1891は、DB接続通信クライアント(X)181に対応の状態94を「Time Out発生」に設定し(ステップS17)、ステップS22の処理に移行する。これにより、PLC100では、データ70を送信する場合に、優先度が高いDB接続通信クライアント(X)1811の応答時間が条件93を満たさない場合は、データ70をデータバッファ1874に送信するために格納部1875が割付けられる。
On the other hand, when the
監視部1891は応答時間が通信クライアント(X)181に対応の条件931を満たすと判断する、すなわち応答時間が条件931の学習閾値97を超えないと判断した場合(ステップS13でYES)、監視部1891は、DB接続通信クライアント(X)1811に対応の状態94の現在値が「Time Out発生」を示すと判断したときは(ステップS19でYES)、監視部1891は、DB接続通信クライアント(X)1811に対応の状態94を「Good」に設定し(ステップS21)、優先度の高い通信クライアント、すなわちDB接続通信クライアント(X)1811を指定する割付指令を生成し、割付部188に出力する(ステップS25)。監視部1891は、この割付指令に、割付ルール902の対応のアクション識別子98(「通信クライアント送信」)を含める。
When the
一方、監視部189は、通信クライアント(X)181に対応の状態94の現在値が「Time Out発生」を示さないと判断したときは(ステップS19でNO)、ステップS25の処理に移行する。これにより、PLC100では、データ70を送信する場合に、優先度が高いDB接続通信クライアント(X)1811の応答時間が条件931を満たす場合は、データ70を送信するための通信クライアントに、優先度の高いDB接続通信クライアント(X)181が割付けられる。
On the other hand, when the
次に、図16を参照して、割付部1881の処理を説明する。割付部1881は、ユーザープログラム186からポート68を介してデータ70かを受付けるか否かを判断する(ステップS1)。データ70を受付けないと判断すると(ステップS1でNO)、ステップS1の処理を繰り返すが、データ70を受付けたと判断すると(ステップS1でYES)、監視部1891は、図17の通信監視処理を実施して、アクション識別子98を含む割付指令を割付部1881に出力する(ステップS2)。
Next, referring to FIG. 16, processing of the
割付部1881は、監視部1891からの割付指令を用いて割付処理を実施する(ステップS4)。具体的には、割付指令が、DB接続通信クライアント1811を示すとき、割付部188は、アクション指令(「通信クライアント送信」)に従い、データ70に宛先91を付加し、データ70を割付指令に基づきDB接続通信クライアント1811に渡す。一方、割付指令が、格納部1875を示すとき、割付部188は、アクション指令(「バッファ送信」)に従い、割付指令が示す割付先の格納部1875にデータ70を渡す。
The
DB接続通信クライアント1811は、割付部188からデータ70を受付けたとき、受付けたデータ70にIPアドレス82を付加して、上位通信コントローラ160に出力する。
When receiving the
また、格納部1875は、割付部188からデータ70を受付けたとき、例えば受付けた順に従いデータ70をデータバッファ1874に格納する。
Further, when the storage unit 1875 receives the
割付部188は、ファイル転送するか否かを判断する(ステップS7)。例えば、データバッファ1874に格納されたデータ70のうち未送信のデータ70のサイズが予め定められた閾値を超えたとき、割付部1881はファイル転送を実施すると判断する(ステップS7でYES)。ファイル転送を実施しないと判断すると(ステップS7でNO)、処理は終了する。
The
ファイル転送を実施すると判断したとき(ステップS7でYES)、割付部188は、データバッファ1874から未送信のデータ70を読出し、FTP通信クライアント1821に渡す(ステップS9)。FTP通信クライアント1821は、割付部188から受付けたデータ70をFTPに従い、サーバーCのIPアドレスを付したファイル形式でサーバーCに送信する。
When it is determined that file transfer is to be performed (YES in step S7),
このように、データ70を送信する通信クライアントとして優先的にDB接続通信クライアント(X)1811を割付けるが、その後、通信クライアント(X)1811の応答時間が条件93を満たさすようになると、割付先はDB接続通信クライアント(X)1811に戻る。この期間において、すなわちDB接続通信クライアント(X)1811の応答時間が条件93を満たさない間において、ユーザープログラム186から受付けたデータ70は、格納部1875にサーバーに送信されないが、データバッファ1874に格納して、保存しておくことができる。これにより、この期間においてユーザープログラム186から出力されるデータ70の消失を防止することができる。
In this way, the DB connection communication client (X) 1811 is preferentially allocated as the communication client that transmits the
データバッファ1874のデータは、一括してサーバーCにファイル転送されて、サーバーAまたはサーバーBのDB430の回復に利用することができる。
The data in the
なお、図16と図17に示す割付処理においても、上記に述べた(応答時間の変形例)による応答時間の測定方法を適用することができる。 16 and 17, the method of measuring the response time according to the modification of the response time described above can also be applied.
<J.プログラム>
本実施の形態に示した各フローチャートの処理を示すプログラムまたは図4に示す少なくとも1つのプログラムは、PLC100の記憶部(不揮発性メモリ128、メモリカード172等)に格納されている。CPU110は、記憶部からプログラムを読出し、実行することにより、本実施の形態で説明した通信の制御を実現することが可能となる。
<J. Program>
A program showing the processing of each flowchart shown in the present embodiment or at least one program shown in FIG.
このようなプログラムは、PLC100に付属するフレキシブルディスク、CD-ROM(Compact Disk-Read Only Memory)、ROM、RAMおよびメモリカード172などのコンピュータ読み取り可能な記録媒体にて記録させて、プログラム製品として提供することもできる。あるいは、PLC100に内蔵するハードディスクなどの記録媒体にて記録させて、プログラムを提供することもできる。また、図示しないネットワークから通信インターフェイス(上位通信コントローラ160および通信ポート168等)を介したダウンロードによって、プログラムを提供することもできる。
Such a program is recorded on a computer-readable recording medium such as a flexible disk attached to the
<K.実施の形態の利点>
図18は、本実施の形態に係る通信スタックにおける使用されるメモリサイズの変化の一例を模式的に示す図である。図18を参照して、ガベージコレクションを考慮した利点を説明する。
<K. Advantages of Embodiment>
FIG. 18 is a diagram schematically showing an example of changes in memory size used in the communication stack according to this embodiment. With reference to FIG. 18, the advantages of considering garbage collection will be described.
本実施の形態では、通信クライアントが実行中に、JVMにより通信スタックに格納されるオブジェクトのサイズが、通信スタックが有する制限サイズを超えると通信クライアントの実行速度が低下する。このようなオブジェクトの格納によるメモリサイズの変化が図18に例示される。図18のメモリサイズの変化は、通信スタック191および192の両方について同様に適用することができる。
In this embodiment, if the size of an object stored in the communication stack by the JVM exceeds the size limit of the communication stack while the communication client is running, the execution speed of the communication client drops. FIG. 18 exemplifies the change in memory size due to the storage of such objects. The memory size variations of FIG. 18 are equally applicable to both
通信スタックの予め定められた制限サイズは、ヒープ領域のサイズに相当する。ヒープ領域は、生成されると直ぐに不要となるような短命オブジェクトを格納するためのNew世代と、比較的に長い時間必要とされる長命オブジェクトを格納するためのold世代とからなる。図18では、ヒープ領域の使用済サイズ214、old世代の使用済サイズ211の変化が、時間の経過に従い示されている。
A predetermined limit size of the communication stack corresponds to the size of the heap area. The heap area consists of the new generation for storing short-lived objects that are no longer needed as soon as they are created, and the old generation for storing long-lived objects that are required for a relatively long time. FIG. 18 shows changes in the used
JVMは、old世代を含むヒープ領域の略全体を対象にしたフルガベージコレクションと、New領域のみを対象とするガベージコレクションを実施する。図18では、フルガベージコレクションが実施される時刻212、時刻213および時刻215と、ガベージコレクションの所要時間210とが示されている。フルガベージコレクションとフルガベージコレクションとの間の期間において、New領域のみを対象とするガベージコレクションが実施され得る。
The JVM performs full garbage collection targeting substantially the entire heap area including the old generation and garbage collection targeting only the new area. FIG. 18
図18に示されるように、フルガベージコレクションが実施されるとき、ガベージコレクションの所要時間210は長くなるので、これに伴いJVMによる通信クライアントの実行速度は低下する。本実施の形態では、フルガベージコレクションの実施時期を通信クライアントの応答時間が条件93(931)を満たさなくなったことで検出(推定)することが可能である。これにより、フルガベージコレクションの実施時間においても、PLCとサーバーとのデータ70の通信継続およびデータバッファ1874に格納することによるデータ消失を防止することができる。
As shown in FIG. 18, when a full garbage collection is performed, the
<L.実施の形態の他の利点>
図19は、本実施の形態に係る通信クライアントの切替えの態様の一例を模式的に示す図である。図19を参照して、例えば通信クライアント(X)181が通信を実行中に異常が発生した場合に、通信クライアント(Y)182に切替えることで通信を継続できる場合を説明する。
<L. Other advantages of the embodiment>
FIG. 19 is a diagram schematically showing an example of switching modes of communication clients according to the present embodiment. With reference to FIG. 19, a case will be described in which communication can be continued by switching to the communication client (Y) 182 when, for example, the communication client (X) 181 encounters an abnormality during communication.
まず、通信クライアント(X)181と通信クライアント(Y)182のうち、通信クライアント(X)181が実行中の状態ST3にあり、通信クライアント(Y)182は停止している状態ST1であったとする。通信クライアント(X)181の通信実行中に、通信クライアント(X)181で例えばプログラム異常等が起きて応答時間が条件93を満たさなくなったとき(状態ST4)、通信クライアント(X)181は通信を停止し、異常確認または自動復旧処理の実行状態(状態ST5)に移行する。また、このときデータ70の割付先は通信クライアント(Y)182に切替えられて、通信クライアント(Y)182宛に、切替通知がなされる(状態ST2)。JVM184は、切替通知を受けると、通信クライアント(Y)182を停止状態から通信実行状態(状態ST6)に切替える。これにより、通信クライアント(Y)182により通信が実行されて、サーバー400にデータ70が送信される。
First, of the communication client (X) 181 and the communication client (Y) 182, assume that the communication client (X) 181 is in the running state ST3 and the communication client (Y) 182 is in the stopped state ST1. . When the communication client (X) 181 is executing communication, for example, a program error occurs in the communication client (X) 181 and the response time does not satisfy the condition 93 (state ST4), the communication client (X) 181 stops communication. It stops and shifts to the execution state (state ST5) of abnormality confirmation or automatic recovery processing. At this time, the allocation destination of the
このように、通信クライアント(X)181に異常が生じた場合は、停止状態にある通信クライアント(Y)182を停止状態にから通信実行状態に切替えて、通信クライアント(Y)182によりサーバー400にデータ70を到達させることができる。また、切替通知を受けるまでは、通信クライアント(Y)182は停止状態にあるので、この停止状態ある期間は、PLC100におけるプログラム実行にかかる負荷を低減できる。
In this way, when an abnormality occurs in the communication client (X) 181, the communication client (Y) 182 in the stopped state is switched from the stopped state to the communication execution state, and the communication client (Y) 182 sends the
<M.実施の形態の他の利点>
図20は、本実施の形態に係る通信クライアントの切替えの態様の他の例を模式的に示す図である。図20を参照して、通信クライアント(X)181による通信と通信クライアント(Y)182による通信とを同時に実施する場合を説明する。
<M. Other advantages of the embodiment>
FIG. 20 is a diagram schematically showing another example of switching of communication clients according to the present embodiment. A case where communication by the communication client (X) 181 and communication by the communication client (Y) 182 are performed at the same time will be described with reference to FIG.
図20を参照して、通信クライアント(X)181によるデータ70の通信実行状態(状態ST3)において、応答時間が条件93を満たさなくなる状態(状態ST4)になると、割付部188は、次に受付けたデータ70を通信クライアント(Y)182に渡す(状態ST7)。通信クライアント(Y)182は通信停止状態(状態ST1)から通信実行状態(状態ST6)に移行する。これにより、通信クライアント(X)181の負荷を下げることができる。仮に、割付部188は、通信クライアント(Y)182のデータ70の通信が完了する前に、更に次のデータ70を受付けた場合は、この時点で応答時間が条件93を満たすことになった通信クライアント(X)側に当該データ70を渡すことができる。これにより、PLC100において、通信クライアント(X)181の通信実行状態(状態ST3)と、通信クライアント(Y)182の通信実行状態(状態ST6)を並行して継続させることができて、通信クライアント(X)181,通信クライアント(Y)182の両者によるデータ70の上位通信コントローラ160による多重通信(例えば、時分割多重通信)が可能となる。
Referring to FIG. 20, in the communication execution state (state ST3) of
<N.実施の形態の更なる他の利点>
PLCの利用環境を考慮した利点を説明する。近年、PLCは、データベースシステムなどの外部装置と接続して、PLCで保持しているデータを、データベースシステムに蓄積する。これにより、データベースに接続する情報処理装置同士でのデータの共有を容易に、また、各種データを収集して、データの集計や解析などを容易化する。
<N. Still Other Advantages of Embodiment>
Advantages considering the usage environment of the PLC will be explained. In recent years, a PLC is connected to an external device such as a database system, and stores data held in the PLC in the database system. This facilitates sharing of data between information processing apparatuses connected to the database, and facilitates collection and analysis of data by collecting various data.
このような外部装置と接続するPLC内蔵の通信機能について、例えばCommon Industrial Protocol(CIP)を用いたPLC内蔵の通信機能は、2つの通信ポートに対応するために、各ポートに対応した通信スタックを提供する。 For communication functions built into the PLC that connect to such external devices, for example, a communication function built into the PLC that uses Common Industrial Protocol (CIP) supports two communication ports. offer.
このように2つの通信ポートを用いることで、PLC内で通信部を多重化するケースに比較して、本実施の形態に係るPLCは、物理的な通信ポート168を共用した通信部の多重化を実現するので、部品点数を少なくすることができる。また、PLC内の通信部が多重化されたとしても、サーバー400側において当該多重化に対応する特別な変更は要求されない。したがって、本実施の形態は、既存の制御システムを利用して実現することが可能となる。
By using two communication ports in this way, compared to the case of multiplexing the communication units within the PLC, the PLC according to the present embodiment multiplexes the communication units that share the
<O.付記>
上述したような本実施の形態は、以下のような技術思想を含む。
[構成1]
コントローラ(100)であって、
複数の通信プログラム(181,182)を実行する通信プログラム実行部(104)と、
制御対象を制御するためのユーザープログラム(186)であって、外部装置(400)と通信するための命令を含むユーザープログラムを実行するためのユーザープログラム実行部(104)と、
前記複数の通信プログラムのいずれにも接続可能に構成されて、前記複数の通信プログラムと前記外部装置との通信を制御する通信インターフェイス(160)と、
前記ユーザープログラム実行部による前記命令の実行時に、前記ユーザープログラム実行部から前記外部装置と通信するデータ(70)を受付け、前記データの宛先に基づき、前記複数の通信プログラムのうちから前記データを前記外部装置に送信する通信プログラムを決定する決定部(188)と、を備える、コントローラ。
[構成2]
前記コントローラは、各通信プログラムについて、通信スタック(191,192)を備える、構成1に記載のコントローラ。
[構成3]
前記決定部は、
各通信プログラムの実行状態と宛先(91)に基づき、複数の通信プログラムのうちから前記データを前記外部装置に送信する通信プログラムを決定する、構成1または2に記載のコントローラ。
[構成4]
前記決定部は、
前記宛先に基づく前記通信プログラムの前記実行状態が予め定められた条件(93)を満たすとき、当該通信プログラムを、前記データを前記外部装置に送信する通信プログラムとして決定する、構成3に記載のコントローラ。
[構成5]
前記通信プログラムの実行状態は、実行中における当該通信プログラムの通信の応答性能により示される、構成4に記載のコントローラ。
[構成6]
前記予め定められた条件は、前記応答性能の閾値(96)を含み、
前記閾値は、応答性能に関連した通信特徴量を用いた機械学習により決定する、構成4または5に記載のコントローラ。
[構成7]
前記決定部は、
前記宛先に基づく前記通信プログラムの前記実行状態が予め定められた条件を満たさないとき、他の前記通信プログラムを、前記データを前記外部装置に送信する通信プログラムとして決定する、構成4から6のいずれか1に記載のコントローラ。
[構成8]
前記決定部は、
前記宛先に基づく前記通信プログラムの前記実行状態が予め定められた条件を満たさないとき、前記データを格納部(1875)に出力する、構成4から6のいずれか1に記載のコントローラ。
[構成9]
前記コントローラは、
前記格納部のデータを、前記通信プログラムのうちの所定の通信プログラム(1821)を介して前記外部装置に送信する、構成8に記載のコントローラ。
[構成10]
前記宛先に基づく前記通信プログラムの種類と、前記所定の通信プログラムの種類とは異なり、
前記通信プログラムの種類は、当該通信プログラムがデータを伝送するための通信プロトコルの種類に対応する、構成9に記載のコントローラ。
[構成11]
前記外部装置は、データベースサーバーを含み、
前記通信プロトコルの種類は、前記データベースサーバーまたは前記データベースサーバーと前記コントローラとの通信を制御する通信部に接続するための通信プロトコルを含む、構成10に記載のコントローラ。
[構成12]
コントローラ(100)による制御方法であって、
複数の通信プログラム(181,182)を実行するステップ(R7)と、
制御対象を制御するためのユーザープログラム(186)であって、外部装置(400)と通信するための命令を含む前記ユーザープログラムを実行するステップ(R1)と、を備え、
前記コントローラは、
前記複数の通信プログラムのいずれにも接続可能に構成されて、前記複数の通信プログラムと前記外部装置との通信を制御する通信インターフェイス(160)を備え、
前記制御方法は、さらに、
前記ユーザープログラムの前記命令が実行されるときに、前記ユーザープログラムから前記外部装置と通信するデータ(70)を受付け、前記データの宛先に基づき、前記複数の通信プログラムのうちから当該データを前記外部装置に送信する通信プログラムを決定するステップ(S3,S5)を備える、制御方法。
[構成13]
構成12に記載の制御方法をコンピュータに実行させるためのプログラム。
<O. Note>
The present embodiment as described above includes the following technical ideas.
[Configuration 1]
a controller (100),
a communication program execution unit (104) that executes a plurality of communication programs (181, 182);
a user program execution unit (104) for executing a user program (186) for controlling a controlled object, the user program including instructions for communicating with an external device (400);
a communication interface (160) configured to be connectable to any of the plurality of communication programs and controlling communication between the plurality of communication programs and the external device;
receiving data (70) to be communicated with the external device from the user program execution unit when the instruction is executed by the user program execution unit, and selecting the data from among the plurality of communication programs based on the destination of the data; and a determination unit (188) for determining a communication program to be transmitted to an external device.
[Configuration 2]
The controller of arrangement 1, wherein the controller comprises a communication stack (191, 192) for each communication program.
[Configuration 3]
The decision unit
3. The controller according to configuration 1 or 2, wherein a communication program for transmitting the data to the external device is determined from among a plurality of communication programs based on the execution status and destination (91) of each communication program.
[Configuration 4]
The decision unit
The controller according to configuration 3, wherein when the execution state of the communication program based on the destination satisfies a predetermined condition (93), the communication program is determined as the communication program for transmitting the data to the external device. .
[Configuration 5]
The controller according to configuration 4, wherein the execution state of the communication program is indicated by communication response performance of the communication program during execution.
[Configuration 6]
The predetermined condition includes the response performance threshold (96),
The controller according to configuration 4 or 5, wherein the threshold is determined by machine learning using a communication feature quantity related to response performance.
[Composition 7]
The decision unit
7. Any one of configurations 4 to 6, wherein when the execution state of the communication program based on the destination does not satisfy a predetermined condition, another of the communication programs is determined as a communication program for transmitting the data to the external device. or 1. The controller according to 1.
[Configuration 8]
The decision unit
7. The controller according to any one of configurations 4 to 6, outputting said data to a storage unit (1875) when said execution state of said communication program based on said destination does not satisfy a predetermined condition.
[Composition 9]
The controller is
9. The controller according to configuration 8, wherein the data in the storage unit is transmitted to the external device via a predetermined communication program (1821) of the communication programs.
[Configuration 10]
Different from the type of the communication program based on the destination and the type of the predetermined communication program,
10. The controller of configuration 9, wherein the communication program type corresponds to a communication protocol type for transmitting data by the communication program.
[Configuration 11]
the external device includes a database server;
11. The controller according to
[Configuration 12]
A control method by a controller (100), comprising:
a step (R7) of executing a plurality of communication programs (181, 182);
a step (R1) of executing a user program (186) for controlling a controlled object, the user program comprising instructions for communicating with an external device (400);
The controller is
A communication interface (160) configured to be connectable to any of the plurality of communication programs and controlling communication between the plurality of communication programs and the external device,
The control method further comprises:
receiving data (70) to be communicated with the external device from the user program when the instruction of the user program is executed, and transmitting the data from among the plurality of communication programs to the external device based on the destination of the data; A control method comprising steps (S3, S5) of determining a communication program to be transmitted to the device.
[Composition 13]
A program for causing a computer to execute the control method according to configuration 12.
今回開示された実施の形態はすべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は、上記した説明ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 It should be considered that the embodiments disclosed this time are illustrative in all respects and not restrictive. The scope of the present invention is indicated by the scope of the claims rather than the above description, and is intended to include all modifications within the scope and meaning equivalent to the scope of the claims.
1 制御システム、68 ポート、70 データ、80 アドレス変換テーブル、90,901,902 割付ルール、95 状態情報、96,TH 閾値、97 学習閾、100 コントローラ、112 ネットワーク、120 プロセッサ、128 不揮発性メモリ、160 上位通信コントローラ、168 通信ポート、181 通信クライアント(X)、182 通信クライアント(Y)、185 ハイパーバイザ、186 ユーザープログラム、187 システムプログラム、188,1881 割付部、189,1891 監視部、190 ハードウェアリソース、191,192 通信スタック、1811 DB接続通信クライアント、1821 FTP通信クライアント、1872 学習部、1874 データバッファ、1875 格納部、P1,P2 パターン、RP 代表値。
1 control system, 68 ports, 70 data, 80 address conversion table, 90, 901, 902 allocation rule, 95 state information, 96, TH threshold, 97 learning threshold, 100 controller, 112 network, 120 processor, 128 non-volatile memory, 160 host communication controller, 168 communication port, 181 communication client (X), 182 communication client (Y), 185 hypervisor, 186 user program, 187 system program, 188, 1881 allocation section, 189, 1891 monitoring section, 190
Claims (13)
前記コントローラを外部のフィールドバスに接続するフィールドバスコネクタと、
前記コントローラを外部のネットワークに接続する通信ポートと、
複数の通信プログラムを実行する通信プログラム実行部と、
前記フィールドバスを介して、前記コントローラの外部に設けられた制御対象と通信し当該制御対象を制御するためのユーザープログラムであって、前記ネットワークを介して、前記コントローラの外部に設けられた外部装置と通信するための命令を含む前記ユーザープログラムを実行するためのユーザープログラム実行部と、
前記複数の通信プログラムが共用するように構成されて、前記複数の通信プログラムと前記外部装置との前記ネットワークを介した通信を制御する通信インターフェイスと、
前記ユーザープログラム実行部による前記命令の実行時に、前記ユーザープログラム実行部から前記外部装置に送信されるデータを受付け、前記データの宛先に基づき、前記複数の通信プログラムのうちから前記データを前記外部装置に送信する通信プログラムを決定する決定部と、を備え、
各前記複数の通信プログラムは、前記コントローラが、サーバーとしての前記外部装置と通信するための通信クライアントプログラムを含み、
前記外部装置に送信されるデータは、前記ユーザープログラムが前記制御対象と通信するデータと、当該制御対象と通信するデータをデータベースに蓄積するためのデータベース操作命令とを含む、コントローラ。 is a controller,
a fieldbus connector that connects the controller to an external fieldbus;
a communication port that connects the controller to an external network;
a communication program execution unit that executes a plurality of communication programs;
A user program for communicating with a controlled object provided outside the controller via the fieldbus and controlling the controlled object, the external device provided outside the controller via the network. a user program execution unit for executing the user program containing instructions for communicating with
a communication interface configured to be shared by the plurality of communication programs and controlling communication between the plurality of communication programs and the external device via the network;
receiving data transmitted from the user program execution unit to the external device when the instruction is executed by the user program execution unit, and transmitting the data from among the plurality of communication programs to the external device based on the destination of the data; a determination unit that determines a communication program to be transmitted to
each of the plurality of communication programs includes a communication client program for the controller to communicate with the external device as a server;
A controller, wherein the data transmitted to the external device includes data for the user program to communicate with the controlled object, and a database operation instruction for accumulating the data for communicating with the controlled object in a database.
各前記通信プログラムの実行状態と前記宛先に基づき、前記複数の通信プログラムのうちから前記データを前記外部装置に送信する通信プログラムを決定する、請求項1または2に記載のコントローラ。 The decision unit
3. The controller according to claim 1, wherein a communication program for transmitting said data to said external device is determined from among said plurality of communication programs based on the execution status and said destination of each of said communication programs.
前記宛先に基づく前記通信プログラムの前記実行状態が予め定められた条件を満たすとき、当該通信プログラムを、前記データを前記外部装置に送信する通信プログラムとして決定する、請求項3に記載のコントローラ。 The decision unit
4. The controller according to claim 3, wherein when said execution state of said communication program based on said destination satisfies a predetermined condition, said communication program is determined as a communication program for transmitting said data to said external device.
前記閾値は、応答性能に関連した通信特徴量を用いた機械学習により決定する、請求項5に記載のコントローラ。 The predetermined condition includes the response performance threshold,
6. The controller according to claim 5, wherein said threshold is determined by machine learning using communication feature quantities related to response performance.
前記宛先に基づく前記通信プログラムの前記実行状態が予め定められた条件を満たさないとき、他の前記通信プログラムを、前記データを前記外部装置に送信する通信プログラムとして決定する、請求項4から6のいずれか1項に記載のコントローラ。 The decision unit
7. The method according to claim 4, wherein when said execution state of said communication program based on said destination does not satisfy a predetermined condition, another said communication program is determined as a communication program for transmitting said data to said external device. A controller according to any one of the preceding claims.
前記宛先に基づく前記通信プログラムの前記実行状態が予め定められた条件を満たさないとき、前記データを格納部に出力する、請求項4から6のいずれか1項に記載のコントローラ。 The decision unit
7. The controller according to any one of claims 4 to 6, wherein said data is output to a storage unit when said execution state of said communication program based on said destination does not satisfy a predetermined condition.
前記格納部のデータを、前記通信プログラムのうちの所定の通信プログラムを介して前記外部装置に送信する、請求項8に記載のコントローラ。 The controller is
9. The controller according to claim 8, wherein the data in said storage unit is transmitted to said external device via a predetermined communication program among said communication programs.
前記通信プログラムの種類は、当該通信プログラムがデータを伝送するための通信プロトコルの種類に対応する、請求項9に記載のコントローラ。 Different from the type of the communication program based on the destination and the type of the predetermined communication program,
10. The controller according to claim 9, wherein the communication program type corresponds to a communication protocol type for transmitting data by the communication program.
前記通信プロトコルの種類は、前記データベースサーバーに接続するための通信プロトコルを含む、請求項10に記載のコントローラ。 The external device includes a database server or a communication unit that controls communication between the database server and the controller,
11. The controller of claim 10, wherein the communication protocol type includes a communication protocol for connecting to the database server.
前記コントローラは、
当該コントローラを外部のフィールドバスに接続するフィールドバスコネクタと、前記コントローラを外部のネットワークに接続する通信ポートとを備え、
前記制御方法は、
複数の通信プログラムを実行するステップと、
前記フィールドバスを介して、前記コントローラの外部に設けられた制御対象と通信し当該制御対象を制御するためのユーザープログラムであって、前記ネットワークを介して、前記コントローラの外部に設けられた外部装置と通信するための命令を含む前記ユーザープログラムを実行するステップと、を備え、
各前記複数の通信プログラムは、前記コントローラが、サーバーとしての前記外部装置と通信するための通信クライアントプログラムを含み、
前記コントローラは、
前記複数の通信プログラムが共用するように構成されて、前記複数の通信プログラムと前記外部装置との前記ネットワークを介した通信を制御する通信インターフェイスを備え、
前記制御方法は、さらに、
前記ユーザープログラムの前記命令が実行されるときに、前記ユーザープログラムから前記外部装置に送信されるデータを受付け、前記データの宛先に基づき、前記複数の通信プログラムのうちから当該データを前記外部装置に送信する通信プログラムを決定するステップを備え、
前記外部装置に送信されるデータは、前記ユーザープログラムが前記制御対象と通信するデータと、当該制御対象と通信するデータをデータベースに蓄積するためのデータベース操作命令を含む、制御方法。 A control method by a controller,
The controller is
A fieldbus connector that connects the controller to an external fieldbus, and a communication port that connects the controller to an external network,
The control method is
executing a plurality of communication programs;
A user program for communicating with a controlled object provided outside the controller via the fieldbus and controlling the controlled object, the external device provided outside the controller via the network. executing the user program comprising instructions for communicating with
each of the plurality of communication programs includes a communication client program for the controller to communicate with the external device as a server;
The controller is
a communication interface configured to be shared by the plurality of communication programs and controlling communication between the plurality of communication programs and the external device via the network;
The control method further comprises:
receiving data transmitted from the user program to the external device when the instruction of the user program is executed, and transmitting the data from among the plurality of communication programs to the external device based on the destination of the data comprising a step of determining a communication program to be transmitted;
The control method according to claim 1, wherein the data transmitted to the external device includes data for the user program to communicate with the controlled object and a database operation instruction for accumulating the data for communicating with the controlled object in a database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2021189951A JP7294391B2 (en) | 2018-02-26 | 2021-11-24 | Controller, control method and program |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018032043A JP7013934B2 (en) | 2018-02-26 | 2018-02-26 | controller |
JP2021189951A JP7294391B2 (en) | 2018-02-26 | 2021-11-24 | Controller, control method and program |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018032043A Division JP7013934B2 (en) | 2018-02-26 | 2018-02-26 | controller |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2022020837A JP2022020837A (en) | 2022-02-01 |
JP7294391B2 true JP7294391B2 (en) | 2023-06-20 |
Family
ID=86772726
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2021189951A Active JP7294391B2 (en) | 2018-02-26 | 2021-11-24 | Controller, control method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7294391B2 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005123766A (en) | 2003-10-15 | 2005-05-12 | Eikosha:Kk | Communication control apparatus |
JP2007295608A (en) | 2007-06-15 | 2007-11-08 | Omron Corp | Programmable controller and duplicated network system |
JP2014157506A (en) | 2013-02-15 | 2014-08-28 | Omron Corp | Controller, information processing device, and program |
JP2015125654A (en) | 2013-12-26 | 2015-07-06 | オムロン株式会社 | Controller and communication control method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3690639B2 (en) * | 1998-05-27 | 2005-08-31 | オムロン株式会社 | Programmable logic controller, communication condition setting method thereof, and communication condition setting system |
-
2021
- 2021-11-24 JP JP2021189951A patent/JP7294391B2/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005123766A (en) | 2003-10-15 | 2005-05-12 | Eikosha:Kk | Communication control apparatus |
JP2007295608A (en) | 2007-06-15 | 2007-11-08 | Omron Corp | Programmable controller and duplicated network system |
JP2014157506A (en) | 2013-02-15 | 2014-08-28 | Omron Corp | Controller, information processing device, and program |
JP2015125654A (en) | 2013-12-26 | 2015-07-06 | オムロン株式会社 | Controller and communication control method |
Also Published As
Publication number | Publication date |
---|---|
JP2022020837A (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102362481B (en) | Log collection data harvester for use in building automation system | |
US7127558B2 (en) | Virtualization controller, access path control method and computer system | |
CN103403692B (en) | Data transmission device | |
US20120222029A1 (en) | Method of monitoring performance of virtual computer and apparatus using the method | |
US20140201356A1 (en) | Monitoring system of managing cloud-based hosts and monitoring method using for the same | |
JP7059673B2 (en) | Control devices, control systems, control methods, and control programs | |
CN112583683B (en) | Master-slave CAN FD bus application layer communication method and system and electronic equipment | |
CN102608923B (en) | Control system and SOE device | |
JP7013934B2 (en) | controller | |
JP2019139630A (en) | Control device, control system, control method, and control program | |
CN103809502A (en) | Controller and program | |
JP7294391B2 (en) | Controller, control method and program | |
JP5066222B2 (en) | Network analysis support device, network analysis support method, and program | |
JP6279816B2 (en) | Storage monitoring system and monitoring method thereof | |
JP5879117B2 (en) | Information processing system and operation management method | |
CN110071948B (en) | Internet of things domain control method and system and Internet of things system | |
JP5751372B2 (en) | Data processing system, computer program thereof, and data processing method | |
JP2011095830A (en) | Information collection device | |
JP7324315B2 (en) | data collection device | |
JP2014142683A (en) | Monitoring control system | |
CN115794367A (en) | Computing engine, method, medium, and system for operating the same | |
JP2022091323A (en) | Data management device and program | |
KR101554556B1 (en) | Monitoring apparatus and control method thereof | |
JP2001318710A (en) | System controller and data transmission/reception method in production system | |
WO2013024524A1 (en) | History recording device and history recording method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20211222 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211222 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20221125 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20221129 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20221226 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230117 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230208 |
|
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: 20230509 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230522 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7294391 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |