Printer, program, and control method

The thermal printer addresses the challenge of distinguishing between thermal heads with different heating element counts by using a shift register and latch driver to output specific energization signals and measuring current parameters, enabling accurate identification and operation.

JP2025083612APending Publication Date: 2025-06-02BROTHER KOGYO KK
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023197057
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2025-06-02

AI Technical Summary

Technical Problem

Existing thermal printers cannot accurately discriminate between thermal heads with the same number of stages in the shift register but different numbers of heating elements.

Method used

The printer includes a shift register with M stages and a latch driver that outputs energization signals based on serial data. A control portion manages the output of signals to the thermal head, and a detection portion measures parameters related to the current flowing through the thermal head to differentiate between thermal heads with N1 and N2 heating elements.

Benefits of technology

This solution allows the printer to effectively discriminate between thermal heads with different numbers of heating elements, even when they have the same number of stages in the shift register, ensuring accurate identification and operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025083612000001_ABST
    Figure 2025083612000001_ABST
Patent Text Reader

Abstract

To provide a printer, a program, and a control method capable of determining a thermal head with the same number of stages of shift registers but different number of heating elements.SOLUTION: A mounting part of a printer is provided in a case, and a first thermal head 6A or a second thermal head 6B, which is a thermal head 6, is detachable and attachable. The thermal head 6 has M-stages (M=320) of shift registers 61, a latch driver 62, and a plurality of heater elements 9. The first thermal head 6A has 300 heating elements 9 and the second thermal head 6B has 203 heating elements 9. The printer's CPU sequentially outputs corresponding energization signals from the latch driver 62 for each stage relating to an area DI1 in the shift registers 61, starting from the first stage. The CPU determines a type of the thermal head 6 on the basis of a digital value output by a voltage detection circuit when the energization signals are being output.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a printer, a program, and a control method.

Background Art

[0002] Patent Document 1 discloses a thermal printer that detects the number of elements of a thermal head. The thermal printer of Patent Document 1 includes a thermal head, a shift register, an element number detection data generation unit, and an element number count unit. The shift register includes n stages of FFs (flip-flops). The FFs are cascade-connected by the same number as the number of elements of the thermal head. The element number detection data generation unit transmits element number detection data to the shift register in synchronization with a clock signal. The shift register inputs an output signal from the output terminal of the last-stage FF to the data input terminal of the element number count unit. The element number count unit detects the number of elements by capturing the output signal.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] In the thermal printer of Patent Document 1, on the premise that the number of FFs in the shift register is the same as the number of elements of the thermal head, the number of FFs in the shift register is regarded as the number of elements of the thermal head. Therefore, a thermal head with a different number of FFs and the number of elements of the thermal head cannot be discriminated.

[0005] An object of the present invention is to provide a printer, a program, and a control method capable of discriminating a thermal head in which the number of stages of a shift register is the same and the number of heating elements is different.

Means for Solving the Problems

[0006] The printer according to the first aspect of the present invention includes a housing, a plurality of heating elements, an M-stage (M is a natural number) shift register that shifts serial data by a clock signal, and a latch driver that temporarily holds the serial data by a latch signal and outputs an energization signal for causing the heating element corresponding to each stage of the shift register to generate heat based on the serial data held in response to a strobe signal. The thermal head has either a first thermal head in which the number of heating elements is N1 (N1 is a natural number of 2 or more, N1 ≦ M) or a second thermal head in which the number of heating elements is N2 (N2 is a natural number of 2 or more, N2 < N1), and either one of them is detachably attachable. A mounting portion provided on the housing, and a control portion that outputs the serial data, the clock signal, the latch signal, and the strobe signal to the thermal head mounted on the mounting portion to control the energization signal, and a detection portion that detects a parameter corresponding to a current value flowing through the thermal head to generate heat. In the printer, the control portion includes a first output process of causing the latch driver to output the corresponding energization signal one by one from the first stage of the first predetermined region including at least one stage between the (N2 + 1)-th stage and the N1-th stage in the shift register, and a discrimination process of discriminating the type of the thermal head mounted on the mounting portion based on the parameter detected by the detection portion when the energization signal is output in order by the first output process.

[0007] According to the printer according to the first aspect, the parameter detected by the detection portion when the energization signal is output in order by the first output process is different between the case where the first thermal head is mounted on the mounting portion and the case where the second thermal head is mounted on the mounting portion. Therefore, the printer can discriminate between the first thermal head and the second thermal head having the same number of stages in the shift register and different numbers of heating elements.

[0008] The program according to the second aspect of the present invention is a thermal head having a housing, a plurality of heating elements, an M-stage (M is a natural number) shift register that shifts serial data by a clock signal, and a latch driver that temporarily holds the serial data by a latch signal and outputs an energization signal for causing the heating element corresponding to each stage of the shift register to generate heat based on the serial data held in response to a strobe signal. The thermal head is selectively detachable, either a first thermal head having N1 heating elements (N1 is a natural number of 2 or more, N1≦M) or a second thermal head having N2 heating elements (N2 is a natural number of 2 or more, N2<N1). A mounting portion provided on the housing, and a control unit that outputs the serial data, the clock signal, the latch signal, and the strobe signal to the thermal head mounted on the mounting portion to control the energization signal, and a detection unit that detects a parameter corresponding to a current value flowing through the thermal head to generate heat in the heating element. A program for causing a computer to execute to control a printer, comprising: a first output step of causing the latch driver to output the corresponding energization signal one by one from the first stage of the first predetermined region for at least one stage among the stages from the (N2 + 1)-th stage to the N1-th stage in the shift register; and a discrimination step of discriminating the type of the thermal head mounted on the mounting portion based on the parameter detected by the detection unit when the energization signal is output in order by the first output step.

[0009] The control method according to the third aspect of the present invention is a thermal head having a housing, a plurality of heating elements, an M-stage (M is a natural number) shift register that shifts serial data by a clock signal, and a latch driver that temporarily holds the serial data by a latch signal and outputs an energization signal for causing the heating elements corresponding to the respective stages of the shift register to generate heat based on the serial data held in response to a strobe signal. The thermal head is selectively detachable, either a first thermal head having N1 heating elements (N1 is a natural number of 2 or more, N1≦M) or a second thermal head having N2 heating elements (N2 is a natural number of 2 or more, N2<N1). A mounting portion provided on the housing, and a control unit that outputs the serial data, the clock signal, the latch signal, and the strobe signal to the thermal head mounted on the mounting portion to control the energization signal, and a detection unit that detects a parameter corresponding to a current value flowing through the thermal head to generate heat in the heating element. A control method for a printer, comprising: a first output step of causing the latch driver to output the energization signal corresponding to each first stage of a first predetermined region including at least one stage between the (N2 + 1)-th stage and the N1-th stage in the shift register; and a determination step of determining the type of the thermal head mounted on the mounting portion based on the parameter detected by the detection unit when the energization signal is output in order by the first output step.

[0010] The program according to the second aspect and the control method according to the third aspect have the same effects as the printer according to the first aspect.

Brief Description of the Drawings

[0011]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Mode for Carrying Out the Invention

[0012] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The drawings used are for explaining the technical features that the present invention can adopt. That is, the configurations and the like shown in the drawings are not intended to be limited thereto, but are merely illustrative examples.

[0013] <External Configuration of Printer 1> Referring to FIG. 1, the external configuration of the printer 1 will be described. Hereinafter, the upper left, lower right, lower left, upper right, upper, and lower parts of FIG. 1 will be referred to as the left, right, front, rear, upper, and lower sides of the printer 1, respectively. In this embodiment, for example, the vertical direction is used for convenience of explanation and is not limited to the vertical direction.

[0014] The printer 1 shown in FIG. 1 is a thermal printer that performs printing on a long tape (not shown). The printer 1 has a housing 2. The housing 2 houses a roll (not shown) around which the tape is wound inside. The housing 2 consists of a main body 21 and a cover 22. The main body 21 is in the shape of a substantially rectangular parallelepiped box extending in the front-rear direction and forms the lower part of the housing 2. The main body 21 is open upward (see FIG. 2).

[0015] The cover 22 is in the shape of a substantially rectangular parallelepiped box extending in the front-rear direction and forms the upper part of the housing 2. The cover 22 is rotatable about an axis extending in the left-right direction at the rear upper end of the main body 21. The cover 22 covers the opening of the main body 21 from above in the closed state (see FIG. 1) and opens the opening of the main body 21 upward in the open state (see FIG. 2). An input unit 15 and a display unit 16 are provided at the upper end of the cover 22. The input unit 15 receives inputs of various information, various instructions, etc. and outputs them to the CPU 30 described later. The display unit 16 displays various screens based on instructions input from the CPU 30.

[0016] A discharge port 24 is formed at the front end of the housing 2. The discharge port 24 is a gap between the front wall of the main body 21 and the front wall of the cover 22 and extends in the left-right direction. The printed tape is discharged from the housing 2 through the discharge port 24.

[0017] <Internal Structure of Printer 1> Referring to FIG. 2, the internal structure of the printer 1 will be described. Inside the main body 21, a support mechanism 10 and a platen roller 5 are accommodated. The support mechanism 10 supports a roll around which the tape is wound. The rear end of the support mechanism 10 is at substantially the same position as the rear end of the main body 21. The front end of the support mechanism 10 is disposed between the front end of the main body 21 and the central portion of the main body 21 in the front-rear direction. The support mechanism 10 has a left support portion 11 and a right support portion 12. The left support portion 11 supports the roll from the left side. The right support portion 12 is located to the right of the left support portion 11 and supports the roll from the right side.

[0018] The platen roller 5 is provided at the front upper end of the main body 21. The platen roller 5 is disposed between the front end of the main body 21 and the front end of the support mechanism 10 in the front-rear direction. The platen roller 5 is a cylinder having an axis extending in the left-right direction and is rotatably provided on the main body 21 around the axis. The platen roller 5 rotates by the drive of a conveyance motor 53 (see FIG. 3) described later and conveys the tape forward.

[0019] At the lower end of the cover 22, a mounting portion 25 is provided. The mounting portion 25 is detachable from the thermal head 6. The thermal head 6 is plate-shaped and extends in the left-right direction, and is mounted on the mounting portion 25 from below. Although the configuration of the thermal head 6 will be described later, it has a plurality of heating elements 9 (see FIG. 4). The printer 1 performs printing on the tape by selectively heating the plurality of heating elements 9 of the thermal head 6.

[0020] <Electrical Configuration of Printer 1> Referring to FIG. 3, the electrical configuration of the printer 1 will be described. The printer 1 includes a CPU 30, a ROM 31, a RAM 32, a storage device 33, a power supply circuit 41, a head detection circuit 42, an AD converter 45, and drive circuits 51 and 52.

[0021] The CPU 30 controls the printer 1 overall. The ROM 31 stores a table 91 (see FIG. 8) and various setting information to be described later. The RAM 32 temporarily stores various information. The storage device 33 is non-volatile and stores a control program and the like for executing a main process (see FIG. 9) to be described later. The CPU 30 is connected to the ROM 31, the RAM 32, the storage device 33, the power supply circuit 41, the head detection circuit 42, the AD converter 45, the thermal head 6, and the drive circuits 51 and 52 by communication lines and communicates with each of them. Detailed descriptions of the power supply circuit 41, the head detection circuit 42, the AD converter 45, and the thermal head 6 will be given later.

[0022] The drive circuit 51 is connected to the conveyance motor 53. The conveyance motor 53 is, for example, a stepping motor. The drive circuit 51 controls the drive of the conveyance motor 53 according to an instruction input from the CPU 30. The drive circuit 52 is connected to the display unit 16. The drive circuit 52 controls the display of the display unit 16 according to an instruction input from the CPU 30.

[0023] <Drive Circuit for Thermal Head 6> Referring to FIG. 4, a drive circuit for controlling the drive of the thermal head 6 will be described. The drive circuit of the thermal head 6 includes a power supply circuit 41, a head detection circuit 42, and a voltage detection circuit 43. The power supply circuit 41 and the head detection circuit 42 are connected to the power supply 20 of the printer 1 by a power supply line. In FIGS. 4 to 6, the power supply line is shown as a thick line, and the signal line is shown as a thin line arrow.

[0024] The power supply circuit 41 is connected to the SWVHON terminal of the CPU 30 by a signal line. The power supply circuit 41 is connected to the thermal head 6 by a power supply line via a harness 60. The power supply circuit 41 controls printing by the thermal head 6 based on an instruction from the CPU 30.

[0025] The head detection circuit 42 is connected to the SWHEAD terminal of the CPU 30 by a signal line. The head detection circuit 42 is connected to the thermal head 6 by a power supply line via a harness 60. The head detection circuit 42 includes a voltage dividing resistor (not shown) having an electrical resistance of a predetermined ratio with respect to the electrical resistance of the heating element 9 described later. The head detection circuit 42 controls the thermal head 6 in the main process described later. Power is selectively supplied from the power supply 20 to the power supply circuit 41 and the head detection circuit 42 by a switch signal input from the SWVHON terminal or the SWHEAD terminal of the CPU 30.

[0026] The voltage detection circuit 43 includes a voltage dividing circuit 44 and an AD converter 45. The voltage dividing circuit 44 has three contacts. The first contact of the voltage dividing circuit 44 is connected to the power supply line connecting the power supply circuit 41 and the head detection circuit 42 to the harness 60. The second contact of the voltage dividing circuit 44 is grounded. The third contact of the voltage dividing circuit 44 is connected to the AD converter 45.

[0027] The AD converter 45 is connected to the READ terminal of the CPU 30 by a signal line. The AD converter 45 outputs a digital value corresponding to the voltage at the third contact of the voltage dividing circuit 44. The voltage at the third contact of the voltage dividing circuit 44 changes according to the resistance value of the thermal head 6. That is, the voltage detection circuit 43 detects the voltage at the third contact of the voltage dividing circuit 44 that changes according to the current value flowing when a voltage is applied to the thermal head 6 by the power supply 20, and outputs it to the CPU 30 by the AD converter 45.

[0028] <Thermal head 6> Referring to FIGS. 4 to 6, the configuration of the thermal head 6 will be described. As shown in FIG. 4, the thermal head 6 has a plurality of heating elements 9, a plurality of transistors 8, a shift register 61, and a latch driver 62.

[0029] The plurality of heating elements 9 are arranged in the left-right direction of the printer 1 in the thermal head 6 mounted on the mounting portion 25. That is, the plurality of heating elements 9 are arranged orthogonal to the tape conveyance direction. The number of heating elements 9 defines the resolution of the image printed on the tape. One end of each heating element 9 is connected to the power supply circuit 41 and the head detection circuit 42 via a harness 60. The heating element 9 generates heat by the power supplied from the power supply 20. Hereinafter, the k-th (k is a natural number) heating element 9 is denoted as heating element 9(k).

[0030] The collectors of the plurality of transistors 8 are respectively connected to the other ends of the plurality of heating elements 9. Hereinafter, the k-th transistor 8 is denoted as transistor 8(k). The transistor 8(k) is connected to the heating element 9(k). The emitter of each transistor 8 is grounded. That is, the emitter of the transistor 8 is at the same potential as the second contact of the voltage dividing circuit 44. The base of the transistor 8 is respectively connected to the signal output terminals of the latch driver 62 described later.

[0031] As shown in FIGS. 5 and 6, the shift register 61 includes M stages of flip-flops 7. In this embodiment, M = 320. Hereinafter, the flip-flop 7 is referred to as FF7, and the M-th stage FF7 is denoted as FF7(M). Each of FF7(1) to FF7(M) includes an input terminal DI to which serial data as print data is input, a clock signal input terminal CLK synchronized with the serial data, and a signal output terminal that outputs serial data to the latch driver 62.

[0032] In the shift register 61, the input terminal DI of FF7(1) is connected to the serial data output terminal DO of the CPU 30. The M FF7s are sequentially connected such that the output terminal DO of FF7(1) and the input terminal DI of FF7(2) are connected. The input terminal CLK of each of FF7(1) to FF7(M) is connected to the clock signal output terminal CLK of the CPU 30. The signal output terminals of FF7(1) to FF7(M) are respectively connected to a plurality of base terminals of the latch driver 62 described later. The shift register 61 shifts the serial data input from the CPU 30 from the first stage to the M-th stage in synchronization with the clock signal input from the CPU 30.

[0033] The latch driver 62 includes an input terminal STB to which a strobe signal is input, an input terminal LAT to which a latch signal is input, a plurality of base terminals, and a plurality of signal output terminals. The input terminal STB of the latch driver 62 is connected to the strobe signal output terminal STB of the CPU 30. The input terminal LAT of the latch driver 62 is connected to the output terminal LAT that outputs the latch signal of the CPU 30. The k-th base terminal of the latch driver 62 is connected to the signal output terminal of FF7(k). The k-th signal output terminal of the latch driver 62 is connected to the base of the k-th transistor 8.

[0034] The latch driver 62 temporarily holds the serial data output from the signal output terminal of the shift register 61 in response to the latch signal input from the CPU 30. While the latch driver 62 is receiving the strobe signal input from the CPU 30, it outputs an energization signal to the base of the transistor 8 from the signal output terminal corresponding to "1" of the held serial data. Hereinafter, outputting a communication signal from the signal output terminal of the latch driver 62 corresponding to the k-th stage (FF7(k)) of the shift register 61 is referred to as outputting a communication signal based on the k-th stage of the shift register 61.

[0035] <Print control of tape> When printing on the tape, the CPU 30 outputs a clock signal to each of the FF7s of the shift register 61. The CPU 30 outputs serial data indicating the print data for one line to the FF7(1) of the shift register 61 in synchronization with the clock signal. The shift register 61 shifts the serial data from the first stage to the M-th stage in synchronization with the clock signal. A line in printing indicates a unit of data or an image corresponding to the row of the heating elements 9 of the thermal head 6.

[0036] When the output of the serial data for one line by the CPU 30 is completed, it outputs a latch signal to the latch driver 62. The latch driver 62 temporarily holds the serial data output from the signal output terminal of the shift register 61 in response to the latch signal. At this time, the next serial data is input to the shift register 61.

[0037] When the latch driver 62 temporarily holds the print data for one line, the CPU 30 outputs a strobe signal to the latch driver 62. While receiving the strobe signal, the latch driver 62 turns on the transistor 8 corresponding to the heating element 9 to be energized based on the print data for one line held. The heating element 9 corresponding to the print data generates heat, and printing based on the print data for one line is performed on the tape. The tape is conveyed by one line by the platen roller 5. Repeating the printing for one line and the conveyance for one line, the tape is printed.

