JPH1185223A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH1185223A
JPH1185223A JP24284197A JP24284197A JPH1185223A JP H1185223 A JPH1185223 A JP H1185223A JP 24284197 A JP24284197 A JP 24284197A JP 24284197 A JP24284197 A JP 24284197A JP H1185223 A JPH1185223 A JP H1185223A
Authority
JP
Japan
Prior art keywords
instruction
memory
program
microinstruction
micro
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
JP24284197A
Other languages
Japanese (ja)
Other versions
JP3512989B2 (en
Inventor
Kazuhide Ashida
和英 芦田
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP24284197A priority Critical patent/JP3512989B2/en
Publication of JPH1185223A publication Critical patent/JPH1185223A/en
Application granted granted Critical
Publication of JP3512989B2 publication Critical patent/JP3512989B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To easily modify the substantial contents of a program to be executed by providing a means which selects a microinstruction read out of a microprogram memory and a microinstruction read out of a user program memory in pre-stage of an instruction execution part for microinstructions. SOLUTION: In the microprogram memory 20, microinstructions for executing respective sequence instructions stored in the user program 3 are stored. An instruction selecting circuit 17 selects microinstructions read out of the memory 20 in order and sends them out to an arithmetic circuit 18 while a selection command for the memory 20 is applied from an execution control circuit 15. Further, an instruction selecting circuit 17 selects and sends microinstructions read out of an instruction register 14 in order to the arithmetic circuit 18 while a selection command for the instruction register 14 is applied from the execution control circuit 15. The arithmetic circuit 18 after temporarily writing a specific arithmetic process result in an internal register 13 outputs it as operation data.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、鉄鋼,製紙等の製
造プラントや化学プラントや電力プラントや上下水道プ
ラント等の各種ブラントに組込まれ、各種の制御対象の
動作及び状態を最適状態に制御するプログラマブルコン
トローラに係わり、特に実行されるプログラムを簡単に
変更、追加ができるプログラマブルコントローラに関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is incorporated in various plants, such as steel, paper and other manufacturing plants, chemical plants, electric power plants, and water and sewage plants, and controls the operation and state of various controlled objects to optimal conditions. The present invention relates to a programmable controller, and more particularly to a programmable controller capable of easily changing and adding a program to be executed.

【0002】[0002]

【従来の技術】上述した各種プラントに組込まれたプロ
グラマブルコントローラは制御対象に対して各種の制御
処理を実行する。そして、各制御処理を実行する制御プ
ログラムは、通常、複数のシーケンス命令で構成されて
いる。さらに、制御プログラムは、通常、プログラムの
実行をハードウェア又は複数のマイクロ命令で書かれた
マイクロプログラムで実行されるように構成されてい
る。
2. Description of the Related Art Programmable controllers incorporated in the above-mentioned various plants execute various control processes on control targets. A control program for executing each control process is usually composed of a plurality of sequence instructions. Further, the control program is generally configured such that the execution of the program is executed by hardware or a microprogram written with a plurality of microinstructions.

【0003】しかし、制御プログラムの実行制御部分が
全てハードウェアで構成されている場合には,シーケン
ス命令の変更や追加は不可能である。したがって、近年
ではシーケンス命令の実行内容を書替え可能なマイクロ
プログラムメモリに格納している場合も多い。
However, when the execution control portion of the control program is entirely constituted by hardware, it is impossible to change or add a sequence instruction. Therefore, in recent years, the execution contents of the sequence instructions are often stored in a rewritable microprogram memory.

【0004】[0004]

【発明が解決しようとする課題】プログラマブルコント
ローラの制御動作がマイクロプログラムで制御されてい
る場合において、各制御プログラムにおける各シーケン
ス命令の実際の内容を示すマイクロ命令が書込まれたマ
イクロプログラムメモリが例えばHDDやRAM等の書
替え可能な独立した記憶素子で構成されている場合は、
各シーケンス命令を構成する各マイクロ命令を書替える
ことによって制御プログラムの具体的実行内容を自由に
変更できる。
In the case where the control operation of the programmable controller is controlled by a microprogram, a microprogram memory in which microinstructions indicating the actual contents of each sequence instruction in each control program are written, for example, If it is composed of rewritable independent storage elements such as HDD and RAM,
The specific execution contents of the control program can be freely changed by rewriting each microinstruction constituting each sequence instruction.

【0005】しかし、このマイクロプログラムメモリを
他の回路素子と共にLSI(大規模集積回路)に作り込
んだ場合には、最初からこのプログラムの実行をハード
ウェアで実現した場合と同様にシーケンス命令の内容の
変更は不可能である。
However, when this microprogram memory is built together with other circuit elements in an LSI (Large Scale Integrated Circuit), the contents of the sequence instruction are executed in the same manner as when the execution of this program is realized by hardware from the beginning. Is impossible to change.

【0006】プログラマブルコントローラ全体の部品点
数を低減させるためには上述したマイクロプログラムメ
モリも含めてLSI化するのが望ましいが、シーケンス
命令における具体的内容の変更が生じる可能性がある場
合はLSI化することが不可能である。
In order to reduce the number of components of the entire programmable controller, it is desirable to implement an LSI including the above-mentioned microprogram memory. However, if there is a possibility that the specific contents of the sequence instructions may change, the LSI is implemented. It is impossible.

【0007】本発明はこのような事情に鑑みてなされた
もので、マイクロ命令の命令実行部の前段にマイクロプ
ログラムメモリから読出されたマイクロ命令とユーザプ
ログラムメモリから読出されたマイクロ命令とを切換え
る手段を設けることによって、たとえマイクロプログラ
ムメモリがLSI等の実質的ハードウェアで構成されて
いたとしても、このコントローラで実行されるプログラ
ムの実質的内容を簡単に変更及び追加できるプログラマ
ブルコントローラを提供することを目的とする。
The present invention has been made in view of such circumstances, and means for switching between a microinstruction read from a microprogram memory and a microinstruction read from a user program memory at a stage preceding an instruction execution unit of a microinstruction. To provide a programmable controller that can easily change and add substantial contents of a program executed by the controller even if the microprogram memory is configured by substantial hardware such as an LSI. Aim.

【0008】[0008]

【課題を解決するための手段】上記課題を解消するため
に、請求項1のプログラマブルコントローラにおいて
は、実行すべきプログラムのマイクロ命令を記憶するマ
イクロプログラムメモリと、入力されたマイクロ命令を
実行する命令実行手段と、プログラムの実行モードを指
示する実行モード指示手段と、この指示された実行モー
ドに基づいてマイクロプログラムメモリ又はユーザプロ
グラムメモリから読出されたマイクロ命令を命令実行手
段へ与える命令選択手段とを備えている。
According to a first aspect of the present invention, there is provided a programmable controller for storing a microinstruction of a program to be executed, and an instruction for executing an input microinstruction. Execution means, execution mode instructing means for instructing an execution mode of the program, and instruction selection means for providing the microinstruction read from the microprogram memory or the user program memory to the instruction execution means based on the instructed execution mode. Have.

【0009】このように構成されたプログラマブルコン
トローラにおいては、マイクロプログラムメモリに記憶
されたプログラムの各マイクロ命令と異なるマイクロ命
令を実行させる場合は、この異なるマイクロ命令をユー
ザプログラムメモリに設定して、実行モード指示手段で
命令選択手段に対してユーザプログラムメモリから読出
されたマイクロ命令を選択する指示を与えればよい。
In the programmable controller configured as described above, when a microinstruction different from each microinstruction of the program stored in the microprogram memory is executed, the different microinstruction is set in the user program memory and executed. What is necessary is just to give an instruction for selecting the microinstruction read from the user program memory to the instruction selection means by the mode instruction means.

【0010】その結果、命令実行手段には、マイクロプ
ログラムメモリから読出されたマイクロ命令の代りに、
ユーザプログラムメモリから読出されたマイクロ命令が
入力される。よって、マイクロプログラムメモリに記憶
さけたマイクロ命令の代りに例えば操作者やユーザが指
定したマイクロ命令が実行される。
As a result, instead of the microinstruction read from the microprogram memory, the instruction execution means has
The microinstruction read from the user program memory is input. Therefore, for example, instead of the microinstruction stored in the microprogram memory, a microinstruction specified by an operator or a user is executed.

【0011】すなわち、たとえ他の電位部材と共にLS
I内に組込まれたマイクロプログラムメモリであったと
しても、このマイクロプログラムメモリに記憶されたマ
イクロ命令を外部の異なるマイクロ命令に置換えて実行
でき、このプログラマブルコントローラの汎用性を大幅
に向上できる。
That is, even if LS together with other potential members
Even if the microprogram memory is built in the I, the microinstructions stored in the microprogram memory can be replaced with different external microinstructions and executed, and the versatility of the programmable controller can be greatly improved.

【0012】請求項2は、請求項1のプログラマブルコ
ントローラにおいて、ユーザプログラムメモリに対して
マイクロプログラムメモリに書込まれた不具合マイクロ
命令又は変更すべきマイクロ命令に対する正しいマイク
ロ命令を書込むマイクロ命令書込手段を備えている。さ
らに、実行モード指示手段は、ユーザプログラムメモリ
から読出されたマイクロ命令を選択する実行モードを指
示する。
According to a second aspect of the present invention, in the programmable controller of the first aspect, a micro-instruction writing for writing a defective micro-instruction written in the micro-program memory or a correct micro-instruction for a micro-instruction to be changed in the user program memory. Means. Further, the execution mode instructing means instructs an execution mode for selecting a microinstruction read from the user program memory.

【0013】このように構成されたプログラマブルコン
トローラにおいては、マイクロプログラムロモリに記憶
されたプログラムを構成するマイクロ命令に不具合があ
ったとき,又はプログラムのシーケンス命令のマイクロ
命令で示される内容を変更したいときに,内容を変更し
たマイクロ命令をユーザプログラムメモリに書込むこと
によって、容易に特定のマイクロ命令の実質的な訂正又
は変更が可能となる。
In the programmable controller configured as described above, when there is a defect in a microinstruction constituting the program stored in the microprogram memory, or when it is desired to change the contents indicated by the microinstruction of the sequence instruction of the program In addition, by writing the micro-instruction whose contents have been changed into the user program memory, it is possible to easily substantially correct or change a specific micro-instruction.

【0014】請求項3は、請求項1のプログラマブルコ
ントローラにおいて、ユーザプログラムメモリにマイク
ロプログラムメモリに記憶されたプログラムとは異なる
別のプログラムのマイクロ命令を書込む別プログラム書
込手段を設けている。さらに、実行モード指示手段は、
外部から入力された電気信号に基づいて強制的に、ユー
ザプログラムメモリから読出されたマイクロ命令を選択
する実行モードを指示する。
According to a third aspect of the present invention, in the programmable controller of the first aspect, another program writing means for writing a microinstruction of another program different from the program stored in the microprogram memory in the user program memory is provided. Further, the execution mode instruction means includes:
An execution mode for selecting a microinstruction read from the user program memory is forcibly instructed based on an externally input electric signal.

【0015】このような構成であると、このプログラマ
ブルコントローラに予め設定されている制御プログラム
とは異なる全く別の制御プログラムを実施する場合、こ
の全く別の制御プログラムのマイクロ命令をユーザプロ
グラムメモリに書込み、外部から電気信号を用いて動作
モードを強制的にユーザプログラムメモリから読出され
たマイクロ命令を選択するモードに設定すればよい。
With this configuration, when executing a completely different control program different from the control program preset in the programmable controller, the microinstruction of the completely different control program is written into the user program memory. The operation mode may be forcibly set to a mode for selecting a microinstruction read from the user program memory by using an external electric signal.

【0016】この場合、マイクロプログラムメモリに記
憶されたプログラムは全く使用されずに、もっぱら、ユ
ーザプログラムメモリに書込まれた別のプログラムが実
行される。
In this case, the program stored in the microprogram memory is not used at all, and another program written in the user program memory is executed exclusively.

【0017】さらに、この場合は、必要に応じて、マイ
クロプログラムメモリを除去できる。請求項4は、請求
項1のプログラマブルコントローラにおいて、ユーザプ
ログラムメモリにマイクロプログラムメモリに記憶され
たプログラムに対する追加のプログラムのマイクロ命令
を書込む追加プログラム書込手段を設けている。さら
に、実行モード指示手段は、ユーザプログラムメモリに
記憶された追加のプログラムの読出開始に応じて、ユー
ザプログラムメモリから読出されたマイクロ命令を選択
する実行モードを指示し、ユーザプログラムメモリに記
憶された追加のプログラムの読出終了に応じて、マイク
ロプログラムメモリから読出されたマイクロ命令を選択
する実行モードを指示する。
Further, in this case, if necessary, the microprogram memory can be removed. According to a fourth aspect of the present invention, in the programmable controller of the first aspect, an additional program writing means for writing a micro instruction of an additional program to the program stored in the micro program memory in the user program memory is provided. Further, in response to the start of reading of the additional program stored in the user program memory, the execution mode instructing means instructs an execution mode of selecting a microinstruction read from the user program memory, and the execution mode is stored in the user program memory. In accordance with the end of reading of the additional program, an execution mode for selecting a microinstruction read from the microprogram memory is designated.

【0018】このように構成されたプログラマブルコン
トローラにおいては、既存のマイクロプログラムメモリ
に設定済みのプログラムに対して、後から別のプログラ
ムを追加する必要が生じた場合、この追加のプログラム
の各マイクロ命令をユーザプログラムメモリに書込めば
よい。
In the programmable controller configured as described above, when it is necessary to add another program later to the program set in the existing microprogram memory, each microinstruction of the additional program is required. May be written in the user program memory.

【0019】その結果、既存のマイクロプログラムメモ
リに設定済みのプログラムに加えて、ユーザプログラム
メモリに記憶された追加のプログラムも実行される。す
なわち、簡単に実行すべきプログムを増加できる。
As a result, an additional program stored in the user program memory is executed in addition to the program already set in the existing micro program memory. That is, the number of programs to be easily executed can be increased.

【0020】請求項5は、請求項4のプログラマブルコ
ントローラにおいて、追加プログラム書込手段は、ユー
ザプログラムメモリに追加のプログラムのマイクロ命令
を書込むに際して、マイクロ命令の前と後に開始情報及
び終了情報を書込む。また、実行モード指示手段は、開
始情報及び終了情報で追加のプログラムの読出開始及び
読出終了を検知する。
According to a fifth aspect of the present invention, in the programmable controller of the fourth aspect, the additional program writing means writes start information and end information before and after the microinstruction when writing the microinstruction of the additional program in the user program memory. Write. The execution mode instructing unit detects the start and end of reading of the additional program based on the start information and the end information.

【0021】このように構成されたプログラマブルコン
トローラにおいては、追加のプログラムの読出開始及び
読出終了が簡単に検出され、実行モード指示手段の処理
負担が軽減される。
In the programmable controller configured as described above, the start and end of reading of the additional program are easily detected, and the processing load on the execution mode instruction means is reduced.

【0022】さらに、請求項6は、請求項4のプログラ
マブルコントローラにおいて、追加プログラム書込手段
は、ユーザプログラムメモリに追加のプログラムのマイ
クロ命令を書込むに際して、この追加プログラムを構成
する複数のマイクロ命令のうち既にマイクロプログラム
メモリに記憶さされているマイクロ命令に対しては、該
当マイクロ命令をサブルーチンでマイクロプログラムメ
モリから呼出す形式で書込む。
According to a sixth aspect of the present invention, in the programmable controller according to the fourth aspect, the additional program writing means, when writing micro instructions of the additional program into the user program memory, comprises a plurality of micro instructions constituting the additional program. For the microinstruction already stored in the microprogram memory, the corresponding microinstruction is written in a form called from the microprogram memory by a subroutine.

【0023】このようにサブルーチンを用いて追加のプ
ログラムをユーザプログラムメモリに書込むことによつ
て、既にマイクロプログラムメモリに記憶されているマ
イクロ命令を利用できるので、プログラマブルコントロ
ーラ全体の資源をより有効に活用できる。
By writing the additional program into the user program memory using the subroutine in this way, the microinstructions already stored in the microprogram memory can be used, so that the resources of the entire programmable controller can be more effectively used. Can be used.

【0024】[0024]

【発明の実施の形態】以下本発明の一実施形態を図面を
用いて説明する。図1は実施形態のプログラマブルコン
トローラの概略構成を示すブロック図である。このプロ
グラマブルコントローラにおいては、外部バス1に対し
て、このプログラマブルコントローラの中枢部分である
シーケンス演算CPU2と、プログラマブルコントロー
ラのユーザ独自の制御プログラムが記憶されているユー
ザプログラムメモリ3と、プラントに組込まれた機器等
の各種制御対象からプロセスデータを取込みかつ各種制
御対象に対して操作データを送出する入出力ポート4
と、操作者が各種操作指令やユーザプログラムメモリ3
に設定する制御プログラムを構成するシーケンス命令や
マイクロ命令のプログラムデータを入力するための操作
部5が接続されている。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram illustrating a schematic configuration of the programmable controller according to the embodiment. In this programmable controller, a sequence operation CPU 2 which is a central part of the programmable controller, a user program memory 3 in which a user-specific control program of the programmable controller is stored, and an external bus 1 are incorporated in a plant. Input / output port 4 for taking in process data from various control targets such as equipment and sending operation data to various control targets
And the operator inputs various operation commands and user program memory 3
An operation section 5 for inputting program data of a sequence command or microinstruction constituting a control program to be set in the control program is connected.

【0025】ユーザプログラムメモリ3内には、図2に
示すように、このプログラマブルコントローラが設置さ
れるプラントの設置者であるユーザが設定した制御プロ
グラムを構成する複数のシーケンス命令6が実行順に記
憶されている。
As shown in FIG. 2, in the user program memory 3, a plurality of sequence instructions 6 constituting a control program set by a user who is an installer of the plant where the programmable controller is installed are stored in the order of execution. ing.

【0026】なお、このユーザプログラムメモリ3内に
は、必要に応じて、図3に示すように、マイクロ命令の
開始情報としての拡張モード指示命令7、マイクロ命令
の終了情報としての通常モード指示命令8、及び拡張モ
ード指示命令7と通常モード指示命令89との間に挟ま
れた複数のマイクロ命令9が操作者の操作部5を介した
書込操作で書込まれる場合がある。
In this user program memory 3, as shown in FIG. 3, an extended mode instruction instruction 7 as start information of the micro instruction and a normal mode instruction instruction as end information of the micro instruction are provided as necessary. 8 and a plurality of microinstructions 9 interposed between the extended mode instruction instruction 7 and the normal mode instruction instruction 89 may be written by a write operation via the operation unit 5 of the operator.

【0027】また、このユーザプログラムメモリ3内に
は、必要に応じて、図4に示すように、一つの制御プロ
グラムを構成する複数のマイクロ命令9のみが書込まれ
る場合もある。
Further, as shown in FIG. 4, only a plurality of microinstructions 9 constituting one control program may be written in the user program memory 3 as necessary.

【0028】さらに、このユーザプログラムメモリ3内
には、必要に応じて、図5に示すように、図2に示す所
定個数のシーケンス命令6に他に、このシーケンス命令
6の後の領域に拡張モード指示命令7、複数のマイクロ
命令9及び通常モード指示命令8からなる追加のプログ
ラムが書込まれる場合もある。
Further, as shown in FIG. 5, if necessary, the user program memory 3 is extended not only to the predetermined number of sequence instructions 6 shown in FIG. An additional program consisting of a mode instruction instruction 7, a plurality of micro instructions 9 and a normal mode instruction instruction 8 may be written.

【0029】図1に示すこのプログラマブルコントロー
ラの中枢部分を構成するシーケンス演算CPU2内にお
いて、内部バス10に対して、ユーザプログラムメモリ
3及び入出力ポート4のアドレスを指定するアドレスカ
ウンタ11、ユーザプログラムメモリ3と入出力ホート
4及び操作部5に対して各種情報の入出力処理を実施す
るデータ入出力回路12、前記入出力ポート4に対して
入出力されるデータを一時記憶する内部データバッファ
13、及びユーザプログラムメモリ3から読出されたシ
ーケンス命令6、拡張モード指示命令7、マイクロ命令
9及び通常モード指示命令8等の各種命令を一時記憶す
る命令レジスタ14が接続されている。
In a sequence operation CPU 2 constituting a central portion of the programmable controller shown in FIG. 1, an address counter 11 for specifying an address of a user program memory 3 and an input / output port 4 for an internal bus 10, a user program memory A data input / output circuit 12 for inputting / outputting various information to / from the input / output port 4 and the operation unit 5; an internal data buffer 13 for temporarily storing data input / output to / from the input / output port 4; An instruction register 14 for temporarily storing various instructions such as a sequence instruction 6, an extended mode instruction instruction 7, a micro instruction 9, and a normal mode instruction instruction 8 read from the user program memory 3 is connected.

【0030】命令レジスタ14は、ユーザプログラムメ
モリ3からマイクロ命令9が入力されると、入力された
マイクロ命令9を命令選択回路17へ送出する。さら
に、前記内部バス10に対して、前記命令レジスタ14
に取込んだ拡張モード指示命令7、通常モード指示命令
8をデコードして実行制御回路15へ送出する命令デコ
ーダ16、及び命令選択回路17で選択されたマイクロ
命令を実行する命令実行手段としての演算回路18が接
続されている。
When the micro instruction 9 is input from the user program memory 3, the instruction register 14 sends the input micro instruction 9 to the instruction selection circuit 17. Further, the instruction register 14 is connected to the internal bus 10.
The instruction decoder 16 decodes the extended mode instruction instruction 7 and the normal mode instruction instruction 8 fetched into the instruction control circuit 15 and sends the instruction to the execution control circuit 15, and the operation as instruction execution means for executing the microinstruction selected by the instruction selection circuit 17. The circuit 18 is connected.

【0031】さらに、命令デコーダ16は、前記命令レ
ジスタ14に取込んだシーケンス命令6に含まれるアド
レスをマイクロプログラムアドレスカウンタ21に初期
アドレス値として送出する。
Further, the instruction decoder 16 sends the address contained in the sequence instruction 6 fetched into the instruction register 14 to the microprogram address counter 21 as an initial address value.

【0032】前記演算回路18は、マイクロ命令が入力
すると、内部データレジスタ13に取込まれている制御
対象から入力されたプロセスデータに対してマイクロ命
令が指示する制御演算を実施して、演算結果である操作
データを内部データレジスタ13へ書込む。
When the micro-instruction is input, the arithmetic circuit 18 performs a control operation instructed by the micro-instruction on the process data input from the control target taken into the internal data register 13 and obtains the operation result. Is written into the internal data register 13.

【0033】実行制御回路15は、命令デコーダ16か
らデコードされた通常モード指示命令8が入力されると
動作モードレジスタ19の動作モードを「通常動作モー
ド」に設定し、命令デコーダ16からデコードされた拡
張モード指示命令7か入力されると動作モードレジスタ
19の動作モードを「拡張動作モード」に設定する。
Upon receiving the decoded normal mode instruction command 8 from the instruction decoder 16, the execution control circuit 15 sets the operation mode of the operation mode register 19 to the "normal operation mode", and When the extension mode instruction command 7 is input, the operation mode of the operation mode register 19 is set to “extended operation mode”.

【0034】さらに、実行制御回路15は、動作モード
レジスタ19に設定されいる動作モードが「通常動作モ
ード」の場合は命令選択回路17に対してマイクロプロ
グラムメモリ20の選択指令を送出し、動作モードレジ
スタ19に設定されいる動作モードが「拡張動作モー
ド」の場合は命令選択回路17に対して命令レジスタ1
4の選択指令を送出する。
Further, when the operation mode set in the operation mode register 19 is the "normal operation mode", the execution control circuit 15 sends an instruction to select the microprogram memory 20 to the instruction selection circuit 17, and executes the operation mode. When the operation mode set in the register 19 is the “extended operation mode”, the instruction register 1
4 is transmitted.

【0035】さらに、実行制御回路15は、動作モード
レジスタ19に設定されいる動作モードが「通常動作モ
ード」の場合、演算回路18からマイクロ命令に対する
一つの演算結果が出力する毎に、すなわち、一つのマイ
クロ命令が実行される毎に、マイクロプログラムアドレ
スカウンタ21へカウントアップ信号を送出する。
Further, when the operation mode set in the operation mode register 19 is the “normal operation mode”, the execution control circuit 15 outputs one operation result for the microinstruction from the operation circuit 18, Each time one microinstruction is executed, a count up signal is sent to the microprogram address counter 21.

【0036】また、実行制御回路15は、動作モードレ
ジスタ19に設定されいる動作モードが「拡張動作モー
ド」の場合、演算回路18からマイクロ命令9に対する
一つの演算結果が出力する毎に、すなわち、一つのマイ
クロ命令9が実行される毎に、アドレスカウンタ21へ
カウントアップ信号を送出する。
When the operation mode set in the operation mode register 19 is the “extended operation mode”, the execution control circuit 15 outputs an operation result for the microinstruction 9 from the operation circuit 18, that is, Each time one microinstruction 9 is executed, a count-up signal is sent to the address counter 21.

【0037】マイクロプログラムアドレスカウンタ21
は、実行制御回路15からカウントアップ信号が入力す
る毎に、先に入力された初期アドレス値からカウントア
ップされたアドレス値をマイクロプログラムメモリ20
へ印加する。
Microprogram address counter 21
Each time a count-up signal is input from the execution control circuit 15, the microprogram memory 20 stores the address value counted up from the previously input initial address value.
Apply to

【0038】マイクロプログラムメモリ20内には、前
記ユーザプログラムメモリ3に記憶された各シーケンス
命令6を実行するためのそれそれ複数のマイクロ命令が
記憶されている。そして、各シーケンス命令6における
先頭のマイクロ命令を記憶したアドレス、すなわち、先
頭アドレスは各シーケンス命令6で指定される。
In the micro program memory 20, a plurality of micro instructions for executing each sequence instruction 6 stored in the user program memory 3 are stored. Then, the address at which the head microinstruction in each sequence instruction 6 is stored, that is, the head address is specified by each sequence instruction 6.

【0039】その結果、マイクロプログラムメモリ20
から、命令レジスタ14に記憶されたシーケンス命令6
を構成する各マクロ命令が順番に読出されて命令選択回
路17へ送出される。
As a result, the microprogram memory 20
From the sequence instruction 6 stored in the instruction register 14
Are sequentially read out and sent to the instruction selection circuit 17.

【0040】命令選択回路17は、実行制御回路15か
らマイクロプログラムメモリ20の選択指令が印加され
ている期間において、マイクロプログラムメモリ20か
ら順次読出されるマイクロ命令を選択して、演算回路1
8へ送出する。
The instruction selection circuit 17 selects micro instructions sequentially read from the micro program memory 20 during the period when the selection instruction of the micro program memory 20 is applied from the execution control circuit 15 and the instruction selection circuit 17
8

【0041】また、命令選択回路17は、実行制御回路
15から命令レジスタ14の選択指令が印加されている
期間において、命令レジスタ14から順次読出されるマ
クロ命令9を選択して、演算回路18へ送出する。
The instruction selection circuit 17 selects the macro instructions 9 sequentially read from the instruction register 14 during the period when the instruction for selecting the instruction register 14 is applied from the execution control circuit 15 and sends the instruction to the arithmetic circuit 18. Send out.

【0042】次に、このように構成されたプログラマブ
ルコントローラの動作を説明する。 1) 通常動作時 この場合、ユーザプログラムメモリ3内には、図2に示
すように、このプログラマブルコントローラで実行する
制御を示す制御プログラムの各シーケンス命令6が順番
に記憶されている。
Next, the operation of the thus configured programmable controller will be described. 1) Normal operation In this case, in the user program memory 3, as shown in FIG. 2, each sequence instruction 6 of the control program indicating the control to be executed by the programmable controller is sequentially stored.

