JP3207333B2 - Programmable controller - Google Patents
Programmable controllerInfo
- Publication number
- JP3207333B2 JP3207333B2 JP14109695A JP14109695A JP3207333B2 JP 3207333 B2 JP3207333 B2 JP 3207333B2 JP 14109695 A JP14109695 A JP 14109695A JP 14109695 A JP14109695 A JP 14109695A JP 3207333 B2 JP3207333 B2 JP 3207333B2
- Authority
- JP
- Japan
- Prior art keywords
- user program
- program
- execution
- address
- unit
- 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.)
- Expired - Fee Related
Links
Landscapes
- Stored Programmes (AREA)
- Programmable Controllers (AREA)
Description
【0001】本発明はユーザプログラム実行中にユーザ
プログラム変更を可能としたプログラマブルコントロー
ラに関するものである。The present invention relates to a programmable controller capable of changing a user program during execution of the user program.
【0002】[0002]
【従来の技術】書き換え可能なメモリにユーザプログラ
ムを内蔵したプログラマブルコントローラにおいては、
ユーザプログラムメモリにプログラムを書き込む場合、
プログラムを一旦停止させて行うものであって、プログ
ラム書き込み時間以外に停止させたことによる条件の変
化を元に戻し直す必要があり、そのプログラム変更に多
くの時間を必要としていた。2. Description of the Related Art In a programmable controller having a user program built in a rewritable memory,
When writing a program to the user program memory,
Since the program is temporarily stopped, it is necessary to restore the change in the condition caused by stopping the program other than the program writing time, and it takes a lot of time to change the program.
【0003】[0003]
【発明が解決しようとする課題】そして、プログラマブ
ルコントローラの実行中にユーザプログラムを変更する
場合、書き換え可能なメモリを、プログラミングコンソ
ールから順次書き込むが、ここで、ユーザプログラムメ
モリはプログラム実行開始アドレスから最終アドレスま
での全てが書き込まれて意味をもっており、したがっ
て、CPUがユーザプログラム最終アドレスの命令を実
行終了後、瞬時に変更しないとプログラムの実行に障害
を与えることがある。しかして、本発明の目的とすると
ころは、ユーザプログラム実行中にユーザプログラムの
変更を行い得るプログラマブルコントローラを、提供す
るにある。When the user program is changed during the execution of the programmable controller, the rewritable memory is sequentially written from the programming console. Everything up to the address is written and meaningful. Therefore, if the CPU does not change the instruction at the last address of the user program immediately after the execution, the program execution may be hindered. Thus, an object of the present invention is to execute a user program while executing the user program.
A programmable controller capable of performing a change is provided.
【0004】[0004]
【課題を解決するための手段】本発明は上述したような
点に鑑みなされたものであって、つぎの如くに構成した
ものである。すなわち、プログラマブルコントローラに
おいては、第1にユーザプログラムを瞬時に切替必要な
プログラム実行部分と、非実行部分つまりプログラムの
補助的役割を果す修飾部分とに、メモリを分割する。SUMMARY OF THE INVENTION The present invention has been made in view of the above points, and has the following structure. That is, in the programmable controller, first, the memory is divided into a program execution portion that requires instantaneous switching of the user program and a non-execution portion, that is, a modification portion that plays an auxiliary role of the program.
【0005】第2に、ユーザプログラムの書き換えると
き、新たに書き込むプログラムを、元々書き込まれてい
るプログラム実行部とプログラム修飾部を交換のうえ、
交互に書き込み、また、プログラム実行部を先に書き込
み後からプログラム修飾部を書き込む、如くなしたもの
である。その具体的な構成としては、ユーザプログラム
の実行部を記憶するユーザプログラム実行部記憶手段
と、ユーザプログラムの修飾部を記憶するユーザプログ
ラム修飾部記憶手段と、ユーザプログラムの実行部開始
アドレスを記憶するユーザプログラム実行部開始アドレ
ス記憶手段と、ユーザプログラムの実行部アドレスを記
憶するユーザプログラム実行部最終アドレス記憶手段
と、ユープログラムの最終アドレスまで各アドレスの命
令が順次実行される動作を繰り返すプログラム命令実行
手段とを、具備して構成されるものである。Second, when a user program is rewritten, a program to be newly written is replaced by a program executing section and a program modifying section in which the program is originally written.
The program is written alternately, and the program execution section is written first, and then the program modification section is written. As a specific configuration, a user program execution unit storage unit that stores an execution unit of a user program, a user program modification unit storage unit that stores a modification unit of the user program, and an execution unit start address of the user program are stored. User program execution section start address storage means, user program execution section last address storage means for storing the execution section address of the user program, and program instruction execution for repeating the operation of sequentially executing instructions at each address up to the last address of the user program Means.
【0006】[0006]
【作用】かかる解決手段により、つぎの如くに作用し得
る。 (イ) ユーザプログラムを書き換える場合、新しいプ
ログラム実行部を現在実行中のプログラム修飾部に順次
書き込を行い、最終アドレスまで書き込み終了する。 (ロ) 書き込み終了後、プログラミングコンソールは
プログラマブルコントローラのCPUに実行部が切替ら
れる旨連絡し、CPUはこれを受けて旧プログラム実行
部の最終アドレスを実行後、新プログラムに切替える。 (ハ) 切替終了後、CPUはコンソールに対しプログ
ラムの実行部に切替った旨を連絡し、以後、新プログラ
ムを実行する。これにより、コンソールはCPUが新プ
ログラム実行部を実行中、不要となった旧プログラムの
実行部に新プログラム修飾部の書き込み実施し終了す
る。さらに、本発明を図面に基づいて、詳細説明する。According to the above solution, the following operation can be achieved. (A) When rewriting a user program, a new program execution unit is sequentially written into the currently executing program modification unit, and writing to the last address is completed. (B) After the writing is completed, the programming console notifies the CPU of the programmable controller that the execution unit is to be switched, and upon receiving the notification, the CPU executes the last address of the old program execution unit and then switches to the new program. (C) After the switching is completed, the CPU notifies the console that the switching has been performed to the program execution unit, and thereafter executes the new program. As a result, while the CPU is executing the new program execution unit, the console writes the new program modification unit to the execution unit of the old program that is no longer needed, and ends the console. Further, the present invention will be described in detail with reference to the drawings.
【0007】[0007]
【実施例】図1は本発明の理解を容易にするため表した
プログラマブルコントローラのシステムを示すものであ
って、1はプログラマブルコントローラ、2は入出力ユ
ニット、3は接続ケーブル、4はプログラミングコンソ
ールである。すなわち、プログラマブルコントローラ1
はシステムプログラムが書き込まれたROM12,ユー
ザプログラムが書き込まれているユーザプログラムメモ
リ16,システムプログラムに従いユーザプログラムを
処理するCPU11,その処理に使用されるシステムメ
モリ14,入力データおよび出力データの受け渡しを外
部と行う入出力ユニット2等で構成される。それらはC
PU11のバス13で接続される。また、バス13には
インターフェース15が接続され、インターフェース1
5を介して接続ケーブル3によりプログラミングコンソ
ール4が接続されている。FIG. 1 shows a programmable controller system shown to facilitate understanding of the present invention, wherein 1 is a programmable controller, 2 is an input / output unit, 3 is a connection cable, and 4 is a programming console. is there. That is, the programmable controller 1
Is a ROM 12 in which a system program is written, a user program memory 16 in which a user program is written, a CPU 11 which processes the user program in accordance with the system program, a system memory 14 used for the processing, and the transfer of input data and output data to an external device. And an input / output unit 2 and the like. They are C
It is connected by the bus 13 of the PU 11. An interface 15 is connected to the bus 13, and the interface 1
The programming console 4 is connected to the connection console 3 via the connection cable 5.
【0008】図2は、本発明によるユーザプログラムメ
モリとシステムメモリの内容を、ユーザプログラムの書
き込み前後に分けて示し、 141, 142はシステムメモ
リ、161, 162はユーザプログラムメモリ、Dは分割ラ
インである。図2において、ユーザプログラムメモリ 1
61の内容は、書き込み前では実行部と修飾部に、分割ラ
インDによって2分割されている。ここに、A1 は書き
込み前実行部、B1 は書き込み前修飾部、C11,C12は
書き込み前未使用領域を示している。FIG. 2 shows the contents of the user program memory and the system memory according to the present invention separately before and after writing the user program. 141 and 142 are system memories, 161 and 162 are user program memories, and D is a division line. is there. In FIG. 2, the user program memory 1
Prior to writing, the content of 61 is divided into an execution part and a decoration part by a division line D. Here, A1 indicates a pre-writing execution section, B1 indicates a pre-writing modification section, and C11 and C12 indicate unused areas before writing.
【0009】書き込み前実行部A1 はCPUが実行する
ための命令コードが書き込まれており、CPUは命令コ
ードに従って処理を実行する。書き込み前修飾部B1 は
ユーザプログラムをプログラミングコンソールでモニタ
するための情報が書き込まれ、ユーザプログラムを画面
上に表すとき必要な命令コードの画面アドレスや、演算
パラメータの名称,プログラムの説明のためのコメント
情報などが含まれている。また、分割ラインDとの間は
メモリの書き込み前未使用領域C11,C12であって、プ
ログラムの増加に対応できるようになっている。さらに
システムメモリ 141は、これらユーザプログラム実行部
開始アドレスおよびユーザプログラム実行部最終アドレ
スをメモリしており、システムプログラムがユーザプロ
グラムを処理するときに参照し得うる、ことは明らかで
ある。An instruction code to be executed by the CPU is written in the execution unit A1 before writing, and the CPU executes processing according to the instruction code. Information for monitoring the user program on the programming console is written in the pre-writing modification unit B1, and the screen address of the instruction code necessary for displaying the user program on the screen, the name of the operation parameter, and a comment for explaining the program Information is included. Further, between the division line D, unused areas C11 and C12 before writing of the memory are provided so as to be able to cope with an increase in programs. Further, it is apparent that the system memory 141 stores the user program execution unit start address and the user program execution unit end address, and can be referred to when the system program processes the user program.
【0010】ここで、プログラマブルコントローラにお
いて電源を投入すると、システムプログラムはシステム
メモリ 141の内容を参照して、書き込み前実行部A1 を
ユーザプログラム実行部開始アドレスから順次実行し、
外部からの入力信号 211を入出力ユニット2の入出力回
路21を介してプログラマブルコントローラ1内に読み込
み、この情報により内部演算を実施する。またその結果
を、入出力回路21を介して出力信号 212を発生する。C
PUの実行アドレスが最終アドレスに到達すると、シス
テムプログラムはユーザプログラムの処理を終了し、ユ
ーザプログラム以外に必要なシステム維持のための処理
を実行した後、ユーザプログラムを再び最初から実行
し、これを繰り返し実行する。また、ユーザプログラム
の確認作業を実施する場合、プログラマブルコントロー
ラ1はプログラミングコンソール4を操作することによ
り、接続ケーブル3を通してユーザプログラムの書き込
み前修飾部B1 の情報を読み込む。そして、この情報を
基に、プログラミングコンソール4上にユーザに解り易
いプログラミング情報画面を作成し、実行結果の確認を
することができる。Here, when the power is turned on in the programmable controller, the system program refers to the contents of the system memory 141 and executes the pre-write execution section A1 sequentially from the user program execution section start address,
An input signal 211 from the outside is read into the programmable controller 1 via the input / output circuit 21 of the input / output unit 2, and an internal operation is performed based on this information. Further, the result is output to the output signal 212 via the input / output circuit 21. C
When the execution address of the PU reaches the final address, the system program terminates the processing of the user program, executes processing required for maintaining the system other than the user program, and then executes the user program again from the beginning. Execute repeatedly. When the user program is checked, the programmable controller 1 operates the programming console 4 to read the information of the pre-writing modification section B1 of the user program through the connection cable 3. Then, based on this information, a programming information screen that is easy for the user to understand is created on the programming console 4, and the execution result can be confirmed.
【0011】いま、ユーザからの要望によユーザプログ
ラムの変更が生じた場合、プログラミングコンソール4
からの割り込み要求を受け付け、ユーザプログラムの書
き込みを開始する。このとき、プログラミングコンソー
ル4上に描いていた書き込み前修飾部B1 の情報は既に
必要なくなっており、新しいプログラムの書き込み後実
行A2 は、旧プログラムの書き込み前修飾部B1 のアド
レスから、書き込みを開始する。その際にCPU11は、
旧プログラムの書き込み前実行部A1 を実行している
が、新しいプログラムの書き込みは(本例では)割り込
み手順を用いており、外部回路への制御に支障をきたす
ことがないようにする必要がある。When a user program is changed according to a user's request, the programming console 4
And starts writing the user program. At this time, the information of the pre-writing decoration part B1 drawn on the programming console 4 is no longer necessary, and the execution A2 after writing of the new program starts writing from the address of the pre-writing decoration part B1 of the old program. . At that time, the CPU 11
Although the execution unit A1 before writing of the old program is executed, writing of the new program uses an interrupt procedure (in this example), and it is necessary to prevent interruption of control to the external circuit. .
【0012】こうして新しいプログラムが最後まで書き
込み終了すると、プログラムコンソールの割り込み要求
により、システムメモリ 142のユーザプログラム実行部
開始アドレスを変更する。システムプログラムは旧ユー
ザプログラムを最終アドレスまで実行した後、前述のユ
ーザプログラム実行部アドレスを読み込み、ユーザプロ
グラムが変化したことを知り、新しい書き込み後実行部
A2 の実行を開始する。その際、システムプログラムは
プログラミングコンソールに対してプログラムの実行部
開始アドレスを変化させたことを連絡することにより、
旧プログラムの書き込み前実行部A1 は未使用になった
ことがわかる。以後、プログラミングコンソールは新し
いユーザプログラムの書き込み後修飾部B2 を旧プログ
ラムの書き込み前実行部A1 へ書き込みを開始する。こ
の場合、システムプログラムは新しいプログラムを実行
しながら、プログラミングコンソールからの割り込みに
よって書き込みを行うが、外部回路への制御はユーザプ
ログラムの変更によって発生するもの以外はない。新し
いプログラムが全て書き込み終了した後に再びユーザプ
ログラムの確認作業を実施するが、この場合はプログラ
ミングコンソールからの要求を発生し、書き込み後修飾
部B2 の情報によりプログラミングコンソール上に描き
ユーザに解り易い新しい画面を作成して、再びプログラ
ム実行結果の確認が可能となる。When the writing of the new program to the end is completed, the start address of the user program execution unit in the system memory 142 is changed by the interrupt request of the program console. After executing the old user program up to the final address, the system program reads the above-mentioned user program execution section address, finds out that the user program has changed, and starts execution of the new write execution section A2. At that time, the system program notifies the programming console that the execution section start address of the program has been changed,
It can be seen that the pre-write execution unit A1 of the old program has become unused. Thereafter, the programming console starts to write the new user program post-writing modification section B2 to the old program pre-writing execution section A1. In this case, the system program executes writing by an interrupt from the programming console while executing the new program. However, there is no control over the external circuit other than that generated by a change in the user program. After the writing of all the new programs is completed, the user program is checked again. In this case, a request from the programming console is generated, and after writing, a new screen which is drawn on the programming console based on the information of the modification unit B2 and is easy for the user to understand. Is created, and the result of the program execution can be confirmed again.
【0013】[0013]
【発明の効果】以上説明したように本発明によれば、ユ
ーザプログラム領域を増やすことなくユーザプログラム
実行中にユーザプログラムの交換が可能になり、プログ
ラムの開始期間を大巾に短縮し得る格別な装置を提供で
きる。As described above, according to the present invention, the user program can be exchanged during execution of the user program without increasing the user program area, and the start period of the program can be greatly reduced. Equipment can be provided.
【図1】図1はプログラマブルコントローラのシステム
ブロック図である。FIG. 1 is a system block diagram of a programmable controller.
【図2】図2は本発明によるユーザプログラムメモリの
書き込み前後を示した説明図である。FIG. 2 is an explanatory diagram showing before and after writing in a user program memory according to the present invention.
1 プログラマブルコントローラ 11 CPU 12 ROM 13 バス 14 システムメモリ 15 インターフェース 16 ユーザプログラムメモリ 161 ユーザプログラムメモリ 162 ユーザプログラムメモリ 2 入出力ユニット 3 接続ケーブル 4 プログラミングコンソール A1 書き込み前実行部 A2 書き込み後実行部 B1 書き込み前修飾部 B2 書き込み後修飾部 C11 書き込み前未使用領域 C12 書き込み前未使用領域 C21 書き込み後未使用領域 C22 書き込み後未使用領域 D 分割ライン DESCRIPTION OF SYMBOLS 1 Programmable controller 11 CPU 12 ROM 13 Bus 14 System memory 15 Interface 16 User program memory 161 User program memory 162 User program memory 2 I / O unit 3 Connection cable 4 Programming console Part B2 Modified part after writing C11 Unused area before writing C12 Unused area before writing C21 Unused area after writing C22 Unused area after writing D Divided line
Claims (1)
ユーザプログラムの実行中にユーザプログラムを変換可
能としたユーザプログラムにおいて、 ユーザプログラムをCPUが実時間処理を行う実行部と
実時間では実行しない修飾部に分けるとともに、ユーザ
プログラムの書き込み毎に書き込み前の修飾部を、該修
飾部が格納されていた領域に実行部を書き込む新しい実
行部として、実際に記憶部に記憶するユーザプログラム
実行部記憶手段と、 前記修飾部 を記憶するユーザプログラム修飾部記憶手段
と、 該ユーザプログラムの実行部開始アドレスを記憶するユ
ーザプログラム実行部開始アドレス記憶手段および実行
部最終アドレスを記憶するユーザプログラム実行部最終
アドレス記憶手段と、 ユーザプログラムの最終アドレスまで各アドレスの命令
が順次実行される動作を繰り返すプログラム命令実行手
段とを、 具備して構成したことを特徴とするプログラマブルコン
トローラ。1. A programmable controllerIncorporate
User program can be converted during execution of user program
An execution unit in which the CPU performs real-time processing of the user program.
In addition to dividing into decoration parts that are not executed in real time,
Each time the program is written,, Said repair
A new method to write the execution part to the area where the decoration part was stored
User program that is actually stored in the storage unit as the row unit
Execution unit storage means; Modification part Storage means for storing a user program modifying unit
And a user for storing an execution unit start address of the user program.
User program execution section start address storage means and execution
User program execution section last that stores the section final address
Address storage means and instructions for each address up to the last address of the user program
Instruction execution means that repeats the operation in which
And a step.
Trolla.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP14109695A JP3207333B2 (en) | 1995-05-16 | 1995-05-16 | Programmable controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP14109695A JP3207333B2 (en) | 1995-05-16 | 1995-05-16 | Programmable controller |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH08314712A JPH08314712A (en) | 1996-11-29 |
JP3207333B2 true JP3207333B2 (en) | 2001-09-10 |
Family
ID=15284106
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP14109695A Expired - Fee Related JP3207333B2 (en) | 1995-05-16 | 1995-05-16 | Programmable controller |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3207333B2 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008077265A (en) * | 2006-09-20 | 2008-04-03 | Fuji Electric Fa Components & Systems Co Ltd | Program update method for programmable controller |
JP5790128B2 (en) * | 2011-04-28 | 2015-10-07 | 富士電機株式会社 | Programmable controller system and its support device |
-
1995
- 1995-05-16 JP JP14109695A patent/JP3207333B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH08314712A (en) | 1996-11-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3207333B2 (en) | Programmable controller | |
JPH09128255A (en) | Programable logic controller | |
JP4571355B2 (en) | Control method, control program, memory element, control device for technical process in vehicle | |
JPS59114602A (en) | Programmable controller | |
JP3331357B2 (en) | Programmable controller | |
JP2621631B2 (en) | Programmable controller | |
JPH11259308A (en) | Programmable controller | |
JPH09244717A (en) | Controller | |
JP3793246B2 (en) | Positioning system | |
JP2731166B2 (en) | Programmable controller | |
JP3024719B2 (en) | Arithmetic processing method of programmable controller | |
JPH0158522B2 (en) | ||
JP4037941B2 (en) | Control device | |
JP3328714B2 (en) | Programmable controller | |
JP3441262B2 (en) | Data processing device | |
JP2658699B2 (en) | Method of managing device under test of input / output device test program | |
JPS6348698A (en) | Memory storage control device | |
JPH0743739B2 (en) | Automatic wiring processing execution system | |
JPH07287660A (en) | Programmable controller interrupt handling method | |
JP2793809B2 (en) | Applied instruction processing method of programmable controller | |
JP3730684B2 (en) | Display device for programmable controller and display information writing method thereof | |
JPH0830453A (en) | Programmable controller | |
JPH04167146A (en) | Address tracing system for information processor | |
JPS63214805A (en) | Programmable controller | |
JPS6020771B2 (en) | Micro diagnosis method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |