JP2008276350A - Electronic apparatus, printer, method for setting reset validation in electronic apparatus, and program - Google Patents

Electronic apparatus, printer, method for setting reset validation in electronic apparatus, and program Download PDF

Info

Publication number
JP2008276350A
JP2008276350A JP2007116513A JP2007116513A JP2008276350A JP 2008276350 A JP2008276350 A JP 2008276350A JP 2007116513 A JP2007116513 A JP 2007116513A JP 2007116513 A JP2007116513 A JP 2007116513A JP 2008276350 A JP2008276350 A JP 2008276350A
Authority
JP
Japan
Prior art keywords
reset
setting
valid
runaway
software
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2007116513A
Other languages
Japanese (ja)
Other versions
JP4877050B2 (en
Inventor
Tadayuki Okamoto
忠之 岡本
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007116513A priority Critical patent/JP4877050B2/en
Publication of JP2008276350A publication Critical patent/JP2008276350A/en
Application granted granted Critical
Publication of JP4877050B2 publication Critical patent/JP4877050B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an electronic apparatus, etc., capable of inexpensively and reliably setting a reset function to be valid in the case of the runaway of software. <P>SOLUTION: The electronic apparatus includes: a reset circuit 12 for resetting a system in response to a reset command from a POS terminal 100; a validation/invalidation setting circuit 11 for setting the reset function to be valid or invalid; and a watch dog timer 24 for detecting the runaway of the software. When the watch dog timer 24 detects the runaway of the software, a printer 1 for POS forcibly allows the validation/invalidation setting circuit 11 to perform validation setting. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、リセット機能の有効/無効を切り替え可能な電子機器、プリンタ、電子機器のリセット有効設定方法およびプログラムに関するものである。   The present invention relates to an electronic device, a printer, a reset effective setting method for an electronic device, and a program that can switch the validity / invalidity of a reset function.

従来、POS端末と接続されて用いられ、レシートやジャーナルを印刷するPOS用プリンタが知られている(例えば、特許文献1)。図5は、この種のPOS用プリンタ201の簡易構成図である。同図に示すように、従来のPOS用プリンタ201は、ディップスイッチ211によってリセット機能の有効/無効を切り替えられるようになっている。ディップスイッチ211の設定が「リセット有効」の場合、POS端末100から受信したリセット信号がリセット回路212に入力され、マイクロプロセッサ(MPU)213によってシステムリセットされる。一方、ディップスイッチ211の設定が「リセット無効」の場合、POS端末100から受信したリセット信号は無視される。   Conventionally, a POS printer that is used in connection with a POS terminal and prints a receipt or a journal is known (for example, Patent Document 1). FIG. 5 is a simplified configuration diagram of this kind of POS printer 201. As shown in the figure, the conventional POS printer 201 can be switched between valid / invalid of the reset function by a dip switch 211. When the setting of the dip switch 211 is “reset valid”, the reset signal received from the POS terminal 100 is input to the reset circuit 212 and the system is reset by the microprocessor (MPU) 213. On the other hand, when the setting of the dip switch 211 is “reset invalid”, the reset signal received from the POS terminal 100 is ignored.

このように、従来のPOS用プリンタは、POS端末から送信されるリセット信号の有効/無効をディップスイッチによって設定できるようになっているものが多い。その理由としては、POS用プリンタを利用する小売店によっては、リセット機能を有効にすることの利点よりも、POS用プリンタに対し誤ってリセット信号が送信された場合の誤動作による不具合が懸念されるためであり、そのような場合に「リセット無効」に設定する必要があることが挙げられる。また、プリンタによっては、リセット用の信号線を他の機能の信号線と兼用しているものがあり、そのような構成であって他の機能を優先する場合も「リセット無効」に設定する必要がある。
特開2000−194948号公報
As described above, many conventional POS printers can set the validity / invalidity of the reset signal transmitted from the POS terminal by the dip switch. The reason for this is that depending on the retail store that uses the POS printer, there is a concern about a malfunction caused by a malfunction when a reset signal is erroneously transmitted to the POS printer, rather than the advantage of enabling the reset function. Therefore, in such a case, it is necessary to set “reset invalid”. Some printers also use reset signal lines as signal lines for other functions. In such a configuration, even if priority is given to other functions, it is necessary to set "Reset invalid". There is.
JP 2000-194948 A

ところが、上記のようにディップスイッチを用いてリセット機能の有効/無効を切替える場合、設定作業に手間がかかる(ディップスイッチの操作のためにプリンタを移動させたり、場合によっては器具を必要としたりする)と共に、ディップスイッチの搭載にコストがかかるといった問題がある。   However, when the enable / disable of the reset function is switched using the dip switch as described above, the setting work takes time (the printer is moved for the operation of the dip switch, or an instrument is required depending on the case). In addition, there is a problem that it is expensive to mount a dip switch.

そこで、ソフト的にセット機能の有効/無効を切り替えることも想定できるが、有効設定の際、ソフトウェアの暴走によって「リセット無効」に切り替わってしまいリセット機能が働かない虞がある。このように、ソフト的に有効/無効設定を切り替えようとすると、ソフトウェアの暴走時にこそリセット機能が必要となるにも拘らず、ソフトウェアの暴走時にはリセットが正常に機能するか保証ができないという問題がある。   Therefore, it can be assumed that the set function is enabled / disabled in software. However, when the setting is enabled, there is a possibility that the software will be switched to “reset invalid” due to runaway of the software and the reset function may not work. In this way, when trying to switch between valid / invalid settings in software, there is a problem that it is not possible to guarantee that the reset will function normally when the software runs out of control even though the reset function is required only when the software runs out of control. is there.

本発明は、上記の問題点に鑑みたものであり、低コストで、且つソフトウェアの暴走時において確実にリセット機能を有効に設定できる電子機器、プリンタ、電子機器のリセット有効設定方法およびプログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems, and provides an electronic device, a printer, a reset effective setting method for an electronic device, and a program capable of reliably setting a reset function at low cost and in the event of software runaway. The purpose is to do.

本発明の電子機器は、外部装置からのリセット指令に従ってシステムリセットするリセット手段と、リセット手段によるリセット機能を、有効または無効のいずれかに設定する有効/無効設定手段と、ソフトウェアの暴走を、ハードウェアを用いて検出する暴走検出手段と、を備え、有効/無効設定手段は、暴走検出手段によりソフトウェアの暴走が検出された場合、ハードウェアを用いて強制的に有効に設定することを特徴とする。   The electronic apparatus according to the present invention includes a reset unit that resets a system in accordance with a reset command from an external device, a valid / invalid setting unit that sets a reset function by the reset unit to either valid or invalid, and software runaway. Runaway detection means for detecting using software, and the valid / invalid setting means is configured to forcibly set valid using hardware when the software runaway is detected by the runaway detection means. To do.

また、本発明の電子機器のリセット有効設定方法は、外部装置からのリセット指令に従って、リセット機能を有効または無効のいずれかに設定可能な電子機器のリセット有効設定方法であって、電子機器が、機器内のソフトウェアの暴走を、ハードウェアを用いて検出するステップと、ソフトウェアの暴走を検出した場合、ハードウェアを用いて強制的に有効に設定するステップと、を実行することを特徴とする。   The electronic device reset valid setting method of the present invention is an electronic device reset valid setting method capable of setting the reset function to either valid or invalid according to a reset command from an external device. The steps of detecting a software runaway in the device using hardware, and forcibly setting to effective using the hardware when the software runaway is detected, are executed.

これらの構成によれば、暴走検出手段によりソフトウェアの暴走が検出された場合、リセット機能の有効/無効の設定を、ハードウェアを用いて強制的に有効にするため、ソフトウェアの暴走時であっても確実に「リセット有効」に設定できる。つまり、ソフトウェアを用いてリセット機能の有効/無効を切り替える構成にすると、有効設定の際、ソフトウェアの暴走によって「リセット無効」に切り替わり、リセット機能が働かなくなる虞があるが、本構成によればそういった問題を解消できる。また、ディップスイッチを必要としないため、リセット有効/無効の設定機能を搭載した場合のコストアップを抑えることができる。
なお、これらの構成によれば、無効設定していた場合も、ソフトウェアの暴走検出によって、オペレータが意図せず「リセット有効」に設定されてしまうが、無効設定の場合にはリセット機能が使用されていない可能性が高く、ソフトウェアの暴走時は動作自体が保障されないため実害は無い。
According to these configurations, when software runaway is detected by the runaway detection means, the setting of enabling / disabling the reset function is forcibly enabled using hardware. Can also be reliably set to “Reset Enabled”. In other words, if the configuration is used to enable / disable the reset function using software, it may switch to “reset invalid” due to a software runaway during the effective setting, and the reset function may not work. The problem can be solved. Further, since no dip switch is required, it is possible to suppress an increase in cost when a reset valid / invalid setting function is installed.
According to these configurations, even if the setting is invalid, the operator will unintentionally set “Reset Enabled” due to software runaway detection. However, in the case of the invalid setting, the reset function is used. There is a high possibility that the operation is not guaranteed when the software runs out of control.

この場合、暴走検出手段は、リセット機能を省略したウォッチドッグタイマにより実現されることが好ましい。   In this case, the runaway detection means is preferably realized by a watchdog timer that omits the reset function.

この構成によれば、既存の技術を用いて、ソフトウェアの暴走を検出することができる。
なお、「ウォッチドッグタイマ」とは、システム上で動作している各アプリケーションに対して定期的に信号を送り、各アプリケーションからの返信を受けることにより、システムが正常に動作しているか否かを監視するためのデバイスであり、信号を送った後、所定時間が経過しても返信が無い場合は、そのアプリケーションが異常状態(ソフトウェアの暴走を含む)であるものとして、CPUに割り込み処理をかけてシステムリセット(再起動)する。すなわち、一般的に「ウォッチドッグタイマ」とは、システムが正常に動作しているか否かを監視する監視機能と、異常状態を検出したときにシステムリセットするリセット機能とを併せ持つものである。したがって、本構成では、これらウォッチドッグタイマの2つの機能のうち、監視機能のみを利用することを特徴とするものである。
According to this configuration, it is possible to detect a software runaway using existing technology.
The “watchdog timer” is a function that periodically sends a signal to each application running on the system and receives a reply from each application to determine whether the system is operating normally. If the device is a device for monitoring and no response is returned after a signal has been sent, the application is assumed to be in an abnormal state (including software runaway) and the CPU is interrupted. System reset (restart). That is, the “watchdog timer” generally has a monitoring function for monitoring whether or not the system is operating normally and a reset function for resetting the system when an abnormal state is detected. Therefore, this configuration is characterized in that only the monitoring function is used among these two functions of the watchdog timer.

本発明のプリンタは、上記に記載の電子機器における各手段を備えたことを特徴とする。   The printer of the present invention is characterized by including each means in the electronic apparatus described above.

上記に記載のプリンタにおいて、外部装置は、POS端末であることが好ましい。   In the printer described above, the external device is preferably a POS terminal.

本発明のプログラムは、コンピュータに、上記に記載の電子機器のリセット有効設定方法における各ステップを実行させるためのものであることを特徴とする。   The program of the present invention is a program for causing a computer to execute each step in the electronic device reset valid setting method described above.

これらを用いることにより、低コストで、且つソフトウェアの暴走時において確実にリセット機能を有効に設定できる電子機器およびPOS用プリンタを実現することができる。   By using these, it is possible to realize an electronic device and a POS printer that can reliably set the reset function reliably at low cost and in the event of software runaway.

以下、本発明の一実施形態に係る電子機器、プリンタ、電子機器のリセット有効設定方法およびプログラムについて説明する。本実施形態では、本発明の電子機器およびプリンタを、POS端末やECRと接続され、レシート印刷やジャーナル印刷を目的として用いられるPOS用プリンタに適用した場合を例示する。   Hereinafter, an electronic device, a printer, an electronic device reset valid setting method, and a program according to an embodiment of the present invention will be described. In the present embodiment, the case where the electronic device and the printer of the present invention are applied to a POS printer connected to a POS terminal or ECR and used for the purpose of receipt printing or journal printing is illustrated.

図1は、POS端末100およびPOS用プリンタ1から成るPOSシステムSYのシステム構成図である。同図に示すように、POS用プリンタ1は、有効/無効設定回路11、リセット回路12(リセット手段)、マイクロプロセッサ(以下、「MPU」と称する)13および印刷機構14を備えている。   FIG. 1 is a system configuration diagram of a POS system SY including a POS terminal 100 and a POS printer 1. As shown in FIG. 1, the POS printer 1 includes a valid / invalid setting circuit 11, a reset circuit 12 (reset means), a microprocessor (hereinafter referred to as “MPU”) 13, and a printing mechanism 14.

有効/無効設定回路11は、POS端末100(外部装置)からのリセット指令に従ってシステムリセット(再起動)させる機能であるリセット機能を有効とする有効設定と、当該リセット機能を無効とする無効設定と、のいずれかに設定するための回路である。なお、有効/無効の切り替えは、MPU13からの指令(MPU13から送信される有効/無効設定信号の取得や、MPU13からの暴走検出出力)に基づいて行うものであり、請求項における「有効/無効設定手段」とは、これらMPU13および有効/無効設定回路11により実現される。具体的な構成については、図2を参照して後述する。   The valid / invalid setting circuit 11 is a valid setting for enabling a reset function, which is a function of causing a system reset (restart) in accordance with a reset command from the POS terminal 100 (external device), and an invalid setting for invalidating the reset function. This is a circuit for setting to any one of the above. The switching between valid / invalid is based on a command from the MPU 13 (acquisition of a valid / invalid setting signal transmitted from the MPU 13 or a runaway detection output from the MPU 13). The “setting means” is realized by the MPU 13 and the valid / invalid setting circuit 11. A specific configuration will be described later with reference to FIG.

リセット回路12は、POS用プリンタ1をシステムリセットするための回路である。リセット回路12は、POS端末100からのリセット指令に対しては、有効/無効設定回路11においてリセット機能が有効に設定されている場合のみシステムリセットできるようになっている。また、POS用プリンタ1に搭載されている不図示のリセットボタンの押下に対しては、有効/無効設定回路11における設定に関わらず、システムリセットを行う。   The reset circuit 12 is a circuit for system resetting the POS printer 1. In response to a reset command from the POS terminal 100, the reset circuit 12 can perform a system reset only when the reset function is set to be valid in the valid / invalid setting circuit 11. In addition, when a reset button (not shown) mounted on the POS printer 1 is pressed, a system reset is performed regardless of the setting in the valid / invalid setting circuit 11.

なお、リセット回路12としては、電源電圧低下の監視機能を有する専用リセットICを用いることが好ましい。この構成によれば、電源が所定値以下となった場合、一定時間リセット信号を出力することによりMPU13を強制停止させて誤動作を防止することができる。なお、リセット回路12として、CR時定数によるディレイ回路など、他の回路を適用することも可能である。   As the reset circuit 12, it is preferable to use a dedicated reset IC having a power supply voltage drop monitoring function. According to this configuration, when the power source becomes a predetermined value or less, the MPU 13 can be forcibly stopped by outputting a reset signal for a certain period of time to prevent malfunction. As the reset circuit 12, another circuit such as a delay circuit using a CR time constant can be applied.

MPU13は、CPU21、RAM22、ROM23、ウォッチドッグタイマ24(暴走検出手段)および外部バス25を有している。   The MPU 13 has a CPU 21, a RAM 22, a ROM 23, a watchdog timer 24 (runaway detection means), and an external bus 25.

CPU21は、POS用プリンタ1の主制御装置として機能する。RAM22は、外部バス25を介することなくCPU21と直接接続され、CPU21が各種制御を行うためのワークエリアとして用いられる。   The CPU 21 functions as a main control device of the POS printer 1. The RAM 22 is directly connected to the CPU 21 without going through the external bus 25, and is used as a work area for the CPU 21 to perform various controls.

ROM23は、CPU21と外部バス25を介して接続され、CPU21が各種処理を実行するための制御プログラムおよび制御データを記憶している。この制御プログラムには、後述するリセット設定処理(POS端末100からのリセット設定指令や暴走検出に伴って、リセット機能を設定する処理,図3参照)や、リセット処理(POS端末100からのリセット指令に従ってシステムリセットする処理,図4参照)を実行するためのプログラムも含まれる。   The ROM 23 is connected to the CPU 21 via the external bus 25 and stores a control program and control data for the CPU 21 to execute various processes. This control program includes a reset setting process (a reset setting command from the POS terminal 100 and a process for setting a reset function when a runaway is detected, see FIG. 3) and a reset process (a reset command from the POS terminal 100). And a program for executing a system resetting process (see FIG. 4).

ウォッチドッグタイマ24は、ソフトウェアの暴走を検出するためのデバイスであり、CPU21と外部バス25を介して接続されている。本実施形態におけるウォッチドッグタイマ24は、ソフトウェアの暴走を監視する監視機能のみを有するものである。つまり、一般的に「ウォッチドッグタイマ」とは、システムが正常に動作しているか否かを監視する監視機能と、異常状態を検出したときにシステムリセットするリセット機能とを併せ持つものを指すが、本実施形態では、一般的なウォッチドッグタイマのこれら2つの機能のうち、監視機能のみを利用する。   The watchdog timer 24 is a device for detecting software runaway, and is connected to the CPU 21 via the external bus 25. The watchdog timer 24 in this embodiment has only a monitoring function for monitoring software runaway. In other words, in general, a "watchdog timer" refers to one that has both a monitoring function that monitors whether the system is operating normally and a reset function that resets the system when an abnormal condition is detected. In this embodiment, only the monitoring function is used among these two functions of a general watchdog timer.

ウォッチドッグタイマ24(監視機能)は、暴走検出回路31および専用RC発信回路32により実現される。このように、専用RC発信回路32を有することで、スリープ状態でも監視を続行することができるようになっている。また、暴走検出回路31は、動作している各制御プログラム(アプリケーション)に対して定期的に信号を送り、各制御プログラムからの返信を受けることにより、システムが正常に動作しているか否かを監視する。また、信号を送った後、所定時間が経過しても返信が無い場合は、その制御プログラムが異常状態である(暴走している)と判断し、CPU21に対しその旨の信号を出力する。CPU21は、当該制御プログラムの異常を示す信号の取得によって、有効/無効設定回路11の設定を強制的に有効にする。   The watchdog timer 24 (monitoring function) is realized by the runaway detection circuit 31 and the dedicated RC transmission circuit 32. Thus, by having the dedicated RC transmission circuit 32, monitoring can be continued even in the sleep state. The runaway detection circuit 31 periodically sends a signal to each operating control program (application) and receives a reply from each control program to determine whether the system is operating normally. Monitor. If no reply is received after a predetermined time has passed after sending the signal, it is determined that the control program is in an abnormal state (runaway) and a signal to that effect is output to the CPU 21. The CPU 21 forcibly enables the setting of the valid / invalid setting circuit 11 by acquiring a signal indicating an abnormality of the control program.

印刷機構14は、印刷ヘッド、用紙搬送部材および切断部材など、レシート印刷やジャーナル印刷に関わる種々のハードウェア機構を含むものである。これらハードウェア機構の動作も、CPU21によって制御される。   The printing mechanism 14 includes various hardware mechanisms related to receipt printing and journal printing, such as a print head, a paper conveyance member, and a cutting member. The operations of these hardware mechanisms are also controlled by the CPU 21.

一方、POS端末100は、POS用プリンタ1のホストコンピュータとして機能するものであり、POSアプリケーション110およびプリンタドライバ120を備えている。また、特に図示しないが、POS端末100は、キーボード、カスタマディスプレイ、オペレータ用ディスプレイ、バーコードリーダ、カードリーダおよびキャッシュドロワ等の周辺機器を備えている。   On the other hand, the POS terminal 100 functions as a host computer of the POS printer 1 and includes a POS application 110 and a printer driver 120. Although not particularly shown, the POS terminal 100 includes peripheral devices such as a keyboard, a customer display, an operator display, a barcode reader, a card reader, and a cash drawer.

POSアプリケーション110は、オペレータのボタン操作等によって、POS用プリンタ1のリセットが指示されると、その旨を示すリセット信号を、プリンタドライバ120を介してPOS用プリンタ1に送信する。なお、POSアプリケーション110は、POS端末100の電源切断の検出や周辺機器の異常検出など、所定の状態検出によっても、リセット信号の送出を指令する。また、オペレータのキーボード操作等によって、リセット機能の有効/無効が指示されると、その旨を示すリセット設定信号を、プリンタドライバ120を介してPOS用プリンタ1に送信する。   When the POS application 110 is instructed to reset the POS printer 1 by an operator's button operation or the like, the POS application 110 transmits a reset signal indicating that to the POS printer 1 via the printer driver 120. Note that the POS application 110 also instructs the reset signal to be transmitted by detecting a predetermined state such as detection of power-off of the POS terminal 100 or detection of abnormality of peripheral devices. Further, when an instruction to enable / disable the reset function is given by an operator's keyboard operation or the like, a reset setting signal indicating that is transmitted to the POS printer 1 via the printer driver 120.

次に、図2を参照し、有効/無効設定回路11の論理回路について説明する。有効/無効設定回路11は、AND回路51とNOR回路52と、によって構成される。AND回路51には、MPU13から送信される有効/無効設定信号と、MPU13からの暴走検出出力と、が入力される。また、NOR回路52には、POS端末100から送信されるリセット信号と、AND回路51からの出力と、が入力される。   Next, the logic circuit of the valid / invalid setting circuit 11 will be described with reference to FIG. The valid / invalid setting circuit 11 includes an AND circuit 51 and a NOR circuit 52. The AND circuit 51 receives a valid / invalid setting signal transmitted from the MPU 13 and a runaway detection output from the MPU 13. The NOR circuit 52 receives a reset signal transmitted from the POS terminal 100 and an output from the AND circuit 51.

なお、MPU13は、有効設定を指令する場合、有効/無効設定信号としてAND回路51に“L”を入力する。また、MPU13は、暴走検出時には、暴走検出出力として、同じくAND回路51に“L”を入力する。さらに、POS端末100からリセット信号を取得すると、NOR回路52には“L”が入力される。   Note that the MPU 13 inputs “L” to the AND circuit 51 as a valid / invalid setting signal when commanding valid setting. The MPU 13 also inputs “L” to the AND circuit 51 as a runaway detection output when the runaway is detected. Further, when a reset signal is acquired from the POS terminal 100, “L” is input to the NOR circuit 52.

上記の構成により、AND回路51は、有効/無効設定信号または暴走検出出力のいずれかが“L”である場合、NOR回路52に“L”を出力する。また、NOR回路52は、リセット信号およびAND回路51の出力がいずれも“L”である場合、“H”を出力する。   With the above configuration, the AND circuit 51 outputs “L” to the NOR circuit 52 when either the valid / invalid setting signal or the runaway detection output is “L”. The NOR circuit 52 outputs “H” when both the reset signal and the output of the AND circuit 51 are “L”.

言い換えれば、リセット機能が有効設定であって、リセット信号を受信したとき、並びに暴走検出時にリセット信号を受信したとき、リセット回路12にリセット指令を出す。リセット回路12は、当該リセット指令に基づいて、MPU13に対しリセット入力(割り込み処理によるシステムリセット命令)を行う。   In other words, a reset command is issued to the reset circuit 12 when the reset function is enabled and a reset signal is received and when a reset signal is received when runaway is detected. The reset circuit 12 performs a reset input (system reset command by interrupt processing) to the MPU 13 based on the reset command.

次に、図3のフローチャートを参照し、MPU13(CPU21)によるリセット設定処理の流れについて説明する。同図(a)に示すとおり、MPU13は、POS端末100からリセット機能を有効/無効に設定するためのリセット設定信号を受信すると(S01:Yes)、その信号に従って有効/無効設定回路11(リセット機能)を有効または無効に設定する(S02)。   Next, the flow of reset setting processing by the MPU 13 (CPU 21) will be described with reference to the flowchart of FIG. When the MPU 13 receives a reset setting signal for setting the reset function to be valid / invalid from the POS terminal 100 (S01: Yes), the valid / invalid setting circuit 11 (reset) according to the signal as shown in FIG. Function) is set to be valid or invalid (S02).