【0043】この場合、実行モードレジスタ19には
「通常動作モード」が設定されている。操作者が操作部
5を介して起動指令を入力すると、その起動指令はデー
タ入出力回路12を介して、命令レジスタ14へ取込ま
れる。そして、アドレスカウンタ11が起動して、アド
レスカウンタ11が指定するユーザプログラムメモリ3
内の先頭のシーケンス命令6が読取られて命令レジスタ
14に取込まれる。
In this case, the "normal operation mode" is set in the execution mode register 19. When the operator inputs a start command via the operation unit 5, the start command is taken into the command register 14 via the data input / output circuit 12. Then, the address counter 11 is activated, and the user program memory 3 designated by the address counter 11 is activated.
Is read and taken into the instruction register 14.

【0044】命令レジスタ14に先頭のシーケンス命令
6が取込まれると、このシーケンス命令6は命令デコー
ダ16でデコードされ、その結果に従って、実行制御回
路15の動作が決定され、シーケンス命令6を構成する
マイクロ命令がマイクロプログラムメモリ20から読出
され、命令選択回路17を経由して演算回路18へ送出
される。
When the first sequence instruction 6 is fetched into the instruction register 14, this sequence instruction 6 is decoded by the instruction decoder 16, and the operation of the execution control circuit 15 is determined according to the result, thereby constituting the sequence instruction 6. The microinstruction is read from the microprogram memory 20 and sent to the arithmetic circuit 18 via the instruction selection circuit 17.

【0045】演算回路18は内部データレジスタ13に
読取られている制御対象のプロセスデータに対して所定
の制御演算処理を実行して、その演算処理結果を内部デ
ータレジスタ13へ一旦書込む。内部データレジスタ1
3に一旦書込まれた演算処理結果はデータ入出力回路1
2経由で入出力ポート4を介して操作データとして制御
対象へ送出される。
The arithmetic circuit 18 executes a predetermined control arithmetic processing on the process data to be controlled, which is read by the internal data register 13, and temporarily writes the arithmetic processing result into the internal data register 13. Internal data register 1
The operation processing result once written in the data input / output circuit 3
The operation data is transmitted to the control object via the input / output port 4 via the input / output port 4.

【0046】演算回路18で一つのマイクロ命令が実行
される毎に実行制御回路15がマイクロプログラムアド
レスカウンタ21にカウントアップ信号を送出して、マ
イクロプログラムメモリ20に対して出力するアドレス
を更新する。
The execution control circuit 15 sends a count-up signal to the microprogram address counter 21 every time one microinstruction is executed by the arithmetic circuit 18 to update the address output to the microprogram memory 20.

【0047】よって、マイクロプログラムメモリ20に
記憶されてる該当シーケンス命令6を構成する各マイク
ロ命令が順次読出されて演算回路18で実行されてい
く。一つのシーケンス命令6に対する制御処理が終了す
ると、次のシーケンス命令6がユーザプログラムメモリ
3から読出されて、該当シーケンス命令6を構成する各
マイクロ命令がマイクロプログラムメモリ20から読出
されて順次実行される。
Accordingly, each microinstruction constituting the corresponding sequence instruction 6 stored in the microprogram memory 20 is sequentially read out and executed by the arithmetic circuit 18. When the control processing for one sequence instruction 6 is completed, the next sequence instruction 6 is read from the user program memory 3, and each micro instruction constituting the corresponding sequence instruction 6 is read from the micro program memory 20 and sequentially executed. .

