JP2792778B2 - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JP2792778B2
JP2792778B2 JP1289692A JP1289692A JP2792778B2 JP 2792778 B2 JP2792778 B2 JP 2792778B2 JP 1289692 A JP1289692 A JP 1289692A JP 1289692 A JP1289692 A JP 1289692A JP 2792778 B2 JP2792778 B2 JP 2792778B2
Authority
JP
Japan
Prior art keywords
register
contents
instruction
hardware
bit
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
Application number
JP1289692A
Other languages
Japanese (ja)
Other versions
JPH05204415A (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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1289692A priority Critical patent/JP2792778B2/en
Publication of JPH05204415A publication Critical patent/JPH05204415A/en
Application granted granted Critical
Publication of JP2792778B2 publication Critical patent/JP2792778B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Advance Control (AREA)
  • Programmable Controllers (AREA)

Description

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

【0001】[0001]

【産業上の利用分野】この発明はプログラマブルコント
ローラ(以下、PCという)に関し、特に、高速/高機
能を必要とする用途に最適なPCに関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller (hereinafter referred to as "PC"), and more particularly to a PC optimally used for applications requiring high speed / high functionality.

【0002】[0002]

【従来の技術】図14は、従来におけるPCを示すブロ
ック図であり、1はユーザが作成したシーケンスプログ
ラムを格納するシーケンスプログラムメモリ(以下、S
PMという)、2はSPM1の内容に従ってPCで演算
した入力情報(デバイスX)や、出力情報(デバイス
Y)、データ情報(デバイスD)等のデバイス結果を格
納するデバイスRAM、3はSPM1に格納された命令
を処理するCPU、4はCPU3の処理内容を記述して
あるシステムROM、101はSPM1の演算結果(シ
グナルフロー)格納用RAMである。
2. Description of the Related Art FIG. 14 is a block diagram showing a conventional PC. Reference numeral 1 denotes a sequence program memory (hereinafter referred to as S) for storing a sequence program created by a user.
2 is a device RAM for storing device information such as input information (device X), output information (device Y), and data information (device D) calculated by the PC according to the contents of SPM1, and 3 is stored in SPM1. A CPU 4 for processing the executed instructions, a system ROM 4 for describing the processing contents of the CPU 3, and a RAM 101 for storing the operation result (signal flow) of the SPM1.

【0003】図15は、従来におけるラダー回路図であ
り、以下の動作をする。入力条件X0 (デバイスXの0
番地のビット情報)がONであればMOV命令(転送命
令)を実行し、ソース側のデータデバイスD0 (ワード
情報)の内容をディスティネーション側のデータデバイ
スD1 に転送する。入力条件X0 がOFFであればMO
V命令を実行し、D1 の内容をD1 に転送する(MOV
命令を実行しないと同じ動作であり、ディスティネーシ
ョンはデータを保持する)。
FIG. 15 is a diagram of a conventional ladder circuit, which operates as follows. Input condition X 0 ( 0 of device X
If the bit information at the address is ON, the MOV command (transfer command) is executed, and the contents of the data device D 0 (word information) on the source side are transferred to the data device D 1 on the destination side. MO if input condition X 0 is OFF
Run the V command to transfer the contents of D 1 to D 1 (MOV
If the instruction is not executed, the operation is the same, and the destination retains the data.)

【0004】入力条件X1 がONであればMOV命令を
実行し、ソース側の16進定数(H)の100の値をデ
ィスティネーション側のデータデバイスD2 に転送す
る。入力条件X1 がOFFの場合は、上記と同じであ
る。
If the input condition X 1 is ON, the MOV instruction is executed, and the value of 100 of the hexadecimal constant (H) on the source side is transferred to the data device D 2 on the destination side. If the input condition X 1 is OFF, the same as above.

【0005】入力条件X11がONであればPLS命令
(立ち上がり微分出力命令)により図16に示すタイミ
ングチャートの如く、出力デバイスY3 はX11が立ち上
り後、1スキャンのみONとし、また、PLF命令(立
ち下り微分出力命令)により、図16に示すタイミング
チャートの如く、出力Y4 はX11が立ち下り後、1スキ
ャンのみONとするようソフトウェア命令により処理し
ている。
[0005] Type Condition X 11 is as by if ON PLS instruction (rising differential output command) of the timing chart shown in FIG. 16, after the output device Y 3 is X 11 is rising, the ON only for one scan, also, PLF the instruction (falling differentiated output instruction), as shown in the timing chart of FIG. 16, the output Y 4 after a falling is X 11, are processed by software instructions to the oN only for one scan.

【0006】次に、動作について説明する。図14にお
いて、CPU3はSPM1の中に予め格納されているプ
ログラムをアドレスの若い順から順次読み出し実行す
る。このとき、プログラム中にMOV命令がある場合、
ソフトウェア命令により、転送命令コードを解読し、ソ
ースアドレスで示されるデバイスRAM2の内容をCP
U3の内部レジスタ(図示せず)に格納する。次に、前
記内部レジスタに格納された内容をディスティネーショ
ンアドレスに示されるデバイスRAM2に格納する。
Next, the operation will be described. In FIG. 14, the CPU 3 sequentially reads and executes programs stored in the SPM 1 in ascending order of address. At this time, if there is a MOV instruction in the program,
The transfer instruction code is decoded by the software instruction, and the contents of the device RAM 2 indicated by the source address are stored in the CP.
It is stored in an internal register (not shown) of U3. Next, the content stored in the internal register is stored in the device RAM 2 indicated by the destination address.

【0007】プログラム中にPLS命令がある場合、C
PU3はソフトウェア命令により、微分出力命令コード
を解読し、シグナルフロー格納用RAM101のX11
前スキャンの演算結果を参照し、前スキャンがOFF
で、且つ、現在スキャンがONのときのみY3 をON
し、前スキャンがONで、且つ、現在スキャンがONの
ときはY3 をOFFする。PLF命令がある場合は、X
11の前スキャンの演算結果を参照し、前スキャンがON
で、且つ、現在スキャンがOFFのときのみY4 をON
し、それ以外はY4 をOFFする。
When a PLS instruction is present in a program, C
PU3 by software instructions, decodes the differential output instruction code, with reference to the operation result of the last scan of X 11 signal flow storage RAM 101, before scanning OFF
In, and, ON only Y 3 when scanning current is ON
And, in the last scan is ON, and the scan current is turned OFF Y 3 when is ON. If there is a PLF instruction, X
Refers to the calculation result of 11 previous scans, and the previous scan is ON
In, and, ON only Y 4 when scanning current is OFF
And otherwise it turns OFF the Y 4.

【0008】その他、この発明に関連する参考技術文献
としては、特開平2−8909号公報に開示されている
「シーケンサの微分命令の処理方式」、特開平3−11
3535号公報に開示されている「パイプライン制御機
構」、特開平3−46028号公報に開示されている
「命令処理システム」、特開昭64−76226号公報
に開示されている「パイプライン制御方式」、特開昭6
0−69746号公報に開示されている「ベクトル・デ
ータ処理装置の制御方式」がある。
[0008] In addition, as reference technical documents related to the present invention, "Processing system for differential instruction of sequencer" disclosed in JP-A-2-8909 and JP-A-3-11.
"Pipeline control mechanism" disclosed in Japanese Unexamined Patent Publication No. 3-46028, "Instruction processing system" disclosed in Japanese Patent Application Laid-Open No. 3-46028, and "Pipeline control mechanism" disclosed in Japanese Patent Application Laid-Open No. 64-76226. Method ", JP 6
There is a "vector data processing device control method" disclosed in Japanese Patent Application Laid-Open No. 0-69746.

【0009】[0009]

【発明が解決しようとする課題】従来のPCは以上のよ
うに構成されているので、ソフトウェア命令により処理
が実行され、その結果、転送命令や微分命令を高速に処
理することができないという問題点があった。
Since the conventional PC is configured as described above, the processing is executed by software instructions, and as a result, transfer instructions and differential instructions cannot be processed at high speed. was there.

【0010】また、上記特開平2−8909号公報に微
分命令のハードウェア処理についての開示があるが、こ
の従来技術にあっては、微分命令のワークエリア用とし
てRAMが余分に必要となり、部品点数が増加して装置
が高価になるという問題点があった。
Also, Japanese Patent Laid-Open Publication No. Hei 2-8909 discloses hardware processing of a differential instruction. However, in this prior art, an extra RAM is required for a work area of the differential instruction, and There was a problem that the number of points increased and the apparatus became expensive.

【0011】この発明は、上記問題点を解決するために
なされたもので、余分なメモリを使用せずに装置を安価
に構成すると共に転送命令や微分命令の高速化を図るこ
とができるPCを得ることを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems, and a PC capable of reducing the cost of a device without using an extra memory and increasing the speed of a transfer instruction and a differential instruction is provided. The purpose is to gain.

【0012】[0012]

【課題を解決するための手段】この発明に係るPCは、
シーケンスプログラムを格納するシーケンスプログラム
記憶手段と、デバイス結果を格納するデバイス記憶手段
と、前記シーケンスプログラム記憶手段に格納されてい
るシーケンスプログラムを順次読み出すパイプラインレ
ジスタと、前記デバイス記憶手段の内容を一時記憶する
ラッチ手段と、ハードウェア命令を高速に演算するハー
ドウェア演算手段と、前記ハードウェア演算手段の結果
を一時記憶するシフトレジスタを備えたものである。
According to the present invention, a PC is provided.
Sequence program storage means for storing sequence programs, device storage means for storing device results, pipeline registers for sequentially reading sequence programs stored in the sequence program storage means, and temporary storage of the contents of the device storage means And a shift register for temporarily storing the result of the hardware operation means.

【0013】また、前記デバイス記憶手段に格納された
ソースデバイスを一時記憶するデータレジスタを設け、
デバイス間の転送命令において、前記シフトレジスタが
ONのとき、ソースデバイスを一時記憶した前記データ
レジスタの内容を前記デバイス記憶手段に書き込むもの
である。
A data register for temporarily storing the source device stored in the device storage means;
In the transfer command between the devices, when the shift register is ON, the contents of the data register temporarily storing the source device are written into the device storage means.

【0014】また、前記パイプラインレジスタの内容を
一時記憶する定数ラッチ手段を設け、前記定数ラッチ手
段に格納された定数の値を前記データレジスタに一時記
憶し、定数/デバイス間の転送命令で前記シフトレジス
タがONのとき、定数の値を一時記憶した前記データレ
ジスタの内容を前記デバイス記憶手段に書き込むもので
ある。
Further, constant latch means for temporarily storing the contents of the pipeline register is provided, and the value of the constant stored in the constant latch means is temporarily stored in the data register. When the shift register is ON, the contents of the data register temporarily storing a constant value are written to the device storage means.

【0015】また、前記シフトレジスタがOFFのと
き、特定の値を前記デバイス記憶手段に書き込むもので
ある。
Further, when the shift register is OFF, a specific value is written to the device storage means.

【0016】また、前記パイプラインレジスタから出力
された信号をラッチするビット指定ラッチ手段と、前記
ビット指定ラッチ手段から出力される信号をビット変換
するデコーダと、前記デバイス記憶手段から出力される
特定のビットを選択するセレクタと、前記デコーダから
の出力に基づいてデバイス記憶手段に書き込む信号を処
理するビット処理手段を設け、前記シフトレジスタがO
Nのとき、前記デコーダとビット処理手段により前記デ
バイス記憶手段の所定ビットに1を乗せると共に、前記
ハードウェア演算手段により前記シフトレジスタの内容
と、前記セレクタの内容を演算し、該演算結果を前記シ
フトレジスタに書き込むものである。
Also, bit designation latch means for latching a signal outputted from the pipeline register, a decoder for bit-converting a signal outputted from the bit designation latch means, and a specific signal outputted from the device storage means. A selector for selecting a bit; and a bit processing unit for processing a signal to be written to a device storage unit based on an output from the decoder.
When N, the decoder and the bit processing means set a predetermined bit of the device storage means to 1, and the hardware calculation means calculates the contents of the shift register and the contents of the selector. This is to write to the shift register.

【0017】また、前記ハードウェア演算手段が、前記
シフトレジスタの反転出力の内容と、前記セレクタの内
容の論理積(AND)を取った立ち下がり1スキャンO
N命令を出力するものである。
Further , the hardware operation means may include
The contents of the inverted output of the shift register and the contents of the selector
Falling one scan O with AND
It outputs N instructions.

【0018】また、前記ハードウェア演算手段が、前記
シフトレジスタの内容と、前記セレクタの反転出力の内
容の論理積(AND)を取った立ち上がり1スキャンO
N命令を出力するものである。
Further, the hardware operation means includes
Of the contents of the shift register and the inverted output of the selector.
1 scan O which takes the logical AND (AND) of the volume
It outputs N instructions.

【0019】また、前記ハードウェア演算手段が、前記
シフトレジスタの内容と、前記セレクタの内容の論理和
(OR)を取った1スキャン遅れOFF命令を出力する
ものである。
Further, the hardware operation means includes
The logical sum of the contents of the shift register and the contents of the selector
Outputs 1-scan delay OFF command with (OR) taken
Things.

【0020】また、前記ハードウェア演算手段が、前記
シフトレジスタの内容と、前記セレクタの内容の論理積
(AND)を取った1スキャン遅れON命令を出力する
ものである。
Further, the hardware operation means may include
Logical product of the contents of the shift register and the contents of the selector
Outputs a one-scan delay ON command that takes (AND)
Things.

【0021】[0021]

【作用】この発明によるPCは、デバイス記憶手段に格
納されたソースデバイスをデータレジスタに一時記憶
し、デバイス間の転送命令において、シフトレジスタが
ONのとき、ソースデバイスを一時記憶したデータレジ
スタの内容をデバイス記憶手段に書き込む。
In the PC according to the present invention, the source device stored in the device storage means is temporarily stored in the data register. When the shift register is turned on in the transfer instruction between the devices, the contents of the data register temporarily storing the source device are stored. Is written to the device storage means.

【0022】また、パイプラインレジスタの内容を定数
ラッチ手段に一時記憶し、定数ラッチ手段に格納された
定数の値をデータレジスタに一時記憶し、定数/デバイ
ス間の転送命令でシフトレジスタがONのとき、定数の
値を一時記憶したデータレジスタの内容をデバイス記憶
手段に書き込む。
Further, the contents of the pipeline register are temporarily stored in the constant latch means, the value of the constant stored in the constant latch means is temporarily stored in the data register, and the shift register is turned on by a constant / device transfer instruction. At this time, the contents of the data register in which the value of the constant is temporarily stored are written to the device storage means.

【0023】また、シフトレジスタがOFFのとき、特
定の値をデバイス記憶手段に書き込む。
When the shift register is off, a specific value is written to the device storage means.

【0024】また、シフトレジスタがONのとき、デコ
ーダとビット処理手段によりデバイス記憶手段の所定ビ
ットに1を乗せると共に、ハードウェア演算手段により
シフトレジスタの内容と、セレクタの内容を演算し、該
演算結果をシフトレジスタに書き込む。
When the shift register is ON, the decoder and the bit processing means set a predetermined bit of the device storage means to 1, and the hardware calculation means calculates the contents of the shift register and the contents of the selector. Write the result to the shift register.

【0025】また、ハードウェア演算手段が、シフトレ
ジスタの反転出力の内容と、セレクタの内容の論理積
(AND)を取った立ち下がり1スキャンON命令を出
力する。
Also, the hardware operation means may be provided with a shift register.
Logical product of the contents of the inverted output of the register and the contents of the selector
(ON) is issued and the falling 1 scan ON command is issued.
Power.

【0026】また、ハードウェア演算手段が、シフトレ
ジスタの内容と、セレクタの反転出力の内容の論理積
(AND)を取った立ち上がり1スキャンON命令を出
力する。
Also, the hardware operation means may include a shift register.
Logical product of the contents of the register and the contents of the inverted output of the selector
(ON) and issued a rising 1 scan ON command
Power.

【0027】また、ハードウェア演算手段が、シフトレ
ジスタの内容と、セレクタの内容の論理和(OR)を取
った1スキャン遅れOFF命令を出力する。
Also, the hardware operation means may be provided with a shift register.
The logical sum (OR) of the contents of the register and the contents of the selector is calculated.
A single scan delay OFF command is output.

【0028】また、ハードウェア演算手段が、シフトレ
ジスタの内容と、セレクタの内容の論理積(AND)を
取った1スキャン遅れON命令を出力する。
Also, the hardware operation means is provided with a shift register.
The logical product (AND) of the contents of the register and the contents of the selector
The one-scan-delay ON command is output.

【0029】[0029]

【実施例】以下、この発明の一実施例を図について説明
する。図1は、この発明に係るPCの主要構成を示すブ
ロック図であり、1はユーザが作成したシーケンスプロ
グラムを格納するSPM、2はSPM1の内容に従って
PCで演算した入力情報(デバイスX)、出力情報(デ
バイスY)、データ情報(デバイスD)等のデバイス結
果を格納するデバイスRAM、3はSPM1に書かれた
命令が加減算等のソフトウェア(以下、S/Wという)
処理の場合にこの命令を実行するCPU、4はCPU3
の処理内容を記述してあるシステムROM、5はCPU
3と後述のハードウェア(以下、H/Wという)処理回
路の制御を実行するシーケンス制御回路、6はSPM1
に記述された内容を0番地から順に読み出すパイプライ
ン命令レジスタ(以下、B2Rレジスタという)、7は
B2Rレジスタ6の内容を読み出すパイプライン命令レ
ジスタ(以下、B3Rレジスタという)、8はCPU3
によりS/W命令を処理した結果を格納するB4Rレジ
スタである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a main configuration of a PC according to the present invention. Reference numeral 1 denotes an SPM storing a sequence program created by a user, 2 denotes input information (device X) calculated by the PC according to the contents of SPM1, and output. A device RAM for storing device results such as information (device Y), data information (device D), and 3 is software (hereinafter, referred to as S / W) for adding and subtracting instructions written in the SPM1.
A CPU that executes this instruction in the case of processing;
5 is a system ROM that describes the processing contents of
3 and a sequence control circuit for controlling a hardware (hereinafter referred to as H / W) processing circuit to be described later.
, A pipeline instruction register (hereinafter referred to as a B2R register) for reading the contents described in order from address 0, a pipeline instruction register (hereinafter referred to as a B3R register) 7 for reading the contents of the B2R register 6, and 8 a CPU 3
Is a B4R register for storing the result of processing the S / W instruction.

【0030】また、9はB2Rレジスタの内容(命令)
をデコードするデコード回路(以下、DECという)、
10はDEC9の内容を読み出すパイプラインレジスタ
のDECL(1)、11はDECL(1)10の内容を
読み出すパイプラインレジスタのDECL(2)、12
は例えば、40MHZ の基準クロックMCKを発生する
発振回路、13は発振回路12のMCKを用いて各種ク
ロックを発生するクロック発生回路、14はデバイスR
AM2のアドレス,データ,リード,ライトの各信号を
制御すると共に、後述のINCK,DECL(2)11
のCKクロックを発生するH/W制御回路である。
9 is the content (instruction) of the B2R register
Decoding circuit (hereinafter referred to as DEC),
Reference numeral 10 denotes a pipeline register DECL (1) for reading the contents of the DEC 9, and reference numeral 11 denotes a pipeline register DECL (2), 12 for reading the contents of the DECL (1) 10.
For example, an oscillation circuit for generating a reference clock MCK of 40MH Z, clock generating circuit 13 for generating various clocks with the MCK of the oscillation circuit 12, 14 the device R
In addition to controlling the address, data, read, and write signals of AM2, INCK, DECL (2) 11
H / W control circuit for generating the CK clock.

【0031】また、15はB3Rレジスタ7の00〜1
5ビットの内容を格納する定数ラッチ、16はB3Rレ
ジスタ7の16〜19ビットのビット内容を格納するデ
バイスRAMビット指定ラッチ、17はデバイスRAM
2の内容を格納するデバイスRAMラッチ、18はデバ
イスRAMラッチ17の16ビットデータD00〜D15
中から、デバイスRAMビット指定ラッチ16で指定さ
れたビット情報のみを抽出する16TO1セレクタ、1
9はデバイスRAMビット指定ラッチ16の4ビットデ
ータB3R16〜19を16ビットデータBIT00〜
15にデコードする4TO16デコーダである。
Reference numeral 15 denotes 00-1 of the B3R register 7.
A constant latch for storing the contents of 5 bits, 16 is a device RAM bit designation latch for storing 16 to 19 bits of the B3R register 7, and 17 is a device RAM.
Device RAM latch for storing the second contents, 18 device RAM from the 16-bit data D 00 to D 15 of the latch 17, 16TO1 selector for extracting only the bits of information specified in the device RAM bit designation latch 16, 1
Reference numeral 9 designates 4-bit data B3R16 to 19 of the device RAM bit designation latch 16 as 16-bit data BIT00 to
This is a 4TO16 decoder for decoding to 15.

【0032】また、20は後述のラダー回路の入力条件
を演算するH/W演算回路、21はH/W演算回路20
の結果を格納するシフトレジスタ(以下、Bレジスタと
いう)、22はデバイスRAM2の情報(デバイスRA
MラッチD0015)や、SPM1の情報(定数ラッチI
0015)を格納するデータレジスタ(以下、Dレジス
タという)、23は後述のMOUTやMZOUT命令時
にそのワード演算結果をデバイスRAM2に書き込むワ
ード処理回路、24は後述のOUT命令やEGP,EG
F,EGS,EGCのエッヂ命令時に、4TO16デコ
ーダ19の指定ビットのみその演算結果を乗せかえ、そ
れ以外のビットはデバイスRAMラッチ17のデータを
そのままデバイスRAM2に返すビット処理回路であ
る。
Reference numeral 20 denotes an H / W operation circuit for calculating input conditions of a ladder circuit described later, and 21 denotes an H / W operation circuit 20
, A shift register (hereinafter referred to as a B register) 22 for storing the result of the device RAM 2 (device RA).
M latches D 00 to 15 ) and information of SPM1 (constant latch I
D 00 ~ 15) data register (hereinafter to store, called D registers), word processing circuit writing the word operation results when MOUT and MZOUT instructions later in the device RAM2 23, described later 24 OUT instruction or EGP, EG
At the time of an edge instruction of F, EGS, and EGC, only a designated bit of the 4TO16 decoder 19 is replaced with the operation result, and other bits are a bit processing circuit that returns the data of the device RAM latch 17 to the device RAM 2 as it is.

【0033】図2(a)〜(e)はこの発明のラダー回
路図であり、(a)は次の動作をする。即ち、入力条件
0 (入力情報デバイスXのうちの1ビット情報)がO
N(1)であれば、MLD(デバイスRAM2のロー
ド)命令により、データデバイスD0 のデータをデバイ
スRAM2から読み出し、MOUT(デバイスRAM2
への書き込み)命令によりデータデバイスD1 にD0
内容を書き込む(MZOUT命令時も同じ働きをす
る)。入力条件X0 がOFF(0)であれば、同上のM
LD命令を実行したのちMOUT命令により、D1 にD
1 の内容を書き込み、D0 の内容は書き込まない(実行
しないと同じ働きをする)、また、MZOUT命令であ
れば、入力条件X0 OFF時には、オール0をD1 に書
きかえる。次に、入力条件X11がON(1)であれば、
EGP命令により出力デバイスY3 を立ち上り1スキャ
ンのみON(1)にする。
FIGS. 2A to 2E are ladder circuit diagrams of the present invention. FIG. 2A operates as follows. That is, the input condition X 0 (1 bit information of the input information device X) is O
If N (1), the MLD (the load device RAM2) instruction, reads the data of the data device D 0 from the device RAM2, MOUT (device RAM2
Writing the contents of the D 0 data device D 1 by a write) instruction to (even the same function during MZOUT instructions). If the input condition X 0 is OFF (0),
The MOUT instruction after executing the LD instruction, D to D 1
Writes the first content, the content of D 0 is (the same functions unless executed) is not written and, if MZOUT instruction, input conditions X 0 OFF times, rewrites all 0 to D 1. Next, input condition X 11 is as long as ON (1),
The EGP instruction output device Y 3 rising one scan only to ON (1).

【0034】(b)の場合は、EGP命令の代わりにE
GF命令によりX11がON後、立ち下がり1スキャンの
みY3 をON(1)にする。(c)の場合は、EGS命
令によりX11がON後1スキャン遅れでY3 がON
(1)する。(d)の場合は、EGS命令によりX11
ON後1スキャン遅れでY3 がOFF(0)する。
(e)は、(a)に比べMLD D0 がILD H100
に変わっているのみであり、入力条件X0 がON(1)
時、ILD(イミディエートロード)命令により、H
100 (Hは16進数の100を表すわす)をロードし、
MOUT(MZOUT)命令によりD1 にH100 を転送
する。
In the case (b), E is used instead of the EGP instruction.
X 11 is ON after the GF instruction, falling only one scan Y 3 to ON (1). For (c), Y 3 is ON X 11 is 1 scan delay after ON by EGS instruction
(1). For (d), X 11 is the Y 3 in one scan delay after ON to OFF (0) by EGS instructions.
(E) shows that MLD D 0 is larger than that of (a) in ILD H 100.
And the input condition X 0 is ON (1)
At the time, by the ILD (immediate load) instruction,
100 (H stands for hexadecimal 100)
MOUT (MZOUT) instruction by transferring the H 100 to D 1.

【0035】図3は、図2(a)のラダー回路の中身の
詳細を示すものであり、SPM1とデバイスRAM2の
データとアドレス及びBレジスタ21,Dレジスタ22
の内容を表す。図4は、図3の内容を更に詳細に示した
ものである。図5は、図2(a)のラダー回路を動作さ
せたときの内部タイミングチャートである。図6は、図
2(a)のうち、アの部分についてのMOUT命令時の
内部動作である。図7は、図2(e)のMOUT命令時
の内部動作である。図8は、図2(a)のうち、アの部
分についてのMZOUT命令時の内部動作である。図9
は、図2(e)のMZOUT命令時の内部動作である。
図10は、図2(a)のうち、イの部分についてのEG
P命令時の内部動作である。図11は、図2(a)のう
ち、イの部分についてのEGF命令時の内部動作であ
る。図12は、図2(a)のうち、イの部分についての
EGS命令時の内部動作である。図13は、図2(a)
のうち、イの部分についてのEGC命令時の内部動作で
ある。
FIG. 3 shows the details of the contents of the ladder circuit shown in FIG. 2A. The data and addresses of the SPM 1 and the device RAM 2, the B register 21 and the D register 22 are shown in FIG.
Represents the contents of FIG. 4 shows the contents of FIG. 3 in more detail. FIG. 5 is an internal timing chart when the ladder circuit of FIG. 2A is operated. FIG. 6 shows the internal operation at the time of the MOUT instruction for the part A in FIG. 2A. FIG. 7 shows an internal operation at the time of the MOUT instruction in FIG. FIG. 8 shows the internal operation at the time of the MZOUT instruction for the part A in FIG. FIG.
5 shows the internal operation at the time of the MZOUT instruction in FIG.
FIG. 10 shows the EG for the portion A in FIG.
This is an internal operation at the time of the P instruction. FIG. 11 shows the internal operation at the time of the EGF instruction for the part A in FIG. 2A. FIG. 12 shows the internal operation at the time of the EGS instruction for the part A in FIG. 2A. FIG. 13 shows the state shown in FIG.
Of these, the internal operation at the time of the EGC instruction for the portion (a).

【0036】まず、SPM1に書き込まれたシーケンス
プログラムのパイプライン読み出し動作について図1を
用いて説明する。PCをラン(RUN)するとシステム
ROM4に書かれている内容(図示せず)に従い、CP
U3は各種レジスタの設定等のイニシャル設定をした
後、シーケンス制御回路5をアクティブにして、図4に
示したSPM1の内容を順次B2Rレジスタ6に読み出
す。
First, the pipeline read operation of the sequence program written in the SPM 1 will be described with reference to FIG. When the PC is run (RUN), CP is executed according to the contents (not shown) written in the system ROM 4.
After making initial settings such as setting of various registers, U3 activates the sequence control circuit 5 and sequentially reads the contents of SPM1 shown in FIG.

【0037】CPU3の基本動作は次の通りである。C
PU3は通常、SPM1の内容を順次読み出す命令を実
行しておりB2Rレジスタ6の内容を監視し、図4に示
した25bit目が0(H/W命令)であると、B2R
レジスタ6の内容をB3Rレジスタ7に、また、DEC
9の内容をDECL(1)10に転送し、後述の回路で
H/W命令を処理する。一方、25bit目が1(S/
W命令)であると、上記パイプライン転送はせず(B3
Rレジスタ7,DECL(1)10に転送されない)、
CPU3内のプログラムカウンタはS/W命令内のアド
レスが設定され、システムROM4の該当アドレスに飛
ばされ、後述のB0 がONであれば所定のS/W処理を
CPU3が行う。また、必要に応じて、CPU3はB4
Rレジスタ8にS/W演算結果を転送し、SPM1に書
き込む。次に、この実施例におけるH/W命令の詳細動
作について図5、図4及び図1を用いて説明する。
The basic operation of the CPU 3 is as follows. C
The PU3 normally executes an instruction to sequentially read the contents of the SPM1 and monitors the contents of the B2R register 6. If the 25th bit shown in FIG.
The contents of register 6 are stored in B3R register 7, and DEC
9 is transferred to the DECL (1) 10, and the H / W instruction is processed by a circuit described later. On the other hand, the 25th bit is 1 (S /
W instruction), the pipeline transfer is not performed (B3
R register 7, not transferred to DECL (1) 10),
The address in the S / W instruction is set in the program counter in the CPU 3, and the address is skipped to the corresponding address in the system ROM 4. If B 0 described later is ON, the CPU 3 performs a predetermined S / W process. Also, if necessary, the CPU 3
The result of the S / W operation is transferred to the R register 8 and written to the SPM1. Next, the detailed operation of the H / W instruction in this embodiment will be described with reference to FIGS.

【0038】(1)期間T1の動作 T1は、SPM1のアドレス0000H に書かれている
LDX0 命令(図4参照)がB2Rレジスタ6に転送さ
れた後を表すものであり、この期間でCPU3がH/W
命令を判断し、シーケンス制御回路5へ制御信号を出力
する。また、この期間では、DEC9において、命令を
デコードし、LD出力を1にする。
[0038] (1) Operation T1 period T1 is representative of the after LDX 0 instruction is written to the address of the SPM 1 0000 H (see FIG. 4) is transferred to B2R register 6, at this time CPU3 Is H / W
The instruction is determined, and a control signal is output to the sequence control circuit 5. Further, in this period, in DEC9, it decodes the instruction, the LD output to 1.

【0039】(2)期間T2の動作 T2では、B3Rレジスタ7のCKの発生により(H/
W命令=1)B2Rレジスタ6のLDX0 をB3Rレジ
スタ7に転送すると共に、DEC9のLD出力を、DE
CL(1)10に転送した後を表している。また、SP
M1のアドレス0001H のMLD D0 がB2Rレジ
スタ6にも転送されている。この期間では、B3Rレジ
スタ7の下位00〜15ビットがデバイスRAM2のア
ドレス(図4に示したSPM1の0000H アドレス)
が出力される。デバイスRAM2のアクセスタイム後、
図3に示したデバイスRAMデータ(0001H =X0
〜XFのうちX0 のみON)が、デバイスRAMラッチ
17に入力される。
(2) Operation in Period T2 At T2, (H /
W instruction = 1) LDX 0 of B2R register 6 is transferred to B3R register 7 and LD output of DEC 9 is
CL (1) after the transfer. Also, SP
MLD D 0 of the address 0001 H of M1 is also transferred to the B2R register 6. In this period, the lower 00-15 bits device RAM2 address B3R register 7 (0000 H address SPM1 shown in FIG. 4)
Is output. After the access time of the device RAM2,
The device RAM data (0001 H = X 0) shown in FIG.
X 0 only ON of ~XF) is input into the device RAM latch 17.

