JP5500372B2 - Printer - Google Patents

Printer Download PDF

Info

Publication number
JP5500372B2
JP5500372B2 JP2010170635A JP2010170635A JP5500372B2 JP 5500372 B2 JP5500372 B2 JP 5500372B2 JP 2010170635 A JP2010170635 A JP 2010170635A JP 2010170635 A JP2010170635 A JP 2010170635A JP 5500372 B2 JP5500372 B2 JP 5500372B2
Authority
JP
Japan
Prior art keywords
voltage value
printing paper
printing
black
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010170635A
Other languages
Japanese (ja)
Other versions
JP2012030435A (en
Inventor
修平 野原
光浩 上田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Brother Industries Ltd
Original Assignee
Brother Industries 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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP2010170635A priority Critical patent/JP5500372B2/en
Publication of JP2012030435A publication Critical patent/JP2012030435A/en
Application granted granted Critical
Publication of JP5500372B2 publication Critical patent/JP5500372B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Printers Characterized By Their Purpose (AREA)
  • Handling Of Sheets (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Electronic Switches (AREA)

Description

本発明は、被印刷用紙に対し所望の印刷を行うプリンタに関する。   The present invention relates to a printer that performs desired printing on a printing paper.

従来、被印刷材(テープ)を搬送しつつ所望の文字を印刷する印刷装置(ラベル作成装置)において、予め被印刷材の搬送方向の所定位置に光吸収性の黒マークを印刷しておき、この黒マークを光学的に検出可能な用紙検出センサを備えることで被印刷材の搬送方向に対する位置を検出する技術が提案されている(例えば、特許文献1)。このような場合に使用される上記用紙検出センサは、一般的に投光器と受光器で構成される反射型センサであり、投光器からの投光による反射光を受光器で検出する。そして上記黒マークではそれ以外の部分に比べて反射光量が小さくなる挙動を利用して、用紙検出センサ上における当該黒マークの通過を検出する。   Conventionally, in a printing apparatus (label creation apparatus) that prints a desired character while conveying a printing material (tape), a light-absorbing black mark is printed in advance at a predetermined position in the conveyance direction of the printing material, There has been proposed a technique for detecting the position of the printing material in the conveyance direction by including a paper detection sensor that can optically detect the black mark (for example, Patent Document 1). The paper detection sensor used in such a case is a reflection type sensor generally composed of a projector and a light receiver, and the light reflected by the light projection from the projector is detected by the light receiver. The black mark detects the passage of the black mark on the paper detection sensor by utilizing the behavior that the amount of reflected light is smaller than that of the other portions.

特開2007−76267号公報JP 2007-76267 A

ところで、上記のような反射型センサを用いて搬送制御等を行う印刷装置のうち、例えば被印刷材として紙の被印刷用紙を用いる通常のプリンタの場合、ユーザによっては、やや異質な被印刷用紙を用いる可能性がある。すなわち例えば、汚れがあったり黄ばんだりして通常の白い用紙よりも白色度が低い被印刷用紙を使用したり、色あせたりして古くなったりして光吸収性能が低下した(言い換えれば黒色度が低下した)黒マークを備えた被印刷用紙を使用する場合があり得る。本来であれば、前述のようにして、黒マークの光吸収性の性質により受光器で受光する反射光量が大きく減ることで黒マークが検出される。しかしながら、上記のように白色度の低下や黒色度の低下があると、黒マークと黒マーク以外の部分とにおいて受光器での受光量の変化挙動が緩和される。この場合、黒マークの検出精度が低下し、結果として、被印刷用紙の搬送制御や印刷制御が十分な精度で行えないおそれがあった。   By the way, in the case of a normal printer that uses paper printing paper as a printing material among printing apparatuses that perform conveyance control using the reflection type sensor as described above, depending on the user, printing paper that is slightly different in quality is used. May be used. In other words, for example, a paper to be printed that is dirty or yellowed and has a lower whiteness than normal white paper, or faded to become old and deteriorated in light absorption performance (in other words, the blackness is reduced). It may be possible to use printing paper with black marks that have been reduced. Originally, as described above, the black mark is detected by greatly reducing the amount of reflected light received by the light receiver due to the light-absorbing property of the black mark. However, when there is a decrease in whiteness or a decrease in blackness as described above, the behavior of change in the amount of light received by the light receiver is reduced between the black mark and the portion other than the black mark. In this case, the detection accuracy of the black mark is lowered, and as a result, there is a possibility that the conveyance control and printing control of the printing paper cannot be performed with sufficient accuracy.

本発明の目的は、ユーザが白色度や黒色度の低下した被印刷用紙を用いた場合であっても、搬送制御や印刷制御を高精度に行い、確実に被印刷用紙へ印刷を行える、プリンタを提供することにある。   An object of the present invention is to provide a printer that can accurately perform conveyance control and print control and reliably print on a printing paper even when the user uses printing paper with reduced whiteness and blackness. Is to provide.

上記目的を達成するために、第1の発明は、光吸収性の位置決め用マークを備えた被印刷用紙を搬送する搬送手段と、前記搬送手段により搬送される前記被印刷用紙に対し、所望の印刷を行うサーマルヘッドと、前記搬送手段により搬送される前記被印刷用紙の搬送経路に向かって投光可能な投光手段、及び、受光した光量に対応した検出電圧値を出力可能な受光手段、を備えた光学センサと、前記受光手段による前記検出電圧に関して予め定められた所定の初期しきい値を記憶する初期値記憶手段と、更新指示信号にしたがって、前記初期値記憶手段に記憶された前記初期しきい値に代えて新規しきい値を算出するしきい値更新手段と、前記しきい値更新手段による前記新規しきい値の算出後の、前記受光手段の前記検出電圧値が前記新規しきい値に到達したことによって、前記位置決め用マークの検出を行うマーク検出手段と、印刷指示信号の入力にしたがって、搬送を開始するように前記搬送手段を制御するとともに、前記マーク検出手段の検出結果に基づき前記搬送手段の搬送動作を制御する、印刷用搬送制御手段と、前記マーク検出手段の検出結果に基づき、前記サーマルヘッドの印刷動作を制御する印刷制御手段と、前記更新指示信号に応じて、前記被印刷用紙を所定距離だけ搬送するように前記搬送手段を制御する、更新用搬送制御手段と、を有し、前記初期しきい値は、前記受光手段による前記検出電圧値の範囲に対応して予め定められた所定の初期白対応電圧値Vw0及び初期黒対応電圧値Vb0と、初期係数k0を用いて算出した値Vb0+k0(Vw0-Vb0);(但しk0は1未満の数)であり、前記新規しきい値は、前記更新用搬送制御手段の制御に基づき前記搬送手段が前記所定距離だけ前記被印刷用紙を搬送する間の、前記受光手段により出力された前記検出電圧値に基づいて取得される実白対応電圧値Vw1及び実黒対応電圧値Vb1と新たに設定される実係数k1とを用いて算出した値Vb1+k1(Vw1−Vb1)とするとともに、前記更新用搬送制御手段は、前記更新指示信号に応じて、複数枚の前記被印刷用紙に対応した前記所定距離を連続的に搬送するように前記搬送手段を制御し、前記光学センサは、前記連続的に搬送される複数枚の前記被印刷用紙それぞれに対し、前記投光手段が投光を行うと共に前記受光手段が検出電圧値を出力し、かつ、前記更新用搬送制御手段の制御に基づき前記搬送手段が前記所定距離だけ前記複数の被印刷用紙を搬送する間に、前記複数の被印刷用紙それぞれに対応して前記受光手段から出力される複数の前記検出電圧値に基づき、前記複数の被印刷用紙の白色度合いの変動幅を検出する白色変動幅検出手段、及び、前記複数の被印刷用紙にそれぞれ設けられた複数の前記位置決め用マークの黒色度合いの変動幅を検出する黒色変動幅検出手段、を設け、前記しきい値更新手段は、前記白色変動幅検出手段により検出された白色度合いの変動幅と、前記黒色変動幅検出手段により検出された黒色度合いの変動幅と、のうち、変動幅の小さい側寄りにシフトするように、k1を設定し、かつ、当該変動幅に応じて設定されたk1と、前記複数枚の被印刷用紙に関して前記受光手段より出力された前記複数の検出電圧値のうち白色度合いが最も低い印刷用紙に係わる検出電圧値と、前記複数枚の被印刷用紙の前記位置決めマークに関して前記受光手段により出力された前記複数の検出電圧値のうち黒色度合いが最も低いと位置決め用マークに係わる検出電圧値とに基づき、前記新規しきい値の算出を行うことを特徴とする。
In order to achieve the above object, the first invention provides a conveying means for conveying a printing paper provided with a light-absorbing positioning mark, and a desired printing paper conveyed by the conveying means. A thermal head for performing printing, a light projecting unit capable of projecting light toward a transport path of the printing paper transported by the transport unit, and a light receiving unit capable of outputting a detection voltage value corresponding to the received light amount, An initial value storage means for storing a predetermined initial threshold value predetermined for the detection voltage by the light receiving means, and the initial value storage means stored in the initial value storage means in accordance with an update instruction signal Threshold value updating means for calculating a new threshold value instead of the initial threshold value, and the detected voltage value of the light receiving means after the calculation of the new threshold value by the threshold value updating means is the new value. When the threshold value is reached, the mark detection means for detecting the positioning mark and the conveyance means to start conveyance according to the input of the print instruction signal, and the detection result of the mark detection means In response to the update instruction signal, a printing transport control unit that controls the transport operation of the transport unit based on the detection result, a print control unit that controls the printing operation of the thermal head based on the detection result of the mark detection unit, and An update conveyance control means for controlling the conveyance means so as to convey the printing paper by a predetermined distance, and the initial threshold corresponds to a range of the detection voltage value by the light receiving means. The predetermined initial white corresponding voltage value Vw0 and the initial black corresponding voltage value Vb0 and the value Vb0 + k0 (Vw0−Vb) calculated using the initial coefficient k0. ); (Where k0 is a number less than 1), and the new threshold value is calculated while the conveyance unit conveys the printing paper by the predetermined distance based on the control of the update conveyance control unit. A value Vb1 + k1 (Vw1−Vb1) calculated using the actual white corresponding voltage value Vw1 and actual black corresponding voltage value Vb1 acquired based on the detected voltage value output by the light receiving means and the newly set actual coefficient k1. And the update conveyance control means controls the conveyance means to continuously convey the predetermined distance corresponding to the plurality of sheets to be printed in response to the update instruction signal, The optical sensor is configured such that the light projecting unit emits light and the light receiving unit outputs a detection voltage value for each of the plurality of sheets of paper to be continuously conveyed, and the update transport control. means Based on the plurality of detection voltage values output from the light receiving unit corresponding to each of the plurality of printing papers, while the transporting unit transports the plurality of printing papers by the predetermined distance based on the control, White variation width detecting means for detecting a variation range of the whiteness degree of the plurality of printing papers, and black color for detecting a variation range of the blackness degree of the plurality of positioning marks respectively provided on the plurality of printing papers A variation range detection unit, wherein the threshold update unit includes a variation range of the whiteness level detected by the whiteness variation range detection unit, a variation range of the blackness level detected by the black variation range detection unit, Among these, k1 is set so as to shift to the side where the fluctuation range is small, and k1 set according to the fluctuation range and the light receiving means with respect to the plurality of sheets to be printed Among the plurality of output detection voltage values, the detection voltage value relating to the printing paper having the lowest whiteness level, and the plurality of detection voltage values output by the light receiving unit with respect to the positioning marks of the plurality of printing papers. When the blackness is the lowest, the new threshold value is calculated based on the detected voltage value related to the positioning mark .

本願第1発明のプリンタでは、印刷の実行時には、搬送手段が被印刷用紙を搬送し、その搬送される途中の被印刷用紙に対してサーマルヘッドが所望の印刷を行う。被印刷用紙には光吸収性の位置決め用マークが設けられており、光学センサの投光手段からの投光による反射光が受光手段で検出されるとき、位置決め用マークではそれ以外の部分に比べて反射光量が小さくなる。このため、位置決め用マークに対し投光されたときは、光量に対応し受光手段から出力される検出電圧値が変化する(小さくなる、若しくは、大きくなる)。位置決め用マークにおけるこの挙動を利用して、マーク検出手段が位置決め用マークの検出を行い、この検出結果に基づいて印刷用搬送制御手段が搬送手段の搬送動作を制御するとともに印刷制御手段がサーマルヘッドの印刷動作を制御する。   In the printer according to the first aspect of the present invention, when printing is performed, the transport unit transports the printing paper, and the thermal head performs desired printing on the printing paper that is being transported. The paper to be printed is provided with a light-absorbing positioning mark. When reflected light from the light projecting means of the optical sensor is detected by the light receiving means, the positioning mark is compared with the other parts. This reduces the amount of reflected light. For this reason, when light is projected onto the positioning mark, the detection voltage value output from the light receiving means changes (decreases or increases) corresponding to the amount of light. Using this behavior in the positioning mark, the mark detecting means detects the positioning mark, and based on the detection result, the printing conveyance control means controls the conveying operation of the conveying means, and the printing control means is the thermal head. Control the printing operation.

ここで、上述の検出電圧値に基づく位置決め用マークの検出では、検出電圧と予め定められたしきい値との大小を比較することで、上記検出が行われる。本願第1発明においては、検出電圧値の範囲に対応して、所定の初期白対応電圧値Vw0及び初期黒対応電圧値Vb0に基づく、所定の初期しきい値Vb0+k0(Vw0-Vb0);(k0はkの初期値である初期係数で、1未満の数)が予め設定されており、これらVw0,Vb0,Vb0+k0(Vw0-Vb0)は、初期値記憶手段に記憶されている。   Here, in the detection of the positioning mark based on the detection voltage value described above, the detection is performed by comparing the detection voltage with a predetermined threshold value. In the first invention of the present application, a predetermined initial threshold value Vb0 + k0 (Vw0−Vb0) based on a predetermined initial white corresponding voltage value Vw0 and an initial black corresponding voltage value Vb0 corresponding to the range of the detected voltage value; Is an initial coefficient that is an initial value of k and is a number less than 1), and Vw0, Vb0, Vb0 + k0 (Vw0-Vb0) are stored in the initial value storage means.

この場合、被印刷用紙への印刷時において、搬送される被印刷用紙のうち位置決め用マーク以外の部位に投光された場合は検出電圧値が比較的大きくなる(又は比較的小さくなる)一方、位置決め用マークに投光された場合は検出電圧値が小さくなり(又は大きくなり)、すなわち所定の変動幅内で想定される大小変動となる。その変動の中で検出電圧値が上記初期しきい値に到達した場合に、そのことをもって位置決め用マークの検出を行うことができる。   In this case, at the time of printing on the printing paper, the detection voltage value is relatively large (or relatively small) when light is projected to a portion other than the positioning mark among the printing paper to be conveyed. When the light is projected onto the positioning mark, the detection voltage value becomes small (or becomes large), that is, the magnitude fluctuation assumed within a predetermined fluctuation range. When the detected voltage value reaches the initial threshold value in the fluctuation, the positioning mark can be detected accordingly.

ところで、ユーザによっては、例えば、汚れがあったり黄ばんだりして通常の白い用紙よりも白色度が低い被印刷用紙を使用したり、色あせたりして古くなったりして光吸収性能が低下した(言い換えれば黒色度が低下した)位置決め用マークを備えた被印刷用紙を使用する場合があり得る。本来であれば、前述のようにして、位置決め用マークの光吸収性の性質により受光手段での受光量が大きく減り検出電圧が大きく変化することで位置決め用マークが検出されるが、上記のように白色度の低下や黒色度の低下があると、位置決め用マークによる受光手段での受光量の変化挙動が緩和される。すなわち、上述の検出電圧の変化量が小さくなることで検出電圧の変動幅が小さくなり、その結果位置決め用マークに投光された場合でも受光量が上記初期しきい値Vb0+k0(Vw0-Vb0)へ到達せず、位置決め用マークの検出が困難となる可能性がある。   By the way, depending on the user, for example, a light-absorbing performance is deteriorated by using a printing paper having a lower whiteness than a normal white paper due to dirt or yellowing, or fading and becoming old. In other words, there may be a case in which a printing paper having a positioning mark (with reduced blackness) is used. Originally, as described above, the amount of light received by the light receiving means is greatly reduced due to the light-absorbing property of the positioning mark, and the positioning mark is detected by a large change in the detection voltage. If there is a decrease in whiteness or a decrease in blackness, the change in the amount of light received by the light receiving means by the positioning mark is alleviated. That is, when the amount of change in the detection voltage is reduced, the fluctuation range of the detection voltage is reduced. As a result, even when light is projected onto the positioning mark, the amount of received light reaches the initial threshold value Vb0 + k0 (Vw0-Vb0). It may not be possible to detect the positioning mark.

そこで、本願第1発明においては、しきい値更新手段が、更新指示信号に基づき、上記白色度の低下や黒色度の低下による影響を考慮した、新たなしきい値の算出を行う。すなわち、更新指示信号が発せられると、更新用搬送制御手段の制御により搬送手段が被印刷用紙を所定距離だけ搬送する。この所定距離だけ被印刷用紙が搬送される間の受光手段からの検出電圧値に基づき、しきい値更新手段が、上記係数kの値を、k0とは異なる値の実係数k1に設定するとともに、上記Vw0からVw1に変更し、上記Vb0からVb1に変更する。この結果、上記した変動幅よりも狭いことが想定される、上記白色度や黒色度の低下時の変動幅に対応し、新規しきい値Vb1+k1(Vw1−Vb1)を新たに設定することができる。これにより、実際に印刷を実行するときに印刷用搬送制御手段の制御により搬送手段が被印刷用紙の搬送を行ったとき、位置決め用マークに投光された場合の受光量に対応した電圧値を、当該新規しきい値よりも小さく(又は大きく)することができ、確実に位置決め用マークを検出することができる。   Therefore, in the first invention of the present application, the threshold value updating means calculates a new threshold value based on the update instruction signal in consideration of the influence of the decrease in whiteness and the decrease in blackness. In other words, when an update instruction signal is issued, the conveyance unit conveys the printing paper by a predetermined distance under the control of the update conveyance control unit. Based on the detected voltage value from the light receiving means while the printing paper is conveyed by this predetermined distance, the threshold value updating means sets the value of the coefficient k to a real coefficient k1 that is different from k0. , Vw0 is changed to Vw1, and Vb0 is changed to Vb1. As a result, it is possible to newly set a new threshold value Vb1 + k1 (Vw1−Vb1) corresponding to the fluctuation range when the whiteness or blackness is lowered, which is assumed to be narrower than the above fluctuation range. . As a result, when the conveyance means conveys the printing paper under the control of the printing conveyance control means when actually performing printing, a voltage value corresponding to the amount of light received when the positioning mark is projected is set. The threshold value can be made smaller (or larger) than the new threshold value, and the positioning mark can be reliably detected.