【0048】このように、通常動作時には、シーケンス
演算CPU2のマイクロプログラムメモリ20に記憶さ
れている各マイクロ命令のみで制御プログラムが順次実
行されていく。
As described above, during the normal operation, the control program is sequentially executed only by each microinstruction stored in the microprogram memory 20 of the sequence operation CPU 2.

【0049】2) マイクロ命令の不具合時又はマイク
ロ命令の変更時 次に、マイクロプログラムメモリ20に記憶されている
各シーケンス命令を構成する各マイクロ命令に不具合が
生じたり、特定のマイクロ命令を変更した場合は、操作
者は、操作部5を操作して、図3に示すように、ユーザ
プログラムメモリ3内の該当マイクロ命令が所属するシ
ーケンス命令に代えて、拡張モード指示命令7、訂正後
の各マイクロ命令9及び通常モード指示命令8を書込
む。
2) At the time of malfunction of microinstruction or at the time of change of microinstruction Next, a malfunction occurred in each microinstruction constituting each sequence instruction stored in microprogram memory 20, or a specific microinstruction was changed. In this case, the operator operates the operation unit 5 to replace the sequence instruction to which the corresponding microinstruction in the user program memory 3 belongs with, as shown in FIG. The micro instruction 9 and the normal mode instruction instruction 8 are written.

【0050】この場合、このプログラマブルコントロー
ラの起動時には、実行モードレジス19には、「通常動
作モード」が設定されている。したがって、図3のユー
ザプログラムメモリ3内における1番目のシーケンス命
令6から4番目のシーケンス命令6までは、通常動作モ
ード設定時であるので、前述したように、マイクロプロ
グラムメモリ20に記憶された各マイクロ命令が順番に
実行される。
In this case, when the programmable controller is started, the “normal operation mode” is set in the execution mode register 19. Therefore, since the first sequence instruction 6 to the fourth sequence instruction 6 in the user program memory 3 of FIG. 3 are in the normal operation mode setting, as described above, each of the instructions stored in the micro program memory 20 is stored. Microinstructions are executed in order.

【0051】そして、5番目のシーケンス命令6の代り
に、拡張モード指示命令7が命令レジスタ14に取込ま
れると、動作モードレジスタ19の動作モードが「拡張
動作モード」に変更になり、実行制御回路15から命令
レジスタ14に対する選択指令が命令選択回路17へ印
加される。
When the extended mode instruction instruction 7 is fetched into the instruction register 14 instead of the fifth sequence instruction 6, the operation mode of the operation mode register 19 is changed to the "extended operation mode". A selection command for the instruction register 14 is applied from the circuit 15 to the instruction selection circuit 17.

【0052】そして、アドレスカウンタ11がユーザプ
ログラムメモリ3内の拡張モード指示命令7の次のアド
レスのマイクロ命令9を指定すると、このマイクロ命令
9は命令レジスタ14及び命令選択回路17を介して演
算回路18へ入力される。したがって、演算回路18は
ユーザプログラムメモリ3から読出されたマイクロ命令
9を実行する。
When the address counter 11 designates the microinstruction 9 at the address next to the extension mode instruction instruction 7 in the user program memory 3, the microinstruction 9 is sent to the arithmetic circuit via the instruction register 14 and the instruction selection circuit 17. 18 is input. Therefore, the arithmetic circuit 18 executes the microinstruction 9 read from the user program memory 3.

【0053】一つのマイクロ命令9の実行が終了する
と、実行制御回路15はアドレスカウンタ11へカウン
トアップ信号を送出するので、アドレスカウンタ11が
次のマイクロ命令9を指定する。このようにして、ユー
ザプログラムメモリ3内の各マイクロ命令9を順番に実
行していく。
When the execution of one microinstruction 9 is completed, the execution control circuit 15 sends a count-up signal to the address counter 11, so that the address counter 11 specifies the next microinstruction 9. In this way, each microinstruction 9 in the user program memory 3 is sequentially executed.

【0054】そして、アドレスカウンタ11が通常モー
ド指示指令8を指定すると、この通常モード指示指令8
は命令レジスタ14へ取込まれる。その結果、動作モー
ドレジスタ19の動作モードが「拡張動作モード」から
「通常動作モード」へ変更される。そして、実行制御回
路15からマイクロプログラムメモリ20に対する選択
指令が命令選択回路17へ印加される。
When the address counter 11 specifies the normal mode instruction command 8, the normal mode instruction command 8
Is taken into the instruction register 14. As a result, the operation mode of the operation mode register 19 is changed from the “extended operation mode” to the “normal operation mode”. Then, a selection command for the microprogram memory 20 is applied from the execution control circuit 15 to the instruction selection circuit 17.

【0055】したがって、これ以降、マイクロプログラ
ムメモリ20から読出された各マイクロ命令が命令選択
回路17を介して演算回路18へ入力される。すなわ
ち、ユーザプログラムメモリ3内の6番目以降の各シー
ケンス命令6はマイクロプログラムメモリ20に記憶さ
れた各マイクロ命令によって実行される。
Therefore, thereafter, each microinstruction read from the microprogram memory 20 is input to the arithmetic circuit 18 via the instruction selection circuit 17. That is, each of the sixth and subsequent sequence instructions 6 in the user program memory 3 is executed by each micro instruction stored in the micro program memory 20.

