JP5915740B2 - Programmable controller and power-off countermeasure method - Google Patents

Programmable controller and power-off countermeasure method Download PDF

Info

Publication number
JP5915740B2
JP5915740B2 JP2014521052A JP2014521052A JP5915740B2 JP 5915740 B2 JP5915740 B2 JP 5915740B2 JP 2014521052 A JP2014521052 A JP 2014521052A JP 2014521052 A JP2014521052 A JP 2014521052A JP 5915740 B2 JP5915740 B2 JP 5915740B2
Authority
JP
Japan
Prior art keywords
memory
power
power supply
data
processor
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.)
Active
Application number
JP2014521052A
Other languages
Japanese (ja)
Other versions
JPWO2013186888A1 (en
Inventor
植田 基之
基之 植田
正 長谷川
正 長谷川
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.)
Fuji Electric Co Ltd
Original Assignee
Fuji Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Electric Co Ltd filed Critical Fuji Electric Co Ltd
Publication of JPWO2013186888A1 publication Critical patent/JPWO2013186888A1/en
Application granted granted Critical
Publication of JP5915740B2 publication Critical patent/JP5915740B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1441Resetting or repowering
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24137Non volatile memory to store program on power loss
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24139Recovery from power loss, failure

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • Programmable Controllers (AREA)
  • Testing And Monitoring For Control Systems (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Safety Devices In Control Systems (AREA)

Description

本発明は、被制御機器に対する制御処理をプログラミング可能なプログラマブルコントローラ、および、電源切断時における電源切断対処方法に関する。   The present invention relates to a programmable controller capable of programming control processing for a controlled device, and a method for dealing with power-off when power is turned off.

プログラマブルコントロールシステムでは、上位の管理装置に、1または複数のプログラマブルコントローラが接続され、プログラマブルコントローラが、それぞれ複数の被制御機器を制御する。したがって、プログラマブルコントローラは、上位の管理装置から制御指令を受けて、その制御指令を解析し、下位の被制御機器を制御するとともに、制御に要するパラメータやステータス情報を保持しなければならない。   In the programmable control system, one or more programmable controllers are connected to a higher-level management device, and each programmable controller controls a plurality of controlled devices. Therefore, the programmable controller must receive a control command from a higher-level management device, analyze the control command, control a lower-level controlled device, and hold parameters and status information required for control.

また、下位の被制御機器は動力を有する場合も多いので、プログラマブルコントローラにおいて被制御機器を適切に制御することで、プログラマブルコントロールシステム全体として、様々な制御動作を安全かつ確実に遂行しなければならない。例えば、プログラマブルコントロールシステムの稼働中にその電源が切断されたとしても、プログラマブルコントローラは、切断された時点の動作状態を示すデータを確実にバックアップし、安全に被制御機器を停止させなければならない。また、電源が再投入されると、プログラマブルコントローラは、バックアップされたデータを再配置し、速やかに元の動作状態に復帰させるべきである。   In addition, since the lower-level controlled devices often have power, the programmable control system as a whole must perform various control operations safely and reliably by appropriately controlling the controlled devices in the programmable controller. . For example, even if the power is turned off during the operation of the programmable control system, the programmable controller must reliably back up data indicating the operating state at the time of the disconnection and stop the controlled device safely. Also, when the power is turned on again, the programmable controller should relocate the backed up data and quickly return to the original operating state.

そこで、電源の切断を検知すると、プロセッサ(CPU)が、SRAMに蓄積されている一部のデータをフラッシュメモリにバックアップする技術が知られている(例えば、特許文献1)。また、そのような電源の切断を、電源電圧に基づいて検出し、バックアップ処理のための十分な処理可能期間を確保する技術も開示されている(例えば、特許文献2)。   Therefore, a technique is known in which when a power-off is detected, a processor (CPU) backs up some data stored in an SRAM to a flash memory (for example, Patent Document 1). Also disclosed is a technique for detecting such a power cut based on a power supply voltage and ensuring a sufficient processable period for backup processing (for example, Patent Document 2).

特開2000−305610号公報JP 2000-305610 A 特開2009−193371号公報JP 2009-193371 A

しかし、上述した特許文献1および2の技術では、プロセッサが、自己のプログラムを通じて、バックアップに関する全ての処理を実行する。したがって、プロセッサは、バックアップ対象である情報を格納した被バックアップメモリから、その情報を一旦読み出し、タイミングを異にして、バックアップ先のバックアップメモリに情報を書き込む。   However, in the techniques of Patent Documents 1 and 2 described above, the processor executes all processes related to backup through its own program. Therefore, the processor once reads the information from the backup target memory storing the information to be backed up, and writes the information in the backup destination backup memory at different timings.

そうすると、バックアップに用いることができる多くの電力と時間を、消費電力の大きいプロセッサが、データの読み出しや書き込みのために費やしてしまう。そのため、バックアップが必要なデータを確実にバックアップするために、バックアップの電力源であるコンデンサの容量を増大しなければならず、占有面積やコスト面で問題が生じることとなる。   Then, a large amount of power and time that can be used for backup is consumed by a processor with high power consumption for reading and writing data. Therefore, in order to reliably back up data that needs to be backed up, the capacity of the capacitor, which is a power source for backup, must be increased, which causes problems in terms of occupied area and cost.

そこで、本発明は、このような課題に鑑み、バックアップ処理の手順を工夫し、コンデンサの容量の不要な増大化を回避可能なプログラマブルコントローラおよび電源切断対処方法を提供することを目的としている。   Therefore, in view of such a problem, an object of the present invention is to devise a backup processing procedure and provide a programmable controller and a power-off countermeasure method that can avoid an unnecessary increase in the capacitance of a capacitor.

上記課題を解決するために、本発明のプログラマブルコントローラは、共通バスを通じて制御可能な被バックアップメモリと、共通バスを通じて制御可能なバックアップメモリと、共通バスに接続され、制御プログラムに基づいて動作するプロセッサと、プロセッサのみがアクセス可能な専用メモリと、被バックアップメモリおよびバックアップメモリに共通バスを通じて接続されたアクセス素子と、電源電圧が、予め定められた第1閾値未満となったことを検出する電力検出部と、を備え、アクセス素子は、電源電圧が第1閾値未満となり、プロセッサが、専用メモリのデータをバックアップメモリに退避させた後、プロセッサの動作モードを、通常モードより消費電力の少ない省電力モードに移行させ、被バックアップメモリのデータをバックアップメモリに退避させる。 In order to solve the above problems, a programmable controller according to the present invention includes a backed up memory that can be controlled through a common bus, a backup memory that can be controlled through a common bus, and a processor that is connected to the common bus and operates based on a control program. And a dedicated memory accessible only by the processor, an access element connected to the backup target memory and the backup memory through a common bus, and power detection for detecting that the power supply voltage is less than a predetermined first threshold value. comprising a part, an access device, Ri is the power supply voltage Do less than the first threshold value, the processor, after saving the data in the dedicated memory in the backup memory, the processor operating mode, less power consumption than the normal mode is shifted to the power saving mode, the data of the backup memory Tsu Ru is retracted to click up memory.

アクセス素子の消費電力は、プロセッサの消費電力より少ない。   The power consumption of the access element is less than the power consumption of the processor.

電源からの電力供給ラインに、逆流防止用ダイオードおよびスイッチを介して接続された、電力を蓄積するコンデンサをさらに備え、電力検出部は、電源電圧が第1閾値未満になったことに加え、第1閾値より小さい第2閾値未満になったことを検出し、スイッチは、電源電圧が第2閾値以上である間、コンデンサとプロセッサおよびアクセス素子を含む主回路とを非接続に維持し、電源電圧が第2閾値未満となると、コンデンサと主回路とを接続してもよい。 The power supply line further includes a capacitor for accumulating power connected to the power supply line from the power source via a backflow prevention diode and a switch, and the power detection unit includes the first power supply voltage being less than the first threshold value. The switch detects that the second threshold value is less than the second threshold value, and the switch maintains the capacitor and the main circuit including the processor and the access element in a disconnected state while the power supply voltage is equal to or higher than the second threshold value. When the voltage is less than the second threshold, the capacitor and the main circuit may be connected.

電源からの電力供給ラインにスイッチを介して接続された、電力を蓄積するコンデンサをさらに備え、電力検出部は、電源電圧が第1閾値未満になったことに加え、第1閾値より小さい第2閾値未満になったことを検出し、スイッチは、電源電圧が第1閾値未満かつ第2閾値以上である間、コンデンサとプロセッサおよびアクセス素子を含む主回路とを非接続に維持し、電源電圧が第1閾値以上または第2閾値未満である間、コンデンサと主回路とを接続してもよい。 The power storage unit further includes a capacitor for storing electric power connected to a power supply line from the power source via a switch, and the power detection unit has a second lower than the first threshold in addition to the power source voltage being lower than the first threshold. The switch detects that the threshold value has become less than the threshold value, and the switch maintains the capacitor and the main circuit including the processor and the access element in a disconnected state while the power supply voltage is less than the first threshold value and greater than or equal to the second threshold value. May be connected to the main circuit while is equal to or higher than the first threshold value or lower than the second threshold value.

アクセス素子は、被バックアップメモリのデータの読み出しを行い、データが共通バスに出力されている間に、データをバックアップメモリに書き込んでもよい。The access element may read data from the backup target memory and write the data to the backup memory while the data is being output to the common bus.

上記課題を解決するために、本発明の電源切断対処方法は、共通バスを通じて制御可能な被バックアップメモリと、共通バスを通じて制御可能なバックアップメモリと、共通バスに接続され、制御プログラムに基づいて動作するプロセッサと、プロセッサのみがアクセス可能な専用メモリと、被バックアップメモリおよびバックアップメモリに共通バスを通じて接続されたアクセス素子と、電源電圧が、予め定められた第1閾値未満となったことを検出する電力検出部とを備えるプログラマブルコントローラにおいて、プロセッサは、電源電圧が第1閾値未満となると、専用メモリのデータをバックアップメモリに退避させ、アクセス素子は、電源電圧が第1閾値未満となり、プロセッサが、専用メモリのデータをバックアップメモリに退避させた後、プロセッサの動作モードを、通常モードより消費電力の少ない省電力モードに移行させ、被バックアップメモリからデータを読み出し、バックアップメモリにデータを書き込むことを特徴とする。 In order to solve the above-described problem, a power-off countermeasure method according to the present invention is connected to a backup memory that can be controlled through a common bus, a backup memory that can be controlled through a common bus, and operates based on a control program. , A dedicated memory accessible only by the processor, an access element connected to the backed up memory and the backup memory through a common bus, and detecting that the power supply voltage is less than a predetermined first threshold value in the programmable controller and a power detector, the processor, when the power supply voltage becomes less than the first threshold value, is saved in the backup memory data-only memory, access device, Ri is the power supply voltage Do less than the first threshold value, the processor However, save the data in the dedicated memory to the backup memory After the operation mode of the processor to transition to the normal low power saving mode power consumption than the mode, it reads data from the backup memory, and writes the data in the backup memory.

アクセス素子は、被バックアップメモリのデータの読み出しを行い、データが共通バスに出力されている間に、データをバックアップメモリに書き込んでもよい。   The access element may read data from the backup target memory and write the data to the backup memory while the data is being output to the common bus.

本発明によれば、バックアップ処理の手順を工夫し、コンデンサの容量の不要な増大化を回避することが可能となる。   According to the present invention, it is possible to devise a backup processing procedure and avoid an unnecessary increase in the capacitance of the capacitor.

プログラマブルコントロールシステムを構成する各装置の概略的な関係を示した説明図である。It is explanatory drawing which showed the schematic relationship of each apparatus which comprises a programmable control system. プログラマブルコントローラの概略的な構成を示したブロック図である。It is the block diagram which showed the schematic structure of the programmable controller. 電源の切断時における電力の推移を示した説明図である。It is explanatory drawing which showed transition of the electric power at the time of the cutting | disconnection of a power supply. プログラマブルコントローラの主回路の概略的な構成を示すブロック図である。It is a block diagram which shows the schematic structure of the main circuit of a programmable controller. 電源切断対処方法の処理の流れを示したフローチャートである。It is the flowchart which showed the flow of the process of the power-off countermeasure method. データ転送の詳細なタイミングを示したタイミングチャートである。5 is a timing chart showing detailed timing of data transfer.

以下に添付図面を参照しながら、本発明の好適な実施形態について詳細に説明する。かかる実施形態に示す寸法、材料、その他具体的な数値などは、発明の理解を容易とするための例示にすぎず、特に断る場合を除き、本発明を限定するものではない。なお、本明細書及び図面において、実質的に同一の機能、構成を有する要素については、同一の符号を付することにより重複説明を省略し、また本発明に直接関係のない要素は図示を省略する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The dimensions, materials, and other specific numerical values shown in the embodiment are merely examples for facilitating understanding of the invention, and do not limit the present invention unless otherwise specified. In the present specification and drawings, elements having substantially the same function and configuration are denoted by the same reference numerals, and redundant description is omitted, and elements not directly related to the present invention are not illustrated. To do.

(プログラマブルコントロールシステム100)
図1は、プログラマブルコントロールシステム100を構成する各装置の概略的な関係を示した説明図である。プログラマブルコントロールシステム100は、管理装置110と、1または複数のプログラマブルコントローラ120と、1または複数の被制御機器130とを含んで構成される。また、管理装置110と1または複数のプログラマブルコントローラ120とは、例えば、ギガ(G)ベース等のEthernet(登録商標)によるネットワーク配線140によって接続される。プログラマブルコントローラ120と1または複数の被制御機器130とは、例えば、専用の接続配線142を通じて接続されている。
(Programmable control system 100)
FIG. 1 is an explanatory diagram showing a schematic relationship between devices constituting the programmable control system 100. The programmable control system 100 includes a management device 110, one or more programmable controllers 120, and one or more controlled devices 130. Further, the management device 110 and the one or more programmable controllers 120 are connected by a network wiring 140 based on Ethernet (registered trademark) such as a Giga (G) base, for example. The programmable controller 120 and the one or more controlled devices 130 are connected through, for example, a dedicated connection wiring 142.

管理装置110は、1または複数のプログラマブルコントローラ120からステータス情報を読み出し、プログラマブルコントロールシステム100全体における工程の流れに沿うように、1または複数のプログラマブルコントローラ120に各種制御指令を出力する。   The management device 110 reads status information from the one or more programmable controllers 120 and outputs various control commands to the one or more programmable controllers 120 so as to follow the process flow in the entire programmable control system 100.

プログラマブルコントローラ120は、電源モジュール、CPUモジュール、入出力モジュール、通信モジュール等の複数のモジュールからなり、PLC(Programmable Logic Controller)とも呼ばれる。例えば、CPUモジュールは、ラダー図等を通じて生成されたシーケンス制御のための制御プログラムを有し、管理装置110から制御指令と、入出力モジュールを通じて入力された被制御機器130のセンサ検出結果とに基づいて被制御機器130を制御する。   The programmable controller 120 includes a plurality of modules such as a power supply module, a CPU module, an input / output module, and a communication module, and is also called a PLC (Programmable Logic Controller). For example, the CPU module has a control program for sequence control generated through a ladder diagram or the like, and is based on a control command from the management apparatus 110 and a sensor detection result of the controlled device 130 input through the input / output module. To control the controlled device 130.

被制御機器130は、FA(Factory Automation)における様々な状態を検知するセンサ、そのセンサの検知結果に応じて動作する電動機、エンコーダ等の電気機器で構成される。   The controlled device 130 includes a sensor that detects various states in FA (Factory Automation), and an electric device such as an electric motor and an encoder that operate according to the detection result of the sensor.

このようなプログラマブルコントロールシステム100は、様々な制御対象に適用できる。例えば、生産実行システム(MES:Manufacturing Execution System)にプログラマブルコントロールシステム100を適用した場合、被制御機器130としての、センタシーラユニット(Center Sealer Unit)やフィルムユニット(Film Unit)等の生産機器にプログラマブルコントローラ120を接続する。   Such a programmable control system 100 can be applied to various control objects. For example, when the programmable control system 100 is applied to a production execution system (MES), it is programmable to a production device such as a center sealer unit or a film unit as a controlled device 130. The controller 120 is connected.

プログラマブルコントローラ120は、入出力モジュール等から生産機器の動作状態を読み出し、モータドライバ等を通じて生産機器内の電動機を回転制御する。管理装置110は、各プログラマブルコントローラ120単位の情報の収集および制御指令の送信を実行する。こうして、プログラマブルコントロールシステム100全体として、工程管理、品質管理、製造量管理等の生産支援管理を総合的に行うことが可能となる。   The programmable controller 120 reads the operation state of the production device from the input / output module and the like, and controls the rotation of the electric motor in the production device through a motor driver or the like. The management device 110 collects information for each programmable controller 120 and transmits a control command. In this way, the production control management such as process management, quality management, and production amount management can be comprehensively performed as the entire programmable control system 100.

以下、プログラマブルコントローラ120の具体的な動作について、電源が切断された場合の電力供給と、バックアップ処理とに分けて説明する。   Hereinafter, specific operations of the programmable controller 120 will be described separately for power supply when the power is turned off and backup processing.

(電源が切断された場合の電力供給)
プログラマブルコントローラ120は、上位の管理装置110および下位の被制御機器130にそれぞれ接続され、上位の管理装置110からの制御指令に関するパラメータやステータス情報、および、下位の被制御機器130の制御のためのパラメータやステータス情報を、それぞれのメモリに保持している。
(Power supply when the power is cut off)
The programmable controller 120 is connected to the higher-level management device 110 and the lower-level controlled device 130, respectively, and controls parameters and status information regarding control commands from the higher-level management device 110, and controls the lower-level controlled device 130. Parameters and status information are stored in each memory.

このようなメモリは、動作状態に応じて書き換えを要する。すなわち、読み出し専用のメモリ(単なるROM)を適用できない。また、被制御機器130が動力を有する場合があり、その駆動制御の反応性を高めるため、メモリへのデータの読み書きが迅速に為される必要がある。したがって、メモリとして比較的高速であり揮発性のSRAMが用いられる場合が多い。   Such a memory needs to be rewritten according to the operating state. That is, a read-only memory (simple ROM) cannot be applied. In addition, the controlled device 130 may have power, and in order to increase the reactivity of the drive control, it is necessary to read / write data to / from the memory quickly. Therefore, a relatively high-speed and volatile SRAM is often used as the memory.

しかし、SRAM等の揮発性のRAMは、電源が切断されると、その記憶内容が消去されてしまい、電源を再投入したときにパラメータやステータス情報が意図していない値となることがある。すると、被制御機器130の安全かつ確実な制御動作に支障を来すおそれがある。そこで、プログラマブルコントローラ120では、電源の切断を検知すると、SRAM等の被バックアップメモリから、電源が切断されている間でもデータを維持することが可能なバックアップメモリに、パラメータやステータス情報を示す一部のデータを転送する。こうして、パラメータやステータス情報の維持を図る。そして、電源が再投入されると、プログラマブルコントローラ120は、バックアップされたデータを再配置し、速やかに元の動作状態に復帰させる。   However, in a volatile RAM such as SRAM, when the power is turned off, the stored contents are erased, and parameters and status information may become unintended values when the power is turned on again. Then, there is a possibility that the safe and reliable control operation of the controlled device 130 may be hindered. Therefore, when the programmable controller 120 detects power-off, a part of the parameter or status information is displayed in a backup memory that can maintain data even when the power is off from the backup memory such as SRAM. Transfer data. In this way, parameters and status information are maintained. When the power is turned on again, the programmable controller 120 rearranges the backed up data and quickly returns to the original operating state.

図2は、プログラマブルコントローラ120の概略的な構成を示したブロック図である。プログラマブルコントローラ120は、第1ダイオード150と、電圧変換部152と、主回路154と、コンデンサユニット156と、電力検出部158とを含んで構成される。   FIG. 2 is a block diagram illustrating a schematic configuration of the programmable controller 120. The programmable controller 120 includes a first diode 150, a voltage conversion unit 152, a main circuit 154, a capacitor unit 156, and a power detection unit 158.

第1ダイオード150は、アノード150aが電源148と接続され、カソード150bが電圧変換部152に接続され、コンデンサユニット156からの電力の逆流を防止する。電圧変換部152は、出力電圧を一定に安定化させるレギュレータ等で構成され、電源電圧V(例えば24V)を主回路154で利用可能な電圧V(例えば3.3V)に変換する。主回路154は、管理装置110および被制御機器130に接続され、プログラマブルコントローラ120の主たる制御が実行される。主回路154の具体的な構成は後ほど詳述する。In the first diode 150, the anode 150 a is connected to the power source 148, and the cathode 150 b is connected to the voltage conversion unit 152, thereby preventing the backflow of power from the capacitor unit 156. The voltage converter 152 is configured by a regulator or the like that stabilizes the output voltage to a constant level, and converts the power supply voltage V S (for example, 24 V) into a voltage V R (for example, 3.3 V) that can be used by the main circuit 154. The main circuit 154 is connected to the management device 110 and the controlled device 130, and the main control of the programmable controller 120 is executed. A specific configuration of the main circuit 154 will be described in detail later.

コンデンサユニット156は、主回路154の通常動作時において、電源148から電力の供給を受けて蓄電するとともに、電源148が切断されると、電源148の代わりに主回路154に電力を供給する。電力検出部158は、電源148が切断されたことを、例えば、電源電圧Vの低下を通じて検出し、主回路154に対してバックアップ契機となる割込信号を出力する。主回路154では、電力検出部158によって電源148の切断が検出されると、それに応じて、被バックアップメモリのデータをバックアップメモリに転送し、電力供給が途絶えることに対するバックアップ処理を行う。The capacitor unit 156 receives power from the power source 148 to store power during normal operation of the main circuit 154, and supplies power to the main circuit 154 instead of the power source 148 when the power source 148 is disconnected. The power detection unit 158 detects that the power supply 148 has been cut off, for example, through a decrease in the power supply voltage V S , and outputs an interrupt signal serving as a backup trigger to the main circuit 154. In the main circuit 154, when the power detection unit 158 detects the disconnection of the power source 148, the data in the memory to be backed up is transferred to the backup memory accordingly, and backup processing is performed to prevent the power supply from being interrupted.

このように、プログラマブルコントローラ120では、電源148からの電力の供給が途絶えそうになると、電源148の切断を早期に検出し、まだ電力の利用が可能な状態でデータを転送しなければならない。したがって、電力検出部158は、主回路154が動作不能となる前段階、すなわち、電源電圧Vが、定格よりは低いが主回路154が動作不能となる電源電圧より高い第1閾値V未満となったことをもって電源148が切断されることを検出し、主回路154にその旨伝達することとなる。Thus, in the programmable controller 120, when the supply of power from the power source 148 is likely to be interrupted, it is necessary to detect the disconnection of the power source 148 at an early stage and transfer data in a state where the power can still be used. Therefore, the power detection unit 158 is less than the first threshold V 1 before the main circuit 154 becomes inoperable, that is, the power supply voltage V S is lower than the rated value but higher than the power supply voltage at which the main circuit 154 becomes inoperable. Therefore, it is detected that the power source 148 is cut off, and this is transmitted to the main circuit 154.

一方、電源148が切断されたとしてもデータを転送する間の電力供給を確実に行うため、上述したコンデンサユニット156が設けられている。コンデンサユニット156としては、比較的容量の大きいコンデンサ156aが用いられ、従来では、第1ダイオード150から電圧変換部152に至る電力供給ライン160にコンデンサ156aの一端部を直接接続していた。しかし、コンデンサ156aを電力供給ライン160に直接接続するだけでは、以下のように、電力の有効利用が図られない場合がある。   On the other hand, the above-described capacitor unit 156 is provided in order to reliably supply power during data transfer even when the power source 148 is cut off. As the capacitor unit 156, a capacitor 156a having a relatively large capacity is used. Conventionally, one end of the capacitor 156a is directly connected to the power supply line 160 extending from the first diode 150 to the voltage converter 152. However, if the capacitor 156a is simply connected directly to the power supply line 160, the effective use of the power may not be achieved as described below.

図3は、電源148の切断時における電力の推移を示した説明図である。仮に、従来同様、電力供給ライン160にコンデンサ156aを直接接続したとすると、図3(a)に示すように電圧が推移する。すなわち、電源148が切断され、電源電圧Vが降下しだすと、コンデンサ156aに蓄積された電荷に基づく電力が主回路154に供給され始め、コンデンサ156aより電圧が低くなる電源148からは主回路154に電力が供給されなくなる。したがって、コンデンサ156aの電圧Vは、コンデンサ156aの電荷に基づく電力の消費に伴い下降し、電源電圧Vが第1閾値V未満となってから時間t経過後に、主回路154が動作不能となる電圧より高い第2閾値V 達することとなる。

FIG. 3 is an explanatory diagram showing the transition of power when the power source 148 is turned off. If the capacitor 156a is directly connected to the power supply line 160 as in the conventional case, the voltage changes as shown in FIG. That is, the power supply 148 is disconnected, the power supply when the voltage V S starts to drop, the power based on the charge stored in the capacitor 156a begins to be supplied to the main circuit 154, the main circuit 154 from the power source 148 voltage is lower than the capacitor 156a Will not be supplied with power. Therefore, the voltage V C of the capacitor 156a decreases with the consumption of power based on the charge of the capacitor 156a, and the main circuit 154 operates after the elapse of time t 1 after the power supply voltage V S becomes less than the first threshold value V 1. inability to become so that the voltage reaches the higher second threshold value V 2.

図3(a)においては、電源148が切断された以後、コンデンサ156aの電圧Vが電源電圧Vより高い状態が継続するので、電源電圧Vが降下し始めた後は、主回路154が電源148から電力の供給を受けることはない。すなわち、図3(a)においてハッチングで示した、電源電圧Vに関する電圧降下時から第2閾値Vまでのエネルギーは、無駄に消費されてしまう。主回路154は、第2閾値Vに至るまで、コンデンサ156aからのみ電力の供給を受ける。In FIG. 3A, since the voltage V C of the capacitor 156a continues to be higher than the power supply voltage V S after the power supply 148 is cut off, the main circuit 154 starts after the power supply voltage V S starts to drop. Is not supplied with power from the power source 148. That is, the energy from the time of the voltage drop related to the power supply voltage V S to the second threshold V 2 shown by hatching in FIG. 3A is wasted. The main circuit 154, up to the second threshold value V 2, receives supply of power only from the capacitor 156a.

したがって、バックアップが必要なデータが増加した場合、バックアップメモリへの退避に要する時間が長時間化したり、それに伴って、バックアップ時の電力を確保するためのコンデンサ156aの容量を増大しなければならなかった。   Therefore, when the data that needs to be backed up increases, the time required for saving to the backup memory becomes longer, and accordingly, the capacity of the capacitor 156a for securing the power at the time of backup must be increased. It was.

そこで、本実施形態では、コンデンサユニット156の構成を工夫して、電力の供給態様を改善する。コンデンサユニット156は、図2の如く、逆流防止用の第2ダイオード(逆流防止用ダイオード)156bおよびON/OFFが可能なスイッチ156cを備え、コンデンサ156aは、第2ダイオード156bおよびスイッチ156cを介して電力供給ライン160に接続される。第2ダイオード156bは、電力供給ライン160からコンデンサ156aへの電力の流れを許容するので、通常時にはコンデンサ156aに電力が蓄積される。   Therefore, in this embodiment, the configuration of the capacitor unit 156 is devised to improve the power supply mode. As shown in FIG. 2, the capacitor unit 156 includes a second diode 156b for preventing backflow (backflow preventing diode) 156b and an ON / OFF switch 156c. The capacitor 156a is connected to the second diode 156b and the switch 156c. Connected to the power supply line 160. Since the second diode 156b allows a power flow from the power supply line 160 to the capacitor 156a, power is normally stored in the capacitor 156a.

そして、電力検出部158は、電源電圧Vが、第1閾値V(例えば19V)未満になったこと、および、第1閾値Vより小さい第2閾値V(例えば3.5V)未満になったことを検出し、それぞれ割込信号を出力する。ここでは、1の電力検出部158によって相異なる2つの電圧を検出しているが、検出電圧の異なる2つの電力検出部158を設けてそれぞれ割込信号を出力するとしてもよい。こうして電源電圧Vの降下を2段階に分けて検出することができる。Then, the power detection unit 158 indicates that the power supply voltage V S is less than the first threshold value V 1 (for example, 19 V) and less than the second threshold value V 2 (for example, 3.5 V) that is smaller than the first threshold value V 1 . Are detected, and an interrupt signal is output for each. Here, two different voltages are detected by one power detection unit 158, but two power detection units 158 having different detection voltages may be provided to output interrupt signals, respectively. Thus, the drop in the power supply voltage V S can be detected in two stages.

電源電圧Vが第1閾値V未満となると、電力検出部158は、主回路154に設けられた後述するアクセス素子に割込信号を出力し、主回路154におけるプロセッサの動作モードを、通常モードより消費電力の少ない省電力モードに移行させる。ここで、通常モードは、プログラマブルコントローラ120が想定される動作を実行しているモードである。省電力モードは、プログラマブルコントローラ120が本来の動作を停止しているが、少なくとも割込信号を受け付けることができる等の最低限の機能を果たしているモード(レジュームモード、待機モード)である。When the power supply voltage V S becomes less than the first threshold V 1 , the power detection unit 158 outputs an interrupt signal to an access element (described later) provided in the main circuit 154, and changes the operation mode of the processor in the main circuit 154 to normal. Transition to the power saving mode, which consumes less power than the mode. Here, the normal mode is a mode in which the programmable controller 120 is executing an assumed operation. The power saving mode is a mode (resume mode, standby mode) in which the programmable controller 120 stops its original operation but performs at least a minimum function such as accepting an interrupt signal.

また、電源電圧Vが第1閾値V未満となると、主回路154では、データのバックアップ処理が実行される。バックアップ処理については後ほど詳述する。電源電圧Vが第1閾値V未満となった直後では、コンデンサユニット156のスイッチ156cは、コンデンサ156aと電力供給ライン160とを非接続に設定されており、電源電圧Vが第2閾値V未満になるまで非接続の状態を維持する。Further, when the power supply voltage V S becomes less than the first threshold V 1 , the main circuit 154 performs data backup processing. The backup process will be described in detail later. Immediately after the power supply voltage V S becomes less than the first threshold value V 1, the switch 156c of the capacitor unit 156 is set to disconnect the capacitor 156a and the power supply line 160, and the power supply voltage V S is set to the second threshold value. to below V 2 to maintain the state of the disconnected.

したがって、コンデンサ156aと主回路154とがスイッチ156cによって接続されず、また、電源電圧Vよりコンデンサ156aの電圧Vの方が高いので、第2ダイオード156bによって、コンデンサ156aから電力供給ライン160へは電力が流れない。そうすると、主回路154には、電源148からの電力が供給され、図3(b)にハッチングで示した、電源電圧Vが第2閾値V未満となるまでのエネルギーが有効に利用されることとなる。Therefore, capacitor 156a and the main circuit 154 is not connected by a switch 156c, also, since the higher voltage V C of the capacitor 156a than the supply voltage V S, the second diode 156b, to the power supply line 160 from the capacitor 156a Does not flow power. Then, power from the power source 148 is supplied to the main circuit 154, and energy until the power source voltage V S becomes less than the second threshold value V 2 shown by hatching in FIG. It will be.

そして、電源電圧Vが第2閾値V未満となると、電力検出部158は、スイッチ156cに出力している状態信号(割込信号)を反転する(例えば、LowからHighに反転する)。スイッチ156cは、状態信号の反転に応じて、コンデンサ156aと主回路154との非接続状態を接続状態に切り換える。電源電圧Vが第2閾値V未満となると、最早、電源148から電力の供給を受けることはできない。しかし、そのタイミングで、コンデンサ156aと電力供給ライン160とを接続することで、主回路154は、電源148から電力の供給を受けた後に、コンデンサ156aの電荷に基づく電力の供給を受けることが可能となる。Then, when the power supply voltage V S becomes less than the second threshold V 2 , the power detection unit 158 inverts the state signal (interrupt signal) output to the switch 156c (for example, inversion from Low to High). The switch 156c switches the disconnected state between the capacitor 156a and the main circuit 154 to the connected state in accordance with the inversion of the state signal. When the power supply voltage V S becomes less than the second threshold value V 2 , power can no longer be received from the power supply 148. However, by connecting the capacitor 156a and the power supply line 160 at that timing, the main circuit 154 can receive power based on the charge of the capacitor 156a after receiving power from the power source 148. It becomes.

したがって、主回路154は、電源電圧Vが第2閾値V未満となるまで、電源148から電力の供給を受け、電源電圧Vが第2閾値V未満となった後、はじめてコンデンサ156aの電荷に基づく電力の供給を受ける。こうして、電源電圧Vが第2閾値V未満となるまでの間、電源148によるエネルギーを有効活用することができる。その結果、電源148およびコンデンサ156aのいずれからも電力供給を受けることができなくなるまで、すなわち、図3(a)で示した時間tに加え、電源148分の時間tを加えた時間がバックアップに許容される最大時間となる。Thus, the main circuit 154, after the power supply voltage V S is until the second less than the threshold V 2, supplied with electric power from a power source 148, the power supply voltage V S becomes smaller than the second threshold value V 2, the first capacitor 156a It is supplied with power based on the electric charge. Thus, energy from the power source 148 can be effectively used until the power source voltage V S becomes less than the second threshold value V 2 . As a result, a time obtained by adding a time t 2 for 148 minutes in addition to the time t 1 shown in FIG. 3A until it becomes impossible to receive power supply from either the power source 148 or the capacitor 156a. This is the maximum time allowed for backup.

電源電圧Vが第2閾値V未満となった後、コンデンサ156aの電圧Vは、電源電圧Vより高い。しかし、第1ダイオード150により、コンデンサ156aから電源148への電力の逆流は防止されるので、コンデンサ156aに蓄積された電力は主回路154のみで費やされることとなる。この間に主回路154では、バックアップ処理を完了し、プロセッサは、省電力モードへの移行を完了する。After the power supply voltage V S becomes less than the second threshold V 2 , the voltage V C of the capacitor 156a is higher than the power supply voltage V S. However, since the first diode 150 prevents the backflow of power from the capacitor 156a to the power source 148, the power stored in the capacitor 156a is consumed only by the main circuit 154. During this time, the main circuit 154 completes the backup process, and the processor completes the transition to the power saving mode.

以上、説明したように、本実施形態のコンデンサユニット156によって、バックアップに許容される最大時間を延長することができる。したがって、バックアップが必要なデータが増加した場合においても、コンデンサ156aの容量を増やすことなく安定かつ確実にバックアップが可能となる。また、バックアップが必要なデータの増加がない場合、逆に、コンデンサ156aの容量を小さく変更することができ、占有面積やコストの低減を図ることも可能となる。   As described above, the capacitor unit 156 of this embodiment can extend the maximum time allowed for backup. Therefore, even when the data that needs to be backed up increases, the backup can be performed stably and reliably without increasing the capacity of the capacitor 156a. On the other hand, when there is no increase in data that needs to be backed up, the capacity of the capacitor 156a can be changed to be small, and the occupied area and cost can be reduced.

(変形例)
上記では、コンデンサ156aは、第2ダイオード156bとスイッチ156cとを介して電力供給ライン160に接続されている例を挙げて説明したが、コンデンサ156aをスイッチ156cのみを介して電力供給ライン160に接続することもできる。
(Modification)
In the above description, the capacitor 156a is described as being connected to the power supply line 160 via the second diode 156b and the switch 156c. However, the capacitor 156a is connected to the power supply line 160 only via the switch 156c. You can also

この場合、スイッチ156cは、電源電圧Vが第1閾値V未満かつ第2閾値V以上である間、コンデンサ156aと電力供給ライン160とを非接続に維持する。また、スイッチ156cは、電源電圧Vが第1閾値V以上または第2閾値V未満である間、コンデンサ156aと電力供給ライン160とを接続する。In this case, the switch 156c keeps the capacitor 156a and the power supply line 160 disconnected while the power supply voltage V S is less than the first threshold V 1 and greater than or equal to the second threshold V 2 . The switch 156c connects the capacitor 156a and the power supply line 160 while the power supply voltage V S is equal to or higher than the first threshold V 1 or lower than the second threshold V 2 .

スイッチ156cのみの構成であっても、第2ダイオード156bを含む構成同様、図3(b)のような電圧推移を得ることができる。また、この構成では、第2ダイオード156bが不要になるばかりでなく、第2ダイオード156bによる電圧降下を無視することが可能となる。   Even in the configuration including only the switch 156c, the voltage transition as shown in FIG. 3B can be obtained as in the configuration including the second diode 156b. In this configuration, not only the second diode 156b is unnecessary, but also a voltage drop due to the second diode 156b can be ignored.

(バックアップ処理)
図4は、プログラマブルコントローラ120の主回路154の概略的な構成を示すブロック図である。主回路154は、プロセッサ170と、第1通信素子172と、第1メモリ(専用メモリ)174と、共通バス176と、アクセス素子178と、第2通信素子180と、第2メモリ(被バックアップメモリ)182と、第3メモリ(バックアップメモリ)184とを含んで構成される。
(Backup process)
FIG. 4 is a block diagram showing a schematic configuration of the main circuit 154 of the programmable controller 120. The main circuit 154 includes a processor 170, a first communication element 172, a first memory (dedicated memory) 174, a common bus 176, an access element 178, a second communication element 180, and a second memory (backed up memory). ) 182 and a third memory (backup memory) 184.

