CN117644725A - Improved gray printing control method for thermal printer - Google Patents

Improved gray printing control method for thermal printer Download PDF

Info

Publication number
CN117644725A
CN117644725A CN202311691616.3A CN202311691616A CN117644725A CN 117644725 A CN117644725 A CN 117644725A CN 202311691616 A CN202311691616 A CN 202311691616A CN 117644725 A CN117644725 A CN 117644725A
Authority
CN
China
Prior art keywords
point
data
gray
gray scale
gray level
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311691616.3A
Other languages
Chinese (zh)
Inventor
许开河
陈志钦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Rongda Hezhong Xiamen Technology Group Co ltd
Original Assignee
Rongda Hezhong Xiamen Technology Group Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Rongda Hezhong Xiamen Technology Group Co ltd filed Critical Rongda Hezhong Xiamen Technology Group Co ltd
Priority to CN202311691616.3A priority Critical patent/CN117644725A/en
Publication of CN117644725A publication Critical patent/CN117644725A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electronic Switches (AREA)

Abstract

The invention provides an improved gray printing control method of a thermal printer, which comprises the following steps: acquiring data of each point row and determining gray level; calculating the number of heating points with the gray scale being more than 0; carrying out segmentation processing on points with gray scale larger than 0 in all the point data of each point row; the binary values of the same bit of all points are combined into a data set; calculating the actual effective heating point number of a data set under each gray level; calculating the actual effective heating point number under each gray level and the gating time of each gray level to obtain the gating time of each gray level under different heating point numbers; sending each data group data to the thermal print head at a corresponding gating time; the thermal print head receives specific data to heat the corresponding heating body, the invention reduces the sending times of the data group through sectional processing, improves the gray printing speed, compensates the gating time of the effective heating points, and carries out finer processing on the gating time so as to better realize gray effect and finer level change.

Description

