JP2021109350A - Printer and program - Google Patents

Printer and program Download PDF

Info

Publication number
JP2021109350A
JP2021109350A JP2020001632A JP2020001632A JP2021109350A JP 2021109350 A JP2021109350 A JP 2021109350A JP 2020001632 A JP2020001632 A JP 2020001632A JP 2020001632 A JP2020001632 A JP 2020001632A JP 2021109350 A JP2021109350 A JP 2021109350A
Authority
JP
Japan
Prior art keywords
battery
printing
control unit
unit
power supply
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
JP2020001632A
Other languages
Japanese (ja)
Other versions
JP7483380B2 (en
Inventor
清道 長嶋
Kiyomichi Nagashima
清道 長嶋
一徳 加藤
Kazunori Kato
一徳 加藤
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.)
Toshiba TEC Corp
Original Assignee
Toshiba TEC 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 Toshiba TEC Corp filed Critical Toshiba TEC Corp
Priority to JP2020001632A priority Critical patent/JP7483380B2/en
Priority claimed from JP2020001632A external-priority patent/JP7483380B2/en
Publication of JP2021109350A publication Critical patent/JP2021109350A/en
Application granted granted Critical
Publication of JP7483380B2 publication Critical patent/JP7483380B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electronic Switches (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)

Abstract

To provide a printer and a program which can reduce a possibility that the printer may stop because of shortage of electric power.SOLUTION: The printer comprises connecting means, printing means, obtaining means, measuring means and selecting means. The connecting means are connected to a plurality of batteries respectively. The printing means performs printing using the plurality of batteries connected to the connecting means. The obtaining means obtains a printing request to the printing means. The measuring means, when the obtaining means obtains the printing request, measures respective voltage values of the plurality of batteries. The selecting means selects, as the battery to be used, the battery whose voltage value is above a threshold out of the plurality of batteries, on the basis of measured results by the measuring means.SELECTED DRAWING: Figure 2

Description

本発明の実施形態は、プリンタ及びプログラムに関する。 Embodiments of the present invention relate to printers and programs.

従来、電源には接続せずに、電池の電力で駆動するプリンタが知られている。このような、プリンタは、電池の充電容量が足りなくなると印字を停止してしまう。そのため、使用者は、プリンタの停止を防止するために電池の充電容量を注意していなければならなかった。 Conventionally, there are known printers that are driven by battery power without being connected to a power source. Such a printer stops printing when the battery charge capacity is insufficient. Therefore, the user had to pay attention to the charge capacity of the battery in order to prevent the printer from stopping.

しかしながら、使用者が電池の充電容量を注意していても、様々な要因により電池の充電容量が足りなくなってしまうことがある。また、使用者は、電池の充電容量への注意を失念してしまうこともある。このような場合に、プリンタは、電池の電力不足により停止してしまう。 However, even if the user pays attention to the charge capacity of the battery, the charge capacity of the battery may be insufficient due to various factors. In addition, the user may forget to pay attention to the charge capacity of the battery. In such a case, the printer will stop due to insufficient battery power.

本発明が解決しようとする課題は、電力不足により停止してしまう可能性を低減させることができるプリンタ及びプログラムを提供することである。 An object to be solved by the present invention is to provide a printer and a program capable of reducing the possibility of stopping due to a power shortage.

実施形態のプリンタは、接続手段と、印字手段と、取得手段と、測定手段と、選択手段と、を備える。前記接続手段は、複数の電池のそれぞれと接続する。前記印字手段は、前記接続手段に接続された前記複数の電池を使用して印字する。前記取得手段は、前記印字手段に対する印字要求を取得する。前記測定手段は、前記取得手段が前記印字要求を取得した場合に、前記複数の電池のそれぞれの電圧値を測定する。前記選択手段は、前記測定手段の測定結果に基づいて、前記複数の電池のうち前記電圧値が閾値以上の電池を使用対象に選択する。 The printer of the embodiment includes connecting means, printing means, acquiring means, measuring means, and selecting means. The connecting means connects to each of the plurality of batteries. The printing means prints using the plurality of batteries connected to the connecting means. The acquisition means acquires a print request for the printing means. The measuring means measures the voltage value of each of the plurality of batteries when the acquiring means acquires the printing request. Based on the measurement result of the measuring means, the selecting means selects a battery having a voltage value equal to or higher than a threshold value among the plurality of batteries as a target for use.

図1は、第1の実施形態にかかるプリンタの外観の一例を示す斜視図である。FIG. 1 is a perspective view showing an example of the appearance of the printer according to the first embodiment. 図2は、プリンタのハードウェアの構成の一例を示すブロック図である。FIG. 2 is a block diagram showing an example of the hardware configuration of the printer. 図3は、電源制御テーブルの一例を示す図である。FIG. 3 is a diagram showing an example of a power supply control table. 図4は、プリンタが有する特徴的な機能の構成を示すブロック図である。FIG. 4 is a block diagram showing a configuration of characteristic functions of the printer. 図5は、第1の実施形態のプリンタが実行する切り替え処理の一例を示すフローチャートである。FIG. 5 is a flowchart showing an example of the switching process executed by the printer of the first embodiment. 図6は、第1の実施形態のプリンタが実行する温度監視処理の一例を示すフローチャートである。FIG. 6 is a flowchart showing an example of the temperature monitoring process executed by the printer of the first embodiment. 図7は、第1の実施形態のプリンタが実行する印字処理の一例を示すフローチャートである。FIG. 7 is a flowchart showing an example of the printing process executed by the printer of the first embodiment. 図8は、第2の実施形態にかかるプリンタの外観の一例を示す斜視図である。FIG. 8 is a perspective view showing an example of the appearance of the printer according to the second embodiment. 図9は、プリンタのハードウェアの構成の一例を示すブロック図である。FIG. 9 is a block diagram showing an example of the hardware configuration of the printer. 図10は、プリンタが有する特徴的な機能の構成を示すブロック図である。FIG. 10 is a block diagram showing a configuration of characteristic functions of the printer. 図11は、第2の実施形態の印字ユニットが実行するモード設定処理の一例を示すフローチャートである。FIG. 11 is a flowchart showing an example of the mode setting process executed by the printing unit of the second embodiment. 図12は、第2の実施形態のプリンタが実行する正常な印字処理の一例を示すシーケンス図である。FIG. 12 is a sequence diagram showing an example of a normal printing process executed by the printer of the second embodiment. 図13は、第2の実施形態のプリンタが実行する異常な印字処理の一例を示すシーケンス図である。FIG. 13 is a sequence diagram showing an example of an abnormal printing process executed by the printer of the second embodiment.

以下、添付図面を参照して、プリンタ及びプログラムの実施形態を詳細に説明する。なお、以下に説明する実施形態は、プリンタ及びプログラムの一実施形態であって、その構成や仕様等を限定するものではない。本実施形態のプリンタは、POS(Point Of Sales)端末に接続されるプリンタへの適用例である。 Hereinafter, embodiments of the printer and the program will be described in detail with reference to the accompanying drawings. The embodiment described below is an embodiment of a printer and a program, and does not limit the configuration, specifications, and the like. The printer of this embodiment is an application example to a printer connected to a POS (Point Of Sales) terminal.

(第1の実施形態)
まず、第1の実施形態について説明する。図1は、第1の実施形態にかかるプリンタ1の外観の一例を示す斜視図である。プリンタ1は、POS端末からの要求に応じてレシートや、領収書等の印刷物を印字する。また、プリンタ1は、Wi-Fi(登録商標)等の無線通信によりPOS端末と接続される。プリンタ1は、POS端末から印字対象のデータである印字データの印字を要求する印字要求を受信する。
(First Embodiment)
First, the first embodiment will be described. FIG. 1 is a perspective view showing an example of the appearance of the printer 1 according to the first embodiment. The printer 1 prints a printed matter such as a receipt or a receipt in response to a request from the POS terminal. Further, the printer 1 is connected to the POS terminal by wireless communication such as Wi-Fi (registered trademark). The printer 1 receives a print request from the POS terminal requesting printing of print data which is data to be printed.

プリンタ1は、上部の内側にロール紙を収納する用紙収納部を備えている。プリンタ1は、印字要求を受信した場合に、用紙収納部に収納されたロール紙に印字データを印字する。そして、プリンタ1は、上部に設けられた排出口11から、印字データを印字した印刷物を排出する。 The printer 1 includes a paper storage unit for storing roll paper inside the upper part. When the printer 1 receives the print request, the printer 1 prints the print data on the roll paper stored in the paper storage unit. Then, the printer 1 discharges the printed matter on which the print data is printed from the discharge port 11 provided at the upper part.

プリンタ1は、下部に複数の電池を収納する電池収納部12を備えている。各電池は、電池収納部12に設けられた接続端子と接続する。具体的には、電池収納部12は、第1電池21、及び第2電池22を収納する。第1電池21は、リチウムイオン電池等の充電可能な二次電池である。また、第2電池22は、リチウムイオン電池等の充電可能な二次電池である。以下、第1電池21と第2電池22とを区別しない場合には、電池20と記載する。なお、プリンタ1は、電池20を2つに限らず、電池20を3つ以上備えていてもよい。 The printer 1 includes a battery storage unit 12 for storing a plurality of batteries at the bottom. Each battery is connected to a connection terminal provided in the battery storage unit 12. Specifically, the battery storage unit 12 stores the first battery 21 and the second battery 22. The first battery 21 is a rechargeable secondary battery such as a lithium ion battery. The second battery 22 is a rechargeable secondary battery such as a lithium ion battery. Hereinafter, when the first battery 21 and the second battery 22 are not distinguished, the battery 20 is described. The printer 1 is not limited to two batteries 20, and may include three or more batteries 20.

また、第1電池21は、略中央に第1係止部211を備えている。第1係止部211は、第1電池21を電池収納部12に係止する部材である。第1電池21は、第1係止部211が下方に引き下げられた場合に、電池収納部12への係止が解除される。よって、第1電池21は、電池収納部12から引き出される。これにより、使用者は、第1電池21を交換することができる。 Further, the first battery 21 includes a first locking portion 211 at substantially the center. The first locking portion 211 is a member that locks the first battery 21 to the battery housing portion 12. When the first locking portion 211 is pulled downward, the first battery 21 is released from being locked to the battery housing portion 12. Therefore, the first battery 21 is pulled out from the battery storage unit 12. As a result, the user can replace the first battery 21.

同様に、第2電池22は、略中央に第2係止部221を備えている。第2係止部221は、第2電池22を電池収納部12に係止する部材である。第2電池22は、第2係止部221が下方に引き下げられた場合に、電池収納部12への係止が解除される。よって、第2電池22は、電池収納部12から引き出される。これにより、使用者は、第2電池22を交換することができる。 Similarly, the second battery 22 includes a second locking portion 221 substantially in the center. The second locking portion 221 is a member that locks the second battery 22 to the battery housing portion 12. When the second locking portion 221 is pulled downward, the second battery 22 is released from being locked to the battery housing portion 12. Therefore, the second battery 22 is pulled out from the battery storage unit 12. As a result, the user can replace the second battery 22.

また、プリンタ1は、下部の正面に第1表示灯31及び第2表示灯32を備えている。第1表示灯31は、第1電池21の状態を表示する灯である。第1表示灯31は、例えば2色のLED(Light Emitting Diode)である。第1表示灯31は、色を変えたり、点滅する周期を変えたりすることで第1電池21の状態を表示する。例えば、第1表示灯31は、赤色や緑色に点灯する。なお、第1表示灯31は、2色に限らず、3色以上の色で点灯してもよい。 Further, the printer 1 is provided with a first indicator lamp 31 and a second indicator lamp 32 on the front surface of the lower portion. The first indicator light 31 is a light that indicates the state of the first battery 21. The first indicator light 31 is, for example, a two-color LED (Light Emitting Diode). The first indicator light 31 displays the state of the first battery 21 by changing the color or the blinking cycle. For example, the first indicator light 31 lights up in red or green. The first indicator lamp 31 is not limited to two colors, and may be lit in three or more colors.

第2表示灯32は、第2電池22の状態を表示する灯である。第2表示灯32は、例えば2色のLEDである。第2表示灯32は、色を変えたり、点滅する周期を変えたりすることで第2電池22の状態を表示する。例えば、第2表示灯32は、赤色や緑色に点灯する。なお、第2表示灯32は、2色に限らず、3色以上の色で点灯してもよい。以下、第1表示灯31と第2表示灯32とを区別しない場合には、表示灯30と記載する。また、プリンタ1は、表示灯30に限らず、液晶ディスプレイ等により各電池20の状態を表示してもよい。 The second indicator lamp 32 is a lamp that indicates the status of the second battery 22. The second indicator lamp 32 is, for example, a two-color LED. The second indicator lamp 32 displays the state of the second battery 22 by changing the color or the blinking cycle. For example, the second indicator lamp 32 lights up in red or green. The second indicator lamp 32 is not limited to two colors, and may be lit in three or more colors. Hereinafter, when the first indicator lamp 31 and the second indicator lamp 32 are not distinguished, they are described as the indicator lamp 30. Further, the printer 1 is not limited to the indicator lamp 30, and the state of each battery 20 may be displayed by a liquid crystal display or the like.

次に、プリンタ1のハードウェア構成について説明する。 Next, the hardware configuration of the printer 1 will be described.

図2は、プリンタ1のハードウェアの構成の一例を示すブロック図である。プリンタ1は、制御部110と、メモリ120と、通信部130と、コントローラ140と、電源マイクロコントローラ150とを備える。これら各部は、データバスやアドレスバス等のシステムバス160を介して相互に接続している。 FIG. 2 is a block diagram showing an example of the hardware configuration of the printer 1. The printer 1 includes a control unit 110, a memory 120, a communication unit 130, a controller 140, and a power supply microcontroller 150. These parts are connected to each other via a system bus 160 such as a data bus or an address bus.

制御部110は、プリンタ1の全体の動作を制御し、プリンタ1が有する各種の機能を実現するコンピュータである。制御部110は、CPU(Central Processing Unit)111と、ROM(Read Only Memory)112と、RAM(Random Access Memory)113とを備える。CPU111は、プリンタ1の動作を統括的に制御する。ROM112は、各種プログラムやデータを記憶する記憶媒体である。RAM113は、各種プログラムや各種データを一時的に記憶する記憶媒体である。そして、CPU111は、RAM113をワークエリア(作業領域)としてROM112又はメモリ120等に格納されたプログラムを実行する。 The control unit 110 is a computer that controls the overall operation of the printer 1 and realizes various functions of the printer 1. The control unit 110 includes a CPU (Central Processing Unit) 111, a ROM (Read Only Memory) 112, and a RAM (Random Access Memory) 113. The CPU 111 comprehensively controls the operation of the printer 1. The ROM 112 is a storage medium for storing various programs and data. The RAM 113 is a storage medium that temporarily stores various programs and various data. Then, the CPU 111 executes a program stored in the ROM 112, the memory 120, or the like with the RAM 113 as a work area (work area).

メモリ120は、フラッシュメモリなどの記憶装置である。メモリ120は、制御プログラムPを記憶する。制御プログラムPは、オペレーティングシステムや、プリンタ1が備えている機能を発揮させるためのプログラムである。制御プログラムPには、本実施形態に係る特徴的な機能を発揮させるプログラムが含まれる。 The memory 120 is a storage device such as a flash memory. The memory 120 stores the control program P. The control program P is a program for exerting the functions provided by the operating system and the printer 1. The control program P includes a program that exerts a characteristic function according to the present embodiment.

通信部130は、Wi-Fi(登録商標)等の無線通信によりPOS端末と通信を実行するためのインタフェースである。 The communication unit 130 is an interface for executing communication with a POS terminal by wireless communication such as Wi-Fi (registered trademark).

コントローラ140は、制御部110から指示に応じて、接続された各種ハードウェアを動作させる。コントローラ140は、切断部141、サーマルヘッド142、モータ143、及び搬送スイッチ144が接続される。 The controller 140 operates various connected hardware in response to an instruction from the control unit 110. A cutting portion 141, a thermal head 142, a motor 143, and a transfer switch 144 are connected to the controller 140.

切断部141は、印字データの印字が終了した場合に、ロール紙を切断するカッターである。サーマルヘッド142は、印字データをロール紙に印字する印字ヘッドである。サーマルヘッド142は、感熱紙であるロール紙に、熱により印字データを印字する。モータ143は、サーマルヘッド142に押圧されるプラテンを回転させる。すなわち、モータ143は、ロール紙を搬送するモータである。搬送スイッチ144は、ロール紙を搬送させる操作を受け付けるスイッチである。 The cutting portion 141 is a cutter that cuts the roll paper when the printing of the print data is completed. The thermal head 142 is a print head that prints print data on roll paper. The thermal head 142 prints print data on roll paper, which is a thermal paper, by heat. The motor 143 rotates the platen pressed against the thermal head 142. That is, the motor 143 is a motor that conveys roll paper. The transport switch 144 is a switch that accepts an operation of transporting the roll paper.

電源マイクロコントローラ150は、制御部110からの指示に基づいて、電源に関する各種処理を実行するコンピュータである。また、電源マイクロコントローラ150は、電池選択部155、第1接続端子121、第2接続端子122、第1表示灯31、第2表示灯32、及び温度センサ158が接続されている。 The power supply microcontroller 150 is a computer that executes various processes related to the power supply based on an instruction from the control unit 110. Further, the power supply microcontroller 150 is connected to the battery selection unit 155, the first connection terminal 121, the second connection terminal 122, the first indicator light 31, the second indicator light 32, and the temperature sensor 158.

電源マイクロコントローラ150は、CPU151と、ROM152と、RAM153と、ADC(Analog to Digital Converter)154とを備える。CPU151は、電源マイクロコントローラ150の動作を統括的に制御する。ROM152は、各種プログラムやデータを記憶する記憶媒体である。RAM153は、各種プログラムや各種データを一時的に記憶する記憶媒体である。そして、CPU151は、RAM153をワークエリア(作業領域)としてROM152等に格納されたプログラムを実行する。 The power supply microcontroller 150 includes a CPU 151, a ROM 152, a RAM 153, and an ADC (Analog to Digital Converter) 154. The CPU 151 comprehensively controls the operation of the power supply microcontroller 150. The ROM 152 is a storage medium for storing various programs and data. The RAM 153 is a storage medium that temporarily stores various programs and various data. Then, the CPU 151 executes the program stored in the ROM 152 or the like using the RAM 153 as a work area (work area).

ADC154は、第1接続端子121及び第2接続端子122から出力されたアナログ信号により示された電圧値を、デジタル信号により示された電圧値に変換する。すなわち、ADC154は、第1電池21及び第2電池22の電圧値を取得する。 The ADC 154 converts the voltage value indicated by the analog signal output from the first connection terminal 121 and the second connection terminal 122 into the voltage value indicated by the digital signal. That is, the ADC 154 acquires the voltage values of the first battery 21 and the second battery 22.

また、電源マイクロコントローラ150は、複数の電池20のうち使用対象の電池20の選択を制御する。さらに、電源マイクロコントローラ150は、表示灯30の点灯を制御する。 Further, the power supply microcontroller 150 controls the selection of the battery 20 to be used among the plurality of batteries 20. Further, the power supply microcontroller 150 controls the lighting of the indicator lamp 30.

ここで、図3は、電源制御テーブルの一例を示す図である。電源制御テーブルは、第1電池21及び第2電池22の電圧値の組み合わせに応じた電池20の選択、及び各電池20がそれぞれの状態にある場合の第1表示灯31及び第2表示灯32の表示を示している。電源マイクロコントローラ150は、電源制御テーブルに示された状態になるように電池選択部155、第1表示灯31、及び第2表示灯32を制御する。 Here, FIG. 3 is a diagram showing an example of a power supply control table. The power control table selects the battery 20 according to the combination of the voltage values of the first battery 21 and the second battery 22, and the first indicator lamp 31 and the second indicator lamp 32 when each battery 20 is in each state. Is shown. The power supply microcontroller 150 controls the battery selection unit 155, the first indicator light 31, and the second indicator light 32 so as to be in the state shown in the power supply control table.

第1電池21及び第2電池22は、電圧値に応じて、Full、Low、Critical Low、及びErrorの4段階に分けられる。Fullは、電池20の充電容量が多量の状態である。例えば、Fullは、電圧値が14.4V以上であることを示す状態である。 The first battery 21 and the second battery 22 are divided into four stages of Full, Low, Critical Low, and Error according to the voltage value. Full is a state in which the charge capacity of the battery 20 is large. For example, Full is a state indicating that the voltage value is 14.4 V or more.

Lowは、電池20の充電容量が少量の状態である。例えば、Lowは、電圧値が13〜14.4Vであることを示す状態である。 Low is a state in which the charge capacity of the battery 20 is small. For example, Low is a state indicating that the voltage value is 13 to 14.4 V.

Critical Lowは、電池20の充電容量が極少量の状態である。例えば、Critical Lowは、電圧値が12〜13Vであることを示す状態である。 The Critical Low is a state in which the charge capacity of the battery 20 is extremely small. For example, Critical Low is a state indicating that the voltage value is 12 to 13V.

Errorは、電池20の充電容量が無い状態である。例えば、Errorは、電圧値が12V以下であることを示す状態である。なお、Full、Low、Critical Low、及びErrorのそれぞれの電圧値は、一例であって電池20の特性等に応じて任意に変更することができる。 The Error is a state in which the battery 20 has no charge capacity. For example, Error is a state indicating that the voltage value is 12 V or less. The voltage values of Full, Low, Critical Low, and Error are examples, and can be arbitrarily changed according to the characteristics of the battery 20 and the like.

電源マイクロコントローラ150は、複数の電池20のうち、Critical Low以上の電池20を使用対象の電池20に選択させる。すなわち、電源マイクロコントローラ150は、電圧値が閾値以上の電池20を使用対象の電池20に選択させる。 The power supply microcontroller 150 causes the battery 20 to be used to select a battery 20 having a critical low or higher among the plurality of batteries 20. That is, the power supply microcontroller 150 causes the battery 20 to be used to select the battery 20 whose voltage value is equal to or higher than the threshold value.

具体的には、電源マイクロコントローラ150は、電圧値が12V以上の電池20を使用対象の電池20に選択させる。また、電源マイクロコントローラ150は、第1電池21及び第2電池22の両方がCritical Low以上の場合には、電圧値が低い方の電池20を使用対象の電池20に選択させる。 Specifically, the power supply microcontroller 150 causes the battery 20 to be used to select the battery 20 having a voltage value of 12 V or more. Further, when both the first battery 21 and the second battery 22 are equal to or higher than the critical low, the power supply microcontroller 150 causes the battery 20 to be used to select the battery 20 having the lower voltage value.