したがって、上記白色度や黒色度の低下による検出電圧の挙動に関係なく、位置決め用マークの検出を高精度に行うことができる。この結果、ユーザが通常より白色度が低い被印刷用紙を使用したり、黒色度が低下した位置決め用マークを備えた被印刷用紙を使用した場合等であっても、印刷用搬送制御や印刷制御を高精度に行いつつ、確実な被印刷用紙への印刷を行うことができる。また、複数枚の被印刷用紙それぞれに対して光学センサにより検出した白色度合い及び黒色度合いのうち、最も劣悪な条件、すなわち白黒の差が少ない条件に基づいて、しきい値が変更される。この結果、複数枚の被印刷用紙いずれに対しても、確実に位置決め用マークの検出を高精度に行うことができ、印刷用紙への印刷を行うことができる。
Therefore, the positioning mark can be detected with high accuracy regardless of the behavior of the detection voltage due to the decrease in whiteness or blackness. As a result, even if the user uses printing paper with a lower whiteness than normal or printing paper with positioning marks with reduced blackness, printing transport control and printing control Can be reliably printed on the paper to be printed. Further, the threshold value is changed based on the worst condition among whiteness and blackness detected by the optical sensor for each of a plurality of printing papers, that is, a condition with little difference between black and white. As a result, the positioning mark can be reliably detected with high accuracy on any of a plurality of sheets of printing paper, and printing on the printing paper can be performed.

第2発明は、上記第1発明において、前記更新用搬送制御手段の制御に基づき前記搬送手段が前記所定距離だけ前記被印刷用紙を搬送する間の前記受光手段による前記検出電圧値に基づき、前記被印刷用紙の白色度合いが、所定の白色基準に達しているかどうかを判定する白色度判定手段を有し、前記しきい値更新手段は、前記白色度判定手段により前記被印刷用紙の白色度合いが所定の白色基準に達していないと判定された場合、k1をk0より小さな値に設定することを特徴とする。   According to a second invention, in the first invention, based on the detection voltage value by the light receiving unit while the transport unit transports the printing paper by the predetermined distance based on the control of the update transport control unit, Whiteness determination means for determining whether the whiteness level of the printing paper has reached a predetermined whiteness standard, and the threshold value updating means determines whether the whiteness level of the printing paper is determined by the whiteness determination means. When it is determined that the predetermined white reference is not reached, k1 is set to a value smaller than k0.

これにより、例えば、ユーザが、汚れがあったり黄ばんだりして通常の白い用紙よりも白色度が低い被印刷用紙を使用した場合であっても、k1をk0より小さな値に設定することで、しきい値を黒色寄りの値に変更することができる。この結果、位置決め用マークの検出を高精度に行い、確実な被印刷用紙への印刷を行うことができる。   Thereby, for example, even when the user uses a printing paper that is dirty or yellowed and has a whiteness lower than that of a normal white paper, by setting k1 to a value smaller than k0, The threshold value can be changed to a value closer to black. As a result, the positioning marks can be detected with high accuracy, and printing on the printing paper can be performed reliably.

第3発明は、上記第1発明において、前記更新用搬送制御手段の制御に基づき前記搬送手段が前記所定距離だけ前記被印刷用紙を搬送する間の前記受光手段による前記検出電圧値に基づき、前記位置決め用マークの黒色度合いが、所定の黒色基準に達しているかどうかを判定する黒色度判定手段を有し、前記しきい値更新手段は、前記黒色度判定手段により、前記位置決め用マークの黒色度合いが所定の黒色基準に達していないと判定された場合、k1をk0より大きな値に設定することを特徴とする。   According to a third invention, in the first invention, based on the detection voltage value by the light receiving unit while the conveyance unit conveys the printing paper by the predetermined distance based on the control of the update conveyance control unit, Blackness determination means for determining whether or not the blackness level of the positioning mark has reached a predetermined blackness standard, and the threshold value updating means is configured such that the blackness level of the positioning mark is determined by the blackness level determination means. Is determined to have not reached the predetermined black reference, k1 is set to a value larger than k0.

これにより、例えば、ユーザが、色あせたりして古くなったりして光吸収性能が低下した(黒色度が低下した)位置決め用マークを備えた被印刷用紙を使用した場合であっても、k1をk0より大きな値に設定することで、しきい値を白色寄りの値に変更することができる。この結果、位置決め用マークの検出を高精度に行い、確実な被印刷用紙への印刷を行うことができる。   Thereby, for example, even when the user uses printing paper provided with a positioning mark whose light absorption performance is deteriorated due to fading or becoming old (blackness is reduced), k1 is set. By setting the value larger than k0, the threshold value can be changed to a value closer to white. As a result, the positioning marks can be detected with high accuracy, and printing on the printing paper can be performed reliably.

第4発明は、上記第1発明において、前記更新用搬送制御手段は、複数枚の前記被印刷用紙を連続的に搬送するときに、各被印刷用紙ごとに搬送速度が互いに異なった値となるように前記搬送手段を制御する、搬送速度設定手段を備えることを特徴とする。
In a fourth aspect based on the first aspect , the update transport control means has different transport speeds for each printing paper when the plurality of printing papers are continuously transported. As described above, the apparatus includes a conveyance speed setting unit that controls the conveyance unit.

搬送される被印刷用紙の位置決め用マークに対し発光及び受光を行って光学的に検出を行う場合、光学センサから被印刷用紙までの距離が、検出精度に影響を与える場合がある。本願第4発明においては、搬送速度設定手段が、複数枚の被印刷用紙それぞれについて光学センサでの検出時における搬送速度を互いに異ならせる。搬送速度が互いに異なると、被印刷用紙から光学センサまでの距離も互いに異なることとなり、言い換えれば、精度が互いに微妙に異なる複数回の検出を実施することができる。これにより、初期しきい値補正を行うときの、光学センサの精度のばらつきの影響を低減し、さらに有効なしきい値の変更を行うことができる。 When optical detection is performed by emitting and receiving light on a positioning mark on a printing paper to be conveyed, the distance from the optical sensor to the printing paper may affect the detection accuracy. In the fourth invention of the present application, the conveyance speed setting means makes the conveyance speeds different at the time of detection by the optical sensor for each of the plurality of printing sheets. If the conveyance speeds are different from each other, the distances from the printing paper to the optical sensor are also different from each other. In other words, a plurality of detections with slightly different accuracy can be performed. Thereby, it is possible to reduce the influence of variations in accuracy of the optical sensor when performing the initial threshold correction, and to further change the effective threshold.

本発明によれば、ユーザが白色度や黒色度の低下した被印刷用紙を用いた場合であっても、搬送制御や印刷制御を高精度に行い、確実に被印刷用紙へ印刷を行うことができる。   According to the present invention, even when the user uses a printing paper with reduced whiteness or blackness, the conveyance control and the printing control can be performed with high accuracy, and printing can be reliably performed on the printing paper. it can.

本発明の一実施の形態である携帯型プリンタの外観構成を表す斜視図である。1 is a perspective view illustrating an external configuration of a portable printer according to an embodiment of the present invention. 携帯型プリンタの内部構造を表す図1中II−II断面による側断面図である。It is a sectional side view by the II-II section in Drawing 1 showing the internal structure of a portable printer. 携帯型プリンタの内部構造を表す、前方側斜め上方向から見た分解斜視図である。It is the disassembled perspective view seen from the front side diagonally upward direction showing the internal structure of a portable printer. 携帯型プリンタの機能的構成を表す機能ブロック図である。It is a functional block diagram showing the functional structure of a portable printer. 用紙検出センサの回路構成図である。It is a circuit block diagram of a paper detection sensor. 被印刷用紙の構成を概念的に表す説明図である。It is explanatory drawing which represents notionally the structure of a to-be-printed paper. 用紙検出センサが黒マークを検出する前後における検出電圧値の変化を、投光器の投光範囲と黒マークとの配置関係の模式図とともに表すタイムチャートである。It is a time chart which shows the change of the detection voltage value before and after a paper detection sensor detects a black mark with the schematic diagram of the arrangement | positioning relationship between the light projection range of a light projector, and a black mark. 白色度が低い場合のしきい値更新例を表すタイムチャート、及び、黒色度が低い場合のしきい値更新例を表すタイムチャートである。It is a time chart showing the threshold value update example when whiteness is low, and the time chart showing the threshold value update example when blackness is low. しきい値の更新処理の詳細手順を表すフローチャートである。It is a flowchart showing the detailed procedure of the update process of a threshold value. 図9のステップS200のしきい係数決定処理の詳細手順を表すフローチャートである。It is a flowchart showing the detailed procedure of the threshold coefficient determination process of step S200 of FIG. 印刷処理の詳細手順を表すフローチャートである。It is a flowchart showing the detailed procedure of a printing process. 複数枚の用紙で白色度・黒色度検出を行って係数k1を決める変形例における、しきい値更新例を表すタイムチャートである。It is a time chart showing the threshold value update example in the modification which performs whiteness and blackness detection on a plurality of sheets and determines the coefficient k1. しきい係数決定処理の詳細手順を表すフローチャートである。It is a flowchart showing the detailed procedure of a threshold coefficient determination process. 用紙検出センサの他の例を表す回路構成図である。It is a circuit block diagram showing the other example of a paper detection sensor. 用紙検出センサの他の例を用いた場合に黒マークを検出する前後における検出電圧値の変化を表すタイムチャートである。It is a time chart showing change of a detection voltage value before and after detecting a black mark when other examples of a sheet detection sensor are used. 用紙検出センサの他の例を用いた場合において、白色度が低い場合のしきい値更新例を表すタイムチャート、及び、黒色度が低い場合のしきい値更新例を表すタイムチャートである。When another example of the sheet detection sensor is used, a time chart showing an example of threshold update when the whiteness is low, and a time chart showing an example of threshold update when the blackness is low.

以下、本発明の一実施の形態を図面を参照しつつ説明する。本実施形態は、本発明を携帯型のプリンタに適用した場合の実施形態である。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings. This embodiment is an embodiment when the present invention is applied to a portable printer.

図1、図2、及び図3を用いて、本実施形態の携帯型プリンタ1の外観構成及び内部構造について説明する。以下では、図1中左下方向を前方、右上方向を後方、左上方向を左方、右下方向を右方として説明する。また、以下の説明において各部品について前後左右上下の各方向をいうときは、当該各部品が携帯型プリンタ1に取り付けられた状態での各方向に対応させて説明する。   The external configuration and internal structure of the portable printer 1 according to the present embodiment will be described with reference to FIGS. 1, 2, and 3. In the following description, the lower left direction in FIG. 1 is front, the upper right direction is rear, the upper left direction is left, and the lower right direction is right. Further, in the following description, when referring to the front, rear, left, right, top, and bottom directions for each component, description will be made in correspondence with each direction in a state in which each component is attached to the portable printer 1.

図1〜図3において、携帯型プリンタ1は、例えばPC端末や携帯電話等の外部機器2(後述の図4参照)より有線通信あるいは無線通信を介して受信した印刷データを、種々の被印刷用紙53に印刷する。この携帯型プリンタ1は、樹脂材料で構成された、装置外郭を構成する略直方体形状のハウジング100と、シャーシ組立体50とを組み付けることによって、概略組み立てられる。   1 to 3, the portable printer 1 is configured to print various types of print data received from an external device 2 (see FIG. 4 described later) such as a PC terminal or a mobile phone via wired communication or wireless communication. Print on paper 53. The portable printer 1 is roughly assembled by assembling a substantially rectangular parallelepiped housing 100 that is made of a resin material and that constitutes the outer shell of the apparatus, and a chassis assembly 50.

ハウジング100は、装置外郭上部を構成するトップカバー101と、装置外郭下部を構成するアンダーカバー102と、トップカバー101の上面前方側に開閉可能に設けられたカバー部材103とを備えている。   The housing 100 includes a top cover 101 that constitutes the upper part of the outer shell of the apparatus, an under cover 102 that constitutes the lower part of the outer shell of the apparatus, and a cover member 103 that can be opened and closed on the front side of the top surface of the top cover 101.

ハウジング100内には、搬送手段としてのプラテンローラ111と、サーマルヘッドの一種であるサーマルラインヘッド112とが設けられている。サーマルラインヘッド112は、後方側端部に軸部材113を備えた放熱板114上に設けられており、この放熱板114は上記サイドシャーシ部材130L,130Rにより軸部材113を中心に回動可能に支持されている。また、アンダーカバー102の内表面に設けられたメインシャーシ部材150には、上記サーマルラインヘッド112を支持する放熱板114をプラテンローラ111側に回動付勢する複数のコイルバネ115が設けられている。これにより、サーマルラインヘッド112は上記プラテンローラ111に圧接可能となっている。   In the housing 100, a platen roller 111 as a conveying means and a thermal line head 112 which is a kind of thermal head are provided. The thermal line head 112 is provided on a heat radiating plate 114 provided with a shaft member 113 at the rear end, and the heat radiating plate 114 can be rotated around the shaft member 113 by the side chassis members 130L and 130R. It is supported. The main chassis member 150 provided on the inner surface of the under cover 102 is provided with a plurality of coil springs 115 that urge the heat sink 114 that supports the thermal line head 112 toward the platen roller 111. . Thereby, the thermal line head 112 can be pressed against the platen roller 111.

ハウジング100の後方側には、略棒状の充電式電池10を収容するバッテリ収納室105が設けられており、このバッテリ収納室105にはバッテリ室カバー170が着脱可能に設けられている。当該バッテリ室カバー170を取り外した状態では、上記バッテリ収納室105がハウジング100の背面部分に開口する。   On the rear side of the housing 100, a battery storage chamber 105 that houses the substantially rod-shaped rechargeable battery 10 is provided. A battery chamber cover 170 is detachably provided in the battery storage chamber 105. In a state where the battery chamber cover 170 is removed, the battery storage chamber 105 opens in the rear portion of the housing 100.

シャーシ組立体50は、アンダーカバー102の内表面に設けられた、シャーシ組立体50の底部を構成するメインシャーシ部材150と、このメインシャーシ部材150の長手方向両側端部より立設される一対の上記サイドシャーシ部材130L,130Rとを備えている。サイドシャーシ部材130L,130Rは、軸孔131にプラテンローラ111の軸部材111aを挿通することにより、プラテンローラ111を回転可能に支持している。プラテンローラ111は、駆動モータ11により回転駆動されることで被印刷用紙53を搬送する。またサイドシャーシ部材130L,130Rは、サーマルラインヘッド112を備えた放熱板114を、前述した軸部材113を介して回動可能に支持している。   The chassis assembly 50 includes a main chassis member 150 that is provided on the inner surface of the under cover 102 and constitutes a bottom portion of the chassis assembly 50, and a pair of erected from both longitudinal ends of the main chassis member 150. The side chassis members 130L and 130R are provided. The side chassis members 130L and 130R support the platen roller 111 rotatably by inserting the shaft member 111a of the platen roller 111 into the shaft hole 131. The platen roller 111 is rotated by the drive motor 11 to convey the printing paper 53. Further, the side chassis members 130L and 130R support the heat radiating plate 114 including the thermal line head 112 so as to be rotatable via the shaft member 113 described above.

左側のサイドシャーシ部材130Lには、プラテンローラ111を駆動する駆動モータ11と、この駆動モータ11の駆動力をプラテンローラ111の上記軸部材111aに伝達する、複数のギアからなるギア機構132が設けられている。   The left side chassis member 130L is provided with a drive motor 11 that drives the platen roller 111, and a gear mechanism 132 that includes a plurality of gears that transmits the driving force of the drive motor 11 to the shaft member 111a of the platen roller 111. It has been.

また、サイドシャーシ部材130L,130Rの上部には、ビーム部材140が架け渡され、ネジにより固定されている。そして、挿入口104から挿入された被印刷用紙53をプラテンローラ111とサーマルラインヘッド112との圧接部Pに案内するガイド部材120が、ハウジング100を構成するトップカバー101、アンダーカバー102、及びカバー部材103とは分離された別体として構成されており、上記ビーム部材140に固定されることによって、サイドシャーシ部材130L,130Rに設けられている。   A beam member 140 is bridged over the side chassis members 130L and 130R and fixed with screws. A guide member 120 that guides the printing paper 53 inserted from the insertion port 104 to the pressure contact portion P between the platen roller 111 and the thermal line head 112 includes a top cover 101, an under cover 102, and a cover that constitute the housing 100. The member 103 is configured as a separate body, and is provided on the side chassis members 130L and 130R by being fixed to the beam member 140.

ガイド部材120は、その上部に、シャーシ組立体50への組み付け時に略水平となる水平面121と、この水平面121から装置内部側に向けて傾斜した傾斜面122とを有している。これら水平面121及び傾斜面122上には、被印刷用紙53の案内方向に沿って形成された複数の突条部材123が、長手方向に並列して設けられている。   The guide member 120 has a horizontal surface 121 that is substantially horizontal when assembled to the chassis assembly 50 and an inclined surface 122 that is inclined from the horizontal surface 121 toward the inside of the apparatus. On the horizontal surface 121 and the inclined surface 122, a plurality of protrusion members 123 formed along the guide direction of the printing paper 53 are provided in parallel in the longitudinal direction.

