Thermal printer heating control method and device and thermal printer

文档序号:821751 发布日期:2021-03-30 浏览:8次 中文

阅读说明:本技术 热敏打印机加热的控制方法、装置及热敏打印机 (Thermal printer heating control method and device and thermal printer ) 是由 江沣 刘启汉 于 2020-12-12 设计创作,主要内容包括:本发明提供了一种热敏打印机加热的控制方法,所述方法包括以下步骤:获取待打印数据;将所述待打印数据转换成对应位置的加热点,所有所述加热点组合形成所述待打印数据;当打印所述待打印数据中的任意一行时,取该行中的奇数位或偶数位中任一类的加热点先进行加热,再取剩下一类的加热点进行加热。本发明通过对待打印的数据进行交叉隔点加热,将加热分成两次进行,使得打印出来的文字或者图片墨迹更加均匀,有效地提升打印效果。(The invention provides a method for controlling heating of a thermal printer, which comprises the following steps: acquiring data to be printed; converting the data to be printed into heating points at corresponding positions, and combining all the heating points to form the data to be printed; when any line in the data to be printed is printed, heating points of any type in odd-numbered positions or even-numbered positions in the line are taken for heating, and then heating points of the remaining type are taken for heating. According to the invention, the data to be printed is subjected to cross dot-separating heating, and the heating is divided into two times, so that the ink marks of the printed characters or pictures are more uniform, and the printing effect is effectively improved.)

1. A method of controlling heating of a thermal printer, the method comprising the steps of:

acquiring data to be printed;

converting the data to be printed into heating points at corresponding positions, and combining all the heating points to form the data to be printed;

when any line in the data to be printed is printed, heating points of any type in odd-numbered positions or even-numbered positions in the line are taken for heating, and then heating points of the remaining type are taken for heating.

2. The control method according to claim 1, wherein the printable area is divided into a set of m rows and n columns of dots, any dot corresponding to a printable area coordinate information, wherein m and n are positive integers; the step of converting the data to be printed into heating points at corresponding positions, wherein all the heating points are combined to form the data to be printed, further comprises the following steps:

any heating point corresponds to the coordinate information of the printable area.

3. The control method according to claim 1, further comprising, before printing the data to be printed, a density reducing step including:

dividing the heating points which are continuously adjacent in each row according to two groups;

and removing any heating point in each group in the data to be printed.

4. The control method according to claim 3, wherein the "removing any one of the heating dots in each group in the data to be printed" specifically includes:

the heating point groups of either one of the odd-numbered groups or the even-numbered groups of each row remove heating points located at the front in each group, and the heating point groups of the other one remove heating points located at the rear in each group.

5. A control apparatus for heating of a thermal printer, comprising:

the acquisition module is used for acquiring data to be printed;

the conversion module is used for converting the data to be printed into heating points at corresponding positions, and all the heating points are combined to form the data to be printed;

and the heating module is used for taking any one type of heating points in odd-numbered positions or even-numbered positions in the row to heat first and then taking the remaining one type of heating points to heat when any one row in the data to be printed is printed.

6. A thermal printer, comprising:

one or more processors;

a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the control method of thermal printer heating as claimed in any one of claims 1-4.

Technical Field

The invention relates to the technical field of thermal printer heating control, in particular to a thermal printer heating control method and device and a thermal printer.

Background

The principle of a thermal printer is to coat a light-colored material (usually paper) with a transparent film and heat the film for a period of time to change the color to a dark color (usually black or blue). The image is generated by a chemical reaction in the film by heating. The thermal printer selectively heats the thermal paper at certain locations, thereby creating a corresponding pattern. Heating is provided by a small electric heater on the printhead that is in contact with the heat sensitive material. The heaters are logically controlled in the form of square dots or stripes by the printer, which when activated, produce a pattern on the thermal paper corresponding to the heating elements. The same logic that controls the heating elements also controls the feeding of the paper, thus enabling the printing of a pattern on the entire label or sheet.

When a conventional thermal printer prints data, the print data is converted into dot line data and then directly sent to the printer for heating. Although the method is simple, the phenomena that the printing effect is not ideal and the printed characters and pictures are not uniform tend to occur, so a control method for heating the thermal printer, which can realize uniform printing effect, is needed.

Disclosure of Invention

The invention provides a method for controlling heating of a thermal printer, and aims to solve the technical problems in the background art.

The invention provides a method for controlling heating of a thermal printer, which comprises the following steps:

acquiring data to be printed;

converting the data to be printed into heating points at corresponding positions, and combining all the heating points to form the data to be printed;

when any line in the data to be printed is printed, heating points of any type in odd-numbered positions or even-numbered positions in the line are taken for heating, and then heating points of the remaining type are taken for heating.

Further, the printable area is divided into a point set with m rows and n columns, any point corresponds to coordinate information of the printable area, wherein m and n are positive integers; the step of converting the data to be printed into heating points at corresponding positions, wherein all the heating points are combined to form the data to be printed, further comprises the following steps:

any heating point corresponds to the coordinate information of the printable area.

Further, before printing the data to be printed, the method further comprises a density reducing step, including:

dividing the heating points which are continuously adjacent in each row according to two groups;

and removing any heating point in each group in the data to be printed.

Further, the "removing any one of the heating dots in each group in the data to be printed" specifically includes:

the heating point groups of either one of the odd-numbered groups or the even-numbered groups of each row remove heating points located at the front in each group, and the heating point groups of the other one remove heating points located at the rear in each group.

The invention also provides a control device for heating of the thermal printer, which comprises:

the acquisition module is used for acquiring data to be printed;

the conversion module is used for converting the data to be printed into heating points at corresponding positions, and all the heating points are combined to form the data to be printed;

and the heating module is used for taking any one type of heating points in odd-numbered positions or even-numbered positions in the row to heat first and then taking the remaining one type of heating points to heat when any one row in the data to be printed is printed.

The present invention also provides a thermal printer comprising:

one or more processors;

a storage device for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the control method for thermal printer heating described above.

The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:

according to the invention, the data to be printed is subjected to cross dot-separating heating, and the heating is divided into two times, so that the ink marks of the printed characters or pictures are more uniform, and the printing effect is effectively improved.

It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.

Drawings

Fig. 1 is a flowchart illustrating steps of a method for controlling heating of a thermal printer according to an embodiment of the present invention.

Fig. 2 is a detailed implementation diagram of step S200 in the embodiment of fig. 1.

Fig. 3 is a diagram illustrating the effect of the first heating in step S300 according to a specific implementation manner in the embodiment of fig. 1.

Fig. 4 is a diagram illustrating the effect of the second heating in step S300 according to a specific implementation manner in the embodiment of fig. 1.

Fig. 5 is a logic diagram of a method for controlling heating of a thermal printer according to an embodiment of the present invention.

Fig. 6 is an initial heating point diagram of a row of data to be printed according to an embodiment of the present invention.

FIG. 7 is a heat map showing the heating required after the concentration-lowering step is carried out on the basis of the embodiment of FIG. 6.

FIG. 8 is a diagram illustrating the effect of the first heating in step S300 based on the embodiment of FIG. 7

Fig. 9 is a block diagram of a control device for heating a thermal printer according to an embodiment of the present invention.

Detailed Description

Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are illustrative only and should not be construed as limiting the invention.

As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, or operations, but do not preclude the presence or addition of one or more other features, integers, steps, operations, or groups thereof.

It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.

Referring to fig. 1, the present invention provides a method for controlling heating of a thermal printer, the method comprising the following steps:

s100: and acquiring data to be printed.

An operator inputs characters and/or graphics to be printed into the thermal printer every time the operator prints, and at the moment, the thermal printer acquires data to be printed corresponding to the characters and/or graphics.

S200: and converting the data to be printed into heating points at corresponding positions, and combining all the heating points to form the data to be printed.

In this embodiment, data to be printed is converted into heating points at corresponding positions, and the characters and/or graphics formed by heating the heating points are the characters and/or graphics to be printed.

As shown in fig. 2, taking the printing of "king" word as an example, the data to be printed is converted into a heating point combination arranged in multiple rows, where the first bit, the third bit, the fifth bit, and so on of the heating point in each row are odd bits, and the second bit, the fourth bit, the sixth bit, and so on are even bits.

S300: when any line in the data to be printed is printed, heating points of any type in odd-numbered positions or even-numbered positions in the line are taken for heating, and then heating points of the remaining type are taken for heating.

In this embodiment, the odd-numbered heating points and the even-numbered heating points in the data to be printed are heated separately, and the odd-numbered heating points may be heated first and the even-numbered heating points may be heated later; the ink-jet printer can also heat heating points at even positions and then heat heating points at odd positions, so that the ink marks of printed characters or pictures can be more uniform as long as the aim of heating at intervals is fulfilled, and the printing effect is effectively improved.

Specifically, as shown in fig. 3-4, fig. 3 is a case of heating the heating points in odd-numbered bits in the data to be printed first, and fig. 4 is a diagram of the effect after two times of heating.

Furthermore, in the embodiment of the invention, the printable area is divided into a point set of m rows and n columns in advance, any point corresponds to a printable area coordinate information, wherein m and n are positive integers; the step of converting the data to be printed into heating points at corresponding positions, wherein all the heating points are combined to form the data to be printed, further comprises the following steps:

any heating point corresponds to the coordinate information of the printable area.

In this embodiment, the printable area is divided into a set of a plurality of points, and each point corresponds to coordinate information of rows and columns. After the data to be printed is obtained, the heating point converted from the data to be printed is any one of the point sets divided by the printable area, namely the heating point corresponds to the coordinate information of the printable area, and the odd number bit and the even number bit are distinguished conveniently according to the coordinate information.

Referring to fig. 5, in an embodiment of the present invention, before printing the data to be printed, a density reducing step S400 is further included, including:

s400 a: the heating points which are continuously adjacent in each row are divided into two groups.

S400 b: and removing any heating point in each group in the data to be printed.

Due to the principle of thermal printers, printing does not require the use of ink, and therefore, it is not possible to adjust the gradation of the printing effect by changing the ink density. In the embodiment, the printing density can be reduced on the basis of realizing printing of characters and/or graphics by a method of removing any one of the continuous black points.

Specifically, before executing the reduced density printing step, the judgment of the printing density is needed, and if the normal gray scale printing is needed, the step is executed directly according to the step S300; if low gray scale printing is required, the step S400 is performed and then the steps are performed. In step S100 and step S200, "acquiring data to be printed and converting the data to be printed into heating dots at corresponding positions" may be performed before the print density is determined, or after the determination is performed, the following steps need to be performed in step S100 and step S200 regardless of whether yes or after the determination is detected.

Further, as described in fig. 6 to 8, "removing any one of the heating dots in each group in the data to be printed" specifically includes:

the heating point groups of either one of the odd-numbered groups or the even-numbered groups of each row remove heating points located at the front in each group, and the heating point groups of the other one remove heating points located at the rear in each group.

As shown in fig. 6, fig. 6 shows a row of data to be printed, which is initially heated, and after the specific implementation of removing the heating dots in the present embodiment is adopted, the heating dots that should be heated are as shown in fig. 7, and fig. 8 is a graph showing the effect of performing "heating first by taking any kind of heating dots in odd-numbered bits or even-numbered bits in the row" on the basis of fig. 7.

In one embodiment, the present invention provides a thermal printer heating control apparatus 100, the apparatus storing a plurality of instructions adapted to be loaded by a processor and execute a thermal printer heating control method, comprising:

and S100, acquiring data to be printed.

And S200, converting the data to be printed into heating points at corresponding positions, and combining all the heating points to form the data to be printed.

And S300, when any line in the data to be printed is printed, heating the heating points of any one of the odd-numbered positions or the even-numbered positions in the line, and then heating the heating points of the remaining one.

For convenience of description, the apparatus is split into a functional module architecture, as shown in fig. 9, including:

the acquiring module 10 is used for acquiring data to be printed.

The conversion module 20 is configured to convert the data to be printed into heating points at corresponding positions, where all the heating points are combined to form the data to be printed.

And the heating module 30 is configured to, when any one row in the to-be-printed data is printed, take any one type of heating points in odd-numbered positions or even-numbered positions in the row to heat first, and then take the remaining one type of heating points to heat.

The present invention also provides a thermal printer comprising:

one or more processors;

a storage device for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the control method for thermal printer heating described above.

Throughout the description and claims of this application, the words "comprise/comprises" and the words "have/includes" and variations of these are used to specify the presence of stated features, values, steps or components but do not preclude the presence or addition of one or more other features, values, steps, components or groups thereof.

Some features of the invention, which are, for clarity, described in the context of separate embodiments, may also be provided in combination in a single embodiment. Conversely, certain features of the invention, which are, for brevity, described in the context of a single embodiment, may also be provided separately or in any suitable combination in different embodiments.

The above description specifically describes the respective embodiments of the method and apparatus for controlling heating of a thermal printer according to the present invention. Finally, it should be noted that the above embodiments are only used for illustrating the technical solutions of the present invention and not for limiting the same. Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims.

15页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:智能标签打印机

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类