ここで、電圧値が高い方の電池20を使用対象に選択させると、第1電池21及び第2電池22を交互に使用対象に選択するため、略同時期に両方の電池20の充電容量が無くなる。しかし、電圧値が低い方の電池20を使用対象の電池20に選択することで、一方の電池20の充電容量が無くなっても、他方の電池20は充電容量が残っている可能性がある。よって、電源マイクロコントローラ150は、電圧値が低い方の電池20を使用対象の電池20に選択させる。 Here, when the battery 20 having the higher voltage value is selected as the target for use, the first battery 21 and the second battery 22 are alternately selected as the target for use, so that the charge capacities of both batteries 20 are approximately the same. It disappears. However, by selecting the battery 20 having the lower voltage value as the battery 20 to be used, even if the charge capacity of one battery 20 is exhausted, the charge capacity of the other battery 20 may remain. Therefore, the power supply microcontroller 150 causes the battery 20 to be used to select the battery 20 having the lower voltage value.

また、電源マイクロコントローラ150は、第1電池21の段階と、第1電池21が使用対象であるか否かを示す状態とを、第1表示灯31に表示させる。同様に、電源マイクロコントローラ150は、第2電池22の段階と、第2電池22が使用対象であるか否かを示す状態とを、第2表示灯32に表示させる。 Further, the power supply microcontroller 150 causes the first indicator lamp 31 to display the stage of the first battery 21 and the state indicating whether or not the first battery 21 is a target for use. Similarly, the power supply microcontroller 150 causes the second indicator lamp 32 to display the stage of the second battery 22 and the state indicating whether or not the second battery 22 is a target for use.

具体的には、電源マイクロコントローラ150は、第1電池21がFullの場合、第1表示灯31を緑色に点灯させる。電源マイクロコントローラ150は、第1電池21がLowの場合、第1表示灯31を、緑色と赤色とを合わせたオレンジ色に点灯させる。電源マイクロコントローラ150は、第1電池21がCritical Low及びErrorの場合、第1表示灯31を、赤色に点灯させる。電源マイクロコントローラ150は、第1電池21がErrorの場合には、第1表示灯31を、短周期の赤色で点滅させる。 Specifically, the power supply microcontroller 150 turns on the first indicator lamp 31 in green when the first battery 21 is Full. When the first battery 21 is Low, the power supply microcontroller 150 lights the first indicator light 31 in orange, which is a combination of green and red. When the first battery 21 is Critical Low and Error, the power supply microcontroller 150 turns on the first indicator light 31 in red. When the first battery 21 is an error, the power supply microcontroller 150 blinks the first indicator light 31 in red in a short cycle.

同様に、電源マイクロコントローラ150は、第2電池22がFullの場合、第2表示灯32を緑色に点灯させる。電源マイクロコントローラ150は、第2電池22がLowの場合、第2表示灯32を、緑色と赤色とを合わせたオレンジ色に点灯させる。電源マイクロコントローラ150は、第2電池22がCritical Low及びErrorの場合、第2表示灯32を、赤色に点灯させる。電源マイクロコントローラ150は、第2電池22がErrorの場合には、第2表示灯32を、短周期の赤色で点滅させる。 Similarly, the power supply microcontroller 150 turns on the second indicator lamp 32 in green when the second battery 22 is Full. When the second battery 22 is Low, the power supply microcontroller 150 lights the second indicator lamp 32 in orange, which is a combination of green and red. The power supply microcontroller 150 turns on the second indicator lamp 32 in red when the second battery 22 is Critical Low and Error. When the second battery 22 is Errol, the power supply microcontroller 150 blinks the second indicator lamp 32 in red in a short cycle.

また、電源マイクロコントローラ150は、使用対象の電池20に対応する表示灯30を長周期で点滅させる。すなわち、電源マイクロコントローラ150は、第1電池21が使用対象の場合には、第1表示灯31を長周期で点滅させる。また、電源マイクロコントローラ150は、第2電池22が使用対象の場合には、第2表示灯32を長周期で点滅させる。 Further, the power supply microcontroller 150 blinks the indicator light 30 corresponding to the battery 20 to be used in a long cycle. That is, when the first battery 21 is the target of use, the power supply microcontroller 150 blinks the first indicator light 31 at a long cycle. Further, when the second battery 22 is the target of use, the power supply microcontroller 150 blinks the second indicator lamp 32 at a long cycle.

一方、電源マイクロコントローラ150は、使用対象ではない待機中の電池20に対応する表示灯30は常時点灯させる。すなわち、電源マイクロコントローラ150は、第1電池21が待機中の場合には、第1表示灯31を常時点灯させる。また、電源マイクロコントローラ150は、第2電池22が待機中の場合には、第2表示灯32を常時点灯させる。 On the other hand, in the power supply microcontroller 150, the indicator light 30 corresponding to the standby battery 20 which is not the target of use is always turned on. That is, the power supply microcontroller 150 always turns on the first indicator light 31 when the first battery 21 is on standby. Further, the power supply microcontroller 150 always turns on the second indicator lamp 32 when the second battery 22 is on standby.

電池選択部155は、第1電池21、及び第2電池22とのうち、使用対象の電池20を選択する。ここで、電池選択部155には、第1接続端子121、及び第2接続端子122が接続される。 The battery selection unit 155 selects the battery 20 to be used from the first battery 21 and the second battery 22. Here, the first connection terminal 121 and the second connection terminal 122 are connected to the battery selection unit 155.

第1接続端子121は、第1電池21と接続する端子等の接続部である。第2接続端子122は、第2電池22と接続する端子等の接続部である。すなわち、第1接続端子121及び第2接続端子122は、複数の電池20のそれぞれと接続される。よって、電池選択部155は、第1接続端子121、及び第2接続端子122から使用する端子を選択することで、使用対象の電池20を選択することができる。そして、電池選択部155は、選択した使用対象の電池20の電力を、切断部141、サーマルヘッド142、モータ143、及び搬送スイッチ144等の印字を実行する各部に供給する。このように、電池選択部155は、複数の電池20のうち、使用対象に選択した電池20の電力を各部に供給している。すなわち、電池選択部155は、待機中の電池20の電力は使用していない。よって、使用者は、印字中等の任意のタイミングで、待機中の電池20を別の電池20に交換することができる。また、電池選択部155は、3つ以上の電池20が接続されている場合、複数の電池20から複数の電池20を使用対象の電池20として選択してもよい。例えば、電池選択部155は、電池選択部155に4つの電池20が接続されている場合、2つの電池20を使用対象の電池として選択してもよい。 The first connection terminal 121 is a connection portion such as a terminal for connecting to the first battery 21. The second connection terminal 122 is a connection portion such as a terminal for connecting to the second battery 22. That is, the first connection terminal 121 and the second connection terminal 122 are connected to each of the plurality of batteries 20. Therefore, the battery selection unit 155 can select the battery 20 to be used by selecting the terminal to be used from the first connection terminal 121 and the second connection terminal 122. Then, the battery selection unit 155 supplies the electric power of the selected battery 20 to be used to each unit that executes printing, such as the cutting unit 141, the thermal head 142, the motor 143, and the transfer switch 144. As described above, the battery selection unit 155 supplies the electric power of the battery 20 selected as the object to be used among the plurality of batteries 20 to each unit. That is, the battery selection unit 155 does not use the electric power of the battery 20 in standby. Therefore, the user can replace the standby battery 20 with another battery 20 at an arbitrary timing such as during printing. Further, when three or more batteries 20 are connected, the battery selection unit 155 may select a plurality of batteries 20 from the plurality of batteries 20 as the batteries 20 to be used. For example, the battery selection unit 155 may select two batteries 20 as the batteries to be used when the four batteries 20 are connected to the battery selection unit 155.

温度センサ158は、複数の電池20の温度を測定するサーミスタ等のセンサである。温度センサ158は、電池20が異常発熱していないかの監視に用いられる。そして、電源マイクロコントローラ150は、電池20の異常発熱を示している場合に、第1表示灯31及び第2表示灯32を交互に赤色に点灯させる。 The temperature sensor 158 is a sensor such as a thermistor that measures the temperature of a plurality of batteries 20. The temperature sensor 158 is used for monitoring whether the battery 20 is abnormally generating heat. Then, when the power supply microcontroller 150 indicates abnormal heat generation of the battery 20, the first indicator lamp 31 and the second indicator lamp 32 are alternately turned on in red.

次に、プリンタ1が有する特徴的な機能について説明する。ここで、図4は、プリンタ1が有する特徴的な機能の構成を示すブロック図である。 Next, the characteristic functions of the printer 1 will be described. Here, FIG. 4 is a block diagram showing a configuration of characteristic functions of the printer 1.

プリンタ1の制御部110は、メモリ120に記憶された制御プログラムPをRAM113に展開し、制御プログラムPに従って動作することで、各機能部をRAM113に生成する。具体的には、プリンタ1の制御部110は、機能部として、通信制御部1001、印字制御部1002、初期設定部1003、温度測定部1004、電圧測定部1005、電源制御部1006、及び報知制御部1007を備える。 The control unit 110 of the printer 1 expands the control program P stored in the memory 120 into the RAM 113 and operates according to the control program P to generate each functional unit in the RAM 113. Specifically, the control unit 110 of the printer 1 has, as functional units, a communication control unit 1001, a print control unit 1002, an initial setting unit 1003, a temperature measurement unit 1004, a voltage measurement unit 1005, a power supply control unit 1006, and notification control. A unit 1007 is provided.

通信制御部1001は、通信部130を制御して、POS端末等の外部装置との通信を実行する。例えば、通信制御部1001は、印字対象のデータである印字データをPOS端末から受信する。また、通信制御部1001は、印字を要求する印字要求をPOS端末から受信する。すなわち、通信制御部1001は、印字制御部1002に対する印字データ、及び印字要求を取得する。 The communication control unit 1001 controls the communication unit 130 to execute communication with an external device such as a POS terminal. For example, the communication control unit 1001 receives print data, which is data to be printed, from the POS terminal. Further, the communication control unit 1001 receives a print request requesting printing from the POS terminal. That is, the communication control unit 1001 acquires the print data and the print request for the print control unit 1002.

印字制御部1002は、切断部141、サーマルヘッド142、及びモータ143を制御して、印字データをロール紙等の印字媒体に印字する。また、印字制御部1002は、第1接続端子121及び第2接続端子122に接続された複数の電池20のうち、電池選択部155により選択された電池20の電力を使用して印字する。 The print control unit 1002 controls the cutting unit 141, the thermal head 142, and the motor 143 to print the print data on a print medium such as roll paper. Further, the print control unit 1002 prints using the power of the battery 20 selected by the battery selection unit 155 among the plurality of batteries 20 connected to the first connection terminal 121 and the second connection terminal 122.

更に詳しくは、印字制御部1002は、使用対象の電池20の電圧値がFullの場合には、通常の印字速度で印字する通常印字を実行する。また、印字制御部1002は、使用対象の電池20の電圧値がLowの場合には、通常印字よりも印字速度を低速にした低速印字を実行する。これにより、印字制御部1002は、印字に使用する消費電力を低減する。 More specifically, when the voltage value of the battery 20 to be used is Full, the print control unit 1002 executes normal printing for printing at a normal printing speed. Further, when the voltage value of the battery 20 to be used is Low, the print control unit 1002 executes low-speed printing in which the printing speed is lower than that of normal printing. As a result, the print control unit 1002 reduces the power consumption used for printing.

また、印字制御部1002は、使用対象の電池20の電圧値がCritical Lowの場合には、使用対象の電池20の状態を印字する状態印字を実行する。ここで、使用対象の電池20は、大量の電流を一度に流すと、電圧が一瞬に落ち込んでプリンタ1にリセットがかかってしまう。具体的には、印字制御部1002は、罫線印字等を行うと大量の電流を一度に流すことになり、プリンタ1にリセットがかかってしまう。そこで、印字制御部1002は、通常の印字幅の1/4、又は1/8の印字を行う。さらに、印字制御部1002は、図形等の印字は行わずに、文字の印字を行う。これにより、印字制御部1002は、電流を極力抑えて、プリンタ1にリセットがかかってしまう可能性を低減する。また、印字制御部1002は、使用対象の電池20の充電容量が少ないため、要求された印字データの印字が行えないことを印字する。これにより、印字制御部1002は、使用対象の電池20の交換を促す。なお、印字制御部1002は、Critical Lowの場合に、使用対象の電池20の状態を印字に限らず、印字データを印字してもよい。 Further, when the voltage value of the battery 20 to be used is Critical Low, the print control unit 1002 executes state printing to print the state of the battery 20 to be used. Here, when a large amount of current is passed through the battery 20 to be used at one time, the voltage drops momentarily and the printer 1 is reset. Specifically, when the print control unit 1002 prints a ruled line or the like, a large amount of current flows at once, and the printer 1 is reset. Therefore, the print control unit 1002 prints 1/4 or 1/8 of the normal print width. Further, the print control unit 1002 prints characters without printing figures or the like. As a result, the print control unit 1002 suppresses the current as much as possible to reduce the possibility that the printer 1 is reset. Further, the print control unit 1002 prints that the requested print data cannot be printed because the charge capacity of the battery 20 to be used is small. As a result, the print control unit 1002 prompts the replacement of the battery 20 to be used. In the case of Critical Low, the print control unit 1002 may print print data, not limited to printing the state of the battery 20 to be used.

初期設定部1003は、電源マイクロコントローラ150の初期化を制御する。 The initialization unit 1003 controls the initialization of the power supply microcontroller 150.

温度測定部1004は、第1電池21及び第2電池22の温度を温度センサ158に測定させることを、電源マイクロコントローラ150に指示する。そして、温度測定部1004は、温度センサ158が測定した第1電池21及び第2電池22の温度を取得する。 The temperature measuring unit 1004 instructs the power supply microcontroller 150 to have the temperature sensor 158 measure the temperatures of the first battery 21 and the second battery 22. Then, the temperature measuring unit 1004 acquires the temperatures of the first battery 21 and the second battery 22 measured by the temperature sensor 158.

電圧測定部1005は、第1電池21及び第2電池22の電圧を測定することを、電源マイクロコントローラ150のADC154に指示する。更に詳しくは、電圧測定部1005は、複数の電池20のそれぞれの電圧値を測定する測定条件が満たされた場合に、複数の電池20のそれぞれの電圧値の測定をADC154に指示する。測定条件は、印字制御部1002に対する印字要求を取得した場合、印字を開始する開始コマンドを取得した場合、印字要求に対応した印字を終了する終了コマンドを取得した場合、設定時間が経過した場合等である。 The voltage measuring unit 1005 instructs the ADC 154 of the power supply microcontroller 150 to measure the voltage of the first battery 21 and the second battery 22. More specifically, the voltage measuring unit 1005 instructs the ADC 154 to measure the voltage values of the plurality of batteries 20 when the measurement conditions for measuring the voltage values of the plurality of batteries 20 are satisfied. The measurement conditions are as follows: when a print request to the print control unit 1002 is acquired, when a start command for starting printing is acquired, when an end command for ending printing corresponding to the print request is acquired, when the set time has elapsed, etc. Is.

電源制御部1006は、第1電池21及び第2電池22の使用に関して、電源マイクロコントローラ150に指示する。更に詳しくは、電源制御部1006は、電圧測定部1005の測定結果に基づいて、図3の電源制御テーブルに示された状態である場合に、図3の電源制御テーブルに示された電池20を選択するように、電源マイクロコントローラ150に指示する。 The power supply control unit 1006 instructs the power supply microcontroller 150 regarding the use of the first battery 21 and the second battery 22. More specifically, the power supply control unit 1006 uses the battery 20 shown in the power supply control table of FIG. 3 in the state shown in the power supply control table of FIG. 3 based on the measurement result of the voltage measurement unit 1005. Instruct the power supply microcontroller 150 to make a selection.

具体的には、電源制御部1006は、電圧測定部1005の測定結果に基づいて、複数の電池20のうち電圧値が閾値以上の電池20を使用対象に選択する。すなわち、電源制御部1006は、Critical Low以上の電池20を使用するように指示する。ここで、Critical Low以上の電池20は、印字を実行するための電力を有している。よって、電源制御部1006は、Critical Low以上の電池20を使用対象に選択することで、印字途中で電力不足により印字できなくなってしまう可能性を低減している。 Specifically, the power supply control unit 1006 selects a battery 20 having a voltage value equal to or higher than a threshold value among the plurality of batteries 20 as a target for use, based on the measurement result of the voltage measurement unit 1005. That is, the power supply control unit 1006 instructs to use the battery 20 having a critical low or higher. Here, the battery 20 of Critical Low or higher has electric power for executing printing. Therefore, the power supply control unit 1006 reduces the possibility that printing cannot be performed due to insufficient power during printing by selecting the battery 20 of Critical Low or higher as the target of use.

また、電源制御部1006は、電圧測定部1005の測定結果に基づいて、複数の電池20のうち電圧値が低い電池20を使用対象に選択する。ここで、電圧値が高い電池20を使用対象に選択した場合、電池20を交互に使用することになるため、複数の電池20は、略同時期にErrorになる。しかし、電圧値が低い電池20を使用対象に選択することで、一方の電池20がErrorになっても他方の電池20には電力が残っている可能性が高い。そこで、電源制御部1006は、電圧値が低い電池20を使用対象に選択することで、電力が無くなったことにより印字できなくなってしまう可能性を低減している。 Further, the power supply control unit 1006 selects a battery 20 having a low voltage value among the plurality of batteries 20 as a target of use based on the measurement result of the voltage measurement unit 1005. Here, when the battery 20 having a high voltage value is selected as the target of use, the batteries 20 are used alternately, so that the plurality of batteries 20 become Errol at substantially the same time. However, by selecting the battery 20 having a low voltage value as the target of use, there is a high possibility that power remains in the other battery 20 even if one battery 20 becomes an electric power. Therefore, the power supply control unit 1006 reduces the possibility that printing cannot be performed due to the lack of electric power by selecting the battery 20 having a low voltage value as the target of use.

また、電源制御部1006は、温度測定部1004が測定した第1電池21又は第2電池22の温度が設定温度以上の場合に、電池選択部155による印字に使用する電力の供給を停止させる。 Further, the power supply control unit 1006 stops the supply of electric power used for printing by the battery selection unit 155 when the temperature of the first battery 21 or the second battery 22 measured by the temperature measurement unit 1004 is equal to or higher than the set temperature.

報知制御部1007は、電圧測定部1005の測定結果に基づいて、複数の電池20のそれぞれの状態を報知する。更に詳しくは、電源制御部1006は、電圧測定部1005の測定結果に基づいて、図3の電源制御テーブルに示された状態である場合に、図3の電源制御テーブルに示された状態を報知するように、電源マイクロコントローラ150に指示する。すなわち、報知制御部1007は、第1電池21の電圧値に応じて第1表示灯31を表示させる。また、報知制御部1007は、第2電池22の電圧値に応じて第2表示灯32を表示させる。 The notification control unit 1007 notifies the state of each of the plurality of batteries 20 based on the measurement result of the voltage measurement unit 1005. More specifically, the power supply control unit 1006 notifies the state shown in the power supply control table of FIG. 3 when the state is shown in the power supply control table of FIG. 3 based on the measurement result of the voltage measurement unit 1005. Instruct the power supply microcontroller 150 to do so. That is, the notification control unit 1007 displays the first indicator lamp 31 according to the voltage value of the first battery 21. Further, the notification control unit 1007 displays the second indicator lamp 32 according to the voltage value of the second battery 22.

また、報知制御部1007は、温度測定部1004の測定結果が電池20の異常発熱を示している場合に、第1表示灯31及び第2表示灯32を交互に赤色に点灯させる。これにより、報知制御部1007は、電池20の異常発熱を報知する。 Further, the notification control unit 1007 alternately turns on the first indicator lamp 31 and the second indicator lamp 32 in red when the measurement result of the temperature measuring unit 1004 indicates abnormal heat generation of the battery 20. As a result, the notification control unit 1007 notifies the abnormal heat generation of the battery 20.

次に、プリンタ1の動作について説明する。 Next, the operation of the printer 1 will be described.

図5は、第1の実施形態のプリンタ1が実行する切り替え処理の一例を示すフローチャートである。切り替え処理は、使用する電池20を切り替える処理である。 FIG. 5 is a flowchart showing an example of the switching process executed by the printer 1 of the first embodiment. The switching process is a process of switching the battery 20 to be used.

初期設定部1003は、電源マイクロコントローラ150の初期設定を実行する(ステップS1)。例えば、初期設定部1003は、CPU151や、電源マイクロコントローラ150のIOポートを入力ポートや出力ポートに設定したり、電圧を読み込むためのADCポートを設定したりする。 The initial setting unit 1003 executes the initial setting of the power supply microcontroller 150 (step S1). For example, the initial setting unit 1003 sets the IO port of the CPU 151 or the power supply microcontroller 150 as an input port or an output port, or sets an ADC port for reading a voltage.

電圧測定部1005は、複数の電池20の電圧値を測定する(ステップS2)。すなわち、電圧測定部1005は、第1電池21の電圧値及び第2電池22の電圧値を測定する。 The voltage measuring unit 1005 measures the voltage values of the plurality of batteries 20 (step S2). That is, the voltage measuring unit 1005 measures the voltage value of the first battery 21 and the voltage value of the second battery 22.

電源制御部1006は、電圧測定部1005が測定した測定結果である電圧値に基づいて、第1電池21及び第2電池22から使用対象の電池20を選択する(ステップS3)。 The power supply control unit 1006 selects the battery 20 to be used from the first battery 21 and the second battery 22 based on the voltage value which is the measurement result measured by the voltage measurement unit 1005 (step S3).

報知制御部1007は、電圧測定部1005が測定した測定結果である電圧値に基づいて、第1表示灯31及び第2表示灯32に第1電池21及び第2電池22の状態を表示させる(ステップS4)。 The notification control unit 1007 causes the first indicator lamp 31 and the second indicator lamp 32 to display the status of the first battery 21 and the second battery 22 based on the voltage value which is the measurement result measured by the voltage measuring unit 1005. Step S4).

電圧測定部1005は、第1電池21及び第2電池22の電圧値を測定する条件である測定条件が満たされたか否かを判定する(ステップS5)。例えば、電圧測定部1005は、印字要求を取得した場合、印字を開始した場合、印字を終了した場合、又は事前に設定された設定時間が経過した場合に、測定条件に満たされたと判定する。 The voltage measuring unit 1005 determines whether or not the measurement conditions, which are the conditions for measuring the voltage values of the first battery 21 and the second battery 22, are satisfied (step S5). For example, the voltage measuring unit 1005 determines that the measurement conditions are satisfied when a printing request is acquired, printing is started, printing is completed, or a preset set time has elapsed.