[0038] <First thermal head 6A and second thermal head 6B> As shown in FIGS. 5 and 6, there are two types of thermal heads 6 mounted on the mounting portion 25 (see FIG. 2), namely, a first thermal head 6A (see FIG. 5) and a second thermal head 6B (see FIG. 6). The first thermal head 6A and the second thermal head 6B have the same configuration of the shift register 61 and the latch driver 62, but the number of heating elements 9 and the number of transistors 8 connected to the heating elements 9 are different from each other.

[0039] As shown in FIG. 5, the first thermal head 6A has 300 heating elements 9 and a resolution of 300 dpi. The first stage to the 300th stage (FF7(1) to FF(300)) of the shift register 61 respectively correspond to the heating elements 9(1) to 9(300). Since the number of stages M (=320) of the shift register 61 is larger than the number of heating elements 9 (=300) of the first thermal head 6A, the 301st stage to the Mth stage of the shift register 61 do not correspond to the heating elements 9.

[0040] As shown in FIG. 6, the second thermal head 6B has 203 heating elements 9 and a resolution of 203 dpi. The first stage to the 203rd stage of the shift register 61 respectively correspond to the heating elements 9(1) to 9(203). The 204th stage to the Mth stage of the shift register 61 do not correspond to the heating elements 9. In this embodiment, the number of stages M of the shift register of the first thermal head 6A is the same as the number of stages M of the shift register 61 of the second thermal head 6B (M = 320). However, it is not always necessary for the number of stages of the shift register of the first thermal head 6A and the number of stages of the shift register of the second thermal head 6B to be the same. It is only necessary to have a number of stages that can ensure the discrimination area DI1 (described later) used to discriminate between the first thermal head 6A and the second thermal head 6B and the discrimination area DI2 (described later) used to determine whether the thermal head 6 is mounted on the mounting portion 25. The number of stages of the shift register of the first thermal head 6A and the number of stages of the shift register of the second thermal head 6B may be different. For example, a combination where the number of stages of the shift register of the first thermal head 6A is 400 stages and the number of stages of the shift register of the second thermal head 6B is 500 stages may be used.

[0041] <Discrimination of the type of the thermal head 6 mounted on the mounting portion 25> Referring to FIG. 7, the discrimination of the type of the thermal head 6 mounted on the mounting portion 25 will be described. In the first thermal head 6A, each stage from the 204th stage to the 300th stage of the shift register 61 corresponds to the heating element 9. On the other hand, in the second thermal head 6B, each stage from the 204th stage to the 300th stage of the shift register 61 does not correspond to the heating element 9. Hereinafter, the area of the shift register 61 including at least one stage between the 204th stage and the 300th stage is referred to as the area DI1.

[0042] In this embodiment, the region DI1 ranges from the 211st stage to the 290th stage. In the first thermal head 6A, all the stages included in the region DI1 correspond to the heating elements 9, while in the second thermal head 6B, all the stages included in the region DI1 do not correspond to the heating elements 9. Therefore, when an energization signal is output based on any one of the stages of the shift register 61 included in the region DI1, if the first thermal head 6A is mounted on the mounting portion 25, the heating element 9 and the voltage dividing circuit 44 are energized, and if the second thermal head 6B is mounted on the mounting portion 25, only the voltage dividing circuit 44 is energized. Thus, the digital value output by the AD converter 45 (see FIG. 4) of the voltage detection circuit 43 is different when the first thermal head 6A is mounted on the mounting portion 25 and when the second thermal head 6B is mounted on the mounting portion 25.

[0043] The CPU 30 acquires a plurality of digital values when an energization signal is output based on the stages of the shift register 61 included in the region DI1, and determines the type of the thermal head 6 mounted on the mounting portion 25 based on the average value of the acquired digital values. In this embodiment, the CPU 30 determines based on the average value of the 16 digital values output from the AD converter 45.

[0044] The table 91 (see FIG. 8) stored in the ROM 31 stores the first range. The first range is the range of the threshold value of the average value of the digital values when an energization signal is output based on the stages included in the region DI1 of the shift register 61, and corresponds to the type of the thermal head 6. The CPU 30 determines the type of the thermal head 6 by comparing the average value of the digital values with the first range. When the average value of the digital values in the region DI1 is outside all of the first ranges set for each thermal head 6, the CPU 30 reports an error by determining that the type of the thermal head 6 cannot be determined.

[0045] <Determination as to whether the thermal head 6 is mounted on the mounting portion 25> Referring to FIG. 7, the determination as to whether the thermal head 6 is mounted on the mounting portion 25 will be described. For the CPU 30, each stage from the 1st stage to the 203rd stage of the shift register 61 of the first thermal head 6A and the second thermal head 6B corresponds to the heating element 9. Hereinafter, the region of the shift register 61 composed of the stages between the 1st stage and the 203rd stage is referred to as region DI2.

[0046] In the present embodiment, region DI2 is from the 11th stage to the 110th stage. When an energization signal is output based on any one stage of the shift register 61 included in region DI2, the digital value output by the AD converter 45 becomes a value corresponding to the type of the thermal head 6.

[0047] The table 91 (see FIG. 8) stored in the ROM 31 stores the second range. The second range is the range of the threshold value of the average value of the digital values when the energization signal is output based on the stages included in region DI2 of the shift register 61, and corresponds to the type of the thermal head 6. After discriminating the type of the thermal head 6, the CPU 30 discriminates whether the thermal head 6 is mounted on the mounting portion 25 by comparing the average value of the digital values with the second range. When the average value of the digital values in region DI2 is out of the second range corresponding to the type of the thermal head 6 discriminated, the CPU 30 reports an error assuming that the thermal head 6 is not mounted on the mounting portion 25.

[0048] <Main Process> Referring to FIGS. 9 and 10, the main process executed by the CPU 30 will be described. The main process is a process for discriminating the type of the thermal head 6 and determining whether the thermal head 6 is mounted on the mounting portion 25. The program of the main process is read from the ROM 31 when the input unit 15 receives an execution instruction for the main process. Thereby, the CPU 30 starts the main process. The variable i used in the main process is stored in the RAM 32 and corresponds to the i-th stage (FF7(i)) of the shift register 61.

[0049] When the main process starts, the CPU 30 outputs a switch signal from the SWHEAD terminal and supplies power from the power supply 20 to the head detection circuit 42 (S1). In the main process, the thermal head 6 is supplied with power from the power supply 20 via the head detection circuit 42.

[0050] The CPU 30 sets the value of the variable i to 211 (S2). The 211st stage of the shift register 61 is the first stage of the area DI1. The CPU 30 outputs an energization signal based on the i-th stage of the shift register 61 (S3). Specifically, the CPU 30 generates serial data for one line in which the value of the i-th stage is "1" and the values of the stages other than the i-th stage are "0". The CPU 30 outputs a clock signal to each of the FFs 7 of the shift register 61 and outputs the serial data to the FF 7(1) of the shift register 61 in synchronization with the clock signal. When the output of the serial data for one line is completed, the CPU 30 outputs a latch signal to the latch driver 62. The serial data output from the signal output terminal of the shift register 61 is temporarily held by the latch driver 62. The CPU 30 outputs a strobe signal to the latch driver 62. While receiving the strobe signal, the latch driver 62 outputs an energization signal from the i-th signal output terminal of the latch driver 62 that holds "1" of the serial data. The latch driver 62 does not output an energization signal from the signal output terminals other than the i-th of the latch driver 62 that holds "0" of the serial data.

[0051] When the energization signal is being output based on the i-th stage of the shift register 61, the CPU 30 acquires the digital value output by the AD converter 45 of the voltage detection circuit 43 and stores it in the RAM 32 (S4). The CPU 30 determines whether the value of the variable i is 290 (S5). The 290th stage of the shift register 61 is the last stage of the area DI1. In other words, in S5, it is determined whether the energization signal has been output from the first stage to the last stage in the area DI1 of the shift register 61 and the digital value at each stage has been stored in the RAM 32. If the CPU 30 determines that the value of the variable i is not 290 (S5: NO), it increments the value of the variable i by 1 (S6) and returns the process to S3.

[0052] When the CPU 30 determines that the value of the variable i is 290 (S5: YES), assuming that the output of the energization signal for the stages included in the area DI1 of the shift register 61 is completed, the value of the variable i is set to 11 (S7). The 11th stage of the shift register 61 is the first stage of the area DI2. The CPU 30 outputs an energization signal based on the i-th stage of the shift register 61 (S8). S8 is the same process as S3. When the energization signal is being output based on the i-th stage of the shift register 61, the CPU 30 acquires the digital value output by the AD converter 45 of the voltage detection circuit 43 and stores it in the RAM 32 (S9). S9 is the same process as S4.

[0053] The CPU 30 determines whether the value of the variable i is 110 (S10). The 110th stage of the shift register 61 is the last stage of the area DI2. In other words, in S10, it is determined whether the energization signal has been output from the first stage to the last stage in the area DI2 of the shift register 61 and the digital value at each stage has been stored in the RAM 32. When the CPU 30 determines that the value of the variable i is not 110 (S10: NO), it increments the value of the variable i by 1 (S11) and returns the process to S8. When the CPU 30 determines that the value of the variable i is 110 (S10: YES), assuming that the output of the energization signal for the stages included in the area DI2 of the shift register 61 is completed, the process proceeds to S21 (see FIG. 10).

[0054] As shown in FIG. 10, the CPU 30 calculates the average value of the digital values of the AD converter 45 when the output signal is output based on the stages included in the area DI1 of the shift register 61 stored in the RAM 32 in the process of S4 (see FIG. 9) (S21). In the process of S21, the CPU 30 calculates the average value of 16 digital values randomly extracted from the digital values stored in the RAM 32 in the process of S4. Hereinafter, the average value of the digital values calculated in the process of S21 is referred to as the first average value.

[0055] When the output signal is output based on the stage included in the area DI2 of the shift register 61 stored in the RAM 32 in the process of S9 (see FIG. 9), the CPU 30 calculates the average value of the digital values of the AD converter 45 (S22). In the process of S22, the CPU 30 calculates the average value of 16 digital values randomly extracted from the digital values stored in the RAM 32 in the process of S9. Hereinafter, the average value of the digital values calculated in the process of S22 is referred to as the second average value.

[0056] The CPU 30 determines whether the first average value is within the first range corresponding to the first thermal head 6A of the table 91 (see FIG. 8) (S23). When the first thermal head 6A is mounted on the mounting portion 25, all the stages included in the area DI1 of the shift register 61 correspond to the heating element 9. Therefore, when the first thermal head 6A is mounted on the mounting portion 25, the first average value is within the first range (74 to 132) corresponding to the first thermal head 6A of the table 91.

[0057] When the CPU 30 determines that the first average value is within the first range corresponding to the first thermal head 6A of the table 91 (S23: YES), it determines that the type of the thermal head 6 mounted on the mounting portion 25 is the first thermal head 6A (S24), and shifts the process to S28.

[0058] When the CPU 30 determines that the first average value is not within the first range corresponding to the first thermal head 6A of the table 91 (S23: NO), it determines whether the first average value is within the first range corresponding to the second thermal head 6B of the table 91 (S25). When the second thermal head 6B is mounted on the mounting portion 25, none of the stages included in the area DI1 of the shift register 61 correspond to the heating element 9. When the second thermal head 6B is mounted on the mounting portion 25, the first average value is within the first range (515 to 645) corresponding to the second thermal head 6B of the table 91.

[0059] When the CPU 30 determines that the first average value is within the first range corresponding to the second thermal head 6B in the table 91 (S25: YES), it discriminates that the type of the thermal head 6 mounted on the mounting portion 25 is the second thermal head 6B (S26), and shifts the process to S28.

[0060] When the first average value of the CPU 30 is not within the first range corresponding to the first thermal head 6A in the table 91 (S23: NO) and is not within the first range corresponding to the second thermal head 6B either (S25: NO), it is determined that the type of the thermal head 6 cannot be discriminated, and a discrimination error notification is performed (S27). In the process of S27, the CPU 30 causes the display unit 16 to display that the type of the thermal head 6 cannot be discriminated. The CPU 30 ends the main process.

