JPH1091220A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH1091220A
JPH1091220A JP24653096A JP24653096A JPH1091220A JP H1091220 A JPH1091220 A JP H1091220A JP 24653096 A JP24653096 A JP 24653096A JP 24653096 A JP24653096 A JP 24653096A JP H1091220 A JPH1091220 A JP H1091220A
Authority
JP
Japan
Prior art keywords
ladder instruction
internal data
program
data memory
ladder
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
JP24653096A
Other languages
Japanese (ja)
Inventor
Shinji Nakagawa
伸二 中川
Yasuhiro Nishimura
康裕 西村
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 JP24653096A priority Critical patent/JPH1091220A/en
Publication of JPH1091220A publication Critical patent/JPH1091220A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide the programmable controller which can lighten the load on a system MPU and re-execute a user program fast even when the execution of an interruption program is interposed. SOLUTION: The system MPU 2 once informed of interruption by an interruption unit 1 saves internal data regarding a currently executed user program by a ladder instruction execution part 4, but the system MPU 2 controls a control register 7 of the ladder instruction execution part 3 in this case and an internal state saving/reloading mechanism 9 of the ladder instruction execution part 4 saves the internal data in a data memory 5. After the interruption, the system MPU 2 controls the control register 7 of the ladder instruction execution part 4 and the internal state saving/reloading mechanism 9 of the ladder instruction execution part 4 saves the internal data in the ladder instruction execution part 4 from the data memory 5.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明はプログラマブル・コ
ントローラに関し、特にシステムMPUによって装置の
全体的な制御が行われているプログラマブル・コントロ
ーラに関する。
[0001] 1. Field of the Invention [0002] The present invention relates to a programmable controller, and more particularly to a programmable controller in which a system MPU controls the entire apparatus.

【0002】[0002]

【従来の技術】プログラマブル・コントローラにおいて
は、ユーザプログラムの実行中、現在実行中のユーザプ
ログラムの実行を一時的に停止して割り込みプログラム
を実行しなければならない場合がある。
2. Description of the Related Art In a programmable controller, during execution of a user program, it may be necessary to temporarily stop the execution of the currently executing user program to execute an interrupt program.

【0003】このような場合、従来においては、システ
ムMPUが現在実行中のプログラムの再実行に必要な内
部データを一つずつシステムメモリのワーク領域に書出
して、プログラムの再実行に備えていた。
In such a case, conventionally, the system MPU writes out the internal data necessary for re-execution of the program currently being executed one by one to a work area of the system memory to prepare for the re-execution of the program.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記の
ごとき従来のプログラマブル・コントローラにあって
は、割り込みプログラムの実行に際し、システムMPU
が現在実行中のプログラムの再実行に必要なデータをシ
ステムメモリのワーク領域に書出す場合、必要なデータ
を一つずつシステムメモリのワーク領域に書出すという
制御を行っていた。
However, in the conventional programmable controller as described above, when executing the interrupt program, the system MPU is used.
When writing data necessary for re-execution of a program currently being executed to a work area of the system memory, control is performed to write necessary data one by one to a work area of the system memory.

【0005】このため、システムMPUの負荷が大き
く、しかもユーザプログラムの再実行が高速に行えない
という不具合があった。
For this reason, there is a problem that the load on the system MPU is large and the user program cannot be re-executed at high speed.

【0006】そこで、本発明は、システムMPUの負荷
を軽減でき、しかも割り込みプログラムの実行が介在し
ても高速にユーザプログラムの再実行を行うことができ
るプログラマブル・コントローラを提供することを目的
とする。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a programmable controller which can reduce the load on the system MPU and can re-execute a user program at high speed even when an interrupt program is executed. .

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、この発明は、通常プログラムと割込プログラムを含
むラダー命令の実行を行うラダー命令実行手段と、ラダ
ー命令の実行を行うためのデータメモリを備えたプログ
ラマブル・コントローラにおいて、通常プログラムの実
行中、割込プログラム実行の要求があると現在実行中の
ラダー命令実行手段の内部データを上記データメモリに
退避する内部データ退避手段と、割込プログラムの実行
が終了すると上記データメモリに退避していた内部デー
タを上記ラダー命令実行手段に復元する内部データ復元
手段と、を有することを特徴とする。
To achieve the above object, the present invention provides a ladder instruction executing means for executing a ladder instruction including a normal program and an interrupt program, and data for executing the ladder instruction. In a programmable controller having a memory, during execution of a normal program, if there is a request to execute an interrupt program, an internal data saving means for saving the internal data of the currently executing ladder instruction execution means to the data memory; Internal data restoring means for restoring the internal data saved in the data memory to the ladder instruction executing means when the execution of the program is completed.

【0008】また、この発明は、通常プログラムと割込
プログラムを含むラダー命令の実行を行うラダー命令実
行手段と、ラダー命令の実行を行うためのデータメモリ
を備えたプログラマブル・コントローラにおいて、通常
プログラムの実行中、割込プログラムの実行要求がある
と、通常プログラムの実行に代えて割込プログラムの実
行を行うよう上記ラダー命令実行手段を制御する制御手
段を有することを特徴とする。
The present invention also provides a ladder instruction executing means for executing a ladder instruction including a normal program and an interrupt program, and a programmable controller having a data memory for executing the ladder instruction. The ladder instruction execution means is controlled to execute the interrupt program instead of the normal program when an interrupt program execution request is issued during execution.

【0009】この発明では、通常プログラムと割込プロ
グラムを含むラダー命令の実行を行うラダー命令実行手
段と、ラダー命令の実行を行うためのデータメモリを備
えたプログラマブル・コントローラにおいて、通常プロ
グラムの実行中、割込プログラム実行の要求があると内
部データ退避手段によって現在実行中のラダー命令実行
手段の内部データを上記データメモリに退避するととも
に、割込プログラムの実行が終了すると内部データ復元
手段によって上記データメモリに退避していた内部デー
タを上記ラダー命令実行手段に復元する。
According to the present invention, in a programmable controller having a ladder instruction executing means for executing a ladder instruction including a normal program and an interrupt program, and a data memory for executing the ladder instruction, When an interrupt program execution request is received, the internal data of the currently executing ladder instruction executing means is saved in the data memory by the internal data saving means. The internal data saved in the memory is restored to the ladder instruction execution means.

【0010】[0010]

【発明の実施の形態】以下、本発明に係るプログラマブ
ル・コントローラの実施の形態を図面に基づいて説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the programmable controller according to the present invention will be described below with reference to the drawings.

【0011】図1は本発明の実施形態の概略構成を示す
ブロック図である。図1において、プログラマブル・コ
ントローラ10は、システムバス8に接続されたシステ
ムMPU2とラダー命令実行部4、システムMPU2に
接続された割込ユニット1、ラダー命令実行部4に接続
された命令メモリ3とデータメモリ5より構成されてい
る。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of the present invention. In FIG. 1, a programmable controller 10 includes a system MPU 2 and a ladder instruction execution unit 4 connected to a system bus 8, an interrupt unit 1 connected to the system MPU 2, and an instruction memory 3 connected to the ladder instruction execution unit 4. It comprises a data memory 5.

【0012】ここで、システムMPU2はプログラマブ
ル・コントローラ10全体を制御するもので、この実施
形態では特に割込ユニット1から割込が通知されるとラ
ダー命令実行部4を制御して実行中のユーザプログラム
を停止し、割込プログラムを実行する。
The system MPU 2 controls the entire programmable controller 10. In this embodiment, when an interrupt is notified from the interrupt unit 1, the system MPU 2 controls the ladder instruction execution unit 4 to execute the user. Stop the program and execute the interrupt program.

【0013】割込ユニット1は、ユーザプログラム実行
中割込が発生すると、それをシステムMPU2に通知す
るもので、これによって割込プログラムを実行する。な
お、割込ユニット1はシステムMPU2やラダー命令実
行部4とは非同期で動作し、割込の通知を行う。
When an interrupt occurs during execution of a user program, the interrupt unit 1 notifies the system MPU 2 of the occurrence, and executes the interrupt program. Note that the interrupt unit 1 operates asynchronously with the system MPU 2 and the ladder instruction execution unit 4 and notifies an interrupt.

【0014】命令メモリ3はユーザプログラムが格納さ
れたメモリで、通常プログラム31と割込プログラム3
2が格納され、割込発生時には割込プログラム32が実
行される。
An instruction memory 3 is a memory in which a user program is stored, and includes a normal program 31 and an interrupt program 3.
2 is stored, and when an interrupt occurs, the interrupt program 32 is executed.

【0015】ラダー命令実行部4は命令メモリ3に格納
されたユーザプログラムを実行するもので、通常はシス
テムMPU2とは独立して動作し、実行結果をデータメ
モリ5に書き出している。
The ladder instruction execution unit 4 executes a user program stored in the instruction memory 3 and normally operates independently of the system MPU 2, and writes an execution result to the data memory 5.

【0016】データメモリ5はI/O(入出力)接点情
報やラダー命令実行部4で行われるユーザプログラム実
行のためのワーク情報エリアとなるもので、本実施形態
では特に割込発生時実行中のラダー命令実行部4の内部
データがこのメモリに退避される。
The data memory 5 serves as a work information area for I / O (input / output) contact information and execution of a user program executed by the ladder instruction execution unit 4. In this embodiment, the data memory 5 is particularly executed when an interrupt occurs. The internal data of the ladder instruction execution unit 4 is saved in this memory.

【0017】ところで、ラダー命令実行部4は割込プロ
グラム32の実行時のラダー命令実行部4の内部データ
をデータメモリ5に退避させるために、ステータスレジ
スタ6、制御レジスタ7、内部状態退避復元機構9を具
備している。
The ladder instruction execution unit 4 saves the internal data of the ladder instruction execution unit 4 to the data memory 5 when the interrupt program 32 is executed. 9 is provided.

【0018】ここで、ステータスレジスタ6はラダー命
令実行部4の状態をシステムMPU2に報知するもの
で、図2(a)に示すごとく16ビット幅に構成され、
動作中ビット、復元中ビット、退避中ビットを有してい
る。
Here, the status register 6 notifies the state of the ladder instruction execution unit 4 to the system MPU 2 and has a 16-bit width as shown in FIG.
It has an operating bit, a restoring bit, and a saving bit.

【0019】ここで、動作中ビットが1であるというこ
とは、ラダー命令実行部4は命令メモリ3に格納された
ユーザプログラムを実行中であることを示している。な
お、この場合のユーザプログラムには、通常プログラム
31と割込プログラム32を含む。
The fact that the operating bit is 1 indicates that the ladder instruction execution unit 4 is executing the user program stored in the instruction memory 3. The user program in this case includes a normal program 31 and an interrupt program 32.

【0020】また、退避中ビットが1であるということ
は、割込プログラム32を実行するためにそのときのラ
ダー命令実行部4の内部データをデータメモリ5に退避
中であることを示している。
The fact that the saving bit is 1 indicates that the internal data of the ladder instruction execution unit 4 at that time is being saved in the data memory 5 in order to execute the interrupt program 32. .

【0021】また、復元中ビットが1であるということ
は、割込プログラム32の実行が終了したので、再度通
常プログラムを実行するために、データメモリ5に退避
させていたラダー命令実行部4の内部データをラダー命
令実行部4に復元中であることを示している。
The fact that the restoring bit is 1 means that the execution of the interrupt program 32 has been completed, so that the ladder instruction execution unit 4 saved in the data memory 5 to execute the normal program again. This indicates that the internal data is being restored to the ladder instruction execution unit 4.

【0022】また、動作中ビット、退避中ビット、復元
中ビットがそれぞれ0であるということは、現在動作中
でも、退避中でも、復元中でもないことを表している。
The fact that each of the operating bit, the saving bit, and the restoring bit is 0 indicates that the device is not currently operating, is being saved, or is not being restored.

【0023】また、制御レジスタ7はシステムMPU2
からの指令によってラダー命令実行部4を制御するもの
で、図2(b)に示すごとく16ビット幅に構成され、
起動ビット、停止ビット、復元ビット、退避ビットを有
している。
The control register 7 is provided in the system MPU 2
The ladder instruction execution unit 4 is controlled by a command from the ladder instruction execution unit 4 and has a 16-bit width as shown in FIG.
It has a start bit, a stop bit, a restoration bit, and a save bit.

