JPH11305809A - Programmable controller system, programmable controller supporting device, programmable controller and storage medium - Google Patents

Programmable controller system, programmable controller supporting device, programmable controller and storage medium

Info

Publication number
JPH11305809A
JPH11305809A JP10597398A JP10597398A JPH11305809A JP H11305809 A JPH11305809 A JP H11305809A JP 10597398 A JP10597398 A JP 10597398A JP 10597398 A JP10597398 A JP 10597398A JP H11305809 A JPH11305809 A JP H11305809A
Authority
JP
Japan
Prior art keywords
initialization
variable
programmable controller
file
initialization pattern
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
JP10597398A
Other languages
Japanese (ja)
Other versions
JP3629947B2 (en
Inventor
Kazuto Nagatsuka
一人 永塚
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 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 Co Ltd filed Critical Fuji Electric Co Ltd
Priority to JP10597398A priority Critical patent/JP3629947B2/en
Publication of JPH11305809A publication Critical patent/JPH11305809A/en
Application granted granted Critical
Publication of JP3629947B2 publication Critical patent/JP3629947B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Control By Computers (AREA)
  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce the capacities of an initialization pattern file and an attribute information file to be transmitted from a programmable controller supporting device to a programmable controller. SOLUTION: A compile means 1b complies an application program inputted from an application program inputting means 1a. At that time, an initialization variable extracting means 1c extracts an initialization variable, and an initialization pattern file generating means 1d generates an initialization pattern file. Also, a common initialization pattern file generating means 1e generates a common pattern file, and a mapping information generating means 1f generates mapping information. A transmitting means 1g transmits an executable file generated by the compile, initialization pattern file, common initialization pattern file, and mapping information to a programmable controller 3. The initialization pattern file stored in an initialization pattern storing means 3c of the programmable controller 3 is mapped to the prescribed area of a variable value storing means 3e of a mapping means 3d at the time of activation.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はプログラマブルコン
トローラシステム、プログラマブルコントローラ支援装
置、プログラマブルコントローラ、および、記録媒体に
関し、特に、プログラマブルコントローラ支援装置から
入力されたアプリケーションプログラムのソースコード
をコンパイルして実行可能ファイルを生成した後、プロ
グラマブルコントローラに供給して実行するプログラマ
ブルコントローラシステム、プログラマブルコントロー
ラシステムを構成するプログラマブルコントローラ支援
装置とプログラマブルコントローラ、および、コンピュ
ータをプログラマブルコントローラ支援装置として機能
させるプログラムを記録した記録媒体に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a programmable controller system, a programmable controller support device, a programmable controller, and a recording medium, and more particularly, to a program executable by compiling source code of an application program input from the programmable controller support device. The present invention relates to a programmable controller system that generates and then supplies the program to a programmable controller, executes the programmable controller system and the programmable controller that constitute the programmable controller system, and a recording medium that records a program that causes a computer to function as the programmable controller support device.

【0002】[0002]

【従来の技術】制御仕様が簡単に変更できることを特徴
とするプログラマブルコントローラ(PC:Proglamable
Controller)が、その低価格化と高性能化に牽引され
て、数多の現場で使用されるようになってきた。
2. Description of the Related Art A programmable controller (PC: Proglamable) characterized in that control specifications can be easily changed.
Controllers) have come to be used in numerous sites, driven by their lower prices and higher performance.

【0003】一般的に、プログラマブルコントローラ
は、パーソナルコンピュータと同様に、CPU、RO
M、RAM、および、インターフェースなどによって構
成されており、プログラマブルコントローラ支援装置か
ら供給されたアプリケーションプログラムに応じて、制
御対象であるモジュール群を制御する。
[0003] Generally, a programmable controller is, like a personal computer, a CPU, an RO, and the like.
It is configured by an M, a RAM, an interface, and the like, and controls a group of modules to be controlled according to an application program supplied from the programmable controller support device.

【0004】ところで、プログラマブルコントローラで
実行するアプリケーションプログラムは、プログラマブ
ルコントローラ支援装置において、例えば、高級言語や
図形言語などを用いて記述する。そして、このアプリケ
ーションプログラムを実行する場合には、プログラムを
コンパイルして実行可能ファイルを生成した後、その実
行可能ファイルをプログラマブルコントローラに送信し
て実行させる。
By the way, an application program executed by a programmable controller is described in a programmable controller support device using, for example, a high-level language or a graphic language. Then, when executing the application program, the program is compiled to generate an executable file, and then the executable file is transmitted to the programmable controller to be executed.

【0005】なお、アプリケーションプログラムをコン
パイルする際は、アプリケーションプログラムで使用さ
れている各種変数の初期値を格納した初期化パターンフ
ァイルが生成され、実行可能ファイルとともに、プログ
ラマブルコントローラに送信される。
[0005] When compiling an application program, an initialization pattern file storing initial values of various variables used in the application program is generated and transmitted to the programmable controller together with the executable file.

【0006】図12は、従来のプログラマブルコントロ
ーラによって生成される初期化パターンファイルの一例
を示す図である。この図において、アプリケーションプ
ログラムP1は、ソースコードであり、この例では、I
EC(International Electrotechnical Commission )
1131−3規格に準拠した高級言語で記述されてい
る。
FIG. 12 is a diagram showing an example of an initialization pattern file generated by a conventional programmable controller. In this figure, an application program P1 is a source code.
EC (International Electrotechnical Commission)
It is described in a high-level language conforming to the 1131-3 standard.

【0007】ところで、このIEC1131−3規格に
準拠した高級言語で使用可能な変数は、次の4種類であ
る。なお、これらの変数は、ユーザが指定した初期値を
有するか否かと、後述するウォーム起動とコールド起動
における初期化の取り扱いの相違と、によって分類され
る。 (1)通常変数:起動方法に拘わらず値0に初期化され
る (2)初期化変数:起動方法に拘わらず所定の初期値を
有する (3)リテイン変数:コールド起動では値0に初期化さ
れ、ウォーム起動では前回実行時の値が保持される (4)初期化リテイン変数:コールド起動では所定の値
に初期化され、ウォーム起動では前回実行時の値が保持
される ここで、ウォーム起動とは、前回実行時におけるリテイ
ン変数(初期化リテイン変数も含む)の値を保持した状
態で再起動することであり、また、コールド起動とは、
リテイン変数を初期化した状態で起動することである。
Incidentally, the following four types of variables can be used in a high-level language conforming to the IEC1131-3 standard. Note that these variables are classified according to whether or not they have an initial value specified by the user, and the difference in handling of initialization between warm activation and cold activation described later. (1) Normal variable: Initialized to a value of 0 regardless of the activation method. (2) Initialization variable: has a predetermined initial value regardless of the activation method. (3) Retain variable: Initialized to a value of 0 for cold activation. (4) Initialization retain variable: Initialized to a predetermined value in cold start, and the value of the previous execution is held in warm start. Here, warm start Means restarting with the value of the retain variable (including the initialization retain variable) at the time of the previous execution maintained, and cold start means
This is to start with the retain variables initialized.

【0008】このアプリケーションプログラムP1がプ
ログラマブルコントローラ支援装置によってコンパイル
されると、実行可能ファイル(プログラム)が生成され
るとともに、初期化パターンファイルi1と属性情報a
1とが生成される。
When the application program P1 is compiled by the programmable controller support device, an executable file (program) is generated, and an initialization pattern file i1 and attribute information a
1 is generated.

【0009】ここで、初期化パターンファイルi1は、
アプリケーションプログラムに含まれている変数を初期
化する際の初期値を格納している。また、属性情報a1
は、初期化パターンファイルi1に格納されている初期
値に対応する変数がリテイン変数であるか否かをそのビ
ットの状態によって示す。
Here, the initialization pattern file i1 is
Stores initial values for initializing variables included in application programs. Also, attribute information a1
Indicates whether the variable corresponding to the initial value stored in the initialization pattern file i1 is a retain variable by the state of its bit.

【0010】この例では、アプリケーションプログラム
P1の「VAR」および「END_VAR」によって囲
繞されている領域内に変数の宣言がなされている。例え
ば、第3行目には、正数(Integer )型の変数「AA
A」が宣言されており、その初期値は定義されていな
い。その下の行には、整数型の変数「BBB」が宣言さ
れており、その初期値は16進数の“444”である。
なお、「VAR」および「END_VAR」によって囲
繞されている領域内に変数のうち、初期値が代入されて
いない変数が通常変数であり、初期値が代入されている
変数が初期化変数である。
In this example, variables are declared in an area surrounded by "VAR" and "END_VAR" of the application program P1. For example, on the third line, a variable of type "Integer""AA
A "is declared, and its initial value is not defined. In the line below, an integer type variable “BBB” is declared, and its initial value is “444” in hexadecimal.
It should be noted that, among the variables in the area surrounded by “VAR” and “END_VAR”, the variable to which the initial value is not assigned is the normal variable, and the variable to which the initial value is assigned is the initialization variable.

【0011】また、「VAR RETAIN」および
「END_VAR」によって囲繞されている領域内で宣
言されている変数は、リテイン変数である。例えば、第
8行目には、整数型のリテイン変数「DDD」が宣言さ
れており、その初期値は16進数の“456”である。
「VAR RETAIN」および「END_VAR」に
よって囲繞されている領域内で宣言されている変数のう
ち、初期値が代入されていない変数がリテイン変数であ
り、初期値が代入されている変数が初期化リテイン変数
である。
A variable declared in an area surrounded by “VAR RETAINE” and “END_VAR” is a retain variable. For example, on the eighth line, an integer type retain variable “DDD” is declared, and its initial value is “456” in hexadecimal.
Among the variables declared in the area surrounded by “VAR RETAINE” and “END_VAR”, the variable to which the initial value is not assigned is the retain variable, and the variable to which the initial value is assigned is the initialize retain. Variable.

【0012】従って、アプリケーションプログラムP1
の第3行目に宣言されている整数型の通常変数AAA
は、その初期値が0であるので、初期化パターンファイ
ルの第1行目には“0”が格納されており、また、メモ
リ属性情報の第1行目には、リテイン変数ではないこと
示す“0”が格納されている。
Therefore, the application program P1
Integer type ordinary variable AAA declared in the third line of
Since its initial value is 0, "0" is stored in the first line of the initialization pattern file, and the first line of the memory attribute information indicates that it is not a retain variable. “0” is stored.

【0013】このようにして生成された、初期化パター
ンファイルi1と属性情報a1とは、プログラマブルコ
ントローラに送信され、そこで格納される。そして、例
えば、コールド起動がかけられた場合には、図13に示
すように、初期化パターンファイルの全てがユーザメモ
リ(プログラム実行中に各変数の値を格納するメモリ)
m1に転送される。
The initialization pattern file i1 and the attribute information a1 thus generated are transmitted to the programmable controller and stored therein. Then, for example, when a cold start is performed, as shown in FIG. 13, all of the initialization pattern files are stored in the user memory (memory for storing the values of each variable during execution of the program).
m1.

【0014】また、ウォーム起動がかけられた場合に
は、図14に示すように、属性情報の値が“0”である
ものだけ(リテイン変数以外の変数)が、ユーザメモリ
m1に転送される。
When the warm start is performed, as shown in FIG. 14, only the attribute information having a value of "0" (variable other than the retain variable) is transferred to the user memory m1. .

【0015】そして、アプリケーションプログラムが実
行され、制御対象に対する制御が開始されることにな
る。以上のような構成によれば、例えば、アプリケーシ
ョンプログラムのデバッグ時にはウォーム起動を行っ
て、適宜プログラムを停止させながら動作を確認すると
いったように、目的に応じた形態でプログラムを実行さ
せることができる。
Then, the application program is executed, and the control of the control target is started. According to the above configuration, for example, when debugging an application program, the program can be executed in a form suitable for the purpose, such as performing a warm start and checking the operation while appropriately stopping the program.

【0016】[0016]

【発明が解決しようとする課題】しかしながら、このよ
うな従来の方法では、全ての変数の初期値を格納した初
期化パターンファイルを作成するとともに、それに対応
した属性情報を作成しなければならず、これら2つのフ
ァイル容量が大きくなる。その結果、プログラマブルコ
ントローラ支援装置からプログラマブルコントローラに
対してアプリケーションプログラムを転送するのに時間
を要するという問題点があった。
However, in such a conventional method, it is necessary to create an initialization pattern file storing initial values of all variables and to create attribute information corresponding to the initialization pattern file. The capacity of these two files increases. As a result, there is a problem that it takes time to transfer the application program from the programmable controller support device to the programmable controller.

【0017】本発明はこのような点に鑑みてなされたも
のであり、初期化パターンファイルおよびそれに対応し
た属性情報のファイル容量を縮小化することを可能とす
るプログラマブルコントローラシステム、プログラマブ
ルコントローラ支援装置、プログラマブルコントロー
ラ、および、コンピュータに前述のような処理を実行さ
せるプログラムを記録した記録媒体を提供することを目
的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of such a point, and a programmable controller system, a programmable controller support apparatus, and a program which can reduce the file size of an initialization pattern file and attribute information corresponding thereto. It is an object of the present invention to provide a programmable controller and a recording medium recording a program for causing a computer to execute the above-described processing.

【0018】[0018]

【課題を解決するための手段】本発明では上記課題を解
決するために、プログラマブルコントローラ支援装置か
ら入力されたアプリケーションプログラムのソースコー
ドをコンパイルして実行可能ファイルを生成した後、プ
ログラマブルコントローラに供給して実行するプログラ
マブルコントローラシステムにおいて、前記プログラマ
ブルコントローラ支援装置は、前記アプリケーションプ
ログラムのソースコードの入力を受けるアプリケーショ
ンプログラム入力手段と、前記アプリケーションプログ
ラムのソースコードをコンパイルして、実行可能ファイ
ルを生成するコンパイル手段と、前記アプリケーション
プログラムのソースコードに含まれている変数のうち、
予め設定された初期値によって初期化される初期化変数
と、値0によって初期化されるその他の変数とを弁別
し、初期化変数とその初期値のみを抽出する初期化変数
抽出手段と、前記初期化変数抽出手段によって抽出され
た初期化変数の初期値から初期化パターンファイルを生
成する初期化パターンファイル生成手段と、前記コンパ
イル手段によって生成された実行可能ファイルと、前記
初期化パターンファイル生成手段によって生成された初
期化パターンファイルとを前記プログラマブルコントロ
ーラに送信する送信手段と、前記送信手段によって送信
された実行可能ファイルを起動する起動手段とを有し、
前記プログラマブルコントローラは、前記プログラマブ
ルコントローラ支援装置から送信された前記実行可能フ
ァイルと、前記初期化パターンファイルとを受信する受
信手段と、前記受信手段によって受信された前記実行可
能ファイルを格納する実行可能ファイル格納手段と、前
記受信手段によって受信された前記初期化パターンファ
イルを格納する初期化パターンファイル格納手段と、前
記実行可能ファイルが起動された場合に、各種変数の値
が格納される変数値格納手段と、前記起動手段によって
前記実行可能ファイルが起動された場合には、前記初期
化パターンファイルを前記変数値格納手段の所定の領域
にマッピングするマッピング手段と、前記初期化パター
ンファイルにより予め定められた初期値によって初期化
される前記初期化変数以外の変数に対応する前記変数値
格納手段の所定の領域を値0によって初期化する初期化
手段と、を有することを特徴とするプログラマブルコン
トローラシステムが提供される。
In order to solve the above-mentioned problems, the present invention compiles the source code of an application program input from a programmable controller support device, generates an executable file, and supplies the executable file to the programmable controller. A programmable controller system, the programmable controller support device comprises: an application program input means for receiving an input of a source code of the application program; and a compiling means for compiling the source code of the application program to generate an executable file And, among variables included in the source code of the application program,
Initialization variable extraction means for discriminating between an initialization variable initialized by a preset initial value and other variables initialized by a value 0, and extracting only the initialization variable and its initial value; Initialization pattern file generation means for generating an initialization pattern file from initial values of the initialization variables extracted by the initialization variable extraction means, executable file generated by the compilation means, and initialization pattern file generation means Transmitting means for transmitting an initialization pattern file generated by the programmable controller to the programmable controller, and starting means for starting the executable file transmitted by the transmitting means,
The programmable controller includes a receiving unit that receives the executable file transmitted from the programmable controller support device, the initialization pattern file, and an executable file that stores the executable file received by the receiving unit. Storage means, initialization pattern file storage means for storing the initialization pattern file received by the reception means, and variable value storage means for storing values of various variables when the executable file is started A mapping unit that maps the initialization pattern file to a predetermined area of the variable value storage unit when the executable file is activated by the activation unit; and a mapping unit that is predetermined by the initialization pattern file. Said initialization initialized by the initial value Programmable controller system characterized by having an initialization means for initializing a predetermined area of the variable value storing means corresponding to the variables other than the number the value 0 is provided.

【0019】ここで、プログラマブルコントローラ支援
装置において、アプリケーションプログラム入力手段
は、アプリケーションプログラムのソースコードの入力
を受ける。コンパイル手段は、アプリケーションプログ
ラムのソースコードをコンパイルして、実行可能ファイ
ルを生成する。初期化変数抽出手段は、アプリケーショ
ンプログラムのソースコードに含まれている変数のう
ち、予め設定された初期値によって初期化される初期化
変数と、値0によって初期化されるその他の変数とを弁
別し、初期化変数とその初期値のみを抽出する。初期化
パターンファイル生成手段は、初期化変数抽出手段によ
って抽出された初期化変数の初期値から初期化パターン
ファイルを生成する。送信手段は、コンパイル手段によ
って生成された実行可能ファイルと、初期化パターンフ
ァイル生成手段によって生成された初期化パターンファ
イルとをプログラマブルコントローラに送信する。起動
手段は、送信手段によって送信された実行可能ファイル
を起動する。プログラマブルコントローラにおいて、受
信手段は、プログラマブルコントローラ支援装置から送
信された実行可能ファイルと、初期化パターンファイル
とを受信する。実行可能ファイル格納手段は、受信手段
によって受信された実行可能ファイルを格納する。初期
化パターンファイル格納手段は、受信手段によって受信
された初期化パターンファイルを格納する。変数値格納
手段は、実行可能ファイルが起動された場合に、各種変
数の値が格納される。マッピング手段は、起動手段によ
って実行可能ファイルが起動された場合には、初期化パ
ターンファイルを変数値格納手段の所定の領域にマッピ
ングする。初期化手段は、初期化パターンファイルによ
り予め定められた初期値によって初期化される初期化変
数以外の変数に対応する変数値格納手段の所定の領域を
値0によって初期化する。
Here, in the programmable controller support device, the application program input means receives an input of a source code of the application program. The compiling means compiles the source code of the application program to generate an executable file. The initialization variable extracting means discriminates, from among variables included in the source code of the application program, initialization variables initialized by a preset initial value and other variables initialized by a value 0. Then, only the initialization variables and their initial values are extracted. The initialization pattern file generation unit generates an initialization pattern file from the initial values of the initialization variables extracted by the initialization variable extraction unit. The transmitting unit transmits the executable file generated by the compiling unit and the initialization pattern file generated by the initialization pattern file generating unit to the programmable controller. The activation unit activates the executable file transmitted by the transmission unit. In the programmable controller, the receiving means receives the executable file transmitted from the programmable controller support device and the initialization pattern file. The executable file storing unit stores the executable file received by the receiving unit. The initialization pattern file storage unit stores the initialization pattern file received by the reception unit. The variable value storage means stores values of various variables when the executable file is started. The mapping unit maps the initialization pattern file to a predetermined area of the variable value storage unit when the executable file is activated by the activation unit. The initialization means initializes a predetermined area of the variable value storage means corresponding to a variable other than the initialization variable initialized by an initialization value predetermined by the initialization pattern file with a value of 0.

【0020】また、入力されたアプリケーションプログ
ラムのソースコードをコンパイルして実行可能ファイル
を生成した後、プログラマブルコントローラに供給して
実行させるプログラマブルコントローラ支援装置おい
て、前記アプリケーションプログラムのソースコードの
入力を受けるアプリケーションプログラム入力手段と、
前記アプリケーションプログラムのソースコードをコン
パイルして、実行可能ファイルを生成するコンパイル手
段と、前記アプリケーションプログラムのソースコード
に含まれている変数のうち、予め設定された初期値によ
って初期化される初期化変数と、値0によって初期化さ
れるその他の変数とを弁別し、初期化変数とその初期値
のみを抽出する初期化変数抽出手段と、前記初期化変数
抽出手段によって抽出された初期化変数の初期値から初
期化パターンファイルを生成する初期化パターンファイ
ル生成手段と、前記コンパイル手段によって生成された
実行可能ファイルと、前記初期化パターンファイル生成
手段によって生成された初期化パターンファイルとを前
記プログラマブルコントローラに送信する送信手段と、
前記送信手段によって送信された実行可能ファイルを起
動する起動手段と、を有することを特徴とするプログラ
マブルコントローラ支援装置が提供される。
Further, in a programmable controller support apparatus for compiling an input source code of an application program to generate an executable file and then supplying the executable file to a programmable controller for execution, the input of the source code of the application program is received. Application program input means;
Compiling means for compiling the source code of the application program to generate an executable file, and initialization variables initialized by a preset initial value among variables included in the source code of the application program And other variables initialized by the value 0, and initializing variable extracting means for extracting only the initializing variables and their initial values, and initializing the initializing variables extracted by the initializing variable extracting means. An initialization pattern file generating means for generating an initialization pattern file from values, an executable file generated by the compiling means, and an initialization pattern file generated by the initialization pattern file generating means to the programmable controller. Transmitting means for transmitting;
And a starting unit for starting the executable file transmitted by the transmitting unit.

【0021】ここで、アプリケーションプログラム入力
手段は、アプリケーションプログラムのソースコードの
入力を受ける。コンパイル手段は、アプリケーションプ
ログラムのソースコードをコンパイルして、実行可能フ
ァイルを生成する。初期化変数抽出手段は、アプリケー
ションプログラムのソースコードに含まれている変数の
うち、予め設定された初期値によって初期化される初期
化変数と、値0によって初期化されるその他の変数とを
弁別し、初期化変数とその初期値のみを抽出する。初期
化パターンファイル生成手段は、初期化変数抽出手段に
よって抽出された初期化変数の初期値から初期化パター
ンファイルを生成する。送信手段は、コンパイル手段に
よって生成された実行可能ファイルと、初期化パターン
ファイル生成手段によって生成された初期化パターンフ
ァイルとをプログラマブルコントローラに送信する。起
動手段は、送信手段によって送信された実行可能ファイ
ルを起動する。
Here, the application program input means receives an input of a source code of the application program. The compiling means compiles the source code of the application program to generate an executable file. The initialization variable extracting means discriminates, from among variables included in the source code of the application program, initialization variables initialized by a preset initial value and other variables initialized by a value 0. Then, only the initialization variables and their initial values are extracted. The initialization pattern file generation unit generates an initialization pattern file from the initial values of the initialization variables extracted by the initialization variable extraction unit. The transmitting unit transmits the executable file generated by the compiling unit and the initialization pattern file generated by the initialization pattern file generating unit to the programmable controller. The activation unit activates the executable file transmitted by the transmission unit.

【0022】更に、プログラマブルコントローラ支援装
置がアプリケーションプログラムのソースコードをコン
パイルして生成した実行可能ファイルを入力して実行す
るプログラマブルコントローラにおいて、前記プログラ
マブルコントローラ支援装置から送信された前記実行可
能ファイルと、前記初期化パターンファイルとを受信す
る受信手段と、前記受信手段によって受信された前記実
行可能ファイルを格納する実行可能ファイル格納手段
と、前記受信手段によって受信された前記初期化パター
ンファイルを格納する初期化パターンファイル格納手段
と、前記実行可能ファイルが起動された場合に、各種変
数の値が格納される変数値格納手段と、前記起動手段に
よって前記実行可能ファイルが起動された場合には、前
記初期化パターンファイルを前記変数値格納手段の所定
の領域にマッピングするマッピング手段と、前記初期化
パターンファイルにより予め定められた初期値によって
初期化される前記初期化変数以外の変数に対応する前記
変数値格納手段の所定の領域を値0によって初期化する
初期化手段と、を有することを特徴とするプログラマブ
ルコントローラが提供される。
Further, in a programmable controller in which the programmable controller support apparatus inputs and executes an executable file generated by compiling the source code of an application program, the executable file transmitted from the programmable controller support apparatus; Receiving means for receiving an initialization pattern file, executable file storage means for storing the executable file received by the receiving means, and initialization for storing the initialization pattern file received by the receiving means Pattern file storage means, variable value storage means for storing values of various variables when the executable file is activated, and initialization when the executable file is activated by the activation means Pattern Mapping means for mapping a file to a predetermined area of the variable value storage means, and the variable value storage means corresponding to a variable other than the initialization variable initialized by an initial value predetermined by the initialization pattern file. And initialization means for initializing a predetermined area with a value of 0.

【0023】ここで、受信手段は、プログラマブルコン
トローラ支援装置から送信された実行可能ファイルと、
初期化パターンファイルとを受信する。実行可能ファイ
ル格納手段は、受信手段によって受信された実行可能フ
ァイルを格納する。初期化パターンファイル格納手段
は、受信手段によって受信された初期化パターンファイ
ルを格納する。変数値格納手段は、実行可能ファイルが
起動された場合に、各種変数の値が格納される。マッピ
ング手段は、起動手段によって実行可能ファイルが起動
された場合には、初期化パターンファイルを変数値格納
手段の所定の領域にマッピングする。初期化手段は、初
期化パターンファイルにより予め定められた初期値によ
って初期化される初期化変数以外の変数に対応する変数
値格納手段の所定の領域を値0によって初期化する。
Here, the receiving means includes: an executable file transmitted from the programmable controller support device;
Receive the initialization pattern file. The executable file storing unit stores the executable file received by the receiving unit. The initialization pattern file storage unit stores the initialization pattern file received by the reception unit. The variable value storage means stores values of various variables when the executable file is started. The mapping unit maps the initialization pattern file to a predetermined area of the variable value storage unit when the executable file is activated by the activation unit. The initialization means initializes a predetermined area of the variable value storage means corresponding to a variable other than the initialization variable initialized by an initialization value predetermined by the initialization pattern file with a value of 0.

【0024】[0024]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して説明する。図1において、プログラマブルコ
ントローラ支援装置1は、アプリケーションプログラム
をコンパイルするとともに、初期化パターンファイルを
生成し、バス2を介してプログラマブルコントローラ3
に供給する。
Embodiments of the present invention will be described below with reference to the drawings. In FIG. 1, a programmable controller support device 1 compiles an application program, generates an initialization pattern file, and
To supply.

【0025】プログラマブルコントローラ3は、アプリ
ケーションプログラムが起動されると、プログラマブル
コントローラ支援装置1から供給された初期化パターン
ファイルによって、アプリケーションプログラムに記述
されている変数の初期値を設定した後、プログラムを実
行する。
When the application program is started, the programmable controller 3 sets the initial values of the variables described in the application program according to the initialization pattern file supplied from the programmable controller support device 1, and then executes the program. I do.

【0026】プログラマブルコントローラ3は、アプリ
ケーションプログラムに応じて、制御対象となるモジュ
ール5−1〜5−nを制御する。ここで、プログラマブ
ルコントローラ支援装置1は、アプリケーションプログ
ラム入力手段1a、コンパイル手段1b、初期化変数抽
出手段1c、初期化パターンファイル生成手段1d、共
通初期化パターンファイル生成手段1e、マッピング情
報生成手段1f、送信手段1g、および、起動手段1h
によって構成されている。
The programmable controller 3 controls the modules 5-1 to 5-n to be controlled according to the application program. Here, the programmable controller support device 1 includes an application program input unit 1a, a compiling unit 1b, an initialization variable extraction unit 1c, an initialization pattern file generation unit 1d, a common initialization pattern file generation unit 1e, a mapping information generation unit 1f, Transmission means 1g and activation means 1h
It is constituted by.

【0027】アプリケーションプログラム入力手段1a
は、アプリケーションプログラムの入力を受ける。コン
パイル手段1bは、アプリケーションプログラム入力手
段1aから入力されたプログラムをコンパイルし、実行
可能ファイルを生成する。
Application program input means 1a
Receives input of an application program. The compiling means 1b compiles a program input from the application program input means 1a and generates an executable file.

【0028】初期化変数抽出手段1cは、アプリケーシ
ョンプログラムのソースコードに含まれている変数のう
ち、初期化変数と初期化リテイン変数とを抽出するとと
もに、それらの初期値を抽出する。
The initialization variable extracting means 1c extracts an initialization variable and an initialization retain variable from among variables included in the source code of the application program, and extracts their initial values.

【0029】初期化パターンファイル生成手段1dは、
初期化変数抽出手段1cによって抽出された初期化変数
と初期化リテイン変数の初期値から初期化パターンファ
イルを生成する。
The initialization pattern file generating means 1d includes:
An initialization pattern file is generated from the initialization variables extracted by the initialization variable extraction unit 1c and the initial values of the initialization retain variables.

【0030】共通初期化パターンファイル生成手段1e
は、アプリケーションプログラムのソースコードに、共
通の初期化パターンを有する宣言文が繰り返し出現する
場合には、その共通初期化パターンを抽出して共通初期
化パターンファイルを生成する。
Common initialization pattern file generating means 1e
Extracts a common initialization pattern and generates a common initialization pattern file when a declaration statement having a common initialization pattern appears repeatedly in the source code of the application program.

【0031】マッピング情報生成手段1fは、共通初期
化パターンファイルが後述するマッピング手段3dによ
ってマッピングされる際に参照されるマッピング情報を
生成する。
The mapping information generating means 1f generates mapping information referred to when the common initialization pattern file is mapped by the mapping means 3d described later.

【0032】送信手段1gは、コンパイル手段1bによ
って生成された実行可能ファイル、初期化パターンファ
イル生成手段1dによって生成された初期化パターンフ
ァイル、共通初期化パターンファイル生成手段1eによ
って生成された共通初期化パターンファイル、および、
マッピング情報生成手段1fによって生成されたマッピ
ング情報をプログラマブルコントローラ3に送信する。
The transmitting means 1g includes an executable file generated by the compiling means 1b, an initialization pattern file generated by the initialization pattern file generating means 1d, and a common initialization generated by the common initialization pattern file generating means 1e. Pattern files, and
The mapping information generated by the mapping information generating means 1f is transmitted to the programmable controller 3.

【0033】起動手段1hは、プログラマブルコントロ
ーラ3に所定の制御信号を送り、アプリケーションプロ
グラムを起動させる。また、プログラマブルコントロー
ラ3は、受信手段3a、実行可能ファイル格納手段3
b、初期化パターンファイル格納手段3c、マッピング
手段3d、変数値格納手段3e、および、初期化手段3
fによって構成されている。
The starting unit 1h sends a predetermined control signal to the programmable controller 3 to start an application program. The programmable controller 3 includes a receiving unit 3a, an executable file storage unit 3
b, initialization pattern file storage means 3c, mapping means 3d, variable value storage means 3e, and initialization means 3
f.

【0034】受信手段3aは、プログラマブルコントロ
ーラ支援装置1から送信された実行可能ファイル、初期
化パターンファイル、共通初期化パターンファイル、お
よび、マッピング情報を受信する。
The receiving means 3a receives the executable file, the initialization pattern file, the common initialization pattern file, and the mapping information transmitted from the programmable controller support device 1.

【0035】実行可能ファイル格納手段3bは、受信手
段3aによって受信された実行可能ファイルを格納す
る。初期化パターンファイル格納手段3cは、受信手段
3aによって受信された初期化パターンファイル、共通
初期化パターンファイル、および、マッピング情報とを
格納する。
The executable file storing means 3b stores the executable file received by the receiving means 3a. The initialization pattern file storage unit 3c stores the initialization pattern file, the common initialization pattern file, and the mapping information received by the reception unit 3a.

【0036】マッピング手段3dは、起動手段1hによ
って実行可能ファイルが起動された場合には、初期化パ
ターンファイルを変数値格納手段3eの特定の領域にマ
ッピングするとともに、マッピング情報を参照して共通
初期化パターンファイルを変数値格納手段3eの特定の
領域(初期化パターンファイルがマッピングされる領域
とは異なる領域)にマッピングする。
When the executable file is activated by the activation unit 1h, the mapping unit 3d maps the initialization pattern file to a specific area of the variable value storage unit 3e, and refers to the mapping information to execute the common initial file. The initialization pattern file is mapped to a specific area (an area different from the area where the initialization pattern file is mapped) of the variable value storage unit 3e.

【0037】変数値格納手段3eは、実行可能ファイル
格納手段3bに格納されているアプリケーションプログ
ラムが起動された場合に、各種変数の値を格納する。初
期化手段3fは、通常変数およびリテイン変数を値0に
よって初期化する。
The variable value storage means 3e stores the values of various variables when the application program stored in the executable file storage means 3b is started. The initialization means 3f initializes a normal variable and a retain variable with a value of 0.

【0038】次に、以上の原理図の動作について説明す
る。いま、アプリケーションプログラム入力手段1aか
らアプリケーションプログラムが入力され、コンパイル
手段1bによってコンパイルが開始されたとすると、初
期化変数抽出手段1cは、コンパイル手段1bのコンパ
イル結果を参照して、アプリケーションプログラムから
初期化変数(および初期化リテイン変数)を抽出する。
Next, the operation of the above principle diagram will be described. Now, assuming that the application program is input from the application program input unit 1a and the compiling unit 1b starts compiling, the initialization variable extracting unit 1c refers to the compilation result of the compiling unit 1b and reads the initialization variable from the application program. (And initialization retain variables).