一方、同図(b)に示すとおり、MPU13は、ウォッチドッグタイマ24による暴走検出出力に基づいて、ソフトウェアの暴走を検出した場合は(S03:Yes)、有効/無効設定回路11(リセット機能)を有効に設定する(S04)。一方、ソフトウェアの暴走を検出しない場合は(S03:No)、そのままリターンする。   On the other hand, as shown in FIG. 5B, when the MPU 13 detects a software runaway based on the runaway detection output by the watchdog timer 24 (S03: Yes), the valid / invalid setting circuit 11 (reset function). Is set to be effective (S04). On the other hand, if no software runaway is detected (S03: No), the process returns.

なお、同図(a)および(b)に示したフローチャートにおいて、S02およびS04の前にリセット機能の設定値を参照し、リセット機能の設定が異なる場合のみ(S04の場合は、リセット機能が無効に設定されている場合のみ)、有効/無効設定回路11の設定変更を行うようにしても良い。   In the flowcharts shown in FIGS. 4A and 4B, the reset function setting value is referred to before S02 and S04, and only when the reset function setting is different (in the case of S04, the reset function is invalid). Only when it is set to), the setting of the valid / invalid setting circuit 11 may be changed.

次に、図4のフローチャートを参照し、MPU13(CPU21)によるリセット処理の流れについて説明する。MPU13は、POS端末100から外部リセット信号を受信すると(S11:Yes)、有効/無効設定回路11(リセット機能)の設定が有効である場合は(S12:Yes)、リセット回路12およびCPU21によりシステムリセットする(S13)。一方、有効/無効設定回路11の設定が有効でない場合は(S12:No)、受信した外部リセット信号を無視する(リセット回路12に信号が入力されないこととなる)。   Next, the flow of reset processing by the MPU 13 (CPU 21) will be described with reference to the flowchart of FIG. When the MPU 13 receives an external reset signal from the POS terminal 100 (S11: Yes), if the setting of the valid / invalid setting circuit 11 (reset function) is valid (S12: Yes), the reset circuit 12 and the CPU 21 perform the system. Reset (S13). On the other hand, when the setting of the valid / invalid setting circuit 11 is not valid (S12: No), the received external reset signal is ignored (the signal is not input to the reset circuit 12).

以上説明したとおり、本実施形態のPOSシステムSYによれば、ウォッチドッグタイマ24によりソフトウェアの暴走が検出された場合、ハードウェアを用いて(有効/無効設定回路11により)、リセット機能を強制的に有効に設定するため、ソフトウェアの暴走時であっても確実にリセット機能を有効に設定できる。つまり、ソフトウェアを用いてリセット機能の有効/無効を切り替える構成ではないため、ソフトウェアの暴走によってリセット機能が無効に切り替わり、リセット機能が働かなくなる虞がない。また、ディップスイッチを必要としないため、リセット有効/無効の設定機能を搭載した場合のコストアップを抑えることができる。このように、スイッチのコスト削減や設定の作業効率など、ソフトウェアによる設定の利便性を享受しつつ、リセット機能を確実に設定できる。   As described above, according to the POS system SY of the present embodiment, when software runaway is detected by the watchdog timer 24, the reset function is forcibly used by hardware (by the enable / disable setting circuit 11). Therefore, even if the software runs away, the reset function can be set to be valid. In other words, since the configuration is not configured to enable / disable the reset function using software, there is no possibility that the reset function is disabled by software runaway and the reset function does not work. Further, since no dip switch is required, it is possible to suppress an increase in cost when a reset valid / invalid setting function is installed. In this way, the reset function can be reliably set while enjoying the convenience of setting by software such as switch cost reduction and setting work efficiency.