プロセッサ(マイコン)170は、中央処理装置(CPU)、プログラム等が格納されたROM等を含む半導体集積回路で構成され、バスマスタ機能を有する。そして、プロセッサ170は、主回路154全体を制御するとともに、ROMに格納されたシーケンス制御のための制御プログラムに基づいて1または複数の被制御機器130を制御する。   The processor (microcomputer) 170 is composed of a semiconductor integrated circuit including a central processing unit (CPU), a ROM storing programs, and the like, and has a bus master function. The processor 170 controls the entire main circuit 154 and controls one or more controlled devices 130 based on a control program for sequence control stored in the ROM.

第1通信素子172は、ギガ(G)ベース等のEthernet(登録商標)によるネットワーク配線140を通じて管理装置110や他のプログラマブルコントローラ120との通信を行う。第1メモリ174は、プロセッサ170と直接接続された(共通バス176を通じて接続されていない)揮発性のSDRAMであり、プロセッサ170のワークエリアとして機能する。第1メモリ174には、少なくとも、管理装置110や他のプログラマブルコントローラ120との通信における通信状態や異常履歴等のRAS(Reliability, Availability, Serviceability)情報を格納している。   The first communication element 172 communicates with the management device 110 and the other programmable controller 120 through the network wiring 140 by Ethernet (registered trademark) such as Giga (G) base. The first memory 174 is a volatile SDRAM that is directly connected to the processor 170 (not connected through the common bus 176), and functions as a work area of the processor 170. The first memory 174 stores at least RAS (Reliability, Availability, Serviceability) information such as a communication state and an abnormality history in communication with the management device 110 and other programmable controllers 120.

アクセス素子178は、共通バス176に接続された、例えば、PGA(Programmable Gate Array)またはASIC(Application Specific Integrated Circuit)等の集積回路で構成され、主回路154内の論理計算を担う。また、アクセス素子178は、バスマスタ機能を有し、第2メモリ182および第3メモリ184に共通バス176を通じてアクセスすることができる。   The access element 178 is configured by an integrated circuit such as a PGA (Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit) connected to the common bus 176, and performs logical calculation in the main circuit 154. The access element 178 has a bus master function and can access the second memory 182 and the third memory 184 through the common bus 176.

第2通信素子180は、専用の接続配線142を通じて被制御機器130との通信を行う。第2メモリ182は、共通バス176に接続された揮発性かつ比較的高速のSRAMである。第2メモリ182には、少なくとも、被制御機器130との通信における通信状態や異常履歴等のRAS情報や入出力モジュールを通じて取得した被制御機器130の動作状態を示す情報を格納している。   The second communication element 180 communicates with the controlled device 130 through the dedicated connection wiring 142. The second memory 182 is a volatile and relatively high speed SRAM connected to the common bus 176. The second memory 182 stores at least information indicating the operation state of the controlled device 130 acquired through the input / output module, such as RAS information such as a communication state and abnormality history in communication with the controlled device 130.

