JPH02140805A - Sequence controller - Google Patents

Sequence controller

Info

Publication number
JPH02140805A
JPH02140805A JP29351188A JP29351188A JPH02140805A JP H02140805 A JPH02140805 A JP H02140805A JP 29351188 A JP29351188 A JP 29351188A JP 29351188 A JP29351188 A JP 29351188A JP H02140805 A JPH02140805 A JP H02140805A
Authority
JP
Japan
Prior art keywords
data
bit
memory
reference clock
edge
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.)
Pending
Application number
JP29351188A
Other languages
Japanese (ja)
Inventor
Shinya Kominami
小南 真也
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP29351188A priority Critical patent/JPH02140805A/en
Publication of JPH02140805A publication Critical patent/JPH02140805A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To process a sequence edge instruction with one bit cpu by one step by storing instruction decoding and a data input in a result register at the raising time of a reference clock and a judgement result at the falling time of the reference clock. CONSTITUTION:At the raising time of the reference clock in a clock generator 6, a data signal from I/O 7 is inputted to the (a) terminal of a rising element 14 as address bit data through an I/O bit selector 8. On the other hand, a data signal from an I/O memory 4 is latched by a memory data/bit selector 9 and is inputted to the (b) terminal of the rising element 14 as one bit data. At the falling time of the reference clock, the output of the element 14 is written into the result register 12 of one bit cpu 1, the data from I/O 7 is stored in the I/O memory 4 through a memory buffer 16. Thus, the sequence edge instruction can be performed without shifting a control right to a multi bit micro computer 2 with one bit cpu 1 by one step.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、1ビットQpuとマルチビットマイコンとを
組合せてなるシーケンスコントローラに関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a sequence controller that combines a 1-bit Qpu and a multi-bit microcomputer.

(従来の技術) 一般に、1ビットcpuにより構成したシーケンスコン
トローラ(以下、単にコントローラという)は、基本命
令を1ステツプで処理可能であるが、演算命令やエツジ
命令のように記憶を伴う判断処理は困難である。一方、
マルチビットマイコン(以下、M・マイコンと略す)に
より構成したコントローラは、シーケンス命令を実行す
る1ステツプが、前記1ビットQpuの場合の数倍の処
理時間がかかり、そのため、近時は上記両者を組合せて
両方の長所をもつコントローラが提案されている。
(Prior Art) In general, a sequence controller (hereinafter simply referred to as a controller) configured with a 1-bit CPU can process basic instructions in one step, but it cannot process judgment processes that involve storage, such as arithmetic instructions or edge instructions. Have difficulty. on the other hand,
In a controller configured with a multi-bit microcomputer (hereinafter abbreviated as M-microcomputer), one step of executing a sequence instruction takes several times the processing time of the 1-bit Qpu, so recently both of the above are being used. Controllers have been proposed that combine the best of both worlds.

第5図は、そのようなコントローラの従来例を示す構成
図で、1ビットapulの入力部と8ビットマイコン2
のデータバス3との間に、1ワード8ビットのI/Oメ
モリ4を設けて、プログラムメモリ5に格納されている
シーケンスプログラムをクロックジェネレータ6の基準
クロックに同期して読み出させ、そのシーケンス命令を
順次解読する。
FIG. 5 is a block diagram showing a conventional example of such a controller, which includes a 1-bit Apul input section and an 8-bit microcontroller 2.
An I/O memory 4 of 8 bits per word is provided between the data bus 3 and the sequence program stored in the program memory 5 is read out in synchronization with the reference clock of the clock generator 6. Decoding the instructions sequentially.

それにより、入力関連の基本命令は、第6図に示したよ
うに、1ビットcpulがl/O7がらデータを読込み
処理すると同時に、I/Oメモリ4のデータを更新し、
また、出方関連の基本命令は、第7図のようにl/O7
にデータを出方するとともに、I/Oメモリ4のデータ
を更新し、さらに、シーケンス命令が演算処理やエツジ
命令のような記憶を伴う判断処理をする応用命令は、第
8図のようにl/O7やI/Oメモリ4に対する制御権
が1ビットcpulから8ビットマイコン2に移り、そ
れにより、入力関連の応用命令は、8ビットマイコン2
がl/O7からデータの読込み処理とI/Oメモリ4の
データの更新をする。
As a result, the input-related basic commands, as shown in FIG.
In addition, basic commands related to output are l/O7 as shown in Figure 7.
Application instructions that output data to the I/O memory 4, update data in the I/O memory 4, and perform judgment processing involving storage such as arithmetic processing or edge instructions, as shown in Figure 8, are applied instructions. Control authority over the /O7 and I/O memory 4 is transferred from the 1-bit cpul to the 8-bit microcomputer 2, and as a result, input-related application instructions are transferred to the 8-bit microcomputer 2.
reads data from the I/O 7 and updates data in the I/O memory 4.

