JP2009009444A - Programmable controller, programmable controller support apparatus, and programmable controller system - Google Patents

Programmable controller, programmable controller support apparatus, and programmable controller system Download PDF

Info

Publication number
JP2009009444A
JP2009009444A JP2007171535A JP2007171535A JP2009009444A JP 2009009444 A JP2009009444 A JP 2009009444A JP 2007171535 A JP2007171535 A JP 2007171535A JP 2007171535 A JP2007171535 A JP 2007171535A JP 2009009444 A JP2009009444 A JP 2009009444A
Authority
JP
Japan
Prior art keywords
function block
programmable controller
user
program
system function
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.)
Granted
Application number
JP2007171535A
Other languages
Japanese (ja)
Other versions
JP4821717B2 (en
Inventor
Yukiteru Yuo
幸輝 湯尾
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Systems Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Systems Co Ltd filed Critical Fuji Electric Systems Co Ltd
Priority to JP2007171535A priority Critical patent/JP4821717B2/en
Publication of JP2009009444A publication Critical patent/JP2009009444A/en
Application granted granted Critical
Publication of JP4821717B2 publication Critical patent/JP4821717B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve problems in "a data transfer method and a starting method" between integrated software and an application of a programmable controller, wherein in accessing the integrated software created by a user by means of a general purpose PC as an application of the programmable controller, the integrated software accessed from a plurality of positions such as sub-routines cannot be described, and since the application of the programmable controller and the integrated software are asynchronously operated, the timing of processing, start and completion of the integrated software cannot be grasped from the application of the programmable controller. <P>SOLUTION: A system FB table capable of uniquely accessing a system FB is provided in the programmable controller, and not only a conventional system FB but also a user FB can be registered in the table. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、プログラマブルコントローラ(以下、PLCと略す場合もある)のファンクションブロック(以下、FBと略す場合もある)に関し、特にユーザが作成したファンクションブロックをメーカーが提供するファンクションブロックとして管理するプログラマブルコントローラに関する。   The present invention relates to a function block (hereinafter sometimes abbreviated as FB) of a programmable controller (hereinafter also abbreviated as PLC), and in particular, a programmable controller that manages a function block created by a user as a function block provided by a manufacturer. About.

従来、プログラマブルコントローラはシーケンス命令実行を高速に行わせるための専用ハードウェア(大規模専用LSI:Large Scale Integrationなどに代表される)を備えるものが主流であった。これら専用ハードウェアにおいては、各コントローラのメーカーが提供する支援ツールによって、マシンコードを生成する必要があった。
しかし、「専用ハードウェアは高価である」、「専用のマシン語体系をもちシステムプログラム開発が比較的困難である」というデメリットも存在していた。
近年、パーソナルコンピュータ、携帯端末などの普及により、市販の汎用CPU:Central Processing Unitの技術革新が進み、高速実行が可能なCPUを非常に安価に入手することが可能になってきた。そのため、汎用CPUを用いて専用LSIをエミュレートして実行しても、充分に所望の実行性能を得る事ができるようになった。
また、汎用であるためファームウェアの開発ツールも市場から調達できるようになってきたため、汎用CPUを使ったプログラマブルコントローラも作られるようになってきている。
このような汎用CPUをベースとしたプログラマブルコントローラにおいては、ユーザに提供するアプリケーション開発環境として以下の2つの選択肢が考えられるが、後者の方法が注目されている。
Conventionally, a programmable controller has been mainly provided with dedicated hardware (represented by Large Scale Integration, etc.) for causing sequence instructions to be executed at high speed. In these dedicated hardware, it was necessary to generate machine code by a support tool provided by the manufacturer of each controller.
However, there were also demerits that “dedicated hardware is expensive” and “development of system programs is relatively difficult with a dedicated machine language system”.
In recent years, with the widespread use of personal computers, portable terminals, etc., technological innovation of a commercially available general-purpose CPU: Central Processing Unit has advanced, and it has become possible to obtain a CPU capable of high-speed execution at a very low cost. For this reason, even when a dedicated LSI is emulated and executed using a general-purpose CPU, it is possible to obtain a desired execution performance sufficiently.
Also, since it is general-purpose and firmware development tools can be procured from the market, programmable controllers using general-purpose CPUs are also being made.
In such a programmable controller based on a general-purpose CPU, the following two options are conceivable as an application development environment to be provided to the user, but the latter method is attracting attention.

・従来から、プログラマブルコントローラで使用される言語(プログラマブルコントローラにおけるシーケンス命令は、ラダー図、テキスト記述言語などで代表される言語命令により構成されるが、本明細書中では特に断らない限り、プログラマブルコントローラにおける記述言語規格IEC61131−3を指すものとする)を従来の支援ツール上でプログラミングし、プログラマブルコントローラにダウンロードした後、実行する方法。
・プログラマブルコントローラに使用されている汎用CPUに対応した組み込みソフトウェア開発環境で汎用プログラム言語(C言語、マイコン対応アセンブラなど)を用いてプログラミングし、プログラマブルコントローラにダウンロードした後、実行する方法。
実際、近年では汎用CPUをベースとしながら従来の専用LSIを使用したものと全く同じ動作をするプログラマブルコントローラや、逆に従来の支援ツールを使用せずに組み込みソフトウェア開発環境でプログラミングを行うC言語コントローラなども発売されている。
このようなC言語コントローラにおいては、ユーザのプログラミング負荷を軽減するためにリアルタイム・オペレーティング・システム(以下、リアルタイムOSと呼ぶ)が搭載されている。リアルタイムOSでは、タスクと呼ばれる処理単位を複数並列に実行可能であり、タスク間の通信機能、タスクの生成及び起動などの実効制御の機能を備えている。タスクの時間管理をリアルタイムOSが行うので、ユーザはプログラミングする際にスケジューリングの負荷から開放される利点があげられる。
Conventionally, a language used in a programmable controller (a sequence instruction in a programmable controller is constituted by a language instruction represented by a ladder diagram, a text description language, etc., but unless otherwise specified in this specification, a programmable controller Is written on a conventional support tool, downloaded to a programmable controller, and then executed.
A method in which programming is performed using a general-purpose programming language (C language, microcomputer-compatible assembler, etc.) in an embedded software development environment corresponding to a general-purpose CPU used for the programmable controller, and the program is downloaded to the programmable controller and then executed.
In fact, in recent years, a programmable controller that is based on a general-purpose CPU and operates exactly the same as that using a conventional dedicated LSI, or conversely, a C language controller that performs programming in an embedded software development environment without using a conventional support tool Etc. are also on sale.
In such a C language controller, a real-time operating system (hereinafter referred to as a real-time OS) is mounted in order to reduce a user's programming load. A real-time OS can execute a plurality of processing units called tasks in parallel, and has a communication function between tasks, and an effective control function such as task generation and activation. Since the time management of tasks is performed by the real-time OS, the user is freed from the scheduling load when programming.

一方、汎用CPUを使用した従来型のプログラマブルコントローラにおいても、システムの管理や支援ツールとのインターフェースなど、システムファームウェアの部分はリアルタイムOSをベースとする組み込みソフトウェアとして構成されるのが一般的となっている。
いずれにせよ、プログラマブルコントローラとプログラマブルコントローラ支援装置からなるプログラマブルコントローラシステムとして効率の良いプログラミング環境(特に組み込みプログラムの扱い方)を提供するのが命題になっている。
コントローラと支援ツールとにおけるプログラムの組み込みに関する技術としては、例えば特許文献1に記載されている。ここで、支援ツールにおいてタスク型プロジェクトならばコントローラのタスクとして動作させ、関数型プロジェクトならば他のタスクより関数としてコール可能な状態で保持する方法が示されている。
また、特許文献2には、ユーザが作成したソフト資産の必要な部分のみをプログラマブルコントローラのファンクションブロック化し利用する方法が示されている。
特開2006−178818号公報 特開2001−51704号公報
On the other hand, even in a conventional programmable controller using a general-purpose CPU, the system firmware portion such as system management and interface with a support tool is generally configured as embedded software based on a real-time OS. Yes.
In any case, it is a proposition to provide an efficient programming environment (especially how to handle an embedded program) as a programmable controller system including a programmable controller and a programmable controller support device.
For example, Patent Document 1 discloses a technique related to program incorporation in the controller and the support tool. Here, in the support tool, a task type project is operated as a controller task, and a function type project is stored in a state that can be called as a function from other tasks.
Patent Document 2 discloses a method of using only necessary portions of software assets created by a user as function blocks of a programmable controller.
JP 2006-178818 A JP 2001-51704 A

プログラマブルコントローラで使用される専用プログラミング言語は、シーケンス制御を記述するシーケンス図を効率よくプログラミングが可能であり、プログラマブルコントローラの使用現場における保守の容易性等の観点からも今後も需要がある言語である。
そこで、プログラマブルコントローラには汎用CPUを使用し、支援ツールでプログラミングした組み込みソフトウェアを用いる方法が主流となってきている。しかしながら、汎用CPUを使用したプログラマブルコントローラにおいては、以下のような問題点がある。
・実行コードが専用LSIのエミュレータ動作であるため、同じ動作のC言語アプリケーションなどと比べてコード効率が悪い。
・ラダー図等はシーケンス動作を記述するための言語であるため、数値演算やデータ処理などの記述が煩雑で難しい。
これらの問題点は、処理内容に応じて、プログラミング環境を使い分ける事により解決される。即ち、通常のシークエンス処理は従来の支援ツールでプログラミングし、複雑な処理や高速化したい処理に関しては組み込みアプリケーションとして組み込みソフトウェア開発環境でプログラミングを実施する。
The dedicated programming language used in the programmable controller allows efficient programming of sequence diagrams describing sequence control, and is a language that will continue to be in demand from the standpoint of ease of maintenance in the field of use of the programmable controller. .
Therefore, a method using a general-purpose CPU as a programmable controller and using embedded software programmed with a support tool has become mainstream. However, a programmable controller using a general-purpose CPU has the following problems.
Since the execution code is a dedicated LSI emulator operation, the code efficiency is lower than that of a C language application having the same operation.
-Ladder diagrams etc. are languages for describing sequence operations, so description of numerical operations and data processing is complicated and difficult.
These problems can be solved by using different programming environments according to the processing contents. That is, normal sequence processing is programmed with a conventional support tool, and complicated processing or processing to be speeded up is performed in an embedded software development environment as an embedded application.

ところで、プログラマブルコントローラのアプリケーションは、プログラマブルコントローラを効率よく扱うために、制御ネットワークに接続されている外部接続機器(例えば、入出力モジュール)をメモリとして扱うなど、プログラマブルコントローラシステム固有のメモリアドレス体系を保持している。そのため、メモリ管理においては、汎用CPUの物理アドレスに直接依存していない。また、プログラマブルコントローラのアプリケーションの実行時には、プログラマブルコントローラのタスクとして登録されており、これらは定周期やイベントなどの指定されたタイミングで起動されるが、プログラマブルコントローラのアプリケーション作成者は、それらのアプリケーションのタスクとシステムソフトを動かしているリアスタイムOSとの動作の関連を意識することが出来ない。
このことに起因し、以下の問題点が挙げられる。
・サブルーチンのような複数箇所から呼び出される組み込みソフトウェアの記述が出来ない(例えば、データ交換領域としてプログラマブルコントローラのアプリケーションメモリの固定番地を組み込みソフトウェア中で明示的に記述しようとすると、データ交換領域アドレスをそれぞれ個別に用意しなければならず、同じ処理にもかかわらず、別のプログラムになってしまう)。
By the way, in order to handle the programmable controller efficiently, the application of the programmable controller maintains a memory address system unique to the programmable controller system, such as handling externally connected devices (for example, input / output modules) connected to the control network as memory. is doing. Therefore, the memory management does not depend directly on the physical address of the general-purpose CPU. In addition, when the application of the programmable controller is executed, it is registered as a task of the programmable controller, and these are started at a specified timing such as a fixed period or an event. I cannot be aware of the relationship between the task and the operation of the real-time OS that runs the system software.
Due to this, there are the following problems.
・ Embedded software called from multiple places such as subroutines cannot be described (for example, if a fixed address of the application memory of the programmable controller is explicitly described in the embedded software as a data exchange area, the data exchange area address is Each must be prepared separately, and it will be a separate program despite the same process).

・プログラマブルコントローラのアプリケーションと組み込みソフトウェアが非同期に動作するので、プログラマブルコントローラのアプリケーションからは、組み込みソフトウェアの処理や起動、完了のタイミングを把握出来ない。
このように、組み込みソフトウェアとプログラマブルコントローラのアプリケーションにおける「データ交換方法、及び起動方法」が問題になる。
特許文献1に記載のコントローラでは、ラダー言語内からC言語プログラムを呼び出す方法のみを記述しているが、コントローラのアプリケーションとC言語プログラム間とにおける具体的なデータ交換に関して実現手段が示されていない。
また、特許文献2に記載のプログラマブルコントローラでは、オブジェクト指向プログラミング言語により記述された部品であるクラスをライブラリとして登録し、これらを元にインスタンスを生成すること、及びインスタンス生成情報の管理について記述されているが、部品をライブラリとして登録する具体的な方法が示されていない(ラダープログラムへの記述方法のみ示されている)。
以上に示すように、組み込みソフトウェアとプログラマブルコントローラのアプリケーションにおける「データ交換方法、及び起動方法」が問題になるが、従来の技術においては組み込みソフトウェアの起動方法に関しては一定の言及はあっても、データ交換方法が具体的に示されていないと言う未解決の課題がある。
-Since the application of the programmable controller and the embedded software operate asynchronously, it is impossible to grasp the timing of processing, activation and completion of the embedded software from the application of the programmable controller.
Thus, the “data exchange method and activation method” in applications of embedded software and programmable controllers becomes a problem.
In the controller described in Patent Document 1, only a method for calling a C language program from within a ladder language is described, but no means for realizing specific data exchange between the controller application and the C language program is shown. .
In the programmable controller described in Patent Document 2, classes that are parts described in an object-oriented programming language are registered as a library, an instance is generated based on these classes, and management of instance generation information is described. However, a specific method for registering a part as a library is not shown (only a description method in a ladder program is shown).
As shown above, the “data exchange method and startup method” in embedded software and programmable controller applications is a problem, but in the conventional technology, there is a certain mention regarding the startup method of embedded software, but data There is an unsolved problem that the exchange method is not specifically shown.

本発明は、組み込みソフトウェアとプログラマブルコントローラのアプリケーションにおける「データ交換方法、及び起動方法」を充足するプログラマブルコントローラ、プログラマブルコントローラ支援装置、及びプログラマブルコントローラシステムを提供することを目的とする。   It is an object of the present invention to provide a programmable controller, a programmable controller support device, and a programmable controller system that satisfy the “data exchange method and activation method” in embedded software and programmable controller applications.

上記の課題を解決する手段として、本発明は以下のように構成する。
第1に、プログラマブルコントローラのメーカが提供するシステムファンクションブロックと、ユーザが作成するユーザファンクションブロックと、該システムファンクションブロック及び/又は該ユーザファンクションブロックを用いたプログラムとを、保存用として格納する第1の記憶手段と、前記第1の記憶手段に格納されている情報を複写し、実行用として格納する第2の記憶手段と、前記プログラムのリード及び/又はライト対象となるデータを格納する第3の記憶手段と、前記プログラムを解釈し実行する実行手段と、専用線、或いは外部ネットワークを通じデータの交信を行う第1の通信手段と、専用線を通じ制御対象機器の制御・監視の為の通信を行う第2の通信手段とを備え、前記第1の通信手段を通じて前記ユーザファンクションブロックの登録の指示があったときには、該ユーザファンクションブロックを前記システムファンクションブロックとして登録し、登録後は前記システムファンクションブロックの一つとして扱う手段とを備えるように構成する。
第2に、前記第3の記憶手段は、前記システムファンクションブロックを一意に特定するファンクションブロック番号と、該ファンクションブロック番号から一意に呼び出し可能な前記システムファンクションブロックのプログラムコードを指定する情報とを、管理するシステムファンクションブロックテーブルを有し、前記ユーザファンクションブロックを前記システムファンクションブロックとして登録するときは、前記システムファンクションブロックテーブルに前記ユーザファンクションブロックを一意に特定するファンクションブロック番号に対応させて、該ファンクションブロック番号から一意に呼び出し可能な前記ユーザファンクションブロックのプログラムコードを特定する情報を登録する手段とを備えるように構成する。
As means for solving the above problems, the present invention is configured as follows.
First, a system function block provided by a manufacturer of a programmable controller, a user function block created by a user, and a system function block and / or a program using the user function block are stored for storage. Storage means, second storage means for copying and storing information stored in the first storage means, and third data for storing data to be read and / or written to the program Storage means, an execution means for interpreting and executing the program, a first communication means for exchanging data through a dedicated line or an external network, and communication for controlling and monitoring the control target device through the dedicated line. Second communication means for performing, and through the first communication means, the user file. When an instruction for registration of function blocks registers the user function block as the system function blocks, after registration configured to and means for handling as one of the system function blocks.
Second, the third storage means includes a function block number that uniquely identifies the system function block, and information that specifies a program code of the system function block that can be uniquely called from the function block number, A system function block table to be managed, and when registering the user function block as the system function block, the function corresponding to the function block number uniquely identifying the user function block in the system function block table; Means for registering information for identifying the program code of the user function block that can be uniquely called from the block number.

第3に、前記実行手段は、アプリケーション実行機能、システム管理機能、支援ツールインターフェース機能を具備し、リアルタイムオペレーティングシステムを用いた汎用マイコンにより実現する手段とを備えるように構成する。
第4に、プログラマブルコントローラのメーカが提供するシステムファンクションブロック、及び/又はユーザが作成するユーザファンクションブロックを用いたプログラミング環境をユーザに提供し、作成されたプログラムを管理する管理手段と、前記プログラムを動作させたいプログラマブルコントローラに前記プログラムを送信する送信手段、前記ユーザファンクションブロックを前記システムファンクションブロックとして使用するかしないかを選択する選択手段を設け、該選択手段により使用することが選択されたときは前記システムファンクションブロックとして登録する情報を前記送信手段を介して送信する手段とを備えるように構成する。
第5に、プログラマブルコントローラのメーカが提供するシステムファンクションブロックと、ユーザが作成するユーザファンクションブロックと、該システムファンクションブロック及び/又は該ユーザファンクションブロックを用いたプログラムとを、保存用として格納する第1の記憶手段と、前記第1の記憶手段に格納されている情報を複写し、実行用として格納する第2の記憶手段と、前記プログラムのリード及び/又はライト対象となるデータを格納する第3の記憶手段と、前記プログラムを解釈し実行する実行手段と、専用線、或いは外部ネットワークを通じデータの交信を行う第1の通信手段と、専用線を通じ制御対象機器の制御・監視の為の通信を行う第2の通信手段とを備え、前記第1の通信手段を通じて前記ユーザファンクションブロックの登録の指示があったときには、該ユーザファンクションブロックを前記システムファンクションブロックとして登録し、登録後は前記システムファンクションブロックの一つとして扱うプログラマブルコントローラと、
前記システムファンクションブロック、及び/又は前記ユーザファンクションブロックを用いたプログラミング環境をユーザに提供し、作成されたプログラムを管理する管理手段と、前記プログラマブルコントローラに前記プログラムを送信する送信手段、前記ユーザファンクションブロックを前記システムファンクションブロックとして使用するかしないかを選択する選択手段を設け、該選択手段により使用することが選択されたときは前記システムファンクションブロックとして登録する情報を前記送信手段を介して送信するプログラマブルコントローラ支援装置とを具備するように構成する。
Thirdly, the execution means includes an application execution function, a system management function, a support tool interface function, and a means realized by a general-purpose microcomputer using a real-time operating system.
Fourth, a management unit that provides a user with a programming environment using a system function block provided by a manufacturer of a programmable controller and / or a user function block created by a user, and manages the created program; When a transmission means for transmitting the program to a programmable controller to be operated and a selection means for selecting whether or not to use the user function block as the system function block are provided, and when the use is selected by the selection means Means for transmitting information to be registered as the system function block via the transmission means.
Fifth, a system function block provided by the manufacturer of the programmable controller, a user function block created by the user, and a system function block and / or a program using the user function block are stored for storage. Storage means, second storage means for copying and storing information stored in the first storage means, and third data for storing data to be read and / or written to the program Storage means, an execution means for interpreting and executing the program, a first communication means for exchanging data through a dedicated line or an external network, and communication for controlling and monitoring the control target device through the dedicated line. Second communication means for performing, and through the first communication means, the user file. When an instruction for registration of function blocks registers the user function block as the system function blocks, and programmable controller after registration treated as one of the system function blocks,
Management means for providing a user with a programming environment using the system function block and / or the user function block and managing the created program, transmission means for sending the program to the programmable controller, and the user function block Is selected as a system function block, and when it is selected by the selection means, information to be registered as the system function block is transmitted via the transmission means. And a controller support device.

本発明により、ユーザが作成した組み込みソフトウェアをプログラマブルコントローラのアプリケーションから呼び出し可能になるので、組み込みソフトウェアやプログラマブルコントローラのアプリケーションそれぞれに適したプログラミング環境をユーザ自身で選択可能になり、実行プログラムの処理速度の向上及びユーザコーディング効率の向上という効果を奏する。また、実行プログラムにおいては、組み込みソフトウェアの起動タイミングが明確化され、データの入力・出力の同期がとられるので、データ交換の安全性が高まるという効果もある。
さらに、組み込みソフトウェアを作成できないプログラマブルコントローラのユーザでも、従来から使用しているシステムファンクションブロックの呼び出すためのコードと同じような記述するだけで組み込みソフトウェアの該当プログラムを利用でき、この際に特別な手順を必要としない。
According to the present invention, since the embedded software created by the user can be called from the application of the programmable controller, the user can select a programming environment suitable for each of the embedded software and the application of the programmable controller, and the processing speed of the execution program can be reduced. There is an effect of improvement and improvement of user coding efficiency. In the execution program, the startup timing of the embedded software is clarified and the input / output of data is synchronized, so that the safety of data exchange is improved.
Furthermore, even for programmable controller users who cannot create embedded software, the corresponding program of embedded software can be used simply by writing the code for calling a system function block that has been used in the past. Do not need.

以下、本発明を実施するための最良の形態について、図面を参照しながら説明する。
始めに、図1〜3を用い基本構成について説明する。次に、図4〜9を用いプログラマブルコントローラで使用するファンクションブロックの詳細について説明する。最後に、図10〜14を用い組み込みソフトウェアをファンクションブロックとして作成する具体例を説明する。
図1は、本発明で用いられるプログラマブルコントローラシステムの構成の一例を説明したものである。パソコン11は一般的なパソコンであり、このパソコン11にはプログラマブルコントローラを支援する図示しない支援ツールが格納されている。パソコン11と支援対象のプログラマブルコントローラ12は、ケーブル16で接続されている。また、プログラマブルコントローラ12〜14と制御対象となる入出力モジュール15は、制御用ネットワーク17で接続されている。制御用ネットワーク17の一例としては、出願人の製品であるMICREX-SXシリーズで使用しているSXバスなどがある。
パソコン11において、ファンクションブロック等を用いてプログラミングを行い、コンパイル後に実行ファイルをプログラマブルコントローラ12にケーブル16等を介してダウンロードする(このため、パソコン11はローダと呼ばれることもある)。
The best mode for carrying out the present invention will be described below with reference to the drawings.
First, the basic configuration will be described with reference to FIGS. Next, details of function blocks used in the programmable controller will be described with reference to FIGS. Finally, a specific example of creating embedded software as a function block will be described with reference to FIGS.
FIG. 1 illustrates an example of the configuration of a programmable controller system used in the present invention. The personal computer 11 is a general personal computer, and the personal computer 11 stores a support tool (not shown) that supports the programmable controller. The personal computer 11 and the programmable controller 12 to be supported are connected by a cable 16. The programmable controllers 12 to 14 and the input / output module 15 to be controlled are connected by a control network 17. An example of the control network 17 is the SX bus used in the MICREX-SX series, which is the product of the applicant.
In the personal computer 11, programming is performed using function blocks and the like, and after execution, the execution file is downloaded to the programmable controller 12 via the cable 16 or the like (for this reason, the personal computer 11 is sometimes called a loader).

なお、ここではプログラマブルコントローラシステムの一例として、一台のパソコン11と複数のプログラマブルコントローラ12〜14、及び複数の入出力モジュール15とによる構成を示しているが、これは発明を限定するものではなく、それぞれ任意の台数によって構成されていても構わない。パソコン11の支援対象はプログラマブルコントローラ12〜14のいずれか1つ/全てであっても構わない。
また、パソコン11と支援対象のプログラマブルコントローラ12〜14とは、ケーブル16によって接続されているが、これに限ったものではなく、無線LANであっても良いし、任意の媒体を介しての情報を遣り取りしても構わない。
図2は、本発明で用いられるプログラマブルコントローラのハード構成を説明したものである。プログラマブルコントローラ20は、システムプログラム及び/又はユーザプログラムを実行するCPU22を有し、CPU22は内部バス27を介してプログラム、命令、各種データ等を遣り取りする。ここで、システムプログラム及び/又はユーザプログラムを電源断時も保存しておくために、不揮発性の書き換えメモリとしてフラッシュメモリ24を有する。一般に、フラッシュメモリはSRAM等に比べ動作が低速である為、プログラムの保存に適していても、実行には向かない。そこで、フラッシュメモリ24からシステムプログラム及び/又はユーザプログラムを展開・実行するSRAMとして、プログラムメモリ25を有する。また、システムプログラム及び/又はユーザプログラムがリード/ライトする情報を管理・保存するメモリ領域(SRAM)として、データメモリ26も有する。
In addition, here, as an example of the programmable controller system, a configuration including one personal computer 11, a plurality of programmable controllers 12 to 14, and a plurality of input / output modules 15 is shown, but this does not limit the invention. , Each may be configured by an arbitrary number. The support target of the personal computer 11 may be any one / all of the programmable controllers 12 to 14.
In addition, the personal computer 11 and the programmable controllers 12 to 14 to be supported are connected by the cable 16, but the present invention is not limited to this, and may be a wireless LAN or information via any medium. You may exchange it.
FIG. 2 illustrates the hardware configuration of the programmable controller used in the present invention. The programmable controller 20 includes a CPU 22 that executes a system program and / or a user program. The CPU 22 exchanges programs, instructions, various data, and the like via an internal bus 27. Here, in order to save the system program and / or the user program even when the power is turned off, the flash memory 24 is provided as a nonvolatile rewrite memory. In general, a flash memory operates at a lower speed than an SRAM or the like, so that even if it is suitable for storing a program, it is not suitable for execution. Therefore, a program memory 25 is provided as an SRAM that expands and executes a system program and / or a user program from the flash memory 24. In addition, a data memory 26 is provided as a memory area (SRAM) for managing and storing information read / written by the system program and / or the user program.

一方でプログラマブルコントローラ20には、大別して外部機器との通信機能を2つ有する。1つは、後述のプログラマブルコントローラ支援装置からユーザの指示やプログラミング、実行ファイル等をCPU22と遣り取りするインターフェース機能であるドライバ/レシーバ21である。もう1つは入出力モジュール等の制御対象機器との通信を行う際に、専用線であるバスの調停等を行うバスコントローラ23である。
なお、フラッシュメモリ24、プログラムメモリ25、データメモリ26は、データ保存/管理の面や実行性の側面から複数のユニットに分けているが、十分な容量や速度性能および電源断時のデータ保証が可能なときは、例えば1つのメモリであっても構わない。
図3は、本発明で用いられるプログラマブルコントローラ支援装置のハード構成を説明したものである。プログラマブルコントローラ支援装置30は、ユーザが所望の制御プログラムを作成する為に入力を行う入力デバイス33と、この入力内容等を表示する表示デバイス34、所定のプログラムを記憶するための記憶装置35、接続線や外部ネットワーク等を介し対象のプログラマブルコントローラと通信する通信I/F32等を有する。CPU31は、内部バス36を介し、入力デバイス33より作成されたプログラムを必要に応じて記憶装置35に記憶し、また図示しない支援ツールのコンパイル機能により実行ファイルを作成し、これを通信I/F32を介して対象のプログラマブルコントローラに送信(ダウンロード)する。また、必要に応じて、後述のファンクションブロック番号も送信する。
On the other hand, the programmable controller 20 roughly has two communication functions with external devices. One is a driver / receiver 21 that is an interface function for exchanging user instructions, programming, execution files, and the like with the CPU 22 from a programmable controller support device described later. The other is a bus controller 23 that performs arbitration of a bus, which is a dedicated line, when communicating with a control target device such as an input / output module.
The flash memory 24, the program memory 25, and the data memory 26 are divided into a plurality of units from the viewpoint of data storage / management and execution, but sufficient capacity, speed performance, and data guarantee at the time of power interruption are ensured. If possible, for example, one memory may be used.
FIG. 3 explains the hardware configuration of the programmable controller support apparatus used in the present invention. The programmable controller support device 30 includes an input device 33 for input for the user to create a desired control program, a display device 34 for displaying the input contents, a storage device 35 for storing a predetermined program, a connection And a communication I / F 32 that communicates with the target programmable controller via a line or an external network. The CPU 31 stores a program created from the input device 33 via the internal bus 36 in the storage device 35 as necessary, and creates an execution file by a compiling function of a support tool (not shown), and stores the executable file as a communication I / F 32. Is sent (downloaded) to the target programmable controller. Also, a function block number described later is transmitted as necessary.

ユーザは、プログラマブルコントローラ支援装置30における支援ツールを用いてプログラミングを行うことになるが、この際にファンクションブロックを使用することが多い。記述言語規格IEC61131−3に規定されているファンクションブロックでは、処理コードと処理を行う際に使用するデータ(インスタンス)とが一体になった処理構造になっている。
図4は、ファンクションブロックの入出力概略の一例を説明したものである。矩形部分で表示したファンクションブロック本体40に対し、左側に入力端子41、右側に出力端子42が配置されている。ここでは、ファンクションブロック本体40の上部中央に記載のCTUがファンクションブロック名称を、CU、R、PV、Q、CVは端子名称を表している。また、入力端子41、出力端子42に記載の情報(BOOL、INT)は端子のデータ型を表している。
図5は、ファンクションブロックのインスタンスの構成の一例を説明したものである。図中の最小の矩形は、ビット量を表す。CU、R、Qが1つの矩形から構成されているのは、データ型がBOOL(図4参照)であることを表し、PV、CVが16個分の矩形から構成されているのは、データ型がINT(図4参照)であることを表す。また斜線の箇所は未使用領域であることを表す。ここでは模式的な表示としているが、実際には連続した領域として、これらの単位でプログラマブルコントローラのデータメモリ26のアドレスが割り付けられ、インスタンス領域として管理される。図2において、実行時のファンクションブロックのプログラムコードはプログラムメモリ25に、インスタンスの情報はデータメモリ26に配置される。これらの情報を連携して実行することによりファンクションブロックは機能する。
The user performs programming using a support tool in the programmable controller support device 30, and often uses function blocks. The function block defined in the description language standard IEC61131-3 has a processing structure in which a processing code and data (instance) used for processing are integrated.
FIG. 4 illustrates an example of an input / output outline of the function block. An input terminal 41 is arranged on the left side and an output terminal 42 is arranged on the right side with respect to the function block main body 40 displayed in a rectangular portion. Here, the CTU described in the upper center of the function block main body 40 represents a function block name, and CU, R, PV, Q, and CV represent terminal names. Further, the information (BOOT, INT) described in the input terminal 41 and the output terminal 42 represents the data type of the terminal.
FIG. 5 illustrates an example of the configuration of an instance of a function block. The smallest rectangle in the figure represents the bit amount. The fact that CU, R, and Q are composed of one rectangle indicates that the data type is BOOT (see FIG. 4), and that PV and CV are composed of 16 rectangles is the data Indicates that the type is INT (see FIG. 4). Also, the shaded area represents an unused area. Although a schematic display is shown here, the addresses of the data memory 26 of the programmable controller are actually allocated in these units as continuous areas and managed as instance areas. In FIG. 2, the program code of the function block at the time of execution is arranged in the program memory 25, and the instance information is arranged in the data memory 26. The function block functions by executing these pieces of information in cooperation.

ところで、ファンクションブロックは、その性質から大きく分けると2つに分類される。ここではこれらを夫々、ユーザファンクションブロック(以降、ユーザFBと略す)とシステムファンクションブロック(以降、システムFBと略す)と呼ぶ。
ユーザFBは、ユーザがファンクションブロックの中身(処理自体)も含めてプログラミングするもので、プログラマブルコントローラ支援装置上でユーザFB自体もコンパイルされた後、PLCにダウンロードされる。
一方でシステムFBは、プログラマブルコントローラのメーカが提供するファンクションブロックである。その為、予めその機能がプログラマブルコントローラ本体のシステムプログラムに含まれており、ユーザはプログラマブルコントローラのアプリケーション内でそのシステムFBを呼び出すコードを記述するだけで、その機能を使用する事ができる。また、システムFBではプログラマブルコントローラで使用されるマイコンや専用LSIに最適な設計がメーカによりなされているが、ユーザはこれらのシステムFBに手を加えることは出来ず、参照することのみ許されているのが一般的である。
組み込みソフトウェアによるファンクションブロックはユーザFBではあるが、これをシステムFBとしてプログラマブルコントローラ支援装置に認識させる。すると、コンパイル時にファンクションブロックの読み出しのコード生成のみを行い、ファンクションブロック自体のコンパイルは行われない。
By the way, the function blocks are roughly classified into two according to their properties. Here, these are called a user function block (hereinafter abbreviated as user FB) and a system function block (hereinafter abbreviated as system FB), respectively.
The user FB is programmed by the user including the contents of the function block (processing itself). The user FB itself is also compiled on the programmable controller support device and then downloaded to the PLC.
On the other hand, the system FB is a function block provided by the manufacturer of the programmable controller. Therefore, the function is included in the system program of the programmable controller main body in advance, and the user can use the function only by writing a code for calling the system FB in the application of the programmable controller. In addition, in the system FB, the optimum design for the microcomputer or dedicated LSI used in the programmable controller is made by the manufacturer, but the user cannot modify the system FB and is only allowed to refer to it. It is common.
Although the function block by the embedded software is the user FB, the programmable controller support apparatus recognizes this as the system FB. Then, only code generation for reading the function block is performed at the time of compilation, and the function block itself is not compiled.

図6は、システムFBをプログラマブルコントローラのアプリケーションから呼び出した場合のプログラムの一例を説明したものである。ここでは、PG0というプログラムから図4のファンクションブロックCTUを呼び出している。インスタンス60は、PG0においてCTUのインスタンスであることを表している。同一のファンクションブロックでも、インスタント名が異なれば処理も異なる。このため、インスタント名ごとに対応する対象データ領域を有し、ここではインスタンス名としてCTU#1となっている。
変数61はPG0内で定義されるが、インスタンス60の入力値として受け渡す。同様に、変数62はPG0内で定義されるが、インスタンス60の実行結果である出力値を受け渡される。
図7は、PG0の擬似的なプログラムコードを説明したものである。コード71、76はプログラムの開始、終了を示すタグであり、実質上、無処理のコードになる。コード72は図6の変数61と対応している。コード上では、A、CTU#1.CUのような表記となっているが、実際にはこれらの変数(或いはインスタンス領域)には、プログラマブルコントローラのデータメモリのアドレスが割り付けられている。ここで、CTU#1はインスタンス領域の先頭アドレス、CTU#1.CUはその構成要素である変数CUのアドレスが割り付けられている。コード73はPUSH命令であり、インスタンス領域のアドレスをスタック等に保存しておく命令である。コード74はCAL命令であり、ファンクションブロックCTUのプログラムコードを呼び出す(実際のコードでは、CTUと対応するファンクションブロック番号がセットされており、このファンクションブロック番号はプログラマブルコントローラとプログラマブルコントローラ支援装置とにおいて整合が取れている)。コード75は、図6の変数62と対応している。コード74で呼び出されたファンクションブロックCTUの処理の終了後に、実行結果を出力値として、CTU#1はインスタンス領域のCTU#1.Q、CTU#1.CVから値を取り出し、D、Eに格納する。
FIG. 6 illustrates an example of a program when the system FB is called from an application of a programmable controller. Here, the function block CTU of FIG. 4 is called from the program PG0. The instance 60 represents that it is a CTU instance in PG0. Even in the same function block, processing is different if the instant name is different. Therefore, there is a target data area corresponding to each instant name, and here, the instance name is CTU # 1.
The variable 61 is defined in PG0, but is passed as an input value of the instance 60. Similarly, the variable 62 is defined in PG0, but the output value which is the execution result of the instance 60 is passed.
FIG. 7 illustrates the pseudo program code of PG0. Codes 71 and 76 are tags indicating the start and end of the program, and are substantially unprocessed codes. The code 72 corresponds to the variable 61 in FIG. On the code, A, CTU # 1. Although it is represented as CU, in reality, the address of the data memory of the programmable controller is allocated to these variables (or instance areas). Here, CTU # 1 is the start address of the instance area, CTU # 1. The address of a variable CU, which is a constituent element, is assigned to the CU. A code 73 is a PUSH instruction, which is an instruction for storing the address of the instance area in a stack or the like. Code 74 is a CAL instruction that calls the program code of the function block CTU (in the actual code, the function block number corresponding to the CTU is set, and this function block number is consistent between the programmable controller and the programmable controller support device. ) The code 75 corresponds to the variable 62 in FIG. After the processing of the function block CTU called by the code 74 is completed, the execution result is used as an output value, and CTU # 1 is set to CTU # 1. Q, CTU # 1. A value is extracted from CV and stored in D and E.

図8は、システムFBテーブルの一例を説明したもである。これはプログラマブルコントローラ側で、ファンクションブロック番号で指定されたシステムFBを速やかに呼び出せるように、システム起動時にシステムFBのプログラムコードのアドレスを登録するのに用い、データメモリに配置する。ここでは、システムFBがz個あるものとし、それぞれのプログラムメモリ上での開始アドレスを管理するテーブルとして、データメモリ上に配置している。システムFBは全て使用されている必要は無く、例えば、システムFB1〜システムFBmまでを使用(以下、予約領域と呼ぶ)し、システムFBn〜システムFBzはアドレス値を空(以下、空き領域と呼ぶ)であっても構わない。
また、システムFBテーブルでは、ファンクションブロック番号を順に付与する。図8において、システムFB1のアドレスを管理する領域を番号1、システムFB1のアドレスを管理する領域を2、…、システムFB1のアドレスを管理する領域を番号zとする。よって、ファンクションブロック番号が分かれば、システムFBのアドレスも一意に決まる。また、システムFBテーブル内に、ファンクションブロック番号とシステムFBのアドレスとの組を登録しても構わない。この場合、システムFBテーブルの情報は順不同/サイズ可変でも管理が可能になる。なお、システムFBテーブルにおいて、システムFBのアドレスとして管理する領域のサイズが全て等しい場合、システムFBテーブルの開始位置(アドレス)からの相対位置をファンクションブロック番号として管理しても構わない。
FIG. 8 illustrates an example of the system FB table. This is used for registering the address of the program code of the system FB when the system is started so that the programmable controller can quickly call the system FB designated by the function block number. Here, it is assumed that there are z systems FB, and they are arranged on the data memory as a table for managing the start address on each program memory. The system FB does not have to be used at all. For example, the system FB1 to the system FBm are used (hereinafter referred to as reserved areas), and the system FBn to system FBz have empty address values (hereinafter referred to as free areas) It does not matter.
In the system FB table, function block numbers are assigned in order. 8, the area for managing the address of the system FB1 is number 1, the area for managing the address of the system FB1 is 2,..., And the area for managing the address of the system FB1 is number z. Therefore, if the function block number is known, the address of the system FB is also uniquely determined. Also, a set of function block number and system FB address may be registered in the system FB table. In this case, the information in the system FB table can be managed even in random order / variable size. In the system FB table, when the sizes of the areas managed as the system FB addresses are all equal, the relative position from the start position (address) of the system FB table may be managed as the function block number.

図9は、プログラマブルコントローラ側におけるシステムFBの処理の一例を概略フローチャートで説明したものである。ここではプログラマブルコントローラのアプリケーションの処理の1つとして、PG0(図6、参照)が実行されたとき、PG0におけるシステムFB(CTU)がどのように処理されるかについて、その概略を示す。
PG0の実行中において、プログラマブルコントローラに予め実装されているCAL処理が呼び出される(ステップS91)。また、ステップS91の前処理として、システムFB(CTU)のインスタンスアドレスはデータメモリ上にスタックされ、インスタント領域に格納されている。CAL処理では、始めにシステムFB(CTU)処理後の戻りアドレスを保存する(ステップ92)。その上で、スタックに格納されているインスタンス領域のアドレスを取り出し(ステップ93)、呼び出そうとしているシステムFB(CTU)のファンクションブロック番号をシステムFBテーブル(図8)から検索し、アドレス情報を取り出す(ステップ94)。インスタンス領域のアドレスをパラメータにセットしてシステムFB(CTU)の処理にジャンプする(ステップ95)。システムFB(CTU)の処理終了後、ステップS92で保存しておいた戻りアドレスにジャンプした後、PG0の処理を継続する。
FIG. 9 is a schematic flowchart illustrating an example of processing of the system FB on the programmable controller side. Here, an outline of how the system FB (CTU) in PG0 is processed when PG0 (see FIG. 6) is executed as one of the processes of the application of the programmable controller is shown.
During the execution of PG0, a CAL process pre-installed in the programmable controller is called (step S91). In addition, as preprocessing in step S91, the instance address of the system FB (CTU) is stacked on the data memory and stored in the instant area. In the CAL process, first, the return address after the system FB (CTU) process is stored (step 92). Then, the address of the instance area stored in the stack is extracted (step 93), the function block number of the system FB (CTU) to be called is retrieved from the system FB table (FIG. 8), and the address information is obtained. Remove (step 94). The instance area address is set as a parameter to jump to the system FB (CTU) process (step 95). After the processing of the system FB (CTU) is completed, after jumping to the return address stored in step S92, the processing of PG0 is continued.

本発明では、このようにファンクションブロックを扱うプログラマブルコントローラにおいて、組み込みソフトウェアであるユーザFBをどのようにしてシステムFBに登録するかの具体的な方法を示す。
まず、図3のプログラマブルコントローラ支援装置30における図示しない支援ツールにおけるユーザインターフェースから、順を追って説明する。
図10は、作成対象のPOU:Program Organization Unitを選択する画面を説明したものである。従来のプログラム・ファンクションブロック・ファンクションに加えて、組み込みソフトウェアのファンクションブロックの作成を支援することを示している。
図11は、組み込みソフトウェアのファンクションブロックの編集画面の一例を説明したものである。ここでは、ファンクションブロックの名称と、各変数の変数名、データ型、種類を入力する。ファンクションブロック名称は、入力規則に制限は無いが、既に登録済みの名称と重複しないようにする。変数名も入力規則に制限は無いが、同一ファンクションブロック内で重複しないようにする。データ型は、変数の型であるINT型、BOOL型等を指定可能で、ファンクションブロックのインスタンスの構成(図5、参照)にも反映される。種類は、INPUT、OUTPUTのいずれかであり、変数がファンクションブロックの入力側、出力側のいずれかであるかを指定することになる。
In the present invention, a specific method of registering the user FB, which is embedded software, in the system FB in the programmable controller that handles function blocks in this way is shown.
First, the user interface in a support tool (not shown) in the programmable controller support device 30 in FIG. 3 will be described in order.
FIG. 10 illustrates a screen for selecting a POU: Program Organization Unit to be created. In addition to conventional programs, function blocks, and functions, it shows support for creating function blocks for embedded software.
FIG. 11 illustrates an example of the function block editing screen of the embedded software. Here, the name of the function block and the variable name, data type, and type of each variable are input. The function block name is not limited in input rules, but it should not be duplicated with already registered names. There are no restrictions on the input rules for variable names, but they should not be duplicated in the same function block. As the data type, an INT type, a BOOT type, or the like, which is a variable type, can be specified, and is reflected in the configuration of the function block instance (see FIG. 5). The type is either INPUT or OUTPUT, and specifies whether the variable is on the input side or output side of the function block.

図12は、組み込みソフトウェアのファンクションブロックの雛形の一例を説明したものである。図11で設定した変数を用い、C言語を用いた組み込みソフトウェアの雛形を作成する例を示す。コード121は、構造体の記述方式であり、ファンクションブロックにおいてはインスタンスに相当する。コード122は、構造体からの変数受け渡しと、実際の処理を記入する箇所であり、特に、/* 以下に処理を記入する */の箇所以降に演算式や制御内容をユーザがC言語で記載する。なお、ここでは説明の関係で図11で変数等の情報を入力してから図12で雛形を作成する例を示したが、図11の情報より、コード121やコード122の変数などの該当部分を自動的に反映しても構わないし、コード121、122をユーザが直接入力しても構わない。作成したコードを、組み込みソフトウェアの開発環境にてコンパイルし、オブジェクトファイル(組み込みソフトウェアFBコード)を生成する。
図13は、本発明の組み込みソフトウェアのファンクションブロックのダウンロード概略を説明したものである。プログラマブルコントローラ内では、プログラムメモリにてFBコードを管理し、データメモリにてシステムFBテーブルを管理している。システムFBテーブルでは、メーカにより提供され既に使用されているので登録できないシステムFBテーブル(予約領域)131と、ユーザが自由に登録可能なシステムFBテーブル(空き領域)132から構成される。ここでは、番号1から99までがシステムFBテーブル(予約領域)131、番号100以降がシステムFBテーブル(空き領域)132となっている。
FIG. 12 illustrates an example of a function block model of embedded software. An example in which a template of embedded software using C language is created using the variables set in FIG. The code 121 is a structure description method, and corresponds to an instance in a function block. The code 122 is a place where the variable is transferred from the structure and the actual process is entered. In particular, the process is entered in / * and the part below. To do. Here, for the sake of explanation, an example in which information such as variables is input in FIG. 11 and a template is created in FIG. 12 is shown here. However, from the information in FIG. May be automatically reflected, or the codes 121 and 122 may be directly input by the user. The created code is compiled in an embedded software development environment to generate an object file (embedded software FB code).
FIG. 13 illustrates an outline of downloading of function blocks of the embedded software according to the present invention. In the programmable controller, the FB code is managed in the program memory, and the system FB table is managed in the data memory. The system FB table includes a system FB table (reserved area) 131 that is provided by a manufacturer and cannot be registered because it is already used, and a system FB table (free area) 132 that can be freely registered by the user. Here, numbers 1 to 99 are the system FB table (reserved area) 131, and numbers 100 and later are the system FB table (free area) 132.

プログラマブルコントローラ支援装置では、生成された組み込みソフトウェアFBコードをプログラマブルコントローラにダウンロードする。ダウンロードされたソフトウェアFBコードは、プログラムメモリの空き領域に格納される。ここでユーザが、FBコードをシステムFBとして登録することを指定したときは、システムFBテーブルの空いている番号をファンクションブロック番号としてダウンロードする。
ここでは、ダウンロード後のソフトウェアFBコードの格納先の先頭アドレスは500番地である。システムFBとして登録することを指定した場合は、空き番号としてダウンロードされたファンクションブロック番号100より、システムFBテーブルの番号100に500が格納される。
なお、システムFBテーブルの情報は、システムの起動時や再立ち上げ時、他のプログラマブルコントローラからのダウンロード等のタイミングで、プログラマブルコントローラシステム全体で整合をとるものとする。
図14は、図13におけるダウンロード後のシステムFBテーブルの格納の一例を説明したものである。システムFB100より後の領域を、引き続きシステムFBテーブルの空き領域として使用可能である。ユーザが登録後に不要になったシステムFBについては、削除しても構わない。またデータメモリに余裕があるときには、必要に応じて、空き領域を拡張しても構わない。但し、拡張のタイミングで、システムFBテーブルをプログラマブルコントローラシステム全体で整合する。
In the programmable controller support device, the generated embedded software FB code is downloaded to the programmable controller. The downloaded software FB code is stored in an empty area of the program memory. Here, when the user designates registration of the FB code as the system FB, an available number in the system FB table is downloaded as a function block number.
Here, the start address of the storage destination of the software FB code after download is 500 addresses. When it is designated to register as the system FB, 500 is stored in the number 100 of the system FB table from the function block number 100 downloaded as a free number.
It should be noted that the information in the system FB table is consistent throughout the programmable controller system at the time of system startup, restart, download from other programmable controllers, and the like.
FIG. 14 illustrates an example of storing the system FB table after downloading in FIG. The area after the system FB 100 can be continuously used as a free area of the system FB table. The system FB that is no longer necessary after the user has registered may be deleted. Further, when there is a margin in the data memory, the free area may be expanded as necessary. However, the system FB table is matched in the entire programmable controller system at the expansion timing.

以上から明らかなように、システムFBテーブルによりシステムFBと組み込みソフトウェアFBとを管理しているので、ユーザが作成した組み込みソフトウェアをプログラマブルコントローラのアプリケーションから呼び出し可能になる。   As is clear from the above, since the system FB and the embedded software FB are managed by the system FB table, the embedded software created by the user can be called from the application of the programmable controller.

本発明におけるプログラマブルコントローラシステムの構成の一例を示す説明図Explanatory drawing which shows an example of a structure of the programmable controller system in this invention 本発明におけるプログラマブルコントローラのハード構成を示す説明図Explanatory drawing which shows the hardware constitutions of the programmable controller in this invention 本発明におけるプログラマブルコントローラ支援装置の概略ハード構成を示す説明図Explanatory drawing which shows schematic hardware structure of the programmable controller assistance apparatus in this invention ファンクションブロックの入出力概略の一例示す説明図Explanatory drawing showing an example of input / output outline of function block ファンクションブロックのインスタンスの構成の一例を示す説明図An explanatory diagram showing an example of the configuration of an instance of a function block システムFBを呼び出したプログラムの一例を示す説明図Explanatory drawing which shows an example of the program which called system FB 図6で示すのプログラム(PG0)の擬似的なプログラムコードを示す説明図Explanatory drawing which shows the pseudo program code of the program (PG0) shown in FIG. システムFBテーブルの一例を示す説明図Explanatory drawing which shows an example of a system FB table システムFBの処理の一例を概略フローチャートで示す説明図Explanatory drawing which shows an example of a process of system FB with a schematic flowchart 支援ツールのPOU選択画面を示す説明図Explanatory drawing showing the POU selection screen of the support tool 組み込みソフトウェアのファンクションブロックの編集画面の一例を示した説明図Explanatory drawing showing an example of the function block editing screen of the embedded software 組み込みソフトウェアのファンクションブロックの雛形の一例を示した説明図An explanatory diagram showing an example of a function block template for embedded software 組み込みスフトウェアのファンクションブロックのダウンロード方法を示した説明図Explanatory diagram showing how to download function blocks of embedded software ダウンロード後のシステムFBテーブルの格納状態の一例を示した説明図Explanatory drawing which showed an example of the storage state of the system FB table after download

符号の説明Explanation of symbols

11…パソコン
12、13、14、20…プログラマブルコントローラ
15…入出力モジュール
16…ケーブル
17…制御用ネットワーク
21…ドライバ/レシーバ
22…CPU
23…バスコントローラ
24…フラッシュメモリ
25…プログラムメモリ
26…データメモリ
27…内部バス
30…プログラマブルコントローラ支援装置
31…CPU
32…通信I/F
33…入力デバイス
34…表示デバイス
35…記憶装置
36…内部バス
40…ファンクションブロック本体
41…入力端子
42…出力端子
60…インスタンス
61、62…変数
71、72、73、74、75、76、121、122…コード
131…システムFBテーブル(予約領域)
132…システムFBテーブル(空き領域)

DESCRIPTION OF SYMBOLS 11 ... Personal computer 12, 13, 14, 20 ... Programmable controller 15 ... Input / output module 16 ... Cable 17 ... Control network 21 ... Driver / receiver 22 ... CPU
23 ... Bus controller 24 ... Flash memory 25 ... Program memory 26 ... Data memory 27 ... Internal bus 30 ... Programmable controller support device 31 ... CPU
32 ... Communication I / F
33 ... Input device 34 ... Display device 35 ... Storage device 36 ... Internal bus 40 ... Function block body 41 ... Input terminal 42 ... Output terminal 60 ... Instance 61, 62 ... Variable 71, 72, 73, 74, 75, 76, 121 122 ... code 131 ... system FB table (reserved area)
132 ... System FB table (free space)

Claims (5)

プログラマブルコントローラのメーカが提供するシステムファンクションブロックと、ユーザが作成するユーザファンクションブロックと、該システムファンクションブロック及び/又は該ユーザファンクションブロックを用いたプログラムとを、保存用として格納する第1の記憶手段と、
前記第1の記憶手段に格納されている情報を複写し、実行用として格納する第2の記憶手段と、
前記プログラムのリード及び/又はライト対象となるデータを格納する第3の記憶手段と、
前記プログラムを解釈し実行する実行手段と、
専用線、或いは外部ネットワークを通じデータの交信を行う第1の通信手段と、
専用線を通じ制御対象機器の制御・監視の為の通信を行う第2の通信手段とを備え、
前記第1の通信手段を通じて前記ユーザファンクションブロックの登録の指示があったときには、該ユーザファンクションブロックを前記システムファンクションブロックとして登録し、登録後は前記システムファンクションブロックの一つとして扱うことを特徴とするプログラマブルコントローラ。
A system function block provided by the manufacturer of the programmable controller, a user function block created by a user, and a first storage means for storing the system function block and / or a program using the user function block for storage ,
A second storage means for copying the information stored in the first storage means and storing it for execution;
Third storage means for storing data to be read and / or written to the program;
Execution means for interpreting and executing the program;
A first communication means for communicating data via a dedicated line or an external network;
A second communication means for performing communication for control and monitoring of the controlled device through a dedicated line;
When there is an instruction to register the user function block through the first communication means, the user function block is registered as the system function block, and after the registration, it is treated as one of the system function blocks. Programmable controller.
請求項1に記載のプログラマブルコントローラにおいて、
前記第3の記憶手段は、前記システムファンクションブロックを一意に特定するファンクションブロック番号と、該ファンクションブロック番号から一意に呼び出し可能な前記システムファンクションブロックのプログラムコードを指定する情報とを、管理するシステムファンクションブロックテーブルを有し、
前記ユーザファンクションブロックを前記システムファンクションブロックとして登録するときは、前記システムファンクションブロックテーブルに前記ユーザファンクションブロックを一意に特定するファンクションブロック番号に対応させて、該ファンクションブロック番号から一意に呼び出し可能な前記ユーザファンクションブロックのプログラムコードを特定する情報を登録することを特徴とするプログラマブルコントローラ。
The programmable controller according to claim 1,
The third storage means manages a function block number that uniquely identifies the system function block, and information that specifies a program code of the system function block that can be uniquely called from the function block number. Have a block table,
When registering the user function block as the system function block, the user that can be uniquely called from the function block number corresponding to the function block number that uniquely identifies the user function block in the system function block table A programmable controller that registers information for specifying a program code of a function block.
請求項1または2に記載のプログラマブルコントローラにおいて、
前記実行手段は、アプリケーション実行機能、システム管理機能、支援ツールインターフェース機能を具備し、リアルタイムオペレーティングシステムを用いた汎用マイコンにより実現されることを特徴とするプログラマブルコントローラ。
The programmable controller according to claim 1 or 2,
The execution means includes an application execution function, a system management function, and a support tool interface function, and is realized by a general-purpose microcomputer using a real-time operating system.
プログラマブルコントローラのメーカが提供するシステムファンクションブロック、及び/又はユーザが作成するユーザファンクションブロックを用いたプログラミング環境をユーザに提供し、作成されたプログラムを管理する管理手段と、
前記プログラムを動作させたいプログラマブルコントローラに前記プログラムを送信する送信手段、前記ユーザファンクションブロックを前記システムファンクションブロックとして使用するかしないかを選択する選択手段を設け、該選択手段により使用することが選択されたときは前記システムファンクションブロックとして登録する情報を前記送信手段を介して送信することを特徴とするプログラマブルコントローラ支援装置。
A management means for providing a user with a programming environment using a system function block provided by the manufacturer of the programmable controller and / or a user function block created by the user and managing the created program;
Transmission means for transmitting the program to a programmable controller to operate the program, selection means for selecting whether or not to use the user function block as the system function block, and selection by the selection means is selected. When this happens, information to be registered as the system function block is transmitted via the transmission means.
プログラマブルコントローラのメーカが提供するシステムファンクションブロックと、ユーザが作成するユーザファンクションブロックと、該システムファンクションブロック及び/又は該ユーザファンクションブロックを用いたプログラムとを、保存用として格納する第1の記憶手段と、
前記第1の記憶手段に格納されている情報全てを複写し、実行用として格納する第2の記憶手段と、
前記プログラムのリード及び/又はライト対象となるデータを格納する第3の記憶手段と、
前記プログラムを解釈し実行する実行手段と、
専用線、或いは外部ネットワークを通じデータの交信を行う第1の通信手段と、
専用線を通じ制御対象機器の制御・監視の為の通信を行う第2の通信手段とを備え、
前記第1の通信手段を通じて前記ユーザファンクションブロックの登録の指示があったときには、該ユーザファンクションブロックを前記システムファンクションブロックとして登録し、登録後は前記システムファンクションブロックの一つとして扱うプログラマブルコントローラと、
前記システムファンクションブロック、及び/又は前記ユーザファンクションブロックを用いたプログラミング環境をユーザに提供し、作成されたプログラムを管理する管理手段と、
前記プログラマブルコントローラに前記プログラムを送信する送信手段、前記ユーザファンクションブロックを前記システムファンクションブロックとして使用するかしないかを選択する選択手段を設け、該選択手段により使用することが選択されたときは前記システムファンクションブロックとして登録する情報を前記送信手段を介して送信するプログラマブルコントローラ支援装置とを具備することを特徴とするプログラマブルコントローラシステム。
A system function block provided by the manufacturer of the programmable controller, a user function block created by a user, and a first storage means for storing the system function block and / or a program using the user function block for storage ,
A second storage means for copying all the information stored in the first storage means and storing it for execution;
Third storage means for storing data to be read and / or written to the program;
Execution means for interpreting and executing the program;
A first communication means for communicating data via a dedicated line or an external network;
A second communication means for performing communication for control and monitoring of the controlled device through a dedicated line;
When there is an instruction to register the user function block through the first communication means, the user function block is registered as the system function block, and after registration, a programmable controller that is handled as one of the system function blocks;
A management means for providing a user with a programming environment using the system function block and / or the user function block and managing the created program;
Transmission means for transmitting the program to the programmable controller, selection means for selecting whether or not to use the user function block as the system function block is provided, and when the use is selected by the selection means, the system A programmable controller system comprising: a programmable controller support device that transmits information to be registered as a function block via the transmission means.
JP2007171535A 2007-06-29 2007-06-29 Programmable controller, programmable controller support apparatus, and programmable controller system Active JP4821717B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007171535A JP4821717B2 (en) 2007-06-29 2007-06-29 Programmable controller, programmable controller support apparatus, and programmable controller system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007171535A JP4821717B2 (en) 2007-06-29 2007-06-29 Programmable controller, programmable controller support apparatus, and programmable controller system

Publications (2)

Publication Number Publication Date
JP2009009444A true JP2009009444A (en) 2009-01-15
JP4821717B2 JP4821717B2 (en) 2011-11-24

Family

ID=40324441

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007171535A Active JP4821717B2 (en) 2007-06-29 2007-06-29 Programmable controller, programmable controller support apparatus, and programmable controller system

Country Status (1)

Country Link
JP (1) JP4821717B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009237947A (en) * 2008-03-27 2009-10-15 Fuji Electric Systems Co Ltd Programmable controller, programmable controller support device, and programmable controller system
JP2016110220A (en) * 2014-12-02 2016-06-20 株式会社キーエンス Programmable logic controller and control method therefor
JP2017049822A (en) * 2015-09-02 2017-03-09 株式会社日立製作所 Control management system and control method
WO2020071435A1 (en) * 2018-10-05 2020-04-09 オムロン株式会社 Development support program, development support device, and development support method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07191716A (en) * 1993-12-27 1995-07-28 Mitsubishi Electric Corp Controller
JP2000194406A (en) * 1998-12-28 2000-07-14 Digital Electronics Corp Programming method for industrial controller and programming system
JP2001051704A (en) * 1999-08-06 2001-02-23 Omron Corp Programmable controller
JP2002351509A (en) * 2001-05-25 2002-12-06 Mitsubishi Electric Corp Programming tool and programming method
JP2005326909A (en) * 2004-05-12 2005-11-24 Mitsubishi Electric Corp Plant engineering system
JP2006178818A (en) * 2004-12-24 2006-07-06 Yaskawa Electric Corp Motion controller, engineering tool, and c language execution system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07191716A (en) * 1993-12-27 1995-07-28 Mitsubishi Electric Corp Controller
JP2000194406A (en) * 1998-12-28 2000-07-14 Digital Electronics Corp Programming method for industrial controller and programming system
JP2001051704A (en) * 1999-08-06 2001-02-23 Omron Corp Programmable controller
JP2002351509A (en) * 2001-05-25 2002-12-06 Mitsubishi Electric Corp Programming tool and programming method
JP2005326909A (en) * 2004-05-12 2005-11-24 Mitsubishi Electric Corp Plant engineering system
JP2006178818A (en) * 2004-12-24 2006-07-06 Yaskawa Electric Corp Motion controller, engineering tool, and c language execution system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009237947A (en) * 2008-03-27 2009-10-15 Fuji Electric Systems Co Ltd Programmable controller, programmable controller support device, and programmable controller system
JP2016110220A (en) * 2014-12-02 2016-06-20 株式会社キーエンス Programmable logic controller and control method therefor
JP2017049822A (en) * 2015-09-02 2017-03-09 株式会社日立製作所 Control management system and control method
WO2017038342A1 (en) * 2015-09-02 2017-03-09 株式会社日立製作所 Control management system and control method
WO2020071435A1 (en) * 2018-10-05 2020-04-09 オムロン株式会社 Development support program, development support device, and development support method
JP2020060855A (en) * 2018-10-05 2020-04-16 オムロン株式会社 Development support program, development support device, and development support method
US11321052B2 (en) 2018-10-05 2022-05-03 Omron Corporation Development support device, development support method, and non-transitory computer readable medium

Also Published As

Publication number Publication date
JP4821717B2 (en) 2011-11-24

Similar Documents

Publication Publication Date Title
US8327316B2 (en) Compilation model
EP1351108B1 (en) Method and apparatus for programming
CN105911885B (en) Industrial control unit (ICU) for improving industrial control system
EP3101494B1 (en) Control apparatus and control system
JP4821717B2 (en) Programmable controller, programmable controller support apparatus, and programmable controller system
EP2733613B1 (en) Controller and program
JP4426492B2 (en) Programmable terminal system
CN109507991B (en) Double-shaft servo control platform debugging system and method
JP4877257B2 (en) Programmable controller, programmable controller support apparatus, and programmable controller system
JP4366575B2 (en) tool
JP7172864B2 (en) Support equipment and support programs
JP2004280299A (en) Controller, developing device and system
JPH03229352A (en) Program changing method
JP6954191B2 (en) Control systems, development support equipment, and development support programs
JP2006178818A (en) Motion controller, engineering tool, and c language execution system
JP2006059308A (en) General-purposed and real-timed information processor
JP2006317990A (en) Programmable logic controller, and communication system
JP2009245194A (en) Programmable controller, programmable controller support apparatus, and programmable controller system
JP3795357B2 (en) Editor device, editor program, and recording medium recording the same
JP4784355B2 (en) Programmable controller system, programmable controller debugging method, programming support program, programmable controller debug control program
JP3781112B2 (en) Programmable controller system
JP2016062103A (en) Programmable controller
JP4123150B2 (en) Design support system and design support method
JP3496436B2 (en) Programmable controller
JP2695930B2 (en) Intelligent I / O module

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20081215

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20090219

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110222

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110224

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110331

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20110422

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: 20110809

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110822

R150 Certificate of patent or registration of utility model

Ref document number: 4821717

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140916

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250