JPH08328621A - Controller - Google Patents

Controller

Info

Publication number
JPH08328621A
JPH08328621A JP13539395A JP13539395A JPH08328621A JP H08328621 A JPH08328621 A JP H08328621A JP 13539395 A JP13539395 A JP 13539395A JP 13539395 A JP13539395 A JP 13539395A JP H08328621 A JPH08328621 A JP H08328621A
Authority
JP
Japan
Prior art keywords
interrupt
user program
unit
program
input unit
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.)
Withdrawn
Application number
JP13539395A
Other languages
Japanese (ja)
Inventor
Masato Yoshioka
誠人 吉岡
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP13539395A priority Critical patent/JPH08328621A/en
Publication of JPH08328621A publication Critical patent/JPH08328621A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE: To eliminate the useless program storage area which is useless also for a user who does net execute an interruption processing. CONSTITUTION: In the RAM 13 and the ROM 14 of a main body unit 1, the program for an interruption processing is not stored. Interruption input units 2 and 3 generating interruptions are provided with RAM 22 and 32 storing interruption user programs and ROM 23 and 33 preliminarily storing interruption control programs performing the controls of the interruptions, respectively. When an interruption is performed for the main body unit 1 from the interruption input generation part 21 of an interruption input unit 2, the MPU 11 of the main body unit 1 executes the interruption control program stored in the ROM 23 of the interruption input unit 2, interrupts the execution of a normal user program by the control and executes the interruption user program stored in the RAM of the interruption input unit 2.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、割込みの発生により、
通常ユーザプログラムの実行を中断して割込みユーザプ
ログラムを実行する制御装置に関する。
BACKGROUND OF THE INVENTION The present invention provides
The present invention relates to a control device that interrupts execution of a normal user program and executes an interrupt user program.

【0002】[0002]

【従来の技術】プログラマブルコントローラ等の制御装
置では、通常処理の実行中に割込み処理を実行するた
め、通常処理のユーザプログラム(以下、「通常ユーザ
プログラム」という。)、およびその通常ユーザプログ
ラムの実行を制御する通常制御プログラムの他に、割込
み処理用のユーザプログラム(以下、「割込みユーザプ
ログラム」という。)、その割込みユーザプログラムの
実行を制御する割込み制御プログラムを有している。
2. Description of the Related Art In a control device such as a programmable controller, interrupt processing is executed during execution of normal processing, and therefore a user program for normal processing (hereinafter referred to as "normal user program") and execution of the normal user program. In addition to the normal control program for controlling the interrupt control, a user program for interrupt processing (hereinafter referred to as "interrupt user program") and an interrupt control program for controlling the execution of the interrupt user program are provided.

【0003】このような制御装置では、従来、本体ユニ
ットのプログラムメモリに割込みプログラム用の格納領
域をとって、通常ユーザプログラムおよび通常制御プロ
グラムと共に、割込みユーザプログラムおよび割込み制
御プログラムを格納していた。
In such a control device, conventionally, a storage area for an interrupt program is provided in the program memory of the main unit to store the interrupt user program and the interrupt control program together with the normal user program and the normal control program.

【0004】[0004]

【発明が解決しようとする課題】しかし、このような制
御装置では、上述のように、本体ユニット側のプログラ
ムメモリ内に、通常ユーザプログラムおよび通常制御プ
ログラムと共に、割込みユーザプログラムおよび割込み
制御プログラムを格納するようにしていたため、割込み
処理を実行しないユーザにとっては、本体ユニットのプ
ログラムメモリ内に、使用しない余分な格納領域を確保
することになり、メモリ容量が制限されると共に、コス
トアップにもつながる、という問題があった。
However, in such a control device, as described above, the interrupt user program and the interrupt control program are stored in the program memory of the main body unit side together with the normal user program and the normal control program. Therefore, for a user who does not perform interrupt processing, an extra storage area that is not used is secured in the program memory of the main unit, which limits the memory capacity and leads to an increase in cost. There was a problem.

【0005】本発明は、このような問題に着目してなさ
れたもので、割込み処理を実行しないユーザにとっても
有益な制御装置を提供することを目的とする。
The present invention has been made in view of such a problem, and an object of the present invention is to provide a control device useful for a user who does not execute interrupt processing.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するた
め、請求項1記載の発明では、割込みを発生させる割込
み入力ユニットと、上記割込み入力ユニットから割込み
が入力した場合、通常ユーザプログラムの実行を中断し
て割込みユーザプログラムを実行する本体ユニットと、
を具備する制御装置であって、上記割込み入力ユニット
は、割込みによって上記本体ユニットに実行させる割込
みユーザプログラムを格納する割込みユーザプログラム
メモリを有し、上記本体ユニットは、上記割込み入力ユ
ニットから割込みが入力した場合、通常ユーザプログラ
ムの実行を中断して、上記割込み入力ユニットの割込み
ユーザプログラムメモリに格納されたユーザプログラム
を実行する、ことを特徴とする。
In order to achieve the above object, in the invention described in claim 1, when an interrupt is input from the interrupt input unit and an interrupt input unit, the normal user program is executed. A main unit that interrupts and executes the interrupt user program;
The interrupt input unit has an interrupt user program memory for storing an interrupt user program to be executed by the main body unit by an interrupt, and the main body unit receives an interrupt from the interrupt input unit. In this case, the execution of the normal user program is interrupted, and the user program stored in the interrupt user program memory of the interrupt input unit is executed.

【0007】請求項2記載の発明では、請求項1記載の
制御装置において、割込み入力ユニットは、さらに割込
みユーザプログラムの実行を制御するための割込み制御
プログラムを予め記憶した割込み制御プログラムメモリ
を有し、本体ユニットは、上記割込み入力ユニットから
割込みが入力した場合、上記割込み入力ユニットの割込
み制御プログラムメモリに格納された割込み制御プログ
ラムを実行し、その制御により、通常ユーザプログラム
の実行を中断して、上記割込み入力ユニットの割込みユ
ーザプログラムメモリに格納された割込みユーザプログ
ラムを実行する、ことを特徴とする。
According to a second aspect of the present invention, in the control device according to the first aspect, the interrupt input unit further has an interrupt control program memory in which an interrupt control program for controlling execution of the interrupt user program is stored in advance. When the interrupt is input from the interrupt input unit, the main body unit executes the interrupt control program stored in the interrupt control program memory of the interrupt input unit, and by the control, interrupts the execution of the normal user program, The interrupt user program stored in the interrupt user program memory of the interrupt input unit is executed.

【0008】請求項3記載の発明では、請求項1または
請求項2記載の制御装置は、通常ユーザプログラムをサ
イクリックに実行するプログラマブルコントローラであ
る、ことを特徴とする。
According to a third aspect of the invention, the control device according to the first or second aspect is a programmable controller that normally cyclically executes a user program.

【0009】[0009]

【作用】本発明では、割込み入力ユニットは、割込みユ
ーザプログラムを格納しており、本体ユニットは、割込
み入力ユニットから割込みが入力した場合には、通常ユ
ーザプログラムの実行を中断して、その割込み入力ユニ
ットの割込みユーザプログラムメモリから割込みユーザ
プログラムを読出し実行する。
According to the present invention, the interrupt input unit stores the interrupt user program, and when the interrupt is input from the interrupt input unit, the main body unit interrupts the execution of the normal user program to input the interrupt input. The interrupt user program of the unit is read from the memory and executed.

【0010】また、割込み入力ユニットは、さらに割込
みユーザプログラムの実行を制御するための割込み制御
プログラムも予め記憶するようにして、本体ユニット
は、割込み入力ユニットから割込みが入力した場合、ま
ず、割込み入力ユニットから割込み制御プログラムを読
出して割込み制御を行い、その制御により、通常ユーザ
プログラムの実行を中断して、割込み入力ユニットから
割込みユーザプログラムを読出し実行するようにしても
良い。
Further, the interrupt input unit further prestores an interrupt control program for controlling the execution of the interrupt user program so that when the interrupt is input from the interrupt input unit, the main unit first receives the interrupt input program. The interrupt control program may be read from the unit to perform interrupt control, and the execution of the normal user program may be interrupted by the control, and the interrupt user program may be read and executed from the interrupt input unit.

【0011】なお、割込み入力ユニットは、外部からの
割込み発生要求の受信や、外部から送信されてきたデー
タの受信等により、本体ユニットに対して割込みを入力
するようにする。
The interrupt input unit inputs an interrupt to the main unit by receiving an interrupt request from the outside or receiving data transmitted from the outside.

【0012】[0012]

【実施例】以下、本発明に係る制御装置の実施例を図面
に基づいて説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a control device according to the present invention will be described below with reference to the drawings.

【0013】図1に、本発明に係る制御装置の実施例で
あるプログラマブルコントローラの構成を示す。
FIG. 1 shows the configuration of a programmable controller which is an embodiment of the control device according to the present invention.

【0014】このプログラマブルコントローラは、図に
示すように、システムバス41を内蔵したベースユニッ
ト4上の各スロット(図示せず)に、本体ユニット1
と、割込み入力ユニット2、3とが装着され、各ユニッ
ト1〜3がシステムバス11を介し接続されて構成され
ている。
As shown in the figure, this programmable controller has a main unit 1 in each slot (not shown) on a base unit 4 having a built-in system bus 41.
And interrupt input units 2 and 3 are mounted, and each unit 1 to 3 is connected via a system bus 11.

【0015】本体ユニット1は、MPU11と、MPU
11のワークエリアと使用されるワークRAM12と、
ユーザによって作成された通常ユーザプログラムが予め
格納された通常ユーザプログラムRAM13と、その通
常ユーザプログラムの実行を制御する通常制御プログラ
ムが予め格納したプログラムROM14と、ベースユニ
ット4のシステムバス41と接続されるシステムバスイ
ンタフェース(I/F)15と、を備えている。
The main unit 1 includes an MPU 11 and an MPU.
11 work areas and a work RAM 12 used,
A normal user program RAM 13 in which a normal user program created by a user is stored in advance, a program ROM 14 in which a normal control program for controlling the execution of the normal user program is stored in advance, and a system bus 41 of the base unit 4 are connected. A system bus interface (I / F) 15 is provided.

【0016】割込み入力ユニット2は、入力端子等を介
し外部機器(図示せず)と接続された通常の入力ユニッ
ト等であり、外部機器からON/OFFの割込み発生要
求により割込みを発生させる割込み発生部21と、この
割込みにより本体ユニット1に実行させる割込みユーザ
プログラムが本ユニット装着後格納される割込みユーザ
プログラムRAM22と、その割込みユーザプログラム
の実行開始/終了等を制御する割込み制御プログラムが
予め格納された割込み制御プログラムR0M23と、シ
ステムバスインタフェース(I/F)24とを備え、割
込み発生部21がシステムバスI/F24を介し本体ユ
ニット1のMPU11に割込みを通知するように構成さ
れている。
The interrupt input unit 2 is a normal input unit or the like connected to an external device (not shown) via an input terminal or the like, and generates an interrupt in response to an ON / OFF interrupt request from the external device. A part 21, an interrupt user program RAM 22 in which an interrupt user program to be executed by the main unit 1 by this interrupt is stored after mounting this unit, and an interrupt control program for controlling the start / end of execution of the interrupt user program are stored in advance. The interrupt generation program 21 includes an interrupt control program R0M23 and a system bus interface (I / F) 24, and is configured to notify the MPU 11 of the main unit 1 of the interrupt via the system bus I / F 24.

【0017】割込み入力ユニット3は、他のプログラマ
ブルコントローラとデータ通信を行う通信ユニット等で
あり、当該他のプログラマブルコントローラから送信さ
れてきたデータの受信等により割込みを発生させる通信
コントローラ等の割込み発生部31と、この割込みによ
り本体ユニット1に実行させる割込みユーザプログラム
が本ユニット装着後格納される割込みユーザプログラム
RAM32と、その割込みユーザプログラムの実行開始
/終了等を制御する割込み制御プログラムが予め格納さ
れた割込み制御プログラムR0M33と、システムバス
インタフェース(I/F)34とを備え、割込み発生部
31がシステムバスI/F34を介し本体ユニット1の
MPU11に割込みを通知するように構成されている。
The interrupt input unit 3 is a communication unit or the like for performing data communication with another programmable controller, and an interrupt generation unit such as a communication controller for generating an interrupt by receiving data transmitted from the other programmable controller. 31, an interrupt user program RAM 32 in which an interrupt user program to be executed by the main unit 1 by this interrupt is stored after mounting this unit, and an interrupt control program for controlling the start / end of execution of the interrupt user program are stored in advance. An interrupt control program R0M33 and a system bus interface (I / F) 34 are provided, and the interrupt generation unit 31 is configured to notify the MPU 11 of the main unit 1 of an interrupt via the system bus I / F 34.

【0018】なお、各割込み入力ユニット2,3には、
予め他のユニットと区別するため、ユニット番号が付さ
れており、割込みユーザプログラムはユニット番号に対
応させて各割込み入力ユニット2,3に格納される。
The interrupt input units 2 and 3 are provided with
A unit number is assigned in advance to distinguish it from other units, and the interrupt user program is stored in each of the interrupt input units 2 and 3 in association with the unit number.

【0019】図2に、本体ユニット1におけるMPU1
1のメモリマップを示す。
FIG. 2 shows the MPU 1 in the main unit 1.
1 shows a memory map of 1.

【0020】このメモリマップ11aは、本体ユニット
1および割込み入力ユニット2,3におけるユーザプロ
グラムを格納するRAM13,22,32、およびその
制御プログラムを格納するROM14,23,33で使
用されるアドレスの割り当てを示すもので、ベースユニ
ット4上における本体ユニット1および割込み入力ユニ
ット2,3等の各ユニットの装着するスロット位置によ
って固定的に割り当てられる。
The memory map 11a is assigned with addresses used in the RAMs 13, 22, 32 for storing the user programs in the main unit 1 and the interrupt input units 2, 3 and the ROMs 14, 23, 33 for storing the control programs thereof. Is fixedly assigned according to the slot positions of the main unit 1 and the interrupt input units 2 and 3 mounted on the base unit 4.

【0021】具体的には、このメモリマップ11a上の
アドレスは、図に示すように、ROMエリア11a1 と
RAMエリア11a2 のアドレスに分けられ、ROMエ
リア11a1 のアドレスは、本体ユニット1の本体RO
Mエリア11a11と、割込み入力ユニット2の割込みR
OMエリア11a12と、割込み入力ユニット3の割込み
ROMエリア11a13とに固定的に割り当てられる一
方、RAMエリア11a2 は、本体ユニット1の本体R
AMエリア11a21と、割込み入力ユニット2の割込み
RAMエリア11a22と、割込み入力ユニット3の割込
みRAMエリア11a23とに固定的に割り当てられる。
Specifically, the address on the memory map 11a is divided into the addresses of the ROM area 11a1 and the RAM area 11a2 as shown in the figure, and the address of the ROM area 11a1 is the main unit RO of the main unit 1.
M area 11a11 and interrupt R of interrupt input unit 2
The RAM area 11a2 is fixedly allocated to the OM area 11a12 and the interrupt ROM area 11a13 of the interrupt input unit 3, while the RAM area 11a2 is allocated to the main body R of the main body unit 1.
It is fixedly assigned to the AM area 11a21, the interrupt RAM area 11a22 of the interrupt input unit 2, and the interrupt RAM area 11a23 of the interrupt input unit 3.

【0022】次に、以上のようにしてアドレスマップ1
1a上に割り当てられたアドレスに基づいての割込みプ
ログラム管理テーブルの作成処理について説明する。
Next, as described above, the address map 1
The process of creating the interrupt program management table based on the address assigned to 1a will be described.

【0023】図3に、割込みプログラム管理テーブルの
作成処理の手順を示す。
FIG. 3 shows a procedure of processing for creating the interrupt program management table.

【0024】この処理は、MPU11がベースユニット
4上の他のスロットに割込み入力ユニットが装着されて
いるか否かを認識するため、本装置起動時のイニシャラ
イズ時等に上記アドレスマップ11aに基づき行うもの
で、まずは、ベースユニット4上の各スロットに本体ユ
ニット1以外のユニットが装着されているか否かを判断
し(ステップ100)、割込み入力ユニットが装着され
ている場合には(ステップ100“Yes”)、システ
ムバスインタフェース15より当該割込み入力ユニット
のユニット番号を読出して(ステップ110)、ワーク
RAM12等における割込みプログラム管理テーブルに
おけるその割込み入力ユニットの割込み制御プログラム
先頭アドレスエリアおよび割込みユーザプログラム格納
開始アドレスエリアを、当該ユニットが装着されたスロ
ット位置に従って初期化する(ステップ120)。
This processing is performed based on the address map 11a at the time of initialization at the time of starting this apparatus in order for the MPU 11 to recognize whether or not the interrupt input unit is mounted in another slot on the base unit 4. Then, first, it is determined whether or not a unit other than the main unit 1 is mounted in each slot on the base unit 4 (step 100), and if an interrupt input unit is mounted (step 100 “Yes”). ), The unit number of the interrupt input unit is read from the system bus interface 15 (step 110), and the interrupt control program start address area and the interrupt user program storage start address area of the interrupt input unit in the interrupt program management table in the work RAM 12 or the like are read. And it is initialized according slot position in which the unit is mounted (step 120).

【0025】その初期化が終了すると、続いてその初期
化したその格納エリアに、その割込み入力ユニットのユ
ニット番号を格納すると共に、アドレスマップ11aを
参照してその割込み入力ユニットの割込み制御プログラ
ム先頭アドレス、および割込みユーザプログラム格納開
始アドレスを読出し、そのユニット番号と対応させて格
納する(ステップ130)。
When the initialization is completed, subsequently, the unit number of the interrupt input unit is stored in the initialized storage area, and the interrupt control program start address of the interrupt input unit is referred by referring to the address map 11a. , And the interrupt user program storage start address are read out and stored in association with the unit number (step 130).

【0026】そして、ステップ100の処理に戻り、他
のスロットにまだ他の割込み入力ユニットが装着されて
いるか否かを判断して、他のスロットにまだ他の割込み
入力ユニットが装着されている場合には(ステップ10
0“Yes”)、上記ステップ110〜130までの処
理を同様に繰り返す一方、他のスロットに他の割込み入
力ユニットが装着されていない場合には(ステップ10
0“No”)、以上説明したユニット識別処理における
割込みユーザプログラム管理テーブルを作成処理を終了
する。
Then, returning to the processing of step 100, it is judged whether or not another interrupt input unit is still mounted in another slot, and when another interrupt input unit is still mounted in another slot. (Step 10
0 "Yes"), the above steps 110 to 130 are repeated in the same manner, but when another interrupt input unit is not mounted in another slot (step 10).
0 “No”), the process of creating the interrupt user program management table in the unit identification process described above ends.