電圧測定部1005は、第1電池21の電圧値及び第2電池22のうち、使用対象の電池20の電圧値を測定する(ステップS6)。 The voltage measuring unit 1005 measures the voltage value of the first battery 21 and the voltage value of the battery 20 to be used among the second battery 22 (step S6).

電源制御部1006は、測定した電圧値が閾値未満であるか否かを判定する(ステップS7)。すなわち、電源制御部1006は、ERRORとなる12V以上であるか否かを判定する。電圧値が閾値以上である場合に(ステップS7;No)、電源制御部1006は、ステップS5に移行して、電圧値が閾値未満になるまで待機する。 The power supply control unit 1006 determines whether or not the measured voltage value is less than the threshold value (step S7). That is, the power supply control unit 1006 determines whether or not the voltage is 12 V or higher, which is an error. When the voltage value is equal to or higher than the threshold value (step S7; No), the power supply control unit 1006 shifts to step S5 and waits until the voltage value becomes less than the threshold value.

電圧値が閾値未満になった場合に(ステップS7;Yes)、電源制御部1006は、待機中の電池20の電圧値を測定する(ステップS8)。 When the voltage value becomes less than the threshold value (step S7; Yes), the power supply control unit 1006 measures the voltage value of the standby battery 20 (step S8).

電源制御部1006は、測定した電圧値が閾値以上であるか否かを判定する(ステップS9)。すなわち、電源制御部1006は、待機中の電池20の電圧値がERRORとなる12V以上であるか否かを判定する。 The power supply control unit 1006 determines whether or not the measured voltage value is equal to or greater than the threshold value (step S9). That is, the power supply control unit 1006 determines whether or not the voltage value of the standby battery 20 is 12 V or more, which is ERROR.

測定した電圧値が閾値未満である場合に(ステップS9;No)、報知制御部1007は、Errorであることを報知する(ステップS10)。すなわち、報知制御部1007は、第1表示灯31及び第2表示灯32を短周期で赤色に点滅させる。 When the measured voltage value is less than the threshold value (step S9; No), the notification control unit 1007 notifies that it is an error (step S10). That is, the notification control unit 1007 blinks the first indicator lamp 31 and the second indicator lamp 32 in red in a short cycle.

測定した電圧値が閾値以上である場合に(ステップS9;Yes)、通信制御部1001は、POS端末から印字要求を受信しているか否かを判定する(ステップS11)。印字要求を受信していない場合に(ステップS11;No)、電源制御部1006は、ステップS13に移行する。 When the measured voltage value is equal to or greater than the threshold value (step S9; Yes), the communication control unit 1001 determines whether or not a print request is received from the POS terminal (step S11). When the print request is not received (step S11; No), the power supply control unit 1006 shifts to step S13.

印字要求を受信している場合に(ステップS11;Yes)、電源制御部1006は、印字要求に応じた印字が終了したか否かを判定する(ステップS12)。印字要求に応じた印字が終了していない場合に(ステップS12:No)、電源制御部1006は、印字が終了するまで待機する。 When the print request is received (step S11; Yes), the power supply control unit 1006 determines whether or not the printing according to the print request is completed (step S12). When the printing according to the printing request is not completed (step S12: No), the power supply control unit 1006 waits until the printing is completed.

印字要求に応じた印字が終了した場合に(ステップS12;Yes)、電源制御部1006は、待機中の電池20を使用対象の電池20に切り替える(ステップS13)。ここで、印字中の電池20を切り替えると一時的に電圧が降下するため、印字品質が劣化してしまう場合がある。電源制御部1006は、印字が終了してから電池20を切り替える。よって、電源制御部1006は、電池20の切り替えよる印字品質の劣化を防止することができる。 When printing in response to the print request is completed (step S12; Yes), the power supply control unit 1006 switches the standby battery 20 to the battery 20 to be used (step S13). Here, when the battery 20 during printing is switched, the voltage drops temporarily, so that the print quality may deteriorate. The power control unit 1006 switches the battery 20 after printing is completed. Therefore, the power supply control unit 1006 can prevent deterioration of print quality due to switching of the battery 20.

以上により、プリンタ1は、切り替え処理を終了する。 As described above, the printer 1 ends the switching process.

図6は、第1の実施形態のプリンタ1が実行する温度監視処理の一例を示すフローチャートである。温度監視処理は、第1電池21及び第2電池22による異常発熱を監視する処理である。 FIG. 6 is a flowchart showing an example of the temperature monitoring process executed by the printer 1 of the first embodiment. The temperature monitoring process is a process for monitoring abnormal heat generation by the first battery 21 and the second battery 22.

温度測定部1004は、第1電池21及び第2電池22の温度を測定する(ステップS21)。 The temperature measuring unit 1004 measures the temperatures of the first battery 21 and the second battery 22 (step S21).

電源制御部1006は、測定した温度が設定温度以上であるか否かを判定する(ステップS22)。設定温度未満である場合に(ステップS22;No)、プリンタ1は、温度監視処理を終了する。 The power supply control unit 1006 determines whether or not the measured temperature is equal to or higher than the set temperature (step S22). When the temperature is lower than the set temperature (step S22; No), the printer 1 ends the temperature monitoring process.

設定温度以上である場合に(ステップS22;Yes)、電源制御部1006は、印字に使用する電力供給を停止する(ステップS23)。すなわち、電源制御部1006は、電池選択部155による印字に使用する電力供給を停止させる。これにより、印字制御部1002は、印字中の場合に印字を停止する。 When the temperature is equal to or higher than the set temperature (step S22; Yes), the power supply control unit 1006 stops the power supply used for printing (step S23). That is, the power supply control unit 1006 stops the power supply used for printing by the battery selection unit 155. As a result, the print control unit 1002 stops printing when printing is in progress.

報知制御部1007は、電池20が設定温度以上になっていることを表示灯30に表示させる(ステップS24)。 The notification control unit 1007 causes the indicator lamp 30 to indicate that the battery 20 has reached the set temperature or higher (step S24).

温度測定部1004は、第1電池21及び第2電池22の温度を測定する(ステップS25)。 The temperature measuring unit 1004 measures the temperatures of the first battery 21 and the second battery 22 (step S25).

電源制御部1006は、測定した温度が設定温度以上であるか否かを判定する(ステップS26)。設定温度以上である場合に(ステップS26;No)、報知制御部1007は、ステップS24に移行して、設定温度以上になっていることを表示させる。 The power supply control unit 1006 determines whether or not the measured temperature is equal to or higher than the set temperature (step S26). When the temperature is equal to or higher than the set temperature (step S26; No), the notification control unit 1007 shifts to step S24 to display that the temperature is equal to or higher than the set temperature.

設定温度未満である場合に(ステップS26;No)、報知制御部1007は、設定温度以上になっていることの表示を終了する(ステップS27)。 When the temperature is lower than the set temperature (step S26; No), the notification control unit 1007 ends the display indicating that the temperature is equal to or higher than the set temperature (step S27).

以上により、プリンタ1は、温度監視処理を終了する。 As described above, the printer 1 ends the temperature monitoring process.

図7は、第1の実施形態のプリンタ1が実行する印字処理の一例を示すフローチャートである。印字処理は、電圧値に応じた印字を実行する処理である。 FIG. 7 is a flowchart showing an example of the printing process executed by the printer 1 of the first embodiment. The printing process is a process of executing printing according to a voltage value.

通信制御部1001は、印字要求を受信する(ステップS31)。 The communication control unit 1001 receives the print request (step S31).

温度測定部1004は、第1電池21及び第2電池22の温度を測定する(ステップS32)。 The temperature measuring unit 1004 measures the temperatures of the first battery 21 and the second battery 22 (step S32).

温度測定部1004は、第1電池21及び第2電池22の温度が設定温度未満であるか否かを判定する(ステップS33)。 The temperature measuring unit 1004 determines whether or not the temperatures of the first battery 21 and the second battery 22 are lower than the set temperature (step S33).

第1電池21及び第2電池22の温度が設定温度以上の場合に(ステップS33;No)、印字制御部1002は、電池選択部155により電力供給が停止されるため印字不可となる(ステップS34)。 When the temperatures of the first battery 21 and the second battery 22 are equal to or higher than the set temperature (step S33; No), the print control unit 1002 cannot print because the power supply is stopped by the battery selection unit 155 (step S34). ).

第1電池21及び第2電池22の温度が設定温度未満の場合に(ステップS33;Yes)、電圧測定部1005は、第1電池21及び第2電池22の電圧値を測定する(ステップS35)。 When the temperatures of the first battery 21 and the second battery 22 are lower than the set temperature (step S33; Yes), the voltage measuring unit 1005 measures the voltage values of the first battery 21 and the second battery 22 (step S35). ..

電源制御部1006は、使用対象の電池20の電圧値がCritical Low以上であるか否かを判定する(ステップS36)。すなわち、電源制御部1006は、12V以上であるか否かを判定する。使用対象の電池20の電圧値がErrorである場合に(ステップS36;No)、印字制御部1002は、ステップS34において、電力不足のため印字不可となる。 The power supply control unit 1006 determines whether or not the voltage value of the battery 20 to be used is equal to or higher than Critical Low (step S36). That is, the power supply control unit 1006 determines whether or not the voltage is 12 V or higher. When the voltage value of the battery 20 to be used is Error (step S36; No), the print control unit 1002 cannot print in step S34 due to insufficient power.

使用対象の電池20の電圧値がCritical Low以上である場合に(ステップS36;Yes)、電源制御部1006は、使用対象の電池20の電圧値がLow以上であるか否かを判定する(ステップS37)。すなわち、電源制御部1006は、13V以上であるか否かを判定する。使用対象の電池20の電圧値がCritical Lowである場合に(ステップS37;No)、印字制御部1002は、電池20の電圧値などの状態を印字する(ステップS38)。 When the voltage value of the battery 20 to be used is equal to or higher than Critical Low (step S36; Yes), the power supply control unit 1006 determines whether or not the voltage value of the battery 20 to be used is equal to or higher than Low (step). S37). That is, the power supply control unit 1006 determines whether or not the voltage is 13 V or higher. When the voltage value of the battery 20 to be used is Critical Low (step S37; No), the print control unit 1002 prints a state such as the voltage value of the battery 20 (step S38).

使用対象の電池20の電圧値がLow以上である場合に(ステップS37;Yes)、電源制御部1006は、使用対象の電池20の電圧値がFull以上であるか否かを判定する(ステップS39)。すなわち、電源制御部1006は、14.4V以上であるか否かを判定する。使用対象の電池20の電圧値がLowである場合に(ステップS39;No)、印字制御部1002は、低速で印字データを印字する(ステップS40)。 When the voltage value of the battery 20 to be used is Low or more (step S37; Yes), the power supply control unit 1006 determines whether or not the voltage value of the battery 20 to be used is Full or more (step S39). ). That is, the power supply control unit 1006 determines whether or not the voltage is 14.4 V or higher. When the voltage value of the battery 20 to be used is Low (step S39; No), the print control unit 1002 prints the print data at a low speed (step S40).

使用対象の電池20の電圧値がFull以上である場合に(ステップS39;Yes)、印字制御部1002は、通常速度で印字データを印字する(ステップS41)。 When the voltage value of the battery 20 to be used is Full or higher (step S39; Yes), the print control unit 1002 prints the print data at a normal speed (step S41).

以上により、プリンタ1は、印字処理を終了する。 As described above, the printer 1 ends the printing process.