【0039】初期化変数抽出手段1cによって抽出され
た初期化変数は、初期化パターンファイル生成手段1d
に供給され、そこで、初期化パターンファイルに変換さ
れる。即ち、初期化パターンファイル生成手段1dは、
初期化変数および初期化リテイン変数の初期値のみから
なる初期化パターンファイルを生成する。
The initialization variables extracted by the initialization variable extraction unit 1c are stored in the initialization pattern file generation unit 1d.
, Where it is converted to an initialization pattern file. That is, the initialization pattern file generating means 1d
An initialization pattern file including only the initial values of the initialization variables and the initialization retain variables is generated.

【0040】また、共通初期化パターンファイル生成手
段1eは、アプリケーションプログラムに繰り返し出現
する共通な初期化パターンを抽出して共通初期化パター
ンファイルを生成する。なお、共通初期化パターンは、
例えば、初期値のみが異なる関数やサブルーチンがアプ
リケーションプログラム中で繰り返し使用されている場
合に出現する。
The common initialization pattern file generating means 1e extracts a common initialization pattern that appears repeatedly in the application program and generates a common initialization pattern file. The common initialization pattern is
For example, it appears when a function or subroutine having only an initial value is repeatedly used in an application program.

【0041】マッピング情報生成手段1fは、共通初期
化パターンファイルをマッピング手段3dがマッピング
する場合に必要な情報(マッピングするアドレス、マッ
ピングの繰り返し回数等に関する情報)を生成して出力
する。
The mapping information generating means 1f generates and outputs information necessary for mapping the common initialization pattern file by the mapping means 3d (information on addresses to be mapped, the number of times of mapping repetition, etc.).

【0042】送信手段1gは、コンパイル手段1bによ
って生成されたアプリケーションプログラムの実行可能
ファイル、初期化パターンファイル生成手段1dによっ
て生成された初期化パターンファイル、共通初期化パタ
ーンファイル生成手段1eによって生成された共通初期
化パターンファイル、および、マッピング情報生成手段
1fによって生成されたマッピング情報をプログラマブ
ルコントローラ3に送信する。
The transmitting unit 1g is an executable file of the application program generated by the compiling unit 1b, an initialization pattern file generated by the initialization pattern file generating unit 1d, and generated by the common initialization pattern file generating unit 1e. The common initialization pattern file and the mapping information generated by the mapping information generating means 1f are transmitted to the programmable controller 3.

【0043】プログラマブルコントローラ3の受信手段
3aは、プログラマブルコントローラ支援装置1から送
信された以上の情報を受信する。実行可能ファイル格納
手段3bは、受信手段3aが受信した情報から実行可能
ファイルを抽出して格納する。
The receiving means 3a of the programmable controller 3 receives the above information transmitted from the programmable controller support device 1. The executable file storage unit 3b extracts and stores an executable file from the information received by the receiving unit 3a.

【0044】初期化パターンファイル格納手段3cは、
受信手段3aが受信した情報から初期化パターンファイ
ル、共通初期化パターンファイル、および、マッピング
情報を抽出して格納する。
The initialization pattern file storage means 3c
From the information received by the receiving means 3a, an initialization pattern file, a common initialization pattern file, and mapping information are extracted and stored.

【0045】このような状態において、プログラマブル
コントローラ支援装置1の起動手段1hがアプリケーシ
ョンプログラムを起動する制御信号を送信した場合に
は、実行可能ファイル格納手段3bに格納されているア
プリケーションプログラムが起動されることになる。
In such a state, when the starting means 1h of the programmable controller support device 1 transmits a control signal for starting the application program, the application program stored in the executable file storing means 3b is started. Will be.

【0046】そのとき、マッピング手段3dは、初期化
パターンファイル格納手段3cに格納されている初期化
パターンファイルを、変数値格納手段3eの特定の領域
にマッピングするとともに、マッピング情報を参照して
共通初期化パターンファイルを変数値格納手段3eの初
期化パターンファイルがマッピングされる領域とは異な
る特定の領域にマッピングする。
At this time, the mapping means 3d maps the initialization pattern file stored in the initialization pattern file storage means 3c to a specific area of the variable value storage means 3e, and refers to the mapping information for common areas. The initialization pattern file is mapped to a specific area of the variable value storage unit 3e different from the area to which the initialization pattern file is mapped.

【0047】例えば、マッピング情報に共通初期化パタ
ーンファイルを5回繰り返してマッピングすることが指
示されている場合には、マッピング手段3dは、共通初
期化パターンファイルを特定のアドレスから5回連続し
てマッピングする。
For example, if the mapping information indicates that the common initialization pattern file is to be mapped repeatedly five times, the mapping means 3d continuously reads the common initialization pattern file from a specific address five times. Map.

【0048】初期化手段3fは、変数値格納手段3eの
通常変数とリテイン変数が格納される領域に“0”を書
き込み、これらの変数を値0に初期設定する。そして、
実行可能ファイル格納手段3bに格納されているアプリ
ケーションプログラムが実際に動作を開始すると、変数
値格納手段3eに格納されている変数値が適宜参照され
ながら、バス4を介して制御対象であるモジュール5−
1〜5−nが制御されることになる。
The initialization means 3f writes "0" in the area of the variable value storage means 3e where the normal variables and the retain variables are stored, and initializes these variables to the value 0. And
When the application program stored in the executable file storage unit 3b actually starts operating, the module 5 to be controlled via the bus 4 is referenced while appropriately referring to the variable values stored in the variable value storage unit 3e. −
1 to 5-n will be controlled.

【0049】以上に示した本発明によれば、初期化変数
をアプリケーションプログラムから抽出して、それらを
初期化する際に必要な初期化パターンファイルを生成
し、変数値格納手段3eの特定の領域にマッピングする
ようにしたので、全ての初期値を送信する必要がなくな
り、その結果、プログラマブルコントローラ支援装置1
からプログラマブルコントローラ3に送信されるファイ
ルの容量を縮小化することが可能となる。
According to the present invention described above, initialization variables are extracted from an application program, an initialization pattern file necessary for initializing them is generated, and a specific area of the variable value storage means 3e is specified. , It is not necessary to transmit all the initial values. As a result, the programmable controller support device 1
Can reduce the capacity of a file transmitted to the programmable controller 3.

【0050】また、アプリケーションプログラムから共
通初期化パターンを抽出し、そのマッピング情報ととも
にプログラマブルコントローラ3に送信し、プログラマ
ブルコントローラ3側では、マッピング情報を参照して
共通初期化パターンを変数値格納手段3eにマッピング
するようにしたので、アプリケーションプログラム中に
同一の初期化パターンが繰り返し出現する場合には、共
通パターンを1つだけ送信するようにすることができる
ので、前述の場合と同様にプログラマブルコントローラ
支援装置1からプログラマブルコントローラ3に送信さ
れるファイルの容量を縮小化することが可能となる。
The common initialization pattern is extracted from the application program and transmitted to the programmable controller 3 together with the mapping information. The programmable controller 3 refers to the mapping information and stores the common initialization pattern in the variable value storage means 3e. Since the mapping is performed, if the same initialization pattern repeatedly appears in the application program, only one common pattern can be transmitted. It is possible to reduce the capacity of the file transmitted from 1 to the programmable controller 3.

【0051】次に、図2を参照して本発明の実施の形態
について説明する。この図に示すように、プログラマブ
ルコントローラ支援装置20は、CPU20a、ROM
20b、RAM20c、インターフェース20d,20
eにより構成されており、入力装置10より入力された
アプリケーションプログラムをコンパイルするととも
に、アプリケーションプログラムに含まれている変数の
初期化パターンファイルを生成してしてプログラマブル
コントローラ30に送信する。また、必要に応じて、プ
ログラマブルコントローラ30を制御し、アプリケーシ
ョンプログラムを起動する。
Next, an embodiment of the present invention will be described with reference to FIG. As shown in this figure, the programmable controller support device 20 includes a CPU 20a, a ROM
20b, RAM 20c, interfaces 20d, 20
e, compiles an application program input from the input device 10, generates an initialization pattern file of variables included in the application program, and transmits the generated initialization pattern file to the programmable controller 30. In addition, it controls the programmable controller 30 as needed to activate an application program.

【0052】プログラマブルコントローラ30は、CP
U30a、ROM30b、RAM30c、インターフェ
ース30d,30eにより構成されており、プログラマ
ブルコントローラ支援装置20より送信されたアプリケ
ーションプログラムに応じて、モジュール5−1〜5−
nを制御する。
The programmable controller 30 has a CP
U30a, ROM 30b, RAM 30c, interfaces 30d and 30e, and according to the application program transmitted from the programmable controller support device 20, the modules 5-1 to 5-
control n.

【0053】ここで、入力装置10は、例えば、キーボ
ードやHDD装置などであり、アプリケーションプログ
ラムをプログラマブルコントローラ支援装置20に対し
て供給する。
Here, the input device 10 is, for example, a keyboard or an HDD device, and supplies an application program to the programmable controller support device 20.

【0054】プログラマブルコントローラ支援装置20
のCPU20aは、装置の各部を制御するとともに、所
定の演算処理を行う。ROM20bは、CPU20aに
おいて実行される基本的なプログラム等を格納してい
る。RAM20cは、CPU20aが所定の処理を実行
する場合に、演算途中のデータや実行途中のプログラム
等を一時的に格納する。
Programmable controller support device 20
CPU 20a controls various parts of the apparatus and performs predetermined arithmetic processing. The ROM 20b stores basic programs executed by the CPU 20a. The RAM 20c temporarily stores data being calculated, programs being executed, and the like when the CPU 20a performs a predetermined process.

【0055】インターフェース20dは、例えば、US
B(Universal Serial Bus)やSCSI(Small Comput
er System Interface )などであり、入力装置10から
アプリケーションプログラムを入力する。インターフェ
ース20dは、RS(Recommended Standard)232C
などのシリアルバスであり、プログラマブルコントロー
ラ支援装置20において作成されたアプリケーションプ
ログラムや初期化パターンファイルをプログラマブルコ
ントローラ30に伝送したり、プログラマブルコントロ
ーラ30の動作状況をプログラマブルコントローラ支援
装置20に伝送する。
The interface 20d is, for example, a US
B (Universal Serial Bus) and SCSI (Small Comput
er System Interface) for inputting an application program from the input device 10. Interface 20d is RS (Recommended Standard) 232C
The serial bus is used to transmit an application program or an initialization pattern file created in the programmable controller support device 20 to the programmable controller 30 or to transmit an operation state of the programmable controller 30 to the programmable controller support device 20.

【0056】バス4は、プログラマブルコントローラ3
0とモジュール5−1〜5−nを相互に接続し、これら
の間でデータの授受を可能とする。モジュール5−1〜
5−nは、制御対象を直接制御する機器であり、例え
ば、ディジタル入力・出力、アナログ入力・出力、およ
び、通信デバイスなどによって構成されている。
The bus 4 is connected to the programmable controller 3
0 and the modules 5-1 to 5-n are interconnected, and data can be exchanged between them. Module 5-1
5-n is a device for directly controlling the control target, and is constituted by, for example, a digital input / output, an analog input / output, and a communication device.

【0057】次に、図3を参照して以上の実施の形態の
動作を説明する。図3は、図2に示すプログラマブルコ
ントローラ支援装置20において実行される処理の一例
を説明するフローチャートである。このフローチャート
が開始されると、以下の処理が実行されることになる。 [S1]CPU20aは、入力装置10からアプリケー
ションプログラムを入力し、RAM20cの所定の領域
に格納する。 [S2]CPU20aは、入力装置10から所定のコマ
ンドが入力され、コンパイルの実行が指示されたか否か
を判定し、コンパイルの実行が指示された場合にはステ
ップS3に進み、それ以外の場合にはステップS2に戻
る。 [S3]CPU20aは、コンパイル処理を実行する。
Next, the operation of the above embodiment will be described with reference to FIG. FIG. 3 is a flowchart illustrating an example of a process performed in the programmable controller support device 20 illustrated in FIG. When this flowchart is started, the following processing is executed. [S1] The CPU 20a inputs an application program from the input device 10 and stores the application program in a predetermined area of the RAM 20c. [S2] The CPU 20a determines whether a predetermined command is input from the input device 10 and an instruction to execute the compilation is issued. If the execution of the compilation is instructed, the process proceeds to step S3. Returns to step S2. [S3] The CPU 20a executes a compiling process.

【0058】なお、このコンパイル処理は、例えば、R
AM20cに格納されているコンパイラプログラムに従
って実行される。 [S4]CPU20aは、アプリケーションプログラム
に含まれている初期化変数を抽出する。
This compile processing is performed, for example, by using R
It is executed according to a compiler program stored in the AM 20c. [S4] The CPU 20a extracts an initialization variable included in the application program.

【0059】初期化変数を抽出する様子を図4に示す。
この図に示すユーザプログラム40は、図5に示すユー
ザプログラムとともに、アプリケーションプログラムの
一部であり、プログラムが起動された場合には一度しか
実行されない部分である。
FIG. 4 shows how the initialization variables are extracted.
The user program 40 shown in this figure is a part of the application program together with the user program shown in FIG. 5, and is a part that is executed only once when the program is started.