その際、8ビットマイコン2は、命令処理とI/Oメモ
リ4の読出しや記憶処理のために、数ステップから数十
ステップの処理を行うことになる。
At this time, the 8-bit microcomputer 2 performs several steps to several tens of steps for instruction processing and reading and storage processing of the I/O memory 4.

(発明が解決しようとする課題) そのため、従来はシーケンス応用命令の実行は、1ビッ
トcpulから8ビットマイコン2へ制御権を移すステ
ップと、8ビットマイコン2がシーケンス命令を処理す
るステップと、およびI/Oメモリ4のデータを読み出
し、更新するステップのための処理時間は、1ビットc
pulが1ステツプで処理するのに比較して数倍の処理
時間がかかる欠点があった。
(Problem to be Solved by the Invention) Therefore, conventionally, execution of a sequence application instruction involves the steps of transferring control from the 1-bit CPU to the 8-bit microcomputer 2, the step of the 8-bit microcomputer 2 processing the sequence instruction, and The processing time for the step of reading and updating data in the I/O memory 4 is 1 bit c.
This method has the disadvantage that it takes several times as much processing time as pul's one-step processing.

本発明は、上記の欠点を排除したコントローラの提供を
目的とする6 (課題を解決するための手段) 本発明は上記の目的を、1ビットcpuとM・マイコン
とを組合せたコントローラにおいて、1ビットQpuの
入力部とマイコンのデータバス上に、I/O状態を記憶
するI/Oメモリと、そのI/Oメモリからの出力デー
タのビット指定とラッチを行うメモリデータ・ビットセ
レクタと、■/Oからのデータのビット指定を行うI/
Oデータビットセレクタと、その出力データと前記メモ
リデータ・ビットセレクタの出方データとにより。
The present invention aims to provide a controller that eliminates the above-mentioned drawbacks. An I/O memory that stores the I/O status and a memory data bit selector that specifies and latches bits of output data from the I/O memory are provided on the input part of the bit Qpu and the data bus of the microcontroller; I/O that specifies bits of data from /O.
O data bit selector, its output data and the output data of the memory data bit selector.

エツジ判定を行う論理素子を設け、基準クロックの立上
がりでシーケンスエツジ命令コードで指定されたアドレ
スのI/Oデータの読出しと、工/Oメモリの前記所定
アドレスに対応するアドレスのデータを読み出し、基準
クロックの立下がりで前記ラッチされたI/Oメモリの
データと前記I/Oデータとのエツジ判定を上記論理素
子により行わせ、次の基準クロックの立上がりで前記判
定結果を1ビットQpuのりザルトレジスタに書き込む
と同時に、I/Oメモリのデータを更新する構成により
達成する。
A logic element that performs edge determination is provided, and at the rising edge of the reference clock, the I/O data at the address specified by the sequence edge instruction code is read, and the data at the address corresponding to the predetermined address of the E/O memory is read out, and the reference clock is read out. At the falling edge of the clock, the logic element performs an edge judgment between the latched I/O memory data and the I/O data, and at the rising edge of the next reference clock, the judgment result is transferred to the 1-bit Qpu output register. This is achieved by a configuration that updates data in the I/O memory at the same time as writing.

(作 用) 以上のように構成する本発明によれば、シーケンス応用
命令が判断処理であるシーケンスエツジ命令の場合、1
ビットcpuはM・マイコンに制御権を移すことなく、
基準クロックの立上がりで命令解読とデータ入力とを、
また、基準クロックの立下がりで判断結果をリザルトレ
ジスタに格納するとともに、I/Oメモリのデータの更
新を行うから、シーケンスエツジ命令を1ビットcpu
が1ステツプで行う処理が可能になる。
(Operation) According to the present invention configured as described above, when the sequence application instruction is a sequence edge instruction that is a judgment process, 1
The bit CPU does not transfer control to the M/microcontroller,
Instruction decoding and data input are performed at the rising edge of the reference clock.
Also, since the judgment result is stored in the result register and the data in the I/O memory is updated at the falling edge of the reference clock, the sequence edge instruction can be executed by 1-bit CPU.
It becomes possible to perform processing in one step.

