JPS58200346A - Sequence controller - Google Patents

Sequence controller

Info

Publication number
JPS58200346A
JPS58200346A JP8167282A JP8167282A JPS58200346A JP S58200346 A JPS58200346 A JP S58200346A JP 8167282 A JP8167282 A JP 8167282A JP 8167282 A JP8167282 A JP 8167282A JP S58200346 A JPS58200346 A JP S58200346A
Authority
JP
Japan
Prior art keywords
program
control program
processing
setting information
option
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
JP8167282A
Other languages
Japanese (ja)
Inventor
Tatsuhiro Ono
小野 龍宏
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.)
NEC Corp
Original Assignee
NEC Corp
Nippon Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp, Nippon Electric Co Ltd filed Critical NEC Corp
Priority to JP8167282A priority Critical patent/JPS58200346A/en
Publication of JPS58200346A publication Critical patent/JPS58200346A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
    • G06F9/328Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for runtime instruction patching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements
    • G06F9/26Address formation of the next micro-instruction ; Microprogram storage or retrieval arrangements
    • G06F9/262Arrangements for next microinstruction selection
    • G06F9/268Microinstruction selection not based on processing results, e.g. interrupt, patch, first cycle store, diagnostic programs
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/36Nc in input of data, input key till input tape
    • G05B2219/36078Insert, read in new command instruction to modify fixed program

Abstract

PURPOSE:To simplify a control program and to shorten a processing time, by executing the program which is modified the content of program in an RAM area in matching with control processing which varies with option setting information. CONSTITUTION:A basic control program is transferred from an ROM2 where the basic control program is stored to an RAM3 during the initializing operation of program execution. Then, the option setting information is inputted from an input part 4 to the RAM3. The control program is allowed to modify itself in the area of the RAM3 in matching with the optional setting information. This modified control program is executed by a microprocessor 1 to carry out processing without any awareness of option setting.

Description

【発明の詳細な説明】 本発明は、マイクロプロセッサを用いたシーケンス制御
装置に関し、特に、その動作上のオプション状態により
異なる制御処理を、そのプログラム内容をRAM (ラ
ンダム・アクセス・メモリ)領域で変更したプログラム
を実行することにより行なうシーケンス制御装置を提供
するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a sequence control device using a microprocessor, and in particular, the present invention relates to a sequence control device using a microprocessor. The present invention provides a sequence control device that performs operations by executing a program.

従来、このようなシーケンス制御装置は、制御プログラ
ム実行中に、動作上のオプション設定情報を入力して、
あるいはその情報をフラッグとしてメモリに記憶してお
き、その情報を。
Conventionally, such a sequence control device inputs operational option setting information while executing a control program, and
Or store that information in memory as a flag.

常に、各制御シーケンス中で判定しながらそのオプショ
ン状態に合わせたシーケンス動作の制御を行なっている
。このような□シーケンス制御中のこのオブシシン情報
の判定処理は、高速処理が要求されるシーケンス制御装
置においては。
The sequence operation is always controlled in accordance with the option state while making decisions during each control sequence. This process of determining obfuscation information during sequence control is suitable for sequence control devices that require high-speed processing.

その処理時間短縮の上で大きな問題であった。This was a big problem in terms of shortening the processing time.

たとえば、z80マイクロプロセッサを使用したシーケ
ンス制御装置で、ある割込み処理プログラム中で、オプ
ション設定情報により、処理ルーチンが異なる場合の例
を次に示す。
For example, the following is an example of a sequence control device using a Z80 microprocessor in which the processing routines in an interrupt processing program differ depending on option setting information.

lNTR:   DI PUSHAF JP     lNTR4 INTRl:  IN   A、0PTPBIT  0
PT1.A ) JP   NZ、INTRB INTRA:  (処理A) pop ’ AP’ EI RF、T INTRB:  (処理B) POP   AF EI RET ここで、 lNTR,lNTR1、工NTRA、 IN
TRBはそ、:: れぞれ割込みルーチンを示している。
lNTR: DI PUSHAF JP lNTR4 INTRl: IN A, 0PTPBIT 0
PT1. A) JP NZ, INTRB INTRA: (Processing A) pop 'AP' EI RF, T INTRB: (Processing B) POP AF EI RET Here, lNTR, lNTR1, engineering NTRA, IN
TRB::: indicates an interrupt routine.

