JPS6013203B2 - sequence controller - Google Patents

sequence controller

Info

Publication number
JPS6013203B2
JPS6013203B2 JP51106709A JP10670976A JPS6013203B2 JP S6013203 B2 JPS6013203 B2 JP S6013203B2 JP 51106709 A JP51106709 A JP 51106709A JP 10670976 A JP10670976 A JP 10670976A JP S6013203 B2 JPS6013203 B2 JP S6013203B2
Authority
JP
Japan
Prior art keywords
sequence
register
instruction
word
memory
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
Application number
JP51106709A
Other languages
Japanese (ja)
Other versions
JPS5332283A (en
Inventor
勝千 下川
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
Tokyo Shibaura Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tokyo Shibaura Electric Co Ltd filed Critical Tokyo Shibaura Electric Co Ltd
Priority to JP51106709A priority Critical patent/JPS6013203B2/en
Publication of JPS5332283A publication Critical patent/JPS5332283A/en
Publication of JPS6013203B2 publication Critical patent/JPS6013203B2/en
Expired legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)
  • Programmable Controllers (AREA)

Description

【発明の詳細な説明】 本発明はマイクロプロセッサを備えた、改良されたシー
ケンスコントローラに関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an improved sequence controller with a microprocessor.

従来シーケンスコントローラは、IC,MSIを使用素
子として作られていた。
Conventional sequence controllers have been made using ICs and MSIs as elements.

すなわちIC,MSIで作られているミニコンの機能の
うち、シーケンス機能を能率的に実行し、不要な機能を
減ずると共に、IC,MSIの使用数を減らすように構
成されて来た。近年エレクトロニクス技術の進歩により
、より集積度が高く信頼性があり、高機能のLSI化さ
れたマイクロプロセッサが出現した。マイクロプロセッ
サは、ミニコン並み又はそれに近い機能を有し、速度の
点では若干低速のものが多い。したがつてマイクロプロ
セッサがシーケンスコントローラに使用することができ
れば、機能的には不要なものもあるが価格、信頼性の点
で望ましい。しかしマイクロプロセッサはミニコンの機
能を実現するようにできているので、そのまま使用した
のでは、下記のようなことからシーケンスを効率よく実
行することは、通常極めて困難である。すなわち、‘ィ
’ワード単位の論理素子AND,ORは高速で処理でき
るが、ビット単位のAND,ORは時間が数倍かかる。
‘oーピツト単位の複数の演算結果を記憶し、効率よく
それらを使えるようにできない。し一命令藷は、1語1
6ビットのうち8ビットが命令コード、4ビット2個が
レジスタ指定や、インデックス指定に使われるので、シ
ーケンス用命令を新規に定義し、付け加えると2語で構
成されることになり、メモリを食いすぎることになる。
本発明はマイクロプロセッサの持つ汎用命令と、無接点
図記号によるシーケンス命令と2つの系列の命令語を処
理することができると共に、シーケンス命令も効率よく
実行でき、シーケンス命令は1語で構成された前記欠点
のないシーケンスコントローラを提供することを目的と
する。
That is, among the functions of minicomputers made of ICs and MSIs, they have been configured to efficiently execute sequence functions, reduce unnecessary functions, and reduce the number of ICs and MSIs used. In recent years, advances in electronics technology have led to the emergence of highly integrated, reliable, and highly functional LSI microprocessors. Microprocessors have functions comparable to or similar to minicomputers, but are often slightly slower in terms of speed. Therefore, if a microprocessor can be used as a sequence controller, some of the functions may be unnecessary, but it is desirable in terms of cost and reliability. However, since microprocessors are designed to implement the functions of minicomputers, if they are used as is, it is usually extremely difficult to efficiently execute sequences due to the following reasons. That is, the logic elements AND and OR in 'word' units can be processed at high speed, but the AND and OR in bit units takes several times as long.
'o It is not possible to store multiple calculation results in pit units and use them efficiently. One command is one word, one word.
8 bits out of 6 bits are used for the instruction code, and 2 4 bits are used for register specification and index specification, so if a new sequence instruction is defined and added, it will consist of 2 words, which will eat up memory. It will be too much.
The present invention can process general-purpose instructions of a microprocessor, sequence instructions using non-contact diagram symbols, and two series of instruction words, and can also efficiently execute sequence instructions, with each sequence instruction consisting of one word. It is an object of the present invention to provide a sequence controller that does not have the above drawbacks.

以下本発明を図面に示す一実施例に基づいて説明する。
第1図は本発明の概略の構成を示すブロック図である。
説明の便宜のため当社製のマイクロプロセッサTOSB
AC−4血(以下MPと略称する)を例として話を進め
ることにする。MPにより一般的なマイクロコンピュー
タを構成した時は、同図からリードオンリメモリROM
22,3、スイッチSW4、デコーダDEC12、及び
ブロック17〜26までが除かれた形となる。すなわち
本実施例においてはマイクロプログラマプルなMFであ
るから、マイクロプログラムをストアするりードオンリ
メモリROM,1、マイクロプログラムに従って制御さ
れ演算制御を行なう演算制御ユニットACU6、メモリ
M7や入出力ユニット1/08とそれらを制御するパス
コントロールュニットBCU6とで構成する。そしてそ
れぞれの相互間は、前記スイッチSW4が除かれるため
に、リードオンリメモリROM,1のアドレスを指定す
るROMアドレス信号線RM14,15、リードオンリ
メモリROM,1の出力データ信号線RD13、演算制
御ユニットACU5とパスコントロールュニツトBCU
6相互でデータをやりとりする信号線CBUSI 1、
及びパスコソトロールュニツトBCU6へマイクロ命令
を伝える前記出力データ信号線RD13、メモリM7や
入出力ユニット1/08のアドレスを指定する信号線M
A9及び書込み議出しデータ用信号線MDIOがパスコ
ントロールュニットBCU6へ接続される。
The present invention will be described below based on an embodiment shown in the drawings.
FIG. 1 is a block diagram showing the general configuration of the present invention.
For convenience of explanation, we use our microprocessor TOSB.
We will proceed with the discussion using AC-4 blood (hereinafter abbreviated as MP) as an example. When a general microcomputer is configured with MP, read-only memory ROM
22, 3, switch SW4, decoder DEC12, and blocks 17 to 26 are removed. In other words, since this embodiment is a micro-programmable MF, it includes a read-only memory ROM, 1 that stores a micro program, an arithmetic control unit ACU 6, a memory M7, and an input/output unit 1/1 that is controlled according to the micro program and performs arithmetic control. 08 and a path control unit BCU6 that controls them. Since the switch SW4 is removed, the ROM address signal lines RM14 and RM15 specifying the address of the read-only memory ROM,1, the output data signal line RD13 of the read-only memory ROM,1, and the arithmetic control Unit ACU5 and pass control unit BCU
6 Signal line CBUSI 1 for mutually exchanging data,
and the output data signal line RD13 that transmits microcommands to the path control unit BCU6, and the signal line M that specifies the address of the memory M7 and input/output unit 1/08.
A9 and the write request data signal line MDIO are connected to the path control unit BCU6.

本実施例では入出力ユニット1/0も書込み講読出しデ
ータ用信号線MDI川こ接続されるとしたが、パスコン
トロールユニツトBCU6から出る別の入出力ユニット
1/0の信号線に綾がることもある。また図示はしない
が、割込み信号線やその他の制御信号線がある。シーケ
ンスを実行する命令は、なるべくメモリを多く使わない
ように、1ワードで構成されることが望ましい。
In this embodiment, the input/output unit 1/0 is also connected to the write/read data signal line MDI, but it may be connected to the signal line of another input/output unit 1/0 coming out from the path control unit BCU6. There is also. Although not shown, there are interrupt signal lines and other control signal lines. It is desirable that an instruction for executing a sequence be composed of one word so as to use as little memory as possible.

したがって本発明においては、第2図a,bに示すよう
に命令コードは4又は5ビットとする1ワード構成とし
たが、このようにすると命令コードはMPが持っている
汎用命令とかちあうことになる。このため汎用命令とシ
ーケンス命令の2つの独立した命令体系を持つようにし
、それぞれが持つ切襖命令でスイッチSW4を切換えて
リードオンリメモリROM,1、ROM22を選択する
。リードオンリメモリROM22にストアされているシ
ーケンス用命令のマイクロプログラムが効率よく、命令
の実行速度が早ければ問題はないが、前記したように、
ビット単位の演算は遅く、またそれらの演算結果を容易
に保存するステータス用フリップフロツプも一般のマイ
クロプロセッサは有しない。(このフリツプフuツプは
、割込み時でもセィブできるようなものを意味している
)。他方ビット演算は、ワ−ド単位の演算に比べ簡単で
あり、ハード的に実現可能であるから、本発明において
は、(i)MPとは別にシーケンス演算用リードオンリ
メモリROMと、必要な情報を保持するレジスタ、入出
力ユニット1/0の番地を指定するレジスタ、必要なビ
ットを指定する回路、入出力ユニット1/0の状態の1
ビットを変えるためのマスク用回路及びステータスレジ
スタなどを有し、(ii)これらのハードウェアの大部
分を信号線CBUSI Iに接続し、信号線CBUS1
3とのデータの入出力及びシーケンス演算などをリー
ドオンリメモリROM22に追加したハードウェア制御
用リードオンリメモリROM3をデコード回路DEC1
2でデコードし、この信号により制御するようになされ
ている。
Therefore, in the present invention, the instruction code is configured in one word with 4 or 5 bits as shown in FIG. Become. Therefore, two independent instruction systems, a general purpose instruction and a sequence instruction, are provided, and the read-only memories ROM, 1 and ROM 22 are selected by switching the switch SW4 using the switching instruction provided by each instruction. If the sequence instruction microprogram stored in the read-only memory ROM 22 is efficient and the instruction execution speed is fast, there will be no problem, but as mentioned above,
Bitwise operations are slow, and typical microprocessors do not have status flip-flops to easily store the results of these operations. (This flip-flop means something that can be saved even when an interrupt occurs.) On the other hand, bit operations are simpler than word-based operations and can be implemented in hardware. Therefore, in the present invention, (i) a read-only memory ROM for sequence operations and necessary information are provided separately from the MP; , a register that specifies the address of input/output unit 1/0, a circuit that specifies the necessary bits, and a register that specifies the address of input/output unit 1/0.
It has a mask circuit for changing bits, a status register, etc., and (ii) most of these hardware are connected to the signal line CBUSI I, and the signal line CBUS1
The read-only memory ROM3 for hardware control in which data input/output and sequence calculations with the read-only memory ROM22 are added to the decoding circuit DEC1.
2 and is controlled by this signal.

以下第1図と第2図を参照して上記をより具体的に説明
する。
The above will be explained in more detail below with reference to FIGS. 1 and 2.

すなわち川 SQR18(シーケンスレジスタ)…第2
図a,bシーケンス命令をフェッチした時、演算制御ユ
ニットACU5へストアすると共に、SQRへもストア
し、シーケンス演算用に使用する。
In other words, SQR18 (sequence register)...second
When a sequence instruction in FIGS. a and b is fetched, it is stored in the arithmetic control unit ACU5 and also stored in SQR, which is used for sequence calculations.