上記構成において、印刷時には、カバー部材103を閉じた状態でトップカバー101とカバー部材103との間に形成された挿入口104に上記被印刷用紙53が挿入される。挿入された被印刷用紙53は、挿入口104の下方に設けられたガイド部材120により、後述するプラテンローラ111とサーマルラインヘッド112との圧接部Pに案内される。プラテンローラ111は所定の圧接力で被印刷用紙53に接触し、被印刷用紙53を搬送する。この搬送される被印刷用紙53に対し、サーマルラインヘッド112が所望の印刷を行う。印刷完了後に、被印刷用紙53は、カバー部材103とアンダーカバー102との間に形成された排出口107より排出される。このとき、被印刷用紙53の搬送方向下流側の排出口107に向う搬送経路に、用紙検出センサ35(図1及び図3参照)が設けられている。この用紙検出センサ35の検出結果に基づきプラテンローラ111による搬送制御と、サーマルラインヘッド112による印刷制御が行われる(詳細は後述)。なお、紙詰まり等が生じた場合には、カバー部材103を開放することで、サーマルラインヘッド112からプラテンローラ111がリリースされ、容易に被印刷用紙53を引き出すことが可能となる。   In the above configuration, at the time of printing, the printing paper 53 is inserted into the insertion port 104 formed between the top cover 101 and the cover member 103 with the cover member 103 closed. The inserted printing paper 53 is guided to a pressure contact portion P between a platen roller 111 and a thermal line head 112, which will be described later, by a guide member 120 provided below the insertion port 104. The platen roller 111 contacts the printing paper 53 with a predetermined pressing force, and conveys the printing paper 53. The thermal line head 112 performs desired printing on the conveyed printing paper 53. After the printing is completed, the printing paper 53 is discharged from a discharge port 107 formed between the cover member 103 and the under cover 102. At this time, the paper detection sensor 35 (see FIGS. 1 and 3) is provided in the transport path toward the discharge port 107 on the downstream side in the transport direction of the printing paper 53. Based on the detection result of the paper detection sensor 35, conveyance control by the platen roller 111 and printing control by the thermal line head 112 are performed (details will be described later). When a paper jam or the like occurs, the platen roller 111 is released from the thermal line head 112 by opening the cover member 103, and the printing paper 53 can be easily pulled out.

次に、図4を用いて、携帯型プリンタ1の制御系について説明する。   Next, the control system of the portable printer 1 will be described with reference to FIG.

図4において、携帯型プリンタ1は、CPU12を有している。CPU12は、SDRAM13の一時記憶機能を利用しつつROM14に予め記憶されたプログラムに従って信号処理を行い、それによって携帯型プリンタ1全体の制御を行う。ROM14には、印字駆動制御プログラム等、制御上必要な各種のプログラムが格納されている。   In FIG. 4, the portable printer 1 has a CPU 12. The CPU 12 performs signal processing according to a program stored in advance in the ROM 14 while using the temporary storage function of the SDRAM 13, thereby controlling the entire portable printer 1. The ROM 14 stores various programs necessary for control, such as a print drive control program.

また、CPU12は、携帯型プリンタ1の電源のオン・オフ処理を行う電源回路15と、プラテンローラ111を駆動する駆動モータ11の駆動制御を行うモータ駆動回路16と、サーマルラインヘッド112の駆動制御を行うサーマルヘッド制御回路17とに接続されている。   In addition, the CPU 12 controls the power supply circuit 15 that performs power on / off processing of the portable printer 1, the motor drive circuit 16 that performs drive control of the drive motor 11 that drives the platen roller 111, and drive control of the thermal line head 112. It is connected to a thermal head control circuit 17 that performs the above.

またCPU12は、用紙検出センサ35と、用紙送り操作を行うためのフィードキー40(図1及び図3も参照)と、電源のオン・オフ操作を行うための電源キー30(図1及び図3も参照)とに接続されている。CPU12は、用紙検出センサ35の検出結果に基づき、挿入口104に被印刷用紙53が挿入されているか否かを検出する。   The CPU 12 also includes a paper detection sensor 35, a feed key 40 for performing a paper feed operation (see also FIGS. 1 and 3), and a power key 30 for performing a power on / off operation (also FIGS. 1 and 3). Connected). Based on the detection result of the paper detection sensor 35, the CPU 12 detects whether or not the printing paper 53 is inserted into the insertion port 104.

またCPU12は、電源キー30又はフィードキー40が押し下げられた場合に、当該押し下げられたキーに対応した処理を実行する。フィードキー40が押し下げられると、CPU12は、上記モータ駆動回路16に制御信号を出力し、駆動モータ11を駆動させてプラテンローラ111を回転させ、被印刷用紙53を所定量搬送するフィード処理を行う。このフィードキー40は、例えば被印刷用紙53の搬送方向途中位置から印刷を開始するために用紙送りをする場合や、搬送方向長さが所定の長さよりも長い被印刷用紙53を用いた場合において印刷終了後に用紙を排出するような場合に、操作される。一方、携帯型プリンタ1の電源オフ状態で電源キー30が押し下げられると、CPU12は、電源回路15に制御信号を出力して電源のオン処理を行い、電源オン状態で電源キー30が押し下げられると、電源回路15に制御信号を出力して電源のオフ処理を行う。   Further, when the power key 30 or the feed key 40 is depressed, the CPU 12 executes a process corresponding to the depressed key. When the feed key 40 is pressed down, the CPU 12 outputs a control signal to the motor drive circuit 16, drives the drive motor 11, rotates the platen roller 111, and performs a feed process for conveying the printing paper 53 by a predetermined amount. . The feed key 40 is used when, for example, paper feeding is performed to start printing from a midway position in the conveyance direction of the printing paper 53, or when the printing paper 53 whose conveyance direction length is longer than a predetermined length is used. This is operated when the paper is to be discharged after completion. On the other hand, when the power key 30 is depressed in the power-off state of the portable printer 1, the CPU 12 outputs a control signal to the power circuit 15 to perform power-on processing, and when the power key 30 is depressed in the power-on state. Then, a control signal is output to the power supply circuit 15 to perform power-off processing.

またCPU12は、USBインターフェース駆動回路21と、無線通信部22と、赤外線通信部23とに接続されている。USBインターフェース駆動回路21は、USB端子24(図1も参照)に接続されたUSBケーブル(図示省略)を介して上記外部機器2との間で行われる通信の制御を行う。また無線通信部22は、上記外部機器2との間で行われる赤外線以外の電波による無線通信の制御を行う。また赤外線通信部23は、上記外部機器2との間で行われる赤外線通信の制御を行う。なお、外部機器2は、例えば、CPU2aと、RAM2bと、ROM2cとを備えている。   The CPU 12 is connected to the USB interface drive circuit 21, the wireless communication unit 22, and the infrared communication unit 23. The USB interface drive circuit 21 controls communication performed with the external device 2 via a USB cable (not shown) connected to a USB terminal 24 (see also FIG. 1). The wireless communication unit 22 controls wireless communication using radio waves other than infrared rays performed with the external device 2. The infrared communication unit 23 controls infrared communication performed with the external device 2. The external device 2 includes, for example, a CPU 2a, a RAM 2b, and a ROM 2c.

上記構成の制御系において、携帯型プリンタ1で印刷を行う際には、操作者(ユーザ)は、PC端末や携帯電話等の外部機器2を用いて被印刷用紙53に印刷する印刷データの入力を行うとともに、印刷開始指示入力を行う。これにより、外部機器2から携帯型プリンタ1に、上記USBケーブル、又は、無線通信若しくは赤外線通信を介して、印刷データが送信される。このようにして外部機器2から印刷データが入力された場合、その印刷データが例えばSDRAM13のテキストメモリに記憶される。その記憶された印刷データは再び読み出され、制御回路の変換機能により所定の変換がされることで、ドットパターンデータが生成され、バッファ(例えばCPU12の内部に設けられる)に記憶される。そして、サーマルラインヘッド112がサーマルヘッド制御回路17を介して駆動され、各発熱素子が1ライン分の印字ドットに対応して選択的に発熱駆動されてバッファに記憶されたドットパターンデータの印刷を行う。また、これと同期して駆動モータ11がモータ駆動回路16を介して被印刷用紙53の搬送制御を行う。   In the control system configured as described above, when printing is performed by the portable printer 1, the operator (user) inputs print data to be printed on the printing paper 53 using the external device 2 such as a PC terminal or a cellular phone. And a print start instruction is input. As a result, the print data is transmitted from the external device 2 to the portable printer 1 via the USB cable, wireless communication, or infrared communication. When print data is input from the external device 2 in this way, the print data is stored in, for example, a text memory of the SDRAM 13. The stored print data is read again and subjected to predetermined conversion by the conversion function of the control circuit, whereby dot pattern data is generated and stored in a buffer (for example, provided in the CPU 12). Then, the thermal line head 112 is driven via the thermal head control circuit 17, and each heating element is selectively driven to generate heat corresponding to the printing dots for one line, and the dot pattern data stored in the buffer is printed. Do. In synchronization with this, the drive motor 11 controls the conveyance of the printing paper 53 via the motor drive circuit 16.

以上の基本構成及び動作において、本実施形態の携帯型プリンタ1の最大の特徴は、上記のような被印刷用紙53に対する搬送制御及び印刷制御を行うための、用紙検出センサ35による、被印刷用紙53及び被印刷用紙53上の上記黒マークPMの検出にある。以下、その詳細を図5〜図11により順を追って説明する。   In the above basic configuration and operation, the greatest feature of the portable printer 1 according to the present embodiment is that the paper to be printed by the paper detection sensor 35 for performing the transport control and the print control for the paper to be printed 53 as described above. 53 and the detection of the black mark PM on the printing paper 53. The details will be described below in order with reference to FIGS.

図5を用いて、用紙検出センサ35の回路構成を詳細に説明する。   The circuit configuration of the paper detection sensor 35 will be described in detail with reference to FIG.

図5において、用紙検出センサ35は、光学的手法を用いた光学センサである。この例では、用紙検出センサ35は、投光器35A(投光手段)及び受光器35B(受光手段)を備えている。投光器35Aは、被印刷用紙53に向けて投光する。受光器35Bは、上記投光器35Aから発せられ、上記被印刷用紙53から反射された反射光を受光し、受光した光量に対応する電圧を出力する。また、用紙検出センサ35は上述した投光器35Aと受光器35Bの他に、負荷抵抗Rを有している。この例の投光器35Aは発光ダイオードで構成されており、そのアノード端子71が抵抗R1を介して電源(電源電圧Vcc)に接続され、カソード端子72が接地されている。また、この例の受光器35Bはフォトトランジスタで構成されており、そのコレクタ端子73が電源に接続され、エミッタ端子74が検出電圧値Vを出力する出力端子であるとともに抵抗R2を介して接地されている。機構的な配置として、この例では、被印刷用紙53の搬送方向に沿って投光器35A、受光器35Bの順に並んで配置されている。   In FIG. 5, a paper detection sensor 35 is an optical sensor using an optical technique. In this example, the paper detection sensor 35 includes a projector 35A (light projector) and a light receiver 35B (light receiver). The light projector 35 </ b> A emits light toward the printing paper 53. The light receiver 35B receives the reflected light emitted from the light projector 35A and reflected from the printing paper 53, and outputs a voltage corresponding to the received light amount. Further, the sheet detection sensor 35 has a load resistance R in addition to the projector 35A and the light receiver 35B described above. The projector 35A in this example is composed of a light emitting diode, and its anode terminal 71 is connected to a power source (power supply voltage Vcc) via a resistor R1, and the cathode terminal 72 is grounded. The photoreceiver 35B of this example is composed of a phototransistor, the collector terminal 73 of which is connected to a power source, the emitter terminal 74 is an output terminal for outputting a detection voltage value V, and is grounded through a resistor R2. ing. As a mechanical arrangement, in this example, the light projector 35A and the light receiver 35B are arranged in this order along the conveyance direction of the printing paper 53.

このような構成の用紙検出センサ35において、受光器35Bは、上記投光器35Aが点灯した際の被印刷用紙53を介した反射光Lrを受光し、それらの総受光量に応じたレベルの検出電圧値Vを出力する。この例では、受光器35Bを構成するフォトトランジスタのコレクタ側が電源側に接続されていることにより、上記総受光量が大きくなるほど高いレベルの検出電圧値Vを出力する(後述の図7参照)。   In the paper detection sensor 35 having such a configuration, the light receiver 35B receives the reflected light Lr via the printing paper 53 when the projector 35A is turned on, and a detection voltage at a level corresponding to the total amount of light received. Outputs the value V. In this example, since the collector side of the phototransistor constituting the light receiver 35B is connected to the power supply side, a higher detection voltage value V is output as the total amount of received light increases (see FIG. 7 described later).

次に図6を用いて、上記用紙検出センサ35の検出対象である、被印刷用紙53の構成を概念的に説明する。   Next, with reference to FIG. 6, the configuration of the printing paper 53, which is the detection target of the paper detection sensor 35, will be conceptually described.

図6において、この例は、複数枚の被印刷用紙53がミシン目状の予定切断線Lcを介し結合した状態で、搬送される様子を示している。すなわち、被印刷用紙53には、各ページ相互間に上記予定切断線Lcが形成されている。また、各被印刷用紙53の幅方向(搬送方向に直交する方向)の片側(図示上側)には、予定切断線Lcを跨ぐように、光吸収性の(この例では黒色に塗りつぶされた)黒マークPM(位置決め用マーク)が印刷されている。   In FIG. 6, this example shows a state in which a plurality of printing papers 53 are conveyed in a state where they are coupled via a perforated scheduled cutting line Lc. That is, the scheduled cutting line Lc is formed between the pages on the printing paper 53. In addition, on one side (upper side in the drawing) of each printing paper 53 in the width direction (the direction orthogonal to the transport direction), light absorption is performed so as to straddle the planned cutting line Lc (in this example, it is painted black). A black mark PM (positioning mark) is printed.

次に、上記構成の被印刷用紙53が搬送されて印刷されるときの、前述の用紙検出センサ35の発光・受光挙動を説明する。   Next, the light emission / light reception behavior of the above-described paper detection sensor 35 when the printing paper 53 having the above configuration is conveyed and printed will be described.

まず、携帯型プリンタ1にロールホルダ(図示せず)がセットされ、ロールホルダに収納された用紙ロール(図示せず)から繰り出された被印刷用紙53が挿入口104に挿入される。挿入直後で被印刷用紙53の先端が用紙検出センサ35の検出範囲に到達していない(用紙検出センサ35よりも搬送方向の上流側に位置している)場合は、投光器35Aからの投光の被印刷用紙53による反射がない。このため、受光器35Bにおける反射光Lrの受光量はとても低い。そして、被印刷用紙53の先端が用紙検出センサ35の検出範囲に到達すると、投光器35Aからの投光の被印刷用紙53による反射光Lrが受光器35Bで受光され、プラテンローラ111が駆動されて被印刷用紙53の搬送(自動フィード)が開始される。   First, a roll holder (not shown) is set in the portable printer 1, and the printing paper 53 fed out from a paper roll (not shown) stored in the roll holder is inserted into the insertion port 104. Immediately after the insertion, if the leading edge of the printing paper 53 does not reach the detection range of the paper detection sensor 35 (positioned upstream of the paper detection sensor 35 in the transport direction), the light projection from the light projector 35A is performed. There is no reflection by the printing paper 53. For this reason, the amount of reflected light Lr received by the light receiver 35B is very low. When the leading edge of the printing paper 53 reaches the detection range of the paper detection sensor 35, the light reflected from the printing paper 53 by the light projection from the light projector 35A is received by the light receiver 35B, and the platen roller 111 is driven. The conveyance (automatic feed) of the printing paper 53 is started.

このように被印刷用紙53が排出口107に向って搬送されると、上記黒マークPMが、用紙検出センサ35の上記検出範囲内に到達する。このとき、上記投光器35Aからの投光による受光器35Bでの反射光Lrの強度が、黒マークPMの光吸収性により所定のしきい値(後に詳述する)より小さくなる。このことにより、上記黒マークPMの存在が検出される。黒マークPMが検出されると、この検出のタイミングを基準としてそれからプラテンローラ111の駆動力に基づき所定量の搬送を行った後に、サーマルラインヘッド112による被印刷用紙53の印刷領域への印刷が開始される。なお、上記黒マークPMの例えば終端の検出によって被印刷用紙53の搬送を停止して印刷待ち待機状態としておき、外部機器2からの印刷指示が入力したら、被印刷用紙53をわずかに逆方向に搬送してから、印刷が開始されるようにしてもよい。   When the printing paper 53 is conveyed toward the discharge port 107 in this way, the black mark PM reaches the detection range of the paper detection sensor 35. At this time, the intensity of the reflected light Lr at the light receiver 35B due to the light projection from the light projector 35A becomes smaller than a predetermined threshold (detailed later) due to the light absorption of the black mark PM. Thereby, the presence of the black mark PM is detected. When the black mark PM is detected, after a predetermined amount of conveyance is performed based on the detection timing and based on the driving force of the platen roller 111, the thermal line head 112 performs printing on the printing area of the printing paper 53. Be started. For example, when the end of the black mark PM is detected, the conveyance of the printing paper 53 is stopped to be in a waiting state for printing, and when a printing instruction is input from the external device 2, the printing paper 53 is slightly reversed in the reverse direction. Printing may be started after conveyance.

その後、被印刷用紙53が、プラテンローラ111の駆動力に基づき所定量だけ搬送され、当該被印刷用紙53が排出口107(図1参照)から排出されると、上記搬送が停止される。こうして、印刷の終了した被印刷用紙53は、ユーザによって予定切断線Lcにより切断され、1枚のシートとして分離される。以上のようにして、用紙検出センサ35による黒マークPMの検出タイミングを基準として、被印刷用紙53の搬送開始後の印刷制御及び搬送制御が行われる。   Thereafter, the printing paper 53 is conveyed by a predetermined amount based on the driving force of the platen roller 111, and when the printing paper 53 is discharged from the discharge port 107 (see FIG. 1), the conveyance is stopped. Thus, the printed paper 53 that has been printed is cut by the user along the scheduled cutting line Lc and separated as one sheet. As described above, the print control and the conveyance control after the start of conveyance of the printing paper 53 are performed based on the detection timing of the black mark PM by the sheet detection sensor 35.