【0040】(3)期間T3の動作 T3は、LD命令の演算と、MLD命令のデバイスRA
M2のリード及びMOUT命令のB2Rレジスタ6への
転送動作期間である。この期間の初めにDECL(2)
11のCKが発生する。デバイスRAM2のアドレス0
000H のX0 〜XFデータ(0000H )がデバイス
RAMラッチ17に転送された後、16TO1セレクタ
18に入力される。一方、DECL(2)11のCK発
生により、DECL(1)10のLD出力が、DECL
(2)11に転送されると共に、B3Rレジスタ7の1
6〜19の4bitのbit情報0000H =0H (X
0 〜XFのうちX0 を表す;図4に示したSPM1の1
9〜16ビットに対応する)が、デバイスRAMビット
指定ラッチ16に転送された後、16TO1セレクタ1
8に入力される。16TO1セレクタ18はビット抽出
Mには、図4に示したデバイスRAMのアドレス000
H のX0 F の中のX0 (=1)が抽出される。
(3) Operation in Period T3 T3 is the operation of the LD instruction and the device RA of the MLD instruction.
This is a period for reading M2 and transferring the MOUT instruction to the B2R register 6. DECL (2) at the beginning of this period
Eleven CKs occur. Address 0 of device RAM2
000 H of X 0 ~XF data (0000 H) is then transferred to the device RAM latch 17, is input to 16TO1 selector 18. On the other hand, when the CK of the DECL (2) 11 occurs, the LD output of the DECL (1) 10
(2) While being transferred to 11, the B3R register 7
6- to 4-bit information 0000 H = 0 H (X
0 represents the X 0 of ~XF; 1 of SPM1 shown in FIG. 4
(Corresponding to 9 to 16 bits) is transferred to the device RAM bit designation latch 16, and then the 16TO1 selector 1
8 is input. The 16TO1 selector 18 stores the address 000 of the device RAM shown in FIG.
X 0 (= 1) among X 0 to F of 0 H is extracted.

【0041】DECL(2)11のLD出力はこの期間
1になっており、H/W演算回路20の中のトライステ
ートICのゲートがLD=1により、アクティブとなる
ため前記ビット抽出M(=1)がBレジスタ21のB0
入力に入力される。Bレジスタ21はクロック入力CK
にV2CKが入力されており、LD=1のため、この期
間2ケのクロックパルスが入力される。一方、モード入
力S0 はこの期間1、S1 はV3CKが入力されるの
で、前半のクロックパルスではBレジスタ21の初期値
(=0000H )を右シフト(Q0 →Q1 ,Q1 →Q2
・・・Q14→Q15,Q15→オーバフロー)する。後半の
クロックパルスでは、パラレルラッチ(B0 →A0 ,Q
n →An (n=1〜15))することにより入力条件演
算結果BR0 は1となる。MLDとMOUT命令につい
ては上記と同じ動作である。
The LD output of the DECL (2) 11 is 1 during this period, and the gate of the tristate IC in the H / W arithmetic circuit 20 becomes active when LD = 1, so that the bit extraction M (= 1) is B 0 of the B register 21
Entered in the input. The B register 21 receives the clock input CK
, V2CK is input and LD = 1, so that two clock pulses are input during this period. On the other hand, since the mode input S 0 receives the period 1 during this period and the S 1 receives V3CK, the initial value (= 0000 H ) of the B register 21 is shifted rightward (Q 0 → Q 1 , Q 1 →) in the first half clock pulse. Q 2
... Q 14 → Q 15 , Q 15 → overflow). In the latter half of the clock pulse, the parallel latch (B 0 → A 0 , Q
By performing n → A n (n = 1 to 15), the input condition calculation result BR 0 becomes 1. The same operation as above is performed for the MLD and MOUT instructions.

【0042】(4)期間T4の動作 T4は、MLD命令の演算と、MOUT命令のデバイス
RAMリード及びLD命令のB2R6への転送動作期間
である。この期間でも初めにINCKとDECL(2)
11のCKが発生し、同様に、デバイスRAMのアドレ
ス4000H のD0 (例えば、図3のように前回値55
55H )がデバイスRAMラッチ17に転送される。ま
、DECL(2)11のMLD出力はこの期間1とな
る。H/W演算回路20とBレジスタ21は動作しな
い。
(4) Operation in Period T4 T4 is a period during which the operation of the MLD command is performed, the device RAM read of the MOUT command and the transfer of the LD command to the B2R6 are performed. During this period, INCK and DECL (2)
A CK of 11 is generated, and similarly, D 0 at the address 4000 H of the device RAM (for example, as shown in FIG.
55 H ) is transferred to the device RAM latch 17. Also <br/>, MLD output of D ECL (2) 11 becomes the period 1. The H / W operation circuit 20 and the B register 21 do not operate.

【0043】Dレジスタ22の入力端子には、デバイス
RAMラッチ17の出力が入力され、クロックCKには
SCKクロックが入力されるため、次のT5の初めにD
00〜D15(=5555H )をラッチする。MOUT命
令、LD命令については、上記と同じ動作である。尚、
MLD命令の代わりにILD命令を用いると次の動作と
なる。
Since the output of the device RAM latch 17 is input to the input terminal of the D register 22 and the SCK clock is input to the clock CK, D is input at the beginning of the next T5.
00 to D 15 (= 5555 H ) are latched. The same operation as described above is performed for the MOUT instruction and the LD instruction. still,
When the ILD instruction is used instead of the MLD instruction, the following operation is performed.

【0044】ILD命令はMLD命令のようにD0 とデ
バイス指定はできず、SPM1の0〜15bitに定数
値を予め格納している(図2(e)ではH0100)。
この期間でも初めにINCKとDECL(2)11のC
Kが発生することになるが、INCKのデバイスRAM
ラッチ17への転送はされず、定数ラッチ15の出力端
子にH0100Hが転送され、Dレジスタ22の入力端
子には定数ラッチ15の出力が入力され、クロックCK
にはSCKクロックが入力されるため、次のT5の初め
にID0015(=0100H )をラッチすることにな
る。
Unlike the MLD instruction, the ILD instruction cannot designate a device as D 0, and a constant value is previously stored in bits 0 to 15 of the SPM 1 (H0100 in FIG. 2E).
Even during this period, the INCK and DECL (2) 11 C
K will occur, but the device RAM of INCK
H0100H is transferred to the output terminal of the constant latch 15, the output of the constant latch 15 is input to the input terminal of the D register 22, and the clock CK is not transferred to the latch 17.
, The SCK clock is input, so that ID 00 to 15 (= 0100 H ) are latched at the beginning of the next T5.

【0045】(5)期間T5の動作 T5は、MOUT命令の演算のみの動作期間である。こ
の期間でも初めにINCKとDECL(2)11のCK
が発生し、同様にデバイスRAM2のアドレス4001
H のD1 (例えば、図3のように初期値AAAAH )が
デバイスRAMラッチ17に転送される。また、DEC
L(2)11のMOUT出力はこの期間1となる。
(5) Operation in Period T5 T5 is an operation period in which only the operation of the MOUT instruction is performed. Even during this period, the INCK and DECL (2) 11 CK
Occurs, and the address 4001 of the device RAM 2
H 1 (for example, the initial value AAAAA H as shown in FIG. 3) is transferred to the device RAM latch 17. Also, DEC
The MOUT output of L (2) 11 becomes 1 during this period.

【0046】ワード処理回路23において、前記T3の
動作にてBR0 が1(X0 =ON)となっているため、
Dレジスタ22に出力(=5555H がT4の動作でラ
ッチされている)がV8D0015となって、デバイスR
AM2へ出力される。ここで、BR0 =0(X0 =OF
F)であったならばデバイスRAMラッチ17のD00
15(AAAAH )がそのままデバイスRAM2へ戻され
ることになる(無実行と同じ動作となる)。
In the word processing circuit 23, BR 0 is 1 (X 0 = ON) in the operation of T3.
Output to the D register 22 (= 5555 H is latched by the operation of the T4) is turned V8D 00 ~ 15, the device R
Output to AM2. Here, BR 0 = 0 (X 0 = OF
F) If D 00 -D 00 of the device RAM latch 17
15 (AAAAA H ) is returned to the device RAM 2 as it is (the same operation as non-execution).

【0047】尚、MOUT命令の代わりにMZOUT命
令を用いると次の動作となる。BR0 =1のときは同様
の動作であるが、BR0 =0のときは強制的に0000
H をデバイスRAM2に出力する。即ち、入力条件がO
Nのときは転送元のデバイスのデータを転送先のデバイ
スへ転送するが、OFFのときは転送先のデバイスには
0000H 強制出力することになる。MZOUT命令
時のデバイスRAMリードはDEC9の構成であるた
め、T4の期間にはV8RD出力が0でありデバイスR
AM2のデータは出力されない。
When the MZOUT instruction is used instead of the MOUT instruction, the following operation is performed. When BR 0 = 1, the same operation is performed, but when BR 0 = 0, the operation is forcibly 0000.
H is output to the device RAM2. That is, if the input condition is O
When N, the data of the transfer source device is transferred to the transfer destination device, but when OFF, 0000 H is forcibly output to the transfer destination device. Since the device RAM read at the time of the MZOUT instruction has the configuration of DEC9, the V8RD output is 0 and the device R
AM2 data is not output.

【0048】(6)期間T6の動作 T6は演算の無処理期間であり、LD命令のリードとE
G□のB2R転送を行っている。
(6) Operation in Period T6 T6 is a period in which no operation is performed.
G2 B2R transfer is performed.

【0049】(7)期間T7の動作 T7は前述と同様であり、その説明を省略する。(7) Operation in Period T7 T7 is the same as that described above, and a description thereof will be omitted.

【0050】(8)期間T8の動作 EG□(EGP,EGF,EGS,EGCの総称命令と
仮定する)の演算についてEGPを例にあげて説明す
る。この期間でもINCKとDECL(2)11のCK
の発生により、デバイスRAMのアドレス6000H
0 F (例えば、図3のように初期値0000H )が
デバイスRAMラッチ17に転送されたのち、T3のL
D命令動作と同様に、16TO1セレクタ18のD(デ
ータ)に入力される。一方、DECL(2)11のCK
発生によりDECL(2)11のEGP出力がこの期間
1になると共に、B3R7のB3R16〜19の4bi
tのbit情報0010=2H (図4に示したSPM1
のE0 F のうちE2 を表す)がデバイスRAMビット
指定ラッチ16に転送されたのち、16TO1セレクタ
18のS(セレクタ)と、4TO16デコーダ19に入
力される。
(8) Operation in Period T8 The calculation of EG □ (assumed to be a generic command of EGP, EGF, EGS, and EGC) will be described using EGP as an example. Even during this period, CK of INCK and DECL (2) 11
Occurs, E 0 to F (for example, the initial value 0000 H as shown in FIG. 3) of the address 6000 H of the device RAM are transferred to the device RAM latch 17, and then L 3 of T 3
As in the case of the D instruction operation, it is input to D (data) of the 16TO1 selector 18. On the other hand, the CK of DECL (2) 11
Due to the occurrence, the EGP output of the DECL (2) 11 becomes 1 during this period, and 4bi of B3R16 to B3R16 to 19 of B3R7.
t bit information 0010 = 2 H (SPM1 shown in FIG. 4)
After representing the E 2) of the E 0 ~ F of is transferred to the device RAM bits specified latch 16, and S (selector) of 16TO1 selector 18 is input to 4TO16 decoder 19.