AND,ORのようビット演算をする時は入出力ユニッ
ト1/0のワードアドレスばかりでなく、そのワードの
内のビットを指定する必要がある。同図aはこれを表わ
している。またタイマのように、数値を扱う場合は同図
bに示されるようにビット指定は不要となる。‘。
When performing bit operations such as AND and OR, it is necessary to specify not only the word address of input/output unit 1/0 but also the bit within that word. Figure a represents this. Furthermore, when handling numerical values, such as in a timer, bit designation is not necessary as shown in FIG. '.

ー CR17(コントロールレジスタ)・・・第2図C
・シーケンスレジスタSQR1 8でのワード指定は相
対番地であるから、入出力ユニット1/08の開始番地
を指定することが必要となり、このCRにより指定する
- CR17 (control register)...Figure 2C
- Since the word specification in the sequence register SQR18 is a relative address, it is necessary to specify the start address of the input/output unit 1/08, and this is done using this CR.

亀源投入後の第1スキャン時(PONが“1”)は、通
常のスキャンと違いまず出力を初期化するのでシーケン
ス演算を異にする。また、出力シミュレート(SIMが
“1”)の時は、シーケンス演算結果も肘力せず、もと
のままとするので同じくシーケンス演算が通常となる。
PONとSI地ま、このようにシーケンス演算のための
条件をつくる。し一 lOADRI9(1ノ○アドレス
レジスタ)…第2図dメモリアドレス空間上に定義され
た入出力ユニット1/08のアドレスを指定する。
During the first scan after the power source is turned on (PON is "1"), unlike a normal scan, the output is initialized first, so the sequence calculation is different. Furthermore, when the output is simulated (SIM is "1"), the sequence calculation result is not modified and is left as it is, so the sequence calculation becomes normal as well.
PON and SI areas create conditions for sequence operations in this way. 1 OADRI9 (1 address register)...Specifies the address of input/output unit 1/08 defined on the memory address space d in Figure 2.

コントロールレジスタ17とシーケンスレジスタSQR
1 8からのデータを使う。
Control register 17 and sequence register SQR
Using data from 18.

タイマなどビット指定のあるものとないものでシーケン
スレジスタSQR18からのデータ長がことなるので、
その切換も行なう。8 SSTR20(シーケンスステ
ータスレジスタ)…同図eシーケンス演算に必要な演算
入力、途中経過演算結果を保持するレジス夕である。
The data length from the sequence register SQR18 is different depending on whether there is a bit specification such as a timer or not.
The switching is also performed. 8 SSTR20 (sequence status register): This is a register that holds calculation inputs and intermediate calculation results necessary for sequence calculations.

演算制御ユニットACU5が持つステータス(C,V.
G,L)に対応するのが、FF1,FSFF,FF○,
FF,であり、命令体系を示すプログラムステータスワ
ードの1ビットと共に、これらの4ビットも必要により
保存される。例えば割込みなどが起ると、これらの4ビ
ットは(元のプログラムステータスワード)OLDPS
WのステータスとしてC,V,G,Lの代りに保持され
る。これにより割込み復帰時、直ちにシーケンス演算が
続行できる。INVはFFIとFFOが異なる状態のと
き“1”となり、出力状態を逆転することを示す。
The status (C, V.
G, L) correspond to FF1, FSFF, FF○,
FF, and these four bits are also saved as necessary, along with one bit of the program status word indicating the instruction system. For example, when an interrupt occurs, these 4 bits (original program status word) are OLDPS.
It is held as the status of W instead of C, V, G, and L. This allows sequence operations to continue immediately upon return from an interrupt. INV becomes "1" when FFI and FFO are in different states, indicating that the output state is reversed.