まず、 lNTRにおいて、 DIは割込み禁止命令を
示す。PUSHはレジスタ退避命令を示し、Aはアキュ
ムレータ、Fはフラグレジスタを示す。
First, in lNTR, DI indicates an interrupt disable instruction. PUSH indicates a register save instruction, A indicates an accumulator, and F indicates a flag register.

従って、 PUSHAFはアキュムレータ及びフラグレ
ジスタに対する退避命令である。JPはジャンプ命令を
示し、 JP’、lNTR1はジャンプ先をlNTR1
とするジャンプ命令である。
Therefore, PUSHAF is a save instruction for the accumulator and flag registers. JP indicates a jump command, JP', lNTR1 specifies the jump destination as lNTR1
This is a jump command.

次に、 lNTR1において、INは入力命令を示し、
 0PTPはオプション情報の入力部のアドレスを示す
。従って、 IN A、 0PTPは前記入力部からア
キュームレータにオプション情報を入力させる命令であ
る。BITはビット操作命令を示し。
Next, in lNTR1, IN indicates an input command,
0PTP indicates the address of the option information input section. Therefore, IN A, 0PTP is a command to input option information to the accumulator from the input section. BIT indicates a bit manipulation instruction.

0PTjはそのオプション情報のピッド位置を示す。0PTj indicates the pid position of the option information.

従って、 BIT、OF’TI、Aでは、アキュムレー
タの中の0PT1の位置にフラグが立っているか否がを
判定することになる。そして、 NZはNot Zer
Therefore, in BIT, OF'TI, and A, it is determined whether or not the flag is set at the position 0PT1 in the accumulator. And NZ is Not Zer
.

を示す。従って、 JP NZ、 INTRBでは、 
Not Zer。
shows. Therefore, in JP NZ and INTRB,
Not Zer.

フラグのとき、即ちフラグが立っているとき。When flagged, that is, when the flag is raised.

INTRBにジャンし、逆にZeroフラグのとき。Jump to INTRB and conversely when the Zero flag is set.

即ちフラグが立っていないとき、ジャンプせずINTR
Aが行なわれることになる。
In other words, when the flag is not set, do not jump and INTR
A will be performed.

INIRA又はI NTRBでは、(処理A)又は(処
理B)が行なわれる。また、 POPはレジスタ復帰命
令を示す。従って、 POP AFはアキュムレータ及
びフラグレジスタに対する復帰命令である。EIは割込
み許可命令、 RETはリターン命令である。
In INIRA or INTRB, (processing A) or (processing B) is performed. Furthermore, POP indicates a register return instruction. Therefore, POP AF is a return instruction for the accumulator and flag registers. EI is an interrupt enable instruction, and RET is a return instruction.

このように、オプション状態による条件判定処理が加わ
る場合、この判定処理プログラムlNTR1が大きな要
素となり、また(処理人)あるいは(処理B)のプログ
ラムが小さな場合。
In this way, when condition judgment processing based on the option state is added, this judgment processing program lNTR1 becomes a large element, and when the (processor) or (processing B) program is small.

さらにオプション情報が2種以上ある場合は。Furthermore, if there are two or more types of option information.

その判定処理プログラムの大きさが1割込み処理プログ
ラムの中で、大部分を占めることとなる。
The size of the determination processing program occupies most of the size of one interrupt processing program.

本発明の目的は、このシーケンス制御装置のプログラム
制御を、プログラム実行の初期設定動作時に、各オプシ
ョン設定情報により変化する制御処理に合わせて、その
制御プログラムの内容をRAM領域で変更したプログラ
ムで行なうことにより、実行制御プログラムの単純化お
よび実行処理時間の短縮化を達成したシーケンス制御装
置を提供することにある。
An object of the present invention is to perform program control of this sequence control device using a program whose contents are changed in a RAM area in accordance with the control processing that changes depending on each option setting information during the initial setting operation of program execution. Thus, it is an object of the present invention to provide a sequence control device that can simplify the execution control program and shorten the execution processing time.

本発明は、マイクロプロセッサを用いたシーケンス制御
装置において、その動作上のオプション設定状態により
異なる制御処理を行なうため、そのオプション設定状態
に合わせて制御プログラム内容を自己変更するプログラ
ムを有し。
The present invention is a sequence control device using a microprocessor, and in order to perform different control processing depending on the operational option setting state, the present invention has a program that self-changes the contents of the control program according to the option setting state.