ところで、ユーザによっては、例えば、汚れがあったり黄ばんだりして通常の白い用紙よりも白色度が低い被印刷用紙53を挿入したり、色あせたりして古くなったりして光吸収性能が低下した(言い換えれば黒色度が低下した)黒マークPMを備えた被印刷用紙53を挿入する場合があり得る。本来であれば、前述のようにして、黒マークPMの光吸収性の性質により受光器35Bでの反射光Lrの受光量が大きく減り検出電圧が大きく変化することで黒マークPMが検出されるが、上記のように白色度の低下や黒色度の低下があると、黒マークPMによる受光器35Bでの受光量の変化挙動が緩和される。すなわち、上述の検出電圧値Vの変化量が小さくなることで検出電圧値Vの変動幅が小さくなり、その結果黒マークPMに投光された場合でも受光器35Bでの受光量が上記所定のしきい値よりも小さくならず、黒マークPMの検出が困難となる可能性がある。   By the way, depending on the user, for example, the printing paper 53 having a lower whiteness than that of a normal white paper is inserted due to dirt or yellowing, or the light absorption performance is deteriorated due to fading. There may be a case where the printing paper 53 having the black mark PM (in other words, the blackness is lowered) is inserted. Originally, as described above, the amount of reflected light Lr received by the light receiver 35B is greatly reduced due to the light absorbing property of the black mark PM, and the detection voltage changes greatly to detect the black mark PM. However, if there is a decrease in whiteness or a decrease in blackness as described above, the change in the amount of light received by the light receiver 35B due to the black mark PM is alleviated. That is, when the amount of change in the detection voltage value V is small, the fluctuation range of the detection voltage value V is small. As a result, even when the black mark PM is projected, the amount of light received by the light receiver 35B is the predetermined amount. There is a possibility that detection of the black mark PM may be difficult because it is not smaller than the threshold value.

そこで本実施形態では、上記搬送及び印刷行程において、通常の被印刷用紙53(=用紙自体が通常の白色度を備えるとともに、黒マークPMも通常の黒色度を備えた被印刷用紙53)が挿入されることを前提に予め設定された、通常のしきい値(=初期しきい値)を、上記の白色度の低下や黒色度の低下に対応する値(=新規しきい値)へと更新することで、黒マークPMを高い精度で検出できるようにする。上記白色度の低下や黒色度の低下による影響を考慮した、しきい値の更新の原理について、図7を用いて説明する。   Therefore, in the present embodiment, in the transporting and printing processes, the normal printing paper 53 (= the printing paper 53 having the normal whiteness and the black mark PM having the normal blackness) is inserted. The normal threshold value (= initial threshold value) that is set in advance is updated to a value (= new threshold value) that corresponds to the decrease in whiteness and blackness described above. Thus, the black mark PM can be detected with high accuracy. The principle of updating the threshold in consideration of the influence of the decrease in whiteness and the decrease in blackness will be described with reference to FIG.

図7に示すタイムチャートでは、横軸に時間T(搬送量に対応)、縦軸に受光器35Bからの上記検出電圧Vをとって表している。なお、図示するすべての時間範囲で投光器35Aが常時点灯した状態を表し、図示の便宜上、A部〜E部中の投光範囲81は実際よりも大きく示している。   In the time chart shown in FIG. 7, the horizontal axis represents time T (corresponding to the transport amount), and the vertical axis represents the detection voltage V from the light receiver 35B. It should be noted that the projector 35A is always lit in all the time ranges shown in the figure, and for the convenience of illustration, the light projection range 81 in the A part to E part is shown larger than the actual one.

(a)通常の白色度及びマーク黒色度を備えた被印刷用紙が挿入されたときの挙動
図7において、通常の白色度を備えかつ通常の黒マークPMの黒色度を備えた被印刷用紙53の搬送が開始された直後(T<T1である間)は、投光器35Aの投光範囲81は、被印刷用紙53の余白部分に位置する(図7中のA部参照)。この場合、受光器35Bからの出力電圧値Vは高いレベルの初期白対応電圧値Vw0となる。なお、この初期白対応電圧値Vw0は、上記図5中の電源が供給する電源電圧値Vccに近い電圧値となるが、センサ素子の特性ばらつきを考慮して、所定の白色基準電圧値Rwよりは大きくかつ上記Vccよりは小さい適宜の値となるように、予め(例えば工場出荷時の検査の際に)、設定されている。
(A) Behavior when a printing paper having normal whiteness and mark blackness is inserted In FIG. 7, a printing paper 53 having normal whiteness and blackness of a normal black mark PM. Immediately after the start of the conveyance (while T <T1), the light projection range 81 of the light projector 35A is located in the margin of the printing paper 53 (see section A in FIG. 7). In this case, the output voltage value V from the light receiver 35B becomes a high level initial white corresponding voltage value Vw0. The initial white-corresponding voltage value Vw0 is a voltage value close to the power supply voltage value Vcc supplied by the power supply in FIG. 5, but from a predetermined white reference voltage value Rw in consideration of characteristic variations of the sensor element. Is set in advance (for example, at the time of inspection at the time of factory shipment) so as to be an appropriate value that is larger and smaller than Vcc.

その後、前述のように被印刷用紙53の搬送が進行すると、あるタイミング(T=T1)で投光器35Aの投光範囲81が黒マークPMに重なり始める。そして被印刷用紙53の搬送が進むにつれて、黒マークPMと投光範囲81との重なる範囲が増加する(図7中のB部参照)。黒マークPMは光吸収性を備えていることから、黒マークPMと投光範囲81との重なる範囲が増加するのにしたがって、受光器35Bでの反射光Lrの受光量が減少する。この結果、TがT1より大きくなると、検出電圧値Vは、上記初期白対応電圧値Vw0から右下がりに減少していく。   Thereafter, as the printing paper 53 is conveyed as described above, the light projection range 81 of the light projector 35A starts to overlap the black mark PM at a certain timing (T = T1). As the printing paper 53 is transported, the overlapping range of the black mark PM and the light projection range 81 increases (see B section in FIG. 7). Since the black mark PM has light absorptivity, the amount of light reflected by the light receiver 35B decreases as the overlapping range of the black mark PM and the light projection range 81 increases. As a result, when T becomes larger than T1, the detected voltage value V decreases downward from the initial white corresponding voltage value Vw0.

その後、さらに被印刷用紙53の搬送が進行すると、あるタイミング(T=T2)で投光器35Aの投光範囲81が黒マークPMに完全に重なる(図7中のC部参照)。この状態では、上述のように減少してきた検出電圧値Vが下げ止まり、初期黒対応電圧値Vb0となる。なお、この初期黒対応電圧値Vb0も、上記初期白対応電圧値Vw0と同様、所定の黒色基準電圧値Rbより小さくかつ0よりは大きい適宜の値となるように、予め(例えば工場出荷時の検査の際に)、設定されている。この状態は、その後時間が経過してT=T3(後述)となるまで維持される。   Thereafter, when the conveyance of the printing paper 53 further proceeds, the light projection range 81 of the light projector 35A completely overlaps the black mark PM at a certain timing (T = T2) (see C section in FIG. 7). In this state, the detected voltage value V that has decreased as described above stops decreasing and becomes the initial black-corresponding voltage value Vb0. The initial black-corresponding voltage value Vb0 is also set in advance (for example, at the time of factory shipment) so as to be an appropriate value smaller than the predetermined black reference voltage value Rb and larger than 0, similarly to the initial white-corresponding voltage value Vw0. Set during inspection). This state is maintained until time elapses thereafter until T = T3 (described later).

その後、さらに被印刷用紙53の搬送が進行すると、あるタイミング(T=T3)で投光器35Aの投光範囲81が黒マークPM外へ離脱し始める。そして被印刷用紙53の搬送が進むにつれて、黒マークPMと投光範囲81との重なる範囲が減少していく(図7中のD部参照)。この黒マークPMと投光範囲81との重なる範囲の減少にしたがい、受光器35Bでの反射光Lrの受光量が増加する。この結果、TがT3より大きくなると、検出電圧値Vは、上記初期黒対応電圧値Vb0から右上がりに増加していく。   Thereafter, when the conveyance of the printing paper 53 further proceeds, the light projection range 81 of the light projector 35A starts to be separated from the black mark PM at a certain timing (T = T3). Then, as the printing paper 53 is conveyed, the overlapping range of the black mark PM and the light projection range 81 decreases (see part D in FIG. 7). As the black mark PM and the light projection range 81 overlap with each other, the amount of light reflected by the light receiver 35B increases. As a result, when T becomes larger than T3, the detected voltage value V increases to the right from the initial black corresponding voltage value Vb0.

その後、さらに被印刷用紙53の搬送が進行すると、あるタイミング(T=T4)で投光器35Aの投光範囲81が黒マークPMから完全に離脱する(図7中のE部参照)。この結果、上述のように増加してきた検出電圧値Vが、前述の初期白対応電圧値Vw0まで復帰する。   Thereafter, when the conveyance of the printing paper 53 further proceeds, the light projection area 81 of the light projector 35A is completely separated from the black mark PM at a certain timing (T = T4) (see the portion E in FIG. 7). As a result, the detected voltage value V that has increased as described above returns to the initial white-corresponding voltage value Vw0.

(b−1)白色度が低い被印刷用紙が挿入されたときの挙動
一方、図8(a)に示すように、汚れがあったり黄ばんだりして上記通常の白い被印刷用紙よりも白色度が低くなった被印刷用紙53が投入された場合は、搬送が開始された直後(前述したT≦T1の範囲に対応)おいては、受光器35Bからの検出電圧Vは、初期白対応電圧値Vw0と異なるレベルの(上記白色基準電圧値Rwよりも小さい)実白対応電圧値Vw1となる。これは、被印刷用紙53の黒マークPM以外の部分で上記通常の被印刷用紙より白色度が低いため、十分高い反射率で光を反射することができず、受光器35Bが十分な受光量で反射光Lrを受光できなくなるからである。
(B-1) Behavior when a printing paper with low whiteness is inserted On the other hand, as shown in FIG. 8 (a), the whiteness is higher than that of the normal white printing paper due to contamination or yellowing. In the case where the printing paper 53 having a low value is inserted, immediately after the conveyance is started (corresponding to the range of T ≦ T1 described above), the detection voltage V from the light receiver 35B is the initial white-corresponding voltage. The actual white corresponding voltage value Vw1 is a level different from the value Vw0 (smaller than the white reference voltage value Rw). This is because the whiteness of the portion other than the black mark PM of the printing paper 53 is lower than that of the normal printing paper, so that light cannot be reflected with a sufficiently high reflectance, and the light receiver 35B has a sufficient amount of light received. This is because the reflected light Lr cannot be received.

その後、図7と同様に検出電圧値Vは右下がりに減少した後、あるタイミング(前述したT=T2に対応)において到達する、検出電圧値Vが下げ止まる値は、前述の初期黒対応電圧値Vb0よりも大きい実黒対応電圧値Vb1となる。そして、このタイミングからしばらくの間(前述した2≦T≦T3の範囲に対応)、検出電圧値Vは、この実黒対応電圧値Vb1に維持される。   Thereafter, similarly to FIG. 7, the detected voltage value V decreases to the right and then arrives at a certain timing (corresponding to T = T2 described above). The value at which the detected voltage value V stops decreasing is the aforementioned initial black corresponding voltage. The actual black corresponding voltage value Vb1 is larger than the value Vb0. For a while from this timing (corresponding to the range of 2 ≦ T ≦ T3 described above), the detected voltage value V is maintained at the actual black corresponding voltage value Vb1.

その後、再び、検出電圧値Vは右上がりに増加する。そして、あるタイミング(前述したT=T4に対応)となると、増加してきた検出電圧値Vは、前述の実白対応電圧値Vw1へと復帰する。   Thereafter, the detection voltage value V again increases to the right. At a certain timing (corresponding to T = T4 described above), the increased detected voltage value V returns to the actual white corresponding voltage value Vw1.

以上の説明から明らかなように、白色度が低くなった被印刷用紙53が用いられた場合は、図7に示した通常の白色度を備えた被印刷用紙53を用いた場合(図8(a)の破線に相当)に比べ、全体として図示中央寄りに特性線が変化する(図8(a)の実線への矢印参照)。特にこの場合、上記特性線の変化において、Vw0とVw1との差よりもVb0とVb1との差のほうが小さくなっている。すなわち、上記検出電圧値Vの変動幅の変動中心が、図中の下方(黒色寄り)へスライドした挙動となっている。この結果、被印刷用紙53の白色度が低下したことによる検出電圧値Vの変動幅(上記実白対応電圧値Vw1〜実黒対応電圧値Vb1)は、検出電圧値Vの変動幅(上記初期白対応電圧値Vw0〜初期黒対応電圧値Vb0)よりも小さくなるのである。この例では、検出電圧値Vの変動幅は、「Vw0−Vb0」より、「Vw1−Vb1」に縮小したことになる。   As is apparent from the above description, when the printing paper 53 having a low whiteness is used, the printing paper 53 having the normal whiteness shown in FIG. 7 is used (FIG. 8 ( The characteristic line changes toward the center of the figure as a whole (refer to the arrow to the solid line in FIG. 8A). Particularly in this case, in the change of the characteristic line, the difference between Vb0 and Vb1 is smaller than the difference between Vw0 and Vw1. That is, the fluctuation center of the fluctuation range of the detection voltage value V is slid downward (close to black) in the figure. As a result, the fluctuation range of the detected voltage value V (the actual white corresponding voltage value Vw1 to the actual black corresponding voltage value Vb1) due to the decrease in the whiteness of the printing paper 53 is the fluctuation range of the detected voltage value V (the above initial value). The white corresponding voltage value Vw0 to the initial black corresponding voltage value Vb0) is smaller. In this example, the fluctuation range of the detection voltage value V is reduced from “Vw0−Vb0” to “Vw1−Vb1”.

(b−2)黒マークPMの黒色度が低い被印刷用紙が挿入されたときの挙動
一方、図8(b)に示すように、色あせたりして古くなったりして光吸収性能が低下した黒マークPMを備えた被印刷用紙53が投入された場合は、搬送が開始された直後(前述したT≦T1の範囲に対応)おいては、受光器35Bからの検出電圧Vは、初期白対応電圧値Vw0と異なるレベルの実白対応電圧値Vw1となる。
(B-2) Behavior when printing paper with low blackness of black mark PM is inserted On the other hand, as shown in FIG. When the printing paper 53 having the black mark PM is inserted, immediately after the conveyance is started (corresponding to the range of T ≦ T1 described above), the detection voltage V from the light receiver 35B is the initial white color. The actual white corresponding voltage value Vw1 is different from the corresponding voltage value Vw0.

その後、図7と同様に検出電圧値Vは右下がりに減少した後、あるタイミング(前述したT=T2に対応)において到達する、検出電圧値Vが下げ止まる値は、前述の初期黒対応電圧値Vb0よりも大きい(上記黒色基準電圧値Rbよりも大きい)実黒対応電圧値Vb1となる。これは、被印刷用紙53の黒マークPMで通常の被印刷用紙の黒マークPMより黒色度が低いため、十分に光を吸収することができず、受光器35Bにある程度の受光量の反射光Lrが受光されてしまうからである。そして、このタイミングからしばらくの間(前述した2≦T≦T3の範囲に対応)、検出電圧値Vは、この実黒対応電圧値Vb1に維持される。   Thereafter, similarly to FIG. 7, the detected voltage value V decreases to the right and then arrives at a certain timing (corresponding to T = T2 described above). The value at which the detected voltage value V stops decreasing is the aforementioned initial black corresponding voltage. The actual black corresponding voltage value Vb1 is greater than the value Vb0 (greater than the black reference voltage value Rb). This is because the black mark PM of the printing paper 53 is lower in blackness than the black mark PM of the normal printing paper, so that the light cannot be sufficiently absorbed, and the reflected light of a certain amount of light received by the light receiver 35B. This is because Lr is received. For a while from this timing (corresponding to the range of 2 ≦ T ≦ T3 described above), the detected voltage value V is maintained at the actual black corresponding voltage value Vb1.

その後、再び、検出電圧値Vは右上がりに増加する。そして、あるタイミング(前述したT=T4に対応)となると、増加してきた検出電圧値Vは、前述の実白対応電圧値Vw1へと復帰する。   Thereafter, the detection voltage value V again increases to the right. At a certain timing (corresponding to T = T4 described above), the increased detected voltage value V returns to the actual white corresponding voltage value Vw1.

以上の説明から明らかなように、黒色度が低くなった黒マークPMを備えた被印刷用紙53が用いられた場合は、図7に示した通常の白色度を備えた被印刷用紙53を用いた場合(図8(b)の破線に相当)に比べ、全体として図示中央寄りに特性線が変化する(図8(b)の実線への矢印参照)。特に、この場合、上記特性線の変化において、Vw0とVw1との差よりもVb0とVb1との差のほうが大きくなっている。すなわち、上記検出電圧値Vの変動幅の変動中心が、図中の上方(白色寄り)へスライドした挙動となっている。この結果、上記同様、被印刷用紙53の黒マークPMの黒色度が低下したことによる検出電圧値Vの変動幅(上記実白対応電圧値Vw1〜実黒対応電圧値Vb1)は、検出電圧値Vの変動幅(上記初期白対応電圧値Vw0〜初期黒対応電圧値Vb0)よりも小さくなるのである。この例では、検出電圧値Vの変動幅は、「Vw0−Vb0」より、「Vw1−Vb1」に縮小したことになる。   As is clear from the above description, when the printing paper 53 having the black mark PM having a low blackness is used, the printing paper 53 having the normal whiteness shown in FIG. 7 is used. Compared to the case (corresponding to the broken line in FIG. 8B), the characteristic line as a whole changes toward the center of the figure (see the arrow to the solid line in FIG. 8B). In particular, in this case, in the change of the characteristic line, the difference between Vb0 and Vb1 is larger than the difference between Vw0 and Vw1. That is, the fluctuation center of the fluctuation range of the detection voltage value V is slid upward (toward white) in the figure. As a result, as described above, the fluctuation range of the detected voltage value V (the actual white corresponding voltage value Vw1 to the actual black corresponding voltage value Vb1) due to the decrease in the blackness of the black mark PM of the printing paper 53 is the detected voltage value. This is smaller than the fluctuation range of V (the initial white corresponding voltage value Vw0 to the initial black corresponding voltage value Vb0). In this example, the fluctuation range of the detection voltage value V is reduced from “Vw0−Vb0” to “Vw1−Vb1”.

(c)しきい値の設定
(c−1)しきい値の初期設定
本実施形態の携帯型プリンタ1では、基本的に、図7を用いて上述したような、黒マークPMの存在による検出電圧値Vの変動(初期白対応電圧値Vw0→初期黒対応電圧値Vb0→初期白対応電圧値Vw0)を用いて、黒マークPMが用紙検出センサ35に対向する位置となったことを検出し、これによって被印刷用紙53の搬送方向位置の検出を行うようになっている。具体的には、検出電圧値Vに係わる初期しきい値TH0(図7、図8(a)、図8(b)参照)が例えば工場出荷時等において予め設定されている。この初期しきい値TH0は、上記初期白対応電圧値Vw0と上記初期黒対応電圧値Vb0の間となるように、k0(各請求項記載の初期係数に相当する)を1未満の値として、
TH0=Vb0+k0(Vw0−Vb0) ・・ (式1)
により設定されている。式1より明らかなように、この初期しきい値TH0は、検出電圧値Vの変動幅であるVw0〜Vb0の区間の中に存在し、しきい係数kの値によってVw0に近づけたり、Vb0に近づけたりする設定ができるようにしたものである(k0はしきい係数kの初期値である)。これにより、図7における上記T1≦T≦T2の範囲において検出電圧値Vが減少していき、V=TH0に到達したときをもって、黒マークPMが用紙検出センサ35に対向する位置となったことを検出することができる。なお、上記初期白対応電圧値Vw0、初期黒対応値Vb0、初期しきい値TH0、しきい係数k0の値は、例えば上記ROM14又は別途設けたEEPROM等に予め記憶される(初期値記憶手段)。
(C) Setting of Threshold Value (c-1) Initial Setting of Threshold Value In the portable printer 1 of the present embodiment, basically detection based on the presence of the black mark PM as described above with reference to FIG. Using the fluctuation of the voltage value V (initial white-corresponding voltage value Vw0 → initial black-corresponding voltage value Vb0 → initial white-corresponding voltage value Vw0), it is detected that the black mark PM is at a position facing the paper detection sensor 35. As a result, the position in the transport direction of the printing paper 53 is detected. Specifically, an initial threshold value TH0 (see FIGS. 7, 8A, and 8B) relating to the detected voltage value V is set in advance at the time of factory shipment, for example. The initial threshold value TH0 is such that k0 (corresponding to the initial coefficient described in each claim) is less than 1 so as to be between the initial white corresponding voltage value Vw0 and the initial black corresponding voltage value Vb0.
TH0 = Vb0 + k0 (Vw0−Vb0) (Equation 1)
It is set by. As is apparent from Equation 1, this initial threshold value TH0 exists in the interval of Vw0 to Vb0, which is the fluctuation range of the detected voltage value V, and approaches Vw0 depending on the value of the threshold coefficient k, or Vb0. It can be set to approach (k0 is the initial value of the threshold coefficient k). As a result, the detected voltage value V decreases in the range of T1 ≦ T ≦ T2 in FIG. 7, and the black mark PM is positioned to face the paper detection sensor 35 when V = TH0 is reached. Can be detected. The initial white corresponding voltage value Vw0, the initial black corresponding value Vb0, the initial threshold value TH0, and the threshold coefficient k0 are stored in advance in, for example, the ROM 14 or an EEPROM provided separately (initial value storage means). .

(c−2)しきい値の更新の必要性
ここで、図8(a)及び図8(b)を用いて説明したように、被印刷用紙53の白色度が低下した場合や黒マークPMの黒色度が低下した場合に、検出電圧値Vの変動幅が縮小し、実白対応電圧値Vw1が初期白対応電圧値Vw0よりも小さくなったり実黒対応電圧値Vb1が初期黒対応電圧値Vb0よりも大きくなる傾向となる。この結果、変動幅の最小値である上記実黒対応電圧値Vb1が予め定めた上記初期しきい値TH0より大きくなったり、変動幅の最大値である上記実白対応電圧値Vw1が、予め定めた上記初期しきい値TH0より小さくなったりする可能性がある。この場合には、検出電圧値Vが黒マークPMの存在によりT1≦T≦T2において右下がりに減少しても、V=TH0となることがないため、黒マークPMの存在を検出できなくなり、携帯型プリンタ1における被印刷用紙53の搬送制御や印刷制御の精度が低下してしまう。
(C-2) Necessity of Update of Threshold Value Here, as described with reference to FIGS. 8A and 8B, when the whiteness of the printing paper 53 is reduced or the black mark PM When the blackness of the image is reduced, the fluctuation range of the detection voltage value V is reduced, and the actual white corresponding voltage value Vw1 becomes smaller than the initial white corresponding voltage value Vw0 or the actual black corresponding voltage value Vb1 is the initial black corresponding voltage value. It tends to be larger than Vb0. As a result, the actual black corresponding voltage value Vb1 that is the minimum value of the fluctuation range becomes larger than the predetermined initial threshold value TH0, or the actual white corresponding voltage value Vw1 that is the maximum value of the fluctuation range is predetermined. The initial threshold value TH0 may be smaller. In this case, even if the detection voltage value V decreases to the right in T1 ≦ T ≦ T2 due to the presence of the black mark PM, V = TH0 does not occur, so the presence of the black mark PM cannot be detected. The accuracy of conveyance control and printing control of the printing paper 53 in the portable printer 1 is lowered.

(c−3)しきい値の更新実行
本実施形態の携帯型プリンタ1では、以上に鑑み、予め式(1)により定められた上記初期しきい値TH0に代えて、新規な値に更新された新規しきい値TH1を用いる。この新規しきい値TH1は、本実施形態では、
TH1=Vb1+k1(Vw1−Vb1) ・・ (式2)
により算出する。実黒対応電圧値Vb1は、上述したように、印刷対象となる被印刷用紙53が実際に挿入されたときに受光器35Bから出力された黒マークPMによる検出電圧値Vの値であり、実白対応電圧値Vw1は、上述したように、印刷対象となる被印刷用紙53が実際に挿入されたときに受光器35Bから出力された被印刷用紙53による検出電圧値Vの値である。
(C-3) Threshold Value Update Execution In the portable printer 1 of the present embodiment, in view of the above, the threshold value is updated to a new value instead of the initial threshold value TH0 previously determined by the equation (1). The new threshold value TH1 is used. In the present embodiment, the new threshold value TH1 is
TH1 = Vb1 + k1 (Vw1-Vb1) (Equation 2)
Calculated by As described above, the actual black-corresponding voltage value Vb1 is a value of the detected voltage value V by the black mark PM output from the light receiver 35B when the printing paper 53 to be printed is actually inserted. As described above, the white-corresponding voltage value Vw1 is a value of the detected voltage value V by the printing paper 53 output from the light receiver 35B when the printing paper 53 to be printed is actually inserted.

この結果、式2より明らかなように、この新規しきい値TH1は、前述した、上記初期しきい値TH0の設定と同様の手法原理に立脚するものであり、検出電圧値Vの変動幅であるVw1〜Vb1の区間を1としたときに、そのk1倍の区間長さを当てはめて上記区間を区切るようにしたものに相当している。このように、初期しきい値TH0の場合のしきい係数k0と異なるしきい係数k1(各請求項記載の実係数に相当する)を用いて新規しきい値TH1を算出することにより、しきい値の更新(TH0→TH1)が行われる。   As a result, as is apparent from Equation 2, this new threshold value TH1 is based on the same method principle as the above-described setting of the initial threshold value TH0, and is based on the fluctuation range of the detected voltage value V. This is equivalent to a section in which the section is divided by applying a section length of k1 times when a section of Vw1 to Vb1 is 1. Thus, by calculating the new threshold TH1 using the threshold coefficient k1 (corresponding to the actual coefficient described in each claim) different from the threshold coefficient k0 in the case of the initial threshold TH0, the threshold is calculated. The value is updated (TH0 → TH1).

具体的には、被印刷用紙53の白色度が低下している場合には、本実施形態では、実際に測定された実白対応電圧値Vw1が上記白色基準電圧値Rwよりも小さくなっていることによって上記白色度の低下が認識され、上記k1の値が0.5よりも小さい値(この例では後述のように0.3)に設定される。これにより、図8(a)に示すように、上記式2により新たに設定される新規しきい値TH1は、更新前の初期しきい値TH0よりも、図8(a)中の下方(黒色寄り)へスライドした態様となる。   Specifically, when the whiteness of the printing paper 53 is lowered, in the present embodiment, the actually measured actual white corresponding voltage value Vw1 is smaller than the white reference voltage value Rw. Accordingly, the decrease in whiteness is recognized, and the value of k1 is set to a value smaller than 0.5 (in this example, 0.3 as described later). As a result, as shown in FIG. 8A, the new threshold value TH1 newly set by the above equation 2 is lower (black color) in FIG. 8A than the initial threshold value TH0 before the update. It becomes a mode of sliding to the side.

また、被印刷用紙53の黒マークPMの黒色度が低下している場合には、本実施形態では、実際に測定された実黒対応電圧値Vb1が上記黒色基準電圧値Rbよりも大きくなっていることによって上記黒色度の低下が認識され、上記k1の値が0.5よりも大きい値(この例では後述のように0.7)に設定される。これにより、図8(b)に示すように、上記式2により新たに設定される新規しきい値TH1は、更新前の初期しきい値TH0よりも、図8(b)中の上方(白色寄り)へスライドした態様となる。   Further, when the blackness of the black mark PM of the printing paper 53 is lowered, in the present embodiment, the actually measured actual black corresponding voltage value Vb1 is larger than the black reference voltage value Rb. Accordingly, the decrease in blackness is recognized, and the value of k1 is set to a value larger than 0.5 (in this example, 0.7 as described later). As a result, as shown in FIG. 8B, the new threshold value TH1 newly set by the above equation 2 is higher than the initial threshold value TH0 before the update (white color in FIG. 8B). It becomes a mode of sliding to the side.

なお、上記のしきい値の更新処理は、例えば、外部機器2の適宜の操作に基づきCPU2aに設けられた更新指示部44が出力した更新指示信号に基づき、携帯型プリンタ1のCPU12に設けられた更新処理部45等により実行される。   The threshold value update process is provided in the CPU 12 of the portable printer 1 based on an update instruction signal output from the update instruction unit 44 provided in the CPU 2a based on an appropriate operation of the external device 2, for example. It is executed by the update processing unit 45 or the like.

以上の結果、ユーザが通常より白色度が低い被印刷用紙53を使用したり、黒色度が低下した黒マークPMを備えた被印刷用紙53を使用した場合等であっても、検出電圧値Vが黒マークPMの存在によりT1≦T≦T2において右下がりに減少したときに、確実にVがTH1に到達して黒マークPMの存在を検出できる。したがって、印刷用搬送制御や印刷制御を高精度に行いつつ、確実な被印刷用紙53への印刷を行うことができる。   As a result, even when the user uses the printing paper 53 having a lower whiteness than usual or the printing paper 53 having the black mark PM having a reduced blackness, the detected voltage value V Is reduced to the right in T1 ≦ T ≦ T2 due to the presence of the black mark PM, V reliably reaches TH1 and the presence of the black mark PM can be detected. Therefore, it is possible to perform reliable printing on the printing paper 53 while performing printing conveyance control and printing control with high accuracy.

なお、上述したように、本実施形態では、検出電圧値Vが減少して新規しきい値TH1に到達したことをもって、黒マークPMの存在を検出したが、これに限られない。すなわち、検出電圧値Vが増加して新規しきい値TH1に到達したことをもって、黒マークPMの存在を検出してもよい(後述の(3)の変形例を参照)。   As described above, in the present embodiment, the presence of the black mark PM is detected when the detected voltage value V decreases and reaches the new threshold value TH1, but the present invention is not limited to this. That is, the presence of the black mark PM may be detected when the detected voltage value V increases and reaches the new threshold value TH1 (see a modification example (3) described later).

以上説明したような機能を実現するために、携帯型プリンタ1のCPU12によって実行されるしきい値更新処理の制御内容を、図9を用いて説明する。   The control contents of the threshold update process executed by the CPU 12 of the portable printer 1 in order to realize the functions described above will be described with reference to FIG.

図9において、例えば印刷対象となる被印刷用紙53が挿入口104から挿入された状態で携帯型プリンタ1の電源がオンにされることにより、このフローが開始される。   In FIG. 9, for example, this flow is started by turning on the power of the portable printer 1 in a state where the printing paper 53 to be printed is inserted from the insertion port 104.

まずステップS10で、外部機器2のCPU12の更新指示部44から更新指示信号がCPU12の更新処理部45に入力されたかどうかが判定される。上記更新指示信号を入力するまで、判定が満たされずループ待機し、更新指示信号を入力したら、判定が満たされてステップS20に移る。なお、このように外部機器2から更新指示信号によらず、携帯型プリンタ1の適宜のボタン(電源ボタンを含む)やキーの操作により生成された信号を更新指示信号として取得し、この取得によって判定が満たされステップS20へ移行するようにしてもよい。   First, in step S <b> 10, it is determined whether or not an update instruction signal is input to the update processing unit 45 of the CPU 12 from the update instruction unit 44 of the CPU 12 of the external device 2. Until the update instruction signal is input, the determination is not satisfied and the system stands by in a loop. When the update instruction signal is input, the determination is satisfied and the process proceeds to step S20. In this way, a signal generated by operating an appropriate button (including a power button) or key of the portable printer 1 is acquired as an update instruction signal from the external device 2 without using the update instruction signal. The determination may be satisfied and the process may proceed to step S20.

ステップS20では、前述のようにしてROM14又はEEPROM等に記憶されていた、白色基準電圧値Rw、黒色基準電圧値Rb、及びしきい係数k0が、入力される。   In step S20, the white reference voltage value Rw, the black reference voltage value Rb, and the threshold coefficient k0 stored in the ROM 14 or the EEPROM as described above are input.

その後、ステップS200に移り、上記被印刷用紙53が挿入された状態において受光器35Bから出力された実白対応電圧値Vw1及び実黒対応電圧値Vb1に基づき、上記しきい計数k1が決定される(詳細は後述)。   Thereafter, the process proceeds to step S200, and the threshold count k1 is determined based on the actual white corresponding voltage value Vw1 and the actual black corresponding voltage value Vb1 output from the light receiver 35B in a state where the printing paper 53 is inserted. (Details will be described later).

その後、ステップS40へ移り、上記ステップS200において取得された実白対応電圧値Vw1及び実黒対応電圧値Vb1と、決定されたしきい係数k1とに基づき、前述の式2を用いて、更新処理部45により、新規しきい値TH1=Vb1+k1(Vw1−Vb1)が算出される。その後、このフローを終了する。   Thereafter, the process proceeds to step S40, and based on the actual white corresponding voltage value Vw1 and actual black corresponding voltage value Vb1 acquired in step S200 and the determined threshold coefficient k1, the update process is performed using the above-described equation 2. The unit 45 calculates a new threshold value TH1 = Vb1 + k1 (Vw1−Vb1). Thereafter, this flow is terminated.

次に、図10を用いて、上記ステップS200の詳細手順を説明する。   Next, the detailed procedure of step S200 will be described with reference to FIG.

まず、ステップS210において、CPU12が、モータ駆動回路16に制御信号を出力し、駆動モータ11によりプラテンローラ111を駆動させる。これにより、挿入口104に挿入されている被印刷用紙53の搬送が開始される。   First, in step S <b> 210, the CPU 12 outputs a control signal to the motor drive circuit 16 to drive the platen roller 111 by the drive motor 11. Thereby, the conveyance of the printing paper 53 inserted in the insertion port 104 is started.

その後、ステップS220へ移り、受光器35Bから出力された、上記検出電圧値Vが取得される。   Thereafter, the process proceeds to step S220, and the detected voltage value V output from the light receiver 35B is acquired.

そして、ステップS230において、実白対応電圧値Vw1及び実黒対応電圧値Vb1が取得できたかどうかを判定する。具体的には、例えば、適宜のサンプリング周期又はその整数倍で受光器35Bから出力された検出電圧値が、図8(a)及び図8(b)における上記黒マークPMの検出開始時の右下がり挙動となる前の水平挙動となっている(すなわちある程度の時間範囲でほぼ一定値となっている)によって実白対応電圧値Vw1を取得できたと判定すればよい。同様に、適宜のサンプリング周期又はその整数倍で受光器35Bから出力された検出電圧値が、図8(a)及び図8(b)における上記黒マークPMの検出開始後の右下がり挙動のあとの水平挙動となっている(すなわちある程度の時間範囲でほぼ一定値となっている)ことによって実黒対応電圧値Vb1を取得できたと判定すればよい。実白対応電圧値Vw1及び実黒対応電圧値Vb1の両方が取得されるまで、ステップS220に戻って同様の手順を繰り返す。実白対応電圧値Vw1及び実黒対応電圧値Vb1の両方が取得されたら、ステップS230の判定が満たされて、ステップS240に移る。   In step S230, it is determined whether the actual white corresponding voltage value Vw1 and the actual black corresponding voltage value Vb1 have been acquired. Specifically, for example, the detection voltage value output from the light receiver 35B at an appropriate sampling period or an integral multiple thereof is the right at the start of detection of the black mark PM in FIGS. 8 (a) and 8 (b). What is necessary is just to determine with the actual white corresponding | compatible voltage value Vw1 having been acquired by having become a horizontal behavior before becoming a descending behavior (that is, it is a substantially constant value in a certain time range). Similarly, the detected voltage value output from the light receiver 35B at an appropriate sampling period or an integral multiple thereof is after the right-down behavior after the detection of the black mark PM in FIGS. 8 (a) and 8 (b). It is only necessary to determine that the actual black-corresponding voltage value Vb1 can be acquired by the horizontal behavior (that is, a substantially constant value within a certain time range). Until both the actual white corresponding voltage value Vw1 and the actual black corresponding voltage value Vb1 are acquired, the process returns to step S220 and the same procedure is repeated. When both the actual white corresponding voltage value Vw1 and the actual black corresponding voltage value Vb1 are acquired, the determination in step S230 is satisfied, and the process proceeds to step S240.

ステップS240では、上記ステップS220及びステップS230の繰り返しによって取得された上記実白対応電圧値Vw1が、上記ステップS20で取得された白色基準電圧値Rwより小さかった否かを判定する。取得された実白対応電圧値Vw1が白色基準電圧値Rwより小さかった場合(図8(a)参照)には、判定が満たされてステップS250に移る。ステップS250では、しきい係数k1が0.5よりも小さい0.3に設定される。その後、ステップS260に移る。   In step S240, it is determined whether or not the actual white corresponding voltage value Vw1 acquired by repeating steps S220 and S230 is smaller than the white reference voltage value Rw acquired in step S20. If the acquired actual white corresponding voltage value Vw1 is smaller than the white reference voltage value Rw (see FIG. 8A), the determination is satisfied, and the routine goes to Step S250. In step S250, the threshold coefficient k1 is set to 0.3 which is smaller than 0.5. Thereafter, the process proceeds to step S260.

一方、ステップS240で実白対応電圧値Vw1が白色基準電圧値Rw以上であった場合には、ステップS240の判定が満たされず、ステップS270に移る。ステップS270では、上記ステップS220及びステップS230の繰り返しによって取得された上記実黒対応電圧値Vb1が、上記ステップS20で取得された黒色基準電圧値Rbより大きかった否かを判定する。実黒対応電圧値Vb1が黒色基準電圧値Rbより大きかった場合(図8(b)参照)には、ステップS270の判定が満たされ、ステップS280に移る。ステップS280では、しきい係数k1が0.5より大きい0.7に設定される。その後、ステップS260に移る。   On the other hand, if the actual white-corresponding voltage value Vw1 is greater than or equal to the white reference voltage value Rw in step S240, the determination in step S240 is not satisfied, and the process proceeds to step S270. In step S270, it is determined whether or not the actual black corresponding voltage value Vb1 acquired by repeating steps S220 and S230 is greater than the black reference voltage value Rb acquired in step S20. When the actual black corresponding voltage value Vb1 is larger than the black reference voltage value Rb (see FIG. 8B), the determination in step S270 is satisfied, and the process proceeds to step S280. In step S280, the threshold coefficient k1 is set to 0.7, which is larger than 0.5. Thereafter, the process proceeds to step S260.

また、ステップS270において、実黒対応電圧値Vb1が黒色基準電圧値Rb以下であった場合には、判定が満たされず、ステップS290に移る。ステップS290では、しきい係数k1が初期値であるk0と同じ値に設定される。その後、ステップS260に移る。   In step S270, if the actual black corresponding voltage value Vb1 is equal to or lower than the black reference voltage value Rb, the determination is not satisfied, and the routine goes to step S290. In step S290, the threshold coefficient k1 is set to the same value as the initial value k0. Thereafter, the process proceeds to step S260.

上記ステップS250、ステップS280、ステップS290が終了したら、前述したようにステップS260に移る。ステップS260では、適宜の手法により、被印刷用紙53が所定の搬送終了位置まで到達したかどうかの判定が行われる。具体的には、例えば、上記黒マークPMの検出終了後の右上がり挙動のあとの水平挙動が所定の時間範囲で継続している(電圧値Vが長時間ほぼ一定となっている)ことによって搬送終了とすればよい。あるいは、前述のような左下がり及び右下がりの電圧値Vの挙動により黒マークPMが検出された後、上記例えばパルスモータからなる上記駆動モータ11へモータ駆動回路16から出力するパルス数をカウントし、そのカウント数によって上記黒マークPMからの搬送距離を決定して、所定距離の搬送によって搬送終了としてもよい。搬送終了位置に到達するまではステップS260の判定が満たされずループ待機し、搬送終了位置に到達したらステップS260の判定が満たされ、ステップS270に移る。   When step S250, step S280, and step S290 are completed, the process proceeds to step S260 as described above. In step S260, it is determined whether the printing paper 53 has reached a predetermined conveyance end position by an appropriate method. Specifically, for example, the horizontal behavior after the upward motion after the detection of the black mark PM is continued in a predetermined time range (the voltage value V is substantially constant for a long time). The conveyance may be finished. Alternatively, after the black mark PM is detected based on the behavior of the voltage value V of the lower left and lower right as described above, the number of pulses output from the motor drive circuit 16 to the drive motor 11 including the pulse motor is counted. The transport distance from the black mark PM may be determined based on the count number, and the transport may be terminated by transporting a predetermined distance. Until the conveyance end position is reached, the determination in step S260 is not satisfied and the loop waits. When the conveyance end position is reached, the determination in step S260 is satisfied, and the process proceeds to step S270.

ステップS270では、CPU12が、モータ駆動回路16に制御信号を出力し、駆動モータ11によるプラテンローラ111の駆動を停止する。これにより、上記ステップS210より開始され継続していた被印刷用紙53の搬送が停止し、このフローを終了する。   In step S <b> 270, the CPU 12 outputs a control signal to the motor drive circuit 16 and stops driving the platen roller 111 by the drive motor 11. Thereby, the conveyance of the printing paper 53 started from step S210 and continuing is stopped, and this flow is ended.

次に、上記の図9及び図10のフローによって新規しきい値TH1が求められている状態でCPU12により実行される、被印刷用紙53への印刷処理の制御内容を、図11を用いて説明する。   Next, the control contents of the printing process on the printing paper 53 executed by the CPU 12 in a state where the new threshold value TH1 is obtained by the flow of FIGS. 9 and 10 will be described with reference to FIG. To do.

図11において、例えば携帯型プリンタ1の電源がオンにされることにより、このフローが開始される。   In FIG. 11, for example, when the power of the portable printer 1 is turned on, this flow is started.

まず、ステップS300で、挿入口14から被印刷用紙53が挿入されたかどうかが判定される。具体的には、例えば、被印刷用紙53の先端が投光器35Aからの投光範囲に到達し受光器35Rにおいて所定の大きさの反射光Lrが受光されたかどうかによって判定される。被印刷用紙53が十分に挿入されるまではステップS300が判定が満たされずループ待機し、挿入されたら判定が満たされてステップS310に移る。   First, in step S300, it is determined whether or not the printing paper 53 has been inserted from the insertion port. Specifically, for example, the determination is made based on whether or not the leading edge of the printing paper 53 reaches the light projection range from the light projector 35A and the reflected light Lr having a predetermined size is received by the light receiver 35R. Until the printing paper 53 is sufficiently inserted, the determination in step S300 is not satisfied and the process stands by in a loop. If inserted, the determination is satisfied and the process proceeds to step S310.

ステップS310では、上記図10のステップS210と同様、CPU12が、モータ駆動回路16に制御信号を出力し、駆動モータ11によりプラテンローラ111を駆動させる。これにより、挿入口104に挿入されている被印刷用紙53の搬送が開始される。   In step S <b> 310, as in step S <b> 210 of FIG. 10, the CPU 12 outputs a control signal to the motor drive circuit 16 and drives the platen roller 111 by the drive motor 11. Thereby, the conveyance of the printing paper 53 inserted in the insertion port 104 is started.

その後、ステップS320にて、受光器35Bから出力され取得された上記検出電圧値Vが、前述のようにして求められた新規しきい値TH1より小さいかどうかを判定する。検出電圧値Vが新規しきい値TH1以上である間は判定が満たされず、まだ用紙検出センサ35に対向する位置に黒マークPMが到達していないとみなされ、ループ待機する。検出電圧値Vが新規しきい値TH1より小さくなったらステップS320の判定が満たされ、搬送により用紙検出センサ35に対向する投光器35Aの投光範囲に黒マークPMが到達して黒マークPMが検出された(図7のB部の状態に相当)とみなし、ステップS330に移る。   Thereafter, in step S320, it is determined whether or not the detected voltage value V output and acquired from the light receiver 35B is smaller than the new threshold value TH1 obtained as described above. While the detected voltage value V is equal to or greater than the new threshold value TH1, the determination is not satisfied, and it is considered that the black mark PM has not yet reached the position facing the paper detection sensor 35, and the loop waits. When the detection voltage value V becomes smaller than the new threshold value TH1, the determination in step S320 is satisfied, and the black mark PM reaches the light projection range of the light projector 35A facing the paper detection sensor 35 by conveyance and the black mark PM is detected. (Corresponding to the state of part B in FIG. 7), and the process proceeds to step S330.

ステップ330では、受光器35Bから出力され取得された上記検出電圧値Vが、前述のようにして求められた新規しきい値TH1より大きくなったかどうかを判定する。検出電圧値Vが新規しきい値TH1以下である間は判定が満たされず、まだ用紙検出センサ35に対向する位置に黒マークPMが存在している(投光器35Aの投光範囲から完全には離脱していない)とみなされ、ループ待機する。検出電圧値Vが新規しきい値TH1より大きくなったらステップS330の判定が満たされ、搬送により投光器35Aの投光範囲から黒マークPMが完全に離脱した(図7のE部の状態に相当)とみなし、ステップS340に移る。   In step 330, it is determined whether or not the detected voltage value V output and acquired from the light receiver 35B is greater than the new threshold value TH1 obtained as described above. While the detection voltage value V is equal to or less than the new threshold value TH1, the determination is not satisfied, and the black mark PM still exists at a position facing the paper detection sensor 35 (completely separated from the light projection range of the light projector 35A). And waits for the loop. When the detected voltage value V becomes larger than the new threshold value TH1, the determination in step S330 is satisfied, and the black mark PM is completely separated from the light projection range of the light projector 35A by conveyance (corresponding to the state of the E portion in FIG. 7). And the process proceeds to step S340.

その後、ステップS340では、上記図10のステップS270と同様、CPU12が、モータ駆動回路16に制御信号を出力し、駆動モータ11によるプラテンローラ111の駆動を停止する。これにより、被印刷用紙53の搬送が停止し、その後のステップS350の印刷指示待ちの待機状態となる。   Thereafter, in step S340, as in step S270 of FIG. 10 described above, the CPU 12 outputs a control signal to the motor drive circuit 16, and stops driving the platen roller 111 by the drive motor 11. As a result, the conveyance of the printing paper 53 is stopped, and a waiting state for waiting for a printing instruction in the subsequent step S350 is entered.

そして、ステップS350で、印刷指示があったか、すなわち上記外部機器2から印刷データを含む印刷指示信号が入力されたかどうか、が判定される。判定が満たされるまでループ待機し、印刷指示があるとステップS350の判定が満たされ、ステップS360に移る。   In step S350, it is determined whether a print instruction has been issued, that is, whether a print instruction signal including print data has been input from the external device 2. The loop waits until the determination is satisfied. If there is a print instruction, the determination in step S350 is satisfied, and the process proceeds to step S360.

ステップS360では、CPU12が、サーマルヘッド駆動回路17に制御信号が出力されてサーマルラインヘッド112が通電されるとともに、モータ駆動回路16に制御信号が出力されてプラテンローラ111による被印刷用紙53の搬送が再開される。これによって、前述のようにしてバッファに記憶されたドットパターンデータが順次被印刷用紙53に印刷される。   In step S <b> 360, the CPU 12 outputs a control signal to the thermal head driving circuit 17 to energize the thermal line head 112, and outputs a control signal to the motor driving circuit 16 to convey the printing paper 53 by the platen roller 111. Is resumed. As a result, the dot pattern data stored in the buffer as described above is sequentially printed on the printing paper 53.

その後、ステップS370にて、上記印刷データに対応した印刷が完了したかどうかを判定する。印刷データの印刷が完了するまでステップS370の判定が満たされず、ステップS340に戻って印刷を続行する。印刷データの印刷が完了するとステップS370の判定が満たされ、ステップS380に移る。   Thereafter, in step S370, it is determined whether printing corresponding to the print data is completed. Until the printing of the print data is completed, the determination in step S370 is not satisfied, and the process returns to step S340 to continue printing. When printing of the print data is completed, the determination at step S370 is satisfied, and the routine goes to step S380.

ステップS380では、上記図10のステップS260と同様、被印刷用紙53が所定の搬送終了位置まで到達したかどうかの判定が行われる。具体的には、例えば、先の黒マークPMの検出タイミング(ステップS320又はステップS330)の後、前述と同様、パルスモータからなる上記駆動モータ11へモータ駆動回路16から出力するパルス数をカウントし、そのカウント数によって上記黒マークPMからの搬送距離を決定して、所定距離の搬送によって搬送終了とすればよい。搬送終了位置に到達するまではステップS380の判定が満たされずループ待機し、搬送終了位置に到達したらステップS380の判定が満たされ、ステップS390に移る。   In step S380, as in step S260 of FIG. 10 described above, it is determined whether the printing paper 53 has reached a predetermined conveyance end position. Specifically, for example, after the detection timing of the previous black mark PM (step S320 or step S330), the number of pulses output from the motor drive circuit 16 to the drive motor 11 composed of a pulse motor is counted as described above. The transport distance from the black mark PM may be determined based on the count number, and the transport may be terminated by transporting a predetermined distance. Until the conveyance end position is reached, the determination in step S380 is not satisfied and the loop waits. When the conveyance end position is reached, the determination in step S380 is satisfied, and the process proceeds to step S390.

ステップS390では、上記ステップS270と同様、CPU12が、モータ駆動回路16に制御信号を出力し、駆動モータ11によるプラテンローラ111の駆動を停止する。これにより、このフローを終了する。   In step S390, as in step S270, the CPU 12 outputs a control signal to the motor drive circuit 16, and stops driving the platen roller 111 by the drive motor 11. This completes this flow.

以上において、上記ステップS240が、各請求項記載の白色度判定手段として機能し、上記ステップS270が黒色度判定手段として機能する。そして、ステップS250、ステップS280、及びステップS40が、しきい値更新手段として機能する。また、ステップS220、ステップS260、及びステップS270が、更新用搬送制御手段として機能する。   In the above, step S240 functions as the whiteness determination unit described in each claim, and step S270 functions as the blackness determination unit. And step S250, step S280, and step S40 function as a threshold value update means. Further, Step S220, Step S260, and Step S270 function as an update transport control unit.

また、上記ステップS320及びステップS330がマーク検出手段として機能し、ステップS360〜ステップS390が印刷用搬送制御手段として機能し、そのうちステップS360及びステップS370が印刷制御手段としても機能する。   Steps S320 and S330 function as mark detection means, and steps S360 to S390 function as printing conveyance control means. Of these, step S360 and step S370 also function as print control means.

以上説明したように、本実施形態の携帯型プリンタ1においては、ユーザが通常より白色度が低い被印刷用紙53を使用したり、黒色度が低下した黒マークPMを備えた被印刷用紙53を使用した場合等において、初期しきい値TH0=Vb0+k0(Vw0−Vb0)に代えて、しきい値TH1=Vb1+k1(Vw1−V1)を用いる。これにより、通常の被印刷用紙53を使用した場合の変動幅よりも狭いことが想定される、上記白色度や黒色度の低下時の変動幅に対応した、上記新規しきい値TH1を新たに設定することができる。この結果、上記のような白色度が低い被印刷用紙53や、黒色度が低下した黒マークPMを備えた被印刷用紙53を使用した場合等でも、その白色度や黒色度の低下による検出電圧の挙動に関係なく、黒マークPMの検出を高精度に行うことができる。この結果、上記のような被印刷用紙53を使用した場合等であっても、印刷用搬送制御や印刷制御を高精度に行いつつ、確実な被印刷用紙53への印刷を行うことができる。   As described above, in the portable printer 1 of the present embodiment, the user uses the printing paper 53 having a lower whiteness than usual, or the printing paper 53 having the black mark PM having a lower blackness. When used, the threshold value TH1 = Vb1 + k1 (Vw1−V1) is used instead of the initial threshold value TH0 = Vb0 + k0 (Vw0−Vb0). As a result, the new threshold value TH1 corresponding to the fluctuation range when the whiteness and blackness are reduced, which is assumed to be narrower than the fluctuation range when the normal printing paper 53 is used, is newly set. Can be set. As a result, even when the printing paper 53 with low whiteness as described above or the printing paper 53 with the black mark PM with reduced blackness is used, the detection voltage due to the reduction in whiteness or blackness is used. Regardless of the behavior, the black mark PM can be detected with high accuracy. As a result, even when the above-described printing paper 53 is used, it is possible to perform reliable printing on the printing paper 53 while performing printing transport control and printing control with high accuracy.

また、本実施形態では特に、上記ステップS240において、被印刷用紙53の白色度合いが所定の白色基準に達していない場合には、kをk0より小さな値のk1に設定する(上記の例ではk0=0.5より小さなk1=0.3とする)ことで、しきい値を黒色寄りの値に変更する。この結果、上記のように汚れがあったり黄ばんだりして通常の白い用紙よりも白色度が低い被印刷用紙53を使用した場合でも、黒マークPMの検出を確実に高精度に行い、被印刷用紙53への印刷を行うことができる。   In the present embodiment, in particular, in step S240, when the whiteness of the printing paper 53 does not reach a predetermined white reference, k is set to a value k1 smaller than k0 (in the above example, k0). By setting k1 = 0.3 smaller than 0.5, the threshold value is changed to a value closer to black. As a result, the black mark PM is reliably detected with high accuracy even when the printing paper 53 that is dirty or yellowed and has a whiteness lower than that of a normal white paper is used. Printing on the paper 53 can be performed.

また、本実施形態では特に、上記ステップS270において、黒マークPMの黒色度合いが所定の黒色基準に達していない場合には、kをk0より大きな値のk1に設定する(上記の例ではk0=0.5より大きなk1=0.7とする)ことで、しきい値を白色寄りの値に変更する。この結果、上記のように色あせたりして古くなったりして黒色度が低下した黒色マークPMを備えた被印刷用紙53を使用した場合であっても、黒マークPMの検出を確実に高精度に行い、被印刷用紙53への印刷を行うことができる。   In the present embodiment, in particular, when the black degree of the black mark PM does not reach a predetermined black reference in step S270, k is set to a value k1 larger than k0 (in the above example, k0 = By setting k1 = 0.7, which is larger than 0.5, the threshold value is changed to a value closer to white. As a result, the black mark PM can be reliably detected with high accuracy even when the printing paper 53 having the black mark PM that has faded and become old as described above and has reduced blackness is used. And printing on the printing paper 53 can be performed.

なお、上記実施形態においては、図9及び図10に示すしきい値更新処理と、図11に示す印刷処理を別処理として、それぞれ別々の操作により処理を実行したが、これに限られない。すなわち、図11に示すような印刷処理を実行する際に、自動的に図9及び図10に示すようなしきい値更新処理が実行されるようにしてもよい。   In the above-described embodiment, the threshold value update process illustrated in FIGS. 9 and 10 and the print process illustrated in FIG. 11 are performed as separate processes, but the process is performed separately. However, the present invention is not limited to this. That is, when the printing process as shown in FIG. 11 is executed, the threshold value update process as shown in FIGS. 9 and 10 may be automatically executed.

また、本発明は、上記実施形態に限られるものではなく、その趣旨及び技術的思想を逸脱しない範囲内で種々の変形が可能である。以下、そのような変形例を順を追って説明する。   The present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the spirit and technical idea of the present invention. Hereinafter, such modifications will be described in order.

(1)複数枚の用紙で白色度・黒色度検出を行って係数k1を決める場合
例えば上述のようにユーザがロールホルダの用紙ロールから被印刷用紙53を繰り出して使用するとき、用紙ロールに連続的に含まれる複数の被印刷用紙53相互において、前述の汚れ・黄ばみ等による白色度の低下度合いや、前述の色あせ・経年等による黒色度の低下度合いが微妙に異なる場合がある。本変形例はこのような場合に対応するものであり、複数枚の被印刷用紙53それぞれにおける上記白色度の低下及び黒色度の低下に対応してさらに確実に高精度に黒マークPMの検出を行えるように、新規しきい値THmの算出を行う。
(1) When the whiteness / blackness detection is performed on a plurality of sheets to determine the coefficient k1, for example, as described above, when the user feeds out the printed sheet 53 from the sheet roll of the roll holder and uses it, it continues to the sheet roll. In some cases, the degree of decrease in whiteness due to the above-described stain / yellowing and the degree of decrease in blackness due to fading, aging, etc. may be slightly different among a plurality of printing papers 53 included in the image. This modification corresponds to such a case, and the black mark PM can be detected with higher accuracy in response to the decrease in the whiteness and the decrease in the blackness in each of the plurality of printing sheets 53. The new threshold value THm is calculated so that it can be performed.

本変形例におけるしきい値の更新の原理を、上記実施形態の図7に相当する図12を用いて説明する。   The principle of threshold value updating in this modification will be described with reference to FIG. 12 corresponding to FIG. 7 of the above embodiment.

図12は、3枚の被印刷用紙53が挿入された場合それぞれの検出電圧値Vの挙動の一例を示している。この例では、それら3枚の被印刷用紙53の白色度が小さくなっている場合を例にとっている。前述したように、白色度が低くなった被印刷用紙53が用いられた場合は、通常の白色度を備えた被印刷用紙53を用いた場合に比べ、全体として図示中央寄りに特性線が変化する。特に、この変形例では、1枚目の被印刷用紙53において実白対応電圧値がVw1となり、実黒対応電圧値がVb1となっている。同様に、2枚目の被印刷用紙53において実白対応電圧値がVw1′で実黒対応電圧値がVb1′となっており、3枚目の被印刷用紙53において実白対応電圧値がVw1″で実黒対応電圧値がVb1″となっている。   FIG. 12 shows an example of the behavior of each detected voltage value V when three sheets of printing paper 53 are inserted. In this example, the case where the whiteness of these three sheets of printing paper 53 is small is taken as an example. As described above, when the printing paper 53 having a low whiteness is used, the characteristic line changes toward the center of the drawing as a whole, compared to the case of using the printing paper 53 having a normal whiteness. To do. In particular, in this modified example, the actual white corresponding voltage value is Vw1 and the actual black corresponding voltage value is Vb1 in the first sheet 53 to be printed. Similarly, the actual white corresponding voltage value is Vw1 ′ and the actual black corresponding voltage value is Vb1 ′ in the second printing paper 53, and the actual white corresponding voltage value is Vw1 in the third printing paper 53. The actual black corresponding voltage value is Vb1 ".

各被印刷用紙53それぞれに係わる値を比較すると、実白対応電圧値はVw1>Vw1′>Vw1″の関係となっており、実黒対応電圧値はVb1>Vb1′>Vb1″の関係となっている。既に述べたように、実白対応電圧値Vwの値が低いほど当該用紙の白色度が低く、より黄ばみや汚れが生じていることとなる。同様に、実黒対応電圧値Vbの値が高いほど当該用紙の黒色マークPMの黒色度が低く、より色あせや経年劣化が生じていることとなる。そこで、本実施形態では、被印刷用紙53における高精度な搬送制御・印刷制御を確保するために、上記実白対応電圧値Vw1,Vw1′,Vw1″のうち最も条件が悪いVw1″と、上記実黒対応電圧値Vb1,Vb1′,Vb1″のうち最も条件が悪いVb1を、更新しきい値算出のために用いる。すなわち、上記式2を用いて算出を行う際、式2のVw1に代えて上記Vw1″を使用する。なお、この例では、上記実黒対応電圧値Vb1,Vb1′,Vb1″のうち最も条件が悪いのがVb1であるため、見かけ上、式2のVb1はそのまま適用されるが、もし条件が最も悪いのがVb1′やVb1″であった場合には、上記式のVb1に代え、Vb1′やVb1″が使用される。   Comparing the values relating to each printing paper 53, the actual white corresponding voltage value has a relationship of Vw1> Vw1 ′> Vw1 ″, and the actual black corresponding voltage value has a relationship of Vb1> Vb1 ′> Vb1 ″. ing. As already described, the lower the actual white-corresponding voltage value Vw, the lower the whiteness of the paper, and the more yellowed or smeared. Similarly, the higher the actual black-corresponding voltage value Vb is, the lower the blackness of the black mark PM of the paper is, and more faded or aged deterioration occurs. Therefore, in the present embodiment, in order to ensure highly accurate conveyance control / printing control on the printing paper 53, among the actual white corresponding voltage values Vw1, Vw1 ′, Vw1 ″, the worst condition Vw1 ″ and the above Of the actual black-corresponding voltage values Vb1, Vb1 ′, Vb1 ″, Vb1 having the worst condition is used for calculating the update threshold value. That is, when performing calculation using the above equation 2, Vw1 in equation 2 is substituted. The above Vw1 ″ is used. In this example, Vb1 has the worst condition among the actual black corresponding voltage values Vb1, Vb1 ′, and Vb1 ″. Therefore, Vb1 in Expression 2 is apparently applied as it is. If Vb1 ′ or Vb1 ″ is bad, Vb1 ′ or Vb1 ″ is used instead of Vb1 in the above formula.

さらに、式2におけるk1の値の決定についても、上記実施形態とは異なった手法を用いる。上記実施形態では、実際に検出された実白対応電圧値Vw1又は実黒対応電圧値Vb1と白色基準電圧値Rw又は黒色基準電圧値Rbとの大小関係に応じて、k1の値を0.3としたり0.7とした。本変形例では、上記のような実白対応電圧値Vw1,Vw1′,Vw1″や実黒対応電圧値Vb1,Vb1′,Vb1″のばらつきが生じている状態でも確実な黒色マークPMの高精度検出を確保する観点から、それぞれのばらつき範囲(変動幅)に応じてk1の値を切り替える。すなわち、実白対応電圧値Vwの変動幅γw(この例ではVw1−Vw1″)と、実黒対応電圧値Vbの変動幅γb(この例ではVb1−Vb1″)とが、比較される。図示のようにγw>γbであった場合にはk1は0.5よりも小さい0.3とされ、この結果上記式2より算出される上記新規しきい値TH1は、初期しきい値TH0に比べて黒色寄り(言い換えれば変動幅が少ない側寄り)にスライドした態様で設定される。逆に、γw<γbであった場合にはk1は0.5よりも小さい0.7とされ、この結果上記式2より算出される上記新規しきい値TH1は、初期しきい値TH0に比べて白色寄り(上記同様、変動幅が少ない側寄りとなる)にスライドした態様で設定される。   Further, for the determination of the value of k1 in Equation 2, a method different from that in the above embodiment is used. In the above embodiment, the value of k1 is set to 0.3 depending on the magnitude relationship between the actually detected actual white corresponding voltage value Vw1 or actual black corresponding voltage value Vb1 and the white reference voltage value Rw or black reference voltage value Rb. Or 0.7. In this modified example, the black mark PM can be accurately obtained with high accuracy even when the actual white corresponding voltage values Vw1, Vw1 ′, Vw1 ″ and the actual black corresponding voltage values Vb1, Vb1 ′, Vb1 ″ are varied. From the viewpoint of ensuring detection, the value of k1 is switched according to each variation range (variation range). That is, the fluctuation range γw of the actual white corresponding voltage value Vw (in this example, Vw1−Vw1 ″) and the fluctuation range γb of the actual black corresponding voltage value Vb (in this example, Vb1−Vb1 ″) are compared. As shown in the figure, when γw> γb, k1 is set to 0.3 which is smaller than 0.5. As a result, the new threshold value TH1 calculated from the above equation 2 is set to the initial threshold value TH0. Compared to black (in other words, closer to the side with less fluctuation range), it is set in such a manner that it slides. Conversely, when γw <γb, k1 is set to 0.7, which is smaller than 0.5. As a result, the new threshold value TH1 calculated from the above equation 2 is compared with the initial threshold value TH0. Therefore, it is set in such a manner that it is slid toward white (similar to the above, the side closer to the side with less fluctuation).

本変形例の携帯型プリンタ1のCPU12によって実行される処理では、図9におけるステップS200のしきい係数決定処理に代えて、ステップS200′のしきい係数決定処理が実行される。当該ステップS200′の制御内容を、上記図10に対応する図13により説明する。   In the process executed by the CPU 12 of the portable printer 1 of this modification, the threshold coefficient determination process of step S200 ′ is executed instead of the threshold coefficient determination process of step S200 in FIG. The control content of step S200 ′ will be described with reference to FIG. 13 corresponding to FIG.

図13に示すステップS200′のフローでは、上記実施形態の図10に示したステップS200のフローのステップS240及びステップS270に代えて、ステップS245及びステップS275がそれぞれ新たに設けられている。また、ステップS230と上記新たに設けられたステップS245との間に、ステップS235とステップS237とが設けられている。   In the flow of step S200 ′ shown in FIG. 13, steps S245 and S275 are newly provided in place of steps S240 and S270 of the flow of step S200 shown in FIG. Further, Step S235 and Step S237 are provided between Step S230 and the newly provided Step S245.

すなわち、上記図10と同様のステップS210及びステップS220を経て、ステップS230において、実白対応電圧値Vw1及び実黒対応電圧値Vb1が取得されて判定が満たされたら、新たに設けたステップS235に移る。   That is, after the same step S210 and step S220 as in FIG. 10 above, and in step S230, the actual white corresponding voltage value Vw1 and the actual black corresponding voltage value Vb1 are obtained and the determination is satisfied, the newly provided step S235 is performed. Move.

ステップS235では、複数枚(この例では3枚)の被印刷用紙53の全枚数が終了したかどうかが判定される。この全枚数(このれいでは3枚)のカウントに際しては、処理前にユーザが事前に印刷対象(あるいは白色度・黒色度の検出対象)となる被印刷用紙53の枚数を手動入力しておくようにする。あるいは、被印刷用紙53での反射光Lrが受光されなくなった状態が所定時間継続したことをもってプラテンローラ11によりすべての被印刷用紙53が装置外へ排出されたことを認識し、それまでに通過した黒マークPMの数によって枚数を認識するようにしてもよい。全枚数の被印刷用紙53について、実白対応電圧値Vw1及び実黒対応電圧値Vb1が取得されるまで、ステップ220に戻って同様の手順を繰り返す。全枚数の被印刷用紙53について、実白対応電圧値Vw1及び実黒対応電圧値Vb1が取得されたらステップS235の判定が満たされ、新たに設けたステップS237に移る。   In step S235, it is determined whether or not all the plurality of sheets (three in this example) of the printing paper 53 have been completed. When counting the total number of sheets (three sheets in this case), the user manually inputs the number of sheets to be printed 53 to be printed (or whiteness / blackness detection target) in advance before processing. To. Alternatively, when the state in which the reflected light Lr on the printing paper 53 is not received continues for a predetermined time, the platen roller 11 recognizes that all the printing paper 53 has been discharged out of the apparatus, and has passed so far. The number of black marks PM may be recognized based on the number of black marks PM. The process returns to step 220 and the same procedure is repeated until the actual white corresponding voltage value Vw1 and the actual black corresponding voltage value Vb1 are obtained for all the print sheets 53. When the actual white-corresponding voltage value Vw1 and the actual black-corresponding voltage value Vb1 are acquired for all the print sheets 53, the determination in step S235 is satisfied, and the process proceeds to newly provided step S237.

ステップS237では、上記繰り返しの間のステップS230での取得結果に応じて、実白対応電圧値Vwの変動幅γwと、実黒対応電圧値Vbの変動幅γbとを算出する。前述したように図12の例では実白対応電圧値はVw1>Vw1′>Vw1″であるのでγw=Vw1−Vw1″となり、また実黒対応電圧値はVb1>Vb1′>Vb1″であるのでγb=Vb1−Vb1″となる。その後、新たに設けたステップS245に移る。   In step S237, the fluctuation range γw of the actual white corresponding voltage value Vw and the fluctuation range γb of the actual black corresponding voltage value Vb are calculated according to the acquisition result in step S230 during the above repetition. As described above, in the example of FIG. 12, the actual white corresponding voltage value is Vw1> Vw1 ′> Vw1 ″, so that γw = Vw1−Vw1 ″, and the actual black corresponding voltage value is Vb1> Vb1 ′> Vb1 ″. γb = Vb1−Vb1 ″. Thereafter, the process proceeds to newly provided step S245.

ステップS245では、上記ステップS237での算出結果に基づきγb<γwであるかどうかを判定する。実黒対応電圧値Vbの変動幅γbが実白対応電圧値Vwの変動幅γwより小さかった場合(図12参照)は判定が満たされ、図10と同様のステップS250に移りk1=0.3に設定する。一方、実黒対応電圧値Vbの変動幅γbが実白対応電圧値Vwの変動幅γw以上であった場合はステップS245の判定が満たされず、新たに設けたステップS275に移る。   In step S245, it is determined whether γb <γw based on the calculation result in step S237. If the fluctuation width γb of the actual black corresponding voltage value Vb is smaller than the fluctuation width γw of the actual white corresponding voltage value Vw (see FIG. 12), the determination is satisfied, and the routine proceeds to step S250 similar to FIG. Set to. On the other hand, if the variation range γb of the actual black corresponding voltage value Vb is equal to or larger than the variation range γw of the actual white corresponding voltage value Vw, the determination in step S245 is not satisfied, and the process proceeds to a newly provided step S275.

ステップS275では、上記ステップS237での算出結果に基づきγb>γwであるかどうかを判定する。実黒対応電圧値Vbの変動幅γbが実白対応電圧値Vwの変動幅γwより大きかった場合は判定が満たされ、図10と同様のステップS280に移りk1=0.3に設定する。一方、実黒対応電圧値Vbの変動幅γbと実白対応電圧値Vwの変動幅γwとが等しかった場合はステップS275の判定が満たされず、図10と同様のステップS290に移り、k1をk0と同じ値とする。   In step S275, it is determined whether γb> γw based on the calculation result in step S237. If the fluctuation width γb of the actual black corresponding voltage value Vb is larger than the fluctuation width γw of the actual white corresponding voltage value Vw, the determination is satisfied, and the process proceeds to step S280 similar to FIG. 10 to set k1 = 0.3. On the other hand, if the variation width γb of the actual black corresponding voltage value Vb is equal to the variation width γw of the actual white corresponding voltage value Vw, the determination in step S275 is not satisfied, and the routine proceeds to step S290 similar to FIG. 10, and k1 is changed to k0. Same value as.

ステップS250、ステップS280、ステップS290以降は図10と同様であるので説明を省略する。   Step S250, step S280, and step S290 and subsequent steps are the same as in FIG.

なお、前述したように、本変形例の携帯型プリンタ1のCPU12によって実行される処理では、図9のフローにおけるステップS40では、式2において、上記図13の手順で決定されたしきい係数k1と、上記ステップS200′での変動幅γb,γwの算出に関連して取得された最小の実白対応電圧値Vw(上記の例ではVw1″)及び最大の実黒対応電圧値Vb(上記の例ではVb1)とを用いて、新規しきい値TH1の算出が行われる。   As described above, in the process executed by the CPU 12 of the portable printer 1 of the present modification, the threshold coefficient k1 determined by the procedure of FIG. And the minimum actual white corresponding voltage value Vw (Vw1 ″ in the above example) and the maximum actual black corresponding voltage value Vb (above described above) acquired in connection with the calculation of the fluctuation ranges γb and γw in step S200 ′. In the example, Vb1) is used to calculate a new threshold value TH1.

以上において、ステップS237が、各請求項記載の白色変動幅検出手段として機能すると共に黒色変動幅検出手段としても機能する。また、上記ステップS40と、上記ステップS250、ステップS280、及びステップS290とが、しきい値更新手段として機能する。   In the above, step S237 functions as a white variation width detecting unit described in each claim and also functions as a black variation range detecting unit. Further, the step S40, the step S250, the step S280, and the step S290 function as a threshold value updating unit.

本変形例においては、上述したように、複数枚の被印刷用紙53それぞれに対して用紙検出センサ35により検出された白色度合い及び黒色度合いのうち、最も劣悪な条件、すなわち白黒の差が少ない条件に基づくしきい値k1へと更新される。この結果、複数枚の被印刷用紙53のいずれに対しても、確実に黒マークPMの検出を高精度に行い、被印刷用紙53への印刷を確実に行うことができる。   In the present modification, as described above, the worst condition among the whiteness level and the blackness level detected by the paper detection sensor 35 for each of a plurality of printing papers 53, that is, a condition where the difference between black and white is small. Is updated to a threshold value k1 based on. As a result, the black mark PM can be reliably detected with high accuracy on any of the plurality of printing papers 53, and printing on the printing paper 53 can be reliably performed.

なお、上記変形例において、複数枚の被印刷用紙53をプラテンローラ11で順次搬送しつつ、用紙検出センサ35から上記実白対応電圧値Vw1,Vw1′,Vw1″及び実黒対応電圧値Vb,Vb′,Vb″が取得される際、CPU12がモータ駆動回路16を制御することによって、各被印刷用紙53ごとに搬送速度を互いに異なる値とするようにしてもよい(搬送速度設定手段としての機能)。この場合、以下のような効果がある。   In the modified example, the actual white corresponding voltage values Vw1, Vw1 ′, Vw1 ″ and the actual black corresponding voltage value Vb, from the sheet detection sensor 35 while sequentially transporting a plurality of printing sheets 53 by the platen roller 11. When Vb ′ and Vb ″ are acquired, the CPU 12 may control the motor drive circuit 16 so that the conveyance speeds of the respective printing papers 53 are different from each other (conveyance speed setting means) function). In this case, there are the following effects.

すなわち、搬送される被印刷用紙53の黒マークPMに対し発光及び受光を行って光学的に検出を行う場合、用紙検出センサ35から被印刷用紙53までの距離が、検出精度に影響を与える場合がある。上記の手法では、複数枚の被印刷用紙53それぞれについて用紙検出センサ35での検出時における搬送速度を互いに異ならせる。このように搬送速度が互いに異なると、搬送中における被印刷用紙53から用紙検出センサ35までの距離も互いに異なることとなり、言い換えれば、精度が互いに微妙に異なる複数回の検出を実施することができる。これにより、初期しきい値TH0に対し新規しきい値TH1への更新を行うときの、用紙検出センサ35の精度のばらつきの影響を低減し、さらに有効なしきい値の変更を行うことができる。   That is, when optical detection is performed by emitting and receiving light on the black mark PM of the conveyed printing paper 53, the distance from the paper detection sensor 35 to the printing paper 53 affects the detection accuracy. There is. In the above-described method, the conveyance speeds at the time of detection by the paper detection sensor 35 for each of the plurality of printing papers 53 are made different from each other. When the transport speeds are different from each other in this way, the distance from the printing paper 53 to the paper detection sensor 35 during the transport is also different from each other. In other words, a plurality of detections with slightly different accuracy can be performed. . As a result, it is possible to reduce the influence of variations in accuracy of the paper detection sensor 35 when updating the initial threshold value TH0 to the new threshold value TH1, and to further change the effective threshold value.

