JP2793809B2 - Applied instruction processing method of programmable controller - Google Patents

Applied instruction processing method of programmable controller

Info

Publication number
JP2793809B2
JP2793809B2 JP63073697A JP7369788A JP2793809B2 JP 2793809 B2 JP2793809 B2 JP 2793809B2 JP 63073697 A JP63073697 A JP 63073697A JP 7369788 A JP7369788 A JP 7369788A JP 2793809 B2 JP2793809 B2 JP 2793809B2
Authority
JP
Japan
Prior art keywords
instruction
processing
cpu
application
logical operation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP63073697A
Other languages
Japanese (ja)
Other versions
JPH01245306A (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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP63073697A priority Critical patent/JP2793809B2/en
Publication of JPH01245306A publication Critical patent/JPH01245306A/en
Application granted granted Critical
Publication of JP2793809B2 publication Critical patent/JP2793809B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 [産業上の技術分野] 本発明はプログラマブルコントローラの応用命令処理
方式に関するものである。
Description: TECHNICAL FIELD The present invention relates to an applied instruction processing method for a programmable controller.

[従来の技術] 第2図はプログラマブルコントローラの基本的な回路
構成の一例を示しており、図示するプログラマブルコン
トローラはCPU1と、入出力インターフェース2を接続す
るI/Oポート5と、命令処理プログラムなどを記憶したR
OMのような第1のメモリ3と、シーケンスプログラムを
記憶したRAMのような第2のメモリ4とを少なくとも有
し、リレーシーケンスの置き換えとしての基本命令の論
理演算及び該論理演算以外のメモリ間転送や、メモリ間
の論理演算、乗除算等の応用命令の演算を行う機能を備
えている。
[Prior Art] FIG. 2 shows an example of a basic circuit configuration of a programmable controller. The illustrated programmable controller includes a CPU 1, an I / O port 5 connecting an input / output interface 2, an instruction processing program, and the like. R that memorized
A first memory 3 such as an OM, and a second memory 4 such as a RAM storing a sequence program, for performing a logical operation of a basic instruction as a replacement of a relay sequence and a memory other than the logical operation; It is provided with a function of performing application instructions such as transfer, logical operation between memories, and multiplication / division.

第3図は第2図図示のプログラマブルコントローラの
従来の応用命令の処理手順を示しており、従来例では命
令コードをステップでCPU1内のプログラムカウンタの
アドレスより読出し、ステップで応用命令であるかど
うか判定して応用命令であればステップで応用命令の
処理アドレスの計算を行い、第4図に示す応用命令処理
フローへ移行するのである。応用命令でなければ基本命
令処理を行って、ステップへ戻るのである。
FIG. 3 shows a processing procedure of a conventional applied instruction of the programmable controller shown in FIG. 2. In the conventional example, an instruction code is read from an address of a program counter in the CPU 1 in a step, and whether or not the instruction code is an applied instruction in a step. If it is determined that the instruction is an application instruction, the processing address of the application instruction is calculated in a step, and the process proceeds to the application instruction processing flow shown in FIG. If it is not an applied instruction, the basic instruction processing is performed and the process returns to the step.

第4図の応用命令処理フローは転送処理の処理例を示
しており、この処理フローではステップで第1オペラ
ンドコードを読出し、プログラムカウンタをインクリメ
ントする。ステップでは第1オペランドに対応するメ
モリ4内の実アドレスAを計算して変換し、ステップ
では同時に第2オペランドコードを読出しプログラムカ
ウンタをインクリメントする。そしてステップでは第
2オペランドに対応するメモリ4内の実アドレズBを計
算して変換し、次にステップで第1オペランドの実ア
ドレスAを第2オペランドの実アドレスBに転送する。
The application instruction processing flow of FIG. 4 shows a processing example of the transfer processing. In this processing flow, the first operand code is read in steps and the program counter is incremented. In the step, the real address A in the memory 4 corresponding to the first operand is calculated and converted, and in the step, the second operand code is simultaneously read and the program counter is incremented. Then, in a step, the real address B in the memory 4 corresponding to the second operand is calculated and converted, and then, in a step, the real address A of the first operand is transferred to the real address B of the second operand.

以上のような処理によって従来例では転送命令が実行
されていいた。
In the conventional example, the transfer instruction is executed by the processing described above.

第5図は2つのCPUを設けた別のプログラマブルコン
トローラの構成を示しており、CPUとして命令を判定し
て基本命令の論理演算を行う汎用マイクロプロセッサか
ら構成される第1のCPU1aと、専用ハードウェアにより
構成され応用命令の論理演算を行う第2のCPU1bとを備
え、更に入出力インターフェース2を接続するI/Oポー
ト5と、命令処理プログラムなどを記憶したROMからな
る第1のメモリ3と、シーケンスプログラムを記憶した
RAMからなる第2のメモリ4とを少なくとも有し、リレ
ーシーケンスの置き換えとしての基本命令の論理演算及
び該論理演算以外のメモリ間転送や、メモリ間の論理演
算、乗除算等の応用命令の演算を行う機能を備えてい
る。
FIG. 5 shows the configuration of another programmable controller provided with two CPUs. The first CPU 1a is composed of a general-purpose microprocessor that determines an instruction and performs a logical operation of a basic instruction, and a dedicated hardware. An I / O port 5 for connecting an input / output interface 2 and a first memory 3 comprising a ROM storing an instruction processing program and the like. Memorized the sequence program
A logical operation of a basic instruction as a replacement of a relay sequence, a transfer between memories other than the logical operation, a logical operation between memories, and an operation of an applied instruction such as multiplication / division. It has a function to perform

第6図は第5図図示のプログラムコントローラの応用
命令処理を示すフローチャートを示しており、この従来
例の場合には第1のCPU1aにより、第2のCPU1bを起動さ
せると、、第1のCPU1aはHOLD状態となり、第2のCPU
1bはステップでセットされた内部プログラムカウンタ
で示されるアドレスより論理演算を行い、演算不能コー
ド=応用命令を読出した時点でHOLD状態を解除して第1
のCPU1bが動作を再開する。
FIG. 6 is a flowchart showing the application instruction processing of the program controller shown in FIG. 5. In the case of this conventional example, when the first CPU 1a starts the second CPU 1b, the first CPU 1a Is in HOLD status and the second CPU
1b performs a logical operation from the address indicated by the internal program counter set in the step, cancels the HOLD state when the operation impossible code = application instruction is read, and
CPU 1b resumes operation.

次にステップでは第1のCPU1aが第2のCPU1b内の情
報を読出し、ステップで応用命令の読出しによって戻
ってきたかどうかを判定し、もし応用命令の読出しなら
ば第2のCPU1bのプログラムカウンタからアドレスを読
出し、そのアドレスからシーケンスプログラムを記憶し
ているメモリ4からシーケンスプログラム内容(命令コ
ード)を読出して、ステップで命令処理プログラム
を記憶しているメモリ3の応用命令処理プログラムを書
き込んであるアドレスの計算を行い、ステップで各応
用命令処理へ分岐移行する。
In the next step, the first CPU 1a reads the information in the second CPU 1b, and in the step, determines whether or not it has returned by reading the application instruction. If the application instruction is read, the address is read from the program counter of the second CPU 1b. Is read from the memory 4 storing the sequence program from the address, and the contents of the sequence program (instruction code) are read out from the address, and the step is executed at the address where the applied instruction processing program of the memory 3 storing the instruction processing program is written. The calculation is performed, and the process branches to the application instruction processing in steps.

この応用命令処理完了後は再びステップへ戻り、第
2のCPU1bを起動する。
After the completion of the application instruction processing, the process returns to the step again to activate the second CPU 1b.

[発明が解決しようとしている課題] ところで前者の従来例方式では実際のデータの転送機
能実現のための処理時間よりも処理アドレス計算、演算
対象実アドレスの計算の方が時間がかかり、また定数を
メモリに転送する場合は処理内容がメモリ間の処理と異
なるので、その判定を行なって、違う処理を実行する必
要があった。
[Problems to be Solved by the Invention] In the former conventional method, however, the processing address calculation and the calculation of the operation target real address take longer than the processing time for realizing the actual data transfer function, and the constant is reduced. When the data is transferred to the memory, the processing content is different from the processing between the memories. Therefore, it is necessary to make a determination and execute a different processing.

後者の従来例方式の場合には第6図で示すステップ
、、、の部分を応用命令処理の実行毎に通過す
るので、たとえ応用命令が連続していても処理時間が割
り増しとなっていた。
In the case of the latter conventional example, the steps shown in FIG. 6 are passed each time the application instruction processing is executed, so that the processing time is increased even if the application instructions are continuous.

本発明は上述の問題点に鑑みて為されたもので、応用
命令の処理における処理時間の短縮を図ったプログラマ
ブルコントローラの応用命令処理方式を提供することを
目的とし、特にスキャンタイムを短縮したプログラマブ
ルコントローラの応用命令処理方式を提供することを目
的とする。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has as its object to provide an applied instruction processing method of a programmable controller which aims to reduce the processing time in processing applied instructions, and in particular, to provide a programmable controller having a reduced scan time. An object of the present invention is to provide an application instruction processing method of a controller.

[課題を解決する手段] 請求項1の発明では、システムの制御と応用命令の演
算処理を行う汎用マイクロプロセッサにより構成される
第1のCPUと、専用ハードウェアにより構成され、基本
命令のビット演算を行う第2のCPUとを備えるととも
に、入出カインターフェースと、命令処理プログラムな
どを記憶した第1のメモリと、シーケンスプログラムを
記憶した第2のメモリとを少なくとも有し、リレーシー
ケンスの置き換えとしての基本命令の論理演算及ぴ該論
理演算以外のメモリ間転送や、メモリ間の論理演算、乗
除算等の応用命令を演算を行う機能を備えたプログラマ
ブルコントローラにおいて、シーケンスプログラム内に
応用命令が連続して存在する際に応用命令のみを連続的
に実行する連続実行過程を備えたことを特徴とする。
[Means for Solving the Problems] According to the first aspect of the present invention, a first CPU configured by a general-purpose microprocessor for controlling a system and performing arithmetic processing of applied instructions, and a bit operation of a basic instruction configured by dedicated hardware And a second memory that stores an input / output interface, an instruction processing program, and the like, and a second memory that stores a sequence program. In a programmable controller having a function for performing a logical operation of a basic instruction and a transfer between memories other than the logical operation, a logical operation between memories, and an application instruction such as a multiplication / division, the application instruction is continuously stored in a sequence program. A continuous execution step of continuously executing only the application instruction when it exists.

〔作用〕[Action]

請求項1の発明では、応用命令が連続した場合には第
1のCPUと第2のCPU間のデータの交換を行うことなく応
用命令を連続実行過程により連続的に実行するのであ
る。
According to the first aspect of the present invention, when the application instructions are consecutive, the application instructions are continuously executed in a continuous execution process without exchanging data between the first CPU and the second CPU.

[実施例] 第1図は請求項1の発明に対応する実施例の連続実行
処理部のフローチャートを示す。この実施例では第5図
のプログラムコントローラにおいて、ステップで第2
のCPU1bのプログラムカウンタをセットし、最初の演算
をステップで第2CPU1bを起動することにより始め、ス
テップまでは第6図に示す従来の方式と同じである
が、ステップにおける応用命令処理中の手段が異なっ
ている。つまり、応用命令処理先頭では第2のCPU1b内
のプログラムカウンタをその応用命令長だけ進める処理
を行ない、次にその応用命令の機能処理を行なう。最後
にステップで次の命令を第1のCPU1aにより読出して
判定し、次の応用命令処理アドレスの計算ステップま
たは基本命令の実行処理アドレス(ステップ)へ移行
する。
[Embodiment] FIG. 1 is a flowchart of a continuous execution processing unit according to an embodiment of the present invention. In this embodiment, in the program controller of FIG.
The first operation is started by activating the second CPU 1b in steps, and the first operation is the same as the conventional method shown in FIG. Is different. That is, at the beginning of the application instruction processing, a process of advancing the program counter in the second CPU 1b by the application instruction length is performed, and then, the function processing of the application instruction is performed. Finally, in the step, the next instruction is read out by the first CPU 1a and determined, and the process proceeds to the next application instruction processing address calculation step or the basic instruction execution processing address (step).

以上の処理によって、応用命令が連続している場合に
は従来処理のステップ、、、を省くことができ
るので、その分の短縮化を図ることが可能となる。
According to the above-described processing, when the application instructions are continuous, the steps of the conventional processing can be omitted, and accordingly, it is possible to achieve a corresponding reduction.

[発明の効果] 請求項1の発明は、システムの制御と応用命令の演算
処理を行う汎用マイクロプロセッサにより構成される第
1のCPUと、専用ハードウェアにより構成され、基本命
令のビット演算を行う第2のCPUとを備えるとともに、
入出カインターフェースと、命令処理プログラムなどを
記憶した第1のメモリと、シーケンスプログラムを記憶
した第2のメモリとを少なくとも有し、リレーシーケン
スの置き換えとしての基本命令の論理演算及ぴ該論理演
算以外のメモリ間転送や、メモリ間の論理演算、乗除算
等の応用命令を演算を行う機能を備えたプログラマブル
コントローラにおいて、シーケンスプログラム内に応用
命令が連続して存在する際に応用命今のみを連続的に実
行する連続実行過程を備えたので、応用命令が2命令以
上連続する場合には、短縮効果が現れ、連続する数だけ
の効果を得ることが出来るので、応用命令を連続して使
用するようなシーケンスプログラムを実行する場合に
は、全体としてスキャン時間の短縮が可能となるという
効果がある。
[Effect of the Invention] The invention of claim 1 is configured by a first CPU configured by a general-purpose microprocessor that performs system control and arithmetic processing of applied instructions, and is configured by dedicated hardware, and performs bit operation of basic instructions. With a second CPU,
It has at least an input / output interface, a first memory storing an instruction processing program and the like, and a second memory storing a sequence program, and performs a logical operation of a basic instruction as a replacement of a relay sequence and other than the logical operation. In a programmable controller equipped with a function to perform application instructions such as transfer between memories, logical operation between memories, multiplication / division, etc., when an application instruction exists continuously in a sequence program, only the application life is continued. In the case where two or more application instructions are consecutively executed, a shortening effect appears, and the same number of consecutive effects can be obtained. Therefore, the application instructions are continuously used. When such a sequence program is executed, there is an effect that the scan time can be shortened as a whole.

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

第1図は請求項1の発明の実施例の動作説明用フローチ
ャート、第2図はプログラマブルコントローラの回路構
成図、第3図、第4図は従来例の動作説明用フローチャ
ート、第5図は別のプログラマブルコントローラの回路
構成図、第6図は別の従来例の動作説明用フローチャー
トである。 1,1a,1bはCPU、2は入出力インターフェース、3,4はメ
モリ、5はI/Oポートである。
FIG. 1 is a flowchart for explaining the operation of the embodiment of the first aspect of the present invention, FIG. 2 is a circuit configuration diagram of the programmable controller, FIGS. 3 and 4 are flowcharts for explaining the operation of the conventional example, and FIG. FIG. 6 is a flowchart for explaining the operation of another conventional example. 1, 1a and 1b are CPUs, 2 is an input / output interface, 3 and 4 are memories, and 5 is an I / O port.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】システムの制御と応用命令の演算処理を行
う汎用マイクロプロセッサにより構成される第1のCPU
と、専用ハードウェアにより構成され、基本命令のビッ
ト演算を行う第2のCPUとを備えるとともに、入出カイ
ンターフェースと、命令処理プログラムなどを記憶した
第1のメモリと、シーケンスプログラムを記憶した第2
のメモリとを少なくとも有し、リレーシーケンスの置き
換えとしての基本命令の論理演算及ぴ該論理演算以外の
メモリ間転送や、メモリ間の論理演算、乗除算等の応用
命令を演算を行う機能を備えたプログラマブルコントロ
ーラにおいて、シーケンスプログラム内に応用命令が連
続して存在する際に応用命令のみを連続的に実行する連
続実行過程を備えたことを特徴とするプログラマブルコ
ントローラの応用命令処理方式。
1. A first CPU comprising a general-purpose microprocessor for controlling a system and performing arithmetic processing of applied instructions
And a second CPU configured by dedicated hardware and performing a bit operation of a basic instruction, a first memory storing an input / output interface, an instruction processing program, and a second CPU storing a sequence program.
With a function of performing a logical operation of a basic instruction as a replacement of a relay sequence and a transfer between memories other than the logical operation, a logical operation between memories, and an application instruction such as multiplication / division. A programmable controller according to claim 1, further comprising a continuous execution step of continuously executing only the application instruction when the application instruction is continuously present in the sequence program.
JP63073697A 1988-03-28 1988-03-28 Applied instruction processing method of programmable controller Expired - Lifetime JP2793809B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63073697A JP2793809B2 (en) 1988-03-28 1988-03-28 Applied instruction processing method of programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63073697A JP2793809B2 (en) 1988-03-28 1988-03-28 Applied instruction processing method of programmable controller

Publications (2)

Publication Number Publication Date
JPH01245306A JPH01245306A (en) 1989-09-29
JP2793809B2 true JP2793809B2 (en) 1998-09-03

Family

ID=13525667

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63073697A Expired - Lifetime JP2793809B2 (en) 1988-03-28 1988-03-28 Applied instruction processing method of programmable controller

Country Status (1)

Country Link
JP (1) JP2793809B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6297003A (en) * 1985-10-23 1987-05-06 Toshiba Mach Co Ltd Processing system for high-class language with programmable controller

Also Published As

Publication number Publication date
JPH01245306A (en) 1989-09-29

Similar Documents

Publication Publication Date Title
DE69126166T2 (en) Programmable control device
JPH0437927A (en) Processor processing method
JP2793809B2 (en) Applied instruction processing method of programmable controller
JPH03288906A (en) Instruction executing system for pc
JP3207333B2 (en) Programmable controller
JPH082727Y2 (en) Programmable sequencer
JPS63304302A (en) Programmable controller
JP3024719B2 (en) Arithmetic processing method of programmable controller
JPS6048770B2 (en) Information processing method
JP2544533B2 (en) Programmable controller sequence instruction processor
JPH0158522B2 (en)
JPS6379162A (en) Control system for transferring processor data
JPH07210403A (en) Task switching system
JPH04167146A (en) Address tracing system for information processor
JPS63285663A (en) Co-processor control system
JP2982129B2 (en) Micro program controller
JPS6348698A (en) Memory storage control device
JP2522563B2 (en) Programmable controller
KR20010011683A (en) Central Processing Unit
JPS6028014B2 (en) microprocessor
JPH0644298B2 (en) Program rewriting device for data flow type computer
JPH02122364A (en) Multiprocessor system
JPH0575840U (en) controller
JPH0636161B2 (en) Information processing equipment
JPS59139454A (en) Program execution system

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term