JPH0119168B2 - - Google Patents
Info
- Publication number
- JPH0119168B2 JPH0119168B2 JP57089328A JP8932882A JPH0119168B2 JP H0119168 B2 JPH0119168 B2 JP H0119168B2 JP 57089328 A JP57089328 A JP 57089328A JP 8932882 A JP8932882 A JP 8932882A JP H0119168 B2 JPH0119168 B2 JP H0119168B2
- Authority
- JP
- Japan
- Prior art keywords
- register
- shift register
- shift
- instruction
- logic operation
- 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
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Program-control systems
- G05B19/02—Program-control systems electric
- G05B19/04—Program control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
- G05B19/054—Input/output
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Shift Register Type Memory (AREA)
- Programmable Controllers (AREA)
Description
【発明の詳細な説明】
この発明は固定長のシフトレジスタを1ビツト
シフトさせるシフトレジスタ命令を持つ、シーケ
ンスコントローラのシフトレジスタ制御装置に関
する。DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a shift register control device for a sequence controller having a shift register instruction for shifting a fixed length shift register by one bit.
単位長のシフトレジスタを直列接続してシフト
レジスタ命令を実行する場合、従来のシーケンス
コントローラでは、各レジスタの入力条件(リセ
ツト、クロツク、シフト入力データ)を個々にプ
ログラム設定して間接的に直列接続していた。 When executing a shift register instruction by connecting unit-length shift registers in series, conventional sequence controllers require that each register's input conditions (reset, clock, shift input data) be programmed individually and then indirectly connected in series. Was.
第1図Aは従来のシフトレジスタ制御装置のラ
ダーダイアグラムを示し、また同図Bは同制御の
ためのプログラムを示す。スキヤンニング動作を
するこのシーケンスコントローラでは、まずロー
ド命令(LOD)を実行して、リセツト信号、ク
ロツクおよび0番シフトレジスタ(8ビツト)の
最終ビツトデータを取込み、1番シフトレジスタ
に対するシフトレジスタ命令(SFT1)を実行す
る。次に再びロード命令を実行してリセツト、信
号、クロツクおよび入力データを取込み、0番シ
フトレジスタに対するシフトレジスタ命令
(SFT0)を実行する。以上の動作によつて、0
番シフトレジスタに1番シフトレジスタが接続
し、16ビツトのシフトレジスタのシフト制御をお
こなう。 FIG. 1A shows a ladder diagram of a conventional shift register control device, and FIG. 1B shows a program for controlling the same. This sequence controller that performs a scanning operation first executes a load instruction (LOD) to take in the reset signal, clock, and final bit data of shift register 0 (8 bits), and then issues a shift register instruction (LOD) for shift register 1. Execute SFT1). Next, the load instruction is executed again to take in the reset, signal, clock, and input data, and the shift register instruction (SFT0) for shift register No. 0 is executed. By the above operation, 0
Shift register No. 1 is connected to shift register No. 1 and performs shift control of the 16-bit shift register.
しかしながら上記のシフトレジスタ制御装置で
は、合計8ステツプのプログラムが必要であつ
て、このような複数接続レジスタの制御を多く必
要とする場合にはプログラムが非常に複雑化する
不都合があつた。 However, the above-mentioned shift register control device requires a program of eight steps in total, and has the disadvantage that the program becomes extremely complicated when a large number of such multiple connected registers are required to be controlled.
この発明の目的は、複数の単位長レジスタを接
続する場合に、単に最初のシフトレジスタへの入
力条件を設定するだけで良いシフトレジスタ制御
装置を提供することにある。 An object of the present invention is to provide a shift register control device that only requires setting input conditions to the first shift register when connecting a plurality of unit length registers.
この発明は、要約すれば、シーケンスコントロ
ーラの制御部に一般的に用いる、論理演算結果ま
たは入力データを記憶する論理演算レジスタに、
シフトレジスタ命令実行時のオーバーフロービツ
トをセツトするようにして、次のシフトレジスタ
命令が、あらためて入力条件の設定がなくてもそ
のセツトされたオーバーフロービツトを直接のシ
フト入力データとして実行されるようにし、また
クロツクやリセツト信号等の入力条件がすでにス
タツクされているスタツクレジスタの内容をもそ
のまま次のシフトレジスタ命令の入力条件として
使えるようにしたものである。 In summary, the present invention provides a logic operation register that stores logic operation results or input data, which is generally used in a control section of a sequence controller.
An overflow bit is set when a shift register instruction is executed, so that the next shift register instruction is executed using the set overflow bit as direct shift input data without setting an input condition again. Furthermore, the contents of a stack register in which input conditions such as a clock and a reset signal are already stacked can be used as they are as input conditions for the next shift register command.
以下この発明に係るシフトレジスタ制御方式に
つき図面を参照して説明する。 The shift register control method according to the present invention will be explained below with reference to the drawings.
第2図はこの発明を実施するシーケンスコント
ローラ制御部のブロツク図である。 FIG. 2 is a block diagram of a sequence controller control section implementing the present invention.
同図において、ユーザーズRAM3はユーザー
プログラムを格納し、ワーク用RAM4は入力状
態バツフア40や単位長(8ビツト)シフトレジ
スタ41(複数)を有する。出力ポート5、入力
ポート6は、IOバスを介して図示しない出力モ
ジユール、入力モジユールに接続する。出力ポー
ト7は1ビツトの論理演算レジスタ8に、論理演
算結果または入力データを供給し、また8ビツト
のスタツクレジスタ9にシフトクロツクを供給す
る。入力ポート10は、上記論理演算レジスタ8
の出力またはスタツクレジスタ9の各ステージ出
力を受け取る。スタツクレジスタ9は、ロード命
令実行時に論理演算レジスタ8の内容がスタツク
される8レベルのレジスタである。 In the figure, a user's RAM 3 stores a user program, and a work RAM 4 has an input state buffer 40 and a unit length (8-bit) shift register 41 (plurality). The output port 5 and input port 6 are connected to an output module and an input module (not shown) via an IO bus. The output port 7 supplies a logical operation result or input data to a 1-bit logical operation register 8, and also supplies a shift clock to an 8-bit stack register 9. The input port 10 is connected to the logic operation register 8.
or each stage output of the stack register 9. The stack register 9 is an 8-level register in which the contents of the logical operation register 8 are stacked when a load instruction is executed.
次に単位長シフトレジスタが直列接続されたと
きの、シフトレジスタ命令実行動作内容について
説明する。 Next, the contents of the shift register instruction execution operation when unit length shift registers are connected in series will be explained.
第3図Aはラダーダイアグラム、同図Bはプロ
グラムを示す。 FIG. 3A shows a ladder diagram, and FIG. 3B shows a program.
命令の実行は、プログラムの0番地からEND
命令の記述されているN番地迄スキヤン動作によ
つておこなわれるが、運転がスタートすると、ま
ず入力モジユールの状態がIOバスを経由して入
力ポート6から読込まれる。読込まれた入力状態
は、ワーク用RAM4の入力状態バツフア40に
セツトされる。この状態から0番地の命令実行が
スタートする。 Execution of the instruction starts from address 0 of the program and ends
A scan operation is performed up to the N address where the instruction is written. When operation starts, the state of the input module is first read from the input port 6 via the IO bus. The read input state is set in the input state buffer 40 of the work RAM 4. Execution of the instruction at address 0 starts from this state.
0番地のロード命令(LOD)では、0番入力
のデータが論理演算レジスタ8にセツトされる。
このデータが“オン”であれば後述の0番シフト
レジスタ命令によつて0番シフトレジスタがリセ
ツトされる。次のロード命令では1番入力のデー
タが論理演算レジスタ8にセツトされる。またこ
のとき、0番地の命令実行で論理演算レジスタ8
にセツトされていた0番入力データが、スタツク
レジスタ9に押し込まれる。1番入力データは、
“オフ”から“オン”に変化するときシフトレジ
スタのクロツクとなる。同じ様に2番地のロード
命令では、2番入力のデータを論理演算レジスタ
8にセツトするとともに、スタツクを実行する。
この結果、論理演算レジスタ8には2番入力デー
タがセツトされ、スタツクレジスタ9の0ステー
ジ(レベル0)には1番入力データがセツトさ
れ、また1ステージ(レベル1)には0番入力デ
ータがセツトされることになる。 In the load instruction (LOD) at address 0, the data at input number 0 is set in the logical operation register 8.
If this data is "on", the 0th shift register is reset by the 0th shift register instruction, which will be described later. In the next load instruction, the data of the first input is set in the logical operation register 8. Also, at this time, when the instruction at address 0 is executed, the logic operation register 8
The 0th input data that was set in is pushed into the stack register 9. The first input data is
When changing from "off" to "on", it becomes the shift register clock. Similarly, the load instruction at address 2 sets the data at the input at number 2 in the logical operation register 8 and executes stacking.
As a result, the 2nd input data is set in the logic operation register 8, the 1st input data is set in the 0th stage (level 0) of the stack register 9, and the 0th input data is set in the 1st stage (level 1). The data will be set.
第4図A,B,Cは、それぞれ0番地、1番
地、2番地のロード命令実行後の論理演算レジス
タ8とスタツクレジスタ9との内容を示してい
る。なお図において符号*は、前回命令より残つ
ている不特定な内容を示している。 4A, B, and C show the contents of the logical operation register 8 and stack register 9 after execution of the load instructions at addresses 0, 1, and 2, respectively. Note that in the figure, the symbol * indicates unspecified content remaining from the previous instruction.
以上のロード命令を実行すると、次に3番地の
シフトレジスタ0(SFT0)命令を実行する。従
来のシフトレジスタ命令と同様に、この命令で
は、論理演算レジスタ8の内容をデータとして、
またスタツクレジスタ9の0ステージ出力(1番
入力データ)をクロツクとして、および1ステー
ジ出力(0番入力データ)をリセツト信号として
シフト制御がおこなわれる。 When the above load instruction is executed, the shift register 0 (SFT0) instruction at address 3 is executed next. Similar to the conventional shift register instruction, this instruction uses the contents of the logical operation register 8 as data,
Further, shift control is performed using the 0 stage output (No. 1 input data) of the stack register 9 as a clock and the 1 stage output (No. 0 input data) as a reset signal.
第5図はシフト制御動作を示すフローチヤート
である。 FIG. 5 is a flowchart showing the shift control operation.
前述のように、このシーケンスコントローラは
スキヤンニング動作によつて各命令を実行してい
くため、シフトはクロツクの立上がり時点のみで
おこなわれる。またリセツトはリセツト信号が
ONの間中、継続的にリセツト制御がおこなわれ
る。ステツプn1〜n3は、リセツト信号の状態に
よつて、シフトレジスタをリセツトする手順であ
る。また同様にして、ステツプn4、n5でクロツ
クの立上がり時点を捉え、立上がり時においてス
テツプn5→ステツプn6と進んでシフトレジスタ
の内容を1ビツト右シフトする。リセツト信号、
クロツクの立上がり時以外のときは、何も実行せ
ずに終了して、次の命令に移る。なお、前回のリ
セツト信号や前回のクロツクは、ワーク用RAM
4の適当な領域に一時記憶するようにしている。 As described above, since this sequence controller executes each instruction by scanning operation, shifting is performed only at the rising edge of the clock. Also, for reset, the reset signal is
Reset control is performed continuously while ON. Steps n1 to n3 are procedures for resetting the shift register depending on the state of the reset signal. Similarly, the rising edge of the clock is detected at steps n4 and n5, and at the rising edge, the contents of the shift register are shifted to the right by 1 bit by proceeding from step n5 to step n6. reset signal,
At times other than when the clock rises, the program exits without executing anything and moves on to the next command. Note that the previous reset signal and previous clock are stored in the work RAM.
4 is temporarily stored in an appropriate area.
ステツプn6において、シフトレジスタの内容
が右シフトされると、次にn7でオーバーフロー
データが論理演算レジスタ8にセツトされる。こ
の処理の結果、次に第2のシフトレジスタに対し
て再びシフトレジスタ命令を実行すると、上記オ
ーバーフロービツトが入力データとなつてシフト
制御がおこなわれることになる。すなわち、上記
のシフト制御を0番シフトレジスタ(第1のシフ
トレジスタ)についておこない、続いて同様のシ
フト制御を1番シフトレジスタ(第2のシフトレ
ジスタ)についておこなうことによつて、0番シ
フトレジスタと1番シフトレジスタとを直列接続
した16ビツトのシフトレジスタに対するシフトを
おこなうことができる。そして、2回目のシフト
レジスタ命令実行時には、1回目のシフトレジス
タ命令に用いたスタツク内容(リセツト、クロツ
ク)をそのまま使用できるため、プログラムは第
3図Bに示すように、シフトレジスタ命令を3番
地と4番地に続けて記述するだけで良いことにな
る。 At step n6, the contents of the shift register are shifted to the right, and then at step n7, overflow data is set in the logical operation register 8. As a result of this processing, when the shift register command is executed again for the second shift register, the overflow bit becomes input data and shift control is performed. That is, by performing the above shift control on the 0th shift register (first shift register), and then performing the same shift control on the 1st shift register (second shift register), the 0th shift register It is possible to shift to a 16-bit shift register in which the 1st shift register and the 1st shift register are connected in series. Then, when executing the shift register instruction for the second time, the stack contents (reset, clock) used for the first shift register instruction can be used as is, so the program executes the shift register instruction at address 3, as shown in Figure 3B. All you have to do is write this after address 4.
以上のようなシフト制御をおこなうことから、
倍長のシフトレジスタを1ビツトシフトするため
に必要なプログラムステツプ数は、合計5ステツ
プで良い。また4倍長のシフトレジスタを構成す
る必要が生じた場合でも、命令数は7ステツプで
良い。すなわち、1命令(シフトレジスタ命令)
を追加するだけで、ハード上、単位長シフトレジ
スタが直列に接続された状態を形成することがで
きる。 Since the above shift control is performed,
The total number of program steps required to shift a double-length shift register by 1 bit may be 5 steps in total. Furthermore, even if it becomes necessary to configure a quadruple length shift register, the number of instructions may be 7 steps. That is, one instruction (shift register instruction)
By simply adding , it is possible to form a state in which unit-length shift registers are connected in series on the hardware.
以上のようにこの発明によれば、従来、論理演
算結果や入力データの記憶レジスタでしかなかつ
た論理演算レジスタに、シフトレジスタ命令実行
時のオーバーフローデータをもセツトするように
したので、また、スタツクレジスタに第1のシフ
トレジスタに対するものとしてすでに入力されて
いる条件をそのまま第2のシフトレジスタに対す
るシフトレジスタ命令に使用できるようにしたの
で、単位長のシフトレジスタが極めて簡単に直接
接続でき、プログラムステツプ数を最小限にする
ことができる。 As described above, according to the present invention, overflow data when executing a shift register instruction is also set in the logical operation register, which conventionally was only a storage register for logical operation results and input data. The conditions that have already been input into the shift register for the first shift register can be used as-is for the shift register instruction for the second shift register, so unit-length shift registers can be directly connected extremely easily, and the program The number of steps can be minimized.
第1図A,Bは従来のシフトレジスタ制御方式
のラダーダイアグラム、プログラムを示す。第2
図はこの発明に係るシフトレジスタ制御方式を実
施するシーケンスコントローラ制御部のブロツク
図、第3図A,Bは同制御方式のラダーダイアグ
ラム、プログラム、第4図A,B,Cはロード命
令実行後の論理演算レジスタとスタツクレジスタ
との内容を示す図、第5図はシフト制御動作のフ
ローチヤートを示す。
FIGS. 1A and 1B show a ladder diagram and program of a conventional shift register control system. Second
The figure is a block diagram of a sequence controller control unit that implements the shift register control method according to the present invention, Figures 3A and B are ladder diagrams and programs of the same control system, and Figures 4A, B, and C are after execution of a load instruction. FIG. 5 shows the contents of the logic operation register and the stack register, and FIG. 5 shows a flowchart of the shift control operation.
Claims (1)
算レジスタと、入力データを前記論理演算レジス
タへセツトするロード命令実行時に前記論理演算
レジスタの内容がスタツクされるスタツクレジス
タと、ワーク用の複数のシフトレジスタとを有す
るとともに、前記論理演算レジスタの内容をシフ
ト入力データとして前記シフトレジスタを1ビツ
トシフトさせるシフトレジスタ命令を備えたシー
ケンスコントローラにおいて、第1のシフトレジ
スタに対するシフトレジスタ命令実行時に前記シ
フトレジスタのオーバーフローデータを前記論理
演算レジスタにセツトする手段と、第2のシフト
レジスタに対するシフトレジスタ命令実行時に前
記論理演算レジスタと前記スタツクレジスタの内
容を入力条件として設定する手段と、を有するこ
とを特徴とする、シーケンスコントローラのシフ
トレジスタ制御装置。1. A logic operation register that stores input data and logic operation results, a stack register in which the contents of the logic operation register are stacked when executing a load instruction that sets input data to the logic operation register, and multiple shift registers for work. and a shift register instruction for shifting the shift register by 1 bit using the contents of the logical operation register as shift input data, wherein the shift register overflows when the shift register instruction for the first shift register is executed. It is characterized by comprising means for setting data in the logic operation register, and means for setting the contents of the logic operation register and the stack register as input conditions when executing a shift register instruction for the second shift register. , Sequence controller shift register control device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57089328A JPS58205208A (en) | 1982-05-25 | 1982-05-25 | Shift register control system of sequence controller |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP57089328A JPS58205208A (en) | 1982-05-25 | 1982-05-25 | Shift register control system of sequence controller |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS58205208A JPS58205208A (en) | 1983-11-30 |
| JPH0119168B2 true JPH0119168B2 (en) | 1989-04-10 |
Family
ID=13967604
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP57089328A Granted JPS58205208A (en) | 1982-05-25 | 1982-05-25 | Shift register control system of sequence controller |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS58205208A (en) |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS5671105A (en) * | 1979-11-13 | 1981-06-13 | Yaskawa Electric Mfg Co Ltd | Shift register type programmable controller with memory |
-
1982
- 1982-05-25 JP JP57089328A patent/JPS58205208A/en active Granted
Also Published As
| Publication number | Publication date |
|---|---|
| JPS58205208A (en) | 1983-11-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5895498A (en) | Arithmetic processor which latches data in a temporary register before the data is latched in a general purpose register | |
| JPH0119168B2 (en) | ||
| JPH0887441A (en) | Flash memory access method | |
| JP4482356B2 (en) | Image processing method and image processing apparatus using SIMD processor | |
| JPS6410854B2 (en) | ||
| JPH01261758A (en) | Computer system | |
| JP2595992B2 (en) | Electronic musical instrument | |
| JP2000029508A (en) | Programmable controller | |
| JP2758624B2 (en) | Speed control method of micro program | |
| US20060236057A1 (en) | Memory access method with delayed write control signal and data processing apparatus | |
| JPS5995646A (en) | Arithmetic control system | |
| JPH0535472A (en) | Micro Computer | |
| JPS62297954A (en) | Memory control system | |
| JPS60247708A (en) | programmable controller | |
| JPH0158522B2 (en) | ||
| JPH0485653A (en) | Information processor | |
| JPS60256862A (en) | Output port control system of microcomputer | |
| JPH04365170A (en) | Digital signal processing semiconductor integrated circuit | |
| JPH03276306A (en) | Programmable controller | |
| JPS62298836A (en) | Ram for program storage | |
| JPH01234957A (en) | Method and device for controlling dma | |
| JPH05205007A (en) | Generating system for real chip information file | |
| JPH01295347A (en) | Microcomputer device | |
| JPH05204640A (en) | Microprogram control processor | |
| JPH0319570B2 (en) |