【0056】このように、例えばLSI等の事実上のハ
ードウェアで形成されたマイクロプログラムメモリ20
内に記憶されたマイクロ命令に不具合が生じたり、マイ
クロ命令の一部を変更する必要が生じた場合は、修正後
又は変更後のマイクロ命令9を外部のユーザプログラム
メモリ3内に、拡張モード指示命令7と通常モード指示
命令8との間に挿入して設定することによって、自動的
に修正後又は変更後のマイクロ命令9を実行できる。
As described above, for example, the microprogram memory 20 formed of virtual hardware such as an LSI is used.
If the micro-instruction stored in the micro-instruction becomes defective or a part of the micro-instruction needs to be changed, the modified or changed micro-instruction 9 is stored in the external user program memory 3 in the extended mode instruction. By inserting and setting between the instruction 7 and the normal mode instruction instruction 8, the modified or changed micro instruction 9 can be automatically executed.

【0057】3) 全く別の制御プログラムを実行させ
る時 シーケンス演算CPU2内のマイクロプログラムメモリ
20内に記憶された複数のマイクロ命令かららな制御プ
ログラムを使用しないで、全く別の制御プログラムを使
用して、このプログラマブルコントローラを稼働する必
要が生じる場合がある。
3) When a completely different control program is executed. A completely different control program is used without using a control program consisting of a plurality of microinstructions stored in the microprogram memory 20 in the sequence operation CPU 2. Therefore, it may be necessary to operate this programmable controller.

【0058】この場合、図4に示すように、操作者は、
操作部5を介して、ユーザプログラムメモリ3内に、実
行すべき別の制御プログラムを構成する複数のマイクロ
命令9を書込む。
In this case, as shown in FIG.
A plurality of microinstructions 9 constituting another control program to be executed are written into the user program memory 3 via the operation unit 5.

【0059】さらに、実行モードレジスタ19に対し
て、電気信号である外部設定信号を印加して、動作モー
ドを強制的に「拡張動作モード」に設定する。したがっ
て、命令レジスタ14にいかなるモード指定命令が取込
まれようと、実行モードレジスタ19の動作モードは
「拡張動作モード」を維持する。よって、命令選択回路
17は常に、ユーザプログラムメモリ3から命令レジス
タ14に取込まれた各マイクロ命令9を選択して演算回
路18へ送出する。
Further, an external setting signal which is an electric signal is applied to the execution mode register 19 to forcibly set the operation mode to the "extended operation mode". Therefore, the operation mode of the execution mode register 19 maintains the "extended operation mode" regardless of what mode designation instruction is taken into the instruction register 14. Therefore, the instruction selecting circuit 17 always selects each microinstruction 9 taken into the instruction register 14 from the user program memory 3 and sends it to the arithmetic circuit 18.

【0060】このように設定されたプログラマブルコン
トローラを起動すると、操作部5から起動命令が命令レ
ジス14へ取込まれて、アドレスカウンタ11が起動し
て、図4に示すユーザプログラムメモリ3に記憶されて
いる各マイクロ命令9を順番に指定していく。アドレス
カウンタ11で順番に指定された各マイクロ命令9は命
令レジスタ14及び命令選択回路17を介して演算回路
18へ順次入力される。
When the programmable controller set in this way is started, a start command is taken from the operation unit 5 into the command register 14, and the address counter 11 is started and stored in the user program memory 3 shown in FIG. Are designated in order. Each microinstruction 9 specified in order by the address counter 11 is sequentially input to the arithmetic circuit 18 via the instruction register 14 and the instruction selection circuit 17.

【0061】演算回路18は入力されたユーザプログラ
ムメモリ3から読出された各マイクロ命令9を順番に実
行していく。このように、例えば、小型のプログラマブ
ルコントローラにおいて,マイクロプログラムメモリ2
0自体を省略したい場合には,実行モードレジスタ19
ヘの拡張モード指示をソフト的な命令ではなく、固定し
た電気信号からなる外部設定信号にて動作モードを強制
的に「拡張動作モード」に設定可能としている。
The arithmetic circuit 18 sequentially executes the input microinstructions 9 read from the user program memory 3. Thus, for example, in a small programmable controller, the microprogram memory 2
To omit 0 itself, the execution mode register 19
The operation mode can be forcibly set to the "extended operation mode" by an external setting signal consisting of a fixed electric signal instead of a software instruction for the extended mode instruction.

【0062】したがって、プログラムコントローラの起
動時点から各マイクロ命令9をユーザプログラムメモリ
3から読出すように構成することか可能であるので、シ
ーケンス命令6の種類が少ない場合で、かつシーケンス
演算CPU2の回路規模を大きくしたくない用途に有効
である。
Therefore, it is possible to read each microinstruction 9 from the user program memory 3 from the start of the program controller. Therefore, when there are few types of sequence instructions 6 and the circuit of the sequence operation CPU 2 This is effective for applications where you do not want to increase the scale.

【0063】4) 追加のプログラムを実行させる時
(その1) たとえ、シーケンス演算CPU2内に組込まれているマ
イクロプログラムメモリ20に記憶されている制御プロ
グラムを構成する各マイクロ命令が正常であっても、さ
らに別の制御プログラムをこのプログラマブルコントロ
ーラで実行したい場合がある。
4) When an Additional Program is Executed (Part 1) Even if each microinstruction constituting the control program stored in the microprogram memory 20 incorporated in the sequence operation CPU 2 is normal. In some cases, it is desired to execute another control program using this programmable controller.

【0064】このような場合、図5に示すように、ユー
ザプログラムメモリ3内の既に書込まれている制御プロ
グラムの1番から9番までの各シーケンス命令6の後
に、今回追加する制御プログラムの各マイクロ命令9を
前後に拡張モード指示命令7及び通常モード指示命令8
を挟んで書込む。
In such a case, as shown in FIG. 5, after each of the sequence instructions 6 from 1 to 9 of the already written control program in the user program memory 3, the control program to be added this time is An extended mode instruction instruction 7 and a normal mode instruction instruction 8 before and after each micro instruction 9
Write across.

【0065】このように、ユーザプログラムメモリ3に
追加の制御プログラムの各マイクロ命令9を書込んだ状
態で、このプログラマブルコントローラを起動すると、
前述したマイクロ命令の不具合時又はマイクロ命令の変
更時と同様の手順で、1番目から9番目までの各シーケ
ンス命令6が実行された後に、今回追加した制御プログ
ラムの各マイクロ命令9が実行される。
As described above, when the programmable controller is started in a state where each micro instruction 9 of the additional control program is written in the user program memory 3,
After the first to ninth sequence instructions 6 are executed in the same procedure as when the micro instruction is defective or the micro instruction is changed, each micro instruction 9 of the control program added this time is executed. .

【0066】なお、この追加の制御プログラムの各マイ
クロ命令9をユーザプログラムメモリ3の先頭部分に書
込むと、この追加の制御プログラムが実行された後に、
既に設定されている制御プログラムが実行される。
When each microinstruction 9 of the additional control program is written at the head of the user program memory 3, after the additional control program is executed,
The already set control program is executed.

【0067】このように、追加の制御プログラムのユー
ザプログラムメモリ3内における書込み位置を調整する
ことによって、任意のタイミングでこの追加の制御プロ
グラムを実行させることができる。
As described above, by adjusting the write position of the additional control program in the user program memory 3, the additional control program can be executed at an arbitrary timing.

【0068】従来のプログラマブルコントローラにおい
ては、制御プログラムの内容に不具合がない場合で新た
に制御プログラムを追加したり、シーケンス命令を拡張
したい場合においては、シーケンス演算CPU2を設計
しなおすか、シーケンス命令6を組合わせて新機能を実
現する必要があった。
In the conventional programmable controller, if there is no problem in the contents of the control program and a new control program is to be added, or if it is desired to extend the sequence instruction, the sequence operation CPU 2 must be redesigned or the sequence instruction 6 Had to be combined to realize new functions.

【0069】しかし、この実施形態のプログラマブルコ
ントローラにおいては、必要な制御プログラムや必要な
シーケンス命令6のマイクロ命令9をユーザプログラム
メモリ3内の実行したいタイミング位置に新規に書込む
ことによって、容易にプログラマブルコントローラの機
能を拡張することが可能である。
However, in the programmable controller of this embodiment, the necessary control program and the microinstruction 9 of the required sequence instruction 6 are newly written at the timing position to be executed in the user program memory 3 so that the programmable controller can be easily programmed. It is possible to extend the function of the controller.

【0070】5) 追加のプログラムを実行させる時
(その2) この場合、このプログラマブルコントローラのメーカが
マイクロプログラムメモリ20の各マイクロ命令及びユ
ーザプログラムメモリ3の各シーケンス命令をユーザに
対して予め公開しておく。
5) When Executing Additional Program (No. 2) In this case, the manufacturer of this programmable controller previously discloses each microinstruction of the microprogram memory 20 and each sequence instruction of the user program memory 3 to the user. Keep it.

【0071】上述の新規プログラムの実行手法と同様に
して、このプログラマブルコントローラのユーザが追加
の制御プログラムを実行させる場合に、ユーザが自由に
新規の制御プログラムをユーザプログラム3上で作成す
ることも可能となると同時に、この新規の制御プログラ
ムを構成する複数のシーケンス命令のなかに、既にメー
カが作成してユーザプログラムメモリ3内に設定済みの
シーケンス命令6が存在する場合は、このシーケンス命
令6の各マイクロ命令をサブルーチン形式でマイクロプ
ログラムメモリ20から呼出すよように記載することも
可能である。
When the user of this programmable controller executes an additional control program in the same manner as the above-described method of executing a new program, the user can freely create a new control program on the user program 3. At the same time, if there is a sequence instruction 6 created by the manufacturer and set in the user program memory 3 among the plurality of sequence instructions constituting the new control program, each of the sequence instructions 6 It is also possible to write a microinstruction to be called from the microprogram memory 20 in a subroutine format.

【0072】このようにサブルーチン形式でマイクロプ
ログラムメモリ20に既に記憶されている各マイクロ命
令を利用できるので、ユーザプログラムメモリ3内に重
複してマイクロ命令を書込む必要がなくなり、プログラ
マブルコントローラの資源をより有効に活用できる。
As described above, since each microinstruction already stored in the microprogram memory 20 can be used in the form of a subroutine, there is no need to write the microinstruction in the user program memory 3 redundantly. Can be used more effectively.

【0073】[0073]

【発明の効果】以上説明したように、本発明のプログラ
マブルコントローラによれば,マイクロ命令の命令実行
部の前段にマイクロプログラムメモリから読出されたマ
イクロ命令とユーザプログラムメモリから読出されたマ
イクロ命令とを選択する手段を設けている。
As described above, according to the programmable controller of the present invention, the microinstruction read from the microprogram memory and the microinstruction read from the user program memory are provided before the instruction execution unit of the microinstruction. A means for selecting is provided.

【0074】したがって、たとえマイクロプログラムメ
モリがLSI等の実質的ハードウェアで構成されていた
としても、このプログラマブルコントローラで実行され
るプログラムの実質的内容を簡単に変更及び追加でき
る。
Therefore, even if the microprogram memory is constituted by substantial hardware such as an LSI, the substantial contents of the program executed by the programmable controller can be easily changed and added.

【0075】また、マイクロプログラムメモリに記憶さ
れたマイクロ命令に不具合があったとき,又はマイクロ
命令の内容を変更したいときも、容易にマイクロ命令の
実行内容を変更可能である。
Further, when there is a defect in the microinstruction stored in the microprogram memory or when it is desired to change the content of the microinstruction, the execution content of the microinstruction can be easily changed.

【0076】さらに、動作モードの変更を外部からの電
気信号で実行することにより,常に外部のユーザプログ
ラムメモリからマイクロ命令を読込むことによりマイク
ロプログラムメモリを削除することも可能である。
Further, by changing the operation mode with an external electric signal, the microprogram memory can be deleted by always reading the microinstruction from the external user program memory.

【0077】また,マイクロプログラムメモリに記憶さ
れているプログラムに対して追加のプログラムが必要に
なった場合にも,この追加のプログラムの各マイクロ命
令をユーザプログラムメモリに書込むようにしている。
When an additional program is required for the program stored in the microprogram memory, each microinstruction of the additional program is written in the user program memory.

【0078】したがって、簡単にこのプログラマブルコ
ントローラで実行されるプログラム数を増加できる。ま
た、ユーザプログラムメモリに対して、プログラムをサ
ブルーチン形式で書込むことによつて、ユーザプログラ
ムメモリ3内に重複してマイクロ命令を書込む必要がな
くなり、プログラマブルコントローラの資源をより有効
に活用できる。
Therefore, the number of programs executed by the programmable controller can be easily increased. Further, by writing the program in the user program memory in a subroutine format, there is no need to write the microinstruction in the user program memory 3 in duplicate, and the resources of the programmable controller can be more effectively utilized.

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

【図1】 本発明の一実施形態のプログラマブルコント
ローラの概略構成を示すブロック図
FIG. 1 is a block diagram showing a schematic configuration of a programmable controller according to an embodiment of the present invention.

【図2】 同プログラマブルコントローラのユーザプロ
グラムメモリの記憶内容を示す図
FIG. 2 is a diagram showing contents stored in a user program memory of the programmable controller;

【図3】 同じく同プログラマブルコントローラのユー
ザプログラムメモリの記憶内容を示す図
FIG. 3 is a diagram showing storage contents of a user program memory of the same programmable controller.

【図4】 同じく同プログラマブルコントローラのユー
ザプログラムメモリの記憶内容を示す図
FIG. 4 is a diagram showing storage contents of a user program memory of the same programmable controller.

【図5】 同じく同プログラマブルコントローラのユー
ザプログラムメモリの記憶内容を示す図
FIG. 5 is a diagram showing storage contents of a user program memory of the same programmable controller.

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