また、ソフトウェアの暴走検出は、ウォッチドッグタイマ24を用いるため、確実に暴走を検出することができると共に、既存の技術を適用するため、開発費用を削減することができる。   In addition, since the software runaway detection uses the watchdog timer 24, the runaway can be reliably detected, and the existing technology is applied, so that the development cost can be reduced.

なお、上記の実施形態では、POS用プリンタ1に、本発明のリセット有効設定方法を適用した場合を例示したが、POS用プリンタ1以外のプリンタに適用しても良い。また、外部装置からの指令に従ってリセット機能の有効/無効を切り替える機能を搭載した電子機器であれば、プリンタ以外であっても本発明を適用可能である。   In the above embodiment, the case where the reset valid setting method of the present invention is applied to the POS printer 1 is illustrated, but the present invention may be applied to printers other than the POS printer 1. Further, the present invention can be applied to any electronic device other than a printer as long as it is equipped with a function for switching the validity / invalidity of the reset function in accordance with a command from an external device.

また、上記の実施形態に示した、POS用プリンタ1の各構成要素(各機能)をプログラムとして提供することが可能である。また、そのプログラムを各種記録媒体(CD−ROM、フラッシュメモリ等)に格納して提供することも可能である。すなわち、POS用プリンタ1の各構成要素(各機能)をプログラム化したもの、およびそれを記録した記録媒体も、本発明の権利範囲に含まれるものである。   Further, each component (each function) of the POS printer 1 shown in the above embodiment can be provided as a program. Further, the program can be provided by being stored in various recording media (CD-ROM, flash memory, etc.). That is, a program obtained by programming each component (each function) of the POS printer 1 and a recording medium on which the program is recorded are also included in the scope of the right of the present invention.