以上のように、第1の実施形態にかかるプリンタ1は、第1電池21及び第2電池22等のように複数の電池20が接続されている。プリンタ1は、印字要求を取得した場合に、複数の電池20のそれぞれの電圧値を測定する。プリンタ1は、測定結果に基づいて、複数の電池20のうち電圧値が閾値以上の電池20を使用対象に選択する。よって、第1の実施形態に係るプリンタ1は、電力不足により停止してしまう可能性を低減させることができる。 As described above, the printer 1 according to the first embodiment is connected to a plurality of batteries 20 such as the first battery 21 and the second battery 22. When the printer 1 acquires the print request, the printer 1 measures the voltage values of the plurality of batteries 20 respectively. Based on the measurement result, the printer 1 selects a battery 20 having a voltage value equal to or higher than a threshold value among the plurality of batteries 20 as a target for use. Therefore, the printer 1 according to the first embodiment can reduce the possibility of stopping due to insufficient power.

(第2の実施形態)
次に、第2の実施形態について説明する。なお、第1の実施形態と同一の構成については同一の符号を付与し説明を省略する。
(Second Embodiment)
Next, the second embodiment will be described. The same components as those in the first embodiment are designated by the same reference numerals, and the description thereof will be omitted.

図8は、第2の実施形態にかかるプリンタ1aの外観の一例を示す斜視図である。第2の実施形態にかかるプリンタ1aは、印字ユニット2と、電源ユニット3とに分離可能である点が第1の実施形態にかかるプリンタ1と異なっている。印字ユニット2は、印字に関する各種ハードウェアを備えるユニットである。電源ユニット3は、電源に関する各種ハードウェアを備えるユニットである。電源ユニット3は、印字ユニット2と連結するための連結部15を備えている。 FIG. 8 is a perspective view showing an example of the appearance of the printer 1a according to the second embodiment. The printer 1a according to the second embodiment is different from the printer 1 according to the first embodiment in that the printing unit 2 and the power supply unit 3 can be separated. The printing unit 2 is a unit provided with various hardware related to printing. The power supply unit 3 is a unit including various hardware related to the power supply. The power supply unit 3 includes a connecting portion 15 for connecting to the printing unit 2.

連結部15は、電源ユニット3の上面に設けられる。連結部15は、印字ユニット2に設けられた孔に挿入される突出部16を複数備えている。突出部16は、先端がプリンタ1aの前面の方向に略直角に曲がっている。突出部16は、電源ユニット3と、印字ユニット2とが連結した場合に、連結状態を固定することができる。一方、電源ユニット3と、印字ユニット2との連結を解除する場合には、使用者は、印字ユニット2を前方にずらすことで、連結を解除することできる。 The connecting portion 15 is provided on the upper surface of the power supply unit 3. The connecting portion 15 includes a plurality of protruding portions 16 that are inserted into holes provided in the printing unit 2. The tip of the protrusion 16 is bent at a substantially right angle toward the front surface of the printer 1a. The protruding portion 16 can fix the connected state when the power supply unit 3 and the printing unit 2 are connected. On the other hand, when the connection between the power supply unit 3 and the printing unit 2 is released, the user can release the connection by moving the printing unit 2 forward.

次に、プリンタ1aのハードウェア構成について説明する。 Next, the hardware configuration of the printer 1a will be described.

図9は、プリンタ1aのハードウェアの構成の一例を示すブロック図である。印字ユニット2は、電源ユニット3と接続するための第1接続インタフェース170を備えている。また、電源ユニット3は、印字ユニット2と接続するための第2接続インタフェース180を備えている。第1接続インタフェース170及び第2接続インタフェース180は、USB(Universal Serial Bus)や、RS-232(Recommended Standard 232)等のインタフェースである。なお、第1接続インタフェース170及び第2接続インタフェース180は、これらに限らず、他のインタフェースであってもよい。第1接続インタフェース170及び第2接続インタフェース180は、印字ユニット2と電源ユニット3との間の通信を実行する。 FIG. 9 is a block diagram showing an example of the hardware configuration of the printer 1a. The print unit 2 includes a first connection interface 170 for connecting to the power supply unit 3. Further, the power supply unit 3 includes a second connection interface 180 for connecting to the printing unit 2. The first connection interface 170 and the second connection interface 180 are interfaces such as USB (Universal Serial Bus) and RS-232 (Recommended Standard 232). The first connection interface 170 and the second connection interface 180 are not limited to these, and may be other interfaces. The first connection interface 170 and the second connection interface 180 execute communication between the printing unit 2 and the power supply unit 3.

また、第1接続インタフェース170及び第2接続インタフェース180は、電源ユニット3から印字ユニット2へ第1電池21及び第2電池22の電力を送電する。なお、プリンタ1aは、第1接続インタフェース170及び第2接続インタフェース180に限らず、送電するための別のインタフェースを備えていてもよい。 Further, the first connection interface 170 and the second connection interface 180 transmit the electric power of the first battery 21 and the second battery 22 from the power supply unit 3 to the printing unit 2. The printer 1a is not limited to the first connection interface 170 and the second connection interface 180, and may include another interface for power transmission.

次に、プリンタ1aが有する特徴的な機能について説明する。ここで、図10は、プリンタ1aが有する特徴的な機能の構成を示すブロック図である。 Next, the characteristic functions of the printer 1a will be described. Here, FIG. 10 is a block diagram showing a configuration of characteristic functions of the printer 1a.

印字ユニット2の制御部110は、メモリ120に記憶された制御プログラムPをRAM113に展開し、制御プログラムPに従って動作することで、各機能部をRAM113に生成する。具体的には、印字ユニット2の制御部110は、機能部として、通信制御部1001、印字制御部1002、モード制御部1011、及び第1接続制御部1012を備える。 The control unit 110 of the print unit 2 expands the control program P stored in the memory 120 into the RAM 113 and operates according to the control program P to generate each functional unit in the RAM 113. Specifically, the control unit 110 of the print unit 2 includes a communication control unit 1001, a print control unit 1002, a mode control unit 1011 and a first connection control unit 1012 as functional units.

通信制御部1001、及び印字制御部1002は、第1の実施形態と同様の機能を有している。 The communication control unit 1001 and the print control unit 1002 have the same functions as those in the first embodiment.

モード制御部1011は、プリンタ1aのモードを設定する。モードには、通常モードと、低消費電力モードとが有る。通常モードとは、低消費電力モードと比べて消費電力が多いモードである。また、通常モードの場合、プリンタ1aは、低消費電力モードよりも印字速度を速くしたり、待機状態に移行する時間を長くしたりする。低消費電力モードは、スリープ状態に移行させる時間や、サーマルヘッド142の印字スピードや、ストローブの分割や、熱印加時間等において電池20の消費電力を少なくなるように調整されたモードである。 The mode control unit 1011 sets the mode of the printer 1a. The mode includes a normal mode and a low power consumption mode. The normal mode is a mode in which power consumption is higher than that in the low power consumption mode. Further, in the normal mode, the printer 1a may increase the printing speed or lengthen the time to shift to the standby state as compared with the low power consumption mode. The low power consumption mode is a mode adjusted so as to reduce the power consumption of the battery 20 in terms of the time for transition to the sleep state, the printing speed of the thermal head 142, the division of the strobe, the heat application time, and the like.

印字ユニット2に電源ユニット3が接続されている場合、プリンタ1aは、電源ユニット3に接続された複数の電池20で駆動することを示している。この場合、モード制御部1011は、低消費電力モードに設定して、電力の使用を節約する。一方、印字ユニット2に電源ユニット3が接続されていない場合、プリンタ1aは、外部電源の電力を使用して駆動することを示している。この場合、モード制御部1011は、通常モードに設定して、低消費電力モードより利便性を高める。 When the power supply unit 3 is connected to the print unit 2, the printer 1a indicates that the printer 1a is driven by a plurality of batteries 20 connected to the power supply unit 3. In this case, the mode control unit 1011 sets the low power consumption mode to save power consumption. On the other hand, when the power supply unit 3 is not connected to the print unit 2, the printer 1a indicates that the printer 1a is driven by using the electric power of the external power supply. In this case, the mode control unit 1011 is set to the normal mode to improve the convenience as compared with the low power consumption mode.

第1接続制御部1012は、第1接続インタフェース170を制御して、電源ユニット3との通信を実行する。第1接続制御部1012は、印字開始を示す開始コマンド、及び印字終了を示す終了コマンドを電源ユニット3に送信する。これにより、電源ユニット3は、印字中を把握することができるため、印字中の電池20の切り替えを防止することができる。その結果、電源ユニット3は、印字中に電池20を切り替えたことによる印字品質の劣化を防止することができる。 The first connection control unit 1012 controls the first connection interface 170 to execute communication with the power supply unit 3. The first connection control unit 1012 transmits a start command indicating the start of printing and an end command indicating the end of printing to the power supply unit 3. As a result, the power supply unit 3 can grasp the printing process, so that it is possible to prevent the battery 20 from being switched during printing. As a result, the power supply unit 3 can prevent deterioration of print quality due to switching the battery 20 during printing.

また、第1接続制御部1012は、使用対象の電池20の状態を示す電池状態情報を電源ユニット3から受信する。電池状態情報には、使用対象の電池20がFull、Low、Critical Low、又はErrorの何れの状態に該当するかが示されている。これにより、印字制御部1002は、使用対象の電池20の状態に応じた印字を実行することができる。 Further, the first connection control unit 1012 receives the battery status information indicating the status of the battery 20 to be used from the power supply unit 3. The battery status information indicates whether the battery 20 to be used corresponds to the full, low, critical low, or error state. As a result, the print control unit 1002 can perform printing according to the state of the battery 20 to be used.

電源ユニット3の電源マイクロコントローラ150は、ROM152等に記憶されたプログラムをRAM153に展開し、プログラムに従って動作することで、各機能部をRAM153に生成する。具体的には、電源マイクロコントローラ150は、機能部として、初期設定部1003、温度測定部1004、電圧測定部1005、電源制御部1006、報知制御部1007、及び第2接続制御部1013を備える。 The power supply microcontroller 150 of the power supply unit 3 expands the program stored in the ROM 152 or the like into the RAM 153 and operates according to the program to generate each functional unit in the RAM 153. Specifically, the power supply microcontroller 150 includes an initial setting unit 1003, a temperature measurement unit 1004, a voltage measurement unit 1005, a power supply control unit 1006, a notification control unit 1007, and a second connection control unit 1013 as functional units.

初期設定部1003、温度測定部1004、電圧測定部1005、電源制御部1006、及び報知制御部1007は、第1の実施形態と同様の機能を有している。 The initial setting unit 1003, the temperature measurement unit 1004, the voltage measurement unit 1005, the power supply control unit 1006, and the notification control unit 1007 have the same functions as those in the first embodiment.

第2接続制御部1013は、第2接続インタフェース180を制御して、印字ユニット2との通信を実行する。第2接続制御部1013は、印字開始を示す開始コマンド、及び印字終了を示す終了コマンドを印字ユニット2から受信する。また、第2接続制御部1013は、使用対象の電池20の状態を示す電池状態情報を印字ユニット2に送信する。 The second connection control unit 1013 controls the second connection interface 180 to execute communication with the print unit 2. The second connection control unit 1013 receives a start command indicating the start of printing and an end command indicating the end of printing from the print unit 2. Further, the second connection control unit 1013 transmits the battery status information indicating the status of the battery 20 to be used to the printing unit 2.

