JP2010058292A - Printing method for thermal printer - Google Patents

Printing method for thermal printer Download PDF

Info

Publication number
JP2010058292A
JP2010058292A JP2008223931A JP2008223931A JP2010058292A JP 2010058292 A JP2010058292 A JP 2010058292A JP 2008223931 A JP2008223931 A JP 2008223931A JP 2008223931 A JP2008223931 A JP 2008223931A JP 2010058292 A JP2010058292 A JP 2010058292A
Authority
JP
Japan
Prior art keywords
temperature
thermal printer
ambient temperature
printing
printing method
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
JP2008223931A
Other languages
Japanese (ja)
Other versions
JP5361291B2 (en
Inventor
Yasuhiro Harayama
康弘 原山
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.)
Fujitsu Component Ltd
Original Assignee
Fujitsu Component Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Component Ltd filed Critical Fujitsu Component Ltd
Priority to JP2008223931A priority Critical patent/JP5361291B2/en
Publication of JP2010058292A publication Critical patent/JP2010058292A/en
Application granted granted Critical
Publication of JP5361291B2 publication Critical patent/JP5361291B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electronic Switches (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a printing method for a thermal printer which enhances print quality. <P>SOLUTION: A printing method for a thermal printer which is provided with a thermistor for measuring the temperature of a thermal head includes the step for measuring the temperature for a plurality of times at every predetermine time by means of the thermistor, the step for storing a plurality of temperature values as an ambient temperature if a plurality of temperature ranges measured at the measurement step are in a predetermined temperature range or below, the step for setting print conditions according to the ambient temperature, and the step for printing based on the print conditions. <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、サーマルヘッドを有するサーマルプリンタの印刷方法に関する。   The present invention relates to a printing method for a thermal printer having a thermal head.

サーマルプリンタでは、サーマルヘッドを発熱駆動することにより画像の印刷を行うものである。このサーマルヘッドには通常ヘッド温度検出のためのサーミスタがサーマルヘッドに内蔵されている。しかしながら、このサーミスタはサーマルヘッドのヘッド温度を検出のために用いるものであり、印刷を行うことによりヘッド温度が上昇するため、ヘッドの温度状態を反映させた印刷を行うためのものである。   In a thermal printer, an image is printed by driving a thermal head to generate heat. In this thermal head, a thermistor for detecting the head temperature is usually built in the thermal head. However, this thermistor is used for detecting the head temperature of the thermal head, and the head temperature rises by performing printing, so that printing is performed reflecting the temperature state of the head.

一方、サーマルプリンタにより印刷を行う場合では、サーマルヘッド温度以外の周囲の温度も重要であり、周囲の温度によってサーマルヘッドの消費電力や、印刷の品位等が変動する。   On the other hand, when printing with a thermal printer, the ambient temperature other than the thermal head temperature is also important, and the power consumption of the thermal head, the quality of printing, and the like vary depending on the ambient temperature.

サーマルヘッドは印刷を継続して行うことによりサーマルヘッドのヘッド温度は上昇し、印刷を停止するとサーマルヘッドのヘッド温度は降下する。よって、ヘッド温度は印刷状態によって常に変化している。このため、サーマルヘッドに設けられたサーミスタで測定される温度は、必ずしも周囲の温度とは一致しない。よって、一般にはサーマルヘッドに設けられたサーミスタでは、周囲の温度を正確に測定することは困難である。   When the thermal head continues printing, the head temperature of the thermal head increases, and when printing is stopped, the head temperature of the thermal head decreases. Therefore, the head temperature constantly changes depending on the printing state. For this reason, the temperature measured by the thermistor provided in the thermal head does not necessarily match the ambient temperature. Therefore, it is generally difficult to accurately measure the ambient temperature with a thermistor provided in a thermal head.

このため、特許文献1及び2に記載されているように、サーマルヘッドの温度以外の周囲の温度を測定するためのサーミスタを設け、サーマルヘッドの温度と周囲の温度である環境温度の双方のデータに基づいて印刷の制御を行うサーマルプリンタが開示されている。
特開平6−198886号公報 特開2002−154258号公報
For this reason, as described in Patent Documents 1 and 2, a thermistor for measuring the ambient temperature other than the temperature of the thermal head is provided, and data of both the temperature of the thermal head and the ambient temperature which is the ambient temperature is provided. A thermal printer that controls printing based on the above is disclosed.
JP-A-6-198886 JP 2002-154258 A

しかしながら、特許文献1及び2に記載されているような周囲の温度を測定するためのサーミスタを設けると、その分サーマルプリンタのコストが上昇してしまう。   However, if a thermistor for measuring the ambient temperature as described in Patent Documents 1 and 2 is provided, the cost of the thermal printer increases accordingly.

ところで、サーマルヘッドに内蔵されているサーミスタにより温度の測定を行おうとした場合、特に、サーマルヘッドが印刷により温度が上昇した状態で、プリンタの電源が切断され、再度電源を投入した場合、周囲の温度を即座に検出することは困難となる。即ち、このような状態では、サーマルヘッドに内蔵されているサーミスタの温度が高くなっているため、周囲の温度とは大きな温度差が生じてしまっているため、正確に周囲の温度を計測することはできない。よって、サーマルヘッドに内蔵されているサーミスタを用いて周囲の温度の測定をしようとすると、サーマルヘッドの温度が周囲の温度と同じ温度となるまで十分な時間が必要となり、極めて効率が悪く実用的ではない。   By the way, when trying to measure the temperature with the thermistor built in the thermal head, especially when the thermal head is heated by printing and the printer is turned off and turned on again, It is difficult to detect the temperature immediately. That is, in such a state, the temperature of the thermistor built in the thermal head is high, and a large temperature difference from the ambient temperature has occurred, so the ambient temperature must be accurately measured. I can't. Therefore, when measuring the ambient temperature using the thermistor built in the thermal head, sufficient time is required until the thermal head temperature becomes the same as the ambient temperature, which is extremely inefficient and practical. is not.

本発明は上記点に鑑みてなされたものであり、周囲の温度を測定するためのサーミスタを設けることなく、周囲の温度を測定し、この状態を踏まえた印刷を行うことにより、広い温度範囲において、印刷の品位を向上させたサーマルプリンタによる印刷方法を提供することを目的とするものである。   The present invention has been made in view of the above points, and without providing a thermistor for measuring the ambient temperature, by measuring the ambient temperature and performing printing based on this state, in a wide temperature range. An object of the present invention is to provide a printing method using a thermal printer with improved printing quality.

本発明は、サーマルヘッドの温度を測定するためのサーミスタが設けられているサーマルプリンタの印刷方法において、前記サーミスタにより所定の時間ごとに温度を複数回測定する測定工程と、前記測定工程において測定された複数の温度の温度範囲が所定の温度範囲以下である場合には、前記複数の温度の値を周囲温度として記憶する記憶工程と、前記周囲温度に応じて印刷条件を設定する設定工程と、前記印刷条件に基づき印刷を行う印刷工程と、を有することを特徴とする。   The present invention relates to a printing method of a thermal printer provided with a thermistor for measuring the temperature of a thermal head, a measurement step of measuring the temperature a plurality of times at a predetermined time by the thermistor, and a measurement in the measurement step. When the temperature range of the plurality of temperatures is equal to or less than a predetermined temperature range, a storage step of storing the plurality of temperature values as an ambient temperature, a setting step of setting printing conditions according to the ambient temperature, And a printing process for performing printing based on the printing conditions.

また、本発明は、前記サーマルプリンタには、不揮発性メモリが設けられており、前記サーマルプリンタの電源を切断する際には、前記周囲温度を前記不揮発性メモリに記憶させることを特徴とする。   According to the present invention, the thermal printer is provided with a nonvolatile memory, and the ambient temperature is stored in the nonvolatile memory when the thermal printer is turned off.

また、本発明は、前記測定工程において測定された複数の温度の温度範囲が所定の温度範囲を超える場合には、前記不揮発性メモリに記憶されている周囲温度に基づき、前記設定工程における印刷条件を設定することを特徴とする。   Further, the present invention provides a printing condition in the setting step based on the ambient temperature stored in the nonvolatile memory when the temperature range of the plurality of temperatures measured in the measurement step exceeds a predetermined temperature range. Is set.

また、本発明は、前記所定の温度範囲は、0.2℃であることを特徴とする。   Further, the present invention is characterized in that the predetermined temperature range is 0.2 ° C.

また、本発明は、前記所定の時間は、0.2から5秒であることを特徴とする。   Further, the present invention is characterized in that the predetermined time is 0.2 to 5 seconds.

また、本発明は、前記複数回は、5回以上であることを特徴とする。   The present invention is characterized in that the plurality of times is five or more times.

また、本発明は、前記測定工程は、前記サーマルプリンタの電源を投入した直後に行うものであることを特徴とする。   In the invention, it is preferable that the measurement step is performed immediately after the thermal printer is turned on.

また、本発明は、前記設定工程において、周囲温度が第1の所定の温度よりも低いと判断した場合には、印字速度を低くする設定を行うことを特徴とする。   In the setting step, when it is determined that the ambient temperature is lower than the first predetermined temperature, the printing speed is set to be low.

また、本発明は、前記設定工程において、周囲温度が第1の所定の温度よりも低いと判断した場合には、前記サーマルプリンタのサーマルヘッドの分割数を増やして印刷を行う設定を行うことを特徴とする。   According to the present invention, in the setting step, when it is determined that the ambient temperature is lower than the first predetermined temperature, the setting for performing printing by increasing the number of divisions of the thermal head of the thermal printer is performed. Features.

また、本発明は、前記設定工程において、周囲温度が第1の所定の温度よりも低いと判断した場合には、前記サーマルプリンタにおけるプラテンローラの回転速度を高くすることを特徴とする。   In the setting step, when it is determined that the ambient temperature is lower than the first predetermined temperature, the rotation speed of the platen roller in the thermal printer is increased.

また、本発明は、前記第1の所定の温度は、0℃であることを特徴とする。   Further, the present invention is characterized in that the first predetermined temperature is 0 ° C.

また、本発明は、前記設定工程において、周囲温度が第2の所定の温度よりも高いと判断した場合には、前記サーマルプリンタにおけるプラテンローラの回転速度を低くすることを特徴とする。   In the setting step, when it is determined that the ambient temperature is higher than the second predetermined temperature, the rotation speed of the platen roller in the thermal printer is lowered.

また、本発明は、前記第2の所定の温度は、40℃であることを特徴とする。   Further, the present invention is characterized in that the second predetermined temperature is 40 ° C.

本発明によれば、サーマルプリンタにおいて、周囲の温度を測定するためのサーミスタを設けることなく、周囲の温度を測定し、この状態を踏まえた印刷を行うことができ、広い温度範囲において、印刷の品位を向上させることができる。   According to the present invention, in a thermal printer, the ambient temperature can be measured without providing a thermistor for measuring the ambient temperature, and printing based on this state can be performed. The quality can be improved.

次に、本発明を実施するための最良の実施の形態について、以下に説明する。   Next, the best mode for carrying out the present invention will be described below.

本実施の形態は、サーマルヘッドに内蔵されているサーミスタを用いて、サーマルプリンタの電源投入直後等においてサーマルヘッドが長時間駆動されていない状態における周囲の温度を測定し、その周囲の温度に基づいてサーマルヘッドの駆動の制御を行うことにより、品位の高い印刷を行うものである。   In this embodiment, a thermistor built in the thermal head is used to measure the ambient temperature when the thermal head is not driven for a long time immediately after the thermal printer is turned on, and based on the ambient temperature. By controlling the drive of the thermal head, high-quality printing is performed.

(サーマルプリンタの構成)
図1に基づき、本実施の形態に用いられるサーマルプリンタの構成について説明する。
(Configuration of thermal printer)
Based on FIG. 1, the structure of the thermal printer used for this Embodiment is demonstrated.

本実施の形態に用いられるサーマルプリンタは、オペレーションパネル10、メカユニット20、制御回路ユニット30、バッテリ60により構成されている。また、制御回路ユニット30内には、電源制御回路40及びCPU(Central Processing Unit)50が設けられている。   The thermal printer used in the present embodiment includes an operation panel 10, a mechanical unit 20, a control circuit unit 30, and a battery 60. In the control circuit unit 30, a power control circuit 40 and a CPU (Central Processing Unit) 50 are provided.

電源制御回路40は、CPU50と接続されており、制御回路ユニット30にバッテリ60から供給される電力を制御する。   The power supply control circuit 40 is connected to the CPU 50 and controls the power supplied from the battery 60 to the control circuit unit 30.

CPU50は、本実施の形態に用いられるサーマルプリンタの全体の制御を行う。   The CPU 50 performs overall control of the thermal printer used in this embodiment.

バッテリ60は、本実施の形態に用いられるサーマルプリンタの電源の供給源である。   The battery 60 is a power supply source for the thermal printer used in the present embodiment.

オペレーションパネル10は、フィードスイッチ11、LED(Light Emitting Diode)12、ブザー13、電源スイッチ14等により構成されている。   The operation panel 10 includes a feed switch 11, an LED (Light Emitting Diode) 12, a buzzer 13, a power switch 14, and the like.

フィードスイッチ11は、ユーザによる用紙送り操作のためのスイッチである。   The feed switch 11 is a switch for a paper feeding operation by the user.

LED12は、CPU50からの指示に応じて発光する。   The LED 12 emits light in response to an instruction from the CPU 50.

ブザー13は、CPU50からの指示に応じて警報音を発する。   The buzzer 13 emits an alarm sound in response to an instruction from the CPU 50.

電源スイッチ14は、ユーザにより操作されて、電源をオン、オフするための制御信号を制御回路ユニット内の電源制御回路40に伝え、電源のオン、オフの制御を行う。この電源スイッチ14としては、押しボタンスイッチ等が用いられる。   The power switch 14 is operated by the user to transmit a control signal for turning on / off the power to the power control circuit 40 in the control circuit unit, thereby controlling the power on / off. As the power switch 14, a push button switch or the like is used.

メカユニット20は、用紙送りモータ21、サーマルヘッド22、ヘッド温度検出サーミスタ23、用紙無し検出センサ24、カバーオープン検出スイッチ25等により構成されている。   The mechanical unit 20 includes a paper feed motor 21, a thermal head 22, a head temperature detection thermistor 23, a no-paper detection sensor 24, a cover open detection switch 25, and the like.

用紙送りモータ21は、ステッピングモータにより構成されており、用紙を搬送するために使用される。   The paper feed motor 21 is composed of a stepping motor and is used for transporting paper.

サーマルヘッド22は、直線的に並んだ発熱抵抗体に選択的に電位を与えて発熱させ、この熱により反応する感熱紙等の用紙に文字やイメージデータを印刷するためのものである。   The thermal head 22 is for applying a potential selectively to the heating resistors arranged in a straight line to generate heat, and printing characters and image data on paper such as thermal paper that reacts with this heat.

ヘッド温度検出サーミスタ23は、サーマルヘッド22の温度をフィードバック制御するために、サーマルヘッド22の温度を検出する。本実施の形態では、このヘッド温度検出サーミスタ23はサーマルヘッド22内に内蔵されており、このヘッド温度掲出用サーミスタ23を用いて、周囲の温度の測定を行う。(「ヘッド温度検出サーミスタ23」は、本明細書中において、単に「サーミスタ23」と記載する場合もある。)
用紙無しセンサ24は、用紙切れを検出する。
The head temperature detection thermistor 23 detects the temperature of the thermal head 22 in order to feedback control the temperature of the thermal head 22. In this embodiment, the head temperature detection thermistor 23 is built in the thermal head 22, and the ambient temperature is measured using the head temperature posting thermistor 23. (The “head temperature detection thermistor 23” may be simply referred to as “thermistor 23” in this specification.)
The out-of-paper sensor 24 detects out of paper.

カバーオープンスイッチ25は、メカユニット20を覆うカバーの開閉状態を検出する。   The cover open switch 25 detects the open / closed state of the cover that covers the mechanical unit 20.

制御回路ユニット30は、電源制御回路40及びCPU50のほか、ステッピングモータ駆動回路31、サーマルヘッド駆動回路32、A/D変換回路33、センサ検出回路34、オペレーションパネル制御回路35、発振子41、リセット回路42、フラッシュメモリ43、BT通信モジュール制御回路44、ROM45、フレームメモリ46等により構成されている。   In addition to the power supply control circuit 40 and the CPU 50, the control circuit unit 30 includes a stepping motor drive circuit 31, a thermal head drive circuit 32, an A / D conversion circuit 33, a sensor detection circuit 34, an operation panel control circuit 35, an oscillator 41, and a reset. The circuit 42, the flash memory 43, the BT communication module control circuit 44, the ROM 45, the frame memory 46, and the like.

ステッピングモータ駆動回路31は、CPU50からの指示に応じて、紙送りモータ21へ駆動電流を供給する。   The stepping motor drive circuit 31 supplies a drive current to the paper feed motor 21 in response to an instruction from the CPU 50.

サーマルヘッド駆動回路32は、CPU50からの指示に応じて、サーマルヘッド22を駆動する。   The thermal head drive circuit 32 drives the thermal head 22 in response to an instruction from the CPU 50.

A/D変換回路33は、ヘッド温度検出サーミスタ23、用紙無し検出センサ24等の検出したアナログ信号をデジタル信号に変換してCPU50に出力する。   The A / D conversion circuit 33 converts the analog signals detected by the head temperature detection thermistor 23, the paper absence detection sensor 24, etc. into digital signals and outputs them to the CPU 50.

センサ検出回路34は、カバーオープン検出スイッチ25の検出した信号をCPU50に出力する。   The sensor detection circuit 34 outputs a signal detected by the cover open detection switch 25 to the CPU 50.

オペレーションパネル制御回路35は、CPU50からの指示に応じてLED12等を制御するとともに、フィードスイッチ11等の制御信号を受けてCPU50へ出力する。   The operation panel control circuit 35 controls the LED 12 and the like in response to an instruction from the CPU 50 and receives a control signal from the feed switch 11 and outputs it to the CPU 50.

発振子41は、所定周波数のクロック信号をCPU50に供給する。   The oscillator 41 supplies a clock signal having a predetermined frequency to the CPU 50.

リセット回路42は、プリンタの電源がオフ状態になると、CPU50にリセット要求信号を出力して初期状態にするための回路である。   The reset circuit 42 is a circuit for outputting a reset request signal to the CPU 50 to be in an initial state when the printer is turned off.

フラッシュメモリ43は、サーマルプリンタの制御に必要な各種データ等をバックアップするための不揮発性メモリである。   The flash memory 43 is a nonvolatile memory for backing up various data necessary for controlling the thermal printer.

BT通信モジュール制御回路44は、ブルートゥースと呼ばれる携帯情報機器向けの無線通信技術を利用して外部の携帯情報機器との間で印刷用のデータ等を受信する。   The BT communication module control circuit 44 receives printing data and the like with an external portable information device using a wireless communication technology for portable information devices called Bluetooth.

ROM45は、CPU50が実行するためのソフトウエア等を内蔵しており、CPU50からの要求等に応じて読み出される。   The ROM 45 incorporates software and the like for execution by the CPU 50 and is read according to a request from the CPU 50.

フレームメモリ46は、外部から入力された印刷用の画像データ等を一時的に記憶するためのメモリである。   The frame memory 46 is a memory for temporarily storing image data for printing input from the outside.

(印刷方法)
次に、図2に基づき本実施の形態に係るサーマルプリンタにおける印刷処理の工程について説明する。尚、図2は、メインルーチンのフローチャートであり、図3は、初期化処理におけるサブルーチンのフローチャートであり、図4は、プリンタ状態遷移判定処理におけるサブルーチンのフローチャートであり、図5は、割り込み処理におけるフローチャートである。
(Printing method)
Next, a printing process in the thermal printer according to the present embodiment will be described with reference to FIG. 2 is a flowchart of the main routine, FIG. 3 is a flowchart of a subroutine in the initialization process, FIG. 4 is a flowchart of a subroutine in the printer state transition determination process, and FIG. 5 is a flowchart in the interrupt process. It is a flowchart.

最初に、ステップ102(S102)では、本実施の形態におけるサーマルプリンタの電源を投入する(電源をオンにする)。具体的には、電源スイッチ14をオン状態にする。   First, in step 102 (S102), the thermal printer in the present embodiment is turned on (turned on). Specifically, the power switch 14 is turned on.

次に、ステップ104(S104)では、初期化処理が行われる。この初期化処理については、後述する図3に示す初期化処理のサブルーチンのフローチャートにおいて説明する。   Next, in step 104 (S104), an initialization process is performed. This initialization process will be described later in the flowchart of the initialization process subroutine shown in FIG.

次に、ステップ106(S106)では、リセット回路42からリセット要求があったか否かの判断がなされる。リセット要求があった場合には、ステップ104に移行する。一方、リセット要求がなかった場合には、ステップ108に移行する。   Next, in step 106 (S106), it is determined whether or not there is a reset request from the reset circuit. If there is a reset request, the process proceeds to step 104. On the other hand, if there is no reset request, the process proceeds to step 108.

次に、ステップ108(S108)では、プリンタ状態遷移判定処理が行われる。このプリンタ状態遷移判定処理については、図4に示すプリンタ状態遷移判定処理のサブルーチンのフローチャートにおいて説明する。   Next, in step 108 (S108), printer state transition determination processing is performed. This printer state transition determination processing will be described in the flowchart of the printer state transition determination processing subroutine shown in FIG.

次に、ステップ110(S110)では、電源オフ要求があったか否かの判断がなされる。具体的には、CPU50等内に設けられた電源オフ要求フラッグがオン状態であるか否かにより判断される。電源オフ要求フラッグがオン状態の場合は、電源オフ要求があったものと判断され、ステップ120に移行し、電源オフ要求フラッグがオフ状態の場合は、電源オフ要求はなかったものと判断され、ステップ112に移行する。   Next, in step 110 (S110), it is determined whether or not a power-off request has been made. Specifically, the determination is made based on whether or not a power-off request flag provided in the CPU 50 or the like is in an on state. If the power-off request flag is on, it is determined that a power-off request has been made, and the process proceeds to step 120.If the power-off request flag is off, it is determined that there has been no power-off request, Control goes to step 112.

次に、ステップ112(S112)では、本実施の形態に用いられるサーマルプリンタがエラー状態にあるか否かの判断がなされる。サーマルプリンタがエラー状態にあるものと判断された場合には、ステップ106に移行する。一方、サーマルプリンタがエラー状態ではないと判断された場合には、ステップ114に移行する。   Next, in step 112 (S112), it is determined whether or not the thermal printer used in the present embodiment is in an error state. If it is determined that the thermal printer is in an error state, the process proceeds to step 106. On the other hand, if it is determined that the thermal printer is not in an error state, the routine proceeds to step 114.

次に、ステップ114(S114)では、コマンド解析処理が行われる。具体的には、印刷に関するデータを受信した場合には、これらデータから印刷に関する各コマンドを抽出して実行するためのコマンド解析処理を行う。   Next, in step 114 (S114), command analysis processing is performed. Specifically, when data related to printing is received, command analysis processing is performed to extract and execute each command related to printing from these data.

次に、ステップ116(S116)では、受信した印刷に関するデータに印字データがあるか否かが判断される。印字データがあるものと判断された場合には、ステップ118に移行する。一方、印字データがないものと判断された場合には、ステップ106に移行する。   Next, in step 116 (S116), it is determined whether there is print data in the received print data. If it is determined that there is print data, the process proceeds to step 118. On the other hand, if it is determined that there is no print data, the process proceeds to step 106.

次に、ステップ118(S118)では、印字起動処理を実行する。具体的には、印字データをサーマルヘッド22に伝達し、印字ステップ数を設定し、タイマ割り込み処理により用紙送りモータ21のステップ数と同期させてプラテンローラ26を回転させて印字を実行する。この印字起動処理が終了した後は、ステップ106に移行する。   Next, in step 118 (S118), print activation processing is executed. Specifically, the print data is transmitted to the thermal head 22, the number of print steps is set, and printing is executed by rotating the platen roller 26 in synchronization with the number of steps of the paper feed motor 21 by timer interruption processing. After this print activation process is completed, the routine proceeds to step 106.

一方、ステップ120(S120)では、周囲温度登録処理が行われる。具体的には、ステップ104における初期化処理において、サーマルヘッド22に内蔵されているサーミスタ23により測定された温度を周囲温度としてフラッシュメモリ43等の不揮発性記憶媒体に記憶させる。   On the other hand, in step 120 (S120), ambient temperature registration processing is performed. Specifically, in the initialization process in step 104, the temperature measured by the thermistor 23 built in the thermal head 22 is stored in a non-volatile storage medium such as the flash memory 43 as the ambient temperature.

次に、ステップ122(S122)では、電源オフ処理が行われる。具体的には、本実施の形態に用いられるサーマルプリンタの電源を切断する処理(電源をオフにする処理)が行われる。   Next, in step 122 (S122), a power-off process is performed. Specifically, a process of turning off the power of the thermal printer used in the present embodiment (a process of turning off the power) is performed.

(初期化処理のサブルーチン)
次に、図3に示す初期化処理のサブルーチンのフローチャートについて説明する。
(Initialization subroutine)
Next, the flowchart of the initialization process subroutine shown in FIG. 3 will be described.

最初に、ステップ202(S202)では、サーミスタ23による温度の測定が行われる。前述したように、このサーミスタ23は、サーマルヘッド22に内蔵されているものである。電源スイッチ14をオンにした直後においては、サーマルヘッド22内のサーミスタ23の温度と周囲の温度とが一致している場合が多いため、サーマルヘッド22に内蔵されているサーミスタ23による温度測定により、周囲の温度の測定を間接的に行う。   First, in step 202 (S202), the thermistor 23 measures the temperature. As described above, the thermistor 23 is built in the thermal head 22. Immediately after the power switch 14 is turned on, the temperature of the thermistor 23 in the thermal head 22 often coincides with the ambient temperature. Therefore, by measuring the temperature with the thermistor 23 built in the thermal head 22, Indirect measurement of ambient temperature.

次に、ステップ204(S204)では、測定された温度が記憶される。即ち、サーマルヘッド22におけるサーミスタ23により測定された温度の値がCPU50内のメモリ等に記憶される。   Next, in step 204 (S204), the measured temperature is stored. That is, the temperature value measured by the thermistor 23 in the thermal head 22 is stored in a memory or the like in the CPU 50.

次に、ステップ206(S206)では、所定時間の待機させるものである。これは、本実施の形態においては、所定時間ごとに温度測定を行うことにより、この間における温度変化の状態を調べるためのものである。即ち、短時間の間隔で連続して温度測定を行っても、温度変化の状態を調べることができない。よって、一定の時間間隔ごとにサーミスタ23による温度測定を行うために、所定時間の待機を行うものである。ここで、サーミスタ23による温度測定を行うための一定の時間間隔としては、0.2から5秒程度であることが好ましい。あまりに間隔が長いと立ち上げに時間を要してしまい、あまりに間隔が短いと温変化の状態を把握することができないからである。尚、本実施の形態では、この間隔は約1秒に設定されている。   Next, in step 206 (S206), a predetermined time is waited. In this embodiment, the temperature is measured every predetermined time to check the state of temperature change during this period. That is, even if the temperature is continuously measured at short intervals, the state of temperature change cannot be examined. Therefore, in order to measure the temperature by the thermistor 23 at regular time intervals, a predetermined time is waited. Here, the constant time interval for measuring the temperature by the thermistor 23 is preferably about 0.2 to 5 seconds. This is because if the interval is too long, it takes time to start up, and if the interval is too short, the state of temperature change cannot be grasped. In this embodiment, this interval is set to about 1 second.

次に、ステップ208(S208)では、サーミスタ23による温度測定が所定回数行われたか否かが判断される。具体的には、あらかじめサーミスタ23による測定回数が設定されており、サーミスタ23による測定がこの測定回数に至ったか否かが判断される。あらかじめ設定されている測定回数は、フラッシュメモリ43等に格納されており、測定回数の計測は、CPU50内に設けられた不図示のカウンタにより行われる。このサブルーチンが開始した際には、カウンタの値がリセットされて、サーミスタ23による計測回数がカウントされる。ステップ208において、サーミスタ23による温度測定が所定の回数行われたものと判断された場合には、ステップ210に移行する。一方、サーミスタ23による温度測定の回数が所定の回数には至っていないものと判断された場合は、ステップ202に移行し、サーミスタ23による周囲の温度の測定が所定の回数に至るまで行われる。   Next, in step 208 (S208), it is determined whether the temperature measurement by the thermistor 23 has been performed a predetermined number of times. Specifically, the number of measurements by the thermistor 23 is set in advance, and it is determined whether the measurement by the thermistor 23 has reached this number of measurements. The preset number of times of measurement is stored in the flash memory 43 or the like, and the number of times of measurement is measured by a counter (not shown) provided in the CPU 50. When this subroutine starts, the counter value is reset and the number of measurements by the thermistor 23 is counted. If it is determined in step 208 that the temperature measurement by the thermistor 23 has been performed a predetermined number of times, the process proceeds to step 210. On the other hand, if it is determined that the number of times of temperature measurement by the thermistor 23 has not reached the predetermined number, the routine proceeds to step 202, where the ambient temperature is measured by the thermistor 23 until the predetermined number of times is reached.

尚、サーミスタ23による温度測定は、温度変化の状態を知る必要があるため複数回行われる。あまりに少なすぎると温度変化の状態を知ることができないため、経験上少なくとも5回以上温度測定を行うことが必要となる。このため、本実施の形態では、サーミスタ23による温度測定の回数は5回に設定されている。   The temperature measurement by the thermistor 23 is performed a plurality of times because it is necessary to know the temperature change state. If the amount is too small, it is impossible to know the state of temperature change, and it is necessary to measure the temperature at least five times based on experience. For this reason, in this Embodiment, the frequency | count of the temperature measurement by the thermistor 23 is set to five times.

次に、ステップ210(S210)では、最初の電源投入であるか否かが判断される。即ち、今回の電源投入がこのサーマルプリンタの製造後、最初に行われたものであるか否かが判断される。ステップ210において、最初の電源投入であるものと判断された場合には、ステップ210に移行する。一方、最初の電源投入ではないものと判断された場合には、ステップ212に移行する。   Next, in step 210 (S210), it is determined whether or not power is first turned on. That is, it is determined whether or not the current power-on is performed first after the thermal printer is manufactured. If it is determined in step 210 that the power is turned on for the first time, the process proceeds to step 210. On the other hand, if it is determined that the power is not turned on for the first time, the routine proceeds to step 212.

次に、ステップ212(S212)では、ステップ202からステップ208において繰り返し測定された温度が、全て所定の範囲内にあるか否かが判断される。即ち、本実施の形態では、測定された5回の温度の値の範囲が、0.2℃以下であるか否かが判断される。測定された5回の温度の値の範囲が、0.2℃以下であれば、温度変化が殆どないため、前回電源がオフされた後、長時間経過しているか、電源がオフされる前に、サーマルヘッド22による印刷は殆ど又はまったく行われていなかったものと考えられ、サーマルヘッド22に内蔵されたサーミスタ23により測定された温度を周囲の温度とみなすことができるからである。一方、測定された5回の温度の値の範囲が、0.2℃を超える場合では、前回の電源がオフとなる直前等にサーマルヘッド22による印刷が行われていた可能性が高いため、サーマルヘッド22に内蔵されているサーミスタ23により測定された温度を周囲の温度とみなすことはできない。よって、上記において測定された温度が、全て所定の範囲内にあると判断された場合には、ステップ216に移行する。一方、上記において測定された温度の温度範囲が、所定の温度範囲を超えるものと判断された場合には、ステップ214に移行する。尚、この温度範囲は、任意に設定可能であるが、本実施の形態では、0.2℃に設定されている。発明者は、0.2℃以内であれば温度変化がほとんどない状態であり、サーミスタ23の温度を周囲の温度とみなすことが可能であるという、経験上の知見を得ているからである。   Next, in step 212 (S212), it is determined whether or not all the temperatures repeatedly measured in steps 202 to 208 are within a predetermined range. That is, in the present embodiment, it is determined whether or not the measured temperature value range of 5 times is 0.2 ° C. or less. If the measured temperature range of 5 times is 0.2 ° C or less, there is almost no temperature change, so it has been a long time since the power was last turned off or before the power was turned off. In addition, it is considered that printing by the thermal head 22 is hardly or not performed, and the temperature measured by the thermistor 23 built in the thermal head 22 can be regarded as the ambient temperature. On the other hand, when the measured temperature value range of 5 times exceeds 0.2 ° C., there is a high possibility that printing by the thermal head 22 was performed immediately before the previous power was turned off. The temperature measured by the thermistor 23 built in the thermal head 22 cannot be regarded as the ambient temperature. Therefore, if it is determined that all the temperatures measured above are within the predetermined range, the process proceeds to step 216. On the other hand, if it is determined that the temperature range of the temperature measured above exceeds the predetermined temperature range, the process proceeds to step 214. This temperature range can be arbitrarily set, but is set to 0.2 ° C. in the present embodiment. This is because the inventor has obtained empirical knowledge that the temperature is almost unchanged within 0.2 ° C. and the temperature of the thermistor 23 can be regarded as the ambient temperature.

次に、ステップ214(S214)では、フラッシュメモリ43等に記憶されている周囲の温度の値が読み込まれる。これは、後述するように、前回の電源投入時に用いられた周囲の温度が電源を切断する際に、フラッシュメモリ43等の不揮発性メモリに記憶されるため、このフラッシュメモリ43等に記憶されている周囲の温度を読み込み、前回の周囲の温度を今回の周囲の温度とみなすものである。尚、フラッシュメモリ43等、電源投入がなされた後には、最初の電源をオフする際に周囲の温度は記憶されるため、最初に一度電源を投入すれば、原則として、フラッシュメモリ43等には、周囲の温度が記憶されている。   Next, in step 214 (S214), the ambient temperature value stored in the flash memory 43 or the like is read. As will be described later, since the ambient temperature used at the previous power-on time is stored in the non-volatile memory such as the flash memory 43 when the power is turned off, it is stored in the flash memory 43 or the like. The ambient temperature is read and the previous ambient temperature is regarded as the current ambient temperature. Since the ambient temperature is stored when the first power is turned off after the power is turned on, the flash memory 43, etc., as a general rule, once the power is turned on. The ambient temperature is stored.

次に、ステップ216(S216)では、ステップ202からステップ208において測定された温度、又は、ステップ214においてフラッシュメモリ43等から読み込まれた温度を周囲の温度として、不図示の周囲温度レジスタに設定する。この周囲温度レジスタは、CPU50内に設けられている。   Next, in step 216 (S216), the temperature measured from step 202 to step 208 or the temperature read from the flash memory 43 or the like in step 214 is set as an ambient temperature in an ambient temperature register (not shown). . This ambient temperature register is provided in the CPU 50.

以上により、初期化処理のサブルーチンは終了する。このサブルーチンの終了後は、図2に記載されているメインルーチンに戻り、ステップ106に移行する。   Thus, the initialization process subroutine ends. After the end of this subroutine, the process returns to the main routine shown in FIG.

(プリンタ状態遷移判定処理のサブルーチン)
次に、図4に示すプリンタ状態遷移判定処理のサブルーチンのフローチャートについて説明する。
(Printer status transition determination processing subroutine)
Next, a flowchart of the subroutine of the printer state transition determination process shown in FIG. 4 will be described.

最初に、ステップ302(S302)では、周囲温度がT1よりも低いか否かが判断される。周囲の温度が設定値の温度T1よりも低いと判断された場合には、ステップ304に移行する。一方、周囲の温度が設定値T1よりも低くないものと判断された場合には、ステップ310に移行する。本実施の形態では、この設定値T1は、−10℃に設定されている。尚、この設定値T1は任意の値に設定することが可能である。本実施の形態におけるサーマルプリンタにおいては、サーマルプリンタに用いられている部品の保証温度等から設定されるものであり、経験上0℃以下の値に設定することが好ましい。   First, in step 302 (S302), it is determined whether or not the ambient temperature is lower than T1. If it is determined that the ambient temperature is lower than the set temperature T1, the routine proceeds to step 304. On the other hand, if it is determined that the ambient temperature is not lower than the set value T1, the routine proceeds to step 310. In the present embodiment, the set value T1 is set to −10 ° C. This set value T1 can be set to an arbitrary value. The thermal printer according to the present embodiment is set based on the guaranteed temperature of parts used in the thermal printer, and is preferably set to a value of 0 ° C. or less based on experience.

次に、ステップ304(S304)では、印字速度変更処理が行われる。具体的には、印字速度を低下させて、低温時に発生しやすい印刷媒体である用紙の張り付きによるスティッキングを低減させる。図6に示すように紙送りの速度を調整するための用紙送りモータ21の回転速度を低下させて、印字速度を低下させる。この印字速度は、任意の値に設定可能であり、例えば、70mm/sから、50mm/sや30mm/s等の印字速度に変更する処理を行うことが可能である。   Next, in step 304 (S304), a printing speed changing process is performed. Specifically, the printing speed is reduced to reduce sticking due to sticking of a paper that is a print medium that is likely to occur at low temperatures. As shown in FIG. 6, the rotational speed of the paper feed motor 21 for adjusting the paper feed speed is reduced to reduce the printing speed. This printing speed can be set to an arbitrary value. For example, it is possible to perform processing for changing from 70 mm / s to a printing speed such as 50 mm / s or 30 mm / s.

尚、図6(a)は本実施の形態におけるプリンタの斜視図であり、図6(b)は断面図である。印刷媒体である用紙70は、回転軸261を中心に回転するプラテンローラ26により用紙送りがなされ、用紙送りの速度は、このプラテンローラ26の回転を制御する用紙送りモータ21により制御される。用紙送りモータ21の回転は、ギアボックス28内のギアを介しプラテンローラ26の回転軸261に伝達され、プラテンローラ26が回転する。用紙70への印刷は、サーマルヘッド22により行われ、このサーマルヘッド22内には、温度測定のためのサーミスタが内蔵されている。また、このサーマルヘッド22は、用紙70との密着性を高めるためバネ27によりプラテンローラ26側に押し付けられている。   6A is a perspective view of the printer in the present embodiment, and FIG. 6B is a cross-sectional view. A sheet 70 as a printing medium is fed by a platen roller 26 that rotates about a rotation shaft 261, and a sheet feeding speed is controlled by a sheet feeding motor 21 that controls the rotation of the platen roller 26. The rotation of the sheet feed motor 21 is transmitted to the rotation shaft 261 of the platen roller 26 via the gear in the gear box 28, and the platen roller 26 rotates. Printing on the sheet 70 is performed by the thermal head 22, and a thermistor for temperature measurement is built in the thermal head 22. The thermal head 22 is pressed against the platen roller 26 by a spring 27 in order to improve the adhesion with the paper 70.

次に、ステップ306(S306)では、分割数変更処理が行われる。具体的には、同時に通電するサーマルヘッド22のドット数を減らして印刷を行うための処理がなされる。通常時においては、同時に通電するサーマルヘッド22のドット数を80ドットラインに設定した場合、印字率(印字データの黒部分の割合)が80以下であれば、印字の際、サーマルヘッド22の幅分のストローブを同時に駆動できるが、80以上であれば分割駆動する動作となる。分割数変更処理では、低温時におけるドット数を例えば、40ドットラインに変更するものである。分割数を変更することにより、分割駆動する割合が高くなり、同時に通電するドット数を減らすことができ、サーマルヘッド22を加熱するために必要な電力が軽減され、バッテリ60への負荷も軽減される。   Next, in step 306 (S306), a division number changing process is performed. Specifically, processing is performed to perform printing by reducing the number of dots of the thermal head 22 that is energized at the same time. Under normal conditions, if the number of dots of the thermal head 22 to be energized at the same time is set to 80 dot lines and the printing rate (the ratio of the black portion of the print data) is 80 or less, the width of the thermal head 22 during printing The strobes can be driven at the same time, but if they are 80 or more, the divided driving is performed. In the division number changing process, the number of dots at a low temperature is changed to, for example, 40 dot lines. By changing the number of divisions, the ratio of divided driving increases, the number of dots energized at the same time can be reduced, the power required to heat the thermal head 22 is reduced, and the load on the battery 60 is also reduced. The

次に、ステップ308(S308)では、用紙送り量補正処理1が行われる。具体的には、低温時においては、サーマルプリンタにおけるプラテンローラ26の径が小さくなるため、これに対応して一定の用紙送り量となるように用紙送りモータ21の回転数を上げる処理を行う。   Next, in step 308 (S308), paper feed amount correction processing 1 is performed. Specifically, at a low temperature, the diameter of the platen roller 26 in the thermal printer becomes small, and accordingly, processing for increasing the rotation speed of the paper feed motor 21 is performed so that a constant paper feed amount is obtained.

図7に、プラテンローラ26の構成を示す。図7(a)は、プラテンローラ21の斜視図であり、図7(b)は、プラテンローラ26の側面図であり、図7(c)は、図7(b)における破線7A−7Bにおいて切断した断面図である。   FIG. 7 shows the configuration of the platen roller 26. 7A is a perspective view of the platen roller 21, FIG. 7B is a side view of the platen roller 26, and FIG. 7C is a broken line 7A-7B in FIG. 7B. It is sectional drawing cut | disconnected.

プラテンローラ26の表面には、回転軸261の周囲を取り巻くようにゴムローラ部262が設けられている。また、回転軸261にはギア部263が設けられており、図6に示す用紙送りモータ21とギアボックス28内のギアを介し、用紙送りモータ21における回転が伝達される構成となっている。このゴムローラ部262は、ゴム等の材料により構成されており、温度変化により径が変化する。即ち、ゴムローラ部262の径は、高温では大きくなり、低温では小さくなる。ゴムローラ部262の径が大きくなると一回転あたりの用紙送り量が増加し、径が小さくなると一回転あたりの用紙送り量が少なくなる。このため、用紙送り量補正処理として、高温時では、ゴムローラ部262の径が大きくなった分、用紙送りモータ21の回転数を落とすことにより用紙送り量を通常の場合と同じとし、低温時では、ゴムローラ部262の径が小さくなった分、用紙送りモータ21の回転数を上げることにより用紙送り量を通常の場合と同じとするものである。ステップ308における用紙送り量補正処理1は、低温時と判断されているため、用紙送りモータ21の回転数を上げて、プラテンローラ28の回転数を高めることにより、用紙送り量が通常の場合と同じとなるような補正処理を行うものである。このステップ308が終了した後は、このサブルーチンは終了し、メインルーチンに戻る。   A rubber roller portion 262 is provided on the surface of the platen roller 26 so as to surround the periphery of the rotation shaft 261. Further, the rotation shaft 261 is provided with a gear portion 263 so that the rotation of the paper feed motor 21 is transmitted through the paper feed motor 21 and the gear in the gear box 28 shown in FIG. The rubber roller portion 262 is made of a material such as rubber, and its diameter changes with a temperature change. That is, the diameter of the rubber roller portion 262 increases at a high temperature and decreases at a low temperature. When the diameter of the rubber roller portion 262 increases, the paper feed amount per rotation increases, and when the diameter decreases, the paper feed amount per rotation decreases. For this reason, as the paper feed amount correction processing, at a high temperature, the paper feed amount is set to be the same as in a normal case by decreasing the number of rotations of the paper feed motor 21 by an amount corresponding to an increase in the diameter of the rubber roller portion 262. The amount of paper feed is made the same as in the normal case by increasing the number of revolutions of the paper feed motor 21 by the amount that the diameter of 262 is reduced. Since it is determined that the paper feed amount correction processing 1 in step 308 is at a low temperature, the paper feed amount becomes the same as that in the normal case by increasing the rotational speed of the paper feed motor 21 and increasing the rotational speed of the platen roller 28. Such correction processing is performed. After step 308 ends, this subroutine ends and returns to the main routine.

また、ステップ310(S310)では、周囲温度がT2よりも高いか否かが判断される。周囲の温度が設定値の温度T2よりも高いと判断された場合には、ステップ312に移行する。一方、周囲の温度が設定値T2よりも高くはないものと判断された場合には、このサブルーチンは終了し、メインルーチンに戻る。本実施の形態では、この設定値T2は、50℃に設定されている。尚、この設定値T2は任意の値に設定することが可能である。本実施の形態におけるサーマルプリンタにおいては、サーマルプリンタに用いられている部品の保証温度等から設定されるものであり、経験上40℃以上の値に設定することが好ましい。   In step 310 (S310), it is determined whether the ambient temperature is higher than T2. If it is determined that the ambient temperature is higher than the set temperature T2, the process proceeds to step 312. On the other hand, if it is determined that the ambient temperature is not higher than the set value T2, this subroutine ends and the process returns to the main routine. In the present embodiment, this set value T2 is set to 50 ° C. This set value T2 can be set to an arbitrary value. The thermal printer in the present embodiment is set based on the guaranteed temperature of the parts used in the thermal printer, and is preferably set to a value of 40 ° C. or higher based on experience.

次に、ステップ312(S312)では、用紙送り量補正処理2が行われる。具体的には、高温時には、サーマルプリンタのメカ部におけるプラテンローラ26の径が大きくなるため、これに対応して通常の場合と同じ用紙送り量となるように用紙送りモータ21の回転数を上げる処理を行う。ステップ312の処理が終了した後は、このサブルーチンは終了し、メインルーチンに戻る。   Next, in step 312 (S312), paper feed amount correction processing 2 is performed. Specifically, at a high temperature, the diameter of the platen roller 26 in the mechanical part of the thermal printer becomes large, and accordingly, processing for increasing the rotation speed of the paper feed motor 21 so as to achieve the same paper feed amount as in a normal case. Do. After the process of step 312 is finished, this subroutine is finished and the process returns to the main routine.

プリンタ状態遷移判定処理のサブルーチンが終了した後、図2に示すメインルーチンのステップ110に移行する。   After the printer status transition determination process subroutine is completed, the routine proceeds to step 110 of the main routine shown in FIG.

(割込処理サブルーチン)
次に、図5に基づき電源オフ処理に関する割込処理について説明する。この割込処理は、図2に示すメインルーチンの実行中に周期的、強制的に実行されるものであり、各種の割り込み処理に中で最も優先順位が高いものである。
(Interrupt processing subroutine)
Next, an interrupt process related to the power-off process will be described with reference to FIG. This interrupt process is periodically and forcibly executed during the execution of the main routine shown in FIG. 2, and has the highest priority among various interrupt processes.

最初に、この割り込み処理がなされると、ステップ402(S402)では、不図示のタスクカウンタが更新される。このタスクカウンタはCPU50内等に設けられている。   First, when this interrupt process is performed, a task counter (not shown) is updated in step 402 (S402). This task counter is provided in the CPU 50 or the like.

次に、ステップ404(S404)では、ステップ402で更新されたタスクカウンタに対応するタスクが、温度検出タスクであるか否かが判断される。このタスクが温度検出タスクである場合には、ステップ406に移行し、温度検出タスクでない場合には、ステップ414に移行する。   Next, in step 404 (S404), it is determined whether or not the task corresponding to the task counter updated in step 402 is a temperature detection task. If this task is a temperature detection task, the process proceeds to step 406, and if it is not a temperature detection task, the process proceeds to step 414.

次に、ステップ406(S406)では、サーマルヘッド22に内蔵されている不図示のサーミスタ23により温度の測定が行われる。この温度測定は、図3におけるステップ202と同様の方法により行われる。   Next, in step 406 (S406), the temperature is measured by a thermistor (not shown) built in the thermal head 22. This temperature measurement is performed by the same method as in step 202 in FIG.

次に、ステップ408(S408)では、ステップ406において測定された温度が記憶される。即ち、サーマルヘッド22のサーミスタ23により測定された温度の値がCPU50内のメモリ等に記憶される。   Next, in step 408 (S408), the temperature measured in step 406 is stored. That is, the temperature value measured by the thermistor 23 of the thermal head 22 is stored in a memory or the like in the CPU 50.

次に、ステップ410(S410)では、ステップ408に記憶された温度について、前回測定された周囲温度に対する比較及び判断がされる。具体的には、前回測定された周囲温度は、フラッシュメモリ43やCPU50内のメモリに記憶されており、これらに記憶されている周囲温度を読み出し、この周囲温度に対し、ステップ408に記憶されている温度が、0.2℃以内であるか否かの判断がなされる。記憶されている周囲温度に対し測定された温度が、0.2℃以内であれば、ステップ412に移行する。一方、記憶されている周囲温度に対し測定された温度が、0.2℃を超えている場合には、このサブルーチンは終了しメインルーチンに戻る。記憶されている周囲温度に対し測定された温度が、0.2℃以内であれば、サーマルヘッド22の駆動による加熱は殆どないものと考えられるが、0.2℃を超える場合には、サーマルヘッド22の駆動により温度が上昇しているため、周囲温度の値を更新することを避ける必要があるからである。   Next, in step 410 (S410), the temperature stored in step 408 is compared and determined with respect to the previously measured ambient temperature. Specifically, the ambient temperature measured last time is stored in the flash memory 43 or the memory in the CPU 50, the ambient temperature stored in these is read, and stored in step 408 with respect to this ambient temperature. It is determined whether or not the temperature is within 0.2 ° C. If the measured temperature with respect to the stored ambient temperature is within 0.2 ° C., the process proceeds to step 412. On the other hand, if the temperature measured with respect to the stored ambient temperature exceeds 0.2 ° C., this subroutine ends and returns to the main routine. If the temperature measured with respect to the stored ambient temperature is within 0.2 ° C, it is considered that there is almost no heating by driving the thermal head 22, but if it exceeds 0.2 ° C, the thermal head 22 This is because it is necessary to avoid updating the value of the ambient temperature because the temperature is increased by driving the head 22.

次に、ステップ412(S412)では、周囲温度の更新がなされる。具体的には、ステップ408に記憶されている温度が周囲温度として更新されフラッシュメモリ43等の不揮発性メモリに記憶される。この後、割込処理のサブルーチンは終了する。   Next, in step 412 (S412), the ambient temperature is updated. Specifically, the temperature stored in step 408 is updated as the ambient temperature and stored in a nonvolatile memory such as the flash memory 43. Thereafter, the interrupt processing subroutine ends.

一方、ステップ414(S414)では、ステップ402で更新されたタスクカウンタに対応するタスクが、電源スイッチ監視タスクであるか否かが判断される。このタスクが電源スイッチ監視タスクであるものと判断された場合には、ステップ416に移行し、電源スイッチ監視タスクでないものと判断された場合には、ステップ420に移行する。   On the other hand, in step 414 (S414), it is determined whether or not the task corresponding to the task counter updated in step 402 is a power switch monitoring task. If it is determined that this task is a power switch monitoring task, the process proceeds to step 416. If it is determined that this task is not a power switch monitoring task, the process proceeds to step 420.

次に、ステップ416(S416)では、電源スイッチ14が押下されたか否かが判断される。具体的には、ステップ414において、電源スイッチ14が押下されたか否かが判断される。電源スイッチ14が押下されたものと判断された場合には、ステップ418に移行する。一方、電源スイッチ14が押下されてはいないものと判断された場合には、割込処理のサブルーチンは終了する。   Next, in step 416 (S416), it is determined whether the power switch 14 has been pressed. Specifically, in step 414, it is determined whether the power switch 14 has been pressed. If it is determined that the power switch 14 has been pressed, the process proceeds to step 418. On the other hand, if it is determined that the power switch 14 has not been pressed, the interrupt processing subroutine ends.

次に、ステップ418(S418)では、電源オフ要求設定処理を実行する。具体的には、電源オフ要求フラッグをオン状態にする。これにより、図2に示すメインルーチンが正常に動作している場合には、メインルーチンのステップ110において電源オフ要求フラッグのオン状態が検出され、ステップ120における周囲温度登録処理、ステップ122における電源オフ処理が行われ、この後、割込処理のサブルーチンは終了する。   Next, in step 418 (S418), a power-off request setting process is executed. Specifically, the power-off request flag is turned on. Thus, when the main routine shown in FIG. 2 is operating normally, the on state of the power off request flag is detected in step 110 of the main routine, the ambient temperature registration process in step 120, and the power off in step 122 Processing is performed, and thereafter, the interrupt processing subroutine ends.

一方、ステップ420(S420)では、タスクカウンタに応じたエラーチェックが実行される。即ち、このタスクカウンタに対応するタスクは、温度検出タスクでもなく、電源スイッチ監視タスクでもないため、これ以外のタスクカウンタに応じたエラーチェックが行われる。よって、本実施の形態に用いられるサーマルプリンタがエラー状態にある場合には、それが検出される。この後、割込処理のサブルーチンは終了する。   On the other hand, in step 420 (S420), an error check corresponding to the task counter is executed. That is, the task corresponding to this task counter is neither a temperature detection task nor a power switch monitoring task, so an error check is performed according to other task counters. Therefore, when the thermal printer used in the present embodiment is in an error state, it is detected. Thereafter, the interrupt processing subroutine ends.

以上、本発明の実施に係る形態について説明したが、上記内容は、発明の内容を限定するものではない。   As mentioned above, although the form which concerns on implementation of this invention was demonstrated, the said content does not limit the content of invention.

本発明の実施の形態におけるサーマルプリンタの構成図Configuration diagram of a thermal printer in an embodiment of the present invention 本発明の実施の形態におけるサーマルプリンタの印刷のメインルーチンのフローチャートFlowchart of the main routine for printing of the thermal printer in the embodiment of the present invention 図2におけるメインルーチンの初期化処理のサブルーチンのフローチャートFlowchart of the main routine initialization process subroutine in FIG. 図2におけるメインルーチンのプリンタ状態遷移判定処理のサブルーチンのフローチャートFIG. 2 is a flowchart of a subroutine of printer status transition determination processing of the main routine in FIG. 本発明の実施の形態におけるサーマルプリンタの割込処理のサブルーチンのフローチャートFlowchart of thermal printer interrupt processing subroutine in an embodiment of the present invention 本発明の実施の形態におけるサーマルプリンタの構造の一部を示す斜視図The perspective view which shows a part of structure of the thermal printer in embodiment of this invention プラテンローラの構造図Structure of platen roller

符号の説明Explanation of symbols

10 オペレーションパネル
11 フィードスイッチ
12 LED
13 ブザー
14 電源スイッチ
20 メカユニット
21 用紙送りモータ
22 サーマルヘッド
23 温度検出用サーミスタ
24 用紙無し検出センサ
25 カバーオープン検出スイッチ
30 制御回路ユニット
31 ステッピングモータ駆動回路
32 サーマルヘッド駆動回路
33 A/D変換回路
34 センサ検出回路
35 オペレーションパネル制御回路
40 電源制御回路
41 発振子
42 リセット回路
43 フラッシュメモリ
44 BT通信モジュール制御回路
45 ROM
46 フレームメモリ
50 CPU
60 バッテリ
10 Operation panel 11 Feed switch 12 LED
13 Buzzer 14 Power switch 20 Mechanical unit 21 Paper feed motor 22 Thermal head 23 Temperature detection thermistor 24 Paper detection sensor 25 Cover open detection switch 30 Control circuit unit 31 Stepping motor drive circuit 32 Thermal head drive circuit 33 A / D conversion circuit 34 Sensor detection circuit 35 Operation panel control circuit 40 Power supply control circuit 41 Oscillator 42 Reset circuit 43 Flash memory 44 BT communication module control circuit 45 ROM
46 frame memory 50 CPU
60 battery

Claims (13)

サーマルヘッドの温度を測定するためのサーミスタが設けられているサーマルプリンタの印刷方法において、
前記サーミスタにより所定の時間ごとに温度を複数回測定する測定工程と、
前記測定工程において測定された複数の温度の温度範囲が所定の温度範囲以下である場合には、前記複数の温度の値を周囲温度として記憶する記憶工程と、
前記周囲温度に応じて印刷条件を設定する設定工程と、
前記印刷条件に基づき印刷を行う印刷工程と、
を有することを特徴とするサーマルプリンタの印刷方法。
In a printing method of a thermal printer provided with a thermistor for measuring the temperature of the thermal head,
A measurement step of measuring the temperature a plurality of times every predetermined time by the thermistor;
When the temperature range of the plurality of temperatures measured in the measurement step is equal to or lower than a predetermined temperature range, a storage step of storing the plurality of temperature values as an ambient temperature;
A setting step for setting printing conditions according to the ambient temperature;
A printing process for performing printing based on the printing conditions;
A printing method for a thermal printer, comprising:
前記サーマルプリンタには、不揮発性メモリが設けられており、
前記サーマルプリンタの電源を切断する際には、前記周囲温度を前記不揮発性メモリに記憶させることを特徴とする請求項1に記載のサーマルプリンタの印刷方法。
The thermal printer is provided with a non-volatile memory,
The thermal printer printing method according to claim 1, wherein when the power of the thermal printer is turned off, the ambient temperature is stored in the nonvolatile memory.
前記測定工程において測定された複数の温度の温度範囲が所定の温度範囲を超える場合には、前記不揮発性メモリに記憶されている周囲温度に基づき、前記設定工程における印刷条件を設定することを特徴とする請求項1または2に記載のサーマルプリンタの印刷方法。   When the temperature range of the plurality of temperatures measured in the measurement step exceeds a predetermined temperature range, the printing conditions in the setting step are set based on the ambient temperature stored in the nonvolatile memory. A printing method for a thermal printer according to claim 1 or 2. 前記所定の温度範囲は、0.2℃であることを特徴とする請求項1から3のいずれかに記載のサーマルプリンタの印刷方法。   The thermal printer printing method according to any one of claims 1 to 3, wherein the predetermined temperature range is 0.2 ° C. 前記所定の時間は、0.2から5秒であることを特徴とする請求項1から4のいずれかに記載のサーマルプリンタの印刷方法。   5. The thermal printer printing method according to claim 1, wherein the predetermined time is 0.2 to 5 seconds. 前記複数回は、5回以上であることを特徴とする請求項1から5のいずれかに記載のサーマルプリンタ印刷方法。   6. The thermal printer printing method according to claim 1, wherein the plurality of times is five or more times. 前記測定工程は、前記サーマルプリンタの電源を投入した直後に行うものであることを特徴とする請求項1から6のいずれかに記載のサーマルプリンタの印刷方法。   7. The thermal printer printing method according to claim 1, wherein the measuring step is performed immediately after the thermal printer is turned on. 前記設定工程において、周囲温度が第1の所定の温度よりも低いと判断した場合には、印字速度を低くする設定を行うことを特徴とする請求項1から7のいずれかに記載のサーマルプリンタの印刷方法。   8. The thermal printer according to claim 1, wherein in the setting step, when it is determined that the ambient temperature is lower than the first predetermined temperature, a setting for decreasing the printing speed is performed. 9. Printing method. 前記設定工程において、周囲温度が第1の所定の温度よりも低いと判断した場合には、前記サーマルプリンタのサーマルヘッドの分割数を増やして印刷を行う設定を行うことを特徴とする請求項1から8のいずれかに記載のサーマルプリンタの印刷方法。   2. The printing apparatus according to claim 1, wherein, in the setting step, when it is determined that the ambient temperature is lower than the first predetermined temperature, the setting is performed to increase the number of divisions of the thermal head of the thermal printer. The printing method of the thermal printer in any one of 8-8. 前記設定工程において、周囲温度が第1の所定の温度よりも低いと判断した場合には、前記サーマルプリンタにおけるプラテンローラの回転速度を高くすることを特徴とする請求項1から9のいずれかに記載のサーマルプリンタの印刷方法。   10. The rotation speed of a platen roller in the thermal printer is increased when it is determined in the setting step that the ambient temperature is lower than a first predetermined temperature. The printing method of the thermal printer as described. 前記第1の所定の温度は、0℃であることを特徴とする請求項8から10のいずれかに記載のサーマルプリンタの印刷方法。   The printing method of the thermal printer according to claim 8, wherein the first predetermined temperature is 0 ° C. 前記設定工程において、周囲温度が第2の所定の温度よりも高いと判断した場合には、前記サーマルプリンタにおけるプラテンローラの回転速度を低くすることを特徴とする請求項1から11のいずれかに記載のサーマルプリンタの印刷方法。   12. The rotation speed of a platen roller in the thermal printer is lowered when it is determined in the setting step that the ambient temperature is higher than a second predetermined temperature. The printing method of the thermal printer as described. 前記第2の所定の温度は、40℃であることを特徴とする請求項12に記載のサーマルプリンタの印刷方法。   The printing method of the thermal printer according to claim 12, wherein the second predetermined temperature is 40 ° C.
JP2008223931A 2008-09-01 2008-09-01 Printing method of thermal printer Expired - Fee Related JP5361291B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008223931A JP5361291B2 (en) 2008-09-01 2008-09-01 Printing method of thermal printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008223931A JP5361291B2 (en) 2008-09-01 2008-09-01 Printing method of thermal printer

Publications (2)

Publication Number Publication Date
JP2010058292A true JP2010058292A (en) 2010-03-18
JP5361291B2 JP5361291B2 (en) 2013-12-04

Family

ID=42185669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008223931A Expired - Fee Related JP5361291B2 (en) 2008-09-01 2008-09-01 Printing method of thermal printer

Country Status (1)

Country Link
JP (1) JP5361291B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020137295A1 (en) 2018-12-27 2020-07-02 サトーホールディングス株式会社 Printer, program, and information processing system
WO2022180940A1 (en) 2021-02-26 2022-09-01 サトーホールディングス株式会社 Printer, printing system, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06198886A (en) * 1993-01-06 1994-07-19 Canon Inc Recording device and recording method
JPH0825678A (en) * 1994-07-14 1996-01-30 Casio Comput Co Ltd Thermal head split driving apparatus
JPH08207345A (en) * 1994-12-02 1996-08-13 Seiko Epson Corp Driving/controlling method for thermal head
JPH09159541A (en) * 1995-12-12 1997-06-20 Oki Electric Ind Co Ltd Temperature detecting method and printer device having temperature detecting function
JP2001205834A (en) * 2000-01-24 2001-07-31 Nec Data Terminal Ltd Thermal printer
JP2001215925A (en) * 2000-01-31 2001-08-10 Matsushita Graphic Communication Systems Inc Image recording device
JP2005132063A (en) * 2003-10-31 2005-05-26 Sato Corp Thermal printer

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06198886A (en) * 1993-01-06 1994-07-19 Canon Inc Recording device and recording method
JPH0825678A (en) * 1994-07-14 1996-01-30 Casio Comput Co Ltd Thermal head split driving apparatus
JPH08207345A (en) * 1994-12-02 1996-08-13 Seiko Epson Corp Driving/controlling method for thermal head
JPH09159541A (en) * 1995-12-12 1997-06-20 Oki Electric Ind Co Ltd Temperature detecting method and printer device having temperature detecting function
JP2001205834A (en) * 2000-01-24 2001-07-31 Nec Data Terminal Ltd Thermal printer
JP2001215925A (en) * 2000-01-31 2001-08-10 Matsushita Graphic Communication Systems Inc Image recording device
JP2005132063A (en) * 2003-10-31 2005-05-26 Sato Corp Thermal printer

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020137295A1 (en) 2018-12-27 2020-07-02 サトーホールディングス株式会社 Printer, program, and information processing system
US11698761B2 (en) 2018-12-27 2023-07-11 Sato Holdings Kabushiki Kaisha Printer, non-transitory computer-readable recording medium, and information processing system, for determining a number of print media printable with a rechargeable battery
WO2022180940A1 (en) 2021-02-26 2022-09-01 サトーホールディングス株式会社 Printer, printing system, and storage medium

Also Published As

Publication number Publication date
JP5361291B2 (en) 2013-12-04

Similar Documents

Publication Publication Date Title
CN102310659B (en) Printer and method for driving the same
EP3042778B1 (en) Printer and printing method
JP5361291B2 (en) Printing method of thermal printer
CN110014751A (en) Printing equipment, printing control method and storage medium
US9024988B2 (en) Media detection apparatus and method
US7940289B2 (en) Printer and pulse motor control method
JP2012045741A (en) Printer and roll
JP2012016874A (en) Printer and program
JP2014048101A (en) Quality determination device for secondary battery used in printer, and the printer
JP2012183718A (en) Thermal printer and control program thereof
US20110200376A1 (en) Printer, method and computer readable storage medium for printing paper
US10350906B2 (en) Printing apparatus, printing system, printing control method and computer-readable recording medium
JP6406401B2 (en) Printing apparatus, printing method, and program
US10336096B2 (en) Printing apparatus, control method of printing apparatus, and non-transitory computer readable recording medium
JP2012011569A (en) Printer and method of controlling the same
JP6379485B2 (en) A method for controlling the energization time of the thermal head at an unstable voltage.
CN107223109B (en) Practical timer in food freshness printer
CN113423579B (en) Printer, control method for printer, and program
JP5000960B2 (en) Printer device
JP6463933B2 (en) Printing device
JP5966919B2 (en) A method for controlling the energization time of the thermal head at an unstable voltage.
JP4670333B2 (en) Printing device
JP2010188628A (en) Genuine label and label printer
JP2008201017A (en) Thermal printer
JP6293489B2 (en) Printer device control method and printer device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110804

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130314

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20130402

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130520

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20130604

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130903

R150 Certificate of patent or registration of utility model

Ref document number: 5361291

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees