Printer

A printer includes a thermal head having a plurality of heating elements to print on a paper that is conveyed thereto, a controller configured to control a speed of the paper that is conveyed and an amount of power supplied to the heating elements, and a processor configured to determine from image data of an image that is to be printed on the paper using the thermal head whether or not a character and a figure other than the character are to be simultaneously printed and instruct the controller based on the determination. The processor instructs the controller to set the speed of the paper to a first speed which is slower than a second speed, which is the speed for printing the character without the figure, upon determining that the character and the figure are to be simultaneously printed.

CROSS-REFERENCE TO RELATED APPLICATION

This application is based upon and claims the benefit of priority from Japanese Patent Application No. 2017-141973, filed Jul. 21, 2017, the entire contents of which are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to a printer.

BACKGROUND

In the related art, a printer, such as a receipt printer, a portable printer, and a label printer for printing a label, which may be mounted on or connected to a point of sales (POS) terminal that processes a sales registration of a purchased commodity, often uses a thermal printer having a line thermal head, which transfers heat using the line thermal head while conveying a thermal paper (hereinafter, referred to as “paper”) to develop color on the thermal paper. These printers perform printing by increasing a conveying speed of a paper at high speed as much as possible.

If a character, a number, a symbol, or the like (hereinafter, collectively referred to as “characters”) is printed, by the thermal printer, on the paper, the character generally can be formed accurately and read even if high-speed printing is performed. However, if a code such as a bar code and a two-dimensional code and a pattern such as a logo and a coupon (hereinafter, code and pattern are collectively referred to as “figure”) are printed and high-speed printing is performed, “tailing” phenomenon may occur in which unintentional printing is caused due to residual heat accumulated in the head. If such a phenomenon occurs, for example, the printed code including the tailing may not be read correctly, or a gradation of the figure may not be properly printed out.

Therefore, if printing of an image including the figure is performed, printing is no longer performed at a high speed, and instead performed at a low speed.

However, if printing of an image including a figure and characters is performed and the figure and characters are simultaneously printed by the line thermal head, the conveying speed is set to be low because of the presence of the figure. Therefore, for simultaneous printing of the figure and characters, electric power consumed for printing of the character is larger than necessary.

DETAILED DESCRIPTION

Embodiments provide a printer capable of suppressing the amount of electric power used for printing to a low level if characters and a figure are simultaneously printed.

A printer according to an embodiment includes a thermal head having a plurality of heating elements to print on a paper that is conveyed thereto, a controller configured to control a speed of the paper that is conveyed and an amount of power supplied to the heating elements, and a processor configured to determine from image data of an image that is to be printed on the paper using the thermal head whether or not a character and a figure other than the character are to be simultaneously printed and instruct the controller based on the determination. The processor instructs the controller to set the speed of the paper to a first speed which is slower than a second speed, which is the speed for printing the character without the figure, upon determining that the character and the figure are to be simultaneously printed.

Hereinafter, an embodiment will be described in detail with reference to the drawings. A printer mounted on a POS terminal will be described as an example of the printer. The embodiment is not limited by the embodiment described below.

The POS terminal is installed in a store and performs sales registration processing and settlement processing of a commodity sold at the store. The sales registration processing is processing of optically reading a code represented by a symbol such as a bar code or a two-dimensional code attached to the commodity to be sold, acquiring a commodity code specifying the commodity, displaying commodity information (e.g., commodity name, price, and the like) read out based on the acquired commodity code, and storing the commodity information in a RAM or the like in a transaction with a customer. The settlement processing is processing of displaying the total amount relating to the transaction, processing of calculating and displaying a change based on a deposit received from the customer, and processing of instructing a changer to issue the change, based on the commodity information stored in the RAM or the like in association with the sales registration processing. The commodity information and settlement information (e.g., total amount, deposit amount, change amount, and the like) after the settlement processing are issued as a receipt printed by the printer.

Next, a hardware configuration of a POS terminal1will be described.FIG. 1is a block diagram illustrating the hardware configuration of the POS terminal1. As illustrated inFIG. 1, the POS terminal1is provided with a central processing unit (CPU)11, a read only memory (ROM)12, a random access memory (RAM)13, a memory unit14, and the like. The CPU11is a control subject. The ROM12stores various programs and data. The memory unit14stores various programs. The CPU11, the ROM12, the RAM13, and the memory unit14are connected to each other via a bus15. The CPU11, the ROM12, and the RAM13constitute a control unit100. That is, the control unit100performs control processing relating to the POS terminal1described later by the CPU11operating in accordance with a control program stored in the ROM12or the memory unit14and loaded into the RAM13.

The RAM13is provided with a commodity information unit131. The commodity information unit131stores the commodity information (e.g., commodity code, commodity name, commodity price, and the like) processed for sales registration based on the commodity code specifying the commodity acquired from a code read by a code reader27.

The memory unit14is a nonvolatile memory such as a flash memory or a hard disk drive (HDD) that holds stored information even if the power is turned off. The memory unit14is provided with a control program unit141and a commodity master142.

The control program unit141stores a control program for controlling the POS terminal1. The commodity master142stores commodity information relating to each commodity that is associated with the commodity code.

In addition, the control unit100is connected to an operation unit21, an operator display unit22, a customer display unit23, a printer24, a card reading unit25, and the code reader27via the bus15and a controller16. In response to an instruction from the control unit100, the controller16controls the operation unit21, the operator display unit22, the customer display unit23, the printer24, the card reading unit25, and the code reader27. Hereinafter, for the convenience of description, control that is performed by the controller16is referred to as control that is performed by the control unit100.

The operation unit21is a keyboard provided with a key such as a register key for entering numbers and a settlement key211for declaring an end of sales registration. The operator display unit22is, for example, a liquid crystal display or the like, and displays the commodity information, the settlement information, and the like to an operator. The customer display unit23is, for example, the liquid crystal display device or the like, and displays the commodity information, the settlement information, and the like to the customer.

The printer24draws out a roll-shaped receipt paper stored in a main body, prints the commodity information, the settlement information, and the like with a thermal printer having, for example, a thermal transfer type thermal head241(refer toFIG. 2), and issues the receipt paper as a receipt. The details will be described later with reference toFIG. 2. The card reading unit25reads card information from a card such as a credit card of the customer. The code reader27is, for example, a handy type code reader. The code reader27optically reads a code attached to a commodity or a discount coupon using visible light such as a laser. The code reader27may read a code by cutting out a code from an image captured by an imaging unit (not illustrated).

In addition, the control unit100is connected to a communication unit26via the bus15. The communication unit26is connected to another POS terminal1installed in the store or a store server (not illustrated) connected to the POS terminal1via a communication line (not illustrated). The store server receives the commodity information and the settlement information from each POS terminal1and performs sales management of the commodity at the store.

Next, the printer24provided in the POS terminal1will be described.FIG. 2is a schematic diagram of the printer24of the POS terminal1as laterally viewed. InFIG. 2, the printer24is set so that the paper P can be drawn out. The paper P is a paper on which a long thermal paper is wound. In addition, the printer24is provided with a thermal head241, a platen242, a motor243, and a roller244.

The pair of rollers244are configured to draw the paper P out by nipping, and convey the paper P that is drawn out toward the thermal head241.

In the thermal head241, multiple heating elements2411aligned in one line in a direction orthogonal to the conveying direction of the paper P are disposed. The thermal head241generates heat by energizing each of the heating elements2411. The heat generated by the heating element2411is transferred to the paper P, so that the paper P is discolored and printing is performed. Printing control of the thermal head241will be described later with reference toFIGS. 4, 5, andFIGS. 8 to 10.

The platen242is provided at a position facing the heating element2411of the thermal head241. The platen242is formed in columnar shaped in the depth direction, and is formed of a rubber-like material, for example. The thermal head241is biased toward the platen242. The platen242is in contact with the thermal head241at a position where the heating element2411is provided. The platen242is rotated by being driven by the motor243serving as a stepping motor, for example, and conveys the nipped paper P in the direction of an arrow F. In this state, the thermal head241generates heat in the heating element2411and performs printing on the nipped paper P.

FIG. 3is a block diagram illustrating a hardware configuration of the printer24. As illustrated inFIG. 3, the printer24is provided with a CPU31, a ROM32, a RAM33, a memory unit34, and the like. The CPU31is a control subject. The ROM32stores various programs. The RAM33stores programs and various data. The memory unit34stores various programs. The CPU31, the ROM32, the RAM33, and the memory unit34are connected to each other via a bus35. The CPU31, the ROM32, and the RAM33constitute a control unit300. That is, the control unit300performs control processing relating to the printer24described later by the CPU31operating in accordance with a control program stored in the ROM32or the memory unit34and loaded into the RAM33.