【0051】16TO1セレクタ18よりビット抽出M
には図4に示したデバイスRAMのアドレス6000H
のE0 F の中のE2 (=0)が抽出される。H/W演
算回路20の中のトライステートICのゲートがEGP
=1よりアクティブとなり、前記ビット抽出M(=0)
のインバート出力とBR0 (LDX11がONであるの
で、T7でBR0 は1となっている)のAND演算によ
り出力が1となり、これがBレジスタ21のB0 入力に
入力される。Bレジスタ21はこの間クロック入力CK
にV2CKが入力されており、EGP=1のため、この
期間2個のクロックパルスが入力される。一方、S0
1 にはV3CKが共に入力されるので、前半のクロッ
クパルスはS0 =S1 =0のため無処理であり、後半の
クロックパルスではパラレルラッチ(B0 →A0 ,Qn
→An )され、BR0 は1→1になる、即ち、変化しな
い。
Bit extraction M from 16TO1 selector 18
Contains the address 6000 H of the device RAM shown in FIG.
E 2 (= 0) in E 0 to F of the above are extracted. The gate of the tristate IC in the H / W arithmetic circuit 20 is EGP
= 1, the bit extraction M (= 0)
(Because LDX 11 is a ON, T7 in BR 0 is that a 1) of the inverter output and the BR 0 output by AND operation becomes one, which is input to the B 0 is input to register B 21. During this period, the B register 21 receives the clock input CK.
, And EGP = 1, so that two clock pulses are input during this period. On the other hand, since V3CK is input to both S 0 and S 1 , the first half clock pulse is unprocessed because S 0 = S 1 = 0, and the second half clock pulse is a parallel latch (B 0 → A 0 , Q n
→ A n ), and BR 0 changes from 1 → 1, that is, does not change.

