JPH0685123B2 - Programmable controller - Google Patents
Programmable controllerInfo
- Publication number
- JPH0685123B2 JPH0685123B2 JP1192386A JP1192386A JPH0685123B2 JP H0685123 B2 JPH0685123 B2 JP H0685123B2 JP 1192386 A JP1192386 A JP 1192386A JP 1192386 A JP1192386 A JP 1192386A JP H0685123 B2 JPH0685123 B2 JP H0685123B2
- Authority
- JP
- Japan
- Prior art keywords
- address
- processing
- program
- instruction
- register
- 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 - Lifetime
Links
Landscapes
- Executing Machine-Instructions (AREA)
- Programmable Controllers (AREA)
Description
【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、プログラマブルコントローラに関し特に、同
一の制御を要求する複数の制御対象を制御するのに好適
なプログラマブルコントローラに関する。TECHNICAL FIELD The present invention relates to a programmable controller, and more particularly to a programmable controller suitable for controlling a plurality of control targets that require the same control.
従来のプログラマブルコントローラを第2図に示す。プ
ログラマブルコントローラは、プログラムを読出し処理
する論理演算部1と、プログラムを記憶しているプログ
ラムメモリ2と各種のデータを記憶しているデータメモ
リ3と、制御対象9〜13と接続するための入出力装置4
〜8から構成される。A conventional programmable controller is shown in FIG. The programmable controller is a logical operation unit 1 for reading and processing a program, a program memory 2 for storing the program, a data memory 3 for storing various data, and an input / output for connecting to the controlled objects 9 to 13. Device 4
-8.
論理演算部1の内部は、更に発振回路20、制御回路21、
マルチプレクサ23,37、退避レジスタ23、プログラムカ
ウンタ24、複数のアドレス修飾用レジスタ(インデツク
スレジスタともいう)36、切換スイツチ28,29、演算回
路30、アキユムレータ31、アドレスレジスタ32、命令レ
ジスタ33から構成され、更に命令レジスタ33は、命令コ
ード部(OP)、レジスタ指定部(IX)、番地部(ADDR)
から成つている。Inside the logic operation unit 1, an oscillation circuit 20, a control circuit 21,
Multiplexer 23, 37, save register 23, program counter 24, a plurality of address modification registers (also called index registers) 36, switching switches 28, 29, arithmetic circuit 30, accumulator 31, address register 32, instruction register 33 Further, the instruction register 33 has an instruction code part (OP), a register designating part (IX), and an address part (ADDR).
It consists of.
このようなプログラマブルコントローラにおいて、通常
アドレス修飾をしてプログラムメモリ2からの命令を実
行する。アドレス修飾とは、命令語内の番地部の内容よ
り実行アドレス(その命令に対し、論理演算部(CPU)
が実際にデータのやりとりを行うアドレス)を求め、命
令コード部の内容にしたがつてその実行アドレスをアク
セスして処理を行なう際に、実行アドレスを番地部の内
容と論理演算部内のレジスタ(インデツクスレジスタ)
の内容とでハード的に演算して求めることをいう。In such a programmable controller, the address from the program memory 2 is normally executed by modifying the address. Address modification is the execution address (the logical operation unit (CPU) for the instruction) based on the contents of the address part in the instruction word.
Determine the address at which data is actually exchanged and access the execution address according to the contents of the instruction code part to perform processing, the execution address is changed to the contents of the address part and the register (index) in the logical operation part. TX Register)
It means to calculate by hardware with the contents of.
このようなアドレス修飾は、プログラマブルコントロー
ラに限らずプログラムの小容量化を図るための必須技術
であり、たとえば、あるエリアの複数のデータを別のエ
リアに移動する場合、アドレス修飾を用いなければ、全
ての移動元アドレスおよび移動先アドレスを、プログラ
ム中に1つずつ指定しなければならないため、プログラ
ム容量が増大してしまい、移動データ語数によつてプロ
グラム容量が変わる。Such address modification is an essential technique for reducing the capacity of programs, not limited to programmable controllers. For example, when moving multiple data in one area to another area, if address modification is not used, Since all the move source addresses and move destination addresses must be specified one by one in the program, the program capacity increases, and the program capacity changes depending on the number of move data words.
しかし、アドレス修飾を用いれば、移動元アドレスを移
動先アドレスを2本のレジスタに格納して1回の移動処
理後にそれらのレジスタの内容を1ずつインクリメント
する。この処理を必要回数繰り返えせば全データの移動
ができる。したがつてこの場合は、1回の移動処理プロ
グラムとレジスタのインクリメントプログラムと、必要
回数で終了するプログラムの3つのプラグラムですみ、
プログラム容量を少なくすることができる。しかも移動
データ語数によつてプログラムの容量は変わらない。However, if the address modification is used, the move source address is stored in the two destination registers, and the contents of those registers are incremented by one after one move process. All the data can be moved by repeating this process a required number of times. Therefore, in this case, only three programs, one movement processing program, register increment program, and program that ends at the required number of times,
The program capacity can be reduced. Moreover, the capacity of the program does not change depending on the number of moved data words.
第2図に示したプログラムマブルコントローラはアドレ
ス修飾用に使用できるインデツクスレジスタを複数有し
ており、ワード処理およびビツト処理双方の処理が可能
であるが、命令のレジスタ指定部(IX)にてアドレス修
飾用レジスタをプログラム上特定する必要があつた。The programmable controller shown in FIG. 2 has a plurality of index registers that can be used for address modification, and is capable of both word processing and bit processing. It was necessary to specify the address modification register in the program.
尚、プログラマブルコントローラにおけるアドレス修飾
用レジスタに関するものとしては、特開昭52−122786号
公報等が挙げられる。Note that Japanese Patent Application Laid-Open No. 52-122786 and the like can be cited as examples of the address modification register in the programmable controller.
上記従来技術では、ワード処理およびビツト処理の各々
の処理およびワード処理とビツト処理の両処理を含んだ
処理において、処理プログラムの作成者は、アドレス修
飾を必要とする前記の各々の処理における処理プログラ
ムを作成する場合、どのアドレス修飾用レジスタを用い
てアドレスを修飾するのか、常に意識していなければな
らなかつた。特に、ワード処理とビツト処理の両処理を
含んだ処理において、前記の各々の処理におけるアドレ
ス修飾量が異なる場合には同一レジスタによるアドレス
修飾ができないため、該処理プログラムの作成は困難で
あつた。In the above-mentioned prior art, in the processing including the word processing and the bit processing, and the processing including both the word processing and the bit processing, the creator of the processing program requires the processing program in each of the above-mentioned processing that requires address modification. When creating, it was necessary to always be aware of which address modification register was used to modify the address. In particular, in the processing including both word processing and bit processing, when the address modification amount in each of the above-mentioned processings is different, the address modification by the same register cannot be performed, so that it is difficult to create the processing program.
本発明の目的は、処理プログラムの作成において作成者
がワード処理あるいはビツト処理におけるアドレス修飾
レジスタを意識しなくてすむようにしたことと、アドレ
ス修飾を必要とするワード処理とビツト処理の両処理を
含んだ処理プログラムの作成を容易にしたプログラマブ
ルコントローラを提供することにある。An object of the present invention is that the creator does not need to be aware of the address modification register in word processing or bit processing in creating a processing program, and includes both word processing and bit processing that require address modification. It is to provide a programmable controller that facilitates the creation of a processing program.
上記目的は、お互いが独立しているワード処理専用のア
ドレス修飾レジスタとビツト処理専用のアドレス修飾レ
ジスタの2本のレジスタと、ワード処理命令およびビツ
ト処理命令の各々の命令コード部にアドレス修飾レジス
タを用いるか否かを示すビツトと、該ビツトによりワー
ド処理用のアドレス修飾レジスタを用いるか、ビツト処
理用のアドレス修飾レジスタを用いるか、あるいは前記
の両レジスタとも用いないかを選択するマルチプレクサ
を新たに設けることによりアドレス修飾用レジスタの自
動選択が可能となる。The above object is to provide two registers, an address modification register dedicated to word processing and an address modification register dedicated to bit processing, which are independent of each other, and an address modification register to each instruction code part of the word processing instruction and the bit processing instruction. A bit indicating whether to use it and a multiplexer for selecting whether to use the address modification register for word processing, the address modification register for bit processing, or neither of the above registers by the bit are newly added. By providing it, it becomes possible to automatically select the register for address modification.
本発明により、新たに設けたワード処理用アドレス修飾
レジスタとビツト処理用アドレス修飾レジスタに、アド
レス修飾を必要とするワード処理命令あるいはビツト処
理命令を実行する前に、前記の各々の処理におけるアド
レス修飾量を格納する。マルチプレクサが、プログラム
メモリから命令を取込み、該命令の命令コード部にあ
る、アドレス修飾レジスタを用いるか否かを示すビツト
より、ワード処理用アドレス修飾レジスタを用いるが、
ビツト処理用アドレス修飾レジスタを用いるか、あるい
は前記の両レジスタを用いないかを選択して判断した時
に、プログラムメモリから取込んだ命令の番地部と、選
択された前記アドレス修飾レジスタに格納されているア
ドレス修飾量あるいはアドレス修飾をしない場合は0と
を加算して、ワード処理命令あるいはビツト処理命令の
実行時のオペラントアドレスとする。According to the present invention, before the word processing instruction or bit processing instruction requiring the address modification is executed in the newly provided word processing address modification register and bit processing address modification register, the address modification in each of the above processes is executed. Store the quantity. The multiplexer fetches an instruction from the program memory and uses the word processing address modification register from the bit in the instruction code section of the instruction indicating whether to use the address modification register.
When it is determined by selecting whether to use the bit processing address modification register or not to use both the above registers, the address part of the instruction fetched from the program memory and the selected address modification register are stored. If the address modification amount or the address modification is not performed, 0 is added to obtain the operant address when the word processing instruction or the bit processing instruction is executed.
それによつて、アドレス修飾レジスタの自動選択が可能
となるため、従来プログラム作成者が作成時に行つてい
たワード処理およびビツト処理におけるアドレス修飾レ
ジスタの指定が不要となり、アドレス修飾を必要とする
前記の各々の処理における処理プログラムの作成が容易
にできるようになる。As a result, since the address modification register can be automatically selected, it is not necessary to specify the address modification register in the word processing and the bit processing, which is conventionally performed by the program creator at the time of creation, and the address modification described above is required. It becomes easy to create a processing program for each processing.
以下、本発明の一実施例を第1図により説明する。プロ
グラマブルコントローラは、プログラムを読出し処理す
る論理演算部1と、プログラムを記憶しているプログラ
ムメモリ2と、各種のデータを記憶しているデータメモ
リ3と、制御対象9〜13と接続する入出力装置4〜8か
ら構成される。An embodiment of the present invention will be described below with reference to FIG. The programmable controller is a logical operation unit 1 that reads and processes a program, a program memory 2 that stores the program, a data memory 3 that stores various data, and an input / output device that is connected to the control targets 9 to 13. It is composed of 4-8.
論理演算部1の内部は更に、発振回路20、制御回路21、
マルチプレクサ22,27、退避レジスタ23、プログラムカ
ウンタ24、ワード処理用アドレス修飾レジスタ25、ビツ
ト処理用アドレス修飾レジスタ26、切換スイツチ28,2
9、演算回路30、アキユムレータ32、アドレスレジスタ3
2、命令レジスタ33から成つており、更に命令レジスタ3
3は、命令コード部34と番地部35から成つている。Inside the logic operation unit 1, an oscillation circuit 20, a control circuit 21,
Multiplexers 22, 27, save register 23, program counter 24, address modification register 25 for word processing, address modification register 26 for bit processing, switching switches 28, 2
9, arithmetic circuit 30, accumulator 32, address register 3
2. It consists of instruction register 33, and further instruction register 3
3 comprises an instruction code section 34 and an address section 35.
第3図は、本発明によるプログラマブルコントローラの
命令の一例である。該命令のうちAND,OR,EORはビツト処
理において、アドレス修飾しないで論理積,論理和,排
他的論理和を求める命令で、ANDA,ORA,EORAは、前記AN
D,OR,EOR命令をアドレス修飾して用いる場合の命令であ
る。INB,OUTBは、ビツト処理におけるアドレス修飾しな
い入出力命令で、INBA,OUTBAはアドレス修飾する入出力
命令である。ADD,SUB,MUL,DIVはワード処理におけるア
ドレス修飾しない四則演算命令で、ADDA,SUBA,MULA,DIV
Aは、アドレス修飾する四則演算命令である。INW,OUTW
はワード処理におけるアドレス修飾しない入出力命令
で、INWA,OUTWAはアドレス修飾する入出力命令である。
COM命令は、アキユムレータ31の内容の補数を求めアキ
ユムレータ31に格納する命令である。JMP(無条件JUM
P)、JTC(条件付JUMP)の2つの命令は、プログラムカ
ウンタ24の内容を変更する命令であり、無条件JUMP命令
では該命令の番地部がプログラムカウンタ24に格納さ
れ、条件付JUMP命令では、該条件付JUMP命令に設定した
条件が成立した時のみ該命令の番地部がプログラムカウ
ンタ24に格納され、成立しない場合は、プログラムカウ
ンタ24の内容を1つ歩進する。無条件および条件付CALL
命令も、前記の2つのJUMP命令と同様、プログラムカウ
ンタ24の内容を変更する命令であるが、CALL命令では、
プログラムカウンタ24の内容か退避レジスタ23に退避さ
れる。また、RET命令は退避レジスタ23に退避されてい
るプログラムカウンタ24の内容を復帰させる命令であ
り、CALL命令とを組合せで、サブルーチンの使用に用い
る。WAS命令は、ワード処理用アドレス修飾レジスタ25
にワード処理におけるアドレス修飾量を格納する命令で
あり、WAS命令実行後のアドレス修飾を必要とするワー
ド処理命令の実行時に、前記ワード処理用アドレス修飾
レジスタによりアドレス修飾する。BAS命令は、ビツト
処理用アドレス修飾レジスタ26にビツト処理におけるア
ドレス修飾量を格納する命令であり、BAS命令実行後の
アドレス修飾を必要とするビツト処理命令の実行時に、
前記ビツト処理用アドレス修飾レジスタによりアドレス
修飾する。FIG. 3 is an example of instructions of the programmable controller according to the present invention. Among the instructions, AND, OR, and EOR are instructions for obtaining a logical product, a logical sum, and an exclusive logical sum without address modification in the bit processing, and ANDA, ORA, and EORA are the above-mentioned AN.
This is an instruction when the D, OR, and EOR instructions are used after address modification. INB and OUTB are input / output instructions without address modification in bit processing, and INBA and OUTBA are input / output instructions with address modification. ADD, SUB, MUL, DIV are four arithmetic operations without address modification in word processing, and ADDA, SUBA, MULA, DIV
A is an arithmetic operation instruction for address modification. INW, OUTW
Is an input / output instruction without address modification in word processing, and INWA and OUTWA are input / output instructions with address modification.
The COM instruction is an instruction for obtaining the complement of the contents of the accumulator 31 and storing it in the accumulator 31. JMP (Unconditional JUM
P) and JTC (conditional JUMP) are commands that change the contents of the program counter 24. In the unconditional JUMP command, the address part of the command is stored in the program counter 24, and in the conditional JUMP command, The address portion of the conditional JUMP instruction is stored in the program counter 24 only when the condition set in the conditional JUMP instruction is satisfied. When the condition is not satisfied, the content of the program counter 24 is incremented by one. Unconditional and conditional CALL
The instruction is an instruction to change the contents of the program counter 24 like the above two JUMP instructions.
The contents of the program counter 24 are saved in the save register 23. The RET instruction is an instruction to restore the contents of the program counter 24 saved in the save register 23, and is used in combination with the CALL instruction to use a subroutine. The WAS instruction is the word processing address modification register 25.
Is an instruction for storing an address modification amount in word processing, and the address is modified by the word processing address modification register when the word processing instruction requiring the address modification after the WAS instruction is executed. The BAS instruction is an instruction for storing the address modification amount in the bit processing in the bit processing address modification register 26, and at the time of execution of the bit processing instruction requiring the address modification after the execution of the BAS instruction,
The address is modified by the bit processing address modification register.
次に本発明による実施例の動作を説明する。制御対象9
〜13の状態は、論理演算部1によつて制御される。該制
御は、制御対象によつて異なるが大別すると次の2つに
なる。1つは、流入量,圧力,回転数等を制御するワー
ド処理による制御、もう1つは、接点のオンオフ,バル
ブの開閉,機器の起動,停止等を行うビツト処理による
制御である。制御対象9〜13の状態が複数個ある場合、
各々異なつた入出力番地が割当てられる。例えば、各制
御対象9〜13に次のように入出力番地が割当てられてい
るとする。Next, the operation of the embodiment according to the present invention will be described. Control target 9
The states of to 13 are controlled by the logical operation unit 1. The control differs depending on the control target, but is roughly classified into the following two. One is the control by word processing for controlling the inflow amount, the pressure, the number of revolutions, etc. The other is the control by bit processing for turning on / off the contacts, opening / closing the valve, starting / stopping the equipment and the like. If there are multiple states of controlled objects 9 to 13,
Different input / output addresses are assigned to each. For example, it is assumed that the input / output addresses are assigned to the control targets 9 to 13 as follows.
制御対象9 ワード処理入力200〜203 ワード処理出力232〜233 ビツト処理入力0〜15 ビツト処理出力128〜135 制御対象10 ワード処理入力204〜207 ビツト処理出力234〜235 ワード処理入力16〜31 ビツト処理出力136〜143 制御対象11 ワード処理入力208〜211 ワード処理出力236〜237 ビツト処理入力32〜47 ビツト処理出力144〜151 制御対象12 ワード処理入力212〜215 ワード処理出力238〜239 ビツト処理入力48〜63 ビツト処理出力152〜159 制御対象13 ワード処理入力216〜219 ワード処理出力240〜241 ビツト処理入力64〜79 ビツト処理出力160〜167 論理演算部1は、制御対象9〜13から要求される処理内
容に従つて前記命令と該入出力番地の組合せをプログラ
ムとして記憶しているプログラムメモリ2より、プログ
ラムカウンタ24の内容に従つて前記命令を順次読出し、
入出力装置4〜8に割当てられた入出力番地をアクセス
することにより、制御対象9〜13の制御を行う。Controlled 9 word processing input 200 to 203 word processing output 232 to 233 bit processing input 0 to 15 bit processing output 128 to 135 Controlled 10 word processing input 204 to 207 bit processing output 234 to 235 word processing input 16 to 31 bit processing Output 136 to 143 Controlled 11 word processing input 208 to 211 Word processing output 236 to 237 Bit processing input 32 to 47 Bit processing output 144 to 151 Controlled 12 word processing input 212 to 215 Word processing output 238 to 239 Bit processing input 48 〜63 Bit processing output 152〜159 Controlled object 13 Word processing input 216〜219 Word processing output 240〜241 Bit processing input 64〜79 Bit processing output 160〜167 The logical operation part 1 is requested from the control object 9〜13. From the program memory 2 which stores the combination of the instruction and the input / output address as a program according to the processing content, the instructions are sequentially read according to the content of the program counter 24,
The controlled objects 9 to 13 are controlled by accessing the input / output addresses assigned to the input / output devices 4 to 8.
第4図に本発明によるプログラマブルコントローラのプ
ログラムの一例を示してあり、第1図に示した実施例に
用いられるプログラムの例を示してある。第4図のプロ
グラムは、制御対象9〜13に対するプログラム100〜104
により構成されており、制御対象10と制御対象12に対す
る処理内容は同一である共通のサブルーチン200を用い
ている。FIG. 4 shows an example of the program of the programmable controller according to the present invention, and shows an example of the program used in the embodiment shown in FIG. The program of FIG. 4 is the program 100 to 104 for the controlled objects 9 to 13.
The common subroutine 200 having the same processing contents for the controlled object 10 and the controlled object 12 is used.
プログラムがプログラム番地0から開始されると、ま
ず、制御対象9に対するプログラム100を実行する。次
に制御対象10に対するプログラム101が実行されるが、
プログラム101の処理はWAS命令とBAS命令によりワード
処理およびビツト処理における各々のアドレス修飾量20
4と16を、それぞれワード処理用アドレス修飾レジスタ2
5とビツト処理用アドレス修飾レジスタ26に格納し、CAL
L命令によりプログラムカウンタ24の内容を300番地に設
定するとともに、プログラム102の先端番地を退避レジ
スタ23に退避させ、サブルーチン200をCALLする。プロ
グラム101よりCALLされたサブルーチン200における300
番地のINWA命令では、該命令の番地部の0番地がプログ
ラム101に設定されたワード処理におけるアドレス修飾
量204により修飾され、0+204=204により入出力装置
5の204番地の状態がアキユムレータ31に取込まれる。
また、310番地のINBA命令では、該命令の番地部の0番
地がプログラム101で設定されたビツト処理におけるア
ドレス修飾量16により修飾され、0+16=16により入出
力装置5の16番地の状態がアキユムレータ31に取込まれ
る。サブルーチン200はRET命令で終了し、RET命令の実
行でプログラム102の先頭番地が退避レジスタ23からプ
ログラムカウンタ24に復帰され、制御対象11に対するプ
ログラム102が実行される。プログラム102が終了する
と、制御対象12に対するプログラム103に移る。プログ
ラム103は、プログラム101と同様、ワード処理とビツト
処理におけるそれぞれのアドレス修飾量212と48をワー
ド処理用アドレス修飾レジスタ25とビツト処理用アドレ
ス修飾レジスタ26に設定し、プログラム104の先頭番地
を退避レジスタ23に退避して、サブルーチン200をCALL
する。プログラム103よりCALLされたサブルーチン200に
おける300番地のINWA命令では、該命令の番地部の0番
地がプログラム103で設定されたワード処理におけるア
ドレス修飾量212により修飾され、0+212=212により
入出力装置7の212番地の状態がアキユムレータ31に取
込まれる。また、310番地のINBA命令では、該命令の番
地部の0番地がプログラム103で設定されたビツト処理
におけるアドレス修飾量48により修飾され、0+48=48
により入出力装置7の48番地の状態がアキユムレータ31
に取込まれる。このようにして、サブルーチン200の実
行により制御対象12の処理が行なわれる。このサブルー
チン200が終了すると、プログラム104の先頭番地が退避
レジスタ23よりプログラムカウンタ24に復帰されプログ
ラム104が実行される。プログラム104の最後のJMP命令
により再びプログラム100に戻り、以下、プログラム100
〜104が繰り返し実行される。When the program starts from program address 0, first, the program 100 for the controlled object 9 is executed. Next, the program 101 for the controlled object 10 is executed,
The processing of the program 101 uses the WAS and BAS instructions to modify each address in word processing and bit processing.
4 and 16 are the address modification registers for word processing 2
5 and bit processing address modification register 26
The L instruction sets the contents of the program counter 24 to the address 300, saves the leading address of the program 102 in the save register 23, and calls the subroutine 200. 300 in subroutine 200 CALLed from program 101
In the INWA instruction of the address, the address 0 of the instruction is modified by the address modification amount 204 in the word processing set in the program 101, and the state of address 204 of the input / output device 5 is acquired by the accumulator 31 by 0 + 204 = 204. Get caught.
Further, in the INBA instruction at the address 310, the address 0 of the address portion of the instruction is modified by the address modification amount 16 in the bit processing set by the program 101, and the state of the address 16 of the input / output device 5 is changed by 0 + 16 = 16. Taken in 31. The subroutine 200 ends with a RET instruction, and by executing the RET instruction, the start address of the program 102 is returned from the save register 23 to the program counter 24, and the program 102 for the controlled object 11 is executed. When the program 102 ends, the program 103 for the control target 12 is entered. Like the program 101, the program 103 sets the address modification amounts 212 and 48 in word processing and bit processing in the word processing address modification register 25 and the bit processing address modification register 26, respectively, and saves the start address of the program 104. Save to register 23 and call subroutine 200
To do. In the INWA instruction at the address 300 in the subroutine 200 that is CALLed by the program 103, the address 0 of the address portion of the instruction is modified by the address modification amount 212 in the word processing set by the program 103, and 0 + 212 = 212 is used as the input / output unit 7. The state of address 212 is taken in by Aki Umrator 31. Further, in the INBA instruction at the address 310, the address 0 of the address portion of the instruction is modified by the address modification amount 48 in the bit processing set by the program 103, and 0 + 48 = 48.
The status of address 48 of I / O device 7 is
Be taken into. In this way, the processing of the controlled object 12 is performed by the execution of the subroutine 200. When this subroutine 200 ends, the start address of the program 104 is returned to the program counter 24 from the save register 23 and the program 104 is executed. The last JMP instruction of the program 104 returns to the program 100 again.
~ 104 is repeatedly executed.
以上のように、本発明の実施例によれば、処理プログラ
ムの作成において作成者は、アドレス修飾レジスタを意
識しないで作成することができる。また、ワード処理に
おけるアドレス修飾量とビツト処理におけるアドレス修
飾量が異なつても問題はなく、特に、同一の制御が要求
され、しかもそれらの制御においてアドレス修飾を必要
とする処理のサブルーチン化が容易であり、プログラム
メモリの小容量化を図ることができる。As described above, according to the embodiment of the present invention, the creator of the processing program can create the processing program without being aware of the address modification register. In addition, there is no problem even if the address modification amount in the word processing and the address modification amount in the bit processing are different. In particular, the same control is required, and it is easy to make a subroutine of the process requiring the address modification in those controls. Therefore, the capacity of the program memory can be reduced.
更に、本実施例では入出力装置に対するアドレス修飾に
ついて説明したが、各定数等が記憶されているデータメ
モリ3に対するアドレス修飾についても、本発明を適用
することができる。Further, although the address modification for the input / output device has been described in the present embodiment, the present invention can be applied to the address modification for the data memory 3 in which each constant and the like are stored.
本発明によれば、処理プログラムの作成において作成者
は、ワード処理あるいはビツト処理におけるアドレス修
飾レジスタを意識しなくてすみ、プログラムの作成効率
を向上させることができる。According to the present invention, the creator of a processing program need not be aware of the address modification register in word processing or bit processing, and the efficiency of creating a program can be improved.
また、入出力装置に対するアドレス修飾が容易にできる
ことにより、同一制御が要求される複数の制御対象に対
し、プログラムのサブルーチン化が容易であり、プログ
ラム作成時間の短縮と、プログラムメモリの小容量化を
図ることができる。In addition, since the address modification to the input / output device can be easily performed, it is easy to make a program into a subroutine for a plurality of control targets that require the same control, and it is possible to reduce the program creation time and the capacity of the program memory. Can be planned.
第1図は本発明に係るプログラマブルコントローラの一
実施例の構成を示すブロツク図、第2図は従来のプログ
ラマブルコントローラの構成を示すブロツク図、第3図
は本発明によるプログラマブルコントローラの命令の一
例を示す図、第4図は本発明によるプログラマブルコン
トローラのプログラムの一例を示す図である。 1……論理演算部、2……プログラムメモリ、3……デ
ータメモリ、4〜8……入出力装置、9〜13……制御対
象、23……退避レジスタ、24……プログラムカウンタ、
25……ワード処理用アドレス修飾レジスタ、26……ビツ
ト処理用アドレス修飾レジスタ、27……マルチプレク
サ、33……命令レジスタ。FIG. 1 is a block diagram showing the configuration of an embodiment of a programmable controller according to the present invention, FIG. 2 is a block diagram showing the configuration of a conventional programmable controller, and FIG. 3 is an example of instructions of the programmable controller according to the present invention. FIG. 4 is a diagram showing an example of a program of the programmable controller according to the present invention. 1 ... Logical operation part, 2 ... Program memory, 3 ... Data memory, 4-8 ... Input / output device, 9-13 ... Control object, 23 ... Save register, 24 ... Program counter,
25 ... Address modification register for word processing, 26 ... Address modification register for bit processing, 27 ... Multiplexer, 33 ... Instruction register.
───────────────────────────────────────────────────── フロントページの続き (72)発明者 山岡 弘昌 茨城県日立市大みか町5丁目2番1号 株 式会社日立製作所大みか工場内 (72)発明者 高倉 満郎 茨城県日立市大みか町5丁目2番1号 株 式会社日立製作所大みか工場内 (56)参考文献 特開 昭60−79431(JP,A) 特開 昭56−57111(JP,A) ─────────────────────────────────────────────────── ─── Continuation of front page (72) Inventor Hiromasa Yamaoka 5-2-1 Omika-cho, Hitachi City, Ibaraki Prefecture Hitachi Ltd. Omika Factory (72) Inventor Mitsuro Takakura 5-chome, Omika-cho, Hitachi City, Ibaraki Prefecture No. 1 Incorporated company Hitachi Ltd. Omika factory (56) References JP-A-60-79431 (JP, A) JP-A-56-57111 (JP, A)
Claims (1)
に従つてデータをワード単位で扱うワード処理とビツト
単位で扱うビツト処理とを行なうプログラマブルコント
ローラにおいて、アドレス修飾量を格納するワード処理
用及びビツト処理用のアドレス修飾用レジスタと、ワー
ド処理若しくはビツト処理の命令を区別する手段と、該
手段の出力により前記ワード処理用若しくはビツト処理
用レジスタを選択するか、又はいずれも選択しないかを
指定する手段を備え、前記メモリから取込んだ命令の番
地部と、指定された前記アドレス修飾用レジスタのアド
レス修飾量又はアドレス修飾をしない場合には0を加算
して、実行時のオペランドアドレスとすることを特徴と
するプログラマブルコントローラ。1. A programmable controller for storing an address modification amount and a bit in a programmable controller for sequentially reading instructions from a memory and performing word processing for handling data in word units and bit processing for handling data in bit units according to the instructions. An address modification register for processing, a means for distinguishing a word processing or bit processing instruction, and designation of whether or not the word processing or bit processing register is selected by the output of the means. Means for adding the address part of the instruction fetched from the memory and the address modification amount of the specified address modification register or 0 when the address modification is not performed, to obtain the operand address at the time of execution Programmable controller.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1192386A JPH0685123B2 (en) | 1986-01-24 | 1986-01-24 | Programmable controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1192386A JPH0685123B2 (en) | 1986-01-24 | 1986-01-24 | Programmable controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS62171002A JPS62171002A (en) | 1987-07-28 |
| JPH0685123B2 true JPH0685123B2 (en) | 1994-10-26 |
Family
ID=11791204
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1192386A Expired - Lifetime JPH0685123B2 (en) | 1986-01-24 | 1986-01-24 | Programmable controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH0685123B2 (en) |
-
1986
- 1986-01-24 JP JP1192386A patent/JPH0685123B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPS62171002A (en) | 1987-07-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP5571201B2 (en) | Limit memory area for read instructions based on hardware mode and security flags | |
| US4722071A (en) | Compiler for evaluating Boolean expressions | |
| JPS62180427A (en) | Program control circuit | |
| US4298933A (en) | Data-processing device including means to suppress the execution of unnecessary instructions | |
| EP0338317B1 (en) | Information processor operative both in direct mapping and in bank mapping and the method of switching the mapping schemes | |
| US4493029A (en) | Microprocessor with PLA adapted to implement subroutines | |
| EP0660229B1 (en) | Method and apparatus for modifying the contents of a register | |
| JPH0685123B2 (en) | Programmable controller | |
| US5410665A (en) | Process controller single memory chip shadowing technique | |
| KR940002478B1 (en) | Information processing equipment | |
| EP0136699B1 (en) | Programmable controller | |
| JPS6282402A (en) | Sequence controller | |
| JPS63268033A (en) | data processing equipment | |
| JP3523350B2 (en) | Program counting system and program counter operating method | |
| WO1988006751A1 (en) | Processor for plc and plc | |
| JPS59218569A (en) | micro computer | |
| JPS62120542A (en) | Information processor | |
| JPS6220032A (en) | Information processor | |
| JP3331599B2 (en) | Micro program controller | |
| JPH05134865A (en) | Microprogram control system | |
| JPH01236327A (en) | Interruption mask control method | |
| JP3392413B2 (en) | Two-level micro control system and method | |
| JPS59151241A (en) | data processing equipment | |
| JPH04369723A (en) | Micro program controller | |
| JPH01191934A (en) | Integrated circuit computer system |