Improved gray printing control method for thermal printer
Technical Field
The invention relates to the technical field of printing control, in particular to an improved gray printing control method for a thermal printer.
Background
Common laser printers, thermal printers and needle printers cannot print colors, if a color image is required to be printed, color image content is required to be converted into black and white content for printing, the printed binary image has obvious granular feel, serious picture detail loss, text saw teeth, poor picture effect and difficult perfect realization of level change and gradual change. Based on the above drawbacks, a gray scale printing technique, which is also called gray scale printing, is invented by those skilled in the art, and refers to a printing technique for expressing color contents with gray colors of different degrees from light to deep.
Before gray printing, the gray level of each pixel point of each point line is determined, the gray level is converted into n-bit binary data, and then binary data of the same bit of all point data of one point line is formed into a data group to form n data groups. In practical application, in order to meet the characteristics of the thermal print head and ensure the gray printing effect, all dot data of one dot line is divided into m segments, so that m times n times are needed to be sent when all dot data of one dot line is sent, and the speed is low. The n data sets are transmitted, the gray scale gating time corresponding to each gray scale is fixed by T1, T2, T4, T8, and the number of the effective heating points is equal to the number of the effective heating points, and the gray scale effect and the level change are not ideal. In addition, the conventional gray scale printing has the problem that the gray scale printing speed is uniform in the case of a high printing rate or a low printing rate picture.
In view of this, the present inventors have specifically devised an improved gray print control method for thermal printers, and this results from this.
Disclosure of Invention
In order to solve the problems, the technical scheme of the invention is as follows:
an improved gray scale printing control method for a thermal printer, comprising:
s1, acquiring all data of each point row, and determining the gray level of each point row;
s2, calculating the heating point Dt with the gray scale larger than 0 in all point data of each point row;
s3, carrying out sectional processing on points with gray scale larger than 0 in all point data of each point row by combining a thermal print head manual and voltage and current distribution;
s4, forming binary values of the same bits of all points of the segmented point data into a data set;
s5, calculating the actual effective heating point Dv of the thermal print head under each gray level of each data set;
s6, calculating the actual effective heating point Dv of the thermal print head under each gray level and the gating time of each gray level to obtain the gating time of each gray level under different heating points;
s7, sending the data of each data group to the thermal print head at the corresponding gating time;
s8, the thermal print head receives the specific data and enables the corresponding heating body to generate heat.
Preferably, the segmentation method in step S3 is as follows:
s31, combining a thermal print head manual and voltage and current distribution to determine the maximum segmentation number m Max
S32, according to the maximum segmentation number m Max Calculating the number Dh of points which can be heated by the thermal print head at the same time according to the parameters of the thermal print head Number of Heat Elements;
s33, carrying out segmentation processing on points with gray scale larger than 0 in the line data of each point according to Dh to obtain an effective segmentation number m.
Preferably, the effective segmentation number m is less than or equal to m Max
Preferably, in step S4, the data set is formed in the following manner:
s41, searching effective heating points of the thermal print head according to a preset sequence, and forming a group of data by binary values of the same bits of all points of the data of each m-segment point data to form m multiplied by n data groups.
Preferably, in step S6, the gating time of each gray level under different heating points is calculated by:
s61, calculating the effective heating point Dv of each data set, and according to the gating time T with the actual effective heating point Dh of each gray level 1 、T 2 、T 4 、T 8 、T 16 、......、And the actual effective heating point Dv of each gray level 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n The corresponding relation of each gray level is calculated to obtain the actual effective gray levelHeating point Dv 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n Is the strobe time TT of (1) 1 、TT 2 、TT 4 、TT 8 、TT 16 、......、/>
Wherein:
preferably, in step S6, the actual effective heating point of each gray level is DhThe calculation can be performed according to a thermal printhead specification providing formula:
R ave =R res +R lead Aerage resistance (Ex.)80(Ω);
(R res :Heater resistance);
(R leαd :Lead resistance);
N:Number of dots firing at same time (Ex)64(dots);
R com :Common resistance (Ex.)0.08(Ω);
R ic :Driver saturated resistance (Ex.)9(Ω);
wherein T is on Namely, is
Preferably, the relation between the effective segmentation number m and the heating point number Dt with the gray level greater than 0 is:
the larger the dot number Dt value of which the gray level is larger than 0, the higher the printing rate, and the larger the effective segment number m value.
Preferably, the specific data is 0 or 1.
The invention determines the gray level of all point data of each point line, calculates the point number with the gray level larger than 0 in all point data of each point line, combines a thermal print head manual and voltage and current distribution to perform segmentation processing, reduces the sending times of a data set, realizes the improvement of the gray printing speed, and simultaneously solves the problems of high gray printing rate and low printing rate of the gray printing speed of pictures;
in addition, the invention uses the gating time T with the actual effective heating point of each gray level as Dh 1 、T 2 、T 4 、T 8 、T 16 、......、And the actual effective heating point Dv of each gray level 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n The corresponding relation of the actual effective heating point Dv of each gray level is calculated 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n Is the strobe time TT of (1) 1 、TT 2 、TT 4 、TT 8 、TT 16 、......、/>The gating time compensation of the actual effective heating points is carried out, and finer processing is carried out on the gating time, so that the gray effect and finer level change are better realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention.
Wherein:
FIG. 1 is a diagram of characteristics of a sheet of paper according to the present invention;
FIG. 2 is a flow chart of a gray print control method of the present invention;
FIG. 3 is a partial content of a thermal print head manual;
FIG. 4 is a schematic illustration of a segment in the print control method of the present invention;
fig. 5 is a graph of correspondence between gray scale, strobe time, data set, actual effective heating point Dv in a gray scale print control method of a thermal printer.
Description of the reference numerals:
s1, a first step is carried out; s2, a second step is carried out; s3, a third step is carried out; s4, a fourth step; s5, a fifth step; s6, a step six is performed; s7, a step seven; s8, step eight.
Detailed Description
In order to make the technical problems, technical schemes and beneficial effects to be solved more clear and obvious, the invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1 to 5, an improved gray scale printing control method for a thermal printer according to a preferred embodiment of the present invention is shown.
In this example, 16 gray levels are used as an example, and first, a suitable gray level paper (paper characteristics are shown in fig. 1), that is, a gray level density range of 0 to 15 gray levels of 0 to 1.42 is selected.
Fig. 2 is a flowchart of an improved gray print control method for a thermal printer according to a first embodiment of the present invention.
S1, acquiring all point data of each point row, and determining the gray level of each point row.
S2, calculating the point Dt with gray level larger than 0 in all the point data of each point row.
The point with the gray level greater than 0 indicates that the point needs to be heated, the specific heating time length needs to be further confirmed according to the gray level of the point, and the point Dt with the gray level greater than 0 in all the point data of each point row is counted and used for calculating the effective segmentation number m of each point row subsequently.
S3, combining a thermal print head manual, voltage and current distribution and practical application to determine the maximum segmentation number m Max According to the maximum number of segments m Max And the thermal print head Number of Heat Elements parameters calculate the number of dots Dh that the thermal print head can heat simultaneously.
Specifically, as shown in fig. 3, which is a manual section of a thermal print head, it is assumed that the thermal print head is powered by a battery, and the battery parameters are: the battery voltage is 4.2V, the battery capacity is 2000mAh, the discharge multiplying power is 3C, and the maximum power output by the battery is calculated as follows: 25.2W, the maximum simultaneous heating point number is: 157.5, the maximum number of segments m Max The requirement is more than or equal to 4.
The main purpose of the two-step segmentation processing is to reduce the segmentation number, further reduce the number of times of subsequent data group transmission and improve the gray printing speed.
FIG. 4 is a schematic diagram of a printing segment of an improved gray scale printing control method for a thermal printer, with a maximum segment number of m Max For example, =8, the thermal printhead 576 heating dots, split every 72 heating dots, split as follows for subsequent dot-seeking segments:
m1{ A1, A2, A3, A4, A5, A6, & gt.
M2{ B1, B2, B3, B4, B5, B6, & gt.
M3{ C1, C2, C3, C4, C5, C6, & gt.
M4{ D1, D2, D3, D4, D5, D6, & gt.
M5{ E1, E2, E3, E4, E5, E6, & gt.
M6{ F1, F2, F3, F4, F5, F6, & gt.
M7{ G1, G2, G3, G4, G5, G6, & gt.
M8{ H1, H2, H3, H4, H5, H6, & gt.
According to the array sequence (arbitrary designation) of S { M2, M4, M6, M8, M1, M3, M5 and M7}, firstly starting to search the effective heating point of the thermal printing head from the B1 point of M2, namely the heating point with the gray level larger than 0, until the actual effective heating point reaches Dh which is 1 section, recording the current position, and immediately continuing to search the heating point of the next section until the G72 point of M7 is searched, finishing the searching of all the heating points of the thermal printing head, and completing the section M to obtain the effective section number M.
The effective segmentation number m has a certain relation with the dot number Dt with the gray level larger than 0, and the larger the dot number Dt value with the gray level larger than 0, namely the higher the printing rate, the larger the effective segmentation number m value.
S4, acquiring point line data of each m segment, and forming a group of data by binary values of the same bit of all points of the point line data of each m segment, thereby forming an (m multiplied by n) data group.
Calculating the actual effective heating point Dv of each n data groups under m segments by using the (m multiplied by n) data groups through a traversing method 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n For subsequent calculation of actual effective heating point Dv for each gray level 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n Is set to be a normal state.
Fig. 5 shows the correspondence between gray scale, strobe time, data set, and actual effective heating point Dv of an improved gray scale print control method for thermal printers.
At this time, the gating time T with the actual effective heating point number of 1-level gray scale Dh 1 Gating time T with actual effective heating point of 2-level gray scale Dh 2 Gating time T with actual effective heating point number of 4-level gray scale Dh 4 Gating time T with actual effective heating point number of 8-level gray scale Dh 8 Gating time T with actual effective heating point of 16-level gray scale Dh 16 Similarly, the (2 n-1) gray scale actual effective heating point is adoptedGating time of Dh
The gating time of the 3-level gray scale with the actual effective heating point Dh can be decomposed into T 2 +T 1 The gating time with the actual effective heating point of 5-level gray scale Dh can be decomposed into T 4 +T 1 Similarly, the gate time of Dh, which is the actual effective heating point for each gray level, can be decomposed into 1, 2, 4, 8, and 2 n-1 And the sum of basic gray scales of each level.
S5, calculating the actual effective heating point Dv of the thermal print head under the corresponding gray level of each data set by a traversing method.
At this time, the actual effective heating point Dv of the data set 1 1 Data set 2 actual effective heating point Dv 2 Data set 3 actual effective heating point Dv 3 Data set 4 actual effective heating point Dv 4 Data set 5 actual effective heating point Dv 5 Similarly, the data set n is the actual effective heating point Dv n
S6, gating time T for effectively heating points of each gray level to Dh 1 、T 2 、T 4 、T 8 、T 16 、......、And the actual effective heating point Dv of each gray level 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n The corresponding relation of the actual effective heating point Dv of each gray level is calculated 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n Is the strobe time TT of (1) 1 、TT 2 、TT 4 、TT 8 、TT 16 、......、/>
At this time
S7, data of each data group is processed at the corresponding gating time TT 1 、TT 2 、TT 4 、TT 8 、TT 16 、......、To a thermal print head.
S8, after the thermal print head receives the data of the data set, starting corresponding gating time TT 1 、TT 2 、TT 4 、TT 8 、TT 16 、......、At the strobe time, the received data is assumed to be heated for a particular value (1 or 0), otherwise, not heated.
Therefore, after the thermal print head receives all data sets, the corresponding gray image data can be printed and output on the consumable.
Further, in step S6, the effective heating point for each gray level is set to be Dh for the gate time T 1 、T 2 、T 4 、T 8 、T 16 、......、The calculation can be performed according to a thermal printhead specification providing formula:
Rave=R res +R lead Average resistance (Ex.)80(Ω)
(R res :Heater resistance)
(R lead :Lead resistance)
N:Number of dotsfiring at same time (Ex.)64(dots)
R com :Common resistance (Ex.)0.08(Ω)
R ic :Driver saturated resistance (Ex.)9(Ω)
wherein T is on Namely, isE 0 According to the thermal print head manual.
The method determines the gray level of all point data of each point row, calculates the point number with the gray level larger than 0 in all point data of each point row, performs segmentation processing by combining a thermal print head manual and voltage and current distribution, reduces the sending times of a data set, realizes the improvement of the gray printing speed, and simultaneously solves the problems of high gray printing rate and low printing rate of the gray printing speed of pictures.
In addition, the invention uses the gating time T with the actual effective heating point of each gray level as Dh 1 、T 2 、T 4 、T 8 、T 16 、......、And the actual effective heating point Dv of each gray level 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n The corresponding relation of the actual effective heating point Dv of each gray level is calculated 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n Is the strobe time TT of (1) 1 、TT 2 、TT 4 、TT 8 、TT 16 、......、/>Namely, the gating time compensation of the actual effective heating point number is carried out, and the gating time is finer and finerTo better achieve gray scale effects and finer level changes.
While the invention has been described above with reference to the accompanying drawings, it will be apparent that the invention is not limited to the above embodiments, but is capable of being modified or applied directly to other applications without modification, as long as various insubstantial modifications of the method concept and technical solution of the invention are adopted, all within the scope of the invention.

Claims (8)

1. An improved gray print control method for a thermal printer, comprising:
s1, acquiring all data of each point row, and determining the gray level of each point row;
s2, calculating the heating point Dt with the gray scale larger than 0 in all point data of each point row;
s3, carrying out sectional processing on points with gray scale larger than 0 in all point data of each point row by combining a thermal print head manual and voltage and current distribution;
s4, forming binary values of the same bits of all points of the segmented point data into a data set;
s5, calculating the actual effective heating point Dv of the thermal print head under each gray level of each data set;
s6, calculating the actual effective heating point Dv of the thermal print head under each gray level and the gating time of each gray level to obtain the gating time of each gray level under different heating points;
s7, sending the data of each data group to the thermal print head at the corresponding gating time;
s8, the thermal print head receives the specific data and enables the corresponding heating body to generate heat.
2. The improved gray scale printing control method of thermal printer according to claim 1, wherein the segmentation method in step S3 is as follows:
s31, combining a thermal print head manual and voltage and current distribution to determine the maximum segmentation number m Max
S32, according to the maximumNumber of segments m Max Calculating the number Dh of points which can be heated by the thermal print head at the same time according to the parameters of the thermal print head Number of Heat Elements;
s33, carrying out segmentation processing on points with gray scale larger than 0 in the line data of each point according to Dh to obtain an effective segmentation number m.
3. An improved gray scale printing control method of thermal printer according to claim 2, wherein the effective segmentation number m is less than or equal to m Max
4. The gray scale printing control method of an improved thermal printer according to claim 2, wherein in step S4, the data set is formed by:
s41, searching effective heating points of the thermal print head according to a preset sequence, and forming a group of data by binary values of the same bits of all points of the data of each m-segment point data to form m multiplied by n data groups.
5. The gray scale printing control method of improved thermal printer according to claim 4, wherein in step S6, the gating time of each gray scale under different heating points is calculated by:
s61, calculating the actual effective heating point Dv of each data set, and according to the gating time T with the actual effective heating point Dh of each gray level 1 、T 2 、T 4 、T 8 、T 16 、......、And the actual effective heating point Dv of each gray level 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n The corresponding relation of the actual effective heating point Dv of each gray level is calculated 1 、Dv 2 、Dv 3 、Dv 4 、Dv 5 、......、Dv n Is the strobe time TT of (1) 1 、TT 2 、TT 4 、TT 8 、TT 16 、......、/>
Wherein:
6. the gray scale printing control method of thermal printer according to claim 5, wherein in step S6, the actual effective heating point of each gray scale is Dh for a strobe timeThe calculation can be performed according to a thermal printhead specification providing formula:
R ave =R res +R lead Average resistance (Ex.)80(Ω);
(R res :Heater resistance);
(R lead :Lead resistance);
N:Number of dots firing at same time(Ex.)64(dots);
R com :Common resistance(Ex.)0.08(Ω);
R ic :Driver saturated resistance(Ex.)9(Ω);
wherein T is on Namely, is
7. The improved gray scale printing control method of thermal printer according to claim 2, wherein the relation between the effective segmentation number m and the number of heating points Dt with gray scale greater than 0 is:
the larger the dot number Dt value of which the gray level is larger than 0, the higher the printing rate, and the larger the effective segment number m value.
8. An improved gray scale printing control method of thermal printer according to claim 1, wherein the specific data is 0 or 1.
CN202311691616.3A 2023-12-11 2023-12-11 Improved gray printing control method for thermal printer Pending CN117644725A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311691616.3A CN117644725A (en) 2023-12-11 2023-12-11 Improved gray printing control method for thermal printer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311691616.3A CN117644725A (en) 2023-12-11 2023-12-11 Improved gray printing control method for thermal printer

Publications (1)

Publication Number Publication Date
CN117644725A true CN117644725A (en) 2024-03-05

Family

ID=90046145

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311691616.3A Pending CN117644725A (en) 2023-12-11 2023-12-11 Improved gray printing control method for thermal printer

Country Status (1)

Country Link
CN (1) CN117644725A (en)

Similar Documents

Publication Publication Date Title
CN1104586A (en) Thermal printer and printing method thereof
JPH11240183A (en) Method for compensating for printing
JPS62256576A (en) Thermosensitive recorder
CN101549591B (en) Gray level print control method and device
JPH11198452A (en) Image correction method
EP3326826B1 (en) Thermal printer
CN117644725A (en) Improved gray printing control method for thermal printer
CN115390774A (en) Rapid printing method based on portable thermal printer and storage medium
EP0452928A2 (en) Multi-gradation image recording apparatus
US7259775B2 (en) Image recording apparatus
CN114274692B (en) Gray scale printing method of thermal printer
EP0517263B1 (en) Thermal transfer image forming apparatus
JP4460482B2 (en) Image data generation device, image data generation processing program, melt type thermal transfer recording device, etc.
KR20010030303A (en) Head controller of thermal printer and thermal printer printing method
JP6461191B2 (en) Ink jet printer and method of operating an ink jet printer
US6031554A (en) Halftone recording method and apparatus
JP4046816B2 (en) Thermal head drive device
JP2946864B2 (en) Thermal transfer type image forming device
JP3094539B2 (en) Thermal transfer type image forming device
JP3094540B2 (en) Thermal transfer type image forming device
JPH10202920A (en) Device and method for ink jet recording
JP2016163080A (en) Printing device, printing method, image processing apparatus and computer program
GB2290190A (en) Low resolution printer having high resolution image processing
JP2021037771A (en) Thermal printer
CN114312036A (en) Method for controlling history of heating data of thermal head, storage medium, and printer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication