JP2010026789A - Sales data processor and program - Google Patents
Sales data processor and program Download PDFInfo
- Publication number
- JP2010026789A JP2010026789A JP2008187361A JP2008187361A JP2010026789A JP 2010026789 A JP2010026789 A JP 2010026789A JP 2008187361 A JP2008187361 A JP 2008187361A JP 2008187361 A JP2008187361 A JP 2008187361A JP 2010026789 A JP2010026789 A JP 2010026789A
- Authority
- JP
- Japan
- Prior art keywords
- data
- power supply
- hibernation
- processing
- saving
- 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
Landscapes
- Cash Registers Or Receiving Machines (AREA)
- Power Sources (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
本発明は、売上データ処理装置及びプログラムに関する。 The present invention relates to a sales data processing apparatus and a program.
従来、ECR(電子レジスタ)等の売上データ処理装置では、主電源遮断時のシステムの動作状態を示すデータを電池でバックアップされた揮発性メモリに保存しておくことで、停電時や誤操作による主電源の遮断時でもすぐに電源遮断前の動作状態で起動できるようにしている。しかし、近年、売上データ処理装置の高機能化が進み、それに伴いメモリも大容量となっている。そのため、店舗の夏季休業等により主電源の遮断状態が長時間続いた場合に備えて大容量のバックアップ電池が必要となっている。 Conventionally, in sales data processing devices such as ECR (electronic registers), data indicating the operating state of the system when the main power supply is shut down is stored in a volatile memory backed up by a battery, which can be used mainly when a power failure occurs. Even when the power is cut off, it can be started immediately in the operating state before the power is cut off. In recent years, however, sales data processing devices have become more sophisticated, and the memory has also increased in capacity. Therefore, a large-capacity backup battery is required in case the main power supply is shut off for a long time due to a summer holiday of the store.
一方、パーソナルコンピュータにおいては、上述のように主電源遮断時におけるシステムの動作状態を示すデータを電池でバックアップされた揮発性メモリに退避させるサスペンド機能と、揮発性メモリに退避されたデータをハードディスク等の不揮発性記憶手段に退避するハイバネーション処理を行うハイバネーション機能が知られている。ハイバネーション機能によれば、主電源の遮断状態が長い時間続いてもデータのバックアップに大容量の電池を必要とせずに済む。 On the other hand, in the personal computer, as described above, a suspend function that saves data indicating the operation state of the system when the main power supply is shut down to a volatile memory backed up by a battery, and a data saved in the volatile memory to a hard disk or the like A hibernation function for performing a hibernation process for saving in the nonvolatile storage means is known. The hibernation function eliminates the need for a large-capacity battery for data backup even when the main power supply is shut off for a long time.
例えば、特許文献1には、電源OFF時にシステムをサスペンド状態に移行させた後、そのまま所定時間が経過したらサスペンド状態からハイバネーション状態へ移行させる技術が記載されている。ここで、サスペンド状態とは、コンピュータの動作を停止させる際、主メモリへの電力供給を継続することでシステム状態を保持している状態をいい、ハイバネーション状態とは、ハードディスク等の不揮発性記憶手段に主メモリの内容を書き込むことでシステム状態を保持している状態をいう。
For example,
また、例えば、特許文献2には、サスペンド状態で装置本体が移動した場合にサスペンド状態からハイバネーション状態に直ちに移行させる技術が記載されている。
ところで、従来の技術では、主メモリの内容を不揮発性記憶手段に退避させるハイバネーション処理が開始されるとハイバネーション処理が完了するまで次の起動ができない。しかし、ECR等の売上データ処理装置において意図しない停電が発生したり主電源コネクタを誤って抜いてしまったりした場合、顧客を待たせている状態であることが多いため、主電源の供給再開後に迅速に主電源遮断前の動作状態に復帰できなければならない。 By the way, in the conventional technique, when the hibernation process for saving the contents of the main memory to the nonvolatile storage means is started, the next activation cannot be performed until the hibernation process is completed. However, if an unintentional power failure occurs in a sales data processing device such as ECR or if the main power connector is accidentally disconnected, it is often the case that the customer is waiting. It must be possible to quickly return to the operating state before the main power supply was shut off.
本発明の課題は、売上データ処理装置において、ハイバネーション処理中に主電源が供給された場合に、直ちに主電源遮断前の動作状態に復帰できるようにすることである。 SUMMARY OF THE INVENTION An object of the present invention is to enable a sales data processing apparatus to immediately return to an operation state before shutting down the main power supply when main power is supplied during hibernation processing.
上記課題を解決するため、請求項1に記載の発明の売上データ処理装置は、
主電源が遮断された際に、システムの動作状態を示すデータを揮発性記憶手段に退避させる第1の退避処理手段と、
前記第1の退避処理手段により前記揮発性記憶手段に退避された前記システムの動作状態を示すデータを不揮発性記憶手段に退避させる第2の退避処理手段と、
前記主電源の電源状態を監視する電源監視手段と、
前記第2の退避処理手段による退避処理中に前記電源監視手段により前記主電源が供給状態となったことが検出された際に、前記第2の退避処理手段による退避処理を中断させ、前記揮発性記憶手段に退避されている前記システムの動作状態を示すデータに基づいて前記主電源の遮断前の状態にシステムを復帰させる制御手段と、
を備える。
In order to solve the above-mentioned problem, the sales data processing device of the invention described in
First saving processing means for saving data indicating an operating state of the system to the volatile storage means when the main power supply is shut off;
Second save processing means for saving data indicating the operating state of the system saved in the volatile storage means by the first save processing means to the nonvolatile storage means;
Power monitoring means for monitoring the power state of the main power supply;
When the power supply monitoring unit detects that the main power supply is being supplied during the saving process by the second saving processing unit, the saving process by the second saving processing unit is interrupted, and the volatile Control means for returning the system to the state before the main power supply is shut off based on data indicating the operating state of the system saved in the storage device;
Is provided.
請求項2に記載の発明は、請求項1に記載の発明において、
前記第2の退避処理手段による退避処理は、前記不揮発性記憶手段に記憶されているデータの消去処理を含む。
The invention according to claim 2 is the invention according to
The saving process by the second saving processing unit includes an erasing process of data stored in the non-volatile storage unit.
請求項3に記載の発明は、請求項1に記載の発明において、
前記第2の退避処理手段による退避処理は、前記不揮発性記憶手段へ前記システムの動作状態を示すデータを書込む書込み処理を含む。
The invention according to claim 3 is the invention according to
The saving process by the second saving processing unit includes a writing process for writing data indicating an operation state of the system to the nonvolatile storage unit.
請求項4に記載の発明は、請求項1に記載の発明において、
前記第2の退避処理手段による退避処理は、前記揮発性記憶手段における前記不揮発性記憶手段への退避対象となったデータと前記不揮発性記憶手段に退避されたデータとの整合性を確認するための処理を含む。
The invention according to claim 4 is the invention according to
The evacuation process by the second evacuation processing unit is for confirming the consistency between the data to be evacuated to the nonvolatile storage unit in the volatile storage unit and the data evacuated to the nonvolatile storage unit. Including processing.
請求項5に記載の発明は、請求項1〜4の何れか一項に記載の発明において、
前記不揮発性記憶手段は、システムを動作させるプログラムを格納するための記憶手段とは別個に設けられている。
The invention according to
The nonvolatile storage means is provided separately from storage means for storing a program for operating the system.
請求項6に記載の発明は、請求項1〜5の何れか一項に記載の発明において、
前記第2の退避処理手段の処理中であることを通知する通知手段を備える。
The invention according to claim 6 is the invention according to any one of
Notifying means for notifying that the second saving processing means is in process.
請求項7に記載の発明は、請求項1〜6の何れか一項に記載の発明において、
前記不揮発性記憶手段は複数備えられている。
The invention according to claim 7 is the invention according to any one of
A plurality of the nonvolatile storage means are provided.
請求項8に記載の発明は、請求項1に記載の発明において、
外部記憶手段を接続するための接続手段と、
前記揮発性記憶手段に退避された前記システムの動作状態を示すデータの退避先を前記不揮発性記憶手段とするか前記接続手段により接続された外部記憶手段とするかを選択するための選択手段を備え、
前記第2の退避処理手段は、前記選択手段により選択された退避先に前記システムの動作状態を示すデータを退避させる。
The invention according to claim 8 is the invention according to
Connection means for connecting external storage means;
Selection means for selecting whether to save the data indicating the operating state of the system saved in the volatile storage means as the nonvolatile storage means or the external storage means connected by the connection means Prepared,
The second save processing means saves data indicating the operating state of the system to the save destination selected by the selection means.
請求項9に記載の発明のプログラムは、
売上データ処理装置に用いられるコンピュータを、
主電源が遮断された際に、システムの動作状態を示すデータを揮発性記憶手段に退避させる第1の退避処理手段、
前記第1の退避処理手段により前記揮発性記憶手段に退避された前記システムの動作状態を示すデータを不揮発性記憶手段に退避させる第2の退避処理手段、
電源監視手段により前記第2の退避処理手段による退避処理中に前記主電源が供給状態となったことが検出された際に、前記第2の退避処理手段による退避処理を中断させ、前記揮発性記憶手段に退避されている前記システムの動作状態を示すデータに基づいて前記主電源の遮断前の状態にシステムを復帰させる制御手段、
として機能させる。
The program of the invention according to claim 9 is:
A computer used in a sales data processing device
First evacuation processing means for evacuating data indicating the operating state of the system to the volatile storage means when the main power supply is shut off;
Second save processing means for saving data indicating the operating state of the system saved in the volatile storage means by the first save processing means to the nonvolatile storage means;
When it is detected by the power supply monitoring means that the main power supply has been supplied during the saving process by the second saving processing means, the saving process by the second saving processing means is interrupted, and the volatility Control means for returning the system to a state before the main power supply is shut off based on data indicating the operating state of the system saved in the storage means;
To function as.
本発明によれば、売上データ処理装置において、ハイバネーション処理中に主電源が供給された場合に、直ちに主電源遮断前の動作状態に復帰することが可能となる。 According to the present invention, in the sales data processing apparatus, when the main power is supplied during the hibernation process, it is possible to immediately return to the operation state before the main power is shut off.
(実施形態1)
まず、本発明の実施形態1について説明する。
図1に、実施形態1におけるECR1の機能構成例を示す。
ECR1は、店舗に設けられ、オペレータの操作に基づいて商品取引の登録処理(取引された日時、商品名、商品の売上個数、売上金額等の売上データ、担当者等の登録処理)、点検処理、精算処理、店舗内の売上集計等を行う売上データ処理装置である。ECR1としては、例えば、電子レジスタ等が適用可能である。
(Embodiment 1)
First,
FIG. 1 shows a functional configuration example of the ECR 1 in the first embodiment.
ECR1 is provided in the store, and a product transaction registration process (transaction date and time, product name, sales number of products, sales data such as sales amount, registration process of a person in charge, etc.) and an inspection process based on an operator's operation This is a sales data processing device that performs checkout processing, total sales in a store, and the like. As ECR1, for example, an electronic register or the like is applicable.
図1に示すように、ECR1は、CPU10と、RTC11と、プログラム格納メモリ12と、メインメモリ13と、ハイバネーション用メモリ14と、メイン表示装置151と、サブ表示装置152と、LED16と、印字装置17と、入力装置18と、ストレージI/F19と、通信部20と、を備えて構成され、各部はバス21を介して接続されて構成されている。
As shown in FIG. 1, the ECR 1 includes a
CPU(Central Processing Unit)10は、ECR1の各部を集中制御する制御手段である。また、CPU10は、プログラム格納メモリ12に記憶されている各種プログラムをメインメモリ13に展開し、メインメモリ13に展開されたプログラムとの協働で、各種処理を実行する。
A CPU (Central Processing Unit) 10 is control means for centrally controlling each part of the
例えば、CPU10は、AC電源状態監視回路34(図3参照)からAC電源供給を通知する信号が入力されると、プログラム格納メモリ12に記憶されている起動処理プログラム及び終了処理プログラムをメインメモリ13の起動処理・終了処理用ワークエリア131(図2参照)に読み出して、読み出した起動処理プログラムとの協働により後述する起動処理を実行する。また、CPU10は、動作中にAC電源状態監視回路34からAC電源遮断を通知する信号が入力されると、メインメモリ13に記憶されている終了処理プログラムとの協働により、サスペンド処理(第1の退避処理)、ハイバネーション処理(第2の退避処理)を含む終了処理を実行する。
For example, when a signal for notifying AC power supply is input from the AC power supply state monitoring circuit 34 (see FIG. 3), the
ここで、本実施形態において、サスペンド処理とは、AC電源31の遮断時にCPU10のシステム動作状態を示すデータ(プログラムカウンタ(PC)、スタックポインタ(SP)、レジスタ、システムデータ等)を揮発性のメインメモリ13に退避する処理をいう。ハイバネーション処理とは、メインメモリ13に記憶されているシステム動作状態を示すデータ等を不揮発性のハイバネーション用メモリ14に退避する処理をいう。
Here, in the present embodiment, the suspend process refers to volatile data (program counter (PC), stack pointer (SP), register, system data, etc.) indicating the system operation state of the
ハイバネーション処理中にAC電源状態監視回路34からAC電源供給を通知する信号が入力されると、CPU10は、ハイバネーション処理を中断させて起動処理を実行し、メインメモリ13に退避されているシステム動作状態を示すデータに基づいてAC電源遮断前の状態にシステムを復帰させる。
When a signal for notifying the AC power supply is input from the AC power
また、CPU10は、オペレータによる入力装置18の操作に応じたプログラムを起動させ、商品取引の登録処理、点検処理、精算処理、店舗内の売上集計処理等を行う。
In addition, the
RTC(Real Time Clock)11は、計時回路を内蔵し、現在時刻及び現在日付を計時してCPU10に出力する。RTC11は、RTC用バックアップ電源111が備えられており(図3参照)、AC電源31及びバックアップ用電源32の何れからも電源が供給されない状態でも動作可能となっている。
An RTC (Real Time Clock) 11 has a built-in clock circuit, clocks the current time and the current date, and outputs them to the
プログラム格納メモリ12は、不揮発性のROM(Read Only Memory)等により構成され、図2に示すように、ECR1で実行可能な各種プログラムやECR1の固有データ(例えば、ECR1のMACアドレス、タッチパネルキャリブレーションデータ等)を記憶する。
The
メインメモリ13は、CPU10によって実行される各種プログラム及びこれらプログラムに係る各種データ等を記憶する揮発性記憶手段である。
メインメモリ13は、図2に示すように、起動処理・終了処理用ワークエリア131、サスペンド用エリア132、コピー領域133、システムデータ領域134、設定データ領域135、ユーザデータ領域136を有している。
起動処理・終了処理用ワークエリア131は、AC電源投入時にCPU10によりプログラム格納メモリ12から読み出された起動処理プログラム、終了処理プログラム(サブルーチンの処理を含む)を記憶するとともに、これらのプログラムが動作するためのワークエリアである。
サスペンド用エリア132は、サスペンド処理において、CPU10のシステム動作状態を示すデータ(プログラムカウンタ(PC)、スタックポインタ(SP)、レジスタ、システムデータ等)を退避するための領域である。
コピー領域133は、プログラム格納メモリ12に記憶されているプログラムのコピーを書込むための領域である。
システムデータ領域134は、スタック、変数やOSのシステムデータを記憶する領域である。
設定データ領域135は、入力装置18を介して設定された周辺機器(メイン表示装置151、サブ表示装置152、印字装置17、入力装置18等)に関する各種設定データを記憶する領域である。
ユーザデータ領域136は、入力装置18を介して入力された売上データ、メイン表示装置151で表示中の表示データ、印字装置17に印字させる印字データ等のユーザデータを記憶する領域である。
The
As shown in FIG. 2, the
The start process / end
The suspend
The
The
The setting
The
ハイバネーション用メモリ14は、フラッシュメモリ等の不揮発性メモリにより構成され、AC電源31の遮断時にメインメモリ13に記憶されているデータを退避するための不揮発性記憶手段である。本実施の形態において、ハイバネーション用メモリ14は、CPU10から書込み指示されたデータの上位Bitを格納するためのハイバネーション用メモリ14a、CPU10から書込み指示されたデータの下位Bitを格納するためのハイバネーション用メモリ14bを備えて構成されている。ハイバネーション処理におけるデータの書込み速度を向上させるためである。
The
ハイバネーション用メモリ14は、図2に示すように、ヘッダ領域141、バックアップ領域142、チェックサム格納領域143を有している。ヘッダ領域141は、ハイバネーション処理が完了したことを示すハイバネーション完了フラグを設定するためのハイバネーション完了フラグ領域141aを有する領域である。バックアップ領域142は、ハイバネーション処理において、メインメモリ13の起動処理・終了処理用ワークエリア131以外の領域のデータを退避するための領域である。チェックサム格納領域143は、ハイバネーション処理において算出されたチェックサムを書込むための領域である。
As shown in FIG. 2, the
メイン表示装置151、サブ表示装置152は、LCD(Liquid Crystal Display)や有機EL(Electro-Luminescence)ディスプレイ等により構成され、CPU10から入力される表示信号の指示に従って、各種画面を表示する。メイン表示装置151は、オペレータ側に向けて設けられた表示装置であり、サブ表示装置152は、顧客側に向けて設けられた表示装置である。
The
LED(Light Emitting Diode)16は、CPU10から入力される指示信号に応じて駆動され、点灯、点滅する。
An LED (Light Emitting Diode) 16 is driven in response to an instruction signal input from the
印字装置17は、例えば、サーマルプリンタ(感熱式プリンタ)であり、レシート用、ジャーナル用のロール紙(感熱紙)を有し、CPU10から入力される指示信号に従って、各ロール紙に対して金額等のデータをプリントアウトする。
The
入力装置18は、電源キー、カーソルキー、文字、数字入力キーや、INITキー、FCキー等の各種機能キー等を備えたレジ用のキーボードを含む構成とし、オペレータによる各キーの操作信号をCPU10に出力する。また、入力装置18は、メイン表示装置151の画面上に設けられたタッチパネルを含む。タッチパネルは、メイン表示装置151の上面を覆うように設置されており、オペレータの指などを用いた操作によって押圧入力された所望の入力位置を検出し、その検出信号をCPU10に出力する。また、入力装置18は、商品に設けられたバーコードを読み取るバーコードリーダやバーコードスキャナ等を備える。
The
ストレージI/F19は、CF(CompactFlash)カード、SDカード(Secure Digital Card)等の外部ストレージ19aを接続可能であり、外部ストレージ19aとのデータの入出力を行うための接続手段である。
The storage I /
通信部20は、LAN(Local Area Network)アダプタやルータ等により構成され、LANやインターネット等の通信ネットワークを介してサーバ100等の外部機器とデータ送受信を行う。
The
図3に、ECR1における電源系の要部構成例を示す。
図3に示す電源生成回路33は、AC電源(主電源)31、及び、スイッチ35を介してバックアップ用電源(充電池)32に接続されている。電源生成回路33は、AC電源31から入力されたAC(交流)電源電力をDC(直流)電源電力に変換し、図1に示す各部にそれぞれ供給する。また、電源生成回路33は、スイッチ35を介してバックアップ用電源32から入力された電源電力をCPU10、RTC11、プログラム格納メモリ12、メインメモリ13及びハイバネーション用メモリ14a、14b、LED16に供給する。
AC電源状態監視回路34は、AC電源31の電源状態を監視する電源監視手段であり、AC電源31から電源が供給されている間は、AC電源供給を通知する信号(HIGH信号)をCPU10に出力し、AC電源31から電源が遮断されている間は、AC電源遮断を通知する信号(LOW信号)をCPU10に出力する。
スイッチ35は、CPU10からのバックアップ用電源ON/OFFスイッチ切替制御信号に基づいて、バックアップ電源32のON/OFFを切り替える。
FIG. 3 shows a configuration example of a main part of the power supply system in ECR1.
The
The AC power supply
The
このように、AC電源31からの電源が供給状態である場合、電源生成回路33によりECR1の各部にAC電源31からの電源が供給される。AC電源31が遮断されると、CPU10からの制御に基づいて、CPU10、RTC11、プログラム格納メモリ12、メインメモリ13及びハイバネーション用メモリ14a、14b、LED16のみにバックアップ用電源32からの電源が供給される。このように構成することで、バックアップ用電源32の消費量を必要最低限に抑えることができる。なお、AC電源31遮断後一定時間T内は回路的に電源が保持されている。この一定時間内にCPU10はバックアップ用電源32をONに切り替え、CPU動作電源、メモリ動作電源を維持する。
As described above, when the power supply from the
次に、実施形態1におけるECR1の主要な動作についてフローチャートを参照して詳細に説明する。
Next, main operations of the
図4に、AC電源監視回路34によりAC電源遮断を通知する信号が入力された際に、CPU10により実行される終了処理のフローを示す。当該処理は、CPU10と終了処理プログラムとの協働によるソフトウエア処理により実現される。
FIG. 4 shows a flow of end processing executed by the
まず、サスペンド処理(第1の退避処理)が実行され、CPU10に記憶されているスタックポインタ、プログラムカウンタ、レジスタ、システムデータ等がメインメモリ13のサスペンド用エリア132に退避される(ステップS1)。
First, a suspend process (first save process) is executed, and the stack pointer, program counter, register, system data, etc. stored in the
次いで、バックアップ用電源ON/OFFスイッチ切替制御信号によりスイッチ35がONに切り替えられることにより、バックアップ用電源32がONに切り替えられる(ステップS2)。
Next, the
次いで、ハイバネーション処理(第2の退避処理)が実行され、メインメモリ13における起動処理・終了処理用ワークエリア131以外の領域のデータがハイバネーション用メモリ14に退避(バックアップ)される(ステップS3)。なお、ハイバネーション処理実行中にAC電源監視回路34によりAC電源供給を通知する信号が入力されると、CPU10により本処理は中断され、図9a〜図9bに示す起動処理が実行される。
Next, hibernation processing (second saving processing) is executed, and data in an area other than the activation / termination
図5に、図4のステップS3においてCPU10により実行されるハイバネーション処理のフローを示す。当該処理は、CPU10とハイバネーション処理プログラムとの協働によるソフトウエア処理により実現される。
FIG. 5 shows a flow of hibernation processing executed by the
ハイバネーション処理においては、まず、ハイバネーション処理中であることを示す通知手段としてのLED16の点滅が開始される(ステップS201)。次いで、書込みエリア消去処理が実行される(ステップS202)。
図6に、書込みエリア消去処理のフローを示す。
図6に示すように、書込みエリア消去処理においては、まず、ハイバネーション用メモリ14a、14bの全領域のデータが消去済みであるか否かが判断される(ステップS1001)。全領域のデータが消去済みであると判断されると(ステップS1001;YES)、処理は図5のステップS203に移行する。
In the hibernation process, first, the blinking of the
FIG. 6 shows a flow of the write area erasing process.
As shown in FIG. 6, in the write area erasing process, first, it is determined whether or not the data in all areas of the
ハイバネーション用メモリ14a、14bの全領域のデータが消去済みではないと判断されると(ステップS1001;NO)、1ブロック分のデータ消去がハイバネーション用メモリ14a、14bに指示される(ステップS1002)。ここで、1ブロックとは、一度に消去可能なデータサイズを示す。
If it is determined that the data in all the areas of the
次いで、AC電源状態監視回路34から入力される信号が監視され、AC電源31の電源状態が判断される(ステップS1003)。AC電源31が遮断状態であると判断されると(ステップS1003;AC電源遮断状態)、 ハイバネーション用メモリ14a、14bにおいて、1ブロックの消去が完了したか否かが判断される。ここで、ハイバネーション用メモリ14a、14bにおいては、1ブロック分のデータ消去が終了すると、CPU10にブロック消去完了が通知される。1ブロックの消去が完了していないと判断されると(ステップS1004;NO)、処理はステップS1003に戻る。
Next, the signal input from the AC power supply
1ブロックの消去が完了したと判断されると(ステップS1004;YES)、ハイバネーション用メモリ14a、14bの全領域の消去が完了したか否かが判断され、完了していないと判断されると(ステップS1005;NO)、処理はステップS1002に戻り、次のブロックについての消去が実行される。ハイバネーション用メモリ14a、14bの全領域の消去が完了したと判断されると(ステップS1005;YES)、処理は図5のステップS203に移行する。
If it is determined that the erasure of one block has been completed (step S1004; YES), it is determined whether or not the erasure of all areas of the
一方、ステップS1003において、AC電源31が供給状態であると判断されると(ステップS1003;AC電源供給状態)、スイッチ35によりバックアップ用電源32がOFFに切り替えられ(ステップS1006)、本処理は中断され、図9a〜図9bに示す起動処理(ハイバネーション中断リスタート)に移行する。
On the other hand, when it is determined in step S1003 that the
図5のステップS203においては、書込み処理が実行される。
図7に、書込み処理のフローを示す。
図7に示すように、書込み処理においては、まず、退避対象のデータ、即ち、メインメモリ13の起動処理・終了処理用ワークエリア131以外の領域に記憶されているデータがハイバネーション用メモリ14a、14bに1ブロック分ずつ転送され、1ブロック分のデータ書込みが指示される。ここで、1ブロックとは、ハイバネーション用メモリ14a、14bにおいて一度に書込み可能なデータサイズを示す。また、ハイバネーション用メモリ14aには、データの上位Bit(例えば、8Bitデータであれば上位4Bit)が1ブロック分転送され、ハイバネーション用メモリ14bには、データの下位Bit(例えば、8Bitデータであれば下位4Bit)が1ブロック分転送される。
In step S203 of FIG. 5, a writing process is executed.
FIG. 7 shows a flow of the writing process.
As shown in FIG. 7, in the writing process, first, data to be saved, that is, data stored in an area other than the start / end
次いで、AC電源状態監視回路34から入力される信号が監視され、AC電源31の電源状態が判断される(ステップS2002)。AC電源31が遮断状態であると判断されると(ステップS2002;AC電源遮断状態)、 ハイバネーション用メモリ14a、14bにおいて、1ブロックの書込みが完了したか否かが判断される(ステップS2003)。ここで、ハイバネーション用メモリ14a、14bにおいては、1ブロック分のデータ書込みが終了すると、CPU10にブロック書込み完了が通知される。1ブロックの書込みが完了していないと判断されると(ステップS2003;NO)、処理はステップS2002に戻る。
Next, the signal input from the AC power supply
1ブロックの書込みが完了したと判断されると(ステップS2003;YES)、メインメモリ13の起動処理・終了処理用ワークエリア131以外の全領域のデータの書込みが完了したか否かが判断され、完了していないと判断されると(ステップS2004;NO)、処理はステップS2001に戻り、次のブロックについての書込みが実行される。メインメモリ13の起動処理・終了処理用ワークエリア131以外の全領域のデータの書込みが完了したと判断されると(ステップS2004;YES)、処理は図5のステップS204に移行する。上記書込み処理によりハイバネーション用メモリ14a、14bに書込まれたデータをバックアップデータとよぶ。
If it is determined that writing of one block is completed (step S2003; YES), it is determined whether writing of data in all areas other than the activation / end
一方、ステップS2002において、AC電源31が供給状態であると判断されると(ステップS2002;AC電源供給状態)、スイッチ35によりバックアップ用電源32がOFFに切り替えられ(ステップS2005)、本処理は中断され、図9a〜図9bに示す起動処理(ハイバネーション中断リスタート)に移行する。
On the other hand, when it is determined in step S2002 that the
図5のステップS204においては、書込み内容保証処理が実行される。
書込み内容保証処理は、メインメモリ13における退避対象となったデータとハイバネーション用メモリ14に退避されたデータの整合性を確認するための処理である。
In step S204 of FIG. 5, a write content guarantee process is executed.
The written content guarantee process is a process for confirming the consistency between the data to be saved in the
図8に、書込み内容保証処理のフローを示す。
図8に示すように、書込み内容保証処理においては、まず、メインメモリ13に記憶されているハイバネーション用メモリ14a、14bへの退避対象となったデータ、具体的には、起動処理・終了処理用ワークエリア131以外の領域に書込まれたデータと、ハイバネーション用メモリ14a、14bに退避されたデータのベリファイ処理(誤り検査)が実行される(ステップS3001)。なお、ベリファイ処理により誤りがあった場合は、ハイバネーション処理を再実行することが好ましい。
FIG. 8 shows a flow of the write content guarantee process.
As shown in FIG. 8, in the write content guarantee process, first, the data to be saved in the
次いで、メインメモリ13上における退避対象となったデータのチェックサム(合計値)が算出され(ステップS3002)、算出されたチェックサムがハイバネーション用メモリ14a、14bのチェックサム格納領域143に書込まれる(ステップS3003)。そして、ハイバネーション用メモリ14a、14bのハイバネーション完了フラグ領域141aにハイバネーション完了フラグONが設定され(ステップS3004)、処理は図5のステップS205に移行する。
Next, a checksum (total value) of data to be saved on the
図5のステップS205においては、LED16の点滅が停止され(ステップS205)、ハイバネーション処理は終了し、処理は図4のステップS4に移行する。
In step S205 of FIG. 5, the blinking of the
図4のステップS4においては、スイッチ35によりバックアップ用電源32がOFFに切り替えられ、終了処理は終了する。
In step S4 of FIG. 4, the
バックアップ用電源32がOFFに切り替えられた後、AC電源31が遮断状態から供給状態となると、CPU10により、プログラム格納メモリ12の起動処理プログラム及び終了処理プログラムがメインメモリ13の起動処理・終了処理用ワークエリア131に読み出される。そして、図9a〜図9bに示す起動処理が実行される。
After the
図9a〜図9bに、起動処理のフローを示す。当該処理は、CPU10と起動処理プログラムとの協働によるソフトウエア処理により実現される。ここで、起動処理は図9a〜図9bに示す「リセットスタート」の位置から開始されるが、ハイバネーション処理中断時においては、ハイバネーション処理プログラムによって図9aに示す「ハイバネーション中断リスタート」の位置への移行が指示されているため、「ハイバネーション中断リスタート」の位置から処理が開始される。
9a to 9b show a flow of activation processing. This processing is realized by software processing through cooperation between the
「リセットスタート」から処理が開始された場合、まず、システム初期化処理が実行される(ステップS10)。システム初期化処理とは、CPU10がこれから使用するシステム環境を認識し、システムを確立させるための処理である。例えば、どのようなメモリが接続されているかをCPU10が認識する処理等が挙げられる。
次いで、リセットスタートであることを示すスタート情報がメインメモリ13の起動処理・終了処理用ワークエリア131に設定され(ステップS11)、処理はステップS14に移行する。
When the process is started from “reset start”, first, a system initialization process is executed (step S10). The system initialization process is a process for the
Next, start information indicating a reset start is set in the
「ハイバネーション中断リスタート」から処理が開始された場合、まず、ハイバネーション用システム初期化処理が実行される(ステップS12)。ハイバネーション処理を中断して起動処理が開始された場合にはCPU10は動作中であるので、システム初期化処理の全てを行う必要はない。そこで、ステップS12においては、例えば、CPU10内のキャッシュ情報の初期化等、一部の初期化処理が行われる。
次いで、ハイバネーション中断リスタートであることを示すスタート情報がメインメモリ13の起動処理・終了処理用ワークエリア131に設定され(ステップS13)、処理はステップS14に移行する。
When the process is started from “hibernation interruption restart”, a hibernation system initialization process is first executed (step S12). When the hibernation process is interrupted and the startup process is started, the
Next, start information indicating that the hibernation interruption restart is set in the
ステップS14においては、メイン表示装置151、サブ表示装置152、印字装置17、入力装置18等の周辺機器のドライバが初期化される(ステップS14)。
In step S14, drivers for peripheral devices such as the
次いで、入力装置18のINITキーが押下されたか否かが判断される(ステップS15)。ここで、INITキー(イニシャルキー)は、ECR1の設置の際にディーラーが使用するキーであり、メインメモリ13上の起動処理・終了処理用ワークエリア131以外の領域のデータ、即ち、設定データやユーザデータを含む全てのデータを初期化することを指示するためのキーである。入力装置18の電源キーがOFFされた後、INITキーを押しながら電源キーがONに切り替えられると、INITキーが有効となる。即ち、INITキーが押下されるタイミングでは、ほとんどの場合、ハイバネーション処理中断後のリスタートとなる。
Next, it is determined whether or not the INIT key of the
INITキーが押下された場合(ステップS15;YES)、処理は図9bのステップS35に移行し、プログラム格納メモリ12のプログラムに誤りがないかチェックが行われる。チェック結果がOKである場合(ステップS35;OK)、プログラム格納メモリ12のプログラムがメインメモリ13のコピー領域133にコピーされ(ステップS36)、ECR1がINIT状態にて起動され(ステップS37)、本処理は終了する。INIT状態にて起動とは、メインメモリ13から起動処理・終了処理用ワークエリア131以外の領域のデータ、即ち、サスペンド用エリア132、システムデータ領域134、設定データ領域135、ユーザデータ領域136のデータが消去された後に起動されることを意味する。チェック結果がNGである場合(ステップS35;NG)、システムエラーが発生したことを示すシステムエラーメッセージ、例えば「システムエラー」という文字列がメイン表示装置151に表示され(ステップS38)、本処理は終了する。
When the INIT key is pressed (step S15; YES), the process proceeds to step S35 in FIG. 9b, and a check is made to see if there is an error in the program in the
INITキーが押下されていない場合(ステップS15;NO)、FCキーが押下されたか否かが判断される(ステップS16)。ここで、FCキー(フラグクリアキー)は、メインメモリ13上の起動処理・終了処理用ワークエリア131以外のデータのうち設定データを残して初期化することを指示するためのキーである。入力装置18の電源キーがOFFされた後、FCキーを押しながら電源キーがONに切り替えられると、FCキーが有効となる。即ち、FCキーが押下されるタイミングでは、ほとんどの場合、ハイバネーション処理中断後のリスタートとなる。FCキーが押下されていない場合(ステップS16;NO)、処理はステップS18に移行する。FCキーが押下されている場合(ステップS16;YES)、FCキー検知済みを示すフラグがメインメモリ13上の起動処理・終了処理用ワークエリア131に設定され(ステップS17)、処理はステップS18に移行する。
If the INIT key has not been pressed (step S15; NO), it is determined whether or not the FC key has been pressed (step S16). Here, the FC key (flag clear key) is a key for instructing to leave the setting data among the data other than the
ステップS18においては、ハイバネーション処理中断後のリスタートであるか否かが判断される。具体的に、起動処理・終了処理用ワークエリア131に設定されているスタート情報が参照され、設定されているスタート情報がハイバネーション中断リスタートであることを示す情報である場合は、ハイバネーション中断リスタートであると判断される。設定されているスタート情報がリセットスタートであることを示す情報である場合は、ハイバネーション中断リスタートではないと判断される。ハイバネーション処理中断後のリスタートであると判断されると(ステップS18;YES)、処理は図9bのステップS23に移行する。即ち、ステップS19〜S22の処理がスキップされる。ハイバネーション処理中断後のリスタートである場合、メインメモリ13にAC電源31遮断前のメインメモリ13上のデータがそのまま残されているので、ハイバネーション用メモリ14からデータを復帰させる必要はない。
In step S18, it is determined whether or not the restart is after the hibernation process is interrupted. Specifically, when the start information set in the
ハイバネーション処理中断後のリスタートではないと判断されると(ステップS18;NO)、ハイバネーション用メモリ14のハイバネーション完了フラグ領域141aが参照される。ハイバネーション完了フラグがONに設定されている場合(ステップS19;YES)、チェックサムの検証が行われる(ステップS20)。即ち、チェックサム格納領域143に記憶されているチェックサムとバックアップ領域142に記憶されているデータの合計値とが一致するか否かの検証が行われる。チェックサムの検証結果がOKである場合(ステップS20;OK)、ハイバネーション用メモリ14のバックアップ領域142に記憶されているバックアップデータがメインメモリ13に書き戻される(ステップS21)。
If it is determined that the restart is not after the hibernation process is interrupted (step S18; NO), the hibernation
次いで、メインメモリ13に書き戻されたプログラムに誤りがないかチェックが行われる(ステップS22)。チェック結果がOKである場合(ステップS22;OK)、FCキーが検知済みであるか否かが判断される(図9bのステップS23)。FCキーが検知済みではないと判断されると(ステップS23;NO)、サスペンド用エリア132上のプログラムカウンタ、スタックポインタ、レジスタ、システムデータ等がCPU10に書き戻される(ステップS24)。また、周辺機器がAC電源遮断前の状態へ復帰される(ステップS25)。例えば、メイン表示装置151にメインメモリ13のユーザデータに含まれる表示データが送信され、AC電源遮断前の表示状態に戻される。そして、AC電源遮断前の状態でシステムが復帰され(ステップS26)、本処理は終了する。
Next, it is checked whether or not there is an error in the program written back to the main memory 13 (step S22). If the check result is OK (step S22; OK), it is determined whether or not the FC key has been detected (step S23 in FIG. 9b). If it is determined that the FC key has not been detected (step S23; NO), the program counter, stack pointer, register, system data, etc. on the suspend
一方、FCキーが検知済みであると判断されると(ステップS23;YES)、処理は図9bのステップS27に移行し、プログラム格納メモリ12のプログラムに誤りがないかチェックが行われる。チェック結果がOKである場合(ステップS27;OK)、プログラム格納メモリ12のプログラムがメインメモリ13のコピー領域133にコピーされ(ステップS28)、ECR1がFC状態にて起動され(ステップS29)、本処理は終了する。FC状態にて起動とは、メインメモリ13のサスペンド用エリア132、システムデータ領域134、ユーザデータ領域136のデータが消去された後に起動されることを意味する。チェック結果がNGである場合(ステップS27;NG)、システムエラーが発生したことを示すシステムエラーメッセージ、例えば「システムエラー」という文字列がメイン表示装置151に表示され(ステップS30)、本処理は終了する。
On the other hand, if it is determined that the FC key has been detected (step S23; YES), the process proceeds to step S27 in FIG. 9b, and a check is made as to whether there is an error in the program in the
一方、ステップS19でハイバネーション完了フラグがONでないと判断された場合(ステップS19;NO)、ステップS20でチェックサムの検証がNGであると判断された場合(ステップS20;NG)、又は、ステップS22でメインメモリ13のプログラムチェック結果がNGである場合(ステップS22;NG)、処理は図9bのステップS31に移行し、プログラム格納メモリ12のプログラムに誤りがないかチェックが行われる。チェック結果がOKである場合(ステップS31;OK)、プログラム格納メモリ12のプログラムがメインメモリ13のコピー領域133にコピーされ(ステップS32)、ECR1がバックアップエラー状態にて起動され(ステップS33)、本処理は終了する。バックアップエラー状態にて起動とは、メイン表示装置151に「バックアップエラーが発生しました」等のメッセージが表示され、メインメモリ13から起動処理・終了処理用ワークエリア131以外の領域のデータ、即ち、サスペンド用エリア132、システムデータ領域134、設定データ領域135、ユーザデータ領域136のデータが消去された後、起動されることを意味する。プログラムのチェック結果がNGである場合(ステップS31;NG)、システムエラーが発生したことを示すシステムエラーメッセージ、例えば「システムエラー」という文字列がメイン表示装置151に表示され(ステップS34)、本処理は終了する。
On the other hand, if it is determined in step S19 that the hibernation completion flag is not ON (step S19; NO), if it is determined in step S20 that checksum verification is NG (step S20; NG), or step S22. If the result of the program check in the
なお、起動後は、ハイバネーション用メモリ14に記憶されているデータの消去を行っておくことが好ましい。ハイバネーション用メモリ14は、プログラム格納メモリ12とは別個の異なる不揮発性メモリにより構成されているので、消去時にデータを選り分ける必要なくハイバネーション用メモリ14の全領域のデータを消去することが可能となる。そのため、システムに負荷をかけることなく、他の処理の実行と並行してハイバネーション用メモリ14のデータ消去を行うことが可能となる。
Note that it is preferable to erase the data stored in the
図10に、AC電源31の電源遮断前のメイン表示装置151及びAC電源31の電源供給後のメイン表示装置151の画面表示例を示す。図10では、売上データの登録処理中に停電等によりAC電源31が遮断された場合を示している。上述のように、終了処理では、CPU10のプログラムカウンタ、スタックポインタ、レジスタ、システムデータ等のシステムの動作状態を示すデータがメインメモリ13に退避され、バックアップ電源32のOFF前に更に不揮発性メモリであるハイバネーション用メモリ14に退避される。再度AC電源31が供給状態になった場合には、メインメモリ13上(又はハイバネーション用メモリ14)からプログラムカウンタ、スタックポインタ、レジスタ、システムデータ等がCPU10に読み出される。そのため、中断された登録処理プログラムの処理の実行位置をAC電源遮断前の状態に戻すことができ、図10に示すように、AC電源遮断前と同じ画面がメイン表示装置151に表示される。ユーザは、AC電源遮断前に行った登録をやり直すことなく、登録処理を継続して実行することが可能となる。
FIG. 10 shows screen display examples of the
また、バックアップ電源32のOFF前にメインメモリ13上のデータが不揮発メモリであるハイバネーション用メモリ14に退避されるので、大容量のバックアップ電源を搭載することなく、長期のAC電源遮断後に電源遮断前の状態にシステムを復帰させることが可能となる。
In addition, since the data on the
また、ハイバネーション処理が終了するまではAC電源遮断時におけるメインメモリ13の状態が保持され、ハイバネーション処理中には、CPU10によりAC電源31の電源状態が監視され、AC電源31が供給状態となった場合には、ハイバネーション処理を中断して起動処理に移行し、メインメモリ13に記憶されているシステム動作状態を示すデータをCPU10に書き戻してAC電源遮断前の状態で動作を復帰させる制御が行われる。具体的に、ハイバネーション処理は、書込みエリアの消去処理、書込み処理、書込み内容保証処理を含んで構成されるが、CPU10により、ハイバネーション用メモリ14における1ブロック毎のデータ消去中、書込み中にAC電源状態が監視されており、AC電源31が供給状態となった場合は、ハイバネーション処理を中断して起動処理のハイバネーション中断リスタート位置に移行する制御が行われる。従って、ハイバネーション処理中にAC電源31が供給状態となった場合、ハイバネーション処理の完了を待つことなく直ちにAC電源遮断前のシステム状態に復帰することが可能となる。
Further, the state of the
また、書込み内容保証処理では、メインメモリ13の退避対象データとハイバネーション用メモリ14に退避されたデータとの整合性をチェックするデータベリファイ処理の実施、書込んだバックアップデータのチェックサムの書込み、ハイバネーション完了フラグONの設定が行われるので、ハイバネーション用メモリ14に退避されたデータとハイバネーション用メモリ14からメインメモリ13に書き戻されるデータの整合性を保証することが可能となる。
In the write content guarantee process, a data verify process for checking the consistency between the save target data in the
また、ハイバネーション用メモリ14は、プログラム格納メモリ12とは別個に設けられているので、消去時にデータを選り分ける必要なくハイバネーション用メモリ14の全領域のデータを消去することが可能となる。そのため、システムに負荷をかけることなく、他の処理の実行と並行してハイバネーション用メモリ14のデータ消去を行うことが可能となる。
Further, since the
また、ハイバネーション処理中にはLED16が点滅されるので、ユーザはハイバネーション処理の終了を認識することが可能となり、修理時等にハイバネーション用メモリ14へ確実にデータを退避してから作業を開始することが可能となる。
Further, since the
(実施形態2)
次に、本発明の実施形態2について説明する。
実施形態2において、ECR1は、1日に1回所定時刻到来時にメインメモリ13に記憶されている売上データを始めとする各種データをサーバ100に送信しバックアップを行うスケジューラ機能を備えている。スケジューラ機能を実行すべき所定時刻は、ユーザが入力装置18の操作により設定可能であり、設定された時刻はメインメモリ13のユーザデータエリア136に格納されている。スケジューラ機能では、前日のスケジューラ機能実行後から当日のスケジューラ機能実行までの期間の売上データ等を送信対象としている。従来、このスケジューラ機能は、AC電源遮断期間中に所定時刻が到来した場合は、次にAC電源供給が再開された際に、AC電源遮断中の実行分がまとめて実行されていた。しかし、停電中や夏季休業のような長期休暇があった場合にはその間の取引(売上)は有り得ない。そこで、実施形態2においては、AC電源供給再開後のスケジューラ機能実行時において、AC電源遮断期間中のデータ送信をスキップする、即ち、起動期間中のデータのみを送信する動作を行う。
(Embodiment 2)
Next, Embodiment 2 of the present invention will be described.
In the second embodiment, the
実施形態2において、プログラム格納メモリ12には、上述の起動処理プログラムの他、図11に示す終了処理(終了処理Bとする)を実行するための終了処理Bプログラム、図12に示すスケジューラ機能実行処理を実行するためのスケジューラ機能実行処理プログラムが記憶されている。また、売上データには、売上のあった日付・時刻の情報が含まれるものとする。
その他のECR1の構成については、図1〜3を用いて実施形態1で説明したものと同様であるので説明を援用し、以下実施形態2の動作について説明する。
In the second embodiment, in the
Other configurations of the
図11に、実施形態2における終了処理Bのフローを示す。当該処理は、CPU10と終了処理Bプログラムとの協働によるソフトウエア処理により実現される。
FIG. 11 shows a flow of end processing B in the second embodiment. This process is realized by a software process in cooperation with the
終了処理Bにおいては、まず、RTC11から現在の日付及び時刻が取得され、システムデータ領域134に現在日付・時刻として書込まれる(ステップS41)。
ステップS42〜ステップS45の処理は、実施形態1において説明した図4のステップS1〜S4と同様であるので説明を省略する。
即ち、ステップS41でメインメモリ13のシステムデータ領域134に書込まれた現在日付・時刻は、ハイバネーション処理中にAC電源31の供給が再開されなければハイバネーション用メモリ14に書込まれる。
In the termination process B, first, the current date and time are acquired from the
The processing in steps S42 to S45 is the same as that in steps S1 to S4 in FIG.
That is, the current date / time written in the
終了処理Bが実行されAC電源31及びバックアップ用電源32の双方が遮断状態となった後、再度AC電源31が供給されると、CPU10により起動処理が実行される。起動処理は、実施形態1で図9a〜図9bを用いて説明したものと同様である。起動処理の実行によりハイバネーション用メモリ14に退避されていたデータはメインメモリ13に書き戻される。ハイバネーション用メモリ14には、AC電源遮断時に退避されたメインメモリ13のデータがそのまま保持される。
After the end process B is executed and both the
起動処理によりECR1が起動されると、図12に示すスケジューラ機能実行処理が行われる。当該処理は、CPU10とスケジューラ機能実行処理プログラムとの協働によるソフトウエア処理により実現される。
When ECR1 is activated by the activation process, a scheduler function execution process shown in FIG. 12 is performed. This processing is realized by software processing by cooperation between the
まず、RTC11より現在の日付及び時刻が取得され、メインメモリ13のシステムデータ領域134に現在日付・時刻が記憶される(ステップS51)。次いで、スケジューラ機能を実行すべき時刻の到来が待機される(ステップS52)。ステップS52では、RTC11から取得した現在時刻とユーザデータエリア136に格納されているスケジューラ機能を実行すべき時刻とが比較され、両者が一致したときにスケジューラ機能を実行すべき時刻が到来したと判断される。
First, the current date and time are acquired from the
スケジューラ機能を実行すべき時刻が到来したと判断されると(ステップS52;YES)、前回のスケジューラ機能実行日時がメインメモリ13のシステムデータ領域134から取得されるとともに(ステップS53)、前回のAC電源遮断時の日付・時刻、即ち、ハイバネーション用メモリ14に記憶されている現在日付・時刻が取得される(ステップS54)。そして、前回のスケジューラ機能実行日時以降の起動期間が算出される(ステップS55)。具体的には、前回のスケジューラ機能実行日時からハイバネーション用メモリ14に記憶されている現在日付・時刻までの期間、及びステップS51で取得された日付・時刻から現在日付・時刻までの期間が起動期間として算出される。
If it is determined that the time to execute the scheduler function has come (step S52; YES), the previous scheduler function execution date and time is acquired from the
次いで、メインメモリ13が参照され、起動期間内の売上データ等であって、今回のスケジューラ機能による送信対象外の期間の未送信データが存在するか否かが判断され、存在すると判断されると(ステップS56;YES)、該当するデータ及び今回の送信対象のデータが通信部20を介してサーバ100に送信され(ステップS57)、処理はステップS59に移行する。一方、起動期間内の売上データ等であって今回のスケジューラ機能による送信対象外の期間の未送信データが存在しないと判断されると(ステップS56;NO)、今回のスケジューラ機能による送信対象のデータが通信部20を介してサーバ100に送信され(ステップS58)、処理はステップS59に移行する。
Next, the
ステップS59では、通信部20を介してAC電源遮断期間がサーバ100に通知される(ステップS59)。そして、RTC11から現在日付及び時刻が取得され、今回のスケジューラ機能実行日時としてメインメモリ13のシステムデータ領域134に記憶され(ステップS60)、本処理は終了する。
In step S59, the AC power supply cutoff period is notified to the
以上説明したように、実施形態2において、ECR1は、AC電源供給再開後のスケジューラ機能実行時において、起動期間中のデータのみを送信する動作を行うとともに、AC電源遮断期間をサーバに通知するので、無駄なスケジューラ機能の実行を行わず、かつ、サーバ100側でのデータ管理に支障をきたさないようにすることが可能となる。
As described above, in the second embodiment, the
(実施形態3)
次に、本発明の実施形態3について説明する。
実施形態1、2においては、ハイバネーション処理におけるデータの退避先はハイバネーション用メモリ14としたが、実施形態3では、バックアップ先(退避先)をハイバネーション用メモリ14とするか外部ストレージ19aとするかをユーザが選択可能である。
(Embodiment 3)
Next, a third embodiment of the present invention will be described.
In the first and second embodiments, the data save destination in the hibernation process is the
実施形態3において、プログラム格納メモリ12には、図13に示すバックアップ先設定処理を実行するためのバックアップ先設定プログラム、図14に示す終了処理Cを実行するための終了処理Cプログラム、図15a〜図15bに示す起動処理Bを実行するための起動処理Bプログラムが記憶されている。また、特に図示はしないが、プログラム格納メモリ12は、後述するバックアップ先設定情報を格納するためのバックアップ先設定情報格納領域を有する。
その他のECR1の構成については、図1、2を用いて実施形態1で説明したものと同様であるので説明を援用し、以下実施形態2の動作について説明する。
In the third embodiment, the
Other configurations of the
図13を参照してバックアップ先設定処理について説明する。当該処理は、入力装置18によりバックアップ先設定の指示が入力された際にCPU10とバックアップ先設定プログラムとの協働によるソフトウエア処理により実現される。
The backup destination setting process will be described with reference to FIG. This processing is realized by software processing by the cooperation of the
まず、メイン表示装置151に、AC電源遮断時のデータのバックアップ先をハイバネーション用メモリ14のみとするか(通常型)、ハイバネーション用メモリ14又は外部ストレージ19aから選択するか(選択型)を選択するための画面(選択手段)がメイン表示装置151に表示され、入力装置18により通常型が選択されると(ステップS71;NO)、「通常型」が選択されたことを示すバックアップ先設定情報がプログラム格納メモリ12のバックアップ先設定情報格納領域に格納され(ステップS76)、本処理は終了する。
First, the
一方、選択型が選択されると(ステップS71;YES)、「選択型」が選択されたことを示すバックアップ先設定情報がプログラム格納メモリ12のバックアップ先設定情報格納領域に格納される(ステップS72)。また、メイン表示装置151にバックアップ先候補の一覧が表示される(ステップS73)。ここでは、バックアップ先としてハイバネーション用メモリ14又はストレージI/F19を介して接続されている外部ストレージ19aがバックアップ先候補として表示される。
On the other hand, when the selection type is selected (step S71; YES), the backup destination setting information indicating that the “selection type” is selected is stored in the backup destination setting information storage area of the program storage memory 12 (step S72). ). In addition, a list of backup destination candidates is displayed on the main display device 151 (step S73). Here, the
次いで、入力装置18によるバックアップ先の選択が待機され、バックアップ先が選択されると(ステップS74;YES)、選択されたバックアップ先の情報がバックアップ先設定情報格納領域に格納されているバックアップ先設定情報に追加され(ステップS75)、本処理は終了する。
Next, the selection of the backup destination by the
次に、図14を参照して終了処理Cについて説明する。当該処理は、AC電源31の電源が遮断された際にCPU10と終了処理Cプログラムとの協働によるソフトウエア処理により実現される。
Next, the termination process C will be described with reference to FIG. This processing is realized by software processing by cooperation between the
まず、サスペンド処理が実行され、CPU10に記憶されているプログラムカウンタ、スタックポインタ、レジスタ、システムデータ等がメインメモリ13のサスペンド用エリア132に退避(記憶)される(ステップS81)。
First, the suspend process is executed, and the program counter, stack pointer, register, system data, etc. stored in the
次いで、バックアップ用電源ON/OFFスイッチ切替制御信号によりスイッチ35がONに切り替えられることにより、バックアップ用電源32がONに切り替えられる(ステップS82)。
Next, the
次いで、RTC11により現在日付・時刻が取得され、メインメモリ13のシステムデータ領域134に記憶される(ステップS83)。次いで、プログラム格納メモリ12のバックアップ設定情報格納領域からバックアップ先設定情報が読み出され、(ステップS84)、読み出されたバックアップ先設定情報に基づいてバックアップ先が判断される(ステップS85)。バックアップ先がハイバネーション用メモリ14である場合(ステップS85;ハイバネーション用メモリ)、ハイバネーション用メモリ14へのハイバネーション処理が実行される(ステップS86)。ステップS86におけるハイバネーション処理は、実施形態1において図5〜図8で説明したものと同様であるので説明を省略する。
Next, the current date / time is acquired by the
バックアップ先が外部ストレージ19aである場合(ステップS85;外部ストレージ)、外部ストレージ19aへのハイバネーション処理が実行される(ステップS87)。ステップS87の処理は、実施形態1において図5〜図8で説明したものと略同様であり、ハイバネーション用メモリ14に対して行われる処理が外部ストレージ19aに対して行われる点のみが異なる。外部ストレージ19aに書込まれたバックアップデータは、バックアップデータであることを示す識別子とステップS83で取得された日付及び時刻を示すファイル名が付されたファイルで保存される。以下、バックアップデータのファイルをバックアップファイルという。
When the backup destination is the
ハイバネーション処理が終了すると、スイッチ35によりバックアップ用電源32がOFFに切替られ(ステップS88)、終了処理Cは終了する。なお、ハイバネーション処理中にAC電源31が供給状態となった場合は、図15aに示す起動処理B(ハイバネーション中断リスタート)へ移行する。
When the hibernation process is completed, the
次に、図15a〜図15bを参照して起動処理Bについて説明する。当該処理は、終了処理C後、AC電源31が電源供給状態となったときにCPU10と起動処理Bプログラムとの協働によるソフトウエア処理により実現される。
Next, the activation process B will be described with reference to FIGS. 15a to 15b. This process is realized by a software process in cooperation with the
まず、ステップS90〜S98の処理が実行される。ステップS90〜S98の処理は、図9aのステップS10〜18の処理と同様であるので説明を省略する。 First, steps S90 to S98 are executed. The processing in steps S90 to S98 is the same as the processing in steps S10 to S18 in FIG.
ステップS99においては、図16に示す復帰データ選択処理が実行される。
復帰データ選択処理においては、まず、プログラム格納メモリ12のバックアップ設定情報格納領域からバックアップ先設定情報が読み出され、読み出されたバックアップ先設定情報に基づいて、バックアップ先の選択型設定がなされているか否かが判断される(ステップS401)。選択型設定がなされていないと判断されると(ステップS401;NO)、処理は図15aのステップS100に移行する。選択型設定がなされていると判断されると(ステップS401;YES)、バックアップデータの検索が行われる(ステップS402)。具体的には、ハイバネーション用メモリ14のバックアップデータと、外部ストレージ19aに記憶されているバックアップファイルが検索される。
In step S99, the return data selection process shown in FIG. 16 is executed.
In the return data selection process, first, the backup destination setting information is read from the backup setting information storage area of the
検索の結果、一つ以上のバックアップデータが検索された場合(ステップS403;YES)、メイン表示装置151にバックアップデータの日付一覧が表示される(ステップS404)。表示された一覧の中からユーザにより入力装置18を介してシステムの復帰に用いるバックアップデータが選択されると(ステップS405)、処理は図15aのステップS100に移行する。 If one or more backup data is searched as a result of the search (step S403; YES), a list of backup data dates is displayed on the main display device 151 (step S404). When the user selects backup data to be used for system restoration from the displayed list via the input device 18 (step S405), the process proceeds to step S100 in FIG. 15a.
図15a〜図15bにおいて、ステップS100〜S119の処理は、復帰データ選択処理でバックアップデータが選択された場合に選択されたバックアップデータでメインメモリ13への書き戻しが行われるほかは、図9a〜図9bのステップS19〜S38と同様であるので説明を援用する。
一方、ステップS403においてバックアップデータが検索されなかった場合は(ステップS403;NO)、処理は図15bのステップS117に移行し、INIT状態にて起動され、本処理は終了する。
15a to 15b, the processes in steps S100 to S119 are the same as those in steps S100 to S119 except that the backup data selected when the backup data is selected in the return data selection process is written back to the
On the other hand, when backup data is not searched in step S403 (step S403; NO), the process proceeds to step S117 in FIG. 15b, is started in the INIT state, and the process ends.
以上説明したように、実施形態3におけるECR1によれば、AC電源遮断時のデータのバックアップ先(退避先)をハイバネーション用メモリ14又は外部ストレージ19aの中からユーザが選択し設定しておくことができ、選択されたバックアップ先に対しハイバネーション処理が実行されるので、ECR1から取り外し可能な外部ストレージ19aにバックアップデータを書込むことが可能となる。また、データを復帰する際に、バックアップデータの一覧が表示され、復帰に使用するバックアップデータをユーザが選択することができるので、前回のAC電源遮断の直前の状態のみならず、ユーザが所望する時点のAC電源遮断前の状態にシステム動作状態を復帰させることが可能となる。
As described above, according to the
なお、上記実施形態1〜3における記述内容は、本発明に係るECR1の好適な一例であり、これに限定されるものではない。
例えば、メインメモリ13に記憶されるデータは一例であり、これに限定されない。
その他、ECR1を構成する各装置の細部構成及び細部動作に関しても、発明の趣旨を逸脱することのない範囲で適宜変更可能である。
In addition, the description content in the said Embodiment 1-3 is a suitable example of ECR1 which concerns on this invention, and is not limited to this.
For example, the data stored in the
In addition, the detailed configuration and detailed operation of each device constituting the
1 ECR
10 CPU
11 RTC
12 プログラム格納メモリ
13 メインメモリ
131 起動処理・終了処理用ワークエリア
132 サスペンド用エリア
133 コピー領域
134 システムデータ領域
135 設定データ領域
136 ユーザデータ領域
14 ハイバネーション用メモリ
141 ヘッダ領域
142 バックアップ領域
143 チェックサム格納領域
151 メイン表示装置
152 サブ表示装置
16 LED
17 印字装置
18 入力装置
19 ストレージI/F
19a 外部ストレージ
20 通信部
1 ECR
10 CPU
11 RTC
12
17
Claims (9)
前記第1の退避処理手段により前記揮発性記憶手段に退避された前記システムの動作状態を示すデータを不揮発性記憶手段に退避させる第2の退避処理手段と、
前記主電源の電源状態を監視する電源監視手段と、
前記第2の退避処理手段による退避処理中に前記電源監視手段により前記主電源が供給状態となったことが検出された際に、前記第2の退避処理手段による退避処理を中断させ、前記揮発性記憶手段に退避されている前記システムの動作状態を示すデータに基づいて前記主電源の遮断前の状態にシステムを復帰させる制御手段と、
を備える売上データ処理装置。 First saving processing means for saving data indicating an operating state of the system to the volatile storage means when the main power supply is shut off;
Second save processing means for saving data indicating the operating state of the system saved in the volatile storage means by the first save processing means to the nonvolatile storage means;
Power monitoring means for monitoring the power state of the main power supply;
When the power supply monitoring unit detects that the main power supply is being supplied during the saving process by the second saving processing unit, the saving process by the second saving processing unit is interrupted, and the volatile Control means for returning the system to the state before the main power supply is shut off based on data indicating the operating state of the system saved in the storage device;
A sales data processing apparatus.
前記揮発性記憶手段に退避された前記システムの動作状態を示すデータの退避先を前記不揮発性記憶手段とするか前記接続手段により接続された外部記憶手段とするかを選択するための選択手段を備え、
前記第2の退避処理手段は、前記選択手段により選択された退避先に前記システムの動作状態を示すデータを退避させる請求項1に記載の売上データ処理装置。 Connection means for connecting external storage means;
Selection means for selecting whether to save the data indicating the operating state of the system saved in the volatile storage means as the nonvolatile storage means or the external storage means connected by the connection means Prepared,
The sales data processing apparatus according to claim 1, wherein the second save processing unit saves data indicating an operation state of the system to a save destination selected by the selection unit.
主電源が遮断された際に、システムの動作状態を示すデータを揮発性記憶手段に退避させる第1の退避処理手段、
前記第1の退避処理手段により前記揮発性記憶手段に退避された前記システムの動作状態を示すデータを不揮発性記憶手段に退避させる第2の退避処理手段、
電源監視手段により前記第2の退避処理手段による退避処理中に前記主電源が供給状態となったことが検出された際に、前記第2の退避処理手段による退避処理を中断させ、前記揮発性記憶手段に退避されている前記システムの動作状態を示すデータに基づいて前記主電源の遮断前の状態にシステムを復帰させる制御手段、
として機能させるためのプログラム。 A computer used in a sales data processing device
First evacuation processing means for evacuating data indicating the operating state of the system to the volatile storage means when the main power supply is shut off;
Second save processing means for saving data indicating the operating state of the system saved in the volatile storage means by the first save processing means to the nonvolatile storage means;
When it is detected by the power supply monitoring means that the main power supply has been supplied during the saving process by the second saving processing means, the saving process by the second saving processing means is interrupted, and the volatility Control means for returning the system to a state before the main power supply is shut off based on data indicating the operating state of the system saved in the storage means;
Program to function as.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008187361A JP2010026789A (en) | 2008-07-18 | 2008-07-18 | Sales data processor and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008187361A JP2010026789A (en) | 2008-07-18 | 2008-07-18 | Sales data processor and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010026789A true JP2010026789A (en) | 2010-02-04 |
JP2010026789A5 JP2010026789A5 (en) | 2011-06-30 |
Family
ID=41732569
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008187361A Pending JP2010026789A (en) | 2008-07-18 | 2008-07-18 | Sales data processor and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010026789A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010128537A (en) * | 2008-11-25 | 2010-06-10 | Casio Computer Co Ltd | Sales data processor and program |
JP2013088911A (en) * | 2011-10-14 | 2013-05-13 | Lenovo Singapore Pte Ltd | Computing device, synchronization method, and program executable by computer |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0651858A (en) * | 1992-07-30 | 1994-02-25 | Hitachi Ltd | Program interrupting/restarting system |
JPH06266478A (en) * | 1993-03-11 | 1994-09-22 | Hitachi Ltd | Computer system |
JPH09152918A (en) * | 1995-11-29 | 1997-06-10 | Nec Corp | Flash memory protecting mechanism and flash memory controller using same and flash memory protecting method |
JPH1185332A (en) * | 1997-09-04 | 1999-03-30 | Toshiba Corp | Information processor, automatic backup method for generated data, and recording medium programming and storing the method |
JP2004070678A (en) * | 2002-08-07 | 2004-03-04 | Toshiba Corp | Information processor and resume error detection method |
-
2008
- 2008-07-18 JP JP2008187361A patent/JP2010026789A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0651858A (en) * | 1992-07-30 | 1994-02-25 | Hitachi Ltd | Program interrupting/restarting system |
JPH06266478A (en) * | 1993-03-11 | 1994-09-22 | Hitachi Ltd | Computer system |
JPH09152918A (en) * | 1995-11-29 | 1997-06-10 | Nec Corp | Flash memory protecting mechanism and flash memory controller using same and flash memory protecting method |
JPH1185332A (en) * | 1997-09-04 | 1999-03-30 | Toshiba Corp | Information processor, automatic backup method for generated data, and recording medium programming and storing the method |
JP2004070678A (en) * | 2002-08-07 | 2004-03-04 | Toshiba Corp | Information processor and resume error detection method |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010128537A (en) * | 2008-11-25 | 2010-06-10 | Casio Computer Co Ltd | Sales data processor and program |
JP2013088911A (en) * | 2011-10-14 | 2013-05-13 | Lenovo Singapore Pte Ltd | Computing device, synchronization method, and program executable by computer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4768237B2 (en) | Portable electronic device and method for controlling portable electronic device | |
JP5460167B2 (en) | Information processing apparatus, control method for information processing apparatus, and control program | |
US8528815B2 (en) | Image forming apparatus and control method of image forming apparatus | |
JP4820271B2 (en) | Image processing apparatus and image processing method | |
CN101615162A (en) | Memory Management Unit, image forming apparatus, storage management method and program | |
JP2010026791A (en) | Sales data processor and program | |
JP2012216014A (en) | Information processor and data protection method | |
JP2010026789A (en) | Sales data processor and program | |
US20160062838A1 (en) | Information processing apparatus, method of controlling the same, and storage medium | |
JP5349104B2 (en) | Electronic device and program update method | |
JP5444698B2 (en) | Data processing apparatus and program | |
JP2009009323A (en) | Setting device, electronic equipment, and setting program | |
JP4648097B2 (en) | Registry information repair method and information processing apparatus | |
JP2023068538A (en) | Information processing apparatus, method for controlling the same, and program | |
JP6000655B2 (en) | Information processing apparatus, information processing apparatus control method, and program | |
JP2012088780A (en) | Information processor, information processor control method and program | |
JP2008009494A (en) | Image forming device | |
TW200919173A (en) | Computer system and firmware recovery method for computer system | |
JP5341947B2 (en) | IC card, control method of IC card, and control method of portable electronic device | |
JP2011079138A (en) | Image forming apparatus and method for restoring data | |
JP4741390B2 (en) | Image processing device | |
JP2012113382A (en) | Image forming device | |
JP2011203778A (en) | Electronic apparatus, and program for the same | |
JP2008287585A (en) | Data processing equipment and method for handling power failure | |
JP3812281B2 (en) | Printing device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110512 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110512 |
|
RD02 | Notification of acceptance of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7422 Effective date: 20110512 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120618 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120626 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20121106 |