【0027】図4に、上記図3に示す処理によって作成
された割込みプログラム管理テーブルの構成を示す。
FIG. 4 shows the structure of the interrupt program management table created by the processing shown in FIG.

【0028】割込みプログラム管理テーブル12aは、
上述したようにMPU11が図3に示す処理によって作
成して、ワークRAM12等に格納するもので、具体的
には、図に示すように、各割込み入力ユニットのユニッ
ト番号0〜n毎に、そのユニット番号のユニットの割込
み制御プログラム先頭アドレスと、割込みユーザプログ
ラム格納開始アドレスとを格納して構成されている。
The interrupt program management table 12a is
As described above, the MPU 11 creates it by the processing shown in FIG. 3 and stores it in the work RAM 12 or the like. Specifically, as shown in the figure, the unit number 0 to n of each interrupt input unit The interrupt control program start address of the unit of the unit number and the interrupt user program storage start address are stored.

【0029】例えば、割込み入力ユニット2のユニット
番号が0で有れば、そのユニット番号0と共に、その割
込み入力ユニット2の割込み制御プログラムに割り当て
られた割込み制御プログラム先頭アドレスと、その割込
みユーザプログラムに割り当てられた割込みユーザプロ
グラム格納開始アドレスとが格納され、割込み入力ユニ
ット3のユニット番号が1で有れば、そのユニット番号
1と共に、その割込み入力ユニット3の割込み制御プロ
グラムに割り当てられた割込み制御プログラム先頭アド
レスと、その割込みユーザプログラムに割り当てられた
割込みユーザプログラム格納開始アドレスとが格納され
る。
For example, if the unit number of the interrupt input unit 2 is 0, the unit number 0, the start address of the interrupt control program assigned to the interrupt control program of the interrupt input unit 2, and the interrupt user program If the assigned interrupt user program storage start address is stored and the unit number of the interrupt input unit 3 is 1, the interrupt control program assigned to the interrupt control program of the interrupt input unit 3 together with the unit number 1 The start address and the interrupt user program storage start address assigned to the interrupt user program are stored.

【0030】各入力割込みユニット2,3のベースユニ
ット4への装着後、このような割込みプログラム管理テ
ーブル12aの作成が完成すると、各入力割込みユニッ
ト2,3では、その割込みプログラム管理テーブル12
aを参照して、各々のユニット番号に対応した割込みユ
ーザプログラム格納開始アドレスを検索し、プログラミ
ングツール等によってその検索した割込みユーザプログ
ラム格納開始アドレスに基づき割込みユーザプログラム
を格納する。
When the creation of such an interrupt program management table 12a is completed after mounting the input interrupt units 2 and 3 on the base unit 4, the interrupt program management table 12 of each input interrupt unit 2 and 3 is completed.
The interrupt user program storage start address corresponding to each unit number is searched with reference to a, and the interrupt user program is stored based on the searched interrupt user program storage start address by a programming tool or the like.

【0031】次に、以上のように構成された本発明に係
るプログラマブルコントローラにおける割込み動作を、
図面を参照して説明する。
Next, the interrupt operation in the programmable controller according to the present invention configured as above will be described.
This will be described with reference to the drawings.

【0032】図5に、割込み入力ユニットから割込みが
入力した場合におけるこのプログラマブルコントローラ
の割込み動作を示す。
FIG. 5 shows an interrupt operation of this programmable controller when an interrupt is input from the interrupt input unit.

【0033】まず、このプログラマブルコントローラで
は、MPU11が通常プログラム制御プログラムの制御
により通常プログラムRAM13に格納されたユーザプ
ログラムをサイクリックに実行しているものとし、その
際に、割込み入力ユニット2の割込み発生部21から割
込みが入力したものとして説明する。
First, in this programmable controller, it is assumed that the MPU 11 cyclically executes the user program stored in the normal program RAM 13 under the control of the normal program control program, and at that time, the interrupt input unit 2 generates an interrupt. It is assumed that the interrupt is input from the unit 21.

【0034】すると、MPU11は、割込み入力ユニッ
ト2の割込み発生部21からその割込み入力を受けて、
システムバスインタフェース15よりその割込み入力を
発生させた割込みユニット2のユニット番号を検出する
(ステップ200)。
Then, the MPU 11 receives the interrupt input from the interrupt generator 21 of the interrupt input unit 2,
The system bus interface 15 detects the unit number of the interrupt unit 2 that generated the interrupt input (step 200).