【0024】ここで、起動ビットに1が書き込まれる
と、システムMPU2からラダー命令実行部4に対する
起動指令があったことを示している。この起動指令はユ
ーザプログラムの実行がいったん停止された後、再度起
動される場合に発せられる。
Here, when 1 is written to the start bit, it indicates that there is a start command from the system MPU 2 to the ladder instruction execution unit 4. This start command is issued when the execution of the user program is once stopped and then restarted.

【0025】また、停止ビットに1が書き込まれると、
システムMPU2からラダー命令実行部4に対する停止
指令があったことを示している。停止指令はラダー命令
実行部4の内部データをデータメモリ5に退避させる場
合と、退避させたデータをラダー命令実行部4に復元さ
せる場合に発せられる。
When 1 is written to the stop bit,
This indicates that a stop command has been issued from the system MPU 2 to the ladder instruction execution unit 4. The stop command is issued when the internal data of the ladder instruction execution unit 4 is saved in the data memory 5 and when the saved data is restored in the ladder instruction execution unit 4.

【0026】退避ビットに1が書き込まれると、システ
ムMPU2からラダー命令実行部4に対する退避指令が
あったことを示している。退避指令はラダー命令実行部
4の内部データをデータメモリ5に退避させる場合に発
せられる。
When 1 is written to the save bit, it indicates that a save instruction has been issued from the system MPU 2 to the ladder instruction execution unit 4. The save command is issued when the internal data of the ladder instruction execution unit 4 is saved in the data memory 5.

【0027】復元ビットに1が書き込まれると、システ
ムMPU2からラダー命令実行部4に対する復元指令が
あったことを示している。復元指令はデータメモリ5に
退避させたデータをラダー命令実行部4に復元させる場
合に発せられる。
When 1 is written to the restoration bit, it indicates that there is a restoration instruction from the system MPU 2 to the ladder instruction execution unit 4. The restoration instruction is issued when the ladder instruction execution unit 4 restores the data saved in the data memory 5.

【0028】なお、起動ビット、停止ビット、復元ビッ
ト、退避ビットに0が書き込まれるということは、それ
ぞれの指令が発せられていないことを示している。
Note that the fact that 0 is written in the start bit, stop bit, restoration bit, and save bit indicates that the respective commands have not been issued.

【0029】また、内部状態退避復元機構9は、割込発
生時の内部データを制御レジスタ7からの制御によりデ
ータメモリ5に退避させたり、割込処理が終わるとデー
タメモリ5に退避させていた内部データをラダー命令実
行部4に復元させるという処理を行う。従って、システ
ムMPU2は制御レジスタ7を制御するだけで割込発生
時の内部データの退避処理と復元処理を行うことがで
き、システムMPU2の負荷の軽減および割込発生から
ユーザプログラムの再開までの時間を軽減できるという
効果を有する。
The internal state saving / restoring mechanism 9 saves the internal data at the time of occurrence of the interrupt in the data memory 5 under the control of the control register 7 or saves the internal data in the data memory 5 when the interrupt processing is completed. A process of restoring the internal data to the ladder instruction execution unit 4 is performed. Therefore, the system MPU 2 can perform the save processing and the restoration processing of the internal data at the time of the occurrence of the interrupt only by controlling the control register 7, thereby reducing the load on the system MPU 2 and the time from the occurrence of the interrupt to the restart of the user program. Has the effect of reducing

【0030】以上が構成であるが、次に、割込ユニット
1からシステムMPU2に割込通知があった場合、シス
テムMPU2で実行される動作を図3および図4を参照
しながら説明する。
The operation described above will now be described with reference to FIGS. 3 and 4 when the interrupt notification is sent from the interrupt unit 1 to the system MPU 2.

【0031】システムMPU2が通常処理をしているア
イドル状態において(ステップ100)、割込ユニット
1からシステムMPU2に割込通知があると(ステップ
101)、システムMPU2は割込要因の判断をして割
込プログラム32を実行する必要があるか否か判断する
(ステップ102)。
In the idle state in which the system MPU 2 is performing normal processing (step 100), when there is an interrupt notification from the interrupt unit 1 to the system MPU 2 (step 101), the system MPU 2 determines the cause of the interrupt. It is determined whether it is necessary to execute the interrupt program 32 (step 102).