DFF,は、タイマカウンタなどの計数時に使用し、前
回スキャン時の計数用パルス(FF,X)の状態がシー
ケンス用リードライトメモリSRAM24に保存されて
いるので、SRAM24の状態が“0”で今回の計数用
パルスFF,Xが“1”の時、すなわちパルスの立上り
時“1”となる。
DFF is used when counting with a timer counter, etc., and the state of the counting pulses (FF, It becomes "1" when the counting pulse FF,

つまりINV,DFF,は前記4者とはことなり、単に
シーケンス演算のしやすさのためにあるステータスであ
り、割込み時に保存しなくとも再生可能である。FF1
(入力用フリップフロップ)は指定した入出力ユニット
1/05のビット状態を記憶しM円X21から入力する
In other words, INV and DFF are different from the above four statuses, and are simply statuses for ease of sequence calculation, and can be reproduced without being saved at the time of an interrupt. FF1
(Input flip-flop) stores the bit state of the designated input/output unit 1/05 and inputs it from M circle X21.

FSFF(最初のシーケンス用フリツプフロツプ)はア
ウトプットOUT命令のように、シーケンスの終りで使
用される命令以外で“1”になっているとシーケンスの
最初であることを示す。
When FSFF (first sequence flip-flop) is set to "1" in an instruction other than an instruction used at the end of a sequence, such as an output OUT instruction, it indicates that the instruction is at the beginning of the sequence.

すなわちシーケンスの終りで使う命令で“1”となり、
それ以外の命令の時“0”となり、シーケンスの最初を
識別する。シーケンスの最初では通常の処理とことなり
ANDでもORでも単にその状態をもつてくるだけで演
算をしない。FF○(出力用フリツプフロツプ)は、演
算結果を途中結果含め保存するフリップフロップである
In other words, the command used at the end of the sequence becomes "1",
For other instructions, it becomes "0" and identifies the beginning of the sequence. At the beginning of the sequence, unlike normal processing, AND or OR simply brings the state and does not perform any calculations. FF◯ (output flip-flop) is a flip-flop that stores calculation results including intermediate results.

FF,(NOIのフリツブフロツプ)は、補助的なフリ
ッブフロップであり、FFOを一時保存したりする。
FF (NOI's flip-flop) is an auxiliary flip-flop that temporarily stores FFO.

例えば、AND/OR命令などの時、今までの演算結果
をFF○,FF,にセィブするのに使う。■ MP×(
マルチプレクサ21)…第2図e指定10のワードを講
出した時、そのうちの指定ビットのみを1箇だけFFI
へ送るための選択回路である。
For example, when using an AND/OR instruction, it is used to save the results of the previous calculations to FF○, FF. ■ MP×(
Multiplexer 21)...Fig. 2 e When the specified 10 words are transmitted, only one specified bit is FFIed.
This is a selection circuit for sending to.

M MR22(マスクレジスタ)…第2図fmVが“1
”の時、すなわち指定ワードの指定ビットの状態を転送
する必要がある時、元のワード状態と排他的論理和(E
XOR)をとれば逆転できるようなマスクワードを発生
する。
M MR22 (mask register)...Fig. 2 fmV is “1”
”, that is, when it is necessary to transfer the state of the specified bit of the specified word, the exclusive OR (E
XOR) generates a mask word that can be reversed.

例えばMSBを逆転するとき次のようになる。(トー
SROM23(シーケンスROM)本発明の要部をなす
ものであり、シーケンス演算の1マイクロステップの短
かい間に実行できるものである。シーケンス演算は、シ
ーケンスステータスレジスタSSTR2 0のFSFF
,FFo,FF,,INVの4つを求めることが中心的
仕事となる。FSFF,FFo,FF,,NVは、命令
コード(Nを含む)FSFF,FFo,FF,,FF1
,PON,SIMを変数とする関数である。故に変数の
すべて組合せに対するFSFF,FFo,FF,,IN
Vを指定すれば演算が実行される。SROM23ではR
OMのアドレスをこれらの変数とし、読出出力をFSF
F,FFo,FF,,MVとしている。次にROMの中
味を具体的に説明する。AND命令の例 ここでは以下のような演算が行なわれる。
For example, when reversing the MSB, the following occurs. (toe
SROM 23 (sequence ROM) This is a main part of the present invention, and can be executed in a short period of one microstep of sequence calculation. Sequence operation is performed using FSFF of sequence status register SSTR20.
, FFo, FF, and INV are the main tasks. FSFF, FFo, FF,, NV is the instruction code (including N) FSFF, FFo, FF,, FF1
, PON, and SIM as variables. Therefore, FSFF,FFo,FF,,IN for all combinations of variables
If V is specified, the calculation will be executed. In SROM23, R
Set the address of OM to these variables and read output to FSF
F,FFo,FF,,MV. Next, the contents of the ROM will be specifically explained. Example of AND instruction Here, the following operation is performed.

すなわち、FSFFが“0”の時 FF。In other words, when FSFF is “0” FF.

・(FF1・N+FF1・N)→FF。FSFFが“1
”の時FF1・N+FF1・N→FF。
・(FF1・N+FF1・N)→FF. FSFF is “1”
”, FF1・N+FF1・N→FF.

以上のことからROMでは変数(アドレス)と出力との
関係は第1表のように表わされる。
From the above, the relationship between variables (addresses) and outputs in ROM is expressed as shown in Table 1.

第1表で×印は“0”でも“1”でも出力は同じである
ことを表わしている。実際には、命令コードを含めて、
ROMのアドレスとして上記ROM出力を得る。第1表 AND/OR命令の例 AND/ORでは、ANDをとった結果と前段とのOR
をとるものであるが、命令が他の命令からAND/OR
になった場合と、前の命令もAND/ORの場合で動作
がことなるので、A/OR・SとA/ORと2つの命令
コードを持っている。
In Table 1, the x mark indicates that the output is the same whether it is "0" or "1". Actually, including the instruction code,
The above ROM output is obtained as the ROM address. Table 1 Examples of AND/OR commands AND/OR involves ORing the result of AND with the previous step.
However, the instruction can be AND/ORed from other instructions.
Since the operation is different depending on whether the previous instruction is AND/OR or the previous instruction is AND/OR, it has two instruction codes: A/OR・S and A/OR.

しかしシーケンス表現は第3図のように同一である。第
2表は第3図のシーケンスのメモリ内記億状態を示すも
のであり、又第3表は第3図のシーケンスのシーケンス
命令を説明するものである。第2表アドレス 内
容 I A ・ 2 A N2 3 0R 3 4 A/OR.S 4 5 A/OR 5 6 00T 16 7 A 6 8 PR RIO 9 T RII 10 0UT 17 11 A 7 12 RST 8 13 PR R12 14 0 R13 15 0UT 18 第3表 A (ア ン ド) すべての入力のANDをと
るOR ( オ ア)) すべての入力のORをと
るA/OR (ァンド/オァ) ANDをとっ
た結果と前段とのORをとる○UT くアウトプッ
ト) 出 力A/OR.S (ァンド/ォァ)
A/OR と同じであるが、A久ORのブロックの最初
を示すoPR (プリセット) タイマ,ヵゥン
タなどの設定T くタ イ マ) ォンディレィ
タィマの現在値RST くりセット) ANDが成
立しないとヵヮンタリセット○ (カウンタ)アッ
プ力ウンタA/OR.Sでは FFO→FFI FFI .N+FF1,N−ナFF。
However, the sequence representation is the same as shown in FIG. Table 2 shows the state of storage in memory of the sequence of FIG. 3, and Table 3 explains the sequence instructions of the sequence of FIG. Address in Table 2
Volume I A ・ 2 A N2 3 0R 3 4 A/OR. S 4 5 A/OR 5 6 00T 16 7 A 6 8 PR RIO 9 T RII 10 0UT 17 11 A 7 12 RST 8 13 PR R12 14 0 R13 15 0UT 18 Table 3 A (And) All inputs OR (OR) which takes AND) A/OR (AND/OR) which takes OR of all inputs (AND/OR) ORs the result of AND with the previous stage ○UT Output) Output A/OR. S (and/oah)
Same as A/OR, but oPR indicating the beginning of the A-OR block (preset) Setting of timer, counter, etc. Current value of delay timer RST (Reset) AND does not hold and Counter reset ○ (Counter) Up force counter A/OR. In S, FFO→FFI FFI. N+FF1, N-naFF.