【0052】上述の4TO16レコーダ19は、ビット
指定されたものだけが1となる。ここではID1619
0010=2H であるのでBIT02のみが1となり、他
は0となる。BIT0015はビット処理回路24で用い
られておりBIT0215のうち0のものは、デバイスR
AMラッチ17のD0015が、また、1のものはBR0
の内容(ここでは1)がデバイスRAM2へ出力され
る。ここでは、BIT02が1よりD0015の0000H
がV8D0015では0004H となる。
In the above-mentioned 4TO16 recorder 19, only the bit-designated one becomes 1. Here next only BIT 02 is 1 since the ID 16 ~ 19 is 0010 = 2 H, the other is zero. BIT 00 to BIT 15 are used in the bit processing circuit 24, and 0 of BIT 02 to BIT 15 is a device R
D 00 to 15 of the AM latch 17 and BR 0 are
(Here, 1) is output to the device RAM2. Here, BIT 02 is 0000 H of D 00 to 15 from 1
But the 0004 H in V8D 00 ~ 15.

【0053】(9)期間T9の動作 この期間は、図5に示すようにデバイスRAM2に対し
ては無処理、Bレジスタ21に対しては上記T8と同一
動作をしており、本来の働きはしていない。
(9) Operation in Period T9 During this period, as shown in FIG. 5, no processing is performed on the device RAM2, and the same operation as that of T8 is performed on the B register 21. I haven't.

