JP2019144762A - Programmable controller - Google Patents
Programmable controller Download PDFInfo
- Publication number
- JP2019144762A JP2019144762A JP2018027217A JP2018027217A JP2019144762A JP 2019144762 A JP2019144762 A JP 2019144762A JP 2018027217 A JP2018027217 A JP 2018027217A JP 2018027217 A JP2018027217 A JP 2018027217A JP 2019144762 A JP2019144762 A JP 2019144762A
- Authority
- JP
- Japan
- Prior art keywords
- application
- function unit
- variable
- data
- shared memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明の実施形態は、プログラマブルコントローラに関する。 Embodiments described herein relate generally to a programmable controller.
プログラマブルロジックコントローラ(所謂、プログラマブルコントローラ)に対して、ソフトウェア機能部を追加し、1台のプログラマブルコントローラを多用な用途に使用可能とする技術が開発されている。 A technique has been developed in which a software function unit is added to a programmable logic controller (so-called programmable controller) so that one programmable controller can be used for various purposes.
上述したように、プログラマブルコントローラは、多様な用途で使用可能であり、一例として、外部装置を制御するアプリケーションを作成するエンジニアリングツールと、当該エンジニアリングツールから入力されるアプリケーションで用いられる変数のデータを共有メモリに保存しかつ当該共有メモリに記憶されるデータを用いて当該アプリケーションを実行するコントローラ機能部と、共有メモリに記憶されるデータを読み出す処理を実行するソフトウェア機能部と、を1台で実現することが提案されている。ところで、共有メモリに記憶される変数のデータの記憶領域のアドレスは、エンジニアリングツールからコントローラ機能部に対してアプリケーションが出力される度に割り当て直される。そのため、ソフトウェア機能部は、共有メモリから変数のデータを読み出す際に、変数のデータに割り当てられる記憶領域のアドレスが不明となり、共有メモリから変数のデータを読み出せない場合がある。 As described above, the programmable controller can be used for a variety of purposes. For example, the engineering tool for creating an application for controlling an external device and the variable data used in the application input from the engineering tool are shared. A controller function unit that executes the application using data stored in the memory and stored in the shared memory and a software function unit that executes a process of reading data stored in the shared memory are realized by a single unit. It has been proposed. By the way, the address of the storage area of the variable data stored in the shared memory is reassigned every time an application is output from the engineering tool to the controller function unit. For this reason, when the software function unit reads the variable data from the shared memory, the address of the storage area allocated to the variable data becomes unknown, and the variable data may not be read from the shared memory.
実施形態のプログラマブルコントローラは、共有メモリと、プロセッサと、を備える。プロセッサは、外部装置を制御する第1アプリケーションを作成するエンジニアリングツールと、エンジニアリングツールから入力された第1アプリケーションで用いられる変数のデータを、共有メモリにおいて当該データに割り当てられるアドレスの記憶領域に保存し、データを用いて第1アプリケーションを実行するコントローラ機能部と、共有メモリに記憶されるデータを読み出す第2アプリケーションを実行するソフトウェア機能部と、をプログラムの実行により実現する。エンジニアリングツールは、コントローラ機能部に対して第1アプリケーションを出力する度に、変数と、当該変数のデータに割り当てられたアドレスと、が対応付けられかつソフトウェア機能部により参照可能なテーブルを作成する。 The programmable controller of the embodiment includes a shared memory and a processor. The processor stores an engineering tool for creating a first application for controlling an external device and variable data used in the first application input from the engineering tool in a storage area of an address assigned to the data in the shared memory. The controller function unit that executes the first application using data and the software function unit that executes the second application that reads data stored in the shared memory are realized by executing the program. Each time the engineering tool outputs the first application to the controller function unit, the engineering tool creates a table in which the variable is associated with the address assigned to the data of the variable and can be referred to by the software function unit.
以下、添付の図面を用いて、本実施形態にかかるプログラマブルロジックコントローラ(所謂、プログラマブルコントローラ)について説明する。 Hereinafter, a programmable logic controller (so-called programmable controller) according to the present embodiment will be described with reference to the accompanying drawings.
(第1の実施形態)
図1は、第1の実施形態にかかるプログラマブルコントローラの構成の一例を示す図である。本実施形態にかかるプログラマブルコントローラは、計装分野において用いられる制御装置である。図1に示すように、プログラマブルコントローラは、CPU(Central Processing Unit、プロセッサの一例)1と、共有メモリ2と、通信インタフェース3と、を有する。CPU1は、記憶部に記憶されるプログラムを実行することにより、エンジニアリングツール101と、コントローラ機能部102と、ソフトウェア機能部103と、を実現する。
(First embodiment)
FIG. 1 is a diagram illustrating an example of a configuration of a programmable controller according to the first embodiment. The programmable controller according to the present embodiment is a control device used in the instrumentation field. As shown in FIG. 1, the programmable controller includes a CPU (Central Processing Unit, an example of a processor) 1, a shared
エンジニアリングツール101は、I/O機器4(外部装置の一例)の制御に用いる各種情報の設定を行う。本実施形態では、エンジニアリングツール101は、通信インタフェース3を介してI/O機器4との間で制御データを入出力する処理など、I/O機器4を制御する処理を実行する第1アプリケーション104を作成する。そして、エンジニアリングツール101は、作成した第1アプリケーション104をコンパイルしてコントローラ機能部102に出力する。
The
コントローラ機能部102は、エンジニアリングツール101により設定される各種設定に従って、I/O機器4の制御を行う。本実施形態では、コントローラ機能部102は、エンジニアリングツール101から第1アプリケーション104が入力される。また、コントローラ機能部102は、第1アプリケーション104で用いられる変数のデータを、共有メモリ2において、当該データに割り当てられたアドレスの記憶領域に保存する。本実施形態では、CPU1により実行されるOSが、変数のデータに対して、共有メモリ2において当該データを保存する記憶領域のアドレスを割り当てる。さらに、コントローラ機能部102は、共有メモリ2に記憶される変数のデータを用いて、第1アプリケーション104を実行する。これにより、コントローラ機能部102は、I/O機器4との間での制御データの入出力処理など、I/O機器4を制御する処理を実行する。
The
ソフトウェア機能部103は、コントローラ機能部102によるI/O機器4の制御結果の表示やコントローラ機能部102によるI/O機器4の制御処理の監視等の各種処理を実行する。本実施形態では、ソフトウェア機能部103は、ミドルウェア106およびAPI(Application Programming Interface)107を有する。また、ソフトウェア機能部103は、共有メモリ2から、I/O機器4の制御結果の表示やI/O機器4の制御処理の監視等に用いる変数のデータを読み出す第2アプリケーション105を実行する。本実施形態では、第2アプリケーション105は、ミドルウェア106およびAPI107を介して、共有メモリ2にアクセスして、当該共有メモリ2に記憶される変数のデータを読み出す。
The
図2は、第1の実施形態にかかるプログラマブルコントローラのソフトウェア機能部による第2アプリケーションの実行処理の流れの一例を示すフローチャートである。次に、図2を用いて、本実施形態にかかるプログラマブルコントローラのソフトウェア機能部103による第2アプリケーション105の実行処理の流れの一例について説明する。
FIG. 2 is a flowchart illustrating an example of a flow of execution processing of the second application by the software function unit of the programmable controller according to the first embodiment. Next, an example of the flow of execution processing of the
エンジニアリングツール101は、第1アプリケーション104を作成し、当該作成した第1アプリケーション104をコンパイルしてコントローラ機能部102に出力する(ステップS201)。その際、CPU1により実行されるOSは、第1アプリケーション104で用いられる変数のデータに対して、共有メモリ2において、当該変数のデータを保存する記憶領域のアドレスを割り当てる(ステップS202)。本実施形態では、CPU1により実行されるOSは、エンジニアリングツール101からコントローラ機能部102に対して第1アプリケーション104が出力される度に、変数のデータに対してアドレスを割り当て直す。
The
また、エンジニアリングツール101は、コントローラ機能部102に対して第1アプリケーション104を出力する度に、下記の表1に示す変数データテーブル(テーブルの一例)を作成する(ステップS203)。表1に示すように、変数データテーブルは、第1アプリケーション104の変数(例えば、「変数_0000」)と、当該変数のデータに割り当てられたアドレス(例えば、「AD1_0000」)と、が対応付けられ、かつソフトウェア機能部103により参照可能なテーブルである。本実施形態では、エンジニアリングツール101は、作成した変数データテーブルを、共有メモリ2に保存することにより、当該変数データテーブルを、ソフトウェア機能部103により参照可能とする。これにより、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直された場合でも、共有メモリ2内で変数のデータが記憶された記憶領域をソフトウェア機能部103が特定できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、第2アプリケーション105を実行できる。
コントローラ機能部102は、エンジニアリングツール101から入力される第1アプリケーション104で用いられる変数のデータを、共有メモリ2において、当該データに割り当てられたアドレスの記憶領域に保存する(ステップS204)。これにより、共有メモリ2内における変数のデータの配置を最適化する。また、コントローラ機能部102は、共有メモリ2に記憶される変数のデータを用いて、第1アプリケーション104を実行して、I/O機器4との間での制御データの入出力処理など、I/O機器4を制御する処理を行う(ステップS205)。
The
ソフトウェア機能部103は、第2アプリケーション105を実行する。第2アプリケーション105は、共有メモリ2に記憶される変数データテーブルを読み出す(ステップS206)。次いで、第2アプリケーション105は、読み出した変数データテーブルにおいて、I/O機器4の制御結果の表示やI/O機器4の制御処理の監視等の処理に用いる読出対象の変数と対応付けられるアドレスを特定する(ステップS207)。そして、第2アプリケーション105は、共有メモリ2から、当該特定したアドレスの記憶領域に記憶される変数のデータを読み出す(ステップS208)。さらに、第2アプリケーション105は、読み出した変数のデータを用いて、I/O機器4の制御結果の表示やI/O機器4の制御処理の監視等の処理を実行する(ステップS209)。
The
図3は、第1の実施形態にかかるプログラマブルコントローラのソフトウェア機能部による第2アプリケーションの実行処理の一例を説明するための図である。次に、図3を用いて、本実施形態にかかるプログラマブルコントローラのソフトウェア機能部103による第2アプリケーション105の実行処理の一例について説明する。
FIG. 3 is a diagram for explaining an example of execution processing of the second application by the software function unit of the programmable controller according to the first embodiment. Next, an example of execution processing of the
ソフトウェア機能部103の第2アプリケーション105は、ミドルウェア106およびAPI107を介して、共有メモリ2から、変数データテーブルを読み出す。次に、第2アプリケーション105は、変数データテーブルにおいて、第2アプリケーション105で用いる変数(例えば、変数_0000)と対応付けられるアドレス(例えば、AD1_0000)を特定する。そして、第2アプリケーション105は、ミドルウェア106およびAPI107を介して、共有メモリ2のうち当該特定したアドレスの記憶領域から、変数のデータを読み出す。その後、第2アプリケーション105は、ミドルウェア106およびAPI107を介して取得した変数のデータを用いて、I/O機器4の制御結果の表示やI/O機器4の制御処理の監視等の処理を行う。
The
このように、第1の実施形態にかかるプログラマブルコントローラによれば、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直された場合でも、共有メモリ2内で変数のデータが記憶される記憶領域をソフトウェア機能部103が特定できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、第2アプリケーション105を実行できる。
As described above, according to the programmable controller according to the first embodiment, even when the address is reassigned to the variable data every time the
(第2の実施形態)
本実施形態は、エンジニアリングツールとソフトウェア機能部との間で通信可能とするインタフェース部を備える例である。以下の説明では、第1の実施形態と同様の構成については説明を省略する。
(Second Embodiment)
This embodiment is an example including an interface unit that enables communication between an engineering tool and a software function unit. In the following description, description of the same configuration as that of the first embodiment is omitted.
図4は、第2の実施形態にかかるプログラマブルコントローラの構成の一例を示す図である。図4に示すように、本実施形態にかかるプログラマブルコントローラのCPU400は、記憶部に記憶されるプログラムを実行することにより、エンジニアリングツール401、コントローラ機能部102、およびソフトウェア機能部402に加えて、インタフェース部403を実現する。
FIG. 4 is a diagram illustrating an example of a configuration of a programmable controller according to the second embodiment. As shown in FIG. 4, the
インタフェース部403は、APIやOS等により実現され、エンジニアリングツール401とソフトウェア機能部402との間で通信可能とする。ソフトウェア機能部402は、第2アプリケーション105が用いる変数をエンジニアリングツール101に出力する。
The
エンジニアリングツール401は、インタフェース部403を介して、ソフトウェア機能部402から、変数が入力される。そして、エンジニアリングツール401は、入力され変数のデータをソフトウェア機能部402(第2アプリケーション105)に出力する。これにより、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直された場合でも、ソフトウェア機能部402がエンジニアリングツール401から変数のデータを取得できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、エンジニアリングツール401から入力される変数のデータを用いて、第2アプリケーション105を実行できる。
The
図5は、第2の実施形態にかかるプログラマブルコントローラのソフトウェア機能部により第2アプリケーションの実行処理の流れの一例を示すフローチャートである。次に、図5を用いて、本実施形態にかかるプログラマブルコントローラのソフトウェア機能部402による第2アプリケーション105の実行処理の流れの一例について説明する。
FIG. 5 is a flowchart illustrating an example of a flow of execution processing of the second application by the software function unit of the programmable controller according to the second embodiment. Next, an example of the flow of execution processing of the
エンジニアリングツール401は、第1アプリケーション104を作成し、当該作成した第1アプリケーション104をコンパイルしてコントローラ機能部102に出力する(ステップS501)。その際、CPU400により実行されるOSは、第1アプリケーション104で用いられる変数のデータに対して、共有メモリ2において、当該変数のデータを保存する記憶領域のアドレスを割り当てる(ステップS502)。本実施形態においても、CPU400により実行されるOSは、エンジニアリングツール401からコントローラ機能部102に対して第1アプリケーション104が出力される度に、変数のデータに対してアドレスを割り当て直す。
The
コントローラ機能部102は、エンジニアリングツール401から入力される第1アプリケーション104で用いられる変数のデータを、共有メモリ2において、当該データに割り当てられたアドレスの記憶領域に保存する(ステップS503)。これにより、共有メモリ2内における変数のデータの配置を最適化する。また、コントローラ機能部102は、共有メモリ2に記憶される変数のデータを用いて、第1アプリケーション104を実行して、I/O機器4との間での制御データの入出力処理など、I/O機器4を制御する処理を行う(ステップS504)。
The
ソフトウェア機能部402は、インタフェース部403を介して、エンジニアリングツール401に対して、第2アプリケーション105が用いる変数を出力する(ステップS505)。エンジニアリングツール401は、ソフトウェア機能部402から変数が入力されると、当該変数のデータを、インタフェース部403を介して、ソフトウェア機能部402に出力する(ステップS506)。
The
本実施形態では、ソフトウェア機能部402は、第2アプリケーション105が用いる変数のデータを取得する際、エンジニアリングツール401に対して、変数を出力しているが、これに限定するものではない。例えば、第2アプリケーション105が用いる変数のデータが、共有メモリ2において、静的アドレスが示す記憶領域に記憶される変数のデータである場合、ソフトウェア機能部402は、変数に代えて、静的アドレスを、インタフェース部403を介して、エンジニアリングツール401に出力しても良い。ここで、静的アドレスは、変数のデータに対するアドレスの割り当て直しの前後において、共有メモリ2内の同一の記憶領域に保存される変数のデータに付与するアドレスである。すなわち、静的アドレスは、共有メモリ2内において、アドレスの割り当て直しが行われない変数のデータが保存される記憶領域のアドレスである。エンジニアリングツール401は、ソフトウェア機能部402から、静的アドレスが入力された場合、当該入力された静的アドレスの記憶領域に記憶された変数のデータを、インタフェース部403を介して、ソフトウェア機能部402に出力する。
In the present embodiment, the
ソフトウェア機能部402は、第2アプリケーション105を実行する。第2アプリケーション105は、エンジニアリングツール401から変数のデータが入力されると、当該データを用いて、I/O機器4の制御結果の表示やI/O機器4の監視等の処理を実行する(ステップS507)。これにより、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直されて、当該変数のデータに割り当てられたアドレスが不明であっても、エンジニアリングツール401から、第2アプリケーション105が用いる変数のデータを取得できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、第2アプリケーション105を実行できる。
The
図6は、第2の実施形態にかかるプログラマブルコントローラのソフトウェア機能部による第2アプリケーションの実行処理の具体例を説明するための図である。次に、図6を用いて、本実施形態にかかるプログラマブルコントローラのソフトウェア機能部402による第2アプリケーション105の実行処理の具体例について説明する。
FIG. 6 is a diagram for explaining a specific example of execution processing of the second application by the software function unit of the programmable controller according to the second embodiment. Next, a specific example of execution processing of the
ソフトウェア機能部402において第2アプリケーション105を実行する場合、ソフトウェア機能部402は、インタフェース部403を介して、エンジニアリングツール401に対して、第2アプリケーション105が用いる変数(例えば、変数_0001)を出力する。次いで、エンジニアリングツール401は、ソフトウェア機能部402から入力された変数(例えば、変数_0001)に基づいて、当該変数のデータ(例えば、DT_0001)を、インタフェース部403を介して、ソフトウェア機能部402に出力する。そして、ソフトウェア機能部402の第2アプリケーション105は、エンジニアリングツール401から入力された変数のデータ(例えば、DT_0001)を用いて、I/O機器4の制御結果の表示やI/O機器4の監視等の処理を行う。これにより、ソフトウェア機能部402において、第2アプリケーション105を実行する際に、共有メモリ2から変数のデータを読み出す必要が無いため、共有メモリ2へのアクセスにより生じる処理負荷を軽減でき、共有メモリ2に記憶される変数のデータを用いて実行される第1アプリケーション104による処理(例えば、入出力処理)が滞ることを防止できる。
When executing the
このように、第2の実施形態にかかるプログラマブルコントローラによれば、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直されて、当該変数のデータに割り当てられたアドレスが不明であっても、エンジニアリングツール401から、第2アプリケーション105が用いる変数のデータを取得できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、第2アプリケーション105を実行できる。
As described above, according to the programmable controller according to the second embodiment, each time the
(第3の実施形態)
本実施形態は、共有メモリとは異なる記憶部をさらに備え、エンジニアリングツールは、作成したテーブルを記憶部に保存し、ソフトウェア機能部は、記憶部に記憶されるテーブルにおいて、第2アプリケーションで用いる変数と対応付けられるアドレスを特定するAPIを含む例である。以下の説明では、第1の実施形態と同様の構成については説明を省略する。
(Third embodiment)
The present embodiment further includes a storage unit different from the shared memory, the engineering tool stores the created table in the storage unit, and the software function unit uses a variable used in the second application in the table stored in the storage unit It is an example including API which specifies the address matched with. In the following description, description of the same configuration as that of the first embodiment is omitted.
図7は、第3の実施形態にかかるプログラマブルコントローラの構成の一例を示す図である。本実施形態にかかるプログラマブルコントローラは、CPU700、共有メモリ2、および通信I/F3に加えて、共有メモリ2とは異なる記憶部の一例であるHDD(Hard Disk Drive)705を備える。また、本実施形態にかかるプログラマブルコントローラのCPU700は、エンジニアリングツール701およびソフトウェア機能部702における処理が、第1の実施形態にかかるプログラマブルコントローラと異なる。
FIG. 7 is a diagram illustrating an example of a configuration of a programmable controller according to the third embodiment. The programmable controller according to the present embodiment includes an HDD (Hard Disk Drive) 705 that is an example of a storage unit different from the shared
本実施形態では、エンジニアリングツール701は、コントローラ機能部102に対して第1アプリケーション104を出力する度に作成する変数データテーブルを、HDD705に保存する。
In the present embodiment, the
本実施形態では、ソフトウェア機能部702のAPI704は、ミドルウェア703を介して、第2アプリケーション105が用いる変数を取得する。そして、API704は、HDD705に記憶される変数データテーブルにおいて、ミドルウェア703から取得した変数と対応付けられるアドレスを特定し、特定したアドレスを、ミドルウェア703を介して、第2アプリケーション105に通知する。そして、第2アプリケーション105は、共有メモリ2において、API704により特定されたアドレスの記憶領域から変数のデータを読み出す。
In the present embodiment, the
これにより、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直された場合でも、ソフトウェア機能部702において共有メモリ2内で変数のデータが記憶された記憶領域を特定できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、共有メモリ2から変数のデータを読み出して、第2アプリケーション105を実行できる。
Thus, every time the
図8は、第3の実施形態にかかるプログラマブルコントローラのソフトウェア機能部による第2アプリケーションの実行処理の流れの一例を示すフローチャートである。次に、図8を用いて、本実施形態にかかるプログラマブルコントローラのソフトウェア機能部702による第2アプリケーション105の実行処理の流れの一例について説明する。以下の説明では、図2と同様の処理については説明を省略する。
FIG. 8 is a flowchart illustrating an example of a flow of execution processing of the second application by the software function unit of the programmable controller according to the third embodiment. Next, an example of the flow of execution processing of the
エンジニアリングツール701は、コントローラ機能部102に対して第1アプリケーション104を出力する度に、変数データテーブルを作成し、当該作成した変数データテーブルをHDD705に保存する(ステップS801)。これにより、変数データテーブルを、ソフトウェア機能部702により参照可能とする。
The
その後、ソフトウェア機能部702の第2アプリケーション105は、当該第2アプリケーション105が用いる変数を、ミドルウェア703を介して、API704に出力する(ステップS802)。次いで、API704は、HDD705に記憶される変数データテーブルにおいて、ミドルウェア703から入力される変数と対応付けられるアドレスを特定する(ステップS803)。そして、API704は、特定したアドレスを、ミドルウェア703を介して、第2アプリケーション105に通知する。第2アプリケーション105は、共有メモリ2から、API704により特定されたアドレスの記憶領域に記憶される変数のデータを読み出す(ステップS804)。さらに、第2アプリケーション105は、読み出された変数のデータを用いて、I/O機器4の制御結果の表示やI/O機器4の制御処理の監視等の処理を実行する(ステップS209)。
Thereafter, the
図9は、第3の実施形態にかかるプログラマブルコントローラのソフトウェア機能部により第2アプリケーションの実行処理の具体例を説明するための図である。例えば、エンジニアリングツール701は、コントローラ機能部102に対して、第1アプリケーション104を出力する。その後、エンジニアリングツール701は、第1アプリケーション104を出力する度に作成する変数データテーブルを、HDD705に保存する。
FIG. 9 is a diagram for explaining a specific example of the execution process of the second application by the software function unit of the programmable controller according to the third embodiment. For example, the
そして、コントローラ機能部102によって、共有メモリ2に記憶される変数のデータを用いて第1アプリケーション104が実行されて、I/O機器4との間で制御データの入出力処理等が行われると、ソフトウェア機能部702の第2アプリケーション105は、ミドルウェア703を介して、API704に対して、I/O機器4の制御結果の表示やI/O機器4の制御処理の監視等の処理で用いる変数を出力する。
Then, the
API704は、変数(例えば、変数_0001)が入力されると、HDD705に記憶される変数データテーブルにおいて、変数(例えば、変数_0001)と対応付けられるアドレス(例えば、AD1_0001)を特定する。そして、API704は、特定したアドレス(例えば、AD1_0001)を、ミドルウェア703を介して、第2アプリケーション105に通知する。第2アプリケーション105は、共有メモリ2から、API704により特定されたアドレス(例えば、AD1_0001)の記憶領域に記憶される変数のデータ(例えば、DT_0001)を読み出す。第2アプリケーション105は、読み出された変数のデータ(例えば、DT_0001)を用いて、I/O機器4の制御結果の表示やI/O機器4の監視等の処理を実行する。これにより、共有メモリ2に対して1回アクセスするだけで、変数のデータを取得できるので、共有メモリ2のアクセスによりソフトウェア機能部702にかかる処理負荷を軽減できる。
When a variable (for example, variable_0001) is input, the
このように、第3の実施形態にかかるプログラマブルコントローラによれば、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直された場合でも、ソフトウェア機能部702において共有メモリ2内で変数のデータが記憶された記憶領域を特定できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、共有メモリ2から変数のデータを読み出して、第2アプリケーション105を実行できる。
As described above, according to the programmable controller according to the third embodiment, the software function unit even when the address is reassigned to the variable data every time the
(第4の実施形態)
本実施形態は、ソフトウェア機能部により参照可能な変数データテーブルを作成する処理、またはインタフェース部を介して、ソフトウェア機能部から入力された変数のデータをソフトウェア機能部に出力する処理を選択可能とする例である。以下の説明では、上述の実施形態と同様の構成については説明を省略する。
(Fourth embodiment)
In this embodiment, it is possible to select a process for creating a variable data table that can be referred to by the software function unit, or a process for outputting variable data input from the software function unit to the software function unit via the interface unit. It is an example. In the following description, description of the same configuration as that of the above-described embodiment is omitted.
図10は、第4の実施形態にかかるプログラマブルコントローラの構成の一例を示す図である。本実施形態にかかるプログラマブルコントローラのCPU1000は、エンジニアリングツール1001、コントローラ機能部102、ソフトウェア機能部1002、およびインタフェース部403を有する。
FIG. 10 is a diagram illustrating an example of a configuration of a programmable controller according to the fourth embodiment. The
本実施形態では、エンジニアリングツール1001は、コントローラ機能部102に対して第1アプリケーション104を出力する度に作成する変数データテーブルを、共有メモリ2、またはHDD705に保存する。これにより、ソフトウェア機能部1002において変数データテーブルを参照可能となるので、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直された場合でも、第2アプリケーション105を実行できる。
In the present embodiment, the
また、本実施形態では、エンジニアリングツール1001は、インタフェース部403を介して、ソフトウェア機能部1002から、変数が入力される。そして、エンジニアリングツール1001は、入力された変数のデータを、インタフェース部403を介して、ソフトウェア機能部1002に出力する。これにより、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直された場合でも、ソフトウェア機能部1002がエンジニアリングツール1001から変数のデータを取得できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、エンジニアリングツール1001から入力される変数のデータを用いて、第2アプリケーション105を実行できる。
In this embodiment, the
本実施形態では、ソフトウェア機能部1002は、第2アプリケーション105が用いる変数のデータを取得する方法を適宜切り替える。ソフトウェア機能部1002の第2アプリケーション105は、共有メモリ2から変数のデータを取得する場合、図2に示す処理の流れと同様に、共有メモリ2に記憶される変数データテーブルを参照して、I/O機器4の制御結果の表示やI/O機器4の監視等の処理で用いる変数のデータと対応付けられるアドレスを特定する。そして、第2アプリケーション105は、共有メモリ2において、特定したアドレスの記憶領域に記憶される変数のデータを読み出し、当該読み出した変数のデータを用いて、I/O機器4の制御結果の表示やI/O機器4の監視等の処理を実行する。または、ソフトウェア機能部1002のAPI704は、図8に示す処理の流れと同様に、HDD705に記憶される変数データテーブルを参照して、I/O機器4の制御結果の表示やI/O機器4の監視等の処理で用いる変数のデータと対応付けられるアドレスを特定する。そして、第2アプリケーション105は、共有メモリ2において、API704により特定されたアドレスの記憶領域に記憶される変数のデータを読み出し、当該読み出した変数のデータを用いて、I/O機器4の制御結果の表示やI/O機器4の監視等の処理を実行する。
In the present embodiment, the
一方、ソフトウェア機能部1002は、エンジニアリングツール1001から変数のデータを取得する場合、図5に示す処理の流れと同様に、インタフェース部403を介して、第2アプリケーション105が用いる変数を、エンジニアリングツール1001に対して出力する。そして、ソフトウェア機能部1002の第2アプリケーション105は、エンジニアリングツール1001から入力される変数のデータを用いて、I/O機器4の制御結果の表示やI/O機器4の監視等の処理を実行する。
On the other hand, when acquiring the variable data from the
図11は、第4の実施形態にかかるプログラマブルコントローラのソフトウェア機能部による第2アプリケーションの実行処理の具体例を説明するための図である。例えば、エンジニアリングツール1001は、コントローラ機能部102に対して、第1アプリケーション104を出力する。その後、エンジニアリングツール1001は、第1アプリケーション104を出力する度に作成する変数データテーブルを、HDD705に保存する。
FIG. 11 is a diagram for explaining a specific example of the execution process of the second application by the software function unit of the programmable controller according to the fourth embodiment. For example, the
その後、ソフトウェア機能部1002は、外部装置から、エンジニアリングツール1001からの変数のデータの取得が指示された場合、インタフェース部403を介して、エンジニアリングツール1001に対して変数(例えば、変数_0000)を出力する。エンジニアリングツール1001は、ソフトウェア機能部1002から入力された変数(例えば、変数_0000)が入力されると、インタフェース部403を介して、当該入力された変数のデータ(例えば、DT_0000)を、ソフトウェア機能部1002に出力する。そして、ソフトウェア機能部1002の第2アプリケーション105は、エンジニアリングツール1001から入力された変数のデータ(例えば、DT_0000)を用いて、I/O機器4の制御結果の表示やI/O機器4の監視等の処理を実行する。
Thereafter, the
一方、ソフトウェア機能部1002の第2アプリケーション105は、外部装置から、共有メモリ2からの変数のデータの取得が指示された場合、ミドルウェア703を介して、API704に対して変数(例えば、変数_0001)を出力する。API704は、HDD705に記憶される変数データテーブルにおいて、入力された変数(例えば、変数_0001)と対応付けられたアドレス(例えば、AD1_0001)を特定する。第2アプリケーション105は、共有メモリ2において、API704により特定されたアドレス(例えば、AD1_0001)の記憶領域から変数のデータ(例えば、DT_0001)を読み出す。その後、ソフトウェア機能部1002の第2アプリケーション105は、読み出した変数のデータ(例えば、DT_0001)を用いて、I/O機器4の制御結果の表示やI/O機器4の監視等の処理を実行する。
On the other hand, the
このように、第4の実施形態にかかるプログラマブルコントローラによれば、コントローラ機能部102に第1アプリケーション104を出力する度に、変数のデータに対してアドレスが割り当て直された場合でも、共有メモリ2内で変数のデータが記憶された記憶領域をソフトウェア機能部1002が特定できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、共有メモリ2から変数のデータを読み出して、第2アプリケーション105を実行できる。または、エンジニアリングツール1001から、第2アプリケーション105の実行に用いる変数のデータを取得できるので、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、第2アプリケーション105を実行できる。
As described above, according to the programmable controller of the fourth embodiment, even when the address is reassigned to the variable data every time the
以上説明したとおり、第1から第4の実施形態によれば、共有メモリ2において、変数のデータにアドレスが割り当て直された場合でも、第2アプリケーション105を実行できる。
As described above, according to the first to fourth embodiments, the
なお、本実施形態のプログラマブルコントローラで実行されるプログラムは、ROM(Read Only Memory)等に予め組み込まれて提供される。本実施形態のプログラマブルコントローラで実行されるプログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録して提供するように構成してもよい。 Note that a program executed by the programmable controller of the present embodiment is provided by being incorporated in advance in a ROM (Read Only Memory) or the like. The program executed by the programmable controller of the present embodiment is an installable or executable file, and is read by a computer such as a CD-ROM, a flexible disk (FD), a CD-R, or a DVD (Digital Versatile Disk). You may comprise so that it may record on a possible recording medium and provide.
さらに、本実施形態のプログラマブルコントローラで実行されるプログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成しても良い。また、本実施形態のプログラマブルコントローラで実行されるプログラムをインターネット等のネットワーク経由で提供または配布するように構成しても良い。 Furthermore, the program executed by the programmable controller of the present embodiment may be configured to be stored by being stored on a computer connected to a network such as the Internet and downloaded via the network. Moreover, you may comprise so that the program run with the programmable controller of this embodiment may be provided or distributed via networks, such as the internet.
本実施形態のプログラマブルコントローラで実行されるプログラムは、上述した各部(エンジニアリングツール101,401,701,1001、コントローラ機能部102、ソフトウェア機能部103,402,702,1002、インタフェース部403)を含むモジュール構成となっており、実際のハードウェアとしてはCPU1,400,700,1000が上記ROMからプログラムを読み出して実行することにより上記各部が主記憶装置上にロードされ、エンジニアリングツール101,401,701,1001、コントローラ機能部102、ソフトウェア機能部103,402,702,1002、インタフェース部403が主記憶装置上に生成されるようになっている。
A program executed by the programmable controller of the present embodiment includes a module including the above-described units (
本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.
1,400,700,1000 CPU
2 共有メモリ
3 通信I/F
4 I/O機器
101,401,701,1001 エンジニアリングツール
102 コントローラ機能部
103,402,702,1002 ソフトウェア機能部
104 第1アプリケーション
105 第2アプリケーション
106,703 ミドルウェア
107,704 API
403 インタフェース部
705 HDD
1,400,700,1000 CPU
2
4 I /
403
Claims (5)
外部装置を制御する第1アプリケーションを作成するエンジニアリングツールと、前記エンジニアリングツールから入力された前記第1アプリケーションで用いられる変数のデータを、前記共有メモリにおいて当該データに割り当てられるアドレスの記憶領域に保存し、前記データを用いて前記第1アプリケーションを実行するコントローラ機能部と、前記共有メモリに記憶される前記データを読み出す第2アプリケーションを実行するソフトウェア機能部と、をプログラムの実行により実現するプロセッサと、を備え、
前記エンジニアリングツールは、前記コントローラ機能部に対して前記第1アプリケーションを出力する度に、前記変数と、当該変数の前記データに割り当てられた前記アドレスと、が対応付けられかつ前記ソフトウェア機能部により参照可能なテーブルを作成する、プログラマブルコントローラ。 Shared memory,
An engineering tool for creating a first application for controlling an external device, and variable data used in the first application input from the engineering tool are stored in a storage area of an address assigned to the data in the shared memory. A processor that realizes a controller function unit that executes the first application using the data and a software function unit that executes a second application that reads the data stored in the shared memory by executing a program; With
Each time the engineering tool outputs the first application to the controller function unit, the variable is associated with the address assigned to the data of the variable and referenced by the software function unit A programmable controller that creates possible tables.
前記第2アプリケーションは、前記共有メモリに記憶される前記テーブルにおいて、前記変数と対応付けられる前記アドレスを特定し、当該特定したアドレスの前記記憶領域から前記データを読み出す請求項1に記載のプログラマブルコントローラ。 The engineering tool stores the created table in the shared memory,
The programmable controller according to claim 1, wherein the second application specifies the address associated with the variable in the table stored in the shared memory, and reads the data from the storage area of the specified address. .
前記エンジニアリングツールは、作成した前記テーブルを前記記憶部に保存し、
前記ソフトウェア機能部は、前記記憶部に記憶される前記テーブルにおいて、前記第2アプリケーションで用いる前記変数と対応付けられる前記アドレスを特定するAPI(Application Programming Interface)を含み、
前記第2アプリケーションは、前記APIにより特定される前記アドレスの前記記憶領域から前記データを読み出す請求項1に記載のプログラマブルコントローラ。 A storage unit different from the shared memory;
The engineering tool stores the created table in the storage unit,
The software function unit includes an API (Application Programming Interface) that specifies the address associated with the variable used in the second application in the table stored in the storage unit,
The programmable controller according to claim 1, wherein the second application reads the data from the storage area at the address specified by the API.
外部装置を制御する第1アプリケーションを作成するエンジニアリングツールと、前記エンジニアリングツールから入力された前記第1アプリケーションで用いられる変数のデータを、前記共有メモリにおいて当該データに割り当てられるアドレスの記憶領域に保存し、前記データを用いて前記第1アプリケーションを実行するコントローラ機能部と、前記共有メモリに記憶される前記データを読み出す第2アプリケーションを実行するソフトウェア機能部と、前記エンジニアリングツールと前記ソフトウェア機能部との間で通信可能とするインタフェース部と、をプログラムの実行により実現するプロセッサと、を備え、
前記エンジニアリングツールは、前記インタフェース部を介して、前記ソフトウェア機能部から、前記第2アプリケーションが用いる前記変数が入力され、入力された前記変数の前記データを前記ソフトウェア機能部に出力する、プログラマブルコントローラ。 Shared memory,
An engineering tool for creating a first application for controlling an external device, and variable data used in the first application input from the engineering tool are stored in a storage area of an address assigned to the data in the shared memory. A controller function unit that executes the first application using the data; a software function unit that executes a second application that reads the data stored in the shared memory; and the engineering tool and the software function unit. An interface unit that enables communication between each other, and a processor that realizes the program by executing a program,
The engineering tool is a programmable controller, wherein the variable used by the second application is input from the software function unit via the interface unit, and the data of the input variable is output to the software function unit.
外部装置を制御する第1アプリケーションを作成するエンジニアリングツールと、当該エンジニアリングツールから入力された前記第1アプリケーションで用いられる変数のデータを、前記共有メモリにおいて当該データに割り当てられるアドレスの記憶領域に保存し、前記データを用いて前記第1アプリケーションを実行するコントローラ機能部と、前記共有メモリに記憶される前記データを読み出す第2アプリケーションを実行するソフトウェア機能部と、前記エンジニアリングツールと前記ソフトウェア機能部との間で通信可能とするインタフェース部と、をプログラムの実行により実現するプロセッサと、を備え、
前記エンジニアリングツールは、
前記コントローラ機能部に対して前記第1アプリケーションを出力する度に、前記変数と、当該変数の前記データに割り当てられた前記アドレスと、が対応付けられかつ前記ソフトウェア機能部により参照可能なテーブルを作成し、かつ
前記インタフェース部を介して、前記ソフトウェア機能部から、前記第2アプリケーションが用いる前記変数が入力され、当該変数の前記データを前記ソフトウェア機能部に出力する、プログラマブルコントローラ。 Shared memory,
An engineering tool for creating a first application for controlling an external device and variable data used in the first application input from the engineering tool are stored in a storage area of the shared memory at an address assigned to the data. A controller function unit that executes the first application using the data; a software function unit that executes a second application that reads the data stored in the shared memory; and the engineering tool and the software function unit. An interface unit that enables communication between each other, and a processor that realizes the program by executing a program,
The engineering tool is
Each time the first application is output to the controller function unit, a table is created in which the variable is associated with the address assigned to the data of the variable and can be referred to by the software function unit And the programmable controller which the said variable used by a said 2nd application is input from the said software function part via the said interface part, and outputs the said data of the said variable to the said software function part.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018027217A JP2019144762A (en) | 2018-02-19 | 2018-02-19 | Programmable controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018027217A JP2019144762A (en) | 2018-02-19 | 2018-02-19 | Programmable controller |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2019144762A true JP2019144762A (en) | 2019-08-29 |
Family
ID=67773782
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018027217A Pending JP2019144762A (en) | 2018-02-19 | 2018-02-19 | Programmable controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2019144762A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020008942A (en) * | 2018-07-03 | 2020-01-16 | オムロン株式会社 | Compilation device and compilation method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09128018A (en) * | 1995-11-01 | 1997-05-16 | Fuji Electric Co Ltd | Multiprocessor type controller programming device |
JP2003291033A (en) * | 2002-04-02 | 2003-10-14 | Sodick Co Ltd | Method for creating numerical control program and numerical control electrical discharge machining device |
-
2018
- 2018-02-19 JP JP2018027217A patent/JP2019144762A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09128018A (en) * | 1995-11-01 | 1997-05-16 | Fuji Electric Co Ltd | Multiprocessor type controller programming device |
JP2003291033A (en) * | 2002-04-02 | 2003-10-14 | Sodick Co Ltd | Method for creating numerical control program and numerical control electrical discharge machining device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2020008942A (en) * | 2018-07-03 | 2020-01-16 | オムロン株式会社 | Compilation device and compilation method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10261844B2 (en) | Generic language application programming interface interpreter | |
US8266416B2 (en) | Dynamic reconfiguration supporting method, dynamic reconfiguration supporting apparatus, and dynamic reconfiguration system | |
JP2019144762A (en) | Programmable controller | |
US9208055B2 (en) | Importance-based call graph construction | |
JP6907700B2 (en) | Information processing device, multi-thread matrix operation method, and multi-thread matrix operation program | |
US20200089477A1 (en) | Program optimization by converting code portions to directly reference internal data representations | |
US20170199808A1 (en) | Debugging a transaction in a replica execution environment | |
JP2015184756A (en) | Program converter and conversion processing program | |
US10083011B2 (en) | Smart tuple class generation for split smart tuples | |
WO2020158347A1 (en) | Information processing device, method, and program | |
JP2007086951A (en) | File division processing method and file division program | |
KR102179385B1 (en) | Method and processor for implementing instruction and method and apparatus for encoding instruction and medium thereof | |
US9904520B2 (en) | Smart tuple class generation for merged smart tuples | |
JPWO2018225747A1 (en) | Distributed system, data management device, data management method, and computer-readable recording medium | |
KR102251241B1 (en) | Method and apparatus for controlling register of configurable processor and method and apparatus for generating instruction for controlling register of configurable processor and record medium thereof | |
JP2021018711A (en) | Task execution management device, task execution management method, and task execution management program | |
KR102213046B1 (en) | Design support device, design support method, and program stored on a recording medium | |
US20200174822A1 (en) | Startup method and apparatus for virtual machine, and smart terminal | |
JP2018185615A (en) | Electronic apparatus, method and program | |
JP2009206606A (en) | Information processor | |
JP6101190B2 (en) | Information processing apparatus, information processing method, and program | |
US20160216705A1 (en) | Control apparatus | |
JP6243291B2 (en) | Design support device and design support program | |
JP2014178871A (en) | Information processor and content file conversion processing method thereof | |
TWI584197B (en) | Code dynamic generating system and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201106 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210721 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20210803 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20220215 |