また、上記の実施形態によらず、POS用プリンタ1の装置構成や処理工程など、本発明を逸脱しない範囲で適宜変更が可能である。   In addition, the apparatus configuration and processing steps of the POS printer 1 can be appropriately changed without departing from the present invention, regardless of the above embodiment.

POSシステムのシステム構成図である。It is a system configuration figure of a POS system. 有効/無効設定回路の論理回路を説明する図である。It is a figure explaining the logic circuit of a valid / invalid setting circuit. リセット設定処理を示すフローチャートである。It is a flowchart which shows a reset setting process. リセット処理を示すフローチャートである。It is a flowchart which shows a reset process. 従来技術を説明する図である。It is a figure explaining a prior art.

符号の説明Explanation of symbols

1…POS用プリンタ 11…有効/無効設定回路 12…リセット回路 13…MPU 14…印刷機構 21…CPU 22…RAM 23…ROM 24…ウォッチドッグタイマ 51…AND回路 52…NOR回路 100…POS端末   DESCRIPTION OF SYMBOLS 1 ... POS printer 11 ... Valid / invalid setting circuit 12 ... Reset circuit 13 ... MPU 14 ... Printing mechanism 21 ... CPU 22 ... RAM 23 ... ROM 24 ... Watchdog timer 51 ... AND circuit 52 ... NOR circuit 100 ... POS terminal

Claims (6)

外部装置からのリセット指令に従ってシステムリセットするリセット手段と、
前記リセット手段によるリセット機能を、有効または無効のいずれかに設定する有効/無効設定手段と、
ソフトウェアの暴走を、ハードウェアを用いて検出する暴走検出手段と、を備え、
前記有効/無効設定手段は、前記暴走検出手段により前記ソフトウェアの暴走が検出された場合、ハードウェアを用いて強制的に有効に設定することを特徴とする電子機器。
Reset means for resetting the system in accordance with a reset command from an external device;
Valid / invalid setting means for setting the reset function by the reset means to either valid or invalid;
A runaway detection means for detecting software runaway using hardware,
The electronic device characterized in that the valid / invalid setting means forcibly sets valid using hardware when the runaway detection means detects the software runaway.
前記暴走検出手段は、リセット機能を省略したウォッチドッグタイマにより実現されることを特徴とする請求項1に記載の電子機器。   The electronic device according to claim 1, wherein the runaway detection unit is realized by a watchdog timer in which a reset function is omitted. 請求項1または2に記載の電子機器における各手段を備えたことを特徴とするプリンタ。   A printer comprising the means in the electronic apparatus according to claim 1. 前記外部装置は、POS端末であることを特徴とする請求項3に記載のプリンタ。   The printer according to claim 3, wherein the external device is a POS terminal. 外部装置からのリセット指令に従って、リセット機能を有効または無効のいずれかに設定可能な電子機器のリセット有効設定方法であって、
前記電子機器が、
機器内のソフトウェアの暴走を、ハードウェアを用いて検出するステップと、
前記ソフトウェアの暴走を検出した場合、ハードウェアを用いて強制的に有効に設定するステップと、を実行することを特徴とする電子機器のリセット有効設定方法。
According to a reset command from an external device, a reset enable setting method for an electronic device that can set the reset function to either valid or invalid,
The electronic device is
Detecting software runaway in the device using hardware;
And a step of forcibly setting the software using hardware when the runaway of the software is detected.
コンピュータに、請求項5に記載の電子機器のリセット有効設定方法における各ステップを実行させるためのプログラム。   The program for making a computer perform each step in the reset effective setting method of the electronic device of Claim 5.
JP2007116513A 2007-04-26 2007-04-26 Electronic device, printer, reset effective setting method and program for electronic device Active JP4877050B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007116513A JP4877050B2 (en) 2007-04-26 2007-04-26 Electronic device, printer, reset effective setting method and program for electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007116513A JP4877050B2 (en) 2007-04-26 2007-04-26 Electronic device, printer, reset effective setting method and program for electronic device