【0054】(10)期間T10の動作 OUT命令の動作を説明する。この期間でも初めにIN
CKとDECL(2)11のCKが発生し、前述と同様
にデバイスRAM2のアドレス2000H のY0 〜YF
がデバイスRAMラッチ17D0015に転送される。一
方、DECL(2)11のCK発生より、DECL
(1)10のOUT出力がDECL(2)11に転送さ
れ、OUT=1になると共にB3R7のB3R16〜1
9の4bit情報0011=3H (Y0 〜YFのうちY
3 を表す)がデバイスRAMビット指定ラッチ16に転
送されたのち、4TO16デコーダ19に入力され、上
記T7のEGPと同様の動作をし、BIT3のみ1とな
り、他は0となる。BIT00〜15はビット処理回路
24で用いられており、BIT00〜15のうち0のも
のは、デバイスRAMラッチ17のD0015が、また、
1のものは、BR0 の内容(ここでは1)がデバイスR
AM2へ出力される。ここでは、BIT03=1よりD
0015の0000H がV8D0015では0008H とな
る。即ち、X11がON時にY3 がONしたわけである。
(10) Operation in Period T10 The operation of the OUT instruction will be described. Even during this period,
CK and CK of DECL (2) 11 are generated, and Y 0 to YF at address 2000 H of the device RAM 2 are generated in the same manner as described above.
There is transferred to the device RAM latch 17D 00 ~ 15. On the other hand, when CK of DECL (2) 11 occurs,
(1) The OUT output of 10 is transferred to the DECL (2) 11, and OUT = 1, and B3R16 to B3R1 of B3R7
9 4-bit information 0011 = 3 H (Y out of Y 0 to YF)
After representing the 3) is transferred to the device RAM bits specified latch 16, is input to 4TO16 decoder 19, the same operation as EGP the T7, it becomes 1 only BIT3, others are zero. BIT00~15 is used in the bit processing circuit 24, those of 0 among BIT00~15, D 00 ~ 15 of the device RAM latch 17, also,
In the case of device 1, the contents of BR 0 (1 in this case) are device R
Output to AM2. Here, BIT03 = 1 and D
00 0000 H to 15 becomes the V8D 00 ~ 15 in 0008 H. That is why X 11 is the ON at Y 3 has turns ON.

【0055】(11)期間T11の動作 T11は演算無処理期間であり、LD命令のリードとO
UT命令のB2R転送を行っている。転送命令について
は以上述べた通りであり、図6〜9に転送命令のみにつ
いて概要説明した(エッジ命令は省いている)。
(11) Operation in Period T11 T11 is a period in which no operation is performed.
B2R transfer of UT instruction is performed. The transfer command is as described above, and only the transfer command has been outlined in FIGS. 6 to 9 (the edge command is omitted).

【0056】図6〜9は1スキャンのEND前にX0
ONになったときの動作であり、2スキャンのMOUT
及びMZOUT命令実行後に所定の出力が転送される。
エッジ命令については、図5だけでは動作説明できない
ため、図10〜図13で説明する。
[0056] FIG. 6-9 is an operation when the X 0 is turned ON before 1 scan END, the second scan MOUT
, And a predetermined output is transferred after execution of the MZOUT instruction.
The operation of the edge instruction cannot be described with reference to FIG. 5 alone, and will be described with reference to FIGS.

【0057】(12)EGP命令動作 EGP命令動作について図10を用いて説明する。第1
スキャン動作はX11=OFFであるので、LDX11では
BR0 =0、EGPではBR0 =0よりデバイスRAM
2に0000H を出力する(入力D0015と同じ結果で
あり無処理と同じ)と共にBR0 (=0)とD0015
中のM(=0)のインバータ出力とのAND処理をした
ものをBレジスタ21に書き込む(=0)OUTY3
はBR0 (=0)をデバイスRAMに0000H 出力す
る(入力D0015と同じ結果であり無処理と同じ)。第
2スキャン動作は上述した図5に示す通りである。
(12) EGP Command Operation The EGP command operation will be described with reference to FIG. First
Since the scanning operation is a X 11 = OFF, the LDX 11 BR 0 = 0, EGP in BR 0 = 0 from the device RAM
2 To output the 0000 H the AND processing of an inverter output of the M (= 0) in the BR with (input D 00 ~ 15 The same as the same result a is untreated and) 0 (= 0) D 00 ~ 15 were the ones written to the B register 21 (= 0) OUTY 3 in BR 0 (= 0) to be 0000 H output device RAM (input D 00 ~ 15 identical to the same result in and untreated with). The second scanning operation is as shown in FIG. 5 described above.

【0058】第3スキャン動作ではLDX11は第2スキ
ャンと同じ(但し、Bレジスタ21は右シフトされてい
る)。EGPでは、入力D0015のbit2が第2スキ
ャンで1になっているため、AND処理結果BR0 は0
に書き直される。OUTY3 ではBR0 =0より、デバ
イスRAM出力は0000H となり、Y3 はOFFとな
る。以下、第4ステップでもY3 はOFFのままであ
る。従って、EGP命令はX11 ON後、立ち上がり1
スキャンのみY3 はONとなる。
In the third scan operation, the LDX 11 is the same as the second scan (however, the B register 21 is shifted to the right). In EGP, since the bit 2 of the inputs D 00 to 15 is 1 in the second scan, the AND processing result BR 0 is 0
Rewritten. From OUTY 3 in BR 0 = 0, the device RAM outputs 0000 H becomes, Y 3 is turned OFF. Hereinafter, Y 3 remains OFF in the fourth step as well. Therefore, the EGP instruction rises 1 after X 11 is turned on.
Scanning only Y 3 is turned ON.

【0059】(13)EGF命令動作 EGF命令動作について図11を用いて説明する。前述
のEGPとの違いはAND処理の入力情報でありBR0
のインバータ出力とD0015の中のMとなっている。A
ND処理出力=1となる(その結果、Y3 がONとな
る)のは、図11に示す通りX11OFF後のあとの4ス
キャン目だけであり、5スキャン目では再度OFFとな
る。従って、EGF命令はX11OFF後立ち下がり1ス
キャンのみY3 ONとなる。
(13) EGF Instruction Operation The EGF instruction operation will be described with reference to FIG. The difference from the above-mentioned EGP is the input information of the AND processing and BR 0
It has become a M in the inverter output of the D 00 ~ 15. A
The ND process output = 1 (thus, Y 3 is ON) is given, only 4 scanning eyes after post as X 11 OFF shown in FIG. 11, once again turned OFF at 5 scans eyes. Thus, EGF instruction X 11 OFF after the falling only one scan Y 3 is turned ON.

【0060】(14)EGS命令動作 EGS命令動作について図12を用いて説明する。EG
Pとの違いはAND処理の入力情報でありインバータが
ないことである。AND処理出力=1となる(その結
果、Y3 がONとなる)のは図12の通り、X11ON後
1スキャン遅れの第3スキャン目であり、X11OFF後
次スキャンでY3 がOFFとなる。従って、EGS命令
はX11ON後1スキャン遅れでY3 がONとなる。
(14) EGS Command Operation The EGS command operation will be described with reference to FIG. EG
The difference from P is that it is input information for AND processing and there is no inverter. AND processing output = 1 and becomes (a result, Y 3 is ON) as from FIG. 12, a third scan th X 11 ON after one scan delay, the Y 3 in X 11 OFF after the next scan It turns off. Therefore, EGS instruction Y 3 is turned ON at 1 scan delay after X 11 ON.

【0061】(15)EGC命令動作 EGC命令動作について図13を用いて説明する。EG
Sとの違いはANDがOR処理となったことである。O
R処理出力=1となる(その結果、Y3 がONとなる)
のは図13に示す通り、X11ON後次スキャンでONす
るが、X11OFF後、次々スキャンでY13がOFFとな
る。従って、EGC命令はX11OFF後1スキャン遅れ
でY3 がOFFとなる。
(15) EGC Command Operation The EGC command operation will be described with reference to FIG. EG
The difference from S is that AND is ORed. O
R processing output = 1 and becomes (a result, Y 3 is ON)
It is as shown in FIG. 13, ON Suruga in X 11 ON after the next scan, after X 11 OFF, Y 13 is turned OFF at successive scan to. Therefore, EGC instruction Y 3 is turned OFF in a single scan delay after X 11 OFF.

【0062】[0062]

【発明の効果】以上のようにこの発明によれば、入力命
令と、転送命令(LD+MLD+MOUT命令)を4サ
イクルと極めて高速に処理することが可能であり、例え
ば、ICの性能にもよるが、基準クロックMCK=40
MHz で動作させると75ns(1サイクル)×4サイク
ル=300nsで処理可能となる。
As described above, according to the present invention, it is possible to process an input command and a transfer command (LD + MLD + MOUT command) at a very high speed of four cycles. For example, although it depends on the performance of an IC, Reference clock MCK = 40
Operation at MH z enables treated with 75 ns (1 cycle) × 4 cycles = 300 ns.

【0063】また、転送命令に入力条件OFFと000
H を転送する命令(MZOUT)を追加したので、シ
ーケンスプログラムの作成が簡単となり、ステップ数が
削減できる。
The input condition OFF and 000 are added to the transfer command.
0 because H have added the forwarding instructions (MZOUT), creation of the sequence program is simplified, thereby reducing the number of steps.

【0064】また、H/W回路で4種類のエッヂ命令を
構成したので、LD+EG□+OUT命令を5サイクル
と極めて高速に処理することが可能となる。
Further, since four types of edge instructions are constituted by the H / W circuit, it becomes possible to process the LD + EG □ + OUT instruction at extremely high speed of five cycles.

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

【図1】この発明によるPCの構成を示したブロック図
である。
1 is a block diagram showing the configuration of a P C according to the present invention.

【図2】図1に示したPCの動作を示すラダー回路図で
ある。
FIG. 2 is a ladder circuit diagram showing an operation of the PC shown in FIG. 1;

【図3】図2(a)に示したラダー回路の詳細な内容を
示す説明図である。
FIG. 3 is an explanatory diagram showing detailed contents of a ladder circuit shown in FIG.

【図4】図3に示した内容を更に詳細に示す説明図であ
る。
FIG. 4 is an explanatory diagram showing the contents shown in FIG. 3 in more detail;

【図5】図2(a)に示したラダー回路の動作を示すタ
イミングチャートである。
FIG. 5 is a timing chart showing an operation of the ladder circuit shown in FIG.

【図6】図2(a)のうち、アについてのMOUT命令
時における内部動作を示す説明図である。
FIG. 6 is an explanatory diagram showing an internal operation at the time of a MOUT instruction for A in FIG.

【図7】図2(b)のMOUT命令時における内部動作
を示す説明図である。
FIG. 7 is an explanatory diagram showing an internal operation at the time of a MOUT instruction in FIG. 2B;

【図8】図2(a)のうち、アについてのMZOUT命
令時における内部動作を示す説明図である。
FIG. 8 is an explanatory diagram showing an internal operation at the time of an MZOUT instruction for A in FIG.

【図9】図2(b)のMZOUT命令時における内部動
作を示す説明図である。
FIG. 9 is an explanatory diagram showing an internal operation at the time of an MZOUT instruction in FIG. 2 (b).

【図10】図2(a)のうちイについてのEGP命令時
における内部動作を示す説明図である。
FIG. 10 is an explanatory diagram showing an internal operation at the time of an EGP instruction with respect to a in FIG. 2A.

【図11】図2(a)のうちイについてのEGF命令時
における内部動作を示す説明図である。
FIG. 11 is an explanatory diagram showing an internal operation at the time of an EGF instruction for A in FIG. 2A.

【図12】図2(a)のうちイについてのEGS命令時
における内部動作を示す説明図である。
FIG. 12 is an explanatory diagram showing an internal operation at the time of an EGS command for A in FIG. 2A.

【図13】図2(a)のうちイについてのEGC命令時
における内部動作を示す説明図である。
FIG. 13 is an explanatory diagram showing an internal operation at the time of an EGC instruction for A in FIG. 2A.

【図14】従来におけるPCの概略構成を示すブロック
図である。
FIG. 14 is a block diagram showing a schematic configuration of a conventional PC.

【図15】図14に示したPCの動作を示すラダー回路
である。
FIG. 15 is a ladder circuit showing an operation of the PC shown in FIG. 14;

【図16】従来におけるPCの微分出力命令を示すタイ
ミングチャートである。
FIG. 16 is a timing chart showing a conventional PC differential output command.

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

1 SPM 2 デバイスRAM 3 CPU 4 システムROM 5 シーケンス制御回路 6 B2Rレジスタ 7 B3Rレジスタ 8 B4Rレジスタ 9 DEC 10 DECL(1) 11 DECL(2) 12 発振回路 13 クロック発生回路 14 H/W制御回路 15 定数ラッチ 16 デバイスRAMビット指定ラッチ 17 デバイスRAMラッチ 18 16TO1セレクタ 19 4TO16デコーダ 20 H/W演算回路 21 Bレジスタ 22 Dレジスタ 23 ワード処理回路 24 ビット処理回路 1 SPM 2 Device RAM 3 CPU 4 System ROM 5 Sequence control circuit 6 B2R register 7 B3R register 8 B4R register 9 DEC 10 DECL (1) 11 DECL (2) 12 Oscillator 13 Clock generator 14 H / W control circuit 15 Constant Latch 16 Device RAM bit designation latch 17 Device RAM latch 18 16 TO1 selector 194 4TO16 decoder 20 H / W operation circuit 21 B register 22 D register 23 Word processing circuit 24 bit processing circuit