A/OR では FFI+FF。In A/OR FFI+FF.

‐くFFI‐N+FFI‐N)→FF。以上のような演
算を行なう。前記ANDと同じように、すべての条件に
対してROMを作ればよいわけである。ROMの中味は
省略する。以上のようにROMを使用することにより{
11 高集積度のLSIにより、IC数1の固分の論理
演算が1〜2個のROMでできる。
-FFI-N+FFI-N)→FF. The above calculations are performed. As with the AND, it is sufficient to create a ROM for all conditions. The contents of the ROM are omitted. By using ROM as described above, {
11 Highly integrated LSI allows solid logic operations with one IC to be performed using one or two ROMs.

例えば、本実施例で命令コード(Nを含む)分を5ビッ
トとすると、変数はすべて11ビットであるからIK×
4ビットのROM2個により実現できる。‘2’ 演算
は、その演算の複雑さに関係なく、同一の演算速度でで
きる。またその速度は高速であり、例えばバイポーラR
OMを使えばアクセス時間60〜7叫Sですむ。ICの
場合では命令コードのデコード時間であり、また論理に
よりにの使用個数がことなり、まちまちの速度で、最低
の速度の論理により、演算速度が決められてしまう。
For example, in this embodiment, if the instruction code (including N) is 5 bits, all variables are 11 bits, so IK×
This can be realized using two 4-bit ROMs. '2' operations can be performed at the same speed regardless of the complexity of the operation. Also, the speed is high, for example, bipolar R
If you use OM, the access time will be 60 to 7 seconds. In the case of an IC, it is the decoding time of the instruction code, and the number of chips used varies depending on the logic, so the operation speed is determined by the logic with the lowest speed.

‘31 論理の訂正、変更、追加が簡単に行ないる。'31 Logic can be easily corrected, changed, and added.

なお、ROMの代りにプログラマブルロジツクアレイP
LA(Progammaがe功gicNray)を使用
することにより、不要な論理を除くことができる。例え
ば、ANDの例では、ROMの出力としてFFoが“1
”になる6とおりの論理のみが意味があるので、6つの
場合のAND条件の論理と、それら6つを○Rした論理
をつくればよい。PLAはAND用ROMとOR用RO
Mの組合せであるから2種のROMでも実現できる。扮
;SRAM24(シーケンスRAM)SRAM24は前
記したように、カウンタ、タイマなど計数を行なう現在
値の計数パルスの状態を記憶するものであり、セレクタ
SEL26ではカウンタの時はFF,を、タイマの時は
CR17のCLKを選択し、FF,Xとし、必要タイミ
ングでSRAMへストアする。
Note that programmable logic array P is used instead of ROM.
By using LA (Progamma uses e-gicNray), unnecessary logic can be removed. For example, in the AND example, FFo is “1” as the ROM output.
” is meaningful, so all you have to do is create logic for the AND conditions for the six cases and logic for ○R for those six cases.PLA has a ROM for AND and a RO for OR.
Since it is a combination of M, it can be realized even with two types of ROM. Function: SRAM 24 (Sequence RAM) As mentioned above, the SRAM 24 stores the state of the current value of the counting pulse for counting by a counter, timer, etc., and the selector SEL 26 stores FF when it is a counter and FF when it is a timer. Select CLK of CR17, set it as FF and X, and store it in SRAM at the required timing.

ストアする番地は現在値のストアされているメモリM7
のワード1こ対応させる。タイマ,カウンタが1024
個まで使用するなら1024語×1ビットのRAMI個
でよい。SRAM24の内容は、次回パルスの立上りを
チェックするため状態変化検出部CD25にてSRAM
・FF,Xの演算を行ない、これがDFF,となる。
The address to store is memory M7 where the current value is stored.
Match one word. Timer and counter are 1024
If up to 1024 words x 1 bit RAM is used. The contents of the SRAM24 are stored in the SRAM by the state change detection unit CD25 in order to check the rising edge of the next pulse.
- Perform calculations on FF and X, and this becomes DFF.

DFF,が“1”ならパルスの立上りであるから、カウ
ントアップが行なわれる。以上のべてきた‘イー〜扮の
ハードウェアはROM2の3つの部分のROMをDEC
12でデコードして作られたマイクロ命令で制御される
If DFF is "1", it is the rising edge of a pulse, and therefore a count-up is performed. The hardware of the above-mentioned ``E~'' is the ROM of the three parts of ROM2.
It is controlled by microinstructions created by decoding with 12.

このマイクロ命令は次のように表わされる。・CBUS
→CRへメモリする。
This microinstruction is expressed as follows.・CBUS
→Memory to CR.

・CBUS→SQRへメモリする。・Memory from CBUS to SQR.

・lOADR→CBUSへ出力する。・Output from lOADR to CBUS.

・CBUS→SSTRへメモリする。・Memory from CBUS to SSTR.

・SSTR→CBUSへ出力する。・Output from SSTR to CBUS.

・CBUSの内容をMPXで一つに選択し、SSTRの
FFIでメモリする。
- Select one content of CBUS using MPX and store it in memory using FFI of SSTR.

・MR →CBUSへ出力する。・MR → Output to CBUS.

・SROMの演算を行ないSSTRの4ビット分へメモ
リすると共に、カウンタ.タイマの場合FF,XをSR
AMへメモリする。
- Performs SROM calculations and stores them into 4 bits of SSTR, and also stores counter. For timer, FF, X is SR
Memory to AM.

以上8種により制御される。It is controlled by the above eight types.

いうまでもなく同時に演算制御ユニットACU5の持つ
通常のマイクロ命令も活かされている。以上で本発明の
構成についての説明が終り、次に第3図及び第4図を基
にして動作を説明する。
Needless to say, at the same time, the normal microinstructions of the arithmetic control unit ACU5 are utilized. This concludes the explanation of the configuration of the present invention, and next, the operation will be explained based on FIGS. 3 and 4.

第3図は寒暖点図記号でかかれたシ−ケンスであり、こ
れらは前記(第2表)のようにメモ川こストアされ順次
実行される。同図aはデバイス1とデバイス2の否定の
ANDをとり、その結果とデバイス3とを○Rし、その
結果と、デバイス4,5のANDした結果とを○Rして
デバイス16へ前記第3表のように出力する。プール代
数で表わせば(1・2)十3十(4・5)→16 となる。
FIG. 3 shows a sequence drawn with temperature and temperature symbols, which are stored in a memo and executed sequentially as described above (Table 2). In the figure a, the negative AND of device 1 and device 2 is performed, the result is ○Red for device 3, the result is ○Red for the AND result of devices 4 and 5, and the result is ○Red for device 16. Output as shown in Table 3. Expressed in pool algebra, it becomes (1.2) 130 (4.5) → 16.

同図bは、タイマでありデバイス6が“1”となると、
ワード101こストアされた設定値にワ−ド11にある
現在値が等しくなるまでの時間後デバイス17が出力す
る(‘‘1”となる)。
Figure b is a timer, and when device 6 becomes "1",
After a period of time until the current value in word 11 becomes equal to the set value stored in word 101, device 17 outputs (becomes ``1'').

同図cはカウンタであり、デバイス8が“1”であれば
、デバイス7が“1”になる毎にカウントアップされ、
ワード13に現在値がストアされる。ワード12には設
定値がストアされており、設定値に現在値が達するとデ
バイス18は“1’’となる。デバイス8が“0”にな
るとカウンタはリセットされ、現在値は“0”に出力も
“0”となる。第3図aを例として(第2表)および第
4図により説明する。
C in the figure is a counter, and if device 8 is "1", it counts up every time device 7 becomes "1",
Word 13 stores the current value. The set value is stored in word 12, and when the current value reaches the set value, device 18 becomes "1". When device 8 becomes "0", the counter is reset and the current value becomes "0". The output is also "0".This will be explained using FIG. 3a as an example (Table 2) and FIG.

… アドレスーでは50にてA,なるシーケンスがフィ
ツチされ、演算制御ユニットACU5へしまわれると共
に、シーケンスレジスタSQR18へもストアされる。
... At address 50, the sequence A is fitted and stored in the arithmetic control unit ACU5, as well as in the sequence register SQR18.

51にて10アドレスレジスタlOADRI 9の示す
ワードをパスコントロールュニットBCU6へ送り1/
0の状態が流出される。デバイスーは16で割ると商が
0、余りが1であるから、ワード0が読出される。(こ
こでワード0とは1/0開始番地を起点とするワード数
を表わしている)。次に謙出された状態がマルチプレク
サM円X21をとおして1ビット目がFFIへストアさ
れる。52にてSROM23により演算が行なわれシー
ケンスステータスレジスタSSTR20へストアされる
At step 51, the word indicated by the 10 address register lOADRI 9 is sent to the path control unit BCU6.
The state of 0 is leaked. When the device is divided by 16, the quotient is 0 and the remainder is 1, so word 0 is read. (Here, word 0 represents the number of words starting from the 1/0 starting address). Next, the first bit of the extracted state is stored in the FFI through the multiplexer Mx21. At 52, the SROM 23 performs an operation and stores the result in the sequence status register SSTR20.

同じようにアドレス2〜5まで実行される。t口)アド
レス6では、53にてOUT1 6なるシーケンスがフ
ェツチされ、演算制御ユニットACU5へしまわれると
共に、シーケンスレジスタSQR1 8へもストアされ
る。
Addresses 2 to 5 are executed in the same way. At address 6, the sequence OUT16 is fetched at 53 and stored in the arithmetic and control unit ACU5, as well as in the sequence register SQR18.

54にて51と同じくデバイス16の肉客が謙出され、
FFIへストアされる。
At 54, like 51, the flesh customer of device 16 is exposed,
Stored in FFI.

55にてSROM23によりFSFFのセット及びFF
IとFFoからデバイス16をインバートするかどうか
を決定し、INVなどを演算する。
At 55, set FSFF and FF using SROM23.
It is determined whether or not to invert the device 16 from I and FFo, and INV etc. are calculated.

56にてmVにしたがってマスクレジスタMR22にマ
スク語が作られ、演算制御ユニットACU5へしまわれ
、54にて議出したワード1とEXORされ、57にて
それがパスコントロールュニットBCU6へ送られ、斑
にてワード1に書込まれる。
At 56, a mask word is created in the mask register MR22 according to mV, and stored in the arithmetic control unit ACU5, EXORed with the word 1 set at 54, and sent to the pass control unit BCU6 at 57. Written to word 1 in spots.

次に第3図bのタイマについて説明する。Next, the timer shown in FIG. 3b will be explained.

し一 アドレス7は前記‘ィ}と同じ動作である。However, address 7 has the same operation as above.

片 アドレス8では、まず60にてPRR,。が諸出さ
れ、演算制御ユニットACU5とシーケンスレジスタS
QR18へしまわれる。61にて10アドレスレジスタ
lOADR1 9の示すワードをパスコントロールュニ
ツトBCU6へ送り1/0の状態が謎出される。
At address 8, first, PRR at 60. are taken out, and the arithmetic control unit ACU5 and sequence register S
It is stored in QR18. At step 61, the word indicated by the 10 address register lOADR19 is sent to the path control unit BCU6, and the state of 1/0 is revealed.