[0061] The CPU 30 determines whether the thermal head 6 is mounted on the mounting portion 25 (S28). In the determination of S28, the CPU 30 determines whether the second average value is within the second range corresponding to the type of the thermal head 6 discriminated in the process of S24 or S26. In either case of the first thermal head 6A or the second thermal head 6B, the stages included in the region DI2 of the shift register 61 all correspond to the heating elements 9. Therefore, when the thermal head 6 is mounted on the mounting portion 25, the second average value is within the second range corresponding to the type of the thermal head 6 discriminated in the process of S24 or S26.

[0062] When the CPU 30 determines that the second average value is within the second range corresponding to the type of the thermal head 6 discriminated in the process of S24 or S26 and the thermal head 6 is mounted on the mounting portion 25 (S28: YES), it ends the main process. When the CPU 30 determines that the second average value is not within the second range corresponding to the type of the thermal head 6 discriminated in the process of S24 or S26 and the thermal head 6 is not mounted on the mounting portion 25 (S28: NO), it performs a mounting error notification (S29). In the process of S29, the CPU 30 causes the display unit 16 to display that the thermal head 6 is not mounted on the mounting portion 25. The CPU 30 ends the main process.

[0063] <Operation and Effect of this Embodiment> As described above, the printer 1 has a mounting portion 25. The mounting portion 25 is provided in the housing 2, and the first thermal head 6A or the second thermal head 6B, which is the thermal head 6, is detachable. The thermal head 6 has an M-stage (M = 320) shift register 61, a latch driver 62, and a plurality of heating elements 9. The first thermal head 6A has 300 heating elements 9, and the second thermal head 6B has 203 heating elements 9. The voltage detection circuit 43 of the printer 1 shunts power from the power line that supplies power from the power supply 20 to the thermal head 6 to the voltage dividing circuit 44, and outputs a digital value corresponding to the current value flowing through the thermal head 6 by the AD converter 45. In the main process, the CPU 30 of the printer 1 causes the latch driver 62 to output a corresponding energization signal one by one from the first stage (the 211th stage) for the stages included in the region DI1 of the shift register 61 (S3). When the energization signal is being output by the process of S3, the CPU 30 acquires the digital value output by the AD converter 45 of the voltage detection circuit 43 and stores it in the RAM 32 (S4). The CPU 30 calculates a first average value based on the digital value stored in the process of S4 (S21), and discriminates the type of the thermal head 6 based on the first average value (S23 to S26). According to this, when the first thermal head 6A is mounted on the mounting portion 25, the stages included in the region DI1 of the shift register 61 correspond to the heating elements 9. On the other hand, when the second thermal head 6B is mounted on the mounting portion 25, the stages included in the region DI1 of the shift register 61 do not correspond to the heating elements 9. Therefore, when the energization signal is output based on the stages included in the region DI1 of the shift register 61, the first average value is different between the case where the first thermal head 6A is mounted on the mounting portion 25 and the case where the second thermal head 6B is mounted on the mounting portion 25. Thus, the printer 1 can discriminate between the first thermal head 6A and the second thermal head 6B that have the same number of stages in the shift register 61 and different numbers of heating elements 9 from each other.

[0064] In printer 1, all the stages (the 211st stage to the 290th stage) of the shift register 61 included in the area DI1 are between the 204th stage and the 300th stage. In this case, when the first thermal head 6A is mounted on the mounting portion 25, all the stages included in the area DI1 of the shift register 61 correspond to the heating elements 9. On the other hand, when the second thermal head 6B is mounted on the mounting portion 25, all the stages included in the area DI1 of the shift register 61 do not correspond to the heating elements 9. Therefore, compared with the case where a part of the stages of the shift register 61 included in the area DI1 is between the 204th stage and the 300th stage, the difference between the first average value when the first thermal head 6A is mounted on the mounting portion 25 and the first average value when the second thermal head 6B is mounted on the mounting portion 25 becomes larger. Thus, the printer 1 can easily discriminate between the first thermal head 6A and the second thermal head 6B having the same number of stages of the shift register 61 and different numbers of heating elements 9 from each other.

[0065] The ROM 31 of the printer 1 stores the first range according to the table 91. The first range is the range of the threshold value of the average value of the digital values when the energization signal is output based on the stages included in the region DI1 of the shift register 61, and corresponds to the type of the thermal head 6. In the main process, the CPU 30 determines whether the first average value is within the first range corresponding to the first thermal head 6A in the table 91 (S23). When the first thermal head 6A is mounted on the mounting portion 25, the first average value is within the first range corresponding to the first thermal head 6A in the table 91. When the CPU 30 determines that the first average value is within the first range corresponding to the first thermal head 6A in the table 91, it determines that the type of the thermal head 6 mounted on the mounting portion 25 is the first thermal head 6A (S24). When the CPU 30 determines that the first average value is not within the first range corresponding to the first thermal head 6A in the table 91, it determines whether the first average value is within the first range corresponding to the second thermal head 6B in the table 91 (S25). When the second thermal head 6B is mounted on the mounting portion 25, the first average value is within the first range corresponding to the second thermal head 6B in the table 91. When the CPU 30 determines that the first average value is within the first range corresponding to the second thermal head 6B in the table 91, it determines that the type of the thermal head 6 mounted on the mounting portion 25 is the second thermal head 6B (S26). In this way, based on the table 91, the printer 1 can easily distinguish between the first thermal head 6A and the second thermal head 6B, which have the same number of stages in the shift register 61 but different numbers of heating elements 9.

[0066] When the CPU 30 of the printer 1 determines that the first average value is not within the first range corresponding to the first thermal head 6A in the table 91 and is not within the first range corresponding to the second thermal head 6B either, it performs a discrimination error notification (S27). In this way, when the first average value is not within the first range corresponding to the first thermal head 6A in the table 91 and is not within the first range corresponding to the second thermal head 6B either, there is a possibility that a thermal head 6 different from the specification of the printer 1 is mounted on the mounting portion 25. In the printer 1, by performing the discrimination error notification, the user can recognize that a thermal head 6 different from the specification of the printer 1 is mounted on the mounting portion 25.

[0067] The ROM 31 of the printer 1 stores the second range according to the table 91. The second range is the range of the threshold value of the average value of the digital values when the energization signal is output based on the stages included in the region DI2 of the shift register 61, and corresponds to the type of the thermal head 6. In the main process, the CPU 30 causes the latching driver 62 to output the corresponding energization signal one by one from the first stage (the 11th stage) for the stages included in the region DI2 of the shift register 61 (S8). When the energization signal is being output by the process of S8, the CPU 30 acquires the digital value output by the AD converter 45 of the voltage detection circuit 43 and stores it in the RAM 32 (S9). The CPU 30 calculates the second average value based on the digital value stored in the process of S9 (S22), and compares the second average value with the second range corresponding to the type of the discriminated thermal head 6 (S28). When the second average value is outside the second range, the CPU 30 performs a mounting error notification (S29). In this way, when the second average value is outside the second range, there is a possibility that the thermal head 6 is not mounted on the mounting portion 25. In the printer 1, by performing the mounting error notification, the user can recognize that the thermal head 6 is not mounted on the mounting portion 25.

[0068] <Modification Example> The present invention can be variously modified from the above embodiments. The following various modification examples can be combined with each other as long as there is no contradiction.

[0069] Instead of the CPU 30, for example, a microcomputer, an ASIC (Application Specific Integrated Circuits), an FPGA (Field Programmable Gate Array), etc. may be used for control in the printer 1. The main processing may be distributed using a plurality of CPUs 30, or may be processed in combination with the CPU 30 and an ASIC or the like. At least one of the serial data, the clock signal, the latch signal, or the strobe signal may be output from an ASIC or the like.

[0070] Non-temporary storage media such as the ROM 31 and the storage device 33 may be any storage media that can retain information regardless of the period for which the information is stored. The non-temporary storage media may not include temporary storage media (for example, transmitted signals). Programs, tables 91, etc. for executing the main processing may be downloaded from, for example, a server connected to a network (that is, transmitted as a transmission signal) and stored in the storage device 33 or the like. In this case, the programs or the like only need to be stored in a non-temporary storage media such as an HDD provided in the server.

[0071] The parameters used to determine the type of the thermal head 6 are not limited to the digital values output by the AD converter 45 of the voltage detection circuit 43. The parameters used to determine the type of the thermal head 6 may be, for example, the magnitude of the current flowing through the voltage dividing circuit 44, the potential difference generated by the resistance in the voltage dividing circuit 44, etc.

[0072] In the determination process, the digital value stored in the process of S4 may be used, and the first average value does not have to be used. For example, in the determination process, the maximum value, the minimum value, the median value, etc. of the digital value stored in the process of S4 may be used. In the determination process, one randomly extracted from the digital values stored in the process of S4 may be used.

[0073] The area DI1 may include at least one stage of the shift register 61 that corresponds to the heating element 9 in the first thermal head 6A and does not correspond to the heating element 9 in the second thermal head 6B. That is, the area DI1 may include at least one stage from the 204th stage to the 300th stage of the shift register 61. For example, the area DI1 may be from the 201st stage to the 290th stage of the shift register 61. The area DI1 may be from the 211th stage to the Mth stage of the shift register 61. Also in this case, since the first average value is different between the case where the type of the thermal head 6 is the first thermal head 6A and the case where the type of the thermal head 6 is the second thermal head 6B, the printer 1 can determine the type of the thermal head 6.

[0074] The first range may not be stored in the table 91 of the ROM 31. In this case, in the determination process, the type of the thermal head 6 may be determined based on the magnitude relationship between the first average value and a predetermined threshold value. For example, if the predetermined threshold value of the first average value is 300, and the first average value is less than 300, it may be determined that the type of the thermal head 6 is the first thermal head 6A, and if the first average value is 300 or more, it may be determined that the type of the thermal head 6 is the second thermal head 6B.

[0075] The mode of the determination error notification may be appropriately changed. For example, the determination error notification may be performed by the sound emitted by the speaker, the lighting of the warning lamp, etc. The CPU 30 may not perform the determination error notification in the main process.

[0076] The second range may not be stored in the table 91 of the ROM 31. In this case, in the determination process, it may be determined whether or not the thermal head 6 is mounted on the mounting portion 25 based on the magnitude relationship between the second average value and a predetermined threshold value. For example, if the predetermined threshold value of the digital value is 150, and the second average value is 150 or more, it may be determined that the thermal head 6 is not mounted on the mounting portion 25.

[0077] The area DI2 only needs to include at least one stage of the shift register 61 corresponding to the heating element 9 for both the first thermal head 6A and the second thermal head 6B. That is, the area DI2 only needs to include at least one stage from the 1st stage to the 203rd stage of the shift register 61. For example, the area DI2 may be from the 11th stage to the 210th stage of the shift register 61.

[0078] The area DI1 and the area DI2 may include common stages of the shift register 61. For example, the area DI1 may be from the 201st stage to the 290th stage of the shift register 61, and the area DI2 may be from the 11th stage to the 210th stage of the shift register 61. In this case, the area DI1 and the area DI2 commonly include from the 201st stage to the 210th stage of the shift register 61.

[0079] The mode of mounting error notification may be changed as appropriate. For example, mounting error notification may be performed by the sound emitted by the speaker, the lighting of the warning lamp, etc. The CPU 30 does not have to perform mounting error notification in the main process.

[0080] In the above embodiment, the types of the thermal head 6 are two types, i.e., the first thermal head 6A or the second thermal head 6B. However, three or more types of the thermal head 6 may be discriminated. An example of the case where three types of the thermal head 6 are discriminated is shown below. The mounting portion 25 is detachable for a third thermal head having 400 heating elements 9. The CPU 30 outputs an energization signal based on each stage of the region DI1 (from the 211th stage to the 290th stage) in order to discriminate between the first thermal head 6A and the second thermal head 6B, and at this time, stores the digital value output by the AD converter 45 in the RAM 32. The CPU 30 outputs a communication signal based on each stage of the region DI10 including at least one stage from the 301st stage to the 400th stage of the shift register 61 in order to discriminate between the first thermal head 6A and the third thermal head, and at this time, stores the digital value output by the AD converter 45 in the RAM 32. The CPU 30 discriminates which of the first thermal head 6A, the second thermal head 6B, or the third thermal head the type of the thermal head 6 is based on the digital value when the energization signal is output based on each stage of the region DI1 and the digital value when the energization signal is output based on each stage of the region DI10.

[0081] <Others> The number 300 of the heating elements 9 of the first thermal head 6A is an example of "N1" of the present invention. The number 203 of the heating elements 9 of the second thermal head 6B is an example of "N2" of the present invention. The CPU 30 is an example of the "control unit" of the present invention. The digital value output by the AD converter 45 is an example of the "parameter" of the present invention. The voltage detection circuit 43 is an example of the "detection unit" of the present invention. The region DI1 is an example of the "first predetermined region" of the present invention. The process of S3 is an example of the "first output process", "first output step", and "first output step" of the present invention. The processes of S23 to S26 are an example of the "discrimination process", "discrimination step", and "discrimination step" of the present invention. The ROM 31 is an example of the "first storage unit" and "second storage unit". The process of S27 is an example of the "first notification process" of the present invention. The process of S8 is an example of the "second output process" of the present invention. The process of S29 is an example of the "second notification process" of the present invention.

Explanation of Reference Numerals

[0082] 1 Printer 2 Housing 6 Thermal Head 6A First Thermal Head 6B Second Thermal Head 9 Heating Element 25 Mounting Portion 30 CPU 31 ROM 43 Voltage Detection Circuit 61 Shift Register 62 Latch Driver 91 Table

Claims

1. A housing, a plurality of heating elements, an M-stage (M is a natural number) shift register that shifts serial data by a clock signal, and a latch driver that temporarily holds the serial data by a latch signal and outputs an energization signal for causing the heating elements corresponding to the respective stages of the shift register to generate heat based on the serial data held in response to a strobe signal. The thermal head has either a first thermal head in which the number of heating elements is N1 (N1 is a natural number of 2 or more, N1 ≤ M) or a second thermal head in which the number of heating elements is N2 (N2 is a natural number of 2 or more, N2 < N1), and either one of them is detachably attachable, a mounting portion provided on the housing, a control unit that controls the energization signal by outputting the serial data, the clock signal, the latch signal, and the strobe signal to the thermal head mounted on the mounting portion, a detection unit that detects a parameter corresponding to a current value flowing through the thermal head to generate heat of the heating element, In a printer comprising: The control unit: For a first predetermined region including at least one stage among the stages from the (N2 + 1)-th stage to the N1-th stage in the shift register, a first output process of causing the latch driver to output the corresponding energization signal one by one from the first stage of the first predetermined region, A discrimination process of discriminating the type of the thermal head mounted on the mounting portion based on the parameter detected by the detection unit when the energization signal is output in order by the first output process, A printer characterized by executing.

2. All of the stages of the shift register included in the first predetermined region are between the (N2 + 1)-th stage and the N1-th stage in the shift register. The printer according to claim 1.

3. Further comprising a first storage unit that stores a first range that is a range of threshold values of the parameter corresponding to the type of the thermal head, The control unit, in the discrimination process, Discriminating the type of the thermal head mounted on the mounting portion based on the relationship between the parameter detected by the detection unit when the energization signal is output in order by the first output process and the first range stored in the first storage unit The printer according to claim 1.

4. The printer according to claim 3, characterized in that when the parameter detected by the detection unit when the energization signal is output in order by the first output process is outside the first range, a first notification process for notifying an error is executed.

5. further comprising a second storage unit that stores a second range that is a range of threshold values of the parameter, The control unit, a second output process for causing the latch driver to output the corresponding energization signal one by one from the first stage for a second predetermined region between the first stage and the N2th stage in the shift register, a second notification process for notifying an error when the parameter detected by the detection unit when the energization signal is output in order by the second output process is outside the second range; The printer according to claim 1, characterized in that it executes the above.

6. A thermal head having a housing, a plurality of heating elements, a shift register of M stages (M is a natural number) that shifts serial data by a clock signal, and a latch driver that temporarily holds the serial data by a latch signal and outputs an energization signal for causing the heating element corresponding to each stage of the shift register to generate heat based on the serial data held in response to a strobe signal, wherein the number of heating elements is either a first thermal head with N1 pieces (N1 is a natural number of 2 or more, N1 ≦ M) or a second thermal head with N2 pieces (N2 is a natural number of 2 or more, N2 < N1), and either one is detachably attachable, a mounting portion provided on the housing, and a control unit that outputs the serial data, the clock signal, the latch signal, and the strobe signal to the thermal head mounted on the mounting portion to control the energization signal, and a detection unit that detects a parameter corresponding to a current value flowing through the thermal head to generate heat in the heating element, a program for causing a computer that controls a printer including the above to execute, a first output step of causing the latch driver to output the corresponding energization signal one by one from the first stage of the first predetermined region for a first predetermined region including at least one stage between the N2 + 1th stage and the N1th stage in the shift register, A discrimination step of discriminating the type of the thermal head mounted on the mounting portion based on the parameter detected by the detection unit when the energization signal is output in order by the first output step; A program characterized by causing the computer to execute the program. **Claim 7** A thermal head having a housing, a plurality of heating elements, an M-stage (M is a natural number) shift register that shifts serial data by a clock signal, and a latch driver that temporarily holds the serial data by a latch signal and outputs an energization signal for causing the heating elements corresponding to the respective stages of the shift register to generate heat based on the held serial data in response to a strobe signal, wherein either a first thermal head having N1 heating elements (N1 is a natural number of 2 or more, N1 ≤ M) or a second thermal head having N2 heating elements (N2 is a natural number of 2 or more, N2 < N1) is alternatively detachable, a mounting portion provided on the housing, and a control unit that controls the energization signal by outputting the serial data, the clock signal, the latch signal, and the strobe signal to the thermal head mounted on the mounting portion, and a detection unit that detects a parameter corresponding to a current value flowing through the thermal head to generate heat, wherein: A first output step of causing the latch driver to output the energization signal corresponding to each first stage of a first predetermined region including at least one stage between the (N2 + 1)-th stage and the N1-th stage in the shift register; A discrimination step of discriminating the type of the thermal head mounted on the mounting portion based on the parameter detected by the detection unit when the energization signal is output in order by the first output step; A control method characterized by comprising the above steps.

Citation Information

Patent Citations

  • Line printer, thermal printer, element number detecting method for thermal head, and element arrangement density deciding method for thermal head

    JP2010162810A