その自己変更用プログラムにより、シーケンス制御プロ
グラムをそのオプション状態専用プログラムに変更し、
その変更した制御プログラムの実行により、実際のシー
ケンス制御処理を行なうことを特徴とするシーケンス制
御装置である。
The self-modification program changes the sequence control program to a program dedicated to that option state,
This sequence control device is characterized in that it performs actual sequence control processing by executing the modified control program.

本発明によれば、マイクロプロセッサを用いたシーケン
ス制御装置において、その動作上のオプション設定情報
により処理が異なる制御プログラムの内容を、そのオプ
ション状態に合わせて、RAM領域で自己変更して、そ
のオプション状態での実行処理を行なうので、実行制御
プログラムの単純化及び実行処理時間の短縮化を達成す
ることができる。
According to the present invention, in a sequence control device using a microprocessor, the content of a control program whose processing differs depending on its operational option setting information is self-modified in a RAM area according to the option state, and the option Since execution processing is performed in the state, it is possible to simplify the execution control program and shorten the execution processing time.

次に本発明の実施例について図面を参照して説明する。Next, embodiments of the present invention will be described with reference to the drawings.

本発明を、z80マイクロプロセッサを使用した制御装
置に適用した実施例を第1図に示す。
FIG. 1 shows an embodiment in which the present invention is applied to a control device using a Z80 microprocessor.

第1図において、1はマイクロプロセッサ、2はリード
・オンリ・メモリ(ROM)、 3はランダム・アクセ
ス・メモリ(RAM)、 4はオプション設定情報入力
部、 ABはアドレスバス、 DBはデータバスである
In Figure 1, 1 is a microprocessor, 2 is a read-only memory (ROM), 3 is a random access memory (RAM), 4 is an option setting information input section, AB is an address bus, and DB is a data bus. be.

ある割込み処理プログラム中に、オプション設定情報に
より、処理ルーチンが異なる場合は。
If an interrupt processing program has different processing routines depending on option setting information.

まずプログラム実行の初期設定動作時に、基本制御プロ
グラムが蓄積されているROM 2よりRAM 3にそ
の基本制御プログラムを転送し9次に、入力部4より各
オプション設定情報をRAM6に入力する。そして、そ
のオプション設定に合わせて、その判定条件処理部分(
従来の割込1: みルーチンlNTR1)が実際に制御プログラム実行時
には全く必要ないように、そのオプション状態専用にプ
ログラムをRAM 3領域で自己変更する。例えば、そ
のオプション設定では、その割込み処理プログラムでの
処理が(処理B)を行なう情報であった場合に次のよう
になる。
First, during the initial setting operation of program execution, the basic control program is transferred from the ROM 2 in which it is stored to the RAM 3.Next, each option setting information is input from the input section 4 to the RAM 6. Then, according to the option settings, the judgment condition processing part (
Conventional interrupt 1: The program is self-modified in the RAM 3 area exclusively for the option state so that the interrupt routine 1NTR1) is not needed at all when actually executing the control program. For example, in the option settings, if the processing in the interrupt processing program is information to perform (processing B), the following will occur.

lNTR:  DI PUSHAF JP     INTR INTRA:  (処理A) POP    AF I ET INTRB:  (処理 B) POP    AF I ET 上記のプログラム全体がROM2に蓄積されている基本
制御プログラムであり、そのうちジャン命令JPのジャ
ンプアドレスlNTRをオプション状態に合わせて; 
INTRBに自己変更し、その。
lNTR: DI PUSHAF JP INTR INTRA: (Processing A) POP AF I ET INTRB: (Processing B) POP AF I ET The entire program above is a basic control program stored in ROM2, and among them, the jump address of jump instruction JP Adjust lNTR to optional state;
Change self to INTRB and that.

プログラムをマイクロプロセッサ1で実行する。A program is executed on microprocessor 1.

本発明は9以上説明したように、オプション 7− 設定状態により異なる制御処理を、そのオプション設定
状態に合わせて、制御プログラム内容を自己変更したプ
ログラムにより実行することで、実際の制御プログラム
実行時には、そのオプション設定を全く意識することな
く処理を行なうことができ、それにより制御プログラム
の単純化および処理時間の短縮を行なう効果がある。
As explained above in Option 7, the present invention executes control processing that differs depending on the setting state by a program that self-modifies the control program contents according to the option setting state, so that when the control program is actually executed, Processing can be performed without being aware of the option settings at all, which has the effect of simplifying the control program and shortening processing time.

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