【0035】次に、MPU11は、ワークRAM12に
格納された割込みユーザプログラム管理テーブル12a
を検索して、そのユニット番号に対応した割込み制御プ
ログラムの先頭アドレスを取出し(ステップ210)、
続いて通常ユーザプログラムや他の割込みユーザプログ
ラム等の他のユーザプログラムの実行中であるか否かを
判断する(ステップ220)。
Next, the MPU 11 has an interrupt user program management table 12a stored in the work RAM 12.
To retrieve the start address of the interrupt control program corresponding to that unit number (step 210),
Then, it is determined whether or not another user program such as a normal user program or another interrupt user program is being executed (step 220).

【0036】ここで、他のユーザプログラムの実行中で
あると判断した場合のみ(ステップ220“Ye
s”)、現在実行していたユーザプログラムの実行情報
をワークRAM12に退避させて(ステップ230)、
ステップ210で取り出した割込み制御プログラム先頭
アドレスに基づき割込み制御プログラムを読出して割込
み制御処理を実行する(ステップ240)。
Here, only when it is judged that another user program is being executed (step 220 "Yes"
s ″), save the execution information of the user program currently being executed in the work RAM 12 (step 230),
The interrupt control program is read based on the start address of the interrupt control program fetched in step 210 and the interrupt control process is executed (step 240).

【0037】すると、MPU11は、その割込み制御処
理によって、ユーザプログラム管理テーブル12aを検
索して、その割込みを発生させた割込み入力ユニット2
のユニット番号に対応した割込みユーザプログラム開始
アドレスを読出し(ステップ250)、その割込みユー
ザプログラム開始アドレスに基づき、その割込みを発生
させた割込み入力ユニット2の割込みユーザプログラム
RAM22から割込みユーザプログラムを読出して、そ
の割込みユーザプログラムを実行する(ステップ26
0)。
Then, the MPU 11 searches the user program management table 12a by the interrupt control processing, and the interrupt input unit 2 that generated the interrupt.
The interrupt user program start address corresponding to the unit number of the interrupt is read (step 250), and the interrupt user program is read from the interrupt user program RAM 22 of the interrupt input unit 2 which generated the interrupt based on the interrupt user program start address, The interrupt user program is executed (step 26)
0).

【0038】割込みユーザプログラムの実行終了後は
(ステップ270“Yes”)、続いて当該割込み処理
によって実行を中断した他のユーザプログラムがあるか
否かを判断して(ステップ280)、中断した他のユー
ザプログラムがある場合には(ステップ280“Ye
s”)、上記ステップ230の処理でワークRAM12
に退避していた当該他のユーザプログラムの実行情報を
復帰させて(ステップ290)、実行を中断していた当
該他のユーザプログラムの実行を再開する(ステップ3
00)。
After the execution of the interrupt user program is completed (step 270 "Yes"), it is then judged whether or not there is another user program whose execution is interrupted by the interrupt processing (step 280), and the interruption is determined. If there is a user program of (step 280 “Yes
s "), the work RAM 12 is processed by the processing of step 230.
The execution information of the other user program that was saved in step 290 is restored (step 290), and the execution of the other user program that has been suspended is resumed (step 3).
00).

【0039】そして、当該他のユーザプログラム実行終
了後は(ステップ310“Yes”)、再度、実行を中
断した他のユーザプログラムがあるか否かを判断して
(ステップ280)、実行を中断した他のユーザプログ
ラムがまだある場合には(ステップ280“Ye
s”)、上記ステップ290〜310の処理を繰り返す
一方、中断した他のユーザプログラムがなくなった場合
には(ステップ280“No”)、以上の割込み処理を
終了する。
After the execution of the other user program is completed (step 310 "Yes"), it is judged again whether or not there is another user program whose execution is interrupted (step 280), and the execution is interrupted. If another user program still exists (step 280 "Yes"
s "), while repeating the processing of steps 290 to 310, if there is no other interrupted user program (step 280" No "), the above interrupt processing is terminated.

【0040】従って、本実施例によれば、割込み処理を
行う場合でも、本体ユニット1の通常プログラムRAM
13や通常制御プログラムROM14に割込み処理を行
うための割込みユーザプログラムや割込み制御プログラ
ムを格納する必要がなくなるので、本体ユニット1で余
分なメモリ領域を確保する必要がなくなり、割込み処理
を行わないユーザに有益かつ低コストなプログラマブル
コントローラを提供できることになる。
Therefore, according to the present embodiment, the normal program RAM of the main unit 1 is used even when interrupt processing is performed.
13 and the normal control program ROM 14 do not need to store an interrupt user program or an interrupt control program for performing interrupt processing, so that there is no need to secure an extra memory area in the main unit 1 and users who do not perform interrupt processing It is possible to provide a useful and low-cost programmable controller.

【0041】また、本実施例では、割込みユーザプログ
ラムの実行を制御するための割込み制御プログラムも割
込み入力ユニットに格納するようにしたため、割込みユ
ーザプログラムや割込み制御プログラムの内容を変更し
たとしても、本体ユニット1や本体ユニット1の通常制
御プログラムROM14の内容を変更する必要がなくな
り、本装置の拡張性が向上する。
Further, in this embodiment, since the interrupt control program for controlling the execution of the interrupt user program is also stored in the interrupt input unit, even if the contents of the interrupt user program and the interrupt control program are changed, It is not necessary to change the contents of the normal control program ROM 14 of the unit 1 or the main body unit 1, and the expandability of this device is improved.

【0042】なお、上記実施例では、割込み入力を発生
させる割込み入力ユニット2,3には、CPUをもたな
いユニットで説明したが、本発明では、図6に示すよう
に、このような割込み入力ユニット5に、何らからの周
辺処理、例えば本ユニット5に接続された外部機器等に
対し簡単な動作制御や、RAM52等へのデータの書き
込みを行うCPU55を設けるようにしても良い。
In the above embodiment, the interrupt input units 2 and 3 for generating the interrupt input have been described as units having no CPU, but in the present invention, as shown in FIG. The input unit 5 may be provided with a CPU 55 for performing some peripheral processing, for example, simple operation control for an external device connected to the unit 5 or writing data to the RAM 52 or the like.

【0043】このようにした場合、この割込み入力ユニ
ット5では、RAM52等のメモリへ、本ユニット3内
のCPU55からのアクセスと、本体ユニット1のMP
U11からのアクセスとが競合するので、競合が生じな
いように、図示はしないが、メモリへのアクセスを調停
するバスアービトレーション機能(バスアービタ)を持
たせるようにする。
In this case, in the interrupt input unit 5, the CPU 55 in the main unit 3 accesses the memory such as the RAM 52 and the MP of the main body unit 1 is accessed.
Since it conflicts with the access from U11, a bus arbitration function (bus arbiter) for arbitrating access to the memory is provided so as to prevent the conflict from occurring, although not shown.

【0044】[0044]

【発明の効果】以上説明したように、本発明では、割込
み処理を行う場合でも、本体ユニットのプログラムメモ
リに割込み処理を行うための割込みユーザプログラムや
割込み制御プログラムを格納する必要がなくなるので、
本体ユニットで余分なメモリ領域を確保する必要がなく
なり、割込み処理を行わないユーザに有益かつ低コスト
なプログラマブルコントローラを提供できることにな
る。
As described above, according to the present invention, it is not necessary to store an interrupt user program or an interrupt control program for interrupt processing in the program memory of the main unit even when performing interrupt processing.
It is not necessary to secure an extra memory area in the main unit, and it is possible to provide a user who does not perform interrupt processing with a useful and low-cost programmable controller.

【0045】また、割込みユーザプログラムの実行を制
御するための割込み制御プログラムも割込み入力ユニッ
トに格納するようにしたため、割込みユーザプログラム
の内容や、割込み制御プログラムの内容を変更したとし
ても、本体ユニットやそのプログラムメモリの内容を変
更する必要がなくなるので、本装置の拡張性が向上す
る。
Since the interrupt control program for controlling the execution of the interrupt user program is also stored in the interrupt input unit, even if the contents of the interrupt user program or the contents of the interrupt control program are changed, the main unit and Since there is no need to change the contents of the program memory, the expandability of this device is improved.

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

【図1】本発明に係る制御装置の実施例であるプログラ
マブルコントローラの構成を示す説明図。
FIG. 1 is an explanatory diagram showing a configuration of a programmable controller that is an embodiment of a control device according to the present invention.

【図2】本体ユニットのMPUのメモリマップを示す説
明図。
FIG. 2 is an explanatory diagram showing a memory map of an MPU of the main body unit.

【図3】ユーザプログラム管理テーブルのフォーマット
を示す説明図。
FIG. 3 is an explanatory diagram showing a format of a user program management table.

【図4】図3で説明した割込みユーザプログラム管理テ
ーブルの作成処理の手順を示すフローチャート。
FIG. 4 is a flowchart showing a procedure of a process of creating an interrupt user program management table described in FIG.

【図5】プログラマブルコントローラの割込み動作を示
すフローチャート。
FIG. 5 is a flowchart showing an interrupt operation of the programmable controller.

【図6】割込み入力ユニットの他の例を示す説明図。FIG. 6 is an explanatory diagram showing another example of the interrupt input unit.

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

1 本体ユニット 11 MPU 12 ワークRAM 13 通常ユーザプログラムRAM 14 通常制御プログラムROM 2 割込み入力ユニット 21 割込み発生部 22 割込みユーザプログラムRAM 23 割込み制御プログラムROM 3 割込み入力ユニット 31 割込み発生部 32 割込みユーザプログラムRAM 33 割込み制御プログラムROM 1 Main Unit 11 MPU 12 Work RAM 13 Normal User Program RAM 14 Normal Control Program ROM 2 Interrupt Input Unit 21 Interrupt Generation Unit 22 Interrupt User Program RAM 23 Interrupt Control Program ROM 3 Interrupt Input Unit 31 Interrupt Generation Unit 32 Interrupt User Program RAM 33 Interrupt control program ROM

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 割込みを発生させる割込み入力ユニット
と、上記割込み入力ユニットから割込みが入力した場
合、通常ユーザプログラムの実行を中断して割込みユー
ザプログラムを実行する本体ユニットと、を具備する制
御装置であって、 上記割込み入力ユニットは、割込みによって上記本体ユ
ニットに実行させる割込みユーザプログラムを格納する
割込みユーザプログラムメモリを有し、 上記本体ユニットは、上記割込み入力ユニットから割込
みが入力した場合、通常ユーザプログラムの実行を中断
して、上記割込み入力ユニットの割込みユーザプログラ
ムメモリに格納されたユーザプログラムを実行する、 ことを特徴とする制御装置。
1. A control device comprising: an interrupt input unit for generating an interrupt; and a main unit for interrupting execution of a normal user program to execute an interrupt user program when an interrupt is input from the interrupt input unit. Then, the interrupt input unit has an interrupt user program memory for storing an interrupt user program to be executed by the main body unit by an interrupt, and the main body unit is a normal user program when an interrupt is input from the interrupt input unit. And executing the user program stored in the interrupt user program memory of the interrupt input unit.
【請求項2】 割込み入力ユニットは、 さらに割込みユーザプログラムの実行を制御するための
割込み制御プログラムを予め記憶した割込み制御プログ
ラムメモリを有し、 本体ユニットは、 上記割込み入力ユニットから割込みが入力した場合、上
記割込み入力ユニットの割込み制御プログラムメモリに
格納された割込み制御プログラムを実行し、その制御に
より、通常ユーザプログラムの実行を中断して、上記割
込み入力ユニットの割込みユーザプログラムメモリに格
納された割込みユーザプログラムを実行する、 ことを特徴とする請求項1記載の制御装置。
2. The interrupt input unit further has an interrupt control program memory in which an interrupt control program for controlling execution of an interrupt user program is stored in advance, and the main body unit receives an interrupt from the interrupt input unit. , The interrupt control program stored in the interrupt control program memory of the interrupt input unit is executed, the execution of the normal user program is interrupted by the control, and the interrupt user stored in the interrupt user program memory of the interrupt input unit is executed. The control device according to claim 1, wherein the control device executes a program.
【請求項3】 通常ユーザプログラムをサイクリックに
実行するプログラマブルコントローラである、 ことを特徴とする請求項1または請求項2記載の制御装
置。
3. The control device according to claim 1, wherein the control device is a programmable controller that cyclically executes a normal user program.
JP13539395A 1995-06-01 1995-06-01 Controller Withdrawn JPH08328621A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP13539395A JPH08328621A (en) 1995-06-01 1995-06-01 Controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP13539395A JPH08328621A (en) 1995-06-01 1995-06-01 Controller

Publications (1)

Publication Number Publication Date
JPH08328621A true JPH08328621A (en) 1996-12-13

Family

ID=15150671

Family Applications (1)

Application Number Title Priority Date Filing Date
JP13539395A Withdrawn JPH08328621A (en) 1995-06-01 1995-06-01 Controller

Country Status (1)

Country Link
JP (1) JPH08328621A (en)

Similar Documents

Publication Publication Date Title
JPH02267634A (en) Interrupt system
US20020062352A1 (en) Multiprocessor system and control method thereof
JPH02235156A (en) Information processor
JP2821345B2 (en) Asynchronous I / O control method
US20030181994A1 (en) Microprocessor performing efficient external bus access
JPH08328621A (en) Controller
JPH06309265A (en) Dynamic selection method for driver program of information processor
JP4793798B2 (en) Microcomputer
JPH08137513A (en) Memory management system
JPH0969072A (en) Memory mapped i/o control circuit
JPH10283329A (en) Memory exclusive control method
JP2003248620A (en) Dynamic memory managing method and dynamic memory management information processing device
JP2817267B2 (en) Break address detector
JP3184178B2 (en) Program starting device and program starting method
JP2972557B2 (en) Data transfer control device and control method
JP3008890B2 (en) Processing control unit
JPH05233525A (en) Input/otuput processor
JPH08171458A (en) Disk controller
JPH03225551A (en) Input and output device access control system
JP2500446B2 (en) Collective message processing system with intermittent operation function
JP3050121B2 (en) Package setting control system
JP2001282317A (en) Plc device in which io setting is variable
JPH08249022A (en) Multiprocessor arithmetic unit and programmable controller having the arithmetic unit
JPH10134013A (en) Multi-cpu system
JPH08249024A (en) Programmable controller

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20020806