次に、プリンタ1aの動作について説明する。 Next, the operation of the printer 1a will be described.

図11は、第2の実施形態の印字ユニット2が実行するモード設定処理の一例を示すフローチャートである。モード設定処理は、プリンタ1aの消費電力に関するモードを設定する処理である。また、モード設定処理は、電源投入後に実行される。 FIG. 11 is a flowchart showing an example of the mode setting process executed by the print unit 2 of the second embodiment. The mode setting process is a process for setting a mode related to the power consumption of the printer 1a. Further, the mode setting process is executed after the power is turned on.

モード制御部1011は、印字ユニット2が電源ユニット3に対応しているか否かを判定する(ステップS51)。例えば、モード制御部1011は、ROM152に記憶されている設定や、内部信号等に基づいて、電源ユニット3に対応しているか否かを判定する。 The mode control unit 1011 determines whether or not the print unit 2 corresponds to the power supply unit 3 (step S51). For example, the mode control unit 1011 determines whether or not it corresponds to the power supply unit 3 based on the settings stored in the ROM 152, the internal signal, and the like.

電源ユニット3に対応していない場合に(ステップS51;No)、モード制御部1011は、通常モードに設定する(ステップS52)。 When the power supply unit 3 is not supported (step S51; No), the mode control unit 1011 sets the normal mode (step S52).

電源ユニット3に対応している場合に(ステップS51;Yes)、第1接続制御部1012は、第1接続インタフェース170を制御して、電源ユニット3の第2接続インタフェース180との接続を確立するために接続要求を送信する(ステップS53)。 When the power supply unit 3 is supported (step S51; Yes), the first connection control unit 1012 controls the first connection interface 170 to establish the connection of the power supply unit 3 with the second connection interface 180. To send a connection request (step S53).

第1接続制御部1012は、電源ユニット3の第2接続インタフェース180から接続要求に対して、接続を承認する応答を受信したか否かを判定する(ステップS54)。接続を承認する応答を受信しなかった場合に(ステップS54;No)、モード制御部1011は、通常モードに設定する。 The first connection control unit 1012 determines whether or not a response for approving the connection has been received from the second connection interface 180 of the power supply unit 3 in response to the connection request (step S54). When the response for approving the connection is not received (step S54; No), the mode control unit 1011 sets the normal mode.

接続を承認する応答を受信した場合に(ステップS54;Yes)、モード制御部1011は、低消費電力モードに設定する(ステップS55)。 When the response approving the connection is received (step S54; Yes), the mode control unit 1011 sets the low power consumption mode (step S55).

以上により、プリンタ1は、モード設定処理を終了する。 As described above, the printer 1 ends the mode setting process.

プリンタ1aは、使用する電池20を切り替える切り替え処理を、第1の実施形態にかかるプリンタ1と略同様のフローで実行する。そのため、第2の実施形態では、切り替え処理の説明を省略する。 The printer 1a executes a switching process for switching the battery 20 to be used in a flow substantially similar to that of the printer 1 according to the first embodiment. Therefore, in the second embodiment, the description of the switching process will be omitted.

また、プリンタ1aは、第1電池21及び第2電池22による異常発熱を監視する温度監視処理を第1の実施形態にかかるプリンタ1と略同様のフローで実行する。そのため、第2の実施形態では、温度監視処理の説明を省略する。 Further, the printer 1a executes the temperature monitoring process for monitoring the abnormal heat generation by the first battery 21 and the second battery 22 in substantially the same flow as that of the printer 1 according to the first embodiment. Therefore, in the second embodiment, the description of the temperature monitoring process will be omitted.

次に、プリンタ1aが実行する印字処理について説明する。 Next, the printing process executed by the printer 1a will be described.

まず、図12を用いて、第1電池21及び第2電池22が正常な場合について説明する。すなわち、第1電池21及び第2電池22がFull又はLowである場合について説明する。図12は、第2の実施形態のプリンタ1aが実行する正常な印字処理の一例を示すシーケンス図である。 First, a case where the first battery 21 and the second battery 22 are normal will be described with reference to FIG. That is, the case where the first battery 21 and the second battery 22 are Full or Low will be described. FIG. 12 is a sequence diagram showing an example of a normal printing process executed by the printer 1a of the second embodiment.

印字ユニット2の第1接続制御部1012は、通信制御部1001が印字要求を受信した場合に、印字の開始を通知する開始コマンドを電源ユニット3に送信する(ステップS61)。 When the communication control unit 1001 receives the print request, the first connection control unit 1012 of the print unit 2 transmits a start command for notifying the start of printing to the power supply unit 3 (step S61).

電源ユニット3の第2接続制御部1013は、印字ユニット2から開始コマンドを受信する(ステップS62)。電源制御部1006は、第1電池21及び第2電池22の状態を確認する電池確認処理を実行する(ステップS63)。 The second connection control unit 1013 of the power supply unit 3 receives a start command from the print unit 2 (step S62). The power supply control unit 1006 executes a battery confirmation process for confirming the states of the first battery 21 and the second battery 22 (step S63).

具体的には、電源制御部1006は、温度測定部1004の測定結果に基づいて、第1電池21及び第2電池22の温度が設定温度未満であるか否かを判定する。また、電源制御部1006は、電圧測定部1005の測定結果に基づいて、第1電池21及び第2電池22の電圧値がFull、Low、Critical Low、又はErrorの何れの状態に該当するかを判定する。図12に示すシーケンス図は、第1電池21及び第2電池22が正常な場合を想定しているため、第1電池21及び第2電池22の温度は設定温度未満であり、電圧値はFull、又はLowとなる。 Specifically, the power supply control unit 1006 determines whether or not the temperatures of the first battery 21 and the second battery 22 are lower than the set temperature based on the measurement result of the temperature measurement unit 1004. Further, the power supply control unit 1006 determines which of the full, low, critical low, and error states the voltage values of the first battery 21 and the second battery 22 correspond to, based on the measurement results of the voltage measuring unit 1005. judge. Since the sequence diagram shown in FIG. 12 assumes that the first battery 21 and the second battery 22 are normal, the temperatures of the first battery 21 and the second battery 22 are lower than the set temperature, and the voltage value is Full. , Or Low.

第2接続制御部1013は、電池確認処理の実行結果として電池状態情報を印字ユニット2に送信する(ステップS64)。 The second connection control unit 1013 transmits the battery status information to the print unit 2 as the execution result of the battery confirmation process (step S64).

印字ユニット2の第1接続制御部1012は、電池状態情報を電源ユニット3から受信する(ステップS65)。 The first connection control unit 1012 of the print unit 2 receives the battery status information from the power supply unit 3 (step S65).

印字ユニット2の印字制御部1002は、受信した電池状態情報に基づいて、印字要求の対象となる印字データを印字する(ステップS66)。具体的には、印字制御部1002は、使用対象の電池20がFullであることを電池状態情報が示している場合には、通常の印字を実行する。また、印字制御部1002は、使用対象の電池20がLowであることを電池状態情報が示している場合には、低速での印字を実行する。 The print control unit 1002 of the print unit 2 prints the print data that is the target of the print request based on the received battery status information (step S66). Specifically, the print control unit 1002 executes normal printing when the battery status information indicates that the battery 20 to be used is Full. Further, the print control unit 1002 executes printing at a low speed when the battery status information indicates that the battery 20 to be used is Low.

印字ユニット2の第1接続制御部1012は、印字が終了した場合に、印字終了を通知する終了コマンドを電源ユニット3に送信する(ステップS67)。 When the printing is completed, the first connection control unit 1012 of the printing unit 2 transmits an end command for notifying the end of printing to the power supply unit 3 (step S67).

電源ユニット3の第2接続制御部1013は、印字ユニット2から終了コマンドを受信する(ステップS68)。 The second connection control unit 1013 of the power supply unit 3 receives the end command from the print unit 2 (step S68).

電源制御部1006は、図3に示す電源制御テーブルに基づいて、使用対象の電池20の電圧値に応じて電池20を切り替える(ステップS69)。 The power supply control unit 1006 switches the battery 20 according to the voltage value of the battery 20 to be used based on the power supply control table shown in FIG. 3 (step S69).

以上により、プリンタ1aは、正常な場合の印字処理を終了する。 As described above, the printer 1a ends the printing process in the normal case.

次に、図13を用いて、第1電池21及び第2電池22が異常な場合について説明する。すなわち、第1電池21及び第2電池22がCritical Low又はErrorである場合について説明する。図13は、第2の実施形態のプリンタ1aが実行する異常な印字処理の一例を示すシーケンス図である。 Next, a case where the first battery 21 and the second battery 22 are abnormal will be described with reference to FIG. That is, the case where the first battery 21 and the second battery 22 are Critical Low or Error will be described. FIG. 13 is a sequence diagram showing an example of an abnormal printing process executed by the printer 1a of the second embodiment.

印字ユニット2の第1接続制御部1012は、通信制御部1001が印字要求を受信した場合に、印字の開始を通知する開始コマンドを電源ユニット3に送信する(ステップS81)。 When the communication control unit 1001 receives the print request, the first connection control unit 1012 of the print unit 2 transmits a start command for notifying the start of printing to the power supply unit 3 (step S81).

電源ユニット3の第2接続制御部1013は、印字ユニット2から開始コマンドを受信する(ステップS82)。電源制御部1006は、第1電池21及び第2電池22の状態を確認する電池確認処理を実行する(ステップS83)。図13に示すシーケンス図は、第1電池21及び第2電池22が異常な場合を想定しているため、第1電池21、又は第2電池22の温度は設定温度以上となる。または、第1電池21、又は第2電池22の電圧値はCritical Low又はErrorとなる。 The second connection control unit 1013 of the power supply unit 3 receives a start command from the print unit 2 (step S82). The power supply control unit 1006 executes a battery confirmation process for confirming the states of the first battery 21 and the second battery 22 (step S83). Since the sequence diagram shown in FIG. 13 assumes a case where the first battery 21 and the second battery 22 are abnormal, the temperature of the first battery 21 or the second battery 22 is equal to or higher than the set temperature. Alternatively, the voltage value of the first battery 21 or the second battery 22 is Critical Low or Error.

第2接続制御部1013は、電池確認処理の実行結果として電池状態情報を印字ユニット2に送信する(ステップS84)。 The second connection control unit 1013 transmits the battery status information to the print unit 2 as the execution result of the battery confirmation process (step S84).

印字ユニット2の第1接続制御部1012は、電池状態情報を電源ユニット3から受信する(ステップS85)。 The first connection control unit 1012 of the print unit 2 receives the battery status information from the power supply unit 3 (step S85).

印字ユニット2の印字制御部1002は、受信した電池状態情報に基づいて、処理を実行する(ステップS86)。具体的には、印字制御部1002は、第1電池21、又は第2電池22の温度が設定温度以上の場合には、電池選択部155が印字に使用する電力の供給を停止するため、印字を実行しない。また、印字制御部1002は、使用対象の電池20がErrorの場合には、印字を実行しない。また、印字制御部1002は、Critical Lowの場合には、電池20の状態を印字する。 The print control unit 1002 of the print unit 2 executes the process based on the received battery status information (step S86). Specifically, the print control unit 1002 prints because the battery selection unit 155 stops supplying power used for printing when the temperature of the first battery 21 or the second battery 22 is equal to or higher than the set temperature. Do not execute. Further, the print control unit 1002 does not execute printing when the battery 20 to be used is an Error. Further, the print control unit 1002 prints the state of the battery 20 in the case of Critical Low.