(実施例) 第1図は本発明の一実施例のコントローラの構成を示し
、前回までと同じ符号は、同じまたは同一機能のものを
指している。
(Embodiment) FIG. 1 shows the configuration of a controller according to an embodiment of the present invention, and the same reference numerals as in the previous times refer to those with the same or identical functions.

1ビットcpulの入力部と8ビットマイコン2との間
には、命令コードが格納されたプログラムメモリ5によ
ってアドレスが指定された、工/O7から入力される8
ビットデータのビット指定を行うI/Oビットセレクタ
8と、l/O7の状態を記憶しているI/Oメモリ4と
、これから出力される前記所定アドレスに対応するアド
レスの8ビットのビット指定とラッチを行うメモリデー
タ・ビットセレクタ9と、これらのI/Oビットセレク
タ8.メモリデータ・ビットセレクタ9の出力を比較す
る論理素子/Oと、前記命令コードによって論理素子/
Oを選択するロジックセレクタ11とを設けている。
Between the input part of the 1-bit cpul and the 8-bit microcomputer 2, there is an 8-bit signal input from the E/O 7 whose address is specified by the program memory 5 in which the instruction code is stored.
An I/O bit selector 8 that specifies the bit data, an I/O memory 4 that stores the state of the l/O 7, and a bit specifier for the 8 bits of the address corresponding to the predetermined address that will be output from now on. A memory data/bit selector 9 that performs latching, and these I/O bit selectors 8. A logic element /O that compares the output of the memory data bit selector 9 and a logic element /O that compares the output of the memory data bit selector 9 and a logic element /O that compares the output of the memory data bit selector 9.
A logic selector 11 for selecting O is provided.

前記1ビットcpulと8ビットマイコン2のクロック
ジェネレータ6からの基準クロックにより、タイミング
コントローラ13は、前記I/Oメモリ4のリード/ラ
イトの制御と、1ビットcpu1の内部のりザルトレジ
スタ12へ書込みパルスを供給する。
Using the reference clock from the 1-bit cpul and the clock generator 6 of the 8-bit microcomputer 2, the timing controller 13 controls read/write of the I/O memory 4 and sends a write pulse to the internal output register 12 of the 1-bit cpu1. supply

第2図はシーケンスプログラムコード、第3図は動作の
タイミングチャートであり、以下、これを参照して説明
する。
FIG. 2 shows a sequence program code, and FIG. 3 shows an operation timing chart, and the following description will be made with reference to these.

初めに、クロックジェネレータ6の基準クロックの立上
がりで〔第3図(a))、第2図のようなプログラムメ
モリ5を読み出し〔同図(b)〕、その命令コードaが
、例えばロード立上がりエツジ命令すであるとき、第1
図のロジックセレクタ11により論理素子/Oの立上が
り素子14を選択するとともに、上記命令コードaで指
定されたアドレスをもつl/O7のデータの選択と〔同
図(Q)、(d))、同じく命令コードaで指定された
ビットをI/Oビットセレクタ8とメモリデータ・ビッ
トセレクタ9とにより選択しく同図(、))、ラッチす
る。
First, at the rising edge of the reference clock of the clock generator 6 (FIG. 3(a)), the program memory 5 as shown in FIG. When the command is the first
The logic selector 11 shown in the figure selects the rising element 14 of the logic element /O, and also selects the data of I/O7 having the address specified by the instruction code a [(Q), (d) in the same figure]. Similarly, the bit designated by the instruction code a is selected by the I/O bit selector 8 and the memory data bit selector 9 and latched as shown in FIG.

l/O7からのデータ信号は、I/Oビットセレクタ8
を介してアドレスビットデータとして前記立上がり素子
14のa端子に入力される。
The data signal from l/O7 is sent to I/O bit selector 8.
The signal is input as address bit data to the a terminal of the rising element 14 via the address bit data.