Publications (2)

Publication Number Publication Date
JP2008276350A true JP2008276350A (en) 2008-11-13
JP4877050B2 JP4877050B2 (en) 2012-02-15

Family

ID=40054253

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007116513A Active JP4877050B2 (en) 2007-04-26 2007-04-26 Electronic device, printer, reset effective setting method and program for electronic device

Country Status (1)

Country Link
JP (1) JP4877050B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011016250A (en) * 2009-07-07 2011-01-27 Canon Inc Image forming apparatus, and control method thereof
JP2013241015A (en) * 2013-07-09 2013-12-05 Canon Inc Image forming apparatus

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63282822A (en) * 1987-05-15 1988-11-18 Ricoh Co Ltd Data processor with data protecting function
JPH03266110A (en) * 1990-03-16 1991-11-27 Nec Corp Resetting device for computer
JPH0635737A (en) * 1992-07-15 1994-02-10 Matsushita Electric Works Ltd Automatic fault restoration system
JPH10161826A (en) * 1996-11-28 1998-06-19 Hitachi Ltd Printer controller

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63282822A (en) * 1987-05-15 1988-11-18 Ricoh Co Ltd Data processor with data protecting function
JPH03266110A (en) * 1990-03-16 1991-11-27 Nec Corp Resetting device for computer
JPH0635737A (en) * 1992-07-15 1994-02-10 Matsushita Electric Works Ltd Automatic fault restoration system
JPH10161826A (en) * 1996-11-28 1998-06-19 Hitachi Ltd Printer controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011016250A (en) * 2009-07-07 2011-01-27 Canon Inc Image forming apparatus, and control method thereof
JP2013241015A (en) * 2013-07-09 2013-12-05 Canon Inc Image forming apparatus