The RAM33is provided with an image region331. The image region331is a region where the print information input from the POS terminal1via the controller16is stored as a bitmap by the control unit300.

The memory unit34is a nonvolatile memory such as a flash memory or an HDD that holds stored information even if the power is turned off. The memory unit34is provided with a control program unit341and a printing table342. The control program unit341stores a control program for controlling the printer24.

Next, the printing table342will be described.FIG. 4is a memory map illustrating a portion of a memory configuration of the printing table342. The printing table342stores information about a conveying speed of the paper P if a figure is printed and an energization time used for printing a character described later inFIGS. 5 and 6. That is, the printing table342is provided with a paper conveying speed column3421and an energization time column3422. The paper conveying speed column3421stores two different conveying speeds. A first one is constant speed 1 (4 inch per second (hereinafter, referred to as “ips”)) of the paper P when a code such as a bar code or a two-dimensional code serving as one of the figures is printed. A second one is constant speed 2 (2 ips) of the paper P when a pattern such as a logo or coupon serving as one of the figures different from the code is printed. The constant speed 1 and the constant speed 2 are slower than a conveying speed when only the character is printed, which is somewhere between 10 ips and 18 ips. In addition, since the pattern is a figure having multiple gradations, the constant speed 2 is set to be slower than the constant speed 1.

In addition, the energization time column3422stores the energization time associated with the constant speed 1 and the constant speed 2. In the constant speed 1, the energization time to the heating element2411corresponding to a region H1, where the character is printed, out of the multiple heating elements2411is T1(refer toFIG. 5). An energization time T1is shorter than the energization time TC, by 50% to 70%, that is applied to the heating element2411corresponding to a region H2, where the code is printed, out of the multiple heating elements2411. In addition, in the constant speed 2, the energization time applied to the heating element2411in the region H1, where the character is printed, out of the multiple heating elements2411is T2(refer toFIG. 5). An energization time T2is shorter than the energization time TZ, by 30% to 50%, that is applied to the heating element2411corresponding to a region H2, where the pattern is printed, out of the multiple heating elements2411. The energization time T1and the energization time T2are almost the same as each other.

The description is returned to the description ofFIG. 3. In addition, the control unit300is connected to a display unit37, an operation unit38, the thermal head241, and the motor243via the bus35and a controller36. In response to an instruction from the control unit300, the controller36controls the display unit37, the operation unit38, the thermal head241, and the motor243. Hereinafter, for the convenience of description, control that is performed by the controller36is referred to as control that is performed by the control unit100performs.

In addition, the control unit300is connected to the communication unit39via the bus35. The communication unit39is connected to the controller16via a communication line.

Next, a structure of the thermal head241will be described.FIGS. 5 and 6are explanatory diagrams illustrating the structure of the thermal head and a printing region. As illustrated inFIG. 5, the thermal head241has multiple heating elements2411aligned in a line. Each heating element2411generates heat individually. The heating element2411generates heat over a width H, and performs printing on the region within the width of the paper P. Specifically, the width H is divided into a region of width H1(hereinafter, referred to as region H1) and a region of width H2(hereinafter, referred to as region H2), and the control unit300performs the same control for each region. That is, the control unit300supplies the same amount of electric power (for example, energization at the same energization time or application of the same voltage) to the heating elements2411existing in the region H1. In the embodiment, the same amount of electric power is supplied to each heating element2411by energizing the region H1for the same time. Similarly, the control unit300supplies the same amount of electric power to the heating elements2411existing in the region H2by energizing each of the heating elements2411for the same time. In the embodiment, the amount of electric power to be supplied by the control unit300, to the region H1and to the region H2may be same or different.

In the example ofFIG. 5, only the character is printed in both of the region H1and the region H2. Therefore, the control unit300supplies power of the same amount of electric power to the region H1and the region H2. That is, the voltage is applied to all the heating elements2411for the same time to cause a current to flow. InFIG. 5, a conveying speed of the paper P is determined according to the number of dots formed by the character printed in a block B where the thermal head241prints a predetermined number of dots in the conveying direction of the paper P. That is, if the number of dots to be printed in the block B is small, the conveying speed of the paper P is increased. On the other hand, if the number of dots to be printed in the block B is large, the conveying speed of the paper P becomes slow. The conveying speed of the paper P normally varies approximately from 10 ips to 18 ips.

The example ofFIG. 6is a diagram illustrating if the character is printed in the region H1and the code is simultaneously printed in the region H2. In this case, the control unit300refers to the printing table342and sets the conveying speed of the paper P in the block B. In the example ofFIG. 6, a constant speed 1 which is slower than the conveying speed at which only the character is printed is set. In addition, the energization time of the region H1in the block B is set to T1. That is, the printer24conveys the paper P at the constant speed 1 in the block B, and energizes the heating element2411for the energization time T1to print the character in the region H1in the block B. On the other hand, for the region H2, the code is printed by energizing for the energization time TC longer than the energization time T1.

Hereinafter, the control processing of the POS terminal1will be described.FIG. 7is a flowchart of control processing of the POS terminal1. As illustrated inFIG. 7, the code reader27reads the code attached to the commodity, so that it is determined whether or not the control unit100of the POS terminal1inputs a commodity code specifying the commodity (Act11). If it is determined that the commodity code is entered (Yes in Act11), the control unit100searches the commodity master142based on the input commodity code, reads the commodity information of the commodity and stores the commodity information in the commodity information unit131(Act12). The control unit100returns to Act11. For all commodities to be purchased, the control unit100repeats the processing of Act11and Act12.

On the other hand, if it is determined that the commodity code is not input (No in Act11), the control unit100determines whether or not the settlement key211is operated (Act13). If it is determined that the settlement key211is operated (Yes in Act13), the control unit100performs settlement processing based on the commodity information stored in the commodity information unit131(Act14). The control unit100outputs a printing data relating to the commodity information and the settlement information to the printer24(Act15). The control unit100returns to Act11.

The printing data is a command representing character information relating to the commodity information and the settlement information. In addition, the printing data may include data for printing a code such as a bar code and a two-dimensional code, a command indicating the code, data indicating the printing position of the code, and the like. In addition, the printing data may include data for printing a pattern such as a coupon ticket, a command representing the pattern, data indicating a printing position of the pattern, and the like.

If it is determined that it is not an operation of the settlement key211(No in Act13), the control unit100returns to Act11.

Hereinafter, control from the printer24will be described.FIG. 8is a functional block diagram of the printer24. The control unit300functions as a first determination unit301, a speed control unit302, an electric power amount control unit303, and a second determination unit304by following the control program stored in the ROM32or the control program unit341of the memory unit34.

The first determination unit301has a function of determining whether or not to simultaneously print the character and the figure using the thermal head241.

The speed control unit302has a function of conveying the conveying speed of the paper P at a constant speed which is slower than the conveying speed when only the character is printed, if it is determined that the first determination unit301simultaneously controls to print the character and the figure.

The electric power amount control unit303has a function of performing printing by reducing the amount of electric power to be supplied to the first region H1where the character is printed to be smaller than the amount of electric power to be supplied to the second region H2where the figure is printed, if it is determined that the first determination unit301simultaneously controls to print the character and the figure.

The second determination unit304has a function of determining whether the figure is a code represented by a symbol or a pattern with gradation.

FIG. 9is a flowchart of control processing of the printer24. As illustrated inFIG. 9, the control unit300determines whether or not printing data is input from the controller16of the POS terminal1(Act21). The control unit300waits until the printing data is input (No in Act21), and it is determined that the printing data is input (Yes in Act21), the control unit300creates image data for printing on the paper P based on the input printing data (Act22). The image data is data obtained by generating data for printing on the paper P as a bitmap data, and is data of an aggregate of dots. The printing on the paper P is performed by printing the dots with the thermal head241. The control unit300stores the created image data in the image region331. At this stage, the control unit300recognizes at which position the data relating to the character is created, at which position the data relating to the code is created, and at which position the data relating to the pattern is created based on a command representing the input code or pattern.

Next, the control unit300reads the image data corresponding to one block of the block obtained by dividing the image data stored in the image region331into predetermined blocks (Act23). The first determination unit301and the second determination unit304determine whether or not code data representing a code is included in the read image data (Act24). If it is determined that the code data is included (Yes in Act24), the control unit300reads out the conveying speed (4 ips) of constant speed 1 from the paper conveying speed column3421of the printing table342. The speed control unit302sets the read conveying speed in the RAM33(Act35).

Next, the control unit300reads an energization time T1for printing the character from the energization time column3422. The electric power amount control unit303sets the read energization time in the RAM33(Act36). The speed control unit302and electric power amount control unit303) control printing of the code while conveying the paper P at the constant speed 1 (Act28). At that time, the control unit300energizes for the energization time TC to print the code. In addition, the control unit300energizes for the energization time T1that is shorter than the energization time TC and controls printing of the character. Next, the control unit300determines whether or not printing of all the image data is completed (Act29). In addition, if image data to be printed still exists in the image region331(No in Act29), the control unit300returns to Act23and reads the image data corresponding to the next block. On the other hand, if it is determined that printing of all of the image data is completed (Yes in Act29), the control unit300controls issuing of the printed receipt and returns to Act21.

In addition, if it is determined that the code data is not included (No in Act24), the first determination unit301and second determination unit304determine whether or not the read image data includes pattern data representing a pattern (Act25). If it is determined that the pattern data is included (Yes in Act25), the control unit300reads the conveying speed (2 ips) at the constant speed 2 from the paper conveying speed column3421of the printing table342. The speed control unit302sets the read conveying speed in the RAM33(Act31). Next, the control unit300reads the energization time T2for printing the character from the energization time column3422. The electric power amount control units303sets the read energization time in the RAM33(Act32). The control unit300prints the pattern while conveying the paper P at the set constant speed 2 (Act28). At that time, the control unit300energizes for the energization time TZ to print the pattern. In addition, the control unit300energizes for the energization time T2that is shorter than the energization time TZ to print the character. The control unit300performs the processing of Act29.

In addition, if it is determined that the pattern data is not included (No in Act25), the control unit300calculates the conveying speed of the paper P necessary for printing only the character. The control unit300calculates the conveying speed of the paper P according to the number of dots as the image data in the block B. The control unit300sets the calculated conveying speed of the paper P in the RAM33(Act26). Next, the control unit300sets a predetermined energization time for printing only the character (Act27).

The control unit300sets the time to be equivalent to the energization time T1or the energization time T2. The control unit300controls printing of the character while conveying the paper P at the set conveying speed (Act28). The control unit300performs the processing of Act29.

Here, the relationship between the state of printing processed by the control unit300and the issued receipt will be described.FIG. 10is an explanatory diagram illustrating a printing example of a receipt in the printer. As illustrated inFIG. 10, when the receipt R is printed, the control unit300performs printing processing by dividing into five blocks from B1to B5. Since a logo of a company is printed on the block B1, the control unit300carries the paper P at the constant speed 2. In addition, the control unit300energizes for the energization time TZ, and controls printing of the pattern existing in the region H2.

Subsequently, the control unit300controls printing on the block B2. Only the character data exists in the block B2. Therefore, the control unit300sets the conveying speed of the paper P based on the number of dots representing the character existing in the block B2, and performs printing by energizing for a predetermined energization time. Since the block B3and the block B4have only the character data, the control unit300performs the same processing as that of the block R2.

On the block B5, the character data in the region H1and the code data in the region H2are respectively printed.

Therefore, the control unit300carries the paper P at the constant speed 1. In addition, the control unit300energizes for the energization time T1and controls printing of the character existing in the region H1. In addition, the control unit300energizes for the energization time TC and controls printing of the code existing in the region H2.

According to the present embodiment as such, when printing the code or the pattern, the energization time for printing the character can be set short. Therefore, power consumption while printing the code or the pattern can be suppressed without supplying excessive electric power to the printing of the character to be simultaneously printed when printing the code or the pattern. In addition, since excessive power is not supplied to print the character, the character can be prevented from blurring due to excessive application of heat.

For example, the amount of electric power is suppressed by controlling the energization time to the heating element2411to be short when the character is printed. However, by setting the voltage to be applied to the heating element2411for printing the character to be low, the amount of electric power may be suppressed.

In addition, the printer24incorporated in the POS terminal1is described as a printer. However, the printer24may be a device which is different from the POS terminal1, provided outside the POS terminal1, and connected to the POS terminal1via a communication line.

A program executed by the printer24is provided by being recorded on a computer-readable recording medium such as a CD-ROM, a flexible disk (FD), a CD-R, a digital versatile disk (DVD).

In addition, a program executed by the printer24may be configured to be stored on a computer connected to a network such as the Internet and provided by being downloaded via the network. In addition, the program executed by the printer24may be provided or distributed via a network such as the Internet.

In addition, the program executed by the printer24may be configured to be incorporated in advance in ROM or the like and provided.