一方、タイミングコントローラ13からの信号の同期し
た〔同図(f))I/Oメモリ4からのデータ信号〔同
図(h)〕は、メモリデータ・ビットセレクタ9により
ラッチされて〔同図(j)〕、1ビットデータとして前
記立上がり素子14のb端子に入力される。なお、I/
Oデータの立上がりとは、第4図に示すようにデータが
Oから1に変化することをいい、前記立上がり素子14
のb端子がOで、a端子が1のとき、その出力端子Cに
は1が出力される【同図(j)〕。この出力はクロック
ジェネレータ6からの基準クロックの立下がりで〔同図
(a)〕、1ビットcpulのりザルトレジスタ12に
書き込まれる〔同図(k))。
On the other hand, the data signal from the I/O memory 4 [(h) in the same figure] which is synchronized with the signal from the timing controller 13 [(f) in the same figure] is latched by the memory data bit selector 9 [(f) in the same figure]. j)] is input to the b terminal of the rising element 14 as 1-bit data. In addition, I/
The rising of O data means that the data changes from O to 1 as shown in FIG.
When the b terminal of the terminal is O and the a terminal is 1, 1 is output to the output terminal C [FIG. 6(j)]. This output is written into the 1-bit cpul register 12 at the falling edge of the reference clock from the clock generator 6 [(a) in the same figure] and into the output register 12 [(k) in the same figure].

この時、l/O7からのデータはメモリ用バッファ16
を介してI/Oメモリ4に入力されタイミングコントロ
ーラ13からの信号に同期して、前記基準クロックの立
下がりでI/Oメモリ4に書き込まれる〔第3図(g)
)。
At this time, the data from l/O7 is stored in the memory buffer 16.
The signal is input to the I/O memory 4 via the timing controller 13 and written to the I/O memory 4 at the falling edge of the reference clock in synchronization with the signal from the timing controller 13 [Fig. 3 (g)
).

本発明は以上のようにして、第3図に示したように基準
クロックaの立下がりでl/O7とI/Oメモリ4から
のデータで立上がり判断を行い。
According to the present invention, as shown in FIG. 3, the rising edge of the reference clock a is determined based on the data from the l/O 7 and the I/O memory 4 at the falling edge of the reference clock a, as shown in FIG.

基準クロックの立下がりで判断結果のりザルトレジスタ
12への書込みとl/O7のデータのI/Oメモリ4へ
の格納を行うから、シーケンスエツジ命令をM・マイコ
ンに制御権を移すことなく、1ビットcpulがシーケ
ンス基本命令を処理すると同じく、1ステツプで処理可
能になる。
Since the judgment result is written to the output register 12 and the data of l/O7 is stored in the I/O memory 4 at the falling edge of the reference clock, the sequence edge command can be executed in one bit without transferring control to the M/microcontroller. Just as cpul processes sequence basic instructions, it can be processed in one step.

(発明の効果) 以上詳細に説明して明らかなように、本発明は、シーケ
ンス応用命令が記憶を伴う判断処理であるシーケンスエ
ツジ命令の場合、1ビットQpuはM・マイコンへ制御
権を移すことなく、基準クロックの立上がりで命令解読
とデータ入力を行い。
(Effects of the Invention) As is clear from the detailed explanation above, the present invention provides that when the sequence application instruction is a sequence edge instruction that involves judgment processing that involves storage, the 1-bit Qpu transfers the control right to the M/microcontroller. Instead, instructions are decoded and data is input at the rising edge of the reference clock.

基準クロックの立下がりで判定結果をリザルトレジスタ
に格納するとともに、I/Oメモリのデータ更新を行う
から、シーケンスエツジ命令を1ビットcpulステツ
プで処理可能になる。
Since the determination result is stored in the result register and the data in the I/O memory is updated at the fall of the reference clock, sequence edge instructions can be processed in 1-bit cpul steps.

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

第1図は本発明の一実施例の回路ブロック図、第2図は
同じくシーケンスプログラムコードの図、第3図はタイ
ミングチャート、第4図は本発明要部の論理素子と真偽
値衣、第5図は従来例の回路ブロック図、第6図は同じ
く入力関連の基本命令処理図、第7図は同じく出力関連
の基本命令処理図、第8図は従来例の応用命令処理図で
ある。 1・・・1ビットQpu、  2・・・8ビットマイコ
ン、  3・・・データバス、 4・・・I/Oメモリ
、  5・・・プログラムメモリ、  6・・・クロッ
クジェネレータ、 7・・・I 、/ Ol 8・・・
I/Oビットセレクタ、  9・・・メモリデータ・ビ
ットセレクタ、 /O・・・論理素子、11・・・ロジ
ックセレクタ、 12・・・リザルトレジスタ、 13
・・・タイミングコントローラ、l4・・・立上がり素
子、 15・・・立下がり素子。 16・・・メモリ用バッファ。
Fig. 1 is a circuit block diagram of an embodiment of the present invention, Fig. 2 is a sequence program code diagram, Fig. 3 is a timing chart, and Fig. 4 shows the logic elements and truth values of the main part of the present invention. FIG. 5 is a circuit block diagram of the conventional example, FIG. 6 is a basic instruction processing diagram related to input, FIG. 7 is a basic instruction processing diagram related to output, and FIG. 8 is an applied instruction processing diagram of the conventional example. . 1... 1-bit Qpu, 2... 8-bit microcomputer, 3... Data bus, 4... I/O memory, 5... Program memory, 6... Clock generator, 7... I,/Ol 8...
I/O bit selector, 9... Memory data bit selector, /O... Logic element, 11... Logic selector, 12... Result register, 13
...Timing controller, l4...Rise element, 15...Fall element. 16...Memory buffer.