Also Published As

Publication number Publication date
JP4877050B2 (en) 2012-02-15

Similar Documents

Publication Publication Date Title
KR100597821B1 (en) Power monitoring method for a printer, power monitoring apparatus and information recording medium
JP3127716B2 (en) Printer
US9349084B2 (en) Image forming apparatus, non-transitory computer-readable storage medium and method for monitoring error in central processing unit and performs resetting process
JP2014079941A (en) Image forming apparatus and control method therefor, and program
JP2008131603A (en) Image processor and image processing method
JP4682937B2 (en) Start control circuit
JP2007286859A (en) Control unit and image forming device
JP2019128792A (en) Image processing apparatus, control method therefor, and program
JP4877050B2 (en) Electronic device, printer, reset effective setting method and program for electronic device
JP2011068022A (en) Recording device, control method of recording device and program
JP5556248B2 (en) CONTROL DEVICE, CONTROL DEVICE CONTROL METHOD, AND PROGRAM
CN107066072B (en) Electronic device and control method thereof
JP5214641B2 (en) Universal serial bus host device and program
JPH10333856A (en) Communication terminal and its control method, and computer readable recording medium recorded with control program
US20180017914A1 (en) Image forming apparatus, power control method of image forming apparatus, and storage medium
US20170317980A1 (en) Information processing device with network interface having proxy response function
JPH10278381A (en) Printer
JP2004029893A (en) Recording apparatus
JP2009262473A (en) Image processing device
JP2002144677A5 (en)
US20170187902A1 (en) Information processing apparatus that controls display of display unit, and control method therefor and storage medium
JP6260099B2 (en) Printing apparatus, printing apparatus control method, and program
JP5919822B2 (en) Image forming apparatus and electronic apparatus
US20240015256A1 (en) Image forming apparatus, method for controlling image forming apparatus
JP2008037011A (en) Printing apparatus, its control method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110628

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110825

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111114

R150 Certificate of patent or registration of utility model

Ref document number: 4877050

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141209

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350