但し、必ずしも各被印刷用紙53に対する搬送速度を互いに変えなくても良く、搬送速度を等速にしたまま検出を行ってもよい。この場合でも、各被印刷用紙53において微妙に白色度が異なる場合(黄ばみムラ等)や微妙に黒色マークPMの黒色度が異なる場合(色あせムラ等)に対応することができる。   However, it is not always necessary to change the conveyance speed for each printing paper 53, and the detection may be performed while keeping the conveyance speed constant. Even in this case, it is possible to cope with a case where the whiteness is slightly different in each printing paper 53 (yellowing unevenness or the like) or a case where the blackness of the black mark PM is slightly different (fading unevenness or the like).

(2)受光器の出力電圧極性が逆の場合
上記実施形態においては、用紙検出センサ35の受光器35Bを構成するフォトトランジスタがコレクタ接地されていることにより(上記図5参照)、受光器35Bの受光量が大きいほど高いレベルの検出電圧値Vを出力していた。しかし、これに限られず、上記図5に対応する図14に示すように、受光器35Bのフォトトランジスタをエミッタ接地することで、受光器35Bの受光量が大きいほど低いレベルの検出電圧値Vを出力するようにしてもよい。
(2) When the output voltage polarity of the light receiver is reversed In the above embodiment, the phototransistor constituting the light receiver 35B of the paper detection sensor 35 is grounded to the collector (see FIG. 5 above), thereby receiving the light receiver 35B. The higher the received light amount, the higher the detected voltage value V. However, the present invention is not limited to this, and as shown in FIG. 14 corresponding to FIG. 5, the phototransistor of the light receiver 35B is grounded at the emitter, so that the detection voltage value V of a lower level is increased as the amount of light received by the light receiver 35B increases. You may make it output.