第3メモリ184は、共通バス176に接続された不揮発性のRAMである。第3メモリ184は、電源148が切断された場合に、第1メモリ174や第2メモリ182に格納されたデータの一部をバックアップするために用いられる。したがって、少なくとも、電源148が切断されている間、データを保持する機能を有している。ここでは、不揮発性のRAMを挙げているが、内蔵または外付けのコンデンサ等を用い、メモリの記憶内容を想定される時間保持可能な揮発性のRAMを用いることもできる。以下、主回路154の機能部によってバックアップを行う電源切断対処方法の流れを説明する。   The third memory 184 is a nonvolatile RAM connected to the common bus 176. The third memory 184 is used to back up part of the data stored in the first memory 174 and the second memory 182 when the power source 148 is cut off. Therefore, it has a function of holding data at least while the power source 148 is disconnected. Here, a non-volatile RAM is cited, but a volatile RAM that can hold the stored contents of the memory for an assumed time using a built-in or external capacitor or the like can also be used. Hereinafter, the flow of the power-off countermeasure method for performing backup by the functional unit of the main circuit 154 will be described.

(電源切断対処方法)
図5は、電源切断対処方法の処理の流れを示したフローチャートである。電力検出部158は、電源電圧Vが第1閾値V未満であるか否か監視し(S1)、電源電圧Vが第1閾値V以上の間(S1におけるNO)、監視処理を繰り返す。ここで、電源電圧Vが第1閾値V未満となると(S1におけるYES)、電力検出部158は、アクセス素子178に割込信号を送信する(S2)。
(Power-off countermeasures)
FIG. 5 is a flowchart showing a process flow of the power-off countermeasure method. The power detection unit 158 monitors whether or not the power supply voltage V S is less than the first threshold V 1 (S1), and performs the monitoring process while the power supply voltage V S is equal to or higher than the first threshold V 1 (NO in S1). repeat. Here, when the power supply voltage V S becomes less than the first threshold value V 1 (YES in S1), the power detection unit 158 transmits an interrupt signal to the access element 178 (S2).