【0032】ここで、割込プログラム32を実行する必
要がないと判断した場合(ステップ102でNO)、ス
テップ101の処理に戻るが、割込プログラム32を実
行する必要があると判断した場合(ステップ102でY
ES)、まずラダー命令実行部4の停止処理を行う。こ
れは、システムMPU2からの指令によって制御レジス
タ7の停止ビットに1を書き込むことによって実行され
る。
If it is determined that the interrupt program 32 need not be executed (NO in step 102), the process returns to step 101, but it is determined that the interrupt program 32 needs to be executed ( Y in step 102
ES) First, the ladder instruction execution unit 4 is stopped. This is executed by writing 1 to the stop bit of the control register 7 according to a command from the system MPU 2.

【0033】制御レジスタ7の停止ビットに1を書き込
むと、次にステータスレジスタ6の停止中ビットをリー
ドすることによってラダー命令実行部4が停止したか否
かが調べられる(ステップ106)。
After writing 1 to the stop bit of the control register 7, it is checked whether the ladder instruction execution unit 4 has stopped by reading the stop bit of the status register 6 (step 106).

【0034】ここで、停止中ビットが0でラダー命令実
行部4が停止していない場合は(ステップ106でN
O)ステップ106の処理を繰り返すが、停止中ビット
が1でラダー命令実行部4が停止している場合は(ステ
ップ106でYES)、ラダー命令実行部4の内部デー
タの退避処理を行う(ステップ108)。これは、シス
テムMPU2からの指令によって制御レジスタ7の退避
ビットに1を書き込むことによって実行される。
If the stop bit is 0 and the ladder instruction execution unit 4 is not stopped (N in step 106)
O) The process of step 106 is repeated. If the stopped bit is 1 and the ladder instruction execution unit 4 is stopped (YES in step 106), the internal data of the ladder instruction execution unit 4 is saved (step S106). 108). This is executed by writing 1 to the save bit of the control register 7 according to a command from the system MPU 2.

【0035】こうして、ラダー命令実行部4の内部デー
タの退避処理が開始されると、次に内部データのデータ
メモリ5への退避が完了したか否かが調べられる(ステ
ップ110)。これは、ステータスレジスタ6の退避中
ビットをリードすることによって調べられる。
When the process of saving the internal data of the ladder instruction execution unit 4 is started, it is checked whether the saving of the internal data to the data memory 5 is completed (step 110). This is checked by reading the save bit of the status register 6.

【0036】ここで、退避中ビットが1で退避が完了し
ていない場合は(ステップ110でNO)ステップ11
0の処理を繰り返すが、退避中ビットが0で退避が完了
している場合は(ステップ110でYES)、次に割込
プログラム32の番地を設定.する(ステップ11
2)。
If the saving bit is 1 and the saving is not completed (NO in step 110), step 11 is executed.
0 is repeated, but if the saving bit is 0 and the saving is completed (YES in step 110), then the address of the interrupt program 32 is set. (Step 11
2).

【0037】割込プログラム32の番地が設定される
と、割込プログラム32を実行させるが、これは、シス
テムMPU2からの指令によって制御レジスタ7の起動
ビットに1を書き込むことによって実行される(ステッ
プ114)。
When the address of the interrupt program 32 is set, the interrupt program 32 is executed. This is executed by writing 1 to the start bit of the control register 7 in accordance with a command from the system MPU 2 (step). 114).

【0038】続いて、割込プログラムが終了したか否か
が調べられるが(ステップ116)、これは、ステータ
スレジスタ6の動作中ビットをリードすることによって
調べられる。
Subsequently, it is checked whether or not the interrupt program has been completed (step 116). This is checked by reading the operating bit of the status register 6.

【0039】ここで、動作中ビットが1で割込プログラ
ムが完了していない場合は(ステップ116でNO)ス
テップ116の処理を繰り返すが、動作中ビットが0で
割込プログラムが完了している場合は(ステップ116
でYES)、次にラダー命令実行部4の内部データの復
元を行う(ステップ118)。これは、システムMPU
2からの指令によって制御レジスタ7の復元ビットに1
を書き込むことによって実行される。
If the operating bit is 1 and the interrupt program is not completed (NO in step 116), the process of step 116 is repeated. However, if the operating bit is 0 and the interrupt program is completed. If (step 116
Then, the internal data of the ladder instruction execution unit 4 is restored (step 118). This is the system MPU
In response to a command from 2, the restoration bit of the control register 7 becomes 1
Is executed by writing.

【0040】こうして、ラダー命令実行部4の内部デー
タの復元処理が開始されると、次に内部データの復元が
完了したか否かが調べられる(ステップ120)。これ
は、ステータスレジスタ6の復元中ビットをリードする
ことによって調べられる。
When the process of restoring the internal data of the ladder instruction execution unit 4 is started, it is checked whether or not the restoration of the internal data has been completed (step 120). This is checked by reading the restoring bit of the status register 6.

【0041】ここで、復元中ビットが1で復元が完了し
ていない場合は(ステップ120でNO)ステップ12
0の処理を繰り返すが、復元中ビットが0で復元が完了
している場合は(ステップ120でYES)、次にラダ
ー命令実行部4の再起動を行う(ステップ122)。こ
れは、システムMPU2からの指令によって制御レジス
タ7の起動ビットに1を書き込むことによって実行され
る。
If the bit being restored is 1 and the restoration is not completed (NO in step 120), step 12 is executed.
The process of 0 is repeated. If the bit being restored is 0 and the restoration is completed (YES in step 120), the ladder instruction execution unit 4 is restarted next (step 122). This is executed by writing 1 to the start bit of the control register 7 according to a command from the system MPU 2.

【0042】そして、システムMPU2は再びアイドル
状態となり(ステップ124)、割込ユニット1からの
割込通知待ちとなる。
Then, the system MPU 2 enters the idle state again (step 124), and waits for an interrupt notification from the interrupt unit 1.

【0043】以上のように、システムMPU2は割込ユ
ニット1から割込通知があると、ラダー命令実行部4に
割込プログラムを実行させるが、この場合、ラダー命令
実行部4の制御レジスタ7を制御するだけで割込発生時
の内部データの退避処理と復元処理を行うことができ、
システムMPU2の負荷の軽減および割込発生からユー
ザプログラムの再開までの時間を軽減できるという効果
を有する。
As described above, the system MPU 2 causes the ladder instruction execution unit 4 to execute the interruption program when the interruption notification is received from the interruption unit 1. In this case, the control register 7 of the ladder instruction execution unit 4 Just by controlling, it is possible to save and restore internal data when an interrupt occurs.
This has the effect of reducing the load on the system MPU 2 and the time from the occurrence of an interrupt to the resumption of the user program.

【0044】[0044]

【発明の効果】以上説明したように、本発明では、通常
プログラムと割込プログラムを含むラダー命令の実行を
行うラダー命令実行手段と、ラダー命令の実行を行うた
めのデータメモリを備えたプログラマブル・コントロー
ラにおいて、通常プログラムの実行中、割込プログラム
実行の要求があると内部データ退避手段によって現在実
行中のラダー命令実行手段の内部データを上記データメ
モリに退避するとともに、割込プログラムの実行が終了
すると内部データ復元手段によって上記データメモリに
退避していた内部データを上記ラダー命令実行手段に復
元するようにしたので、システムMPU等の負荷を軽減
でき、しかも割り込みプログラムの実行が介在しても高
速にユーザプログラムの再実行を行うことができるプロ
グラマブル・コントローラを得ることができる等の効果
を有する。
As described above, according to the present invention, a ladder instruction execution means for executing a ladder instruction including a normal program and an interrupt program, and a programmable memory having a data memory for executing the ladder instruction are provided. In the controller, if there is a request to execute the interrupt program during the execution of the normal program, the internal data saving means saves the internal data of the currently executing ladder instruction executing means to the data memory and terminates the execution of the interrupt program. Then, since the internal data saved in the data memory is restored to the ladder instruction executing means by the internal data restoring means, the load on the system MPU and the like can be reduced, and high-speed operation can be performed even when an interrupt program is executed. A programmable controller that can re-execute the user program An effect such as can be obtained rollers.

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

【図1】本発明に係るプログラマブル・コントローラの
実施形態の全体的な構成を示すブロック図。
FIG. 1 is a block diagram showing an overall configuration of an embodiment of a programmable controller according to the present invention.

【図2】図1に示したプログラマブル・コントローラで
使用されるステータスレジスタと制御レジスタの説明
図。
FIG. 2 is an explanatory diagram of a status register and a control register used in the programmable controller shown in FIG.

【図3】割込ユニットから割込通知があった場合、シス
テムMPUで行われる割込の処理手順を示すフローチャ
ート。
FIG. 3 is a flowchart showing an interrupt processing procedure performed by a system MPU when an interrupt notification is received from an interrupt unit.

【図4】同じく、割込ユニットから割込通知があった場
合、システムMPUで行われる割込の処理手順を示すフ
ローチャート。
FIG. 4 is a flowchart showing a processing procedure of an interrupt performed by a system MPU when an interrupt notification is received from an interrupt unit.

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

1 割込ユニット 2 システムMPU 3 命令メモリ 4 ラダー命令実行部 5 データメモリ 6 ステータスレジスタ 7 制御レジスタ 8 システムバス 9 内部状態退避復元機構 10 プログラマブル・コントローラ 31 通常プログラム 32 割込プログラム DESCRIPTION OF SYMBOLS 1 Interrupt unit 2 System MPU 3 Instruction memory 4 Ladder instruction execution part 5 Data memory 6 Status register 7 Control register 8 System bus 9 Internal state saving / restoring mechanism 10 Programmable controller 31 Normal program 32 Interrupt program

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 通常プログラムと割込プログラムを含む
ラダー命令の実行を行うラダー命令実行手段と、ラダー
命令の実行を行うためのデータメモリを備えたプログラ
マブル・コントローラにおいて、 通常プログラムの実行中、割込プログラム実行の要求が
あると現在実行中のラダー命令実行手段の内部データを
上記データメモリに退避する内部データ退避手段と、 割込プログラムの実行が終了すると上記データメモリに
退避していた内部データを上記ラダー命令実行手段に復
元する内部データ復元手段と、 を有することを特徴とするプログラマブル・コントロー
ラ。
1. A programmable controller having a ladder instruction execution means for executing a ladder instruction including a normal program and an interrupt program, and a data memory for executing the ladder instruction. Internal data saving means for saving the internal data of the currently executing ladder instruction execution means to the data memory when there is a request to execute the interrupt program; and internal data saving to the data memory when the execution of the interrupt program is completed. And an internal data restoration unit for restoring the ladder instruction execution unit in the ladder instruction execution unit.
【請求項2】 通常プログラムと割込プログラムを含む
ラダー命令の実行を行うラダー命令実行手段と、ラダー
命令の実行を行うためのデータメモリを備えたプログラ
マブル・コントローラにおいて、 通常プログラムの実行中、割込プログラムの実行要求が
あると、通常プログラムの実行に代えて割込プログラム
の実行を行うよう上記ラダー命令実行手段を制御する制
御手段を有することを特徴とするプログラマブル・コン
トローラ。
2. A programmable controller comprising: a ladder instruction executing means for executing a ladder instruction including a normal program and an interrupt program; and a programmable controller having a data memory for executing the ladder instruction. A programmable controller having a control means for controlling the ladder instruction execution means so as to execute an interrupt program in place of execution of a normal program when an execution request of the interrupt program is issued.
【請求項3】 上記制御手段は、上記ラダー命令実行手
段に対して、 現在実行中の通常プログラムの実行を停止するよう指示
する停止指示手段と、 上記ラダー命令実行手段の現在の内部データを上記デー
タメモリに退避するよう指示する退避指示手段と、 通常プログラムと割込プログラムを含むラダー命令の実
行を指示する起動指示手段と、 上記データメモリに退避させていた内部データをラダー
命令実行手段に復元するよう指示する復元指示手段と、 を有することを特徴とする請求項2に記載のプログラマ
ブル・コントローラ。
3. The control means includes: a stop instruction means for instructing the ladder instruction execution means to stop the execution of the currently executed normal program; and a current internal data of the ladder instruction execution means. Evacuation instructing means for instructing evacuation to the data memory, activation instructing means for instructing execution of a ladder instruction including a normal program and an interrupt program, and restoration of the internal data saved in the data memory to the ladder instruction executing means 3. The programmable controller according to claim 2, further comprising: a restoration instructing unit that instructs to perform the operation.
【請求項4】 上記ラダー命令実行手段は、 現在ラダー命令を実行中か否か判別する動作中判別手段
と、 現在内部データを上記データメモリに退避中か否か判別
する退避中判別手段と、 現在上記データメモリに退避させていた内部データをラ
ダー命令実行手段に復元中か否か判別する復元中判別手
段と、 を有し、 上記制御手段は、 上記動作中判別手段でラダー命令の実行中止が判別され
た場合のみ上記退避指示手段に対して現在の内部データ
を上記データメモリに退避するよう指示し、 上記退避中判別手段で内部データを上記データメモリに
退避したことが判別された場合のみ上記起動指示手段に
対して割込プログラムの起動を指示し、 上記動作中判別手段でラダー命令の実行中止が判別され
た場合のみ上記復元指示手段に対して上記データメモリ
に退避させていた内部データをラダー命令実行手段に復
元するよう指示し、 上記復元中判別手段で上記データメモリに退避させてい
た内部データをラダー命令実行手段に復元したことが判
別された場合のみ上記起動指示手段に対して通常プログ
ラムの起動を指示する、 ことを特徴とする請求項3に記載のプログラマブル・コ
ントローラ。
4. The ladder instruction executing means includes: an operating determining means for determining whether a ladder instruction is currently being executed; a saving determining means for determining whether or not internal data is currently being saved to the data memory; Restoring determination means for determining whether or not the internal data currently saved in the data memory is being restored to the ladder instruction execution means. The control means stops execution of the ladder instruction by the operation determination means. Is instructed to save the current internal data to the data memory only when it is determined that the internal data has been saved to the data memory only by the evacuation determination means. Instructs the activation instructing means to activate the interrupt program, and transmits the data to the restoration instructing means only when the in-operation discriminating means determines that the execution of the ladder instruction is stopped. When the internal data saved in the data memory is instructed to be restored to the ladder instruction executing means, and it is determined that the internal data saved in the data memory is restored to the ladder instruction executing means by the in-restoration determining means. 4. The programmable controller according to claim 3, wherein only the activation instruction means is instructed to activate a normal program.
JP24653096A 1996-09-18 1996-09-18 Programmable controller Withdrawn JPH1091220A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24653096A JPH1091220A (en) 1996-09-18 1996-09-18 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24653096A JPH1091220A (en) 1996-09-18 1996-09-18 Programmable controller

Publications (1)

Publication Number Publication Date
JPH1091220A true JPH1091220A (en) 1998-04-10

Family

ID=17149785

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24653096A Withdrawn JPH1091220A (en) 1996-09-18 1996-09-18 Programmable controller

Country Status (1)

Country Link
JP (1) JPH1091220A (en)

Similar Documents

Publication Publication Date Title
JPH0776894B2 (en) Clock signal control method for processor and information processing system
JPH11202988A (en) System power consumption control method
JPH1091220A (en) Programmable controller
JP3332098B2 (en) Redundant processor unit
JPH0883133A (en) Computer system and clock control method for the same
JP3102381B2 (en) Task debugging device, task debugging method, and recording medium therefor
JPH07295761A (en) Mirroring magnetic disk device
JPH04242833A (en) Operation state preserving system
JPH06266478A (en) Computer system
JPH07287660A (en) Interruption processing method for programmable controller
JP3483901B2 (en) Method of changing system configuration and computer system for implementing the method
JPH08202633A (en) Data processor
JPH0319033A (en) System interruption/restart system
JPH01193948A (en) System for controlling data transfer
JP2545763B2 (en) Restart method of batch processing in hot standby system
JPH0566883A (en) Coordinate inputting device
JPH02121452A (en) Electronic exchange system
JPH07129420A (en) Controller and control recovering method using processor
JPS63200242A (en) System switching system for hot stand-by system
JPS61255440A (en) Program interruption control system
JPH0253137A (en) Change system for on-line program
JPH0425941A (en) Ipl resuming system
JP2002010308A (en) Automatic restart processing system and method in switching system
JPH0566860A (en) Power source controller
JPS61226820A (en) Data processing resuming system by power restoration

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: 20031202