この場合、上記図7に対応する図15、上記図8(a)に対応する図16(a)、上記図8(b)に対応する図16(b)、にそれぞれ示すように、白色側と黒色側とで、検出電圧値Vの大小関係が逆の挙動になる。しかしながらこの場合も、前述と同様の式1及び式2を共通に用いて、前述と同様の手法で、初期しきい値TH0の新規しきい値TH1への更新を行うことができ、同様の効果を得ることができる。   In this case, as shown in FIG. 15 corresponding to FIG. 7, FIG. 16 (a) corresponding to FIG. 8 (a), and FIG. 16 (b) corresponding to FIG. On the black side, the magnitude relationship of the detected voltage value V is reversed. However, also in this case, the initial threshold value TH0 can be updated to the new threshold value TH1 by the same method as described above using the same formulas 1 and 2 as described above, and the same effect can be obtained. Can be obtained.

なお、以上において、図4、図5、図14の各図中に示す矢印は信号の流れの一例を示すものであり、信号の流れ方向を限定するものではない。   In addition, in the above, the arrow shown in each figure of FIG.4, FIG.5, FIG.14 shows an example of the flow of a signal, and does not limit the flow direction of a signal.

また、図9、図10、図11、図13等に示すフローチャートは本発明を上記フローに示す手順に限定するものではなく、発明の趣旨及び技術的思想を逸脱しない範囲内で手順の追加・削除又は順番の変更等をしてもよい。   In addition, the flowcharts shown in FIGS. 9, 10, 11, 13 and the like do not limit the present invention to the procedures shown in the above-described flow, and additional procedures can be added within the scope not departing from the spirit and technical idea of the invention. You may delete or change the order.

また、以上既に述べた以外にも、上記実施形態や各変形例による手法を適宜組み合わせて利用しても良い。   In addition to those already described above, the methods according to the above-described embodiments and modifications may be used in appropriate combination.

その他、一々例示はしないが、本発明は、その趣旨を逸脱しない範囲内において、種々の変更が加えられて実施されるものである。   In addition, although not illustrated one by one, the present invention is implemented with various modifications within a range not departing from the gist thereof.

1 携帯型プリンタ
104 挿入口
111 プラテンローラ(搬送手段)
112 サーマルラインヘッド(サーマルヘッド)
35 用紙検出センサ(光学センサ)
35A 投光器(投光手段)
35B 受光器(受光手段)
53 被印刷用紙
Lr 反射光
PM 黒マーク(位置決め用マーク)
1 Portable printer 104 Insertion slot 111 Platen roller (conveying means)
112 Thermal line head (thermal head)
35 Paper detection sensor (optical sensor)
35A Floodlight (lighting means)
35B Light receiver (light receiving means)
53 Paper to be printed Lr Reflected light PM Black mark (positioning mark)

Claims (4)

光吸収性の位置決め用マークを備えた被印刷用紙を搬送する搬送手段と、
前記搬送手段により搬送される前記被印刷用紙に対し、所望の印刷を行うサーマルヘッドと、
前記搬送手段により搬送される前記被印刷用紙の搬送経路に向かって投光可能な投光手段、及び、受光した光量に対応した検出電圧値を出力可能な受光手段、を備えた光学センサと、
前記受光手段による前記検出電圧に関して予め定められた所定の初期しきい値を記憶する初期値記憶手段と、
更新指示信号にしたがって、前記初期値記憶手段に記憶された前記初期しきい値に代えて新規しきい値を算出するしきい値更新手段と、
前記しきい値更新手段による前記新規しきい値の算出後の、前記受光手段の前記検出電圧値が前記新規しきい値に到達したことによって、前記位置決め用マークの検出を行うマーク検出手段と、
印刷指示信号の入力にしたがって、搬送を開始するように前記搬送手段を制御するとともに、前記マーク検出手段の検出結果に基づき前記搬送手段の搬送動作を制御する、印刷用搬送制御手段と、
前記マーク検出手段の検出結果に基づき、前記サーマルヘッドの印刷動作を制御する印刷制御手段と、
前記更新指示信号に応じて、前記被印刷用紙を所定距離だけ搬送するように前記搬送手段を制御する、更新用搬送制御手段と、
を有し、
前記初期しきい値は、
前記受光手段による前記検出電圧値の範囲に対応して予め定められた所定の初期白対応電圧値Vw0及び初期黒対応電圧値Vb0と、初期係数k0を用いて算出した値Vb0+k0(Vw0-Vb0);(但しk0は1未満の数)であり、
前記新規しきい値は、
前記更新用搬送制御手段の制御に基づき前記搬送手段が前記所定距離だけ前記被印刷用紙を搬送する間の、前記受光手段により出力された前記検出電圧値に基づいて取得される実白対応電圧値Vw1及び実黒対応電圧値Vb1と新たに設定される実係数k1とを用いて算出した値Vb1+k1(Vw1−Vb1)とするとともに、
前記更新用搬送制御手段は、
前記更新指示信号に応じて、複数枚の前記被印刷用紙に対応した前記所定距離を連続的に搬送するように前記搬送手段を制御し、
前記光学センサは、
前記連続的に搬送される複数枚の前記被印刷用紙それぞれに対し、前記投光手段が投光を行うと共に前記受光手段が検出電圧値を出力し、かつ、
前記更新用搬送制御手段の制御に基づき前記搬送手段が前記所定距離だけ前記複数の被印刷用紙を搬送する間に、前記複数の被印刷用紙それぞれに対応して前記受光手段から出力される複数の前記検出電圧値に基づき、前記複数の被印刷用紙の白色度合いの変動幅を検出する白色変動幅検出手段、及び、前記複数の被印刷用紙にそれぞれ設けられた複数の前記位置決め用マークの黒色度合いの変動幅を検出する黒色変動幅検出手段、を設け、
前記しきい値更新手段は、
前記白色変動幅検出手段により検出された白色度合いの変動幅と、前記黒色変動幅検出手段により検出された黒色度合いの変動幅と、のうち、変動幅の小さい側寄りにシフトするように、k1を設定し、かつ、
当該変動幅に応じて設定されたk1と、前記複数枚の被印刷用紙に関して前記受光手段より出力された前記複数の検出電圧値のうち白色度合いが最も低い印刷用紙に係わる検出電圧値と、前記複数枚の被印刷用紙の前記位置決めマークに関して前記受光手段により出力された前記複数の検出電圧値のうち黒色度合いが最も低いと位置決め用マークに係わる検出電圧値とに基づき、前記新規しきい値の算出を行う
ことを特徴とするプリンタ。
Transport means for transporting a printing paper provided with a light-absorbing positioning mark;
A thermal head for performing desired printing on the printing paper conveyed by the conveying means;
An optical sensor including a light projecting unit capable of projecting light toward a transport path of the printing paper transported by the transport unit, and a light receiving unit capable of outputting a detection voltage value corresponding to the received light amount;
An initial value storage means for storing a predetermined initial threshold value predetermined with respect to the detection voltage by the light receiving means;
Threshold value updating means for calculating a new threshold value instead of the initial threshold value stored in the initial value storage means in accordance with an update instruction signal;
Mark detection means for detecting the positioning mark when the detection voltage value of the light receiving means reaches the new threshold after the calculation of the new threshold by the threshold update means;
A conveyance control unit for printing that controls the conveyance unit to start conveyance according to an input of a print instruction signal, and controls a conveyance operation of the conveyance unit based on a detection result of the mark detection unit;
Print control means for controlling the printing operation of the thermal head based on the detection result of the mark detection means;
An update conveyance control means for controlling the conveyance means to convey the printing paper for a predetermined distance in response to the update instruction signal;
Have
The initial threshold is
A value Vb0 + k0 (Vw0−Vb0) calculated using a predetermined initial white corresponding voltage value Vw0 and an initial black corresponding voltage value Vb0, which are determined in advance corresponding to the range of the detection voltage value by the light receiving means, and an initial coefficient k0. (Where k0 is a number less than 1),
The new threshold is
An actual white corresponding voltage value acquired based on the detected voltage value output by the light receiving unit while the transport unit transports the printing paper by the predetermined distance based on the control of the update transport control unit. with the calculated value Vb1 + k1 (Vw1-Vb1) by using the real coefficients k1 to be newly set as Vw1 and true black voltage value Vb1,
The update transport control means includes:
In response to the update instruction signal, the conveying means is controlled to continuously convey the predetermined distance corresponding to the plurality of sheets to be printed,
The optical sensor is
For each of the plurality of sheets to be printed continuously conveyed, the light projecting unit performs light projection and the light receiving unit outputs a detection voltage value, and
While the transport unit transports the plurality of print sheets by the predetermined distance based on the control of the update transport control unit, a plurality of light output from the light receiving unit corresponding to each of the plurality of print sheets. Based on the detected voltage value, a white variation width detecting means for detecting a variation range of the whiteness degree of the plurality of printing papers, and a blackness degree of the positioning marks provided on the plurality of printing papers, respectively. Black fluctuation range detecting means for detecting the fluctuation range of
The threshold update means includes
Of the fluctuation range of the white degree detected by the white fluctuation range detection unit and the fluctuation range of the black degree detected by the black variation range detection unit, k1 is shifted so as to shift to the side where the fluctuation range is smaller. And
K1 set according to the fluctuation range, a detection voltage value relating to a printing paper having the lowest whiteness among the plurality of detection voltage values outputted from the light receiving unit with respect to the plurality of printing papers, When the blackness is the lowest among the plurality of detection voltage values output by the light receiving means with respect to the positioning marks of a plurality of sheets of printing paper, the new threshold value is determined based on the detection voltage value related to the positioning marks. A printer characterized by performing a calculation .
請求項1記載のプリンタにおいて、
前記更新用搬送制御手段の制御に基づき前記搬送手段が前記所定距離だけ前記被印刷用紙を搬送する間の前記受光手段による前記検出電圧値に基づき、前記被印刷用紙の白色度合いが、所定の白色基準に達しているかどうかを判定する白色度判定手段を有し、
前記しきい値更新手段は、
前記白色度判定手段により前記被印刷用紙の白色度合いが所定の白色基準に達していないと判定された場合、k1をk0より小さな値に設定する
ことを特徴とするプリンタ。
The printer according to claim 1.
Based on the detection voltage value by the light receiving unit while the conveyance unit conveys the printing paper by the predetermined distance based on the control of the update conveyance control unit, the whiteness degree of the printing paper is predetermined white Having whiteness determination means for determining whether or not the reference is reached,
The threshold update means includes
The printer, wherein when the whiteness determination means determines that the whiteness of the printing paper does not reach a predetermined whiteness standard, k1 is set to a value smaller than k0.
請求項1記載のプリンタにおいて、
前記更新用搬送制御手段の制御に基づき前記搬送手段が前記所定距離だけ前記被印刷用紙を搬送する間の前記受光手段による前記検出電圧値に基づき、前記位置決め用マークの黒色度合いが、所定の黒色基準に達しているかどうかを判定する黒色度判定手段を有し、
前記しきい値更新手段は、
前記黒色度判定手段により、前記位置決め用マークの黒色度合いが所定の黒色基準に達していないと判定された場合、k1をk0より大きな値に設定する
ことを特徴とするプリンタ。
The printer according to claim 1.
Based on the detection voltage value by the light receiving means while the conveyance means conveys the printing paper for the predetermined distance based on the control of the update conveyance control means, the degree of blackness of the positioning mark is predetermined black It has a blackness determination means for determining whether or not the standard has been reached,
The threshold update means includes
The printer according to claim 1, wherein when the blackness determination means determines that the blackness of the positioning mark does not reach a predetermined black reference, k1 is set to a value larger than k0.
請求項記載のプリンタにおいて、
前記更新用搬送制御手段は、
複数枚の前記被印刷用紙を連続的に搬送するときに、各被印刷用紙ごとに搬送速度が互いに異なった値となるように前記搬送手段を制御する、搬送速度設定手段を備える
ことを特徴とするプリンタ。
The printer according to claim 1 .
The update transport control means includes:
And a conveyance speed setting unit that controls the conveyance unit so that the conveyance speeds of the respective printing papers are different from each other when the plural printing papers are continuously conveyed. Printer.
JP2010170635A 2010-07-29 2010-07-29 Printer Active JP5500372B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010170635A JP5500372B2 (en) 2010-07-29 2010-07-29 Printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010170635A JP5500372B2 (en) 2010-07-29 2010-07-29 Printer

Publications (2)

Publication Number Publication Date
JP2012030435A JP2012030435A (en) 2012-02-16
JP5500372B2 true JP5500372B2 (en) 2014-05-21

Family

ID=45844469

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010170635A Active JP5500372B2 (en) 2010-07-29 2010-07-29 Printer

Country Status (1)

Country Link
JP (1) JP5500372B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6174407B2 (en) 2013-07-24 2017-08-02 富士通コンポーネント株式会社 Printing apparatus and mark detection method
JP6425034B2 (en) 2015-09-18 2018-11-21 ブラザー工業株式会社 Portable printer

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09322127A (en) * 1996-05-28 1997-12-12 Sanyo Electric Co Ltd Decision circuit for edtv-ii identification signal
JP2000061893A (en) * 1998-08-21 2000-02-29 Toshiba Corp Ticket issuing device and ticket issuing method
JP2008120583A (en) * 2006-11-15 2008-05-29 Oki Electric Ind Co Ltd Ticketing device and its ticketing method

Also Published As

Publication number Publication date
JP2012030435A (en) 2012-02-16

Similar Documents

Publication Publication Date Title
JP5372037B2 (en) Printing method and printing apparatus
JP2011178147A (en) Label producing apparatus and method of producing label
JP2007091467A (en) Recording apparatus and control method
US8757790B2 (en) Printing apparatus
JP5067081B2 (en) Liquid ejection device
JP5982938B2 (en) Image forming apparatus and medium edge determination method
JP6000194B2 (en) Sheet detection apparatus and image forming apparatus
JP5500372B2 (en) Printer
JP2008132613A (en) Image recorder and image recording method
JP2006038639A (en) End position detection device, method and program
JP7077532B2 (en) Printing device and control method of printing device
US9592982B2 (en) Medium detection mechanism, medium detection method, and printing apparatus
JP5668280B2 (en) Printing apparatus and edge detection method of printing medium
JP2010235217A (en) Image recorder
JP2010058889A (en) Paper size detection device
JP2003254721A (en) Device for discriminating printing sheet, printer, computer program, computer system, and method of discriminating printing sheet
JP2008238606A (en) Printer
US6428131B1 (en) Image forming apparatus determining presence/absence of ink while moving ink cartridge
JP2006231871A (en) Liquid jet apparatus, controlling method and program
JP2012091929A (en) Printer
JP2006346988A (en) Printing apparatus and control method for the same
JP4248439B2 (en) Paper edge detection device and printer using the same
JP3089578U (en) Inkjet printer
JP2020199711A (en) Image formation device and timing adjustment method
JP2012062184A (en) Medium processing device and method of controlling the same

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20130226

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131115

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131119

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140120

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140226

R150 Certificate of patent or registration of utility model

Ref document number: 5500372

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150