第1図は本発明の一実施例を示したブロック図である。 1・・・マイクロプロセッサ、2・・・リード・オンリ
・メモリ(ROM)、 3・・・ラン゛ダム・アクセス
・メモ!J (RAM)、 4・・・オプション設定情
報入力部。 AB・・・アドレスバス、 DB・・・データバス 8
− 第1[2] υb
FIG. 1 is a block diagram showing one embodiment of the present invention. 1...Microprocessor, 2...Read-only memory (ROM), 3...Random access memo! J (RAM), 4...Option setting information input section. AB...address bus, DB...data bus 8
- 1st [2] υb

Claims (1)

【特許請求の範囲】 1、制御プログラムが蓄積される第1のメモリと、制御
プログラムの変更に必要な第2のメモリと、制御プログ
ラムを実行するマイクロプロセッサとを備えたシーケン
ス制御装置であって1、該シーケンス制御装置は、その
動作上のオプション設定情報により異なる制御処理を行
なうため、予め、前記第1のメモリに蓄積されている制
御プログラムを前記第2のメモリに転送し。 かつこの転送された制御プログラムを該第2のメモリ領
域で前記オプション設定情報に合わせて変更し、この変
更され゛た制御プログラムを前記マイクロプロセッサに
実行させることを特徴とするシーケンス制御装置。 以下余白
[Claims] 1. A sequence control device comprising a first memory in which a control program is stored, a second memory necessary for changing the control program, and a microprocessor that executes the control program. 1. The sequence control device transfers the control program stored in the first memory to the second memory in advance to perform different control processing depending on the operational option setting information. A sequence control device characterized in that the transferred control program is changed in the second memory area according to the option setting information, and the changed control program is caused to be executed by the microprocessor. Margin below
JP8167282A 1982-05-17 1982-05-17 Sequence controller Pending JPS58200346A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8167282A JPS58200346A (en) 1982-05-17 1982-05-17 Sequence controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8167282A JPS58200346A (en) 1982-05-17 1982-05-17 Sequence controller

Publications (1)

Publication Number Publication Date
JPS58200346A true JPS58200346A (en) 1983-11-21

Family

ID=13752830

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8167282A Pending JPS58200346A (en) 1982-05-17 1982-05-17 Sequence controller

Country Status (1)

Country Link
JP (1) JPS58200346A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60209805A (en) * 1984-04-03 1985-10-22 Fuji Xerox Co Ltd Maintenance control system of copying machine or the like
WO1989003069A1 (en) * 1987-10-05 1989-04-06 Fanuc Ltd Method and apparatus for program loading
WO1990000763A1 (en) * 1988-07-08 1990-01-25 Fanuc Ltd Programmable controller
WO1992008173A1 (en) * 1990-11-01 1992-05-14 Fanuc Ltd Program correction method in numerically controlled device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60209805A (en) * 1984-04-03 1985-10-22 Fuji Xerox Co Ltd Maintenance control system of copying machine or the like
WO1989003069A1 (en) * 1987-10-05 1989-04-06 Fanuc Ltd Method and apparatus for program loading
WO1990000763A1 (en) * 1988-07-08 1990-01-25 Fanuc Ltd Programmable controller
US5168442A (en) * 1988-07-08 1992-12-01 Fanuc Ltd. Programmable controller with modifiable ladder program
WO1992008173A1 (en) * 1990-11-01 1992-05-14 Fanuc Ltd Program correction method in numerically controlled device

Similar Documents

Publication Publication Date Title
JPS58200346A (en) Sequence controller
US5018064A (en) Virtual computer system
JPH04241032A (en) System call execution device
JPH0264740A (en) Microprocessor
JPH0635800A (en) Microprocessor and data processing system using it
JPS59218569A (en) Microcomputer
JPS61184644A (en) Control system of virtual computer system
JPS6027031A (en) Information processor
JPS5839347A (en) Processor
JPS60126731A (en) Program control method
JPH07253889A (en) One-chip microcomputer
JPH05224894A (en) Switching system for os
JP2883489B2 (en) Instruction processing unit
JPH01185733A (en) Input/output emulation system
JPS62202236A (en) Microcomputer device
JPH0517595B2 (en)
JPS61166630A (en) Microprogram control system
JPS6227827A (en) Branch control system for microprogram
JPH07210403A (en) Task switching system
JPH09237192A (en) Interruption controller
JPH01229332A (en) Information processor
JPH07325750A (en) Shared memory access system
JPS6027419B2 (en) interrupt control device
JPH08249024A (en) Programmable controller
JPH0567972B2 (en)