これはワード10であり、プリセツト値であり、演算制
御ユニットACU5の図にないジェネラルレジスタGR
14へストアされる。62にてSROM23によりFF
This is word 10, a preset value, and a general register GR (not shown) of the arithmetic control unit ACU5.
14. FF by SROM23 at 62
.

をFF,ヘセーブするような演算が行なわれる。■ ア
ドレス9では、まず65にて60と同じく命令フエツチ
し、同じく66にて、61と同じくプリセット値の代り
に現在値を議出し、演算制御ユニットACU5の図にな
いジヱネラルレジスタGR15へストアする。次に67
ではシーケンスステータレジスタSSTR20を論出し
、演算制御ユニットACU6へ入れ、FFoが“1”か
(つまり、タイマを動かせるか)を判定し、“1”なら
磯にて現在値をインクリメントするか(DFF,にて判
定)を判定し、必要なら69にて現在値ジェネラルレジ
スタGR15をインクリメントし、70にてジエネラル
レジスタGR1 4と現在値を比較し、現在値がプリセ
ット値以上なら72にて、現在値をプリセット値と同じ
くする。
An operation such as saving the FF to the FF is performed. ■ At address 9, the instruction is first fetched at 65 as in 60, and the current value is set in 66 instead of the preset value as in 61, and stored in the general register GR15 (not shown) of the arithmetic control unit ACU5. do. Next 67
Then, the sequence status register SSTR20 is discussed, inputted into the arithmetic control unit ACU6, and it is determined whether FFo is "1" (that is, whether the timer can be operated), and if it is "1", the current value is incremented at Iso (DFF, If necessary, increment the current value general register GR15 at 69, compare the current value with general register GR14 at 70, and if the current value is greater than or equal to the preset value, increment the current value at 72. is the same as the preset value.

また、67の後でFFoが“0”なら75にて現在値ジ
ヱネラルレジスタGR1 5を“0”とする。
If FFo is "0" after 67, the current value general register GR15 is set to "0" at 75.

そして71,74,76では演算制御ユニットACU5
からシーケンスステータスレジスタSSTR20へFF
oが“1”又は“0”になるように書込む。FFoを“
1”にするのは74の場合のみである。その後73にて
、FF,をSRAM24へストアする。N アドレス1
0は、{ローと同じなので省略する。
And in 71, 74, 76, arithmetic control unit ACU5
FF from to sequence status register SSTR20
Write so that o becomes "1" or "0". FFo “
1" is set only in the case of 74. Then, in 73, FF, is stored in the SRAM 24. N address 1
0 is omitted because it is the same as {row.

以上各シーケンスの実行状態について説明したが、割込
み時、プログラムステータスワード蛸Wとして命令体系
がどちらにあるかを保存するばかりでなく、CVGLの
ごときコンディションコードの代りに、シーケンスのコ
ンディションコードFF1,FSFF,FFo,FF,
を命令体系にしたがって使用する。すなわちシーケンス
を実行中に割込みが起れば、シーケンスのコンディショ
ンコードを掩Wとして保存し、割込みからの復帰時は、
これらをシーケンスステータレジスタSSTR20へ復
帰させる。以上により本発明においては、(i)マイク
ロプログラマブルなマイクロプロセッサを使い、シーケ
ンス実行用ハードを付加し、これらのハードウェアをマ
イクロ命令で制御する。
The execution status of each sequence has been explained above, but at the time of an interrupt, not only the instruction system is stored as the program status word W, but also the sequence condition code FF1, FSFF is used instead of a condition code such as CVGL. ,FFo,FF,
Use according to the command system. In other words, if an interrupt occurs while a sequence is being executed, the condition code of the sequence is saved as a code W, and when returning from the interrupt,
These are returned to the sequence stator register SSTR20. As described above, in the present invention, (i) a microprogrammable microprocessor is used, sequence execution hardware is added, and this hardware is controlled by microinstructions.

(ii)シーケンス実行用ハードウェアでは、シーケン
スの実行がROMにより高速で実行される。側シーケン
ス実行用ハードウエアにはシーケンス用コンディション
コードを有することを特徴とし、Wシーケンス実行用ハ
ードウェアの付加により、高速でシーケンスが実行でき
る。
(ii) In the sequence execution hardware, the sequence is executed at high speed using ROM. The side sequence execution hardware is characterized by having a sequence condition code, and by adding the W sequence execution hardware, the sequence can be executed at high speed.

‘。}シーケンス実行用ハードウェアをマイクロ命令で
制御するため、タイマ,カウン夕のごとき数値を扱い、
マイクロプロセッサ内で実行する部分と、シーケンス実
行部分がうまく融合して実行できる。し一マイクロプロ
セッサの命令体系とは無関係なメモリを少なく使用する
シーケンス用命令体系をつくりうる。0シーケンス実行
用ハードウェアのマイクロ命令と、通常のマイクロ命令
の両者が使え、高速な動作が可能である。
'. }In order to control the sequence execution hardware with microinstructions, we handle numerical values such as timers and counters.
The part executed within the microprocessor and the sequence execution part can be successfully integrated and executed. However, it is possible to create a sequence instruction system that uses less memory and is unrelated to the instruction system of a microprocessor. Both hardware microinstructions for 0 sequence execution and normal microinstructions can be used, allowing high-speed operation.

的シーケンス実行中の任意な割込みが許される。NRO
Mによるシーケンス演算であるから、高速で、しかも追
加変更がし易い等、幾多顕著な効果を具備したシーケン
スコントローラを提供できる。
Arbitrary interruptions during the execution of a physical sequence are allowed. N.R.O.
Since the sequence calculation is performed using M, it is possible to provide a sequence controller that has many remarkable effects, such as high speed and easy addition and modification.

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

図面は本発明の一実施例を示し、第1図は本発明の概略
の構成を示すブロック図、第2図はシーケンス実行用ハ
ードウェアの詳細説明図、第3図はシーケンス例図、第
4図はシ−ケンス実行フローチャートである。 ROM1,2・・・・・・リードオンリメモリ、SW・
…・・スイッチ、DEC・・・・・・デコーダ、SEL
・・・・・・セレクタ、SRAM・・・・・・シーケン
ス用リードライトメモリ、SROM・・・…シーケンス
用リードオンリメモリ、ACU・・・・・・演算制御ユ
ニット、BCU・・・・・・パスコントロールユニツト
、M……メモリ、1/0…・・・入出力ユニット、SQ
R・・・・・・シーケンスレジス夕、CR.・・・・・
コントロールレジスタ、lOADR・・・・・・1/0
アドレスレジスタ、SSTR・・・・・・シーケンスス
テータスレジスタ、MPX・・・・・・マルチプレクサ
、M円・・・・・・マスクレジスタ、CD・・・・・・
状態変化検出部。 第3図 第1図 第4図 第2図 第4図
The drawings show one embodiment of the present invention; FIG. 1 is a block diagram showing a general configuration of the present invention, FIG. 2 is a detailed explanatory diagram of sequence execution hardware, FIG. 3 is a sequence example diagram, and FIG. The figure is a sequence execution flowchart. ROM1,2...Read only memory, SW・
...Switch, DEC...Decoder, SEL
...Selector, SRAM... Read/write memory for sequence, SROM... Read only memory for sequence, ACU... Arithmetic control unit, BCU... Path control unit, M...Memory, 1/0...Input/output unit, SQ
R... Sequence Regis Yu, CR.・・・・・・
Control register, lOADR...1/0
Address register, SSTR...Sequence status register, MPX...Multiplexer, M circle...Mask register, CD...
State change detection section. Figure 3 Figure 1 Figure 4 Figure 2 Figure 4

Claims (1)

【特許請求の範囲】[Claims] 1 マイクロプログラム可能なマイクロプロセツサを備
えたシーケンスコントローラにおいて、汎用命令語とシ
ーケンス命令語を具備した汎用命令用マイクロプログラ
ムとシーケンス命令用マイクロプログラムと、その切換
回路と、シーケンス用命令語実行のためのシーケンス演
算用リードオンリメモリと、演算結果を保持するレジス
タと、前記シーケンス演算用リードオンリメモリへの条
件を与えるレジスタを設けたことを特徴とするシーケン
スコントローラ。
1. In a sequence controller equipped with a microprogrammable microprocessor, a general-purpose instruction microprogram and a sequence instruction microprogram equipped with a general-purpose instruction word and a sequence instruction word, a switching circuit thereof, and a sequence instruction word execution A sequence controller comprising: a read-only memory for sequence calculations; a register for holding calculation results; and a register for providing conditions to the read-only memory for sequence calculations.
JP51106709A 1976-09-08 1976-09-08 sequence controller Expired JPS6013203B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP51106709A JPS6013203B2 (en) 1976-09-08 1976-09-08 sequence controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP51106709A JPS6013203B2 (en) 1976-09-08 1976-09-08 sequence controller

Publications (2)

Publication Number Publication Date
JPS5332283A JPS5332283A (en) 1978-03-27
JPS6013203B2 true JPS6013203B2 (en) 1985-04-05

Family

ID=14440496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP51106709A Expired JPS6013203B2 (en) 1976-09-08 1976-09-08 sequence controller

Country Status (1)

Country Link
JP (1) JPS6013203B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56105505A (en) * 1980-01-25 1981-08-22 Hitachi Ltd High-speed sequence control device with numerical operation function
JPS5723110A (en) * 1980-07-18 1982-02-06 Hitachi Ltd Sequence controller
JPS61100802A (en) * 1984-10-22 1986-05-19 Toshiba Mach Co Ltd Operation processing system of programmable sequence controller
JPS61100803A (en) * 1984-10-22 1986-05-19 Toshiba Mach Co Ltd Programmable sequence controller capable of high-speed i/o transfer

Also Published As

Publication number Publication date
JPS5332283A (en) 1978-03-27

Similar Documents

Publication Publication Date Title
US4181942A (en) Program branching method and apparatus
EP0315275B1 (en) Flexible asic microcomputer
JP4121527B2 (en) Data processing method
US4274138A (en) Stored program control system with switching between instruction word systems
EP0231928B1 (en) Program control circuit
EP0286354A2 (en) A method and apparatus for modifying micro-instructions using a macro-instruction pipeline
US4130869A (en) Microprogram controlled system
EP0735462A2 (en) Method and apparatus for selectively controlling interrupt latency in a data processing system
US4270184A (en) Microprocessor-based programmable logic controller
US4320454A (en) Apparatus and method for operand fetch control
US4649477A (en) Operand size mechanism for control simplification
US4656581A (en) Vector mask control system
EP0497485A2 (en) Computer for implementing two-operand instructions
JPS6013203B2 (en) sequence controller
US5161229A (en) Central processing unit
US5301338A (en) System including central processing unit
US20030097543A1 (en) Immediate operands
EP0012242B1 (en) Digital data processor for word and character oriented processing
CA2016145C (en) Control device having a function of modifying a micro instruction
US4831572A (en) Polynomial vector arithmetic operation control system
KR100188374B1 (en) Central processing unit and an arithmetic operation processing unit
US5345570A (en) Microprogram control circuit
EP0136699B1 (en) Programmable controller
US4271484A (en) Condition code accumulator apparatus for a data processing system
JP3190945B2 (en) Micro program control circuit