以上により、プリンタ1aは、異常な場合の印字処理を終了する。 As described above, the printer 1a ends the printing process in the case of an abnormality.

以上のように、第2の実施形態に係るプリンタ1aは、印字ユニット2と電源ユニット3とに分離することができる。そして、プリンタ1aは、分離した場合であっても、電力不足により停止してしまう可能性を低減させることができる。 As described above, the printer 1a according to the second embodiment can be separated into the printing unit 2 and the power supply unit 3. Then, even when the printer 1a is separated, it is possible to reduce the possibility that the printer 1a will be stopped due to insufficient power.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other embodiments, and various omissions, replacements, and changes can be made without departing from the gist of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are also included in the scope of the invention described in the claims and the equivalent scope thereof.

上記実施形態や変形例の各装置で実行されるプログラムは、各装置が備える記憶媒体(ROM又は記憶部)に予め組み込んで提供するものとするが、これに限らないものとする。例えば、インストール可能な形式又は実行可能な形式のファイルでCD−ROM、フレキシブルディスク(FD)、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録して提供するように構成してもよい。さらに、記憶媒体は、コンピュータ或いは組み込みシステムと独立した媒体に限らず、LANやインターネット等により伝達されたプログラムをダウンロードして記憶又は一時記憶した記憶媒体も含まれる。 The program executed by each device of the above-described embodiment or modification shall be provided by incorporating it into a storage medium (ROM or storage unit) provided in each device in advance, but the program is not limited to this. For example, a file in an installable format or an executable format should be recorded and provided on a computer-readable recording medium such as a CD-ROM, a flexible disk (FD), a CD-R, or a DVD (Digital Versatile Disk). It may be configured as. Further, the storage medium is not limited to a medium independent of a computer or an embedded system, but also includes a storage medium in which a program transmitted by a LAN, the Internet, or the like is downloaded and stored or temporarily stored.

また、上記実施形態や変形例の各装置で実行されるプログラムをインターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよいし、インターネット等のネットワーク経由で提供又は配布するように構成してもよい。 Further, the program executed by each device of the above-described embodiment or modification may be stored on a computer connected to a network such as the Internet and provided by downloading via the network, or the Internet. It may be configured to be provided or distributed via a network such as.

1 プリンタ
2 印字ユニット
3 電源ユニット
20 電池
21 第1電池
22 第2電池
30 表示灯
31 第1表示灯
32 第2表示灯
121 第1接続端子
122 第2接続端子
150 電源マイクロコントローラ
155 電池選択部
158 温度センサ
170 第1接続インタフェース
180 第2接続インタフェース
1001 通信制御部
1002 印字制御部
1003 初期設定部
1004 温度測定部
1005 電圧測定部
1006 電源制御部
1007 報知制御部
1011 モード制御部
1012 第1接続制御部
1013 第2接続制御部
1 Printer 2 Printing unit 3 Power supply unit 20 Battery 21 1st battery 22 2nd battery 30 Indicator light 31 1st indicator lamp 32 2nd indicator lamp 121 1st connection terminal 122 2nd connection terminal 150 Power supply microcontroller 155 Battery selection unit 158 Temperature sensor 170 1st connection interface 180 2nd connection interface 1001 Communication control unit 1002 Print control unit 1003 Initial setting unit 1004 Temperature measurement unit 1005 Voltage measurement unit 1006 Power supply control unit 1007 Notification control unit 1011 Mode control unit 1012 1st connection control unit 1013 2nd connection control unit

特開平7−304203号公報Japanese Unexamined Patent Publication No. 7-304203

Claims (6)

複数の電池のそれぞれと接続する接続手段と、
前記接続手段に接続された前記複数の電池を使用して印字する印字手段と、
前記印字手段に対する印字要求を取得する取得手段と、
前記取得手段が前記印字要求を取得した場合に、前記複数の電池のそれぞれの電圧値を測定する測定手段と、
前記測定手段の測定結果に基づいて、前記複数の電池のうち前記電圧値が閾値以上の電池を使用対象に選択する選択手段と、
を備えるプリンタ。
Connection means to connect to each of multiple batteries,
A printing means for printing using the plurality of batteries connected to the connecting means, and
An acquisition means for acquiring a print request for the printing means, and
When the acquisition means acquires the print request, the measuring means for measuring the voltage value of each of the plurality of batteries, and the measuring means.
Based on the measurement results of the measuring means, a selection means for selecting a battery having a voltage value equal to or higher than a threshold value among the plurality of batteries as a target for use, and
A printer equipped with.
前記測定手段の測定結果に基づいて、前記複数の電池のそれぞれの状態を報知する報知手段を備える、
請求項1に記載のプリンタ。
A notifying means for notifying the state of each of the plurality of batteries based on the measurement result of the measuring means is provided.
The printer according to claim 1.
前記測定手段は、前記印字要求に対応した印字が終了した場合に、前記複数の電池のそれぞれの電圧値を測定し、
前記選択手段は、前記測定手段の測定結果に基づいて、前記複数の電池のうち前記電圧値が閾値以上の電池を使用対象に選択する、
請求項1又は2に記載のプリンタ。
The measuring means measures the voltage value of each of the plurality of batteries when printing corresponding to the printing request is completed.
Based on the measurement result of the measuring means, the selecting means selects a battery having a voltage value equal to or higher than a threshold value among the plurality of batteries as a target for use.
The printer according to claim 1 or 2.
前記測定手段の測定結果に基づいて、使用対象の電池の状態を印字する印字手段を備える、
請求項1乃至3の何れか一項に記載のプリンタ。
A printing means for printing the state of the battery to be used based on the measurement result of the measuring means is provided.
The printer according to any one of claims 1 to 3.
前記選択手段は、前記測定手段の測定結果に基づいて、前記複数の電池のうち前記電圧値が低い電池を使用対象に選択する、
請求項1乃至4の何れか一項に記載のプリンタ。
The selection means selects a battery having a low voltage value from the plurality of batteries as a target of use based on the measurement result of the measuring means.
The printer according to any one of claims 1 to 4.
複数の電池のそれぞれと接続する接続手段を備えるプリンタを、
前記接続手段に接続された前記複数の電池を使用して印字する印字手段と、
前記印字手段に対する印字要求を取得する取得手段と、
前記取得手段が前記印字要求を取得した場合に、前記複数の電池のそれぞれの電圧値を測定する測定手段と、
前記測定手段の測定結果に基づいて、前記複数の電池のうち前記電圧値が閾値以上の電池を使用対象に選択する選択手段と、
として機能させるためのプログラム。
A printer that has a connection means to connect to each of multiple batteries,
A printing means for printing using the plurality of batteries connected to the connecting means, and
An acquisition means for acquiring a print request for the printing means, and
When the acquisition means acquires the print request, the measuring means for measuring the voltage value of each of the plurality of batteries, and the measuring means.
Based on the measurement results of the measuring means, a selection means for selecting a battery having a voltage value equal to or higher than a threshold value among the plurality of batteries as a target for use, and
A program to function as.
JP2020001632A 2020-01-08 Printer and program Active JP7483380B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020001632A JP7483380B2 (en) 2020-01-08 Printer and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020001632A JP7483380B2 (en) 2020-01-08 Printer and program

Publications (2)

Publication Number Publication Date
JP2021109350A true JP2021109350A (en) 2021-08-02
JP7483380B2 JP7483380B2 (en) 2024-05-15

Family

ID=

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01276322A (en) * 1988-04-28 1989-11-06 Toshiba Corp Electronic equipment
JPH04155422A (en) * 1990-10-18 1992-05-28 Nippon Steel Corp Battery driven personal computer
JP2000289257A (en) * 1999-04-09 2000-10-17 Casio Comput Co Ltd Portable device
JP2008132647A (en) * 2006-11-28 2008-06-12 Sato Corp Printer system
JP2008158287A (en) * 2006-12-25 2008-07-10 Nikon Corp Camera system
JP2014168939A (en) * 2013-03-05 2014-09-18 Ricoh Co Ltd Image formation device
JP2014188931A (en) * 2013-03-28 2014-10-06 Seiko Epson Corp Printing device
JP2014207787A (en) * 2013-04-12 2014-10-30 キヤノン株式会社 Electronic apparatus
JP2017118733A (en) * 2015-12-25 2017-06-29 セイコーエプソン株式会社 Power supply and electronic apparatus
JP2017153203A (en) * 2016-02-23 2017-08-31 コニカミノルタ株式会社 Power supply device and portable equipment
WO2019187849A1 (en) * 2018-03-30 2019-10-03 工機ホールディングス株式会社 Transportable cold storage container

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01276322A (en) * 1988-04-28 1989-11-06 Toshiba Corp Electronic equipment
JPH04155422A (en) * 1990-10-18 1992-05-28 Nippon Steel Corp Battery driven personal computer
JP2000289257A (en) * 1999-04-09 2000-10-17 Casio Comput Co Ltd Portable device
JP2008132647A (en) * 2006-11-28 2008-06-12 Sato Corp Printer system
JP2008158287A (en) * 2006-12-25 2008-07-10 Nikon Corp Camera system
JP2014168939A (en) * 2013-03-05 2014-09-18 Ricoh Co Ltd Image formation device
JP2014188931A (en) * 2013-03-28 2014-10-06 Seiko Epson Corp Printing device
JP2014207787A (en) * 2013-04-12 2014-10-30 キヤノン株式会社 Electronic apparatus
JP2017118733A (en) * 2015-12-25 2017-06-29 セイコーエプソン株式会社 Power supply and electronic apparatus
JP2017153203A (en) * 2016-02-23 2017-08-31 コニカミノルタ株式会社 Power supply device and portable equipment
WO2019187849A1 (en) * 2018-03-30 2019-10-03 工機ホールディングス株式会社 Transportable cold storage container

Similar Documents

Publication Publication Date Title
JP4928123B2 (en) Battery-powered heater control device
US6396407B1 (en) Method for displaying residual capacity of battery, battery pack and portable electric device using the method
US20140028246A1 (en) Printer with battery charged via usb port
JP2013048542A (en) Electric power unit, control method for electric power unit and image forming apparatus
JP2021109350A (en) Printer and program
JP2009296802A (en) Battery unit and electronic equipment system
JP7483380B2 (en) Printer and program
JP2021109351A (en) Printer and program
EP2234239A2 (en) Charger
CN111225472B (en) Temperature detection and LED drive pin multiplexing circuit, power supply chip and working method of pin multiplexing circuit
JP4706294B2 (en) Printing device
JP3013042B1 (en) Thermal printer
JP5724790B2 (en) Charging device and printing system
US20210344810A1 (en) Printing apparatus
JP6915477B2 (en) Information processing equipment, information processing methods and programs
JP2007168237A (en) Printing apparatus and method for controlling printing apparatus
JP2015058570A (en) Printer and printing method for the same
JP5608695B2 (en) Information processing apparatus and battery management method for information processing apparatus
JP3655668B2 (en) Printer
JP2010002502A (en) Laser pointer
US20180273140A1 (en) Method of operating electronic transmission
JP7135688B2 (en) PRINTING DEVICE, CONTROL METHOD, AND PROGRAM
US10916961B2 (en) Electronic apparatus
CN206394015U (en) A kind of intelligent 3D printing pen of energy automatic identification material
US20240100826A1 (en) Power supply control apparatus, method and recording apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221116

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230628

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230704

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20230901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20231128

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240126

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20240402

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240501