Claims (1)

【特許請求の範囲】[Claims] 1ビットcpuとマルチビットマイコンとを組合せたシ
ーケンスコントローラにおいて、1ビットcpuの入力
部とマイコンのデータバス上に、I/O状態を記憶する
I/Oメモリと、そのI/Oメモリからの出力データの
ビット指定とラッチを行うメモリデータ・ビットセレク
タと、I/Oからのデータのビット指定を行うI/Oデ
ータビットセレクタと、その出力データと前記メモリデ
ータ・ビットセレクタの出力データとにより、エッジ判
定を行う論理素子を設け、基準クロックの立上がりでシ
ーケンスエッジ命令コードで指定されたアドレスのI/
Oデータの読出しと、I/Oメモリの前記所定アドレス
に対応するアドレスのデータを読み出し、基準クロック
の立下がりで前記ラッチされたI/Oメモリのデータと
前記I/Oデータとのエッジ判定を上記論理素子により
行わせ、次の基準クロックの立上がりで前記判定結果を
1ビットcpuのリザルトレジスタに書き込むと同時に
、I/Oメモリのデータを更新することを特徴とするシ
ーケンスコントローラ。
In a sequence controller that combines a 1-bit CPU and a multi-bit microcontroller, an I/O memory that stores the I/O status and an output from the I/O memory are connected to the input section of the 1-bit CPU and the data bus of the microcontroller. A memory data bit selector that specifies and latches data bits, an I/O data bit selector that specifies bits of data from I/O, and the output data of the memory data bit selector and the output data of the memory data bit selector. A logic element that performs edge determination is provided, and the I/O of the address specified by the sequence edge instruction code is determined at the rising edge of the reference clock.
O data is read, and data at an address corresponding to the predetermined address of the I/O memory is read, and an edge determination between the latched I/O memory data and the I/O data is performed at the falling edge of the reference clock. A sequence controller characterized in that the logic element is used to write the determination result into a 1-bit CPU result register at the next rising edge of a reference clock, and at the same time update data in an I/O memory.
JP29351188A 1988-11-22 1988-11-22 Sequence controller Pending JPH02140805A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29351188A JPH02140805A (en) 1988-11-22 1988-11-22 Sequence controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29351188A JPH02140805A (en) 1988-11-22 1988-11-22 Sequence controller

Publications (1)

Publication Number Publication Date
JPH02140805A true JPH02140805A (en) 1990-05-30

Family

ID=17795687

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29351188A Pending JPH02140805A (en) 1988-11-22 1988-11-22 Sequence controller

Country Status (1)

Country Link
JP (1) JPH02140805A (en)

Similar Documents

Publication Publication Date Title
US4870562A (en) Microcomputer capable of accessing internal memory at a desired variable access time
JPS6239780B2 (en)
JPH0346850B2 (en)
JP3710262B2 (en) Electronic circuit and method for using a coprocessor
EP0461631B1 (en) Data storing device having a plurality of registers allotted for one address
JPH02140805A (en) Sequence controller
JP2002152020A (en) Pulse signal generator
JPH06103225A (en) Chain type dma system and dma controller therefor
EP0136699B1 (en) Programmable controller
JPH0250611A (en) Microcomputer
JPS6410854B2 (en)
JPH0626305B2 (en) Double memory configuration pulse programmer
JP2504974B2 (en) Sequencer high-speed processing method
JP3211750B2 (en) Information processing apparatus and pipeline processing method
JPH01171191A (en) Storage element with arithmetic function
JP2764024B2 (en) Storage device table indexing method and indexing device
JPH05265746A (en) Microprocessor
JPH076078A (en) Control signal generating device
JPS62145430A (en) Data processor
JPH03206501A (en) Sequence controller
JPS6017537A (en) Computer controlling device
JPH0328905A (en) Input/output transfer method for programmable controller
JPH0330883B2 (en)
JPS58123142A (en) Information processor
JPH0334084B2 (en)