Claims (9)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 シーケンスプログラムを格納するシーケ
ンスプログラム記憶手段と、デバイス結果を格納するデ
バイス記憶手段と、前記シーケンスプログラム記憶手段
に格納されているシーケンスプログラムを順次読み出す
パイプラインレジスタと、前記デバイス記憶手段の内容
を一時記憶するラッチ手段と、ハードウェア命令を高速
に演算するハードウェア演算手段と、前記ハードウェア
演算手段の結果を一時記憶するハードウェア演算結果レ
ジスタを備えたことを特徴とするプログラマブルコント
ローラ。
1. A sequence program storage means for storing a sequence program, a device storage means for storing a device result, a pipeline register for sequentially reading sequence programs stored in the sequence program storage means, and the device storage means Means for temporarily storing the contents of the hardware operation, hardware operation means for operating hardware instructions at high speed, and a hardware operation result register for temporarily storing the result of the hardware operation means.
Programmable controller comprising the register.
【請求項2】 前記デバイス記憶手段に格納されたソー
スデバイスを一時記憶するデータレジスタを設け、デバ
イス間の転送命令において、前記ハードウェア演算結果
レジスタがONのとき、ソースデバイスを一時記憶した
前記データレジスタの内容を前記デバイス記憶手段に書
き込むことを特徴とする請求項1記載のプログラマブル
コントローラ。
2. A data register for temporarily storing a source device stored in said device storage means, wherein a hardware operation result is provided in a transfer instruction between devices.
2. The programmable controller according to claim 1, wherein when the register is ON, the contents of the data register temporarily storing a source device are written to the device storage means.
【請求項3】 前記パイプラインレジスタの内容を一時
記憶する定数ラッチ手段を設け、前記定数ラッチ手段に
格納された定数の値を前記データレジスタに一時記憶
し、定数/デバイス間の転送命令で前記ハードウェア演
算結果レジスタがONのとき、定数の値を一時記憶した
前記データレジスタの内容を前記デバイス記憶手段に書
き込むことを特徴とする請求項1記載のプログラマブル
コントローラ。
3. A constant latch means for temporarily storing the contents of the pipeline register, a constant value stored in the constant latch means being temporarily stored in the data register, and a constant / device transfer instruction for transferring the constant value. Hardware performance
2. The programmable controller according to claim 1, wherein when the calculation result register is ON, the content of the data register temporarily storing a constant value is written to the device storage means.
【請求項4】 前記ハードウェア演算結果レジスタがO
FFのとき、特定の値を前記デバイス記憶手段に書き込
むことを特徴とする請求項2または3記載のプログラマ
ブルコントローラ。
4. The hardware operation result register according to claim 1, wherein
4. The programmable controller according to claim 2, wherein a specific value is written to the device storage unit when the FF is set.
【請求項5】 前記パイプラインレジスタから出力され
た信号をラッチするビット指定ラッチ手段と、前記ビッ
ト指定ラッチ手段から出力される信号をビット変換する
デコーダと、前記デバイス記憶手段から出力される特定
のビットを選択するセレクタと、前記デコーダからの出
力に基づいてデバイス記憶手段に書き込む信号を処理す
るビット処理手段を設け、前記ハードウェア演算結果レ
ジスタがONのとき、前記デコーダとビット処理手段に
より前記デバイス記憶手段の所定ビットに1を乗せると
共に、前記ハードウェア演算手段により前記ハードウェ
ア演算結果レジスタの内容と、前記セレクタの内容を演
算し、該演算結果を前記ハードウェア演算結果レジスタ
に書き込むことを特徴とする請求項1記載のプログラマ
ブルコントローラ。
5. A bit designation latch means for latching a signal output from the pipeline register, a decoder for bit-converting a signal output from the bit designation latch means, and a specific signal output from the device storage means. a selector for selecting the bit, provided the bit processing means for processing a signal to be written to the device memory means based on the output from the decoder, the hardware operation results Les
When register is ON, with putting a 1 to a predetermined bit of said device memory means by said decoder and the bit processing means, wherein the said hardware computing means hardware
The programmable controller according to claim 1, wherein the contents of the operation result register and the contents of the selector are operated, and the operation result is written in the hardware operation result register .
【請求項6】 前記ハードウェア演算手段が、前記ハー
ドウェア演算結果レジスタの反転出力の内容と、前記セ
レクタの内容の論理積(AND)を取った立ち下がり1
スキャンON命令を出力することを特徴とする請求項5
記載のプログラマブルコントローラ。
6. The hardware operation means according to claim 1 , wherein
The contents of the inverted output of the hardware operation result register and the
Falling 1 obtained by taking the logical product (AND) of the contents of the vector
6. A scan ON command is output.
The programmable controller as described.
【請求項7】 前記ハードウェア演算手段が、前記ハー
ドウェア演算結果レジスタの内容と、前記セレクタの反
転出力の内容の論理積(AND)を取った立ち上がり1
スキャンON命令を出力することを特徴とする請求項5
記載のプログラマブルコントローラ。
7. The hardware operation means according to claim 7 , wherein
Hardware operation result register and the contents of the selector
Rise 1 obtained by taking the logical product (AND) of the contents of the inverted output
6. A scan ON command is output.
The programmable controller as described.
【請求項8】 前記ハードウェア演算手段が、前記ハー
ドウェア演算結果レジスタの内容と、前記セレクタの内
容の論理和(OR)を取った1スキャン遅れOFF命令
を出力することを特徴とする請求項5記載のプログラマ
ブルコントローラ。
8. The hardware operation means according to claim 1 , wherein
Hardware operation result register and the contents of the selector.
1 scan delay OFF instruction with logical sum (OR)
6. The programmer according to claim 5, wherein
Bull controller.
【請求項9】 前記ハードウェア演算手段が、前記ハー
ドウェア演算結果レジスタの内容と、前記セレクタの内
容の論理積(AND)を取った1スキャン遅れON命令
を出力することを特徴とする請求項5記載のプログラマ
ブルコントローラ。
9. The hardware computing means according to claim 1 , wherein
Hardware operation result register and the contents of the selector.
1 scan delay ON command that takes the logical product of AND (AND)
6. The programmer according to claim 5, wherein
Bull controller.
JP1289692A 1992-01-28 1992-01-28 Programmable controller Expired - Lifetime JP2792778B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1289692A JP2792778B2 (en) 1992-01-28 1992-01-28 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1289692A JP2792778B2 (en) 1992-01-28 1992-01-28 Programmable controller

Publications (2)

Publication Number Publication Date
JPH05204415A JPH05204415A (en) 1993-08-13
JP2792778B2 true JP2792778B2 (en) 1998-09-03

Family

ID=11818158

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1289692A Expired - Lifetime JP2792778B2 (en) 1992-01-28 1992-01-28 Programmable controller

Country Status (1)

Country Link
JP (1) JP2792778B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3691435B2 (en) * 1999-05-28 2005-09-07 三菱電機株式会社 Programmable controller

Also Published As

Publication number Publication date
JPH05204415A (en) 1993-08-13

Similar Documents

Publication Publication Date Title
US5596760A (en) Program control method and program control apparatus
EP0238090A2 (en) Microcomputer capable of accessing internal memory at a desired variable access time
JP2792778B2 (en) Programmable controller
KR100398759B1 (en) A programmable controller
JP2694948B2 (en) Micro program processor
JP3014682B2 (en) Program control method and device
US6704853B1 (en) Digital signal processing apparatus and method for controlling the same
JP2503634B2 (en) Micro program controller
JPH05334078A (en) Address generation circuit
JPH06162067A (en) Device and method for controlling vector instruction
US5854919A (en) Processor and its operation processing method for processing operation having bit width exceeding data width of bit storage unit
JP2504974B2 (en) Sequencer high-speed processing method
KR940006816B1 (en) Circuit for enhancement of processing speed for plc system
KR930005707B1 (en) Command processing method of plc
JPH05250156A (en) Risc processor
KR960002544B1 (en) A circuit apparatus for logic analysis
JP2006331212A (en) Logic simulation method and apparatus thereof
JPH02140805A (en) Sequence controller
JPS61202223A (en) Recording system of tree route data for decision of condition
KR980010755A (en) Command repetition processor in PC
JPH01269130A (en) Address calculation control system
JPH09160771A (en) Method and apparatus for indexing of table of storage device
JPH05120005A (en) Processor having repeat instruction of preceding instruction
JPH05303497A (en) Object code output system for language processing program
JPS61180968A (en) Feedback shift register

Legal Events

Date Code Title Description
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20080619

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

Year of fee payment: 10

Free format text: PAYMENT UNTIL: 20080619

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

Year of fee payment: 11

Free format text: PAYMENT UNTIL: 20090619

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

Free format text: PAYMENT UNTIL: 20100619

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20100619

Year of fee payment: 12

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

Year of fee payment: 13

Free format text: PAYMENT UNTIL: 20110619

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

Free format text: PAYMENT UNTIL: 20120619

Year of fee payment: 14

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 14

Free format text: PAYMENT UNTIL: 20120619