1…外部バス 2…シーケンス演算CPU 3…ユーザプログラムメモリ 4…入出力ポート 5…操作部 6…シーケンス命令 7…拡張モード指示命令 8…通常モード指示命令 9…マイクロ命令 10…内部バス 11…アドレスカウンタ 12…データ入出力回路 13…内部データレジスタ 14…命令レジスタ 15…実行制御回路 16…命令デコーダ 17…命令選択回路 18…演算回路 19…実行モードレジスタ 20…マイクロプログラムメモリ 21…マイクロプログラムアドレスカウンタ DESCRIPTION OF SYMBOLS 1 ... External bus 2 ... Sequence calculation CPU 3 ... User program memory 4 ... I / O port 5 ... Operation unit 6 ... Sequence instruction 7 ... Extended mode instruction instruction 8 ... Normal mode instruction instruction 9 ... Micro instruction 10 ... Internal bus 11 ... Address Counter 12 Data input / output circuit 13 Internal data register 14 Instruction register 15 Execution control circuit 16 Instruction decoder 17 Instruction selection circuit 18 Operation circuit 19 Execution mode register 20 Micro program memory 21 Micro program address counter

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 実行すべきプログラムのマイクロ命令を
記憶するマイクロプログラムメモリと、 入力されたマイクロ命令を実行する命令実行手段と、 プログラムの実行モードを指示する実行モード指示手段
と、 この指示された実行モードに基づいて前記マイクロプロ
グラムメモリ又はユーザプログラムメモリから読出され
たマイクロ命令を前記命令実行手段へ与える命令選択手
段とを備えたプログラマブルコントローラ。
1. A microprogram memory for storing a microinstruction of a program to be executed, an instruction execution unit for executing an input microinstruction, an execution mode instructing unit for instructing an execution mode of a program, An instruction selecting means for providing a microinstruction read from the microprogram memory or the user program memory to the instruction executing means based on an execution mode.
【請求項2】 前記ユーザプログラムメモリに対して前
記マイクロプログラムメモリに書込まれた不具合マイク
ロ命令又は変更すべきマイクロ命令に対する正しいマイ
クロ命令を書込むマイクロ命令書込手段を備え、 前記実行モード指示手段は、ユーザプログラムメモリか
ら読出されたマイクロ命令を選択する実行モードを指示
することを特徴とする請求項1記載のプログラマブルコ
ントローラ。
2. An execution mode instructing means, comprising: micro instruction writing means for writing a defective micro instruction written in the micro program memory or a correct micro instruction for a micro instruction to be changed in the user program memory. 2. The programmable controller according to claim 1, wherein said instruction indicates an execution mode for selecting a microinstruction read from a user program memory.
【請求項3】 前記ユーザプログラムメモリに前記マイ
クロプログラムメモリに記憶されたプログラムとは異な
る別のプログラムのマイクロ命令を書込む別プログラム
書込手段を設け、 前記実行モード指示手段は、外部から入力された電気信
号に基づいて強制的に、ユーザプログラムメモリから読
出されたマイクロ命令を選択する実行モードを指示する
ことを特徴とする請求項1記載のプログラマブルコント
ローラ。
3. A separate program writing means for writing a microinstruction of another program different from the program stored in the microprogram memory into the user program memory, wherein the execution mode instruction means is externally input. 2. The programmable controller according to claim 1, wherein an execution mode for selecting a microinstruction read from the user program memory is forcibly instructed based on the electric signal.
【請求項4】 前記ユーザプログラムメモリに前記マイ
クロプログラムメモリに記憶されたプログラムに対する
追加のプログラムのマイクロ命令を書込む追加プログラ
ム書込手段を設け、 前記実行モード指示手段は、ユーザプログラムメモリに
記憶された追加のプログラムの読出開始に応じて、ユー
ザプログラムメモリから読出されたマイクロ命令を選択
する実行モードを指示し、ユーザプログラムメモリに記
憶された追加のプログラムの読出終了に応じて、マイク
ロプログラムメモリから読出されたマイクロ命令を選択
する実行モードを指示することを特徴とする請求項1記
載のプログラマブルコントローラ。
4. An additional program writing means for writing a micro instruction of an additional program to a program stored in the micro program memory in the user program memory, wherein the execution mode instruction means is stored in the user program memory. In response to the start of reading of the additional program, an execution mode for selecting a microinstruction read from the user program memory is designated, and in response to completion of reading of the additional program stored in the user program memory, the execution mode is selected. 2. The programmable controller according to claim 1, wherein an execution mode for selecting the read microinstruction is indicated.
【請求項5】 前記追加プログラム書込手段は、前記ユ
ーザプログラムメモリに前記追加のプログラムのマイク
ロ命令を書込むに際して、マイクロ命令の前と後に開始
情報及び終了情報を書込み、 前記実行モード指示手段は、前記開始情報及び終了情報
で追加のプログラムの読出開始及び読出終了を検知する
ことを特徴とする請求項4記載のプログラマブルコント
ローラ。
5. The method according to claim 1, wherein the additional program writing means writes start information and end information before and after the microinstruction when writing the microinstruction of the additional program in the user program memory. 5. The programmable controller according to claim 4, wherein the start information and the read end of the additional program are detected based on the start information and the end information.
【請求項6】 前記追加プログラム書込手段は、前記ユ
ーザプログラムメモリに前記追加のプログラムのマイク
ロ命令を書込むに際して、この追加プログラムを構成す
る複数のマイクロ命令のうち既にマイクロプログラムメ
モリに記憶さされているマイクロ命令に対しては、該当
マイクロ命令をサブルーチンでマイクロプログラムメモ
リから呼出す形式で書込むことを特徴とする請求項4記
載のプログラマブルコントローラ。
6. The additional program writing means, when writing a micro instruction of the additional program in the user program memory, has already been stored in the micro program memory among a plurality of micro instructions constituting the additional program. 5. The programmable controller according to claim 4, wherein said microinstruction is written in a form called from a microprogram memory in a subroutine by a subroutine.
JP24284197A 1997-09-08 1997-09-08 Programmable controller Expired - Lifetime JP3512989B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24284197A JP3512989B2 (en) 1997-09-08 1997-09-08 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24284197A JP3512989B2 (en) 1997-09-08 1997-09-08 Programmable controller

Publications (2)

Publication Number Publication Date
JPH1185223A true JPH1185223A (en) 1999-03-30
JP3512989B2 JP3512989B2 (en) 2004-03-31

Family

ID=17095098

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24284197A Expired - Lifetime JP3512989B2 (en) 1997-09-08 1997-09-08 Programmable controller

Country Status (1)

Country Link
JP (1) JP3512989B2 (en)

Also Published As

Publication number Publication date
JP3512989B2 (en) 2004-03-31

Similar Documents

Publication Publication Date Title
JP3563768B2 (en) ROM program change device
JP3512989B2 (en) Programmable controller
JP3055999B2 (en) Microprogram control device group
JP4609702B2 (en) Data processing system and control method thereof
JPH0353321A (en) Information processor
JPH0751610Y2 (en) Programmable controller with override function
JPH02199535A (en) Microprogram control
JPS5899843A (en) Condition branching device of microprogram
JP5088566B2 (en) PLC with interrupt function
JPH0552961B2 (en)
JPS616704A (en) Programmable controller
JPS595931B2 (en) Address stop method for arithmetic processing system
JPH05313915A (en) Microcomputer
JPH04109334A (en) Program changing device
JPS63159935A (en) Data processor
JPH04107630A (en) Central processing unit
JPH09198245A (en) Digital signal processor
JPS6184737A (en) Integrated circuit device
JPH0158522B2 (en)
JPH0630056B2 (en) Signal processor
JPS59151241A (en) Data processing device
JPH02143328A (en) Micro-program control device
JPH04369723A (en) Micro program controller
JPH02216531A (en) Control circuit for micro program
JPS6113612B2 (en)

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040106

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040108

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

Free format text: PAYMENT UNTIL: 20080116

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090116

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100116

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110116

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120116

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130116

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130116

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140116

Year of fee payment: 10

EXPY Cancellation because of completion of term