JPH0553618A - Programmable controller - Google Patents

Programmable controller

Info

Publication number
JPH0553618A
JPH0553618A JP21526791A JP21526791A JPH0553618A JP H0553618 A JPH0553618 A JP H0553618A JP 21526791 A JP21526791 A JP 21526791A JP 21526791 A JP21526791 A JP 21526791A JP H0553618 A JPH0553618 A JP H0553618A
Authority
JP
Japan
Prior art keywords
circuit
reset signal
control circuit
auxiliary storage
storage device
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.)
Granted
Application number
JP21526791A
Other languages
Japanese (ja)
Other versions
JP2778299B2 (en
Inventor
Masami Sakakibara
正己 榊原
Shinji Itami
伸司 伊丹
Kenji Shindo
研二 新藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP21526791A priority Critical patent/JP2778299B2/en
Publication of JPH0553618A publication Critical patent/JPH0553618A/en
Application granted granted Critical
Publication of JP2778299B2 publication Critical patent/JP2778299B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

PURPOSE:To prevent the destruction of data even when an auxiliary storage device being the peripheral device of a programmable controller is reset in a data fetching state or even when a power supply has the momentary disconnection of power source. CONSTITUTION:A delay circuit 21 is connected to the output side of a reset signal generating circuit 7. The circuit 21 converts a reset signal 101 outputted from the circuit 7 into a delay reset signal 110 that is delayed by a prescribed time. Then the signal 110 is inputted to the control circuit 4 of an auxiliary storage device 5. Thus the reset operation of the circuit 4 is delayed by the delay time of the signal 110. Then the data are continuously written into the storage 5 in the delay time of the reset operation.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、周辺装置としてフロ
ッピーディスクあるいはハードディスク等の補助記憶装
置を具備したプログラマブルコントローラ(以下PCと
称する)に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable controller (hereinafter referred to as a PC) equipped with an auxiliary storage device such as a floppy disk or a hard disk as a peripheral device.

【0002】[0002]

【従来の技術】図9は、従来のPCの具体的構成を示す
ブロック図であり、図において、1はマイクロプロセッ
サ(以下CPUと称する)、2はPCのプログラムを格
納するメモリであるROM、3は演算作業用メモリであ
るRAM、4はフロッピーディスクあるいはハードディ
スクからなる補助記憶装置5に対する書き込み、読み取
りの各動作を制御する制御回路、6はこれらCPU1及
び制御回路4とPCとを接続するためのインターフェー
ス(以下I/Fと称する)である。7は外部接続された
リセット信号発生回路であり、成形器8、抵抗器9、押
しボタンスイッチ10から構成されている。なお、10
1はリセット信号発生回路7の出力であるリセット信号
を示す。
2. Description of the Related Art FIG. 9 is a block diagram showing a concrete configuration of a conventional PC. In the figure, 1 is a microprocessor (hereinafter referred to as CPU), 2 is a ROM which is a memory for storing a program of the PC, Reference numeral 3 is a RAM which is a memory for arithmetic work, 4 is a control circuit which controls each operation of writing and reading to and from the auxiliary storage device 5 which is a floppy disk or a hard disk, and 6 is for connecting the CPU 1 and the control circuit 4 to a PC Interface (hereinafter referred to as I / F). Reference numeral 7 is an externally connected reset signal generating circuit, which includes a molding machine 8, a resistor 9, and a push button switch 10. 10
Reference numeral 1 denotes a reset signal output from the reset signal generation circuit 7.

【0003】次に動作について説明する。CPU1はR
OM2に格納されたプログラムに従って、I/F6に接
続されたPC(図示せず)のデータを補助記憶装置5に
読み出したり、PCに補助記憶装置5のデータを書き込
んだりしている。すなわち、PCのデータを読み出して
補助記憶装置5に格納する場合には、I/F6を介して
読み出したデータを一旦RAM3に格納し、かかるデー
タを制御回路4に転送して、CPU1の書き込み指令に
より補助記憶装置5のディスクに書き込んでいる。
Next, the operation will be described. CPU1 is R
According to the program stored in the OM 2, the data of the PC (not shown) connected to the I / F 6 is read into the auxiliary storage device 5 or the data of the auxiliary storage device 5 is written in the PC. That is, when the data of the PC is read and stored in the auxiliary storage device 5, the data read via the I / F 6 is temporarily stored in the RAM 3, the data is transferred to the control circuit 4, and the write command of the CPU 1 is issued. Is written to the disk of the auxiliary storage device 5.

【0004】また、逆に補助記憶装置5から必要なデ−
タを読み出してPCへ書き込む場合は、CPU1は必要
とするデ−タが格納されているアドレスを制御回路4に
指定して、かつ読み込み指令を与えると、補助記憶装置
5から必要なデ−タが制御回路4を経由してRAM3に
格納され、かかるRAM3に格納されたデ−タをI/F
6を介してPCに書き込んでいる。
On the contrary, the necessary data from the auxiliary storage device 5 is required.
When reading the data and writing the data to the PC, the CPU 1 designates the address storing the required data to the control circuit 4 and gives a read command, so that the necessary data is read from the auxiliary storage device 5. Is stored in the RAM 3 via the control circuit 4, and the data stored in the RAM 3 is transferred to the I / F.
Writing to PC via 6.

【0005】一方、リセット信号発生回路7は、外部か
ら強制的に補助記憶装置5を含むPC全体をリセットす
るリセット信号101を発生し、スイッチ10が開状態
であるときは、成形器8の入力が抵抗器9を介してHレ
ベルにあるため、成形器8の出力であるリセット信号1
01は同じくHレベルとなって、CPU1と制御回路4
の各リセット端子に入力され、その結果、CPU1と制
御回路4がアクティブとならず、ROM2のプログラム
に従って動作を実行する。
On the other hand, the reset signal generation circuit 7 externally forcibly generates a reset signal 101 for resetting the entire PC including the auxiliary storage device 5, and when the switch 10 is in the open state, the input of the molding machine 8 is performed. Is at the H level via the resistor 9, the reset signal 1 output from the shaper 8
01 also becomes H level, and CPU 1 and control circuit 4
Are input to the respective reset terminals of, and as a result, the CPU 1 and the control circuit 4 are not activated, and the operation is executed according to the program of the ROM 2.

【0006】次に、押しボタンスイッチ10が押下され
て閉状態になると、成形器8の入力はLレベルとなり、
成形器8から出力されるリセット信号101もLレベル
となるため、CPU1と制御回路4は直ちにリセット状
態となる。
Next, when the push button switch 10 is pushed down to a closed state, the input of the molding machine 8 becomes L level,
Since the reset signal 101 output from the molding machine 8 also becomes L level, the CPU 1 and the control circuit 4 immediately enter the reset state.

【0007】また、図10は従来のPCの他の具体例を
示したブロック図であり、符号1〜6は図9と全く同一
のものである。そして、11は交流電圧を二次電圧、例
えばAC30Vに変換するトランス、12は二次電圧か
らPCの電源となる直流の定電圧、例えばDC5V10
2を発生する定電圧発生回路、13は直流電圧値を検出
しその値がある一定値(例えばDC4.75V)より低
下した場合にリセット信号103を出力する電圧検出回
路で、このリセット信号103はCPU1と制御回路4
のリセット端子にそれぞれ入力している。
FIG. 10 is a block diagram showing another concrete example of a conventional PC, and reference numerals 1 to 6 are exactly the same as those in FIG. 11 is a transformer for converting an AC voltage into a secondary voltage, for example, AC30V, and 12 is a DC constant voltage from the secondary voltage to be a power source for the PC, for example, DC5V10.
A constant voltage generating circuit for generating 2 is a voltage detecting circuit for detecting a DC voltage value and outputting a reset signal 103 when the value is lower than a certain constant value (DC 4.75V, for example). The reset signal 103 is CPU 1 and control circuit 4
Input to each reset terminal.

【0008】従って、この従来例によれば、直流電圧1
02が正常範囲(例えばDC4.75〜5V)にある場
合、リセット信号103はHレベルとなるため、CPU
1と制御回路4はリセットされず通常の動作を行い、ま
た、直流電圧102が異常電圧(例えばDC4.75V
以下)になると、リセット信号103はLレベルとな
り、CPU1と制御回路4はリセット状態になる。
Therefore, according to this conventional example, the DC voltage 1
When 02 is in the normal range (for example, DC 4.75 to 5V), the reset signal 103 becomes H level, so the CPU
1 and the control circuit 4 are not reset and perform normal operation, and the DC voltage 102 is an abnormal voltage (for example, 4.75V DC).
(Below), the reset signal 103 becomes L level, and the CPU 1 and the control circuit 4 are in a reset state.

【0009】それ故に、直流電圧102が正常範囲にあ
る場合のみ、PCからデ−タを読み出して補助記憶装置
5に書き込んだり、また逆に補助記憶装置15に格納さ
れている別のデ−タを読み出してPCに書き込むことが
可能となる。もちろん、この時の読み出し、書き込みの
手順はあらかじめROM2に格納され、読み出したデ−
タを一時的に格納するためにRAM3が使用される。
Therefore, only when the DC voltage 102 is in the normal range, the data is read from the PC and written in the auxiliary storage device 5, or conversely, another data is stored in the auxiliary storage device 15. Can be read and written to the PC. Of course, the reading and writing procedure at this time is stored in the ROM 2 in advance, and the read data is read.
RAM 3 is used to temporarily store the data.

【0010】[0010]

【発明が解決しようとする課題】従来のPCは以上のよ
うに構成されているので、補助記憶装置5に対する書き
込み動作中に、制御回路4に対しリセット操作を強制的
に行ったような場合、あるいは何かの原因で電源電圧が
低下し、電圧検出回路からリセット信号が出力された場
合に、デ−タの書き込み動作が中断されることとなり、
この結果、デ−タの破壊が生ずるという問題点があっ
た。
Since the conventional PC is constructed as described above, when the reset operation is forcibly performed on the control circuit 4 during the writing operation to the auxiliary storage device 5, Alternatively, if the power supply voltage drops for some reason and a reset signal is output from the voltage detection circuit, the data write operation will be interrupted,
As a result, there is a problem that the data is destroyed.

【0011】この発明はかかる問題点を解決するために
なされたもので、フロッピ−ディスクあるいはハ−ドデ
ィスクなどの補助記憶装置に対するデ−タの書き込み動
作中に、リセット信号が出力された場合においても、デ
−タの破壊を防止できるようにしたPCを得ることを目
的とする。
The present invention has been made to solve the above problems, and in the case where a reset signal is output during a data writing operation to an auxiliary storage device such as a floppy disk or a hard disk. Also, the object is to obtain a PC capable of preventing the destruction of data.

【0012】[0012]

【課題を解決するための手段】この発明に係るPCは、
マイクロプロセッサと、プログラム格納メモリと、演算
作業用メモリと、補助記憶装置に対する書き込み、読み
取り動作を制御する制御回路とを少なくとも具備したプ
ログラマブルコントローラであって、前記マイクロプロ
セッサ及び制御回路に対しリセット動作をかけるリセッ
ト信号発生手段と、このリセット信号を所定時間遅延し
て前記マイクロプロセッサ及び制御回路に入力する遅延
回路とを設けたものである。
The PC according to the present invention is
A programmable controller including at least a microprocessor, a program storage memory, an arithmetic operation memory, and a control circuit for controlling writing and reading operations with respect to an auxiliary storage device, the reset operation being performed for the microprocessor and the control circuit. A reset signal generating means for applying the reset signal and a delay circuit for delaying the reset signal for a predetermined time and inputting the delayed reset signal to the microprocessor and the control circuit are provided.

【0013】また、交流電源の瞬時停電を検出する瞬時
停電検出回路と、直流電源電圧の電圧低下を検出する電
圧検出回路を備え、瞬時停電回路の出力をCPUに割り
込み信号として入力するとともに電圧検出回路の出力を
補助記憶装置の制御回路にリセット信号として入力する
ようにしたものである。
Further, an instantaneous power failure detection circuit for detecting an instantaneous power failure of the AC power supply and a voltage detection circuit for detecting a voltage drop of the DC power supply voltage are provided, and the output of the instantaneous power failure circuit is input to the CPU as an interrupt signal and the voltage is detected. The output of the circuit is input to the control circuit of the auxiliary storage device as a reset signal.

【0014】[0014]

【作用】この発明においては、リセット信号発生手段か
ら出力したリセット信号がCPUに割り込み信号として
入力するとともに遅延回路の作用により所定時間だけ遅
れて補助記憶装置制御回路に入力し、この遅延期間の間
に補助記憶装置に対するデ−タの書き込み動作を継続さ
せる。
According to the present invention, the reset signal output from the reset signal generating means is input to the CPU as an interrupt signal and is input to the auxiliary storage device control circuit with a delay of a predetermined time due to the action of the delay circuit, during this delay period. Then, the data write operation to the auxiliary storage device is continued.

【0015】また、瞬時停電検出回路の停電検出信号を
CPUに割り込み信号として入力することにより、CP
Uの動作を中断させ、しかも電圧検出回路の電圧低下信
号を補助記憶装置制御回路にリセット信号として入力す
る時間を補助記憶装置の処理時間より長くすることによ
り、補助記憶装置に対するデータの書き込み動作を継続
させる。
By inputting the power failure detection signal of the instantaneous power failure detection circuit to the CPU as an interrupt signal, the CP
By suspending the operation of U and inputting the voltage drop signal of the voltage detection circuit to the auxiliary storage device control circuit as a reset signal longer than the processing time of the auxiliary storage device, the data writing operation to the auxiliary storage device can be performed. Let it continue.

【0016】[0016]

【実施例】【Example】

実施例1.図1はこの発明の一実施例を示すブロック図
である。符号1〜10は上記従来装置と同一のものであ
る。21はリセット信号発生回路7の出力信号であるリ
セット信号101が入力する遅延回路であり、このリセ
ット信号をその出力時から所定時間遅れた遅延リセット
信号110としてCPU1及び補助記憶装置5の制御回
路4にそれぞれ入力させている。また、リセット信号1
01は同時にCPU1に直接入力している。なお、図2
と、図3は遅延回路21の具体的回路例を示しており、
同図において、22は成形器、23はコンデンサ、2
4、25は抵抗器、26はダイオ−ドをそれぞれ示し、
図2は充放電時定数が同じ場合の遅延回路を、また図3
は充放電時定数を異ならせた場合の遅延回路をそれぞれ
示している。
Example 1. FIG. 1 is a block diagram showing an embodiment of the present invention. Reference numerals 1 to 10 are the same as those of the conventional device. Reference numeral 21 denotes a delay circuit to which the reset signal 101 which is the output signal of the reset signal generation circuit 7 is input. Are input respectively. Also, reset signal 1
01 is directly input to the CPU 1 at the same time. Note that FIG.
3 shows a concrete circuit example of the delay circuit 21,
In the figure, 22 is a molding machine, 23 is a capacitor, and 2
4 and 25 are resistors and 26 is a diode,
2 shows a delay circuit when the charge and discharge time constants are the same, and FIG.
Shows delay circuits when charging / discharging time constants are made different.

【0017】図1の実施例の動作について説明する。C
PU1及び補助記憶制御回路4の動作は、基本的に従来
と同様であるから、この発明の特徴とするリセット動作
について説明する。すなわち、補助記憶制御回路4が動
作中にリセット信号発生回路7の押しボタンスイッチ1
0が閉じられると、リセット信号発生回路7の出力であ
るリセット信号101は、従来と同様アクティブ状態と
なる。すなわち、図1の実施例ではLレベルとなり、そ
の結果CPU1は進行中の仕事を中断してあらかじめ決
められた割り込み処理を実行し、補助記憶制御回路4に
は新しいコマンドを指示しない。同時に、リセット信号
101は遅延回路21にも入力されるため、この遅延回
路自体もアクティブ状態となる。
The operation of the embodiment shown in FIG. 1 will be described. C
The operations of the PU 1 and the auxiliary storage control circuit 4 are basically the same as the conventional ones, and therefore the reset operation, which is a feature of the present invention, will be described. That is, the push button switch 1 of the reset signal generating circuit 7 is operated while the auxiliary storage control circuit 4 is operating.
When 0 is closed, the reset signal 101, which is the output of the reset signal generation circuit 7, becomes active as in the conventional case. That is, in the embodiment shown in FIG. 1, the L level is set, and as a result, the CPU 1 interrupts the work in progress and executes a predetermined interrupt process, and does not give a new command to the auxiliary storage control circuit 4. At the same time, the reset signal 101 is also input to the delay circuit 21, so that the delay circuit itself also becomes active.

【0018】ここで、図4に示すように、遅延回路21
は入力時から所定の遅延時間t1 の経過後に遅延リセッ
ト信号110を出力するよう設定されているので、押し
ボタンスイッチ10の閉成時間t3 が遅延時間t1 より
長い場合において、押しボタンスイッチ10が閉成され
る直前に制御回路4に対し書き指令がCPU1から指示
された場合、制御回路4は補助記憶装置5に対するデ−
タの書き込み動作をそのまま継続して実行する。
Here, as shown in FIG. 4, the delay circuit 21
Is set to output the delay reset signal 110 after a predetermined delay time t1 from the input, the push button switch 10 is closed when the closing time t3 of the push button switch 10 is longer than the delay time t1. If a write command is issued from the CPU 1 to the control circuit 4 immediately before the control circuit 4 is executed, the control circuit 4 writes data to the auxiliary storage device 5.
The data write operation is continuously executed.

【0019】そして、遅延回路21の遅延時間t1 は制
御回路4による書き込み動作継続時間t2 より長く設定
してあるため、その書き込み動作の終了後に遅延回路2
1から遅延リセット信号が出力される。この遅延リセッ
ト信号110はCPU1と制御回路4をリセットしてシ
ステム全体をリセット状態にする。つまり、制御回路4
はその制御動作が終了した後にリセットされるため、補
助記憶装置5の書き込みデ−タが破壊される不具合は起
こらない。
Since the delay time t1 of the delay circuit 21 is set longer than the write operation duration time t2 by the control circuit 4, the delay circuit 2 is set after the write operation is completed.
A delayed reset signal is output from 1. The delayed reset signal 110 resets the CPU 1 and the control circuit 4 to bring the entire system into a reset state. That is, the control circuit 4
Is reset after the control operation is completed, the write data in the auxiliary storage device 5 is not destroyed.

【0020】次に、押しボタンスイッチ10の閉成時間
が遅延時間t1 より短い場合は、CPU1は同時に割り
込み処理を実行するが、遅延回路21から遅延リセット
信号110が出力する前にスイッチ10が開くため、C
PU1はその割り込み処理を終了し、スイッチ10の閉
じられる以前に実行していた仕事を再開することにな
る。このとき、当然のこと遅延リセット信号110はア
クティブとならないため、システムとしてリセットされ
ず、その結果としてデ−タが破壊される不具合は発生し
ない。
Next, when the closing time of the push button switch 10 is shorter than the delay time t1, the CPU 1 simultaneously executes interrupt processing, but the switch 10 is opened before the delay reset signal 110 is output from the delay circuit 21. Because C
PU1 ends the interrupt processing, and resumes the work being executed before the switch 10 is closed. At this time, as a matter of course, since the delayed reset signal 110 does not become active, it is not reset as a system, and as a result, the problem that the data is destroyed does not occur.

【0021】なお、この実施例では、リセット信号発生
回路7を押しボタンスイッチ10のON、OFFによる
信号を成形する回路構成としたが、たとえばONEシュ
ート回路による回路構成としてもよい。また、制御回路
4と、補助記憶装置5とで構成されたシステムの書き込
み動作に対する保証について説明したが、CPU1から
のコマンドにより非同期で動作する他のシステムとし
て、かかる制御回路4と補助記憶装置5を構成してもよ
い。
In this embodiment, the reset signal generating circuit 7 has a circuit configuration for shaping a signal by turning on and off the push button switch 10, but it may have a circuit configuration by an ONE shoot circuit, for example. Although the guarantee of the write operation of the system including the control circuit 4 and the auxiliary storage device 5 has been described, the control circuit 4 and the auxiliary storage device 5 may be used as another system that operates asynchronously by a command from the CPU 1. May be configured.

【0022】実施例2.図6において、符号1〜6及び
11〜13は従来のものと同様である。14はトランス
11の出力側に接続された瞬時停電検出回路で、電源に
瞬時の停電が生じたときにこれを検出して瞬停信号12
0がHレベルからLレベルに変化する。そして、この瞬
停信号120はCPU1のノン・マスカプルの割込端子
(以下NMI端子と称する)に入力している。
Example 2. In FIG. 6, reference numerals 1 to 6 and 11 to 13 are the same as the conventional ones. Reference numeral 14 denotes an instantaneous power failure detection circuit connected to the output side of the transformer 11, which detects when an instantaneous power failure has occurred in the power source and detects an instantaneous power failure signal 12
0 changes from H level to L level. The instantaneous blackout signal 120 is input to the non-maskable interrupt terminal (hereinafter referred to as NMI terminal) of the CPU 1.

【0023】次に動作を説明する。CPU1が制御回路
4を介し補助記憶装置5にあるデータを書き込もうとし
ているとき、図7に示すように時間t1 の瞬停が発生す
ると、検出回路13が瞬停信号120を発生する。ここ
で、時間t2 は瞬停信号120が発生するまでの遅延時
間であり、通常は数ミリ秒に設定してある。従って、瞬
停時間t1 がその遅延時間t2 より短い場合は、瞬停信
号はHレベルのままであり、しかもCPU1などの電源
電圧102も正常範囲にあるため、なんの問題も発生し
ない。
Next, the operation will be described. When the CPU 1 tries to write the data in the auxiliary storage device 5 through the control circuit 4 and an instantaneous blackout occurs at time t1 as shown in FIG. 7, the detection circuit 13 generates an instantaneous blackout signal 120. Here, the time t2 is a delay time until the instantaneous blackout signal 120 is generated, and is normally set to several milliseconds. Therefore, when the instantaneous blackout time t1 is shorter than the delay time t2, the instantaneous blackout signal remains at the H level and the power supply voltage 102 of the CPU 1 and the like is in the normal range, so that no problem occurs.

【0024】次に、瞬停時間が10ミリ秒前後の場合、
瞬停信号120がHレベルからLレベルに変化し、CP
U1は最優先で実行中の仕事、すなわち補助記憶装置5
に対するデータの書き込み動作を中断し、NMI処理を
実行する。このNMI処理では、CPU1は瞬停中か否
かのチェックを行っている。従って、電源が復帰する
と、遅延時間t3 (通常2〜3ミリ秒)後に瞬停信号1
02はHレベルとなり、NMI処理を終了して補助記憶
装置5に対する書き込み動作を再開する。しかし、電源
電圧が0ボルトに低下するまでの時間t4 は、通常瞬停
時間よりも長く保持されているので、電圧検出回路13
から出力されるリセット信号103はアクティブとなら
ず、CPU1及び制御回路4はリセットされないため、
この時も問題はない。
Next, when the instantaneous blackout time is around 10 milliseconds,
The instantaneous power failure signal 120 changes from H level to L level, and CP
U1 is the highest priority work being executed, that is, the auxiliary storage device 5
The data write operation to is interrupted and NMI processing is executed. In this NMI processing, the CPU 1 checks whether or not there is an instantaneous blackout. Therefore, when the power is restored, the instantaneous blackout signal 1 is output after the delay time t3 (usually 2 to 3 milliseconds).
02 becomes H level, the NMI process is terminated, and the write operation to the auxiliary storage device 5 is restarted. However, the time t4 until the power supply voltage decreases to 0 volt is normally maintained longer than the instantaneous blackout time, so the voltage detection circuit 13
Since the reset signal 103 output from is not active and the CPU 1 and the control circuit 4 are not reset,
There is no problem at this time.

【0025】次に、瞬停時間t1 が10ミリ前後より大
きい場合について説明する。この場合、瞬停信号120
による動作は上述した瞬停時間t1 が10数ミリ秒前後
における動作と同様であって、リセット信号103が出
力する点において動作が異なる。すなわち、瞬停が発生
してリセット信号103がアクティブになる時間t5
が、補助記憶装置5にデータを書き込み中に発生する
と、データ破壊が生じるが、この発明では、補助記憶装
置5にデータを書き込んだ後にリセット信号103がア
クティブになるように構成されている。すなわち、CP
U1は瞬停時間t1に基づく瞬停信号120によってN
MI処理を実行しているため、NMI処理では新規なコ
マンドを制御回路4に与えず、制御回路4のコマンドに
対する処理時間の最大処理時間T(図示せず)以上にリ
セットアクティブ時間t5 を設定しておけば、制御回路
4の書き込み動作終了後にリセット信号103がアクテ
ィブとなるため、補助記憶装置5への書き込みデータも
破壊されない。
Next, the case where the instantaneous blackout time t1 is longer than about 10 mm will be described. In this case, the instantaneous blackout signal 120
Is the same as the operation when the instantaneous blackout time t1 is about 10 and several milliseconds, and is different in that the reset signal 103 is output. That is, the time t5 when the instantaneous blackout occurs and the reset signal 103 becomes active.
However, if this occurs while writing data to the auxiliary storage device 5, data destruction occurs. However, in the present invention, the reset signal 103 becomes active after writing data to the auxiliary storage device 5. That is, CP
U1 receives N by the instantaneous blackout signal 120 based on the instantaneous blackout time t1.
Since the MI process is executed, a new command is not given to the control circuit 4 in the NMI process, and the reset active time t5 is set to be equal to or longer than the maximum processing time T (not shown) of the processing time for the command of the control circuit 4. If this is done, the reset signal 103 becomes active after the write operation of the control circuit 4 is completed, so that the write data to the auxiliary storage device 5 is not destroyed.

【0026】ここで、最大処理時間Tは、CPU1の種
類や使用するソフトウエア、さらには制御回路4の種類
により、一義的に決定されるものであるため、定電圧発
生回路12より出力される電源電圧102の保持時間を
コンデンサ容量をアップすることなどにより、下式が簡
単に実現できることは言うまでもない。 最大処理時間T<リセットアクティブ時間t5 ・・・・(1) また、瞬停が図7に示すように復帰した場合、電源電圧
は保証電圧以下(たとえば4V)となっても、リセット
信号103がアクティブとなっているため、なんら問題
はなく、また、電源電圧が徐々に上昇しても(たとえば
DC4Vから5V)、電源電圧が正常電圧(たとえばD
C4.75V)になってからある一定時間はリセット信
号がアクティブになっているため、なんら動作に問題は
ない。ここで、一定時間は図7においてリセット復帰時
間t6 で示している。
Since the maximum processing time T is uniquely determined by the type of the CPU 1, the software used, and the type of the control circuit 4, it is output from the constant voltage generating circuit 12. Needless to say, the following formula can be easily realized by increasing the holding time of the power supply voltage 102 and increasing the capacitance of the capacitor. Maximum processing time T <reset active time t5 (1) Further, when the instantaneous power failure is restored as shown in FIG. 7, the reset signal 103 remains even if the power supply voltage becomes the guaranteed voltage or lower (for example, 4V). Since it is active, there is no problem, and even if the power supply voltage gradually rises (for example, DC4V to 5V), the power supply voltage is normal voltage (for example, D
There is no problem in operation because the reset signal is active for a certain period of time after C4.75V). Here, the fixed time is indicated by the reset recovery time t6 in FIG.

【0027】次に、補助記憶装置5に対する書き込み中
に、過って電源をOFFした場合について説明する。こ
の場合も瞬停信号120の動作は、瞬時停電時と同様で
ある。しかし、リセット信号103は瞬停の長さに関係
なく毎回確実にアクティブとなるが、上記(1)式が成
立するため、同様な理由により、補助記憶装置5のデー
タ破壊は生じない。
Next, the case where the power is accidentally turned off during writing to the auxiliary storage device 5 will be described. Also in this case, the operation of the instantaneous blackout signal 120 is the same as that at the momentary power failure. However, although the reset signal 103 is surely activated every time regardless of the length of the instantaneous blackout, since the above formula (1) is satisfied, the data destruction of the auxiliary storage device 5 does not occur for the same reason.

【0028】なお、この実施例においては、CPU1へ
の割り込みをNMI端子に入力したが、通常のマスク可
能な割り込み処理としてもよいし、ハイアクティブとし
てもよい。また、電圧検出回路13は直流の電源電圧を
検出してリセット信号を出力する構成としたが、瞬停信
号の変化に基づきタイマー等によって時間を設定し、上
記(1)式を成立させてもよい。また、リセット信号1
03はCPU1と制御回路4にのみ入力しているが、他
のブロックあるいは図に示さない他の機能ブロックに入
力しても同様の効果がある。
Although the interrupt to the CPU 1 is input to the NMI terminal in this embodiment, it may be a normal maskable interrupt process or a high active interrupt process. Further, although the voltage detection circuit 13 is configured to detect the DC power supply voltage and output the reset signal, even if the time is set by the timer or the like based on the change of the instantaneous blackout signal and the above formula (1) is satisfied. Good. Also, reset signal 1
Although 03 is input only to the CPU 1 and the control circuit 4, the same effect can be obtained by inputting it to another block or another functional block not shown.

【0029】[0029]

【発明の効果】この発明は以上のように構成されている
ので、補助記憶装置に対しデータを取り込み中にリセッ
ト操作を実行し、あるいは電源に予期せぬ瞬時の停電が
発生しても補助記憶装置のデータの破壊を未然に防止で
きるものである。
Since the present invention is configured as described above, the auxiliary storage is executed even if a reset operation is executed while data is being taken into the auxiliary storage or an unexpected power failure occurs in the power supply. The device data can be prevented from being destroyed.

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

【図1】この発明の実施例1を示すブロック図である。FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】この発明のリセット信号発生回路を示す図であ
る。
FIG. 2 is a diagram showing a reset signal generating circuit of the present invention.

【図3】この発明のリセット信号発生回路を示す図であ
る。
FIG. 3 is a diagram showing a reset signal generating circuit of the present invention.

【図4】この発明の実施例1の動作パターンを示す図で
ある。
FIG. 4 is a diagram showing an operation pattern according to the first embodiment of the present invention.

【図5】この発明の実施例1の動作フロー図である。FIG. 5 is an operation flow diagram of the first embodiment of the present invention.

【図6】この発明の実施例2を示すブロック図である。FIG. 6 is a block diagram showing a second embodiment of the present invention.

【図7】この発明の実施例2の動作パターンを示す図で
ある。
FIG. 7 is a diagram showing an operation pattern according to the second embodiment of the present invention.

【図8】この発明の実施例2の動作フロー図である。FIG. 8 is an operation flow diagram of the second embodiment of the present invention.

【図9】従来のプログラマブルコントローラのブロック
図である。
FIG. 9 is a block diagram of a conventional programmable controller.

【図10】従来のプログラマブルコントローラのブロッ
ク図である。
FIG. 10 is a block diagram of a conventional programmable controller.

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

1 中央処理装置(CPU) 2 ROM 3 RAM 4 補助記憶装置制御回路 5 補助記憶装置 6 PCインターフェース 7 リセット信号発生回路 8 成形器 9 抵抗器 10 押しボタンスイッチ 11 トランス 12 定電圧発生回路 13 電圧検出回路 14 瞬停検出回路 101 リセット信号 102 直流電圧 103 リセット信号 110 遅延リセット信号 120 瞬停信号 1 Central Processing Unit (CPU) 2 ROM 3 RAM 4 Auxiliary Storage Device Control Circuit 5 Auxiliary Storage Device 6 PC Interface 7 Reset Signal Generation Circuit 8 Molding Machine 9 Resistor 10 Push Button Switch 11 Transformer 12 Constant Voltage Generation Circuit 13 Voltage Detection Circuit 14 Instantaneous power failure detection circuit 101 Reset signal 102 DC voltage 103 Reset signal 110 Delayed reset signal 120 Instantaneous power failure signal

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 マイクロプロセッサと、プログラム格納
メモリと、演算作業用メモリと、補助記憶装置に対する
書き込み、読み取り動作を制御する制御回路とを少なく
とも具備したプログラマブルコントローラであって、前
記マイクロプロセッサ及び制御回路に対しリセット動作
をかけるリセット信号発生手段と、このリセット信号を
所定時間遅延して前記マイクロプロセッサ及び制御回路
に入力する遅延回路とを設けたことを特徴とするプログ
ラマブルコントローラ。
1. A programmable controller including at least a microprocessor, a program storage memory, an arithmetic operation memory, and a control circuit for controlling writing and reading operations with respect to an auxiliary storage device, wherein the microprocessor and the control circuit. And a delay circuit for delaying the reset signal for a predetermined time and inputting the reset signal to the microprocessor and the control circuit.
【請求項2】 マイクロプロセッサと、プログラム格納
メモリと、演算作業用メモリと、補助記憶装置に対する
書き込み、読み取り動作を制御する制御回路とを少なく
とも具備したプログラマブルコントローラであって、交
流電源の瞬時停電を検出する瞬時停電検出回路と、直流
電源電圧の電圧低下を検出する電圧低下検出回路とを有
し、上記瞬時停電検出回路の出力信号を上記マイクロプ
ロセッサに割り込み信号として入力させたことを特徴と
するプログラマブルコントローラ。
2. A programmable controller including at least a microprocessor, a program storage memory, a memory for arithmetic work, and a control circuit for controlling writing and reading operations with respect to an auxiliary storage device, the instantaneous power failure of an AC power supply. An instantaneous power failure detection circuit for detecting and a voltage drop detection circuit for detecting a voltage drop of the DC power supply voltage, wherein the output signal of the instantaneous power failure detection circuit is input to the microprocessor as an interrupt signal. Programmable controller.
JP21526791A 1991-08-27 1991-08-27 Programmable controller Expired - Lifetime JP2778299B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21526791A JP2778299B2 (en) 1991-08-27 1991-08-27 Programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21526791A JP2778299B2 (en) 1991-08-27 1991-08-27 Programmable controller

Publications (2)

Publication Number Publication Date
JPH0553618A true JPH0553618A (en) 1993-03-05
JP2778299B2 JP2778299B2 (en) 1998-07-23

Family

ID=16669481

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21526791A Expired - Lifetime JP2778299B2 (en) 1991-08-27 1991-08-27 Programmable controller

Country Status (1)

Country Link
JP (1) JP2778299B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100472179B1 (en) * 1997-08-11 2005-07-07 삼성전자주식회사 Computers and Methods to Securely Store System Configuration Data
JP2013168092A (en) * 2012-02-17 2013-08-29 Hitachi Ltd Electronic equipment, soft error resistance evaluation system and evaluation method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100472179B1 (en) * 1997-08-11 2005-07-07 삼성전자주식회사 Computers and Methods to Securely Store System Configuration Data
JP2013168092A (en) * 2012-02-17 2013-08-29 Hitachi Ltd Electronic equipment, soft error resistance evaluation system and evaluation method

Also Published As

Publication number Publication date
JP2778299B2 (en) 1998-07-23

Similar Documents

Publication Publication Date Title
JP3224153B2 (en) Improved data protection system and data protection method
US4827149A (en) Operation halting circuit
EP0715259A2 (en) Watchdog timer lock-up prevention circuit
KR19980048106A (en) PD and PD&#39;s Power Failure Compensation Method
JPH0553618A (en) Programmable controller
JPH10207586A (en) Power-off control system for computer
JPH0276021A (en) Recovery processing system for power source of information processor
JP2980704B2 (en) Programmable controller
JPS5835799A (en) Detecting system for ram backup error
JP2529707B2 (en) Blackout detection method
JP2982294B2 (en) Instantaneous power failure time detection method for programmable controller
JPH06103480B2 (en) Blackout processor
JPH05233474A (en) Storage contents protection system
JPH0628267A (en) Information processor
JPS61148554A (en) Memory device using c-mos
JP2002091632A (en) Computer system
JPH0329015A (en) Instantaneous service interruption processor for equipment using computer
JP3207446B2 (en) System stop method of controller system
JPS6265118A (en) Data processor
JPH0588790A (en) Power source control system
JPH0242520A (en) Power failure processing circuit
JPS61285559A (en) Battery back-up device
JPH0246966B2 (en)
JPH036526B2 (en)
JPH04359305A (en) Personal computer