JP2011090642A - Controller, control system and starting method for the same - Google Patents
Controller, control system and starting method for the same Download PDFInfo
- Publication number
- JP2011090642A JP2011090642A JP2009245777A JP2009245777A JP2011090642A JP 2011090642 A JP2011090642 A JP 2011090642A JP 2009245777 A JP2009245777 A JP 2009245777A JP 2009245777 A JP2009245777 A JP 2009245777A JP 2011090642 A JP2011090642 A JP 2011090642A
- Authority
- JP
- Japan
- Prior art keywords
- power
- power failure
- power supply
- cpu
- recovery
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、石油化学プラントなどの被制御対象を制御するプログラマブルコントローラ等の制御装置、及びこれを用いた制御システムに関し、特に、供給電源の停電・復電に伴うシステムの起動方法に関する。 The present invention relates to a control device such as a programmable controller that controls an object to be controlled such as a petrochemical plant, and a control system using the control device, and more particularly, to a method for starting a system associated with a power failure / recovery of a power supply.
プラントを制御する制御システムにおいては、従来からプログラマブルコントローラが広く用いられている。一般に、プログラマブルコントローラの実行速度を早くするために、アプリケーションプログラムとその処理データとを記憶するワーキングメモリは、不揮発性メモリでなく、書き込み読み出し時間が早い揮発性メモリを採用している。 Conventionally, programmable controllers have been widely used in control systems for controlling plants. In general, in order to increase the execution speed of the programmable controller, a working memory for storing an application program and its processing data is not a nonvolatile memory but a volatile memory having a fast write / read time.
この揮発性メモリは、停電が発生すると、長時間の記憶ができないので、電源が回復(ここでは、復電と称す。)した場合、揮発性メモリのプログラム及びデータを停電前の状態に復元してからシステムの運転を再開するようにしている。 Since this volatile memory cannot be stored for a long time if a power failure occurs, the program and data in the volatile memory are restored to the state before the power failure when the power supply is restored (referred to as power recovery here). After that, the system is restarted.
この時、停電発生直前の揮発性メモリのデータは、不揮発性メモリに一旦、記憶しておく。一般に、プログラムは常時変更することがないので、変更が要求された時に時間をかけて記憶するが、実行中のプログラムのデータ(変数とも言う。)は常時更新されているので、一定の制御周期で、または、停電発生時点で、揮発性メモリから不揮発性メモリに記憶している。 At this time, the data in the volatile memory immediately before the occurrence of the power failure is temporarily stored in the nonvolatile memory. Generally, since a program does not always change, it is stored over time when a change is requested. However, since data (also referred to as a variable) of a running program is constantly updated, a fixed control cycle is required. Or, when a power failure occurs, the data is stored in the nonvolatile memory from the volatile memory.
前者の場合、一定の制御周期で制御されているアプリケーションプログラムの周期毎のデータを記憶すると、この記憶処理のために時間を要するので、その分制御周期を遅らせることになる。 In the former case, if data for each cycle of the application program controlled at a constant control cycle is stored, it takes time for this storage processing, and the control cycle is delayed accordingly.
特に、データ量が多く、さらに、不揮発性メモリへの書き込み/読み出し応答(アクセス)は遅いため、このための処理時間が制御周期を遅くする問題がある。 In particular, since the amount of data is large, and the write / read response (access) to the nonvolatile memory is slow, there is a problem that the processing time for this delays the control cycle.
後者の場合、停電発生時点で一括して制御周期毎のデータを記憶するので、記憶ための処理時間は、制御周期に影響しない。 In the latter case, since data for each control cycle is stored at the same time when a power failure occurs, the processing time for storage does not affect the control cycle.
しかしながら、いずれの場合にも、停電発生時に揮発性メモリのデータを不揮発性メモリに記憶してからCPUを停止し、復電後電源が投入されると、CPUは、予め記憶している不揮発性メモリのプログラム及びデータを揮発性メモリにコピーしてプログラムの実行を再開する初期化処理を行うので、この初期化処理に長い時間がかかる問題がある。 However, in any case, when a power failure occurs, the volatile memory data is stored in the nonvolatile memory and then the CPU is stopped. When the power is turned on after the power recovery, the CPU stores the nonvolatile memory stored in advance. Since the initialization process for copying the program and data in the memory to the volatile memory and restarting the execution of the program is performed, there is a problem that this initialization process takes a long time.
ところで、停電時のデータの記憶、再起動時におけるデータの読み出しが高速で実行されるようにした制御処理装置が開示されている(例えば、特許文献1参照。)。 By the way, a control processing device is disclosed in which data storage at the time of a power failure and data reading at the time of restarting are executed at high speed (for example, refer to Patent Document 1).
この方法によれば、データを並列して記憶し、且つ、記憶されたデータが並列して読み出される配列変数エリアの第1及び第2の記憶素子と、第1の記憶素子の停電の際にも第2の記憶素子の動作が連続するように電源を供給する無停電電源と、第2の記憶素子に記憶保持されたデータを第1の記憶素子が記憶動作を開始する際に初期化する初期化制御手段とを備えることを特徴としている。 According to this method, the first and second storage elements in the array variable area in which data is stored in parallel and the stored data is read out in parallel, and the first storage element is subjected to a power failure. The uninterruptible power supply that supplies power so that the operation of the second memory element continues, and the data stored and held in the second memory element are initialized when the first memory element starts the memory operation. And an initialization control means.
特許文献1に開示された方法によれば、第1と第2の揮発性メモリ間でデータの転送を行うように構成されているので、停電時のデータを記憶、及び、再起動時における初期化処理が高速で実行される。 According to the method disclosed in Patent Document 1, since the data is transferred between the first and second volatile memories, the data at the time of power failure is stored and the initial value at the time of restart is stored. Processing is performed at high speed.
しかしながら、停電から短時間で復電するような場合でもシステムを再起動してプログラムの実行を開始するので、実行中のシステムを停止しなければならない問題がある。 However, even when power is restored in a short time after a power failure, the system is restarted and the execution of the program is started. Therefore, there is a problem that the running system must be stopped.
即ち、実行中のプログラムは、停電時に揮発性メモリのデータが記憶可能な容量のバッテリを備えているにもかかわらず、一旦、システムを停止し再起動するので、制御が中断されてしまう問題がある。 In other words, the program being executed has a problem that the control is interrupted because the system is temporarily stopped and restarted even though it has a battery capable of storing volatile memory data in the event of a power failure. is there.
本発明は上記問題点を解決するためになされたもので、停電から復電までの停電が短時間の場合、即ち、バッテリの保証時間内で、揮発性メモリのデータが保証されている期間に復電した場合に、停電前の実行中のプログラムの実行を復電後直ちに継続再開できるようにした制御装置、制御システム、及びその起動方法を提供することを目的としている。 The present invention has been made to solve the above-described problems. When the power failure from power failure to power recovery is short, that is, within the period when the volatile memory data is guaranteed within the battery warranty time. It is an object of the present invention to provide a control device, a control system, and a startup method thereof that can resume the execution of a program that is being executed before a power failure immediately after a power failure when power is restored.
上記目的を達成するために、本発明による制御システムは、停電を検出して、揮発性メモリに記憶するデータを不揮発性メモリに記憶する機能を備える制御システムであって、前記制御装置は、実行中のプログラム及びデータを記憶する揮発性メモリと、当該揮発性メモリに記憶したプログラムに基づいて処理を実行するCPUと、前記揮発性メモリと同一の前記プログラムを記憶し、前記CPUの指令で前記プログラム及びデータを更新する不揮発性メモリと、前記CPUに対する割り込み信号を生成する割り込みコントローラと、入出力データを授受する入出力インタフェース部と、当該制御装置の各部に電源を供給するバッテリを含み、前記供給電源が「停電」となったことを検出して、当該バッテリに切り替える電源部と、前記電源部に供給される供給電源の状態を監視・制御する電源監視回路とを備え、前記電源監視回路は、前記電源部の受電状態が予め設定された電圧以下になった「停電」状態、または、予め設定した電圧以上に回復した「復電」状態を検出する停電・復電検知回路と、前記「停電」状態後の所定期間、当該制御装置をリセットするリセット信号をマスキングするマスキング信号を生成して、前記「復電」状態の発生が当該マスキング期間内に発生した場合「復電」割り込み信号とし、そうでない場合、復電リセット信号として生成する復電判別回路とを備え、前記割り込みコントローラは、前記電源監視回路から停電信号、及び復電信号を受信して、前記CPUに停電割り込み信号、及び復電割り込み信号を通知し、前記マスキング期間は、停電時の前記揮発性メモリのデータを前記不揮発性メモリに転送する最大時間以上に長く、且つ、前記バッテリは当該マスキング期間の電源が保証可能な容量を備え、前記CPUは、前記割り込みコントローラから停電割り込み信号を通知されたら、停電直前の前記揮発性メモリのデータを前記不揮発性メモリに記憶するメモリ転送処理を開始し、前記CPUは、前記復電割り込み信号を通知されたら、前記メモリ転送処理中であれば、当該メモリ転送処理を中止し、前記停電割り込み信号を受信直後のプログラムから処理を継続再開し、前記CPUは、前記復電リセット信号を通知された場合には、前記不揮発性メモリの記憶内容を前記揮発性メモリに記憶して、当該制御装置の初期化処理を実行し、前記マスキング期間中の「復電」に対して、前記停電割り込み信号を受信直後のプログラムから処理を継続再開するようにしたことを特徴とする。 In order to achieve the above object, a control system according to the present invention is a control system having a function of detecting a power failure and storing data to be stored in a volatile memory in a nonvolatile memory, wherein the control device executes A volatile memory that stores the program and data therein, a CPU that executes processing based on the program stored in the volatile memory, and the program that is the same as the volatile memory. A nonvolatile memory that updates programs and data; an interrupt controller that generates an interrupt signal for the CPU; an input / output interface unit that exchanges input / output data; and a battery that supplies power to each unit of the control device, A power supply unit that detects that the power supply is “power failure” and switches to the battery; A power supply monitoring circuit that monitors and controls the state of the power supply supplied to the power supply circuit, the power supply monitoring circuit is a “power failure” state in which the power reception state of the power supply unit is equal to or lower than a preset voltage, or in advance A power failure / recovery detection circuit that detects a "power recovery" state that has recovered beyond a set voltage, and a masking signal that masks a reset signal that resets the control device for a predetermined period after the "power failure" state is generated. A `` power recovery '' interrupt signal when the occurrence of the `` power recovery '' state occurs within the masking period, and a power recovery determination circuit that generates a power recovery reset signal otherwise, the interrupt controller, Receiving a power failure signal and a power recovery signal from the power monitoring circuit and notifying the CPU of a power failure interrupt signal and a power recovery interrupt signal, and the masking period is a power failure The battery has a capacity longer than the maximum time for transferring the data in the volatile memory to the nonvolatile memory, and the battery has a capacity capable of guaranteeing the power supply during the masking period, and the CPU sends a power failure interrupt signal from the interrupt controller. When notified, the memory transfer process for storing the data in the volatile memory immediately before the power failure is stored in the nonvolatile memory. When the CPU is notified of the power recovery interrupt signal, the memory transfer process is in progress. The memory transfer process is stopped and the process is resumed from the program immediately after receiving the power failure interrupt signal, and when the CPU is notified of the power reset signal, the stored contents of the nonvolatile memory are stored. Store in the volatile memory, execute the initialization process of the control device, Processing is resumed from the program immediately after receiving the power failure interrupt signal.
上記目的を達成するために、本発明による制御装置は、停電を検出して、揮発性メモリに記憶するデータを不揮発性メモリに記憶する機能を備える制御装置であって、前記制御装置は、実行中のプログラム及びデータを記憶する揮発性メモリと、当該揮発性メモリに記憶したプログラムに基づいて処理を実行するCPUと、前記揮発性メモリと同一の前記プログラムを記憶し、前記CPUの指令で前記プログラム及びデータを更新する不揮発性メモリと、前記CPUに対する割り込み信号を生成する割り込みコントローラと、入出力データを授受する入出力インタフェース部と、当該制御装置の各部に電源を供給するバッテリを含み、前記供給電源が「停電」となったことを検出して、当該バッテリに切り替える電源部と、前記電源部に供給される供給電源の状態を監視・制御する電源監視回路とを備え、前記電源監視回路は、前記電源部の受電状態が予め設定された電圧以下になった「停電」状態、または、予め設定した電圧以上に回復した「復電」状態を検出する停電・復電検知回路と、前記「停電」状態後の所定期間、当該制御装置をリセットするリセット信号をマスキングするマスキング信号を生成して、前記「復電」状態の発生が当該マスキング期間内に発生した場合「復電」割り込み信号とし、そうでない場合、復電リセット信号として生成する復電判別回路とを備え、前記割り込みコントローラは、前記電源監視回路から停電信号、及び復電信号を受信して、前記CPUに停電割り込み信号、及び復電割り込み信号を通知し、前記マスキング期間は、停電時の前記揮発性メモリのデータを前記不揮発性メモリに転送する最大時間以上に長く、且つ、前記バッテリは当該マスキング期間の電源が保証可能な容量を備え、前記CPUは、前記割り込みコントローラから停電割り込み信号を通知されたら、停電直前の前記揮発性メモリのデータを前記不揮発性メモリに記憶するメモリ転送処理を開始し、前記CPUは、前記復電割り込み信号を通知されたら、前記メモリ転送処理中であれば、当該メモリ転送処理を中止し、前記停電割り込み信号を受信直後のプログラムから処理を継続再開し、前記CPUは、前記復電リセット信号を通知された場合には、前記不揮発性メモリの記憶内容を前記揮発性メモリに記憶して、当該制御装置の初期化処理を実行し、前記マスキング期間中の「復電」に対して、前記停電割り込み信号を受信直後のプログラムから処理を継続再開するようにしたことを特徴とする。 In order to achieve the above object, a control device according to the present invention is a control device having a function of detecting a power failure and storing data to be stored in a volatile memory in a non-volatile memory. A volatile memory that stores the program and data therein, a CPU that executes processing based on the program stored in the volatile memory, and the program that is the same as the volatile memory. A nonvolatile memory that updates programs and data; an interrupt controller that generates an interrupt signal for the CPU; an input / output interface unit that exchanges input / output data; and a battery that supplies power to each unit of the control device, Detects that the power supply is “power failure” and supplies power to the power supply unit that switches to the battery. A power supply monitoring circuit that monitors and controls the state of the supplied power, and the power supply monitoring circuit is in a “power failure” state in which the power receiving state of the power supply unit is equal to or lower than a preset voltage, or a preset voltage A power failure / recovery detection circuit for detecting the “recovery” state recovered as described above, and a masking signal for masking a reset signal for resetting the control device for a predetermined period after the “power failure” state, A power recovery monitoring circuit that generates a power recovery interrupt signal when a power recovery occurs within the masking period; otherwise, a power recovery determination circuit that generates a power recovery reset signal. The power failure signal and the power recovery signal are received from the circuit, the power failure interrupt signal and the power recovery interrupt signal are notified to the CPU, and the masking period is Longer than the maximum time for transferring the data in the nonvolatile memory to the nonvolatile memory, and the battery has a capacity that can guarantee the power supply during the masking period, and the CPU is notified of a power failure interrupt signal from the interrupt controller. When the CPU is notified of the power recovery interrupt signal, the CPU starts the memory transfer process of storing the data of the volatile memory immediately before the power failure in the nonvolatile memory. The memory transfer process is stopped, and the process is resumed from the program immediately after receiving the power failure interrupt signal. When the CPU is notified of the power reset signal, the stored contents of the nonvolatile memory are volatile. Stored in the volatile memory, the initialization process of the control device is executed, and the “power failure” for the “power recovery” during the masking period. Processing is resumed from the program immediately after receiving the insertion signal.
上記目的を達成するために、本発明による制御システムの起動方法は、停電を検出して、揮発性メモリに記憶するデータを不揮発性メモリに記憶する機能を備える制御システムの起動方法であって、前記制御装置は、前記供給電源が停止した場合、前記揮発性メモリのデータを前記不揮発性メモリに転送する最大時間より長く供給が可能な容量を備えるバッテリを含み、前記供給電源が「停電」となったことを検出して、当該バッテリに切り替える電源部を備え、前記供給電源の「停電」で、停電直前の前記揮発性メモリのデータを前記不揮発性メモリに記憶するメモリ転送処理を開始するステップと、前記「停電」後、前記バッテリから電源供給が保証されている期間を前記制御システムのリセットを中止するマスキング期間とし、当該マスキング期間内に前記供給電源が「復電」した場合、前記メモリ転送処理を実行中であれば、当該メモリ転送処理を中止して、前記「停電」直後のプログラムから処理を継続再開するステップと、前記「復電」の発生が当該マスキング期間後に発生した場合、前記不揮発性メモリの記憶内容を前記揮発性メモリに記憶して、当該制御装置の初期化処理を実行するステップとから成り、前記マスキング期間中の「復電」に対して、前記停電割り込み信号を受信直後のプログラムから処理を継続再開するようにしたことを特徴とする。 In order to achieve the above object, a method for starting a control system according to the present invention is a method for starting a control system having a function of detecting a power failure and storing data stored in a volatile memory in a nonvolatile memory, The control device includes a battery having a capacity that can be supplied for longer than a maximum time for transferring data of the volatile memory to the nonvolatile memory when the power supply is stopped, and the power supply is “power failure”. A step of starting a memory transfer process for storing the data of the volatile memory immediately before the power failure in the non-volatile memory at a power failure of the supply power source, comprising a power supply unit that detects the occurrence of the failure and switching to the battery And after the “power failure”, the period during which power supply from the battery is guaranteed is defined as a masking period during which the reset of the control system is stopped, If the power supply is “recovered” within the king period, and if the memory transfer process is being executed, the memory transfer process is stopped, and the process continues from the program immediately after the “power failure”. , When the occurrence of the “recovery” occurs after the masking period, the storage content of the nonvolatile memory is stored in the volatile memory, and the initialization process of the control device is executed, In response to “power recovery” during the masking period, the processing is resumed from the program immediately after receiving the power interruption interrupt signal.
本発明によれば、バッテリの保証時間内で、揮発性メモリのデータが保証されている期間に復電した場合に、停電前の実行中のプログラムの実行を復電後直ちに継続再開できるようにした制御装置、制御システム、及びその起動方法を提供することができる。 According to the present invention, when power is restored during a period when the data of the volatile memory is guaranteed within the guaranteed time of the battery, the execution of the program being executed before the power failure can be resumed immediately after the power is restored. The control device, the control system, and the starting method thereof can be provided.
以下、本発明の実施例について図面を参照して説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図1は、本発明の制御システムの構成図である。この制御システムは、通常、停電の割り込みで揮発性メモリに記憶するデータを不揮発性メモリに記憶して、CPU自身の動作を停止し、復電時には当該不揮発性メモリに予め記憶されたプログラム及びデータを揮発性メモリに記憶してからプログラムの実行を再開する制御装置10を使用して被制御対象20を制御する。
FIG. 1 is a configuration diagram of a control system of the present invention. This control system normally stores data stored in the volatile memory in the interruption of power failure in the nonvolatile memory, stops the operation of the CPU itself, and stores the program and data stored in advance in the nonvolatile memory when power is restored. Is controlled in the volatile memory, and the controlled
図1において、制御装置10は、実行中のプログラム及びデータを記憶する揮発性メモリ2と、揮発性メモリ2に記憶したプログラムに基づいて処理を実行するCPU3と、揮発性メモリ2と同一の前記プログラムを記憶し、CPU3の指令でプログラム及びデータを更新する不揮発性メモリ1と、CPU3に対する割り込み信号を生成する割り込みコントローラ6と、入出力データを授受する入出力インタフェース部7と、制御装置10の外部から供給される供給電源の状態を監視・制御する電源監視回路5と、各部に電源を供給するバッテリ4bを含み、供給電源が「停電」となったことを検出して、当該バッテリ4bに切り替える電源部4とを備える。
In FIG. 1, the
また、制御装置10内の不揮発性メモリ1、揮発性メモリ2、割り込みコントローラ6、及び入出力インタフェース部7は、夫々CPUバス9に接続され、制御装置10内の各部は電源バス8に接続され、電源部4から夫々配電される。
Further, the nonvolatile memory 1, the
尚、本制御システムには、図1に図示しない、インタフェースを介して制御装置10に接続し、被制御対象20の制御状態を監視するモニタ装置、及び入出力インタフェース部7を介して被制御対象20であるプロセスの状態を検知するセンサ、及び制御アクチュエータも含まれる。
The control system is connected to the
また、入出力インタフェース部7には、ネットワーク等に接続される通信機能を備える場合もある。
Further, the input /
また、制御システムは、その規模により複数の制御装置10で制御される構成も含まれる。
The control system includes a configuration controlled by a plurality of
さらに、電源部4は、制御装置10内の各部に電源を供給する電源回路4aと、この電源回路4aへの供給電源が停止した時に、予め定める期間について電源を供給するバッテリ4bと、供給電源の停止状態で電源回路4aからバッテリ4bに切り替えるスイッチ4cとを備える。
Furthermore, the
次に、供給電源の状態を監視し、復電タイミングによって実行中のプログラムの起動を制御する電源監視回路5の詳細構成について、図2(a)を参照して説明する。
Next, a detailed configuration of the power
電源監視回路5は、前記電源部4の受電状態が予め設定された電圧以下になった「停電」状態、または、予め設定した電圧以上に回復した「復電」状態を検出する停電・復電検知回路5aと、「停電」状態後の所定期間、この制御装置10をリセットするリセット信号をマスキングするマスキング信号を生成して、「復電」状態の発生が当該マスキング期間内に発生した場合「復電」割り込み信号とし、そうでない場合、復電リセット信号として生成する復電判別回路5bとを備える。
The power
復電判別回路5bは、図2(b)に示すように、停電・復電検知回路5aによって供給電源の「停電状態」の停電信号SPOFFをトリガーとして一定の期間のパルス幅Tを備えるマスキング信号SMを生成するタイマ5b1と、「復電」状態の復電信号SPONがマスキング信号SMのパルス幅が存在する期間T内に発生したことを検知する、マスキング信号SMと停電信号SPONとのアンドゲート回路5b2と、マスキング信号SMのパルス幅が存在する期間T後に発生したことを検知するマスキング信号SMのインバータ回路5b3、及びマスキング信号SMとそのインバータ回路5b3の出力とのアンドゲート回路5b4とを備える。 As shown in FIG. 2 (b), the power recovery discrimination circuit 5b is masked with a pulse width T of a certain period triggered by the power failure signal SPOFF of the “power failure state” of the power supply by the power failure / recovery detection circuit 5a. a timer 5b1 for generating a signal S M, the power recovery signal S PON of "power recovery" state it is detected that occurs within the period T there is a pulse width of the masking signal S M, the masking signal S M and the power failure signal aND gate circuit 5b2 of the S PON, masking signal S masking signal S M of the inverter circuit 5b3 whose pulse width detecting that occurred after a period T in the presence of M, and the masking signal S M and the output of the inverter circuit 5b3 And an AND gate circuit 5b4.
アンドゲート5b4の出力信号は、復電がマスキングの期間T後に発生した、リセット信号、即ち、復電リセット信号として制御装置10の構成各部に通知され、CPU3は初期化処理(再起動処理)を実行する。
The output signal of the AND gate 5b4 is notified to each component of the
そして、割り込みコントローラ6は、電源監視回路5aから停電信号SPOFF、及び復電信号SPONを受信して、CPUバス9を介して、夫々に対応するCPU3に停電割り込み信号、及び復電割り込み信号を通知する。
Then, the interrupt
マスキングの期間Tは、停電時の揮発性メモリ2のデータを不揮発性メモリ1に転送する最大時間以上に長くし、且つ、バッテリ4bは当該マスキングの期間Tの電源が保証される容量としておく。
The masking period T is set longer than the maximum time for transferring the data in the
したがって、マスキングの期間T後は、CPU3は復電リセット信号待ち状態となる。
Therefore, after the masking period T, the
次にこのように構成された制御装置10の供給電源が停止した場合の動作について、図2(b)を参照して説明する。
Next, an operation when the power supply of the
電源監視回路5は、停電・復電検知回路5aで停電を検出したら、割り込みコントローラ6を及びCPUバス9を介して、停電割り込み信号をCPU3に通知する。
When the
CPU3は、停電割り込み信号を受信したら停電直前の揮発性メモリ2のデータを不揮発性メモリ1に記憶するメモリ転送処理を開始し、この転送が完了すれば、CPU3は電源部4に停止信号を送り、制御装置10はその動作を停止し、復電割り込み待ち状態となる。
When the
電源監視回路5は、その後、復電を検知したら、復電判別回路5bでその復電がマスキング信号の期間T内に発生したか否かを判別し、割り込みコントローラ6、及びCPUバス9を介して復電割り込み信号をCPU3に通知する。
Thereafter, when the
CPU3は、この期間T内で、且つ、揮発性メモリ2のデータを不揮発性メモリ1に記憶するメモリ転送処理中であれば、その処理を中止する(CASE1)。
If the
CPU3は、この期間T内の復電割り込み信号の場合、停電割り込み信号発生時時に揮発性メモリ1に記憶したプログラムに対して、その停電割り込み信号受信直後のプログラムから動作を継続再開する。
In the case of a power recovery interrupt signal within this period T, the
また、電源監視回路5は、復電判別回路5bでその復電がマスキング信号の期間T後に発生した場合には、復電リセット信号を生成し、制御装置10の各部にこの信号を通知する。
Further, when the power recovery occurs in the power recovery determination circuit 5b after the period T of the masking signal, the power monitoring circuit 5b generates a power recovery reset signal and notifies each part of the
CPU3は、この復電リセット信号を通知された場合(CASE3)には、不揮発性メモリ1のプログラム及びデータを揮発性メモリ2に記憶して、制御装置10の初期化処理を実行する。
When the power reset signal is notified (CASE 3), the
即ち、マスキングの期間Tを超える時間を経過した後の「復電」または、電源投入に対しては、初期化処理を実行し、マスキングの期間T内に発生した復電に対しては、メモリ転送処理を中断し、停電割り込み信号直後のプログラムからその実行を継続再開する。 That is, the initialization process is executed for “recovery” after a time exceeding the masking period T or the power is turned on, and the memory for the recovery that occurs within the masking period T is executed. Interrupts the transfer process and resumes execution from the program immediately after the power failure interrupt signal.
したがって、このような制御装置10を備えた制御システムは、停電毎にメモリ転送処理と再起動処理とを実行していた従来システムに比較して、秒単位での運転の継続再開が早くなるので、短時間の停電に対して制御を中断することなく継続実行できる効果がある。
Therefore, the control system provided with such a
尚、本発明は上述したような実施例に何ら限定されるものでなく、復電判別回路5bの処理機能は、停電・復電検知回路5aでの復電信号をCPU3で受信して、CPU3で停電・復電検知回路5aと同様の処理機能を実行するように構成することも可能で、本発明の趣旨を逸脱しない範囲で適宜変更することが可能である。
The present invention is not limited to the above-described embodiment. The processing function of the power recovery determination circuit 5b is such that the
1 不揮発性メモリ
2 揮発性メモリ
3 CPU
4 電源部
4a 電源回路
4b スイッチ
4c バッテリ
5 電源監視回路
5a 停電・復電検知回路
5b 復電判別回路
6 割り込みコントローラ
7 入出力インタフェース部
8 電源バス
9 CPUバス
10 制御装置
20 被制御対象
1
4 power supply unit 4a power supply circuit 4b switch 4c
Claims (3)
前記制御装置は、実行中のプログラム及びデータを記憶する揮発性メモリと、当該揮発性メモリに記憶したプログラムに基づいて処理を実行するCPUと、前記揮発性メモリと同一の前記プログラムを記憶し、前記CPUの指令で前記プログラム及びデータを更新する不揮発性メモリと、前記CPUに対する割り込み信号を生成する割り込みコントローラと、入出力データを授受する入出力インタフェース部と、当該制御装置の各部に電源を供給するバッテリを含み、前記供給電源が「停電」となったことを検出して、当該バッテリに切り替える電源部と、前記電源部に供給される供給電源の状態を監視・制御する電源監視回路と
を備え、
前記電源監視回路は、前記電源部の受電状態が予め設定された電圧以下になった「停電」状態、または、予め設定した電圧以上に回復した「復電」状態を検出する停電・復電検知回路と、前記「停電」状態後の所定期間、当該制御装置をリセットするリセット信号をマスキングするマスキング信号を生成して、前記「復電」状態の発生が当該マスキング期間内に発生した場合「復電」割り込み信号とし、そうでない場合、復電リセット信号として生成する復電判別回路とを備え、
前記割り込みコントローラは、前記電源監視回路から停電信号、及び復電信号を受信して、前記CPUに停電割り込み信号、及び復電割り込み信号を通知し、
前記マスキング期間は、停電時の前記揮発性メモリのデータを前記不揮発性メモリに転送する最大時間以上に長く、且つ、前記バッテリは当該マスキング期間の電源が保証可能な容量を備え、
前記CPUは、前記割り込みコントローラから停電割り込み信号を通知されたら、停電直前の前記揮発性メモリのデータを前記不揮発性メモリに記憶するメモリ転送処理を開始し、
前記CPUは、前記復電割り込み信号を通知されたら、前記メモリ転送処理中であれば、当該メモリ転送処理を中止し、前記停電割り込み信号を受信直後のプログラムから処理を継続再開し、
前記CPUは、前記復電リセット信号を通知された場合には、前記不揮発性メモリの記憶内容を前記揮発性メモリに記憶して、当該制御装置の初期化処理を実行し、
前記マスキング期間中の「復電」に対して、前記停電割り込み信号を受信直後のプログラムから処理を継続再開するようにしたことを特徴とする制御システム。 A control system having a function of detecting a power failure and storing data stored in a volatile memory in a nonvolatile memory,
The control device stores a program and data that are being executed, a CPU that executes processing based on the program stored in the volatile memory, and the program that is the same as the volatile memory, Power is supplied to each part of the control device, a non-volatile memory that updates the program and data in response to a command from the CPU, an interrupt controller that generates an interrupt signal for the CPU, an input / output interface unit that sends and receives input / output data A power supply unit that detects that the power supply is “power failure” and switches to the battery, and a power supply monitoring circuit that monitors and controls the state of the power supply supplied to the power supply unit. Prepared,
The power supply monitoring circuit detects a power outage / recovery detection that detects a “power outage” state in which the power receiving state of the power supply unit is equal to or lower than a preset voltage, or a “power recovery” state in which the power supply unit recovers to a preset voltage or higher. A masking signal for masking a reset signal for resetting the control device is generated for a predetermined period after the circuit and the “power failure” state. When the occurrence of the “recovery” state occurs within the masking period, A power recovery interrupt signal, and if not, a power recovery determination circuit that generates a power recovery reset signal,
The interrupt controller receives a power failure signal and a power recovery signal from the power monitoring circuit, and notifies the CPU of a power failure interrupt signal and a power recovery interrupt signal,
The masking period is longer than a maximum time for transferring data of the volatile memory at the time of a power failure to the nonvolatile memory, and the battery has a capacity that can guarantee the power supply of the masking period,
When the CPU is notified of a power failure interrupt signal from the interrupt controller, the CPU starts memory transfer processing for storing the data in the volatile memory immediately before the power failure in the nonvolatile memory,
When the CPU is notified of the power recovery interrupt signal, if the memory transfer process is in progress, the CPU stops the memory transfer process and resumes the process from the program immediately after receiving the power failure interrupt signal,
When the CPU is notified of the power reset signal, the storage content of the nonvolatile memory is stored in the volatile memory, and an initialization process of the control device is executed.
A control system characterized in that, for “power recovery” during the masking period, processing is resumed from the program immediately after receiving the power failure interrupt signal.
前記制御装置は、実行中のプログラム及びデータを記憶する揮発性メモリと、当該揮発性メモリに記憶したプログラムに基づいて処理を実行するCPUと、前記揮発性メモリと同一の前記プログラムを記憶し、前記CPUの指令で前記プログラム及びデータを更新する不揮発性メモリと、前記CPUに対する割り込み信号を生成する割り込みコントローラと、入出力データを授受する入出力インタフェース部と、当該制御装置の各部に電源を供給するバッテリを含み、前記供給電源が「停電」となったことを検出して、当該バッテリに切り替える電源部と、前記電源部に供給される供給電源の状態を監視・制御する電源監視回路と
を備え、
前記電源監視回路は、前記電源部の受電状態が予め設定された電圧以下になった「停電」状態、または、予め設定した電圧以上に回復した「復電」状態を検出する停電・復電検知回路と、前記「停電」状態後の所定期間、当該制御装置をリセットするリセット信号をマスキングするマスキング信号を生成して、前記「復電」状態の発生が当該マスキング期間内に発生した場合「復電」割り込み信号とし、そうでない場合、復電リセット信号として生成する復電判別回路とを備え、
前記割り込みコントローラは、前記電源監視回路から停電信号、及び復電信号を受信して、前記CPUに停電割り込み信号、及び復電割り込み信号を通知し、
前記マスキング期間は、停電時の前記揮発性メモリのデータを前記不揮発性メモリに転送する最大時間以上に長く、且つ、前記バッテリは当該マスキング期間の電源が保証可能な容量を備え、
前記CPUは、前記割り込みコントローラから停電割り込み信号を通知されたら、停電直前の前記揮発性メモリのデータを前記不揮発性メモリに記憶するメモリ転送処理を開始し、
前記CPUは、前記復電割り込み信号を通知されたら、前記メモリ転送処理中であれば、当該メモリ転送処理を中止し、前記停電割り込み信号を受信直後のプログラムから処理を継続再開し、
前記CPUは、前記復電リセット信号を通知された場合には、前記不揮発性メモリの記憶内容を前記揮発性メモリに記憶して、当該制御装置の初期化処理を実行し、
前記マスキング期間中の「復電」に対して、前記停電割り込み信号を受信直後のプログラムから処理を継続再開するようにしたことを特徴とする制御装置。 A control device having a function of detecting a power failure and storing data stored in a volatile memory in a nonvolatile memory,
The control device stores a program and data that are being executed, a CPU that executes processing based on the program stored in the volatile memory, and the program that is the same as the volatile memory, Power is supplied to each part of the control device, a non-volatile memory that updates the program and data in response to a command from the CPU, an interrupt controller that generates an interrupt signal for the CPU, an input / output interface unit that sends and receives input / output data A power supply unit that detects that the power supply is “power failure” and switches to the battery, and a power supply monitoring circuit that monitors and controls the state of the power supply supplied to the power supply unit. Prepared,
The power supply monitoring circuit detects a power outage / recovery detection that detects a “power outage” state in which the power receiving state of the power supply unit is equal to or lower than a preset voltage, or a “power recovery” state in which the power supply unit recovers to a preset voltage or higher. A masking signal for masking a reset signal for resetting the control device is generated for a predetermined period after the circuit and the “power failure” state. When the occurrence of the “recovery” state occurs within the masking period, A power recovery interrupt signal, and if not, a power recovery determination circuit that generates a power recovery reset signal,
The interrupt controller receives a power failure signal and a power recovery signal from the power monitoring circuit, and notifies the CPU of a power failure interrupt signal and a power recovery interrupt signal,
The masking period is longer than a maximum time for transferring data of the volatile memory at the time of a power failure to the nonvolatile memory, and the battery has a capacity that can guarantee the power supply of the masking period,
When the CPU is notified of a power failure interrupt signal from the interrupt controller, the CPU starts memory transfer processing for storing the data in the volatile memory immediately before the power failure in the nonvolatile memory,
When the CPU is notified of the power recovery interrupt signal, if the memory transfer process is in progress, the CPU stops the memory transfer process and resumes the process from the program immediately after receiving the power failure interrupt signal.
When the CPU is notified of the power reset signal, the storage content of the nonvolatile memory is stored in the volatile memory, and an initialization process of the control device is executed.
The control apparatus, wherein the process is resumed from the program immediately after receiving the power failure interrupt signal for the “power recovery” during the masking period.
前記制御装置は、前記供給電源が停止した場合、前記揮発性メモリのデータを前記不揮発性メモリに転送する最大時間より長く供給が可能な容量を備えるバッテリを含み、前記供給電源が「停電」となったことを検出して、当該バッテリに切り替える電源部を備え、
前記供給電源の「停電」で、停電直前の前記揮発性メモリのデータを前記不揮発性メモリに記憶するメモリ転送処理を開始するステップと、
前記「停電」後、前記バッテリから電源供給が保証されている期間を前記制御システムのリセットを中止するマスキング期間とし、当該マスキング期間内に前記供給電源が「復電」した場合、前記メモリ転送処理を実行中であれば、当該メモリ転送処理を中止して、前記「停電」直後のプログラムから処理を継続再開するステップと、
前記「復電」の発生が当該マスキング期間後に発生した場合、前記不揮発性メモリの記憶内容を前記揮発性メモリに記憶して、当該制御装置の初期化処理を実行するステップと
から成り、
前記マスキング期間中の「復電」に対して、前記停電割り込み信号を受信直後のプログラムから処理を継続再開するようにしたことを特徴とする制御システムの起動方法。 A method for starting a control system having a function of detecting a power failure and storing data stored in a volatile memory in a nonvolatile memory,
The control device includes a battery having a capacity that can be supplied for longer than a maximum time for transferring data of the volatile memory to the nonvolatile memory when the power supply is stopped, and the power supply is “power failure”. A power supply unit that detects that the battery has been switched to the battery,
Starting a memory transfer process of storing data in the volatile memory immediately before the power failure in the nonvolatile memory at the power failure of the power supply;
When the power supply from the battery is guaranteed after the “power failure” is set as a masking period during which the reset of the control system is stopped, and the power supply is “recovered” within the masking period, the memory transfer process If the process is being executed, the step of stopping the memory transfer process and continuing the process from the program immediately after the “power failure”,
When the occurrence of the “power recovery” occurs after the masking period, the storage content of the nonvolatile memory is stored in the volatile memory, and the initialization process of the control device is executed.
A method for starting a control system, characterized in that the processing is resumed from the program immediately after receiving the power failure interrupt signal for “recovery” during the masking period.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009245777A JP2011090642A (en) | 2009-10-26 | 2009-10-26 | Controller, control system and starting method for the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009245777A JP2011090642A (en) | 2009-10-26 | 2009-10-26 | Controller, control system and starting method for the same |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011090642A true JP2011090642A (en) | 2011-05-06 |
Family
ID=44108810
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009245777A Pending JP2011090642A (en) | 2009-10-26 | 2009-10-26 | Controller, control system and starting method for the same |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011090642A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100037073A1 (en) * | 2008-08-11 | 2010-02-11 | International Business Machines Corporation | Apparatus and Method for Selective Power Reduction of Memory Hardware |
JP2015215900A (en) * | 2014-05-12 | 2015-12-03 | エルエス産電株式会社Lsis Co., Ltd. | Electronic device equipped with memory data backup function |
WO2017077909A1 (en) * | 2015-11-02 | 2017-05-11 | 株式会社デンソー | On-vehicle device |
KR20210038834A (en) * | 2019-09-30 | 2021-04-08 | 타이완 세미콘덕터 매뉴팩쳐링 컴퍼니 리미티드 | Back-up and restoration of register data |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05143248A (en) * | 1991-11-18 | 1993-06-11 | Fujitsu Ltd | Data backup system for semiconductor disk device |
-
2009
- 2009-10-26 JP JP2009245777A patent/JP2011090642A/en active Pending
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH05143248A (en) * | 1991-11-18 | 1993-06-11 | Fujitsu Ltd | Data backup system for semiconductor disk device |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100037073A1 (en) * | 2008-08-11 | 2010-02-11 | International Business Machines Corporation | Apparatus and Method for Selective Power Reduction of Memory Hardware |
US8200999B2 (en) * | 2008-08-11 | 2012-06-12 | International Business Machines Corporation | Selective power reduction of memory hardware |
JP2015215900A (en) * | 2014-05-12 | 2015-12-03 | エルエス産電株式会社Lsis Co., Ltd. | Electronic device equipped with memory data backup function |
WO2017077909A1 (en) * | 2015-11-02 | 2017-05-11 | 株式会社デンソー | On-vehicle device |
KR20210038834A (en) * | 2019-09-30 | 2021-04-08 | 타이완 세미콘덕터 매뉴팩쳐링 컴퍼니 리미티드 | Back-up and restoration of register data |
US11295792B2 (en) | 2019-09-30 | 2022-04-05 | Taiwan Semiconductor Manufacturing Company, Ltd. | Back-up and restoration of register data |
KR102389534B1 (en) | 2019-09-30 | 2022-04-22 | 타이완 세미콘덕터 매뉴팩쳐링 컴퍼니 리미티드 | Back-up and restoration of register data |
US11636884B2 (en) | 2019-09-30 | 2023-04-25 | Taiwan Semiconductor Manufacturing Company, Ltd. | Back-up and restoration of register data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8683249B2 (en) | Switching a processor and memory to a power saving mode when waiting to access a second slower non-volatile memory on-demand | |
NL2007975C2 (en) | Information processing apparatus capable of appropriately executing shutdown processing, method of controlling the information processing apparatus, and storage medium. | |
JP2007299404A (en) | System which executes high-speed boot wake-up | |
US20080229158A1 (en) | Restoration device for bios stall failures and method and computer program product for the same | |
CN107885305B (en) | Control device, control method, and recording medium | |
US20190052355A1 (en) | Network switching system | |
JP2012058879A (en) | Operating system boot management device | |
JP2011090642A (en) | Controller, control system and starting method for the same | |
RU2388043C2 (en) | Smart card operating system and operation method thereof | |
JP5241450B2 (en) | Semiconductor device and abnormality detection method thereof | |
JP6148129B2 (en) | Information processing apparatus, firmware update method, and firmware update program | |
JP5445572B2 (en) | Computer system, standby power reduction method, and program | |
JP6074486B2 (en) | Image processing apparatus, control method thereof, and program | |
JP2007087269A (en) | Software update system, update method and program | |
US20200201409A1 (en) | Information processing apparatus and method of controlling information processing apparatus | |
JP5346964B2 (en) | Electronic equipment and system management program | |
JP2004145584A (en) | Disk array device | |
CN104572332A (en) | Method and device for processing system crash | |
JPH11175108A (en) | Duplex computer device | |
JP6835422B1 (en) | Information processing device and information processing method | |
JP2005107776A (en) | Duplicated controller system and method therefor | |
JP2980704B2 (en) | Programmable controller | |
JP3087650B2 (en) | Automatic power recovery method | |
JP2011008346A (en) | Semiconductor integrated circuit | |
JP2006276947A (en) | Power supply control device and power supply control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20111125 |
|
RD04 | Notification of resignation of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7424 Effective date: 20111205 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20120229 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20130717 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130726 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20131122 |