アクセス素子178は、電力検出部158から電源電圧Vが第1閾値V未満となったことを受けると、その旨をプロセッサ170に伝達するとともに、プロセッサ170、アクセス素子178、第1メモリ174、第2メモリ182、および、第3メモリ184以外の素子を停止する(S3)。When the access element 178 receives the fact that the power supply voltage V S is less than the first threshold value V 1 from the power detection unit 158, the access element 178 transmits the fact to the processor 170, and the processor 170, the access element 178, and the first memory 174. Then, the elements other than the second memory 182 and the third memory 184 are stopped (S3).

プロセッサ170は、自己の制御プログラムに基づいて、第1メモリ174の情報をバックアップすべく、第1メモリ174に格納された、バックアップが必要なデータを第3メモリ184に転送し、転送が完了するとアクセス素子178に完了信号を伝達する(S4)。バックアップ処理の開始契機は第1閾値Vであり、主回路154では、第2閾値Vを意識する必要はない。Based on its own control program, the processor 170 transfers the data that needs to be backed up stored in the first memory 174 to the third memory 184 to back up the information in the first memory 174, and when the transfer is completed. A completion signal is transmitted to the access element 178 (S4). Start trigger the backup process is a first threshold value V 1, the main circuit 154 need not be aware of the second threshold value V 2.

また、プロセッサ170は、第2メモリ182内においてバックアップの対象となるデータのアドレスやサイズ、また、第3メモリ184に格納すべきアドレスについて、アクセス素子178に伝達し、アクセス素子178は、それらの情報を保持する(S5)。   Further, the processor 170 transmits the address and size of data to be backed up in the second memory 182 and the address to be stored in the third memory 184 to the access element 178, and the access element 178 Information is held (S5).

第1メモリ174から第3メモリ184へのデータの転送が完了すると(完了信号を受信すると)、アクセス素子178は、動作モードの変更信号を出力して、プロセッサ170の動作モードを、通常モードから省電力モードに移行させる(S6)。また、プロセッサ170を起動、停止可能な別途の監視装置が設けられている場合、アクセス素子178は、プロセッサ170を停止することもできる。そして、アクセス素子178は、第2メモリ182に格納された、バックアップが必要なデータを第3メモリ184に転送する(S7)。   When the transfer of data from the first memory 174 to the third memory 184 is completed (when a completion signal is received), the access element 178 outputs an operation mode change signal to change the operation mode of the processor 170 from the normal mode. The mode is shifted to the power saving mode (S6). Further, when a separate monitoring device capable of starting and stopping the processor 170 is provided, the access element 178 can also stop the processor 170. Then, the access element 178 transfers the data that needs to be backed up stored in the second memory 182 to the third memory 184 (S7).

このとき、アクセス素子178は、第2メモリ182および第3メモリ184に共通バス176を通じて接続されており、プロセッサ170と独立して第2メモリ182から第3メモリ184にデータを転送する。プロセッサ170と独立して転送とは、プロセッサ170から制御指令を受けたり、プロセッサ170に処理を委ねることなく、アクセス素子178のみの判断でデータを転送することである。   At this time, the access element 178 is connected to the second memory 182 and the third memory 184 through the common bus 176, and transfers data from the second memory 182 to the third memory 184 independently of the processor 170. The transfer independently of the processor 170 is to transfer data based on the judgment of only the access element 178 without receiving a control command from the processor 170 or leaving the processing to the processor 170.

アクセス素子(PGAやASIC)178は、論理回路やその動作タイミングを任意に設定することができる。したがって、第1閾値V未満となった旨の割込信号と、プロセッサ170からの完了信号とに基づいて論理回路を有効化し、第2メモリ182や第3メモリ184への制御信号を適切なタイミングで生成することができる。第2メモリ182や第3メモリ184への制御信号は後ほど詳述する。The access element (PGA or ASIC) 178 can arbitrarily set a logic circuit and its operation timing. Therefore, the logic circuit is validated based on the interrupt signal indicating that it is less than the first threshold value V 1 and the completion signal from the processor 170, and the control signal to the second memory 182 and the third memory 184 is appropriately set. It can be generated at the timing. Control signals to the second memory 182 and the third memory 184 will be described in detail later.

このように第1メモリ174に引き続き、第2メモリ182のデータも第3メモリ184に転送される。このとき、第2メモリ182から第3メモリ184へのデータ転送には、プロセッサ170が関与しておらず、プロセッサ170より消費電力の少ないアクセス素子178(ハードウェア)のみで実現しているので、プロセッサ170を迅速に省電力モードに移行することができる。したがって、従来のように、すべてのメモリのバックアップ処理にプロセッサ170が関与する場合と比較して、バックアップ処理に要する電力消費の低減を図ることが可能となる。   In this way, following the first memory 174, the data in the second memory 182 is also transferred to the third memory 184. At this time, the data transfer from the second memory 182 to the third memory 184 is realized by only the access element 178 (hardware) that does not involve the processor 170 and consumes less power than the processor 170. The processor 170 can be quickly shifted to the power saving mode. Therefore, as compared with the conventional case where the processor 170 is involved in the backup processing of all the memories, it is possible to reduce the power consumption required for the backup processing.

また、本実施形態において、アクセス素子178は、第2メモリ182から第3メモリ184へデータを転送する際、第2メモリ182のデータの読み出しを行い、データが共通バス176に出力されている間に、データを第3メモリ184に書き込む。   In this embodiment, the access element 178 reads data from the second memory 182 and transfers the data to the common bus 176 when transferring data from the second memory 182 to the third memory 184. Then, the data is written into the third memory 184.

図6は、データ転送の詳細なタイミングを示したタイミングチャートである。例えば、第2メモリ182の任意のアドレスAに格納されたデータBを、第3メモリ184に転送する例を挙げる。ここでは、第3メモリ184の記憶容量を第2メモリ182の記憶容量以上とし、第2メモリ182と第3メモリ184とのアドレス空間(メモリマップ)を等しくしている。   FIG. 6 is a timing chart showing the detailed timing of data transfer. For example, an example in which data B stored at an arbitrary address A in the second memory 182 is transferred to the third memory 184 will be described. Here, the storage capacity of the third memory 184 is set to be equal to or greater than the storage capacity of the second memory 182, and the address spaces (memory maps) of the second memory 182 and the third memory 184 are made equal.

アクセス素子178は、共通バス176のアドレス線にアドレスAを出力することで第2メモリ182および第3メモリ184の任意のアドレスAを指定し、第2メモリ182の/RD信号のみを直接制御することで、第2メモリ182のデータBを共通バス176のデータ線に読み出す。ただし、ここでは、CS(Chip Select)等の他の許可信号を省略している。   The access element 178 specifies an arbitrary address A in the second memory 182 and the third memory 184 by outputting the address A to the address line of the common bus 176, and directly controls only the / RD signal of the second memory 182. As a result, the data B of the second memory 182 is read to the data line of the common bus 176. However, other permission signals such as CS (Chip Select) are omitted here.

そして、共通バス176のアドレス線にアドレスAが出力され、かつ、共通バス176のデータ線にデータBが出力されている間に、アクセス素子178は、第3メモリ184の/WR信号のみを直接制御することで、共通バス176のデータ線に出力されているデータBを第3メモリ184に書き込むことができる。   While the address A is output to the address line of the common bus 176 and the data B is output to the data line of the common bus 176, the access element 178 directly receives only the / WR signal of the third memory 184. By controlling, the data B output to the data line of the common bus 176 can be written in the third memory 184.

データの読み出しと書き込みを、従来では、別のタイミングで行っていたところ、本実施形態では、同タイミングで行うことができるので、データ転送を高速化することができ、バックアップ処理の短縮化を図ることができる。また、短縮化に伴う時間を他のバックアップ処理に利用することも可能となる。さらに、データの転送負荷も削減できるので、バックアップ処理に費やす電力も大幅に削減することができる。したがって、コンデンサ156aの容量を小さくすることができ、専有面積やコスト面で有利になる。   Conventionally, data reading and writing have been performed at different timings. In the present embodiment, since data can be performed at the same timings, data transfer can be speeded up and backup processing can be shortened. be able to. Also, the time required for shortening can be used for other backup processing. Furthermore, since the data transfer load can be reduced, the power consumed for backup processing can be greatly reduced. Therefore, the capacity of the capacitor 156a can be reduced, which is advantageous in terms of exclusive area and cost.

以上、説明した、プログラマブルコントローラ120によると、バックアップ処理の手順を工夫し、コンデンサ156aの容量の不要な増大化を回避することが可能となる。   As described above, according to the programmable controller 120 described above, it is possible to devise a backup processing procedure and avoid an unnecessary increase in the capacity of the capacitor 156a.

具体的に、電源148が切断された場合の電力供給について、コンデンサ156aから電力の供給を受けるタイミングを遅らせることで、バックアップに許容される最大時間を延長することができる。また、バックアップが必要なデータが増加した場合においてもコンデンサ156aの容量を増やすことなく安定かつ確実にバックアップが可能となる。また、バックアップが必要なデータの増加がない場合、逆に、コンデンサ156aの容量を小さく変更することができ、占有面積やコストの低減を図ることも可能となる。   Specifically, the maximum time allowed for backup can be extended by delaying the timing of receiving power supply from the capacitor 156a for power supply when the power source 148 is cut off. Further, even when data that needs to be backed up increases, the backup can be performed stably and reliably without increasing the capacitance of the capacitor 156a. On the other hand, when there is no increase in data that needs to be backed up, the capacity of the capacitor 156a can be changed to be small, and the occupied area and cost can be reduced.

また、バックアップ処理においても、アクセス素子178がプロセッサ170と独立してデータの転送処理を行うことで、プロセッサ170を省電力モードに移行させ、消費電力の低減を図ることができる。また、そのバックアップ処理において、読み出しと書き込みのタイミングを合わせることで、さらなる時間短縮と消費電力の低減を図ることが可能となる。   Also in the backup process, the access element 178 performs a data transfer process independently of the processor 170, whereby the processor 170 can be shifted to the power saving mode and power consumption can be reduced. In the backup process, it is possible to further reduce time and reduce power consumption by matching the timing of reading and writing.

以上、添付図面を参照しながら本発明の好適な実施形態について説明したが、本発明はかかる実施形態に限定されないことは言うまでもない。当業者であれば、特許請求の範囲に記載された範疇において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。   As mentioned above, although preferred embodiment of this invention was described referring an accompanying drawing, it cannot be overemphasized that this invention is not limited to this embodiment. It will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the claims, and these are naturally within the technical scope of the present invention. Is done.

なお、本明細書の電源切断対処方法の各工程は、必ずしもフローチャートとして記載された順序に沿って時系列に処理する必要はなく、並列的あるいはサブルーチンによる処理を含んでもよい。   Note that each step of the power-off countermeasure method of the present specification does not necessarily have to be processed in time series in the order described in the flowchart, and may include parallel or subroutine processing.

本発明は、被制御機器に対する制御処理をプログラミング可能なプログラマブルコントローラ、および、電源切断時における電源切断対処方法に利用することができる。   INDUSTRIAL APPLICABILITY The present invention can be used for a programmable controller that can program control processing for a controlled device, and a power-off countermeasure method when power is turned off.

100 …プログラマブルコントロールシステム
110 …管理装置
120 …プログラマブルコントローラ
130 …被制御機器
148 …電源
156a …コンデンサ
156b …第2ダイオード(逆流防止用ダイオード)
156c …スイッチ
158 …電力検出部
160 …電力供給ライン
170 …プロセッサ
176 …共通バス
178 …アクセス素子
182 …第2メモリ(被バックアップメモリ)
184 …第3メモリ(バックアップメモリ)
DESCRIPTION OF SYMBOLS 100 ... Programmable control system 110 ... Management apparatus 120 ... Programmable controller 130 ... Controlled device 148 ... Power supply 156a ... Capacitor 156b ... 2nd diode (diode for backflow prevention)
156c ... switch 158 ... power detection unit 160 ... power supply line 170 ... processor 176 ... common bus 178 ... access element 182 ... second memory (backed up memory)
184 ... Third memory (backup memory)

Claims (7)

共通バスを通じて制御可能な被バックアップメモリと、
前記共通バスを通じて制御可能なバックアップメモリと、
前記共通バスに接続され、制御プログラムに基づいて動作するプロセッサと、
前記プロセッサのみがアクセス可能な専用メモリと、
前記被バックアップメモリおよび前記バックアップメモリに前記共通バスを通じて接続されたアクセス素子と、
電源電圧が、予め定められた第1閾値未満となったことを検出する電力検出部と、
を備え、
前記アクセス素子は、電源電圧が前記第1閾値未満となり、前記プロセッサが、前記専用メモリのデータを前記バックアップメモリに退避させた後、該プロセッサの動作モードを、通常モードより消費電力の少ない省電力モードに移行させ、前記被バックアップメモリのデータを前記バックアップメモリに退避させることを特徴とするプログラマブルコントローラ。
Backed up memory that can be controlled through a common bus;
A backup memory controllable through the common bus;
A processor connected to the common bus and operating based on a control program;
Dedicated memory accessible only by the processor;
An access element connected to the backup memory and the backup memory through the common bus;
A power detection unit for detecting that the power supply voltage is less than a predetermined first threshold;
With
It said access element, Ri supply voltage Do and less than the first threshold value, the processor, after saving the data of the dedicated memory to the backup memory, the operation mode of the processor, consumes less power than the normal mode It is shifted to the power saving mode, the programmable controller, wherein Rukoto retracts the data of the object to be backed up memory to the backup memory.
前記アクセス素子の消費電力は、前記プロセッサの消費電力より少ないことを特徴とする請求項に記載のプログラマブルコントローラ。 The programmable controller of claim 1 power consumption of the access device, characterized in that less than the power consumption of the processor. 電源からの電力供給ラインに、逆流防止用ダイオードおよびスイッチを介して接続された、電力を蓄積するコンデンサをさらに備え、
前記電力検出部は、電源電圧が前記第1閾値未満になったことに加え、該第1閾値より小さい第2閾値未満になったことを検出し、
前記スイッチは、電源電圧が前記第2閾値以上である間、前記コンデンサと前記プロセッサおよび前記アクセス素子を含む主回路とを非接続に維持し、電源電圧が前記第2閾値未満となると、前記コンデンサと前記主回路とを接続することを特徴とする請求項1または2に記載のプログラマブルコントローラ。
The power supply line from the power supply further includes a capacitor for storing power, connected via a backflow prevention diode and a switch,
The power detection unit detects that the power supply voltage is less than the first threshold, and in addition, is less than the second threshold smaller than the first threshold,
The switch maintains the capacitor and the main circuit including the processor and the access element in a disconnected state while a power supply voltage is equal to or higher than the second threshold, and when the power supply voltage becomes lower than the second threshold, the programmable controller of claim 1 or 2, characterized in that a capacitor and said main circuit.
電源からの電力供給ラインにスイッチを介して接続された、電力を蓄積するコンデンサをさらに備え、
前記電力検出部は、電源電圧が前記第1閾値未満になったことに加え、該第1閾値より小さい第2閾値未満になったことを検出し、
前記スイッチは、電源電圧が前記第1閾値未満かつ第2閾値以上である間、前記コンデンサと前記プロセッサおよび前記アクセス素子を含む主回路とを非接続に維持し、電源電圧が前記第1閾値以上または前記第2閾値未満である間、前記コンデンサと前記主回路とを接続することを特徴とする請求項1または2に記載のプログラマブルコントローラ。
A power storage capacitor connected to a power supply line from the power supply via a switch;
The power detection unit detects that the power supply voltage is less than the first threshold, and in addition, is less than the second threshold smaller than the first threshold,
The switch maintains the capacitor and the main circuit including the processor and the access element in a disconnected state while the power supply voltage is less than the first threshold and greater than or equal to the second threshold, and the power supply voltage is the first threshold. above or while the is less than the second threshold value, the programmable controller according to claim 1 or 2, characterized in that for connecting the capacitor and the main circuit.
前記アクセス素子は、前記被バックアップメモリのデータの読み出しを行い、該データが前記共通バスに出力されている間に、該データを前記バックアップメモリに書き込むことを特徴とする請求項1から4のいずれか1項に記載のプログラマブルコントローラ。 Said access device, reads the data of the object to be backed up memory, while the data is being output to the common bus, any of claims 1 to 4, characterized in that writing the data into the backup memory The programmable controller of Claim 1 . 共通バスを通じて制御可能な被バックアップメモリと、該共通バスを通じて制御可能なバックアップメモリと、該共通バスに接続され、制御プログラムに基づいて動作するプロセッサと、該プロセッサのみがアクセス可能な専用メモリと、該被バックアップメモリおよび該バックアップメモリに該共通バスを通じて接続されたアクセス素子と、電源電圧が、予め定められた第1閾値未満となったことを検出する電力検出部とを備えるプログラマブルコントローラにおいて、
前記プロセッサは、電源電圧が前記第1閾値未満となると、前記専用メモリのデータを前記バックアップメモリに退避させ、
前記アクセス素子は、
電源電圧が前記第1閾値未満となり、前記プロセッサが、前記専用メモリのデータを前記バックアップメモリに退避させた後、該プロセッサの動作モードを、通常モードより消費電力の少ない省電力モードに移行させ、
前記被バックアップメモリからデータを読み出し、
前記バックアップメモリに前記データを書き込むことを特徴とする電源切断対処方法。
A backed up memory that can be controlled through a common bus, a backup memory that can be controlled through the common bus, a processor connected to the common bus and operating based on a control program, and a dedicated memory accessible only by the processor , In a programmable controller comprising: the memory to be backed up; an access element connected to the backup memory through the common bus; and a power detection unit that detects that a power supply voltage is less than a predetermined first threshold value.
When the power supply voltage is less than the first threshold, the processor saves the data in the dedicated memory to the backup memory,
The access element is
Supply voltage Ri is Do less than the first threshold value, the processor, after said data-only memory has been saved in the backup memory, shifts the operation mode of the processor, the less the power saving mode power consumption than the normal mode Let
Read data from the backed up memory,
A method for coping with power-off, wherein the data is written to the backup memory.
前記アクセス素子は、前記被バックアップメモリのデータの読み出しを行い、該データが前記共通バスに出力されている間に、該データを前記バックアップメモリに書き込むことを特徴とする請求項に記載の電源切断対処方法。 7. The power supply according to claim 6 , wherein the access element reads data from the memory to be backed up and writes the data to the backup memory while the data is being output to the common bus. How to deal with disconnection.
JP2014521052A 2012-06-14 2012-06-14 Programmable controller and power-off countermeasure method Active JP5915740B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/065192 WO2013186888A1 (en) 2012-06-14 2012-06-14 Programmable controller and method for addressing electrical power disconnection

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2016023569A Division JP6079915B2 (en) 2016-02-10 2016-02-10 Programmable controller and power-off countermeasure method

Publications (2)

Publication Number Publication Date
JPWO2013186888A1 JPWO2013186888A1 (en) 2016-02-01
JP5915740B2 true JP5915740B2 (en) 2016-05-11

Family

ID=49757750

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014521052A Active JP5915740B2 (en) 2012-06-14 2012-06-14 Programmable controller and power-off countermeasure method

Country Status (2)

Country Link
JP (1) JP5915740B2 (en)
WO (1) WO2013186888A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014123187A (en) * 2012-12-20 2014-07-03 Fuji Electric Co Ltd Programmable controller and method for coping with power-supply disconnection
JP2014229116A (en) * 2013-05-23 2014-12-08 富士電機株式会社 Programmable controller and method for coping with power disconnection

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5615470B1 (en) 2014-03-17 2014-10-29 三菱電機株式会社 Power supply control device and programmable logic controller
JP6299425B2 (en) * 2014-05-21 2018-03-28 富士電機株式会社 Data control device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0612153A (en) * 1992-06-25 1994-01-21 Matsushita Electric Works Ltd Programmable controller
JPH086616A (en) * 1994-06-15 1996-01-12 Matsushita Electric Works Ltd Programmable controller
JPH113292A (en) * 1997-06-12 1999-01-06 Nec Shizuoka Ltd Data backup method and system
JP2000305610A (en) * 1999-04-26 2000-11-02 Yaskawa Electric Corp Information processing unit of programmable controller and its data storing method
JP5164597B2 (en) * 2008-02-14 2013-03-21 ローム株式会社 Data control device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014123187A (en) * 2012-12-20 2014-07-03 Fuji Electric Co Ltd Programmable controller and method for coping with power-supply disconnection
JP2014229116A (en) * 2013-05-23 2014-12-08 富士電機株式会社 Programmable controller and method for coping with power disconnection

Also Published As

Publication number Publication date
JPWO2013186888A1 (en) 2016-02-01
WO2013186888A1 (en) 2013-12-19

Similar Documents

Publication Publication Date Title
JP6334828B2 (en) Solid state drive with self-refresh power saving mode
KR102211867B1 (en) Auxiliary power supply device and nonvolatile memory system including the same
US9645829B2 (en) Techniques to communicate with a controller for a non-volatile dual in-line memory module
US9857859B2 (en) Techniques to power down output power rails for a storage device
JP5915740B2 (en) Programmable controller and power-off countermeasure method
JP6145987B2 (en) Programmable controller, programmable controller data backup method, programmable controller activation method
US10747287B2 (en) Backup power supply based configuration data application
CN107111575B (en) Method and storage management device for transmitting data in computer system, storage system and computer system
US9042196B2 (en) Memory system and method of controlling memory system
JP6123282B2 (en) Programmable controller and power-off countermeasure method
WO2011099117A1 (en) Programmable controller
JP7261543B2 (en) Control device and control method
JP6079915B2 (en) Programmable controller and power-off countermeasure method
WO2018096776A1 (en) Power source circuit
JP2014229116A (en) Programmable controller and method for coping with power disconnection
JPH10187302A (en) Data storage system and method for saving power applied to the same system
CN104240764A (en) Semiconductor device with fuse array and operating method thereof
JP5996228B2 (en) Robot controller
US20160085292A1 (en) Electronic device
JP6063759B2 (en) Semiconductor memory device
JP2016032989A (en) Load controller
US10514740B2 (en) Computer device and computer-readable storage medium
US20230185351A1 (en) Power management integrated circuit device having multiple initialization/power up modes
US20090190428A1 (en) Nonvolatile semiconductor memory device
JP2005078197A (en) Power-saving controller

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20151215

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160210

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20160308

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160321

R150 Certificate of patent or registration of utility model

Ref document number: 5915740

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250