【0060】この図において、「VAR」および「EN
D_VAR」によって囲繞された部分のうち、初期値が
代入されているもの(変数「BBB」および変数「CC
C」)がステップS4において抽出される初期化変数で
ある。 [S5]CPU20aは、ステップS4において抽出し
た初期化変数に対応する初期化パターンファイルを生成
する。
In this figure, "VAR" and "EN"
Among the portions surrounded by “D_VAR”, those to which an initial value is assigned (variable “BBB” and variable “CC”
C ") are initialization variables extracted in step S4. [S5] The CPU 20a generates an initialization pattern file corresponding to the initialization variables extracted in step S4.

【0061】図4の例では、初期化パターンファイル4
1が生成される。 [S6]CPU20aは、アプリケーションプログラム
に含まれている初期化リテイン変数を抽出する。
In the example of FIG. 4, the initialization pattern file 4
1 is generated. [S6] The CPU 20a extracts an initialization retain variable included in the application program.

【0062】この図において、「VAR RETAI
N」および「END_VAR」によって囲繞された部分
のうち、初期値が代入されている変数(変数「DD
D」、変数「EEE」、および、変数「FFF」)がス
テップS6において抽出される初期化リテイン変数であ
る。
In this figure, “VAR RETAI”
N ”and“ END_VAR ”, the variable to which the initial value is assigned (variable“ DD ”)
D ", the variable" EEE ", and the variable" FFF ") are the initialization retained variables extracted in step S6.

【0063】ここで、「F_1: funcA」は、イ
ンスタンス(初期化領域)名が「F_1」であるファン
クションブロック(詳細は後述する)を宣言している文
である。 [S7]CPU20aは、ステップS6において抽出し
た初期化リテイン変数に対応する初期化パターンファイ
ルを生成する。
Here, "F_1: funcA" is a statement declaring a function block (the details of which will be described later) whose instance (initialization area) name is "F_1". [S7] The CPU 20a generates an initialization pattern file corresponding to the initialization retain variable extracted in step S6.

【0064】図4の例では、初期化パターンファイル4
2が生成される。 [S8]CPU20aは、ファンクションブロックから
共通初期化パターンを抽出し、共通初期化パターンファ
イルを生成する。
In the example of FIG. 4, the initialization pattern file 4
2 is generated. [S8] The CPU 20a extracts a common initialization pattern from the function block and generates a common initialization pattern file.

【0065】ここで、ファンクションブロックとは、所
定の入力が与えられた場合に、その入力に応じた所定の
処理を実行し、得られた結果を出力する機能ブロックを
意味している。これは、例えば、サブルーチンや関数と
同等である。
Here, the function block refers to a functional block that, when a predetermined input is given, executes a predetermined process according to the input, and outputs an obtained result. This is equivalent to, for example, a subroutine or a function.

【0066】この例では、図4に示すように、ユーザプ
ログラム40のメインブロックに、インスタンス名が
「F_1」〜「F_3」である3つのファンクションブ
ロック「funcA」が宣言されており、それらのファ
ンクションブロックは、第16行目以降に示すように、
入力パラメータが代入される変数AAAに対して初期値
“123”が代入されて呼び出されている(例えば、F
_1(AAA:=123))。
In this example, as shown in FIG. 4, three function blocks “funcA” having instance names “F_1” to “F_3” are declared in the main block of the user program 40, and those function blocks are declared. The block is, as shown from the 16th line onward,
The variable AAA to which the input parameter is substituted is called by substituting the initial value “123” (for example, F
— 1 (AAA: = 123)).

【0067】なお、例えば、文「DDD:=F_1.F
FF」は、インスタンス名F_1のファンクションブロ
ック「funcA」の出力パラメータ「FFF」の値を
変数DDDに入力する処理である。
For example, the sentence "DDD: = F_1.F
“FF” is a process of inputting the value of the output parameter “FFF” of the function block “funcA” having the instance name F_1 to the variable DDD.

【0068】ところで、ファンクションブロック「fu
ncA」において使用されている変数は、インスタンス
名に拘わらず共通であるので、アプリケーションプログ
ラムが実行される場合には、これらのファンクションブ
ロックに対応するユーザメモリ領域には共通の初期化パ
ターンが3回マッピングされることになる。
The function block "fu"
Since the variables used in “ncA” are common regardless of the instance name, when the application program is executed, a common initialization pattern is stored three times in the user memory area corresponding to these function blocks. Will be mapped.

【0069】このように、インスタンス名が異なる同一
のファンクションブロックが存在する場合には、ステッ
プS8の処理において、この共通初期化パターンが抽出
されて共通初期化パターンファイル51(図5参照)が
生成される。 [S9]CPU20aは、マッピング情報を生成する。
As described above, when the same function block having a different instance name exists, in step S8, the common initialization pattern is extracted and the common initialization pattern file 51 (see FIG. 5) is generated. Is done. [S9] The CPU 20a generates mapping information.

【0070】図5の例では、ファンクションブロック
「funcA」の共通初期化パターンは、アドレス「0
0001200」番地から、3回連続してマッピングさ
れることが示されている。 [S10]CPU20aは、属性情報を生成する。
In the example of FIG. 5, the common initialization pattern of the function block “funcA” is the address “0”.
It is shown that mapping is performed three times consecutively from the address “0001200”. [S10] The CPU 20a generates attribute information.

【0071】ここで、属性情報とは共通初期化パターン
ファイルに格納されている変数(ワード単位で格納され
ている)がリテイン変数であるか否かをビットの状態で
示した情報である。ビットが“1”である場合には、対
応する情報がリテイン変数の初期値であることを示して
いる。
Here, the attribute information is bit information indicating whether or not a variable (stored in word units) stored in the common initialization pattern file is a retain variable. When the bit is “1”, it indicates that the corresponding information is the initial value of the retain variable.

【0072】図5の例では、第5〜第6行目が“1”と
なっており、共通初期化パターンファイルの“045
6”および“0567”がリテイン変数の初期値である
ことが分かる。なお、これらの変数は、ユーザプログラ
ム50の第10〜第11行目に記述された変数DDDお
よび変数EEEに対応している。 [S11]CPU20aは、生成された実行可能ファイ
ル、初期化パターンファイル、共通初期化パターンファ
イル、マッピング情報、および、属性情報をプログラマ
ブルコントローラ30に送信する。
In the example of FIG. 5, the fifth and sixth lines are “1”, and “045” of the common initialization pattern file is set.
It can be seen that "6" and "0567" are the initial values of the retain variables, which correspond to the variables DDD and EEE described in the tenth to eleventh lines of the user program 50. [S11] The CPU 20a transmits the generated executable file, initialization pattern file, common initialization pattern file, mapping information, and attribute information to the programmable controller 30.

【0073】以上の処理により、アプリケーションプロ
グラムを実行する際に必要な実行可能ファイル、初期化
パターンファイル、共通初期化パターンファイル、マッ
ピング情報、および、属性情報が生成され、プログラマ
ブルコントローラ30に供給される。
With the above processing, an executable file, an initialization pattern file, a common initialization pattern file, mapping information, and attribute information necessary for executing the application program are generated and supplied to the programmable controller 30. .

【0074】次に、図6〜図8を参照して、プログラマ
ブルコントローラ30において実行される処理の一例に
ついて説明する。図6は、プログラマブルコントローラ
支援装置20から送信されたアプリケーションプログラ
ムを実行する場合にプログラマブルコントローラ30に
おいて実行される処理の一例を説明するフローチャート
である。このフローチャートが開始されると、以下の処
理が実行される。 [S21]CPU30aは、プログラマブルコントロー
ラ支援装置20から、アプリケーションプログラムの起
動が要請されたか否かを判定し、起動が要請された場合
にはステップS22に進み、その他の場合にはステップ
S21に戻る。 [S22]CPU30aは、ウォーム起動が要請された
か否かを判定し、ウォーム起動が要請された場合にはス
テップS23に進み、それ以外の場合(コールド起動が
要請された場合)にはステップS24に進む。 [S23]CPU30aは、ウォーム起動処理を実行す
る。
Next, an example of processing executed in the programmable controller 30 will be described with reference to FIGS. FIG. 6 is a flowchart illustrating an example of a process executed by the programmable controller 30 when the application program transmitted from the programmable controller support device 20 is executed. When this flowchart is started, the following processing is executed. [S21] The CPU 30a determines whether or not the activation of the application program is requested by the programmable controller support device 20. If the activation is requested, the process proceeds to step S22. In other cases, the process returns to step S21. [S22] The CPU 30a determines whether or not a warm start has been requested. If the warm start has been requested, the process proceeds to step S23. Otherwise (if a cold start has been requested), the process proceeds to step S24. move on. [S23] The CPU 30a executes a warm start process.

【0075】なお、この処理の詳細については図7を参
照して後述する。 [S24]CPU30aは、コールド起動処理を実行す
る。なお、この処理の詳細については図8を参照して後
述する。
The details of this process will be described later with reference to FIG. [S24] The CPU 30a executes a cold activation process. The details of this process will be described later with reference to FIG.

【0076】図7は、図6に示すウォーム起動処理の詳
細を説明するフローチャートである。このフローチャー
トが開始されると、以下の処理が実行される。 [S31]CPU30aは、通常メモリ領域を値0によ
って初期化する。
FIG. 7 is a flowchart illustrating details of the warm start process shown in FIG. When this flowchart is started, the following processing is executed. [S31] The CPU 30a initializes the normal memory area with the value 0.

【0077】なお、通常メモリ領域とは通常変数が格納
されるRAM30c上の領域である。即ち、RAM30
cのユーザメモリ領域(変数の値が格納される領域)
は、図9に示すように、通常変数の値が格納される通常
メモリ領域61、初期化変数の値が格納される初期化メ
モリ領域62、リテイン変数の値が格納されるリテイン
メモリ領域63、初期化リテイン変数の値が格納される
初期化リテインメモリ領域64、および、ファンクショ
ンブロックの変数の値が格納されるフリーメモリ領域6
5に分割されている。 [S32]CPU30aは、初期化パターンファイル4
1を初期化メモリ領域62にマッピングする。
The normal memory area is an area on the RAM 30c in which normal variables are stored. That is, the RAM 30
User memory area of c (area where variable values are stored)
As shown in FIG. 9, a normal memory area 61 for storing values of normal variables, an initialization memory area 62 for storing values of initialization variables, a retain memory area 63 for storing values of retain variables, Initialized retain memory area 64 for storing values of initialized retain variables, and free memory area 6 for storing values of function block variables
It is divided into five. [S32] The CPU 30a sets the initialization pattern file 4
1 is mapped to the initialization memory area 62.

【0078】この様子を図10に示す。この例に示すよ
うに、初期化変数の初期化パターンファイル41は、ユ
ーザメモリ領域の初期化メモリ領域(初期化変数の値が
格納される領域)62にマッピングされる。 [S33]CPU30aは、マッピング情報52と属性
情報53とを参照して、共通初期化パターンファイル5
1をフリーメモリ領域65にマッピングする。
FIG. 10 shows this state. As shown in this example, the initialization pattern file 41 of the initialization variables is mapped to the initialization memory area (the area where the values of the initialization variables are stored) 62 of the user memory area. [S33] The CPU 30a refers to the mapping information 52 and the attribute information 53 and refers to the common initialization pattern file 5
1 is mapped to the free memory area 65.

【0079】即ち、図10に示すように、CPU30a
は、マッピング情報52を参照して、属性情報が“0”
とされている変数(通常変数および初期化変数)に対応
する領域に対して、共通初期化パターンファイルの初期
値を書き込み、初期化を行う。 [S34]CPU30aは、RAM30cに格納されて
いるアプリケーションプログラムを実行し、図6の処理
に復帰(リターン)する。
That is, as shown in FIG.
Is attribute information "0" with reference to the mapping information 52.
Then, the initial value of the common initialization pattern file is written into an area corresponding to the variables (normal variables and initialization variables), and initialization is performed. [S34] The CPU 30a executes the application program stored in the RAM 30c, and returns to the processing in FIG.

【0080】以上の処理により、リテイン変数および初
期化リテイン変数の前回値(前回起動されたときの変数
の最終値)を保存した状態で、アプリケーションプログ
ラムを再起動させることができる。
By the above processing, the application program can be restarted in a state where the last values of the retain variables and the initialized retain variables (the last values of the variables at the time of the previous activation) are stored.

【0081】次に、図8を参照して、図6に示すコール
ド起動処理の詳細な処理について説明する。図8に示す
フローチャートが開始されると、以下の処理が実行され
る。 [S41]CPU30aは、通常メモリ領域61および
リテインメモリ領域63を値0によって初期化する。 [S42]CPU30aは、初期化パターンファイル4
1を初期化メモリ領域62にマッピングする。
Next, a detailed description will be given of the cold start processing shown in FIG. 6 with reference to FIG. When the flowchart shown in FIG. 8 starts, the following processing is executed. [S41] The CPU 30a initializes the normal memory area 61 and the retain memory area 63 with the value 0. [S42] The CPU 30a initializes the initialization pattern file 4
1 is mapped to the initialization memory area 62.

【0082】即ち、図11に示すように、CPU30a
は、初期化変数の初期化パターンファイル41を、ユー
ザメモリ領域の初期化メモリ領域62にマッピングす
る。 [S43]CPU30aは、初期化パターンファイル4
2を初期化リテインメモリ領域64にマッピングする。
That is, as shown in FIG.
Maps the initialization pattern file 41 of the initialization variables to the initialization memory area 62 of the user memory area. [S43] The CPU 30a sets the initialization pattern file 4
2 is mapped to the initialization retain memory area 64.

【0083】即ち、図11に示すように、CPU30a
は、初期化リテイン変数の初期化パターンファイル42
を、ユーザメモリ領域の初期化メモリ領域64にマッピ
ングする。 [S44]CPU30aは、マッピング情報52を参照
して、共通初期化パターンファイル51を、フリーメモ
リ領域65にマッピングする。
That is, as shown in FIG.
Is the initialization pattern file 42 of the initialization retain variable.
Is mapped to the initialization memory area 64 of the user memory area. [S44] The CPU 30a refers to the mapping information 52 and maps the common initialization pattern file 51 to the free memory area 65.

【0084】即ち、図11に示すように、CPU30a
は、ファンクションブロックの全ての変数の初期値が格
納された共通初期化パターンファイル51を、マッピン
グ情報52を参照して、ユーザメモリ領域のフリーメモ
リ領域65にマッピングする。 [S45]CPU30aは、RAM30cに格納されて
いるアプリケーションプログラムを実行し、図6の処理
に復帰(リターン)する。
That is, as shown in FIG.
Maps the common initialization pattern file 51 storing the initial values of all the variables of the function block to the free memory area 65 of the user memory area with reference to the mapping information 52. [S45] The CPU 30a executes the application program stored in the RAM 30c, and returns to the processing in FIG.

【0085】以上の処理により、全ての変数を初期化し
た状態で、アプリケーションプログラムを起動させるこ
とができる。以上の実施の形態によれば、プログラマブ
ルコントローラ支援装置20においてアプリケーション
プログラムをコンパイルする際に、初期化変数および初
期化リテイン変数の初期化パターンファイルを生成し、
プログラマブルコントローラ30ではこれらの初期化パ
ターンファイルによって変数を初期化するとともに、そ
の他の変数は、一括して、値0に初期化するようにした
ので、プログラマブルコントローラ支援装置20からプ
ログラマブルコントローラ30に送信される初期化パタ
ーンファイルおよび属性情報の容量を削減することが可
能となる。
With the above processing, the application program can be started with all variables initialized. According to the above embodiment, when compiling an application program in the programmable controller support device 20, an initialization pattern file of an initialization variable and an initialization retain variable is generated,
In the programmable controller 30, the variables are initialized by these initialization pattern files, and the other variables are collectively initialized to a value of 0. Therefore, the programmable controller support device 20 transmits the variables to the programmable controller 30. It is possible to reduce the capacity of the initialization pattern file and the attribute information.

【0086】また、本実施の形態によれば、アプリケー
ションプログラム中に、異なるインスタンス名を有する
ファンクションブロックが複数存在している場合には、
共通初期化パターンファイル51を生成するとともに、
マッピング情報52を生成し、プログラマブルコントロ
ーラ30では、マッピング情報52を参照して、共通初
期化パターンファイル51をフリーメモリ領域65に展
開するようにしたので、プログラマブルコントローラ支
援装置20からプログラマブルコントローラ30に送信
される初期化パターンファイルおよび属性情報の容量を
削減することが可能となる。
According to the present embodiment, when a plurality of function blocks having different instance names exist in an application program,
While generating the common initialization pattern file 51,
Since the mapping information 52 is generated and the common initialization pattern file 51 is developed in the free memory area 65 with reference to the mapping information 52, the programmable controller 30 transmits the common initialization pattern file 51 from the programmable controller support device 20 to the programmable controller 30. It is possible to reduce the capacity of the initialization pattern file and attribute information to be performed.

【0087】更に、本実施の形態によれば、ウォーム起
動が実行された場合には、リテイン変数および初期化リ
テイン変数を初期化しないようにしたので、目的に応じ
て、アプリケーションプログラムの起動形態を変更する
ことができる。
Further, according to the present embodiment, when the warm start is executed, the retain variable and the initialization retain variable are not initialized, so that the start mode of the application program can be changed according to the purpose. Can be changed.

【0088】なお、上記の処理機能は、コンピュータに
よって実現することができる。その場合、プログラマブ
ルコントローラ支援装置が有すべき機能の処理内容は、
コンピュータで読み取り可能な記録媒体に記録されたプ
ログラムに記述されており、このプログラムをコンピュ
ータで実行することにより、上記処理がコンピュータで
実現される。コンピュータで読み取り可能な記録媒体と
しては、磁気記録装置や半導体メモリ等がある。
Note that the above processing functions can be realized by a computer. In that case, the processing contents of the functions that the programmable controller support device should have are:
The program is described in a program recorded on a computer-readable recording medium, and the above processing is realized by the computer by executing the program on the computer. Examples of the computer-readable recording medium include a magnetic recording device and a semiconductor memory.

【0089】市場に流通させる場合には、CD−ROM
(Compact Disk Read Only Memory)やフロッピーディス
ク等の可搬型記録媒体にプログラムを格納して流通させ
たり、ネットワークを介して接続されたコンピュータの
記憶装置に格納しておき、ネットワークを通じて他のコ
ンピュータに転送することもできる。コンピュータで実
行する際には、コンピュータ内のハードディスク装置等
にプログラムを格納しておき、メインメモリにロードし
て実行するようにすればよい。
For distribution in the market, a CD-ROM
(Compact Disk Read Only Memory) or a program stored in a portable recording medium such as a floppy disk and distributed, or stored in a storage device of a computer connected via a network and transferred to another computer via the network You can also. When the program is executed by the computer, the program may be stored in a hard disk device or the like in the computer, loaded into the main memory, and executed.

【0090】[0090]

【発明の効果】以上説明したように本発明では、プログ
ラマブルコントローラ支援装置においてアプリケーショ
ンプログラムをコンパイルする際に、予め設定された初
期値によって初期化される変数の初期化パターンファイ
ルを生成し、プログラマブルコントローラではこれらの
初期化パターンファイルによって変数を初期化するとと
もに、その他の変数は、一括して、値0に初期化するよ
うにしたので、プログラマブルコントローラ支援装置か
らプログラマブルコントローラに送信される初期化パタ
ーンファイルおよび属性情報の容量を削減することが可
能となる。
As described above, according to the present invention, when compiling an application program in a programmable controller support device, an initialization pattern file of a variable initialized by a preset initial value is generated, and Then, the variables are initialized by using these initialization pattern files, and the other variables are collectively initialized to a value of 0. Therefore, the initialization pattern file transmitted from the programmable controller support device to the programmable controller is initialized. In addition, the capacity of attribute information can be reduced.

【0091】また、本実施の形態によれば、アプリケー
ションプログラム中に、共通の初期化パターンを有する
宣言文が繰り返し出現する場合には、共通初期化パター
ンファイルを生成するとともに、マッピング情報を生成
し、プログラマブルコントローラでは、マッピング情報
を参照して、共通初期化パターンファイルをマッピング
するようにしたので、プログラマブルコントローラ支援
装置からプログラマブルコントローラに送信される初期
化パターンファイルおよび属性情報の容量を削減するこ
とが可能となる。
According to the present embodiment, when a declaration statement having a common initialization pattern appears repeatedly in an application program, a common initialization pattern file is generated and mapping information is generated. In the programmable controller, the common initialization pattern file is mapped with reference to the mapping information, so that the capacity of the initialization pattern file and the attribute information transmitted from the programmable controller support device to the programmable controller can be reduced. It becomes possible.

【0092】更に、本実施の形態によれば、ウォーム起
動が実行された場合には、リテイン変数を初期化しない
ようにしたので、目的に応じて、アプリケーションプロ
グラムの起動形態を変更することができる。
Further, according to the present embodiment, when the warm start is executed, the retain variables are not initialized, so that the start form of the application program can be changed according to the purpose. .

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の原理を説明する原理図である。FIG. 1 is a principle diagram illustrating the principle of the present invention.

【図2】本発明の実施の形態の構成例を示すブロック図
である。
FIG. 2 is a block diagram illustrating a configuration example of an embodiment of the present invention.

【図3】図2に示すプログラマブルコントローラ支援装
置において実行される処理の一例を説明するフローチャ
ートである。
FIG. 3 is a flowchart illustrating an example of a process executed in the programmable controller support device illustrated in FIG. 2;

【図4】図3の処理により生成される初期化変数の初期
化パターンファイルと、初期化リテイン変数の初期化パ
ターンファイルの一例を示す図である。
FIG. 4 is a diagram illustrating an example of an initialization pattern file of initialization variables generated by the processing of FIG. 3 and an initialization pattern file of initialization retention variables.

【図5】図3の処理により生成される共通初期化パター
ンファイル、マッピング情報、および、属性情報の一例
を示す図である。
FIG. 5 is a diagram illustrating an example of a common initialization pattern file, mapping information, and attribute information generated by the processing of FIG. 3;

【図6】図2に示すプログラマブルコントローラにおい
て実行される処理の一例を説明するフローチャートであ
る。
FIG. 6 is a flowchart illustrating an example of a process performed by the programmable controller illustrated in FIG. 2;

【図7】図6に示すウォーム起動処理の詳細を説明する
フローチャートである。
FIG. 7 is a flowchart illustrating details of a warm start process shown in FIG. 6;

【図8】図6に示すコールド起動処理の詳細を説明する
フローチャートである。
FIG. 8 is a flowchart illustrating details of a cold start process shown in FIG. 6;

【図9】図2に示すRAM上のユーザメモリ領域の分割
の態様を示す図である。
FIG. 9 is a diagram showing a manner of dividing a user memory area on a RAM shown in FIG. 2;

【図10】図7に示す処理が実行された場合における、
ユーザメモリ領域の初期化の一例を示す図である。
FIG. 10 illustrates a case where the processing illustrated in FIG. 7 is performed.
FIG. 4 is a diagram illustrating an example of initialization of a user memory area.

【図11】図8に示す処理が実行された場合における、
ユーザメモリ領域の初期化の一例を示す図である。
FIG. 11 illustrates a case where the process illustrated in FIG. 8 is performed.
FIG. 4 is a diagram illustrating an example of initialization of a user memory area.

【図12】従来における初期化パターンファイルと属性
情報の生成方法の一例を示す図である。
FIG. 12 is a diagram showing an example of a conventional method for generating an initialization pattern file and attribute information.

【図13】従来におけるコールド起動の際に、初期化パ
ターンファイルがユーザメモリにマッピングされる様子
を示す図である。
FIG. 13 is a diagram showing a state in which an initialization pattern file is mapped to a user memory when a conventional cold start is performed.

【図14】従来におけるウォーム起動の際に、初期化パ
ターンファイルがユーザメモリにマッピングされる様子
を示す図である。
FIG. 14 is a diagram showing a state in which an initialization pattern file is mapped to a user memory at the time of a conventional warm start.

【符号の説明】[Explanation of symbols]

1 プログラマブルコントローラ支援装置 1a アプリケーションプログラム入力手段 1b コンパイル手段 1c 初期化変数抽出手段 1d 初期化パターンファイル生成手段 1e 共通初期化パターンファイル生成手段 1f マッピング情報生成手段 1g 送信手段 1h 起動手段 2 バス 3 プログラマブルコントローラ 3a 受信手段 3b 実行可能ファイル格納手段 3c 初期化パターンファイル格納手段 3d マッピング手段 3e 変数値格納手段 3f 初期化手段 4 バス 5−1〜5−n モジュール DESCRIPTION OF SYMBOLS 1 Programmable controller support apparatus 1a Application program input means 1b Compiling means 1c Initialization variable extraction means 1d Initialization pattern file generation means 1e Common initialization pattern file generation means 1f Mapping information generation means 1g Transmission means 1h Startup means 2 Bus 3 Programmable controller 3a Receiving unit 3b Executable file storage unit 3c Initialization pattern file storage unit 3d Mapping unit 3e Variable value storage unit 3f Initialization unit 4 Bus 5-1 to 5-n module

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】 プログラマブルコントローラ支援装置か
ら入力されたアプリケーションプログラムのソースコー
ドをコンパイルして実行可能ファイルを生成した後、プ
ログラマブルコントローラに供給して実行するプログラ
マブルコントローラシステムにおいて、 前記プログラマブルコントローラ支援装置は、 前記アプリケーションプログラムのソースコードの入力
を受けるアプリケーションプログラム入力手段と、 前記アプリケーションプログラムのソースコードをコン
パイルして、実行可能ファイルを生成するコンパイル手
段と、 前記アプリケーションプログラムのソースコードに含ま
れている変数のうち、予め設定された初期値によって初
期化される初期化変数と、値0によって初期化されるそ
の他の変数とを弁別し、初期化変数とその初期値のみを
抽出する初期化変数抽出手段と、 前記初期化変数抽出手段によって抽出された初期化変数
の初期値から初期化パターンファイルを生成する初期化
パターンファイル生成手段と、 前記コンパイル手段によって生成された実行可能ファイ
ルと、前記初期化パターンファイル生成手段によって生
成された初期化パターンファイルとを前記プログラマブ
ルコントローラに送信する送信手段と、 前記送信手段によって送信された実行可能ファイルを起
動する起動手段とを有し、 前記プログラマブルコントローラは、 前記プログラマブルコントローラ支援装置から送信され
た前記実行可能ファイルと、前記初期化パターンファイ
ルとを受信する受信手段と、 前記受信手段によって受信された前記実行可能ファイル
を格納する実行可能ファイル格納手段と、 前記受信手段によって受信された前記初期化パターンフ
ァイルを格納する初期化パターンファイル格納手段と、 前記実行可能ファイルが起動された場合に、各種変数の
値が格納される変数値格納手段と、 前記起動手段によって前記実行可能ファイルが起動され
た場合には、前記初期化パターンファイルを前記変数値
格納手段の所定の領域にマッピングするマッピング手段
と、 前記初期化パターンファイルにより予め定められた初期
値によって初期化される前記初期化変数以外の変数に対
応する前記変数値格納手段の所定の領域を値0によって
初期化する初期化手段と、 を有することを特徴とするプログラマブルコントローラ
システム。
1. A programmable controller system that compiles a source code of an application program input from a programmable controller support apparatus, generates an executable file, and supplies the executable file to a programmable controller for execution. Application program input means for receiving an input of the source code of the application program; compiling means for compiling the source code of the application program to generate an executable file; and a variable included in the source code of the application program. Among them, an initialization variable initialized by a preset initial value and another variable initialized by a value 0 are discriminated, and the Initialization variable extraction means for extracting only the initial value of the initialization variable; initialization pattern file generation means for generating an initialization pattern file from the initial values of the initialization variables extracted by the initialization variable extraction means; Transmitting means for transmitting the generated executable file and the initialization pattern file generated by the initialization pattern file generating means to the programmable controller; and activating means for activating the executable file transmitted by the transmitting means The programmable controller comprises: a receiving unit that receives the executable file transmitted from the programmable controller support device, the initialization pattern file; and the executable file received by the receiving unit. Executable files to store File storage means; initialization pattern file storage means for storing the initialization pattern file received by the reception means; variable value storage for storing values of various variables when the executable file is started Means, when the executable file is activated by the activation means, a mapping means for mapping the initialization pattern file to a predetermined area of the variable value storage means; and Initialization means for initializing a predetermined area of the variable value storage means corresponding to a variable other than the initialization variable initialized by the initial value with a value 0.
【請求項2】 前記起動手段は、 前記変数値格納手段に格納されている各種変数値のう
ち、リテイン変数の変数値を保存した状態で前記実行可
能ファイルを再起動するウォーム起動と、 前記変数値格納手段に格納されている全ての変数の値を
初期化した状態で前記実行可能ファイルを起動するコー
ルド起動の何れか一方により前記実行可能ファイルを起
動し、 前記マッピング手段は、 前記ウォーム起動が実行された場合には、前記リテイン
変数以外の変数値をマッピングし、 前記コールド起動が実行された場合には、前記初期化パ
ターンファイルを全てマッピングすることを特徴とする
請求項1記載のプログラマブルコントローラシステム。
2. The method according to claim 1, wherein the activation unit restarts the executable file in a state where the variable values of the retain variables are stored among the various variable values stored in the variable value storage unit; The executable file is started by one of cold starts that starts the executable file in a state where values of all variables stored in the value storage unit are initialized, and the mapping unit executes the warm start. The programmable controller according to claim 1, wherein when executed, a variable value other than the retain variable is mapped, and when the cold start is executed, the entire initialization pattern file is mapped. system.
【請求項3】 前記プログラマブルコントローラ支援装
置は、前記アプリケーションプログラムのソースコード
に、共通の初期化パターンを有する宣言文が繰り返し出
現する場合には、その共通初期化パターンを抽出して、
共通初期化パターンファイルを生成する共通初期化パタ
ーンファイル生成手段と、 前記共通初期化パターンファイルが前記マッピング手段
によってマッピングされる際に参照されるマッピング情
報を生成するマッピング情報生成手段とを更に有し、 前記プログラマブルコントローラの前記マッピング手段
は、前記マッピング情報を参照して、前記共通初期化パ
ターンファイルをマッピングすることを特徴とする請求
項1記載のプログラマブルコントローラシステム。
3. When the declaration statement having a common initialization pattern repeatedly appears in the source code of the application program, the programmable controller support apparatus extracts the common initialization pattern,
A common initialization pattern file generation unit that generates a common initialization pattern file; and a mapping information generation unit that generates mapping information referred to when the common initialization pattern file is mapped by the mapping unit. 2. The programmable controller system according to claim 1, wherein the mapping means of the programmable controller maps the common initialization pattern file with reference to the mapping information.
【請求項4】 前記プログラマブルコントローラ支援装
置は、前記共通初期化パターンファイル生成手段によっ
て生成された初期化パターンを有する変数群のそれぞれ
がリテイン変数であるか否かを示す属性情報を生成する
属性情報生成手段を更に有し、 前記起動手段は、 前記変数値格納手段に格納されている各種変数値のう
ち、リテイン変数の変数値を保存した状態で前記実行可
能ファイルを再起動するウォーム起動と、 前記変数値格納手段に格納されている全ての変数の値を
初期化した状態で前記実行可能ファイルを起動するコー
ルド起動の何れか一方により前記実行可能ファイルを起
動し、 前記プログラマブルコントローラの前記マッピング手段
は、 前記ウォーム起動が実行された場合には、前記属性情報
を参照して前記リテイン変数以外の変数値を前記共通初
期化パターンファイルから抽出してマッピングし、 前記コールド起動が実行された場合には、前記属性情報
を参照して前記共通初期化パターンファイルを全てマッ
ピングすることを特徴とする請求項3記載のプログラマ
ブルコントローラシステム。
4. The attribute information for generating attribute information indicating whether or not each of a group of variables having an initialization pattern generated by the common initialization pattern file generating means is a retain variable. Further comprising: generating means, wherein the starting means, among the various variable values stored in the variable value storage means, a warm start that restarts the executable file in a state where the variable values of the retain variables are stored; Activating the executable file by either one of cold activation that activates the executable file with all variable values stored in the variable value storage means initialized, and the mapping means of the programmable controller. Refers to the attribute information when the warm start is executed, and Extracting and mapping the variable values other than the common initialization pattern file from the common initialization pattern file, and, when the cold start is executed, mapping the common initialization pattern file with reference to the attribute information. The programmable controller system according to claim 3, wherein
【請求項5】 入力されたアプリケーションプログラム
のソースコードをコンパイルして実行可能ファイルを生
成した後、プログラマブルコントローラに供給して実行
させるプログラマブルコントローラ支援装置おいて、 前記アプリケーションプログラムのソースコードの入力
を受けるアプリケーションプログラム入力手段と、 前記アプリケーションプログラムのソースコードをコン
パイルして、実行可能ファイルを生成するコンパイル手
段と、 前記アプリケーションプログラムのソースコードに含ま
れている変数のうち、予め設定された初期値によって初
期化される初期化変数と、値0によって初期化されるそ
の他の変数とを弁別し、初期化変数とその初期値のみを
抽出する初期化変数抽出手段と、 前記初期化変数抽出手段によって抽出された初期化変数
の初期値から初期化パターンファイルを生成する初期化
パターンファイル生成手段と、 前記コンパイル手段によって生成された実行可能ファイ
ルと、前記初期化パターンファイル生成手段によって生
成された初期化パターンファイルとを前記プログラマブ
ルコントローラに送信する送信手段と、 前記送信手段によって送信された実行可能ファイルを起
動する起動手段と、 を有することを特徴とするプログラマブルコントローラ
支援装置。
5. A programmable controller support apparatus for compiling an input source code of an application program to generate an executable file, supplying the executable file to a programmable controller, and executing the executable file, receiving an input of the source code of the application program. Application program input means; compile means for compiling the source code of the application program to generate an executable file; and initializing by a preset initial value among variables included in the source code of the application program. Initialization variable extracting means for discriminating initialization variables to be initialized from other variables initialized by the value 0, and extracting only initialization variables and their initial values, and extraction by the initialization variable extraction means. Initialization pattern file generation means for generating an initialization pattern file from the initial values of the initialized variables, an executable file generated by the compilation means, and an initialization pattern generated by the initialization pattern file generation means A programmable controller support device, comprising: transmitting means for transmitting a file to the programmable controller; and activating means for activating the executable file transmitted by the transmitting means.
【請求項6】 入力されたアプリケーションプログラム
のソースコードをコンパイルして実行可能ファイルを生
成した後、プログラマブルコントローラに供給して実行
させる処理をコンピュータに実行させるプログラムを記
録したコンピュータ読み取り可能な記録媒体において、 前記コンピュータを、 前記アプリケーションプログラムのソースコードの入力
を受けるアプリケーションプログラム入力手段、 前記アプリケーションプログラムのソースコードをコン
パイルして、実行可能ファイルを生成するコンパイル手
段、 前記アプリケーションプログラムのソースコードに含ま
れている変数のうち、予め設定された初期値によって初
期化される初期化変数と、値0によって初期化されるそ
の他の変数とを弁別し、初期化変数とその初期値のみを
抽出する初期化変数抽出手段、 前記初期化変数抽出手段によって抽出された初期化変数
の初期値から初期化パターンファイルを生成する初期化
パターンファイル生成手段、 前記コンパイル手段によって生成された実行可能ファイ
ルと、前記初期化パターンファイル生成手段によって生
成された初期化パターンファイルとを前記プログラマブ
ルコントローラに送信する送信手段、 前記送信手段によって送信された実行可能ファイルを起
動する起動手段、 として機能させるプログラムを記録したコンピュータ読
み取り可能な記録媒体。
6. A computer-readable recording medium storing a program for compiling a source code of an input application program to generate an executable file, and then supplying the program to a programmable controller and causing the computer to execute the processing. An application program input unit that receives an input of the source code of the application program; a compiling unit that compiles the source code of the application program to generate an executable file; included in the source code of the application program Of variables that are initialized by a preset initial value and other variables that are initialized by a value 0, the initialization variable and its initial value are discriminated. Initialization variable extraction means for extracting an initialization pattern file, initialization pattern file generation means for generating an initialization pattern file from initial values of the initialization variables extracted by the initialization variable extraction means, executable file generated by the compilation means A transmission unit for transmitting the initialization pattern file generated by the initialization pattern file generation unit to the programmable controller; and a start unit for starting an executable file transmitted by the transmission unit. Computer readable recording medium.
【請求項7】 プログラマブルコントローラ支援装置が
アプリケーションプログラムのソースコードをコンパイ
ルして生成した実行可能ファイルを入力して実行するプ
ログラマブルコントローラにおいて、 前記プログラマブルコントローラ支援装置から送信され
た前記実行可能ファイルと、前記初期化パターンファイ
ルとを受信する受信手段と、 前記受信手段によって受信された前記実行可能ファイル
を格納する実行可能ファイル格納手段と、 前記受信手段によって受信された前記初期化パターンフ
ァイルを格納する初期化パターンファイル格納手段と、 前記実行可能ファイルが起動された場合に、各種変数の
値が格納される変数値格納手段と、 前記起動手段によって前記実行可能ファイルが起動され
た場合には、前記初期化パターンファイルを前記変数値
格納手段の所定の領域にマッピングするマッピング手段
と、 前記初期化パターンファイルにより予め定められた初期
値によって初期化される前記初期化変数以外の変数に対
応する前記変数値格納手段の所定の領域を値0によって
初期化する初期化手段と、 を有することを特徴とするプログラマブルコントロー
ラ。
7. A programmable controller which inputs and executes an executable file generated by compiling a source code of an application program by the programmable controller support device, wherein the executable file transmitted from the programmable controller support device, Receiving means for receiving an initialization pattern file; executable file storage means for storing the executable file received by the receiving means; and initialization for storing the initialization pattern file received by the receiving means. Pattern file storage means; variable value storage means for storing values of various variables when the executable file is activated; and initialization when the executable file is activated by the activation means. Pattern fa Mapping means for mapping a variable to a predetermined area of the variable value storage means, and the variable value storage means corresponding to a variable other than the initialization variable initialized by an initial value predetermined by the initialization pattern file. And initialization means for initializing a predetermined area of the programmable controller with a value of 0.
JP10597398A 1998-04-16 1998-04-16 Programmable controller system, programmable controller support apparatus, programmable controller, and recording medium Expired - Lifetime JP3629947B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10597398A JP3629947B2 (en) 1998-04-16 1998-04-16 Programmable controller system, programmable controller support apparatus, programmable controller, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10597398A JP3629947B2 (en) 1998-04-16 1998-04-16 Programmable controller system, programmable controller support apparatus, programmable controller, and recording medium

Publications (2)

Publication Number Publication Date
JPH11305809A true JPH11305809A (en) 1999-11-05
JP3629947B2 JP3629947B2 (en) 2005-03-16

Family

ID=14421723

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10597398A Expired - Lifetime JP3629947B2 (en) 1998-04-16 1998-04-16 Programmable controller system, programmable controller support apparatus, programmable controller, and recording medium

Country Status (1)

Country Link
JP (1) JP3629947B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006011474A1 (en) * 2004-07-28 2006-02-02 Mitsubishi Denki Kabushiki Kaisha Program creating device for programmable controller, program creating method for programmable controller, and recording medium having recorded program of the method
WO2011036768A1 (en) * 2009-09-25 2011-03-31 株式会社 東芝 Simulation device
US10175673B2 (en) 2015-04-06 2019-01-08 Mitsubishi Electric Corporation Programmable controller system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106843124A (en) * 2016-12-26 2017-06-13 北京起重运输机械设计研究院 A kind of Automatic Warehouse three-dimensional real-time monitoring method and system

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006011474A1 (en) * 2004-07-28 2006-02-02 Mitsubishi Denki Kabushiki Kaisha Program creating device for programmable controller, program creating method for programmable controller, and recording medium having recorded program of the method
JPWO2006011474A1 (en) * 2004-07-28 2008-05-01 三菱電機株式会社 Program generation device for programmable controller, program generation method for programmable controller, and recording medium recording program of the method
GB2432018B (en) * 2004-07-28 2009-06-17 Mitsubishi Electric Corp Program creating device for programmable controller, program creating method for programmable controller, and recording medium
JP4525681B2 (en) * 2004-07-28 2010-08-18 三菱電機株式会社 Program generating device for programmable controller, program generating method for programmable controller, and recording medium recording program of the method
US7937172B2 (en) 2004-07-28 2011-05-03 Mitsubishi Electric Corporation Program creating device for programmable controller, program creating method for programmable controller, and recording medium having program recorded thereon
DE112005001790B4 (en) * 2004-07-28 2016-01-28 Mitsubishi Electric Corp. A programmer for a programmable controller, a programmer for a programmable controller, and a recording medium having a program recorded thereon
WO2011036768A1 (en) * 2009-09-25 2011-03-31 株式会社 東芝 Simulation device
US10175673B2 (en) 2015-04-06 2019-01-08 Mitsubishi Electric Corporation Programmable controller system

Also Published As

Publication number Publication date
JP3629947B2 (en) 2005-03-16

Similar Documents

Publication Publication Date Title
CN103365696A (en) BIOS (Basic Input Output System) image file obtaining method and device
US5537531A (en) Portable computer with a bank switch for switching between a ROM and a memory, both allocated to the same address space, by changing a port address of a keyboard controller
JPH09282103A (en) Information processor
CN104035757A (en) MIPS-based (microprocessor without interlocked piped stages-based) U-boot (universal boot loader) transplantation implementing method
CN100524316C (en) Method and program for file information write processing
CN110471675B (en) Program burning method, system, device and computer readable storage medium
JPH11305809A (en) Programmable controller system, programmable controller supporting device, programmable controller and storage medium
CN100414514C (en) Memory access instruction vectorization
CN117369840A (en) Method for constructing embedded operating system based on customized software source
JPS6122817B2 (en)
JPH04245545A (en) Method of constituting multi-user virtual computer system and multi-user virtual computer system
JPS58149528A (en) Program loading system
JP2004021867A (en) Information processing system
JP2002099498A (en) Program performance device and program development support device
JP2005141435A (en) Tool
CN107562440A (en) A kind of eeprom method for updating edition and device
US5754852A (en) Apparatus for combining cellular telephone ring signals and PSTN ring signals
KR100316584B1 (en) Flash Memory To Share With Booting And Main Operation Program In System And Upgrade Method In That Memory
CN102023873A (en) Application program execution method and system, storage media controller and storage device
JP4877257B2 (en) Programmable controller, programmable controller support apparatus, and programmable controller system
JP4026383B2 (en) Information processing system, information processing terminal, external storage device, information processing terminal control program, and external storage device control program
JPH08190463A (en) Disk array device
JP2978008B2 (en) Memory management method
KR100640612B1 (en) Method and Apparatus for writing a main code
CN115878197A (en) Starting optimization method, system, chip, device and medium based on device tree

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20040205

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040209

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041108

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041207

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20071224

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20081224

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20081224

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20081224

Year of fee payment: 4

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20081224

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091224

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20101224

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20101224

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20111224

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111224

Year of fee payment: 7

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

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

Free format text: PAYMENT UNTIL: 20111224

Year of fee payment: 7

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20121224

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20121224

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20131224

Year of fee payment: 9

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

EXPY Cancellation because of completion of term