Thermal printing method and device, equipment, storage medium and program product
By obtaining and adjusting the heating level and duration of the target heating point of the print head in the thermal printing equipment, the problems of uneven printing concentration and carbon tape breakage are solved, and high-quality thermal printing effect is achieved.
Patent Information
- Application Number
- CN202510218228.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-07-22
AI Technical Summary
When existing thermal printing equipment prints multiple lines of page content, it is easy to have problems such as uneven printing concentration and broken carbon tape, especially because the working state parameters of the print head change with the changes in the printed lines.
By obtaining the multiple target heating points that the printhead needs to enable when printing the current line, determining the heating level of each target heating point, and adjusting the heating time according to the current working state parameters of the printhead, controlling the printhead for graded heating to ensure the reasonable energy input of each target heating point.
It effectively avoids the problems of uneven printing concentration and carbon tape breakage, ensures the quality of thermal printing, and extends the service life of the print head.
Smart Images

Figure CN120348071A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of printing technology, and in particular, to a thermal printing method, device, equipment, storage medium, and program product. Background Art
[0002] Printing devices usually transfer the coating on the carbon ribbon to printing media such as labels, papers, and wire number tubes through thermal transfer. In related technologies, before starting to print a page of content, the printing device determines the heating duration of each heating point according to the working state parameters of the print head (such as the starting temperature). In addition, the printing device also adjusts the heating duration of each heating point according to the number of printing points to be enabled, so as to optimize the printing effect.
[0003] However, when multiple lines of page content need to be printed, since the working state parameters of the print head change continuously with the printed lines on the page, problems such as uneven printing density (such as the printing density gradually increasing) and carbon ribbon breakage are likely to occur. Therefore, a thermal printing method that can effectively ensure the printing quality is needed. Summary of the Invention
[0004] Embodiments of this application provide a thermal printing method, device, equipment, storage medium, and program product, which can effectively ensure the printing quality. The above technical solutions are as follows:
[0005] In a first aspect, an embodiment of this application provides a thermal printing method, including:
[0006] Obtain a plurality of target heating points that need to be enabled when the print head prints the current line;
[0007] Determine the heating level corresponding to each of the plurality of target heating points; different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration;
[0008] Based on the current working state parameters of the print head, adjust the initial heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating;
[0009] Control the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
[0010] In a possible implementation manner, based on the current working state parameters of the print head, adjusting the initial heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating includes:
[0011] Based on the current temperature value of the print head, and / or the current driving voltage value of the print head, and / or the number of target heating points corresponding to each heating level, adjust the initial heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating.
[0012] In a possible implementation, based on the current temperature value of the print head, and / or the current driving voltage value of the print head, and / or the number of target heating points corresponding to each heating level, adjust the initial heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating, including:
[0013] According to the current temperature value of the print head and the reference temperature value of the print head, adjust the initial heating duration corresponding to each heating to obtain the first adjusted heating duration corresponding to each heating;
[0014] According to the current driving voltage value of the print head and the driving voltage threshold of the print head, adjust the first adjusted heating duration corresponding to each heating to obtain the second adjusted heating duration corresponding to each heating;
[0015] According to the number of target heating points corresponding to each heating level, adjust the second adjusted heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating.
[0016] In a possible implementation, according to the current driving voltage value of the print head and the driving voltage threshold of the print head, adjusting the first adjusted heating duration corresponding to each heating to obtain the second adjusted heating duration corresponding to each heating includes:
[0017] Determine a voltage compensation coefficient according to the current driving voltage value of the print head;
[0018] According to the voltage compensation coefficient, the current driving voltage value and the driving voltage threshold, adjust the first adjusted heating duration corresponding to each heating to obtain the second adjusted heating duration corresponding to each heating.
[0019] In a possible implementation, according to the number of target heating points corresponding to each heating level, adjusting the second adjusted heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating includes:
[0020] Determine a heating point number compensation coefficient according to the number of target heating points corresponding to each heating level;
[0021] According to the heating point number compensation coefficient and the number of target heating points corresponding to each heating level, adjust the second adjusted heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating.
[0022] In a possible implementation, the above method further includes:
[0023] Divide the current line into at least one printing segment according to the number of target heating points;
[0024] Control the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, including:
[0025] Control the print head to sequentially complete the thermal printing of each printing segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
[0026] In a possible implementation, control the print head to sequentially complete the thermal printing of each printing segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, including:
[0027] Control the print head to perform time-division heating on the target heating points corresponding to each printing segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, so as to complete the thermal printing of each printing segment.
[0028] In a possible implementation, determining the heating level corresponding to each of the multiple target heating points includes:
[0029] Determine the heating level corresponding to each of the multiple target heating points according to the printing data of the current line and its adjacent lines.
[0030] In a possible implementation, after controlling the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, the method further includes:
[0031] Cool the print head, and determine the heating parameters of the print head when printing the next line during the cooling process.
[0032] In a second aspect, an embodiment of the present application provides a thermal printing device, including:
[0033] An acquisition module, configured to acquire multiple target heating points that need to be enabled when the print head prints the current line;
[0034] A grading module, configured to determine the heating level corresponding to each of the multiple target heating points; different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration;
[0035] An adjustment module, configured to adjust the initial heating duration corresponding to each heating based on the current working state parameters of the print head to obtain the target heating duration corresponding to each heating;
[0036] A control module, configured to control the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
[0037] In a third aspect, an embodiment of the present application provides a thermal printing device, including: a processor and a memory; wherein, the memory stores a computer program, and when the processor executes the computer program, the method steps provided in the first aspect of the embodiment of the present application are implemented.
[0038] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores multiple instructions, and the above instructions are adapted to be loaded and executed by a processor to implement the method steps provided in the first aspect of the embodiment of the present application.
[0039] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program; when the above computer program is executed by a processor, the method steps provided in the first aspect of the embodiment of the present application are implemented.
[0040] For the above thermal printing method, device, equipment, storage medium and program product, by obtaining multiple target heating points that need to be enabled when the print head prints the current line, determining the heating levels corresponding to the multiple target heating points respectively, where the heating times corresponding to each heating level are different, and each heating corresponds to a preset initial heating duration, it is convenient to perform on-demand heating on each target heating point based on the heating level corresponding to each target heating point when printing the current line; by adjusting the initial heating duration corresponding to each heating based on the current working state parameters of the print head, obtaining the target heating duration corresponding to each heating, it can adaptively adjust the heating parameters of the print head according to the actual working conditions to ensure that the print head heats each target heating point reasonably during the process of printing the current line; by controlling the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, it can combine the classified target heating points and the adjusted target heating duration to control the print head to complete the thermal printing, avoiding problems such as uneven printing density and carbon ribbon breakage. Using the above method can effectively ensure the printing quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0042] Figure 1 It is a schematic diagram of the application environment of a thermal printing method provided by an exemplary embodiment of the present application;
[0043] Figure 2 It is a schematic flow chart of a thermal printing method provided by an exemplary embodiment of the present application;
[0044] Figure 3Schematic flowchart of another thermal printing method provided by an exemplary embodiment of the present application;
[0045] Figure 4 Schematic flowchart of another thermal printing method provided by an exemplary embodiment of the present application;
[0046] Figure 5 Schematic flowchart of another thermal printing method provided by an exemplary embodiment of the present application;
[0047] Figure 6 Schematic structural diagram of a thermal printing device provided by an exemplary embodiment of the present application;
[0048] Figure 7 Schematic structural diagram of a thermal printing device provided by an exemplary embodiment of the present application. Detailed implementation manners
[0049] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, and are not used to limit the present application.
[0050] In the description of the present application, it should be understood that terms such as "first" and "second" are only used for descriptive purposes, and cannot be construed as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific circumstances. In addition, in the description of the present application, unless otherwise specified, "a plurality of" means two or more than two. "And" describes the association relationship of associated objects, indicating that three relationships can exist. For example, A and B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0051] The thermal printing method provided by the embodiments of the present application can be applied to an application environment as shown in Figure 1 . Specifically, the printing device controller 10 communicates with the print head 20 through a network. Specifically, the printing device controller 10 obtains a plurality of target heating points that need to be enabled when the print head 20 prints the current line, and divides the plurality of target heating points into multiple different heating levels; the heating times corresponding to each heating level are different, and each heating corresponds to a preset initial heating duration; based on the current working state parameters of the print head 20, the initial heating duration corresponding to each heating is adjusted to obtain the target heating duration corresponding to each heating; according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, the print head 20 is controlled to complete the thermal printing of the current line.
[0052] It should be noted that the printing device controller 10 may but is not limited to include an MCU (Microcontroller Unit), an SoC (System on a Chip), a DSP (Digital Signal Processor), etc. The print head 20 may but is not limited to be a dot matrix thermal print head. The multiple heating points on the print head 20 may but are not limited to be arranged in a row. Each heating point may but is not limited to be an independent heatable unit composed of a semiconductor heating element, and each heating point has a corresponding heating switch pin. During the printing process, the heating duration of each target heating point can be controlled by adjusting the power-on duration of the pins of each target heating point. After the heated target heating points come into contact with the printing medium (such as labels, paper, etc.), specific pixels in the image or text can be generated.
[0053] In one embodiment, as Figure 2 shown, a thermal printing method is provided, including the following steps:
[0054] S201: Obtain multiple target heating points that need to be enabled when the print head prints the current line.
[0055] Wherein, the current line is the line to be printed that the printing device controller is processing and about to print.
[0056] Optionally, the printing device controller obtains the print data of the current line from the memory, parses the print data of the current line, obtains multiple pixel points included in the print data of the current line, and determines multiple target heating points that need to be enabled during the process of the print head printing the current line. It can be understood that the print data of the current line may but is not limited to be text, an image, or a combination of text and an image. The print data of the current line can be either grayscale data or color data, and the specific form thereof is not limited in the embodiments of the present application.
[0057] In this embodiment, by obtaining multiple target heating points that need to be enabled when the print head prints the current line, it is convenient to perform calculation processing only on the multiple target heating points to be enabled subsequently, which can not only effectively ensure the quality of thermal printing, but also save the computing resources of the printing device and speed up the printing speed.
[0058] S202: Determine the heating level corresponding to each of the multiple target heating points; different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration.
[0059] Understandably, not all target heating points require the same energy input. If the pixels around the current row position corresponding to a certain target heating point are relatively dense, there may be residual heat at this target heating point due to previous heating operations. In this case, this target heating point requires less energy input to avoid excessive heating resulting in too high a printing density. If the pixels around the current row position corresponding to a certain target heating point are relatively scattered, this target heating point may not have accumulated enough heat. In this case, this target heating point requires a higher energy input to avoid insufficient heating resulting in too low a printing density.
[0060] Optionally, the printing device controller determines the pixel distribution around the current row position corresponding to each target heating point according to the printing data of the current row and its adjacent rows, and then determines the heating level corresponding to each target heating point according to the pixel distribution around the current row position corresponding to each target heating point. Among them, the adjacent rows may but are not limited to including the N adjacent previous rows and the M adjacent subsequent rows of the current row (both N and M are positive integers, and N and M may be equal or unequal).
[0061] Specifically, the printing device controller can divide multiple target heating points in the current row into Q different heating levels (Q is a positive integer) by using the thermal history algorithm according to the printing data of the current row and its adjacent rows. The target heating points under each heating level can be regarded as a group of target heating points, and subsequent heating can be enabled Q times to gradually heat each group of target heating points.
[0062] Exemplarily, the printing device controller divides multiple target heating points in the current row into six different heating levels L1 to L6 by using the thermal history algorithm according to the printing data of the current row, its adjacent previous 3 rows and its adjacent subsequent 1 row. The heating times corresponding to the six heating levels L1 to L6 decrease in sequence, and each heating corresponds to a preset initial heating duration.
[0063] For example, the initial heating duration t1 corresponding to the first heating can be set to 60 us to heat the target heating points with the heating level of L1; the initial heating duration t2 corresponding to the second heating can be set to 60 us to heat the target heating points with the heating levels of L1 and L2; the initial heating duration t3 corresponding to the third heating can be set to 30 us to heat the target heating points with the heating levels of L1 to L3; the initial heating duration t4 corresponding to the fourth heating is 30 us to heat the target heating points with the heating levels of L1 to L4; the initial heating duration t5 corresponding to the fifth heating is 30 us to heat the target heating points with the heating levels of L1 to L5; the initial heating duration t6 corresponding to the sixth heating is 60 us to heat the target heating points with the heating levels of L1 to L6.
[0064] In this embodiment, the printing device controller determines the heating levels corresponding to multiple target heating points respectively. The heating times corresponding to different heating levels are different, and each heating corresponds to a preset initial heating duration, which facilitates subsequent reasonable control of the energy input to each target heating point according to the target heating level, realizes the on-demand heating of each target heating point, and effectively ensures the quality of thermal printing.
[0065] S203: Based on the current working state parameters of the print head, adjust the initial heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating.
[0066] Among them, the current working state parameters of the print head are the working state parameters when the print head is about to print the current line. The current working state parameters can be but are not limited to at least one of the current temperature value, the current driving voltage value, and the number of target heating points corresponding to each heating level.
[0067] Optionally, the printing device controller adjusts the initial heating duration corresponding to each heating based on the current temperature value of the print head, and / or the current driving voltage value of the print head, and / or the number of target heating points corresponding to each heating level, to obtain the target heating duration corresponding to each heating.
[0068] Exemplarily, after printing the previous line of the current line and before starting to print the current line, the printing device controller obtains the temperature value of the middle part of the print head as the current temperature value, obtains the driving voltage value of the print head as the current driving voltage value, and determines the number of target heating points corresponding to each heating level. Then, based on the current temperature value of the print head, the current driving voltage value of the print head, and the number of target heating points corresponding to each heating level, the above initial heating durations t1 - t6 are adjusted to obtain the target heating durations t1' - t6' corresponding to each heating.
[0069] It should be noted that this embodiment only describes a preferred implementation manner of the present application. After printing the previous line of the current line and before starting to print the current line, the printing device controller can also selectively obtain one or two of the current temperature value of the print head, the current driving voltage value of the print head, and the number of target heating points corresponding to each heating level to adjust the initial heating duration, and the embodiments of the present application do not limit this.
[0070] In this embodiment, the printing device controller adjusts the initial heating duration corresponding to each heating based on the current working state parameters of the print head to obtain the target heating duration corresponding to each heating, which can adaptively adjust the heating parameters of the print head according to the actual situation, ensure that the print head heats each target heating point reasonably during the process of printing the current line, and effectively ensure the quality of thermal printing.
[0071] S204: Control the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating levels corresponding to each target heating point.
[0072] Optionally, the print device controller controls the print head to enable multiple heating operations according to the target heating duration corresponding to each heating and the heating levels corresponding to each target heating point, so as to gradually complete the thermal printing of the current line.
[0073] Exemplarily, during the process of printing the current line, the print device controller can control the print head to enable six heating operations. During each heating operation, the print device controller heats the corresponding target heating points by controlling the pins of the target heating points at each heating level to be energized. After the heated target heating points come into contact with the printing medium, the corresponding printing content in the current line can be generated on the printing medium.
[0074] For example, the print device controller can first set the corresponding energization duration t1' for all target heating points with a heating level of L1, and control all target heating points with a heating level of L1 to be heated; then set the corresponding energization duration t2' for all target heating points with heating levels of L1 and L2, and control the target heating points with heating levels of L1 and L2 to be heated; then set the corresponding energization duration t3' for all target heating points with heating levels of L1 to L3, and control the target heating points with heating levels of L1 to L3 to be heated; then set the corresponding energization duration t4' for all target heating points with heating levels of L1 to L4, and control the target heating points with heating levels of L1 to L4 to be heated; then set the corresponding energization duration t5' for all target heating points with heating levels of L1 to L5, and control the target heating points with heating levels of L1 to L5 to be heated; finally, set the corresponding energization duration t6' for all target heating points with heating levels of L1 to L6, and control the target heating points with heating levels of L1 to L6 to be heated.
[0075] In this embodiment, the print device controller controls the print head to gradually complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating levels corresponding to each target heating point, which can avoid problems such as uneven printing density and carbon ribbon breakage, and effectively ensure the quality of thermal printing.
[0076] In the above thermal printing method, the printing device controller divides multiple target heating points that need to be enabled when the print head prints the current line into multiple different heating levels. The heating times corresponding to each heating level are different, and each heating corresponds to a preset initial heating duration. It can perform hierarchical management on the target heating points on the print head, facilitating on-demand heating of each target heating point when printing the current line. By adjusting the initial heating duration corresponding to each heating based on the current working state parameters of the print head to obtain the target heating duration corresponding to each heating, it can adaptively adjust the heating parameters of the print head according to the actual working conditions, ensuring that the print head heats each target heating point reasonably during the process of printing the current line. By controlling the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, it can combine the hierarchical target heating points and the adjusted target heating duration to control the print head to complete the thermal printing, avoiding problems such as uneven printing density and carbon ribbon breakage. Using the above method can effectively ensure the quality of thermal printing.
[0077] In one embodiment, as Figure 3 shown, another thermal printing method is provided, including the following steps:
[0078] S301: Obtain multiple target heating points that need to be enabled when the print head prints the current line.
[0079] Specifically, S301 is the same as S201 and will not be elaborated here.
[0080] S302: Determine the heating level corresponding to each of the multiple target heating points according to the print data of the current line and its adjacent lines.
[0081] Among them, the adjacent lines may but are not limited to include the N adjacent previous lines and the M adjacent subsequent lines of the current line (both N and M are positive integers, and N and M can be equal or unequal). The heating times corresponding to different heating levels are different, and each heating corresponds to a preset initial heating duration.
[0082] Optionally, the printing device controller uses the method of thermal history calculation to obtain the pixel point distribution around the position of the current line corresponding to each target heating point according to the print data of the current line and its adjacent lines, so as to divide the multiple target heating points into multiple different heating levels to reasonably control the energy input of each target heating point.
[0083] Exemplarily, the printing device controller may divide multiple target heating points into Q different heating levels (Q is a positive integer) according to the printing data of the current line and its adjacent 3 previous lines and 1 next line, and perform Q heating operations subsequently to gradually heat the target heating points of each level. The number of heating times corresponding to each of the above Q heating levels is different, and each of the Q heating operations corresponds to a preset initial heating duration.
[0084] Taking the example that the printing device controller divides multiple target heating points into six different heating levels L1 to L6, the number of heating times corresponding to the six heating levels L1 to L6 may decrease in sequence. For example, the initial heating duration t1 corresponding to the first heating may be set to 60 us to heat the target heating points of heating level L1; the initial heating duration t2 corresponding to the second heating may be set to 60 us to heat the target heating points of heating levels L1 to L2; the initial heating duration t3 corresponding to the third heating may be set to 30 us to heat the target heating points of heating levels L1 to L3; the initial heating duration t4 corresponding to the fourth heating is 30 us to heat the target heating points of heating levels L1 to L4; the initial heating duration t5 corresponding to the fifth heating is 30 us to heat the target heating points of heating levels L1 to L5; the initial heating duration t6 corresponding to the sixth heating is 60 us to heat the target heating points of heating levels L1 to L6.
[0085] In this embodiment, by determining the heating level corresponding to each of the multiple target heating points according to the printing data of the current line and its adjacent lines, the printing device controller can reasonably control the energy input of each target heating point in combination with the actual printing content to perform on-demand heating on each target heating point, thus effectively ensuring the quality of thermal printing.
[0086] S303: Adjust the initial heating duration corresponding to each heating operation based on the current temperature value of the print head, and / or the current drive voltage value of the print head, and / or the number of target heating points corresponding to each heating level, to obtain the target heating duration corresponding to each heating operation.
[0087] Among them, the current temperature value of the print head is the temperature value of the middle part of the print head after printing the previous line of the current line and before starting to print the current line; the current drive voltage value of the print head is the drive voltage value of the print head after printing the previous line of the current line and before starting to print the current line.
[0088] Understandably, before the print head starts printing the current line after printing the previous line of the current line, the remaining temperature may exist at each target heating point on it due to the previous heating operation. Therefore, in combination with the current temperature value of the print head, the heating duration of each heating can be further adjusted to ensure that under the current temperature condition, the print head can complete the printing task of the current line with high quality. In addition, before the print head starts printing the current line after printing the previous line of the current line, the driving voltage value may be insufficient. Therefore, in combination with the current driving voltage value of the print head, the heating duration of each heating can be further adjusted to ensure that under the current voltage condition, the print head can complete the printing task of the current line with high quality. On the other hand, when the print head is printing the current line, the number of target heating points corresponding to each heating level may affect the total energy requirement during each heating process. To ensure that the energy provided by the print head within the preset time period does not exceed the maximum energy limit that can be provided within this time period, in combination with the number of target heating points corresponding to each heating level, the heating duration of each heating can be further adjusted to ensure that under the current printing content condition, the print head can complete the printing task of the current line with high quality.
[0089] Exemplarily, the print device controller adjusts the initial heating durations t1 to t6 corresponding to each heating according to the current temperature value of the print head, the reference temperature value of the print head, and the temperature compensation coefficient corresponding to the reference temperature value, and obtains the first adjusted heating durations t 11 ~t 61 corresponding to each heating; according to the current driving voltage value of the print head and the driving voltage threshold of the print head, the first adjusted heating durations t 11 ~t 61 corresponding to each heating are adjusted to obtain the second adjusted heating durations t 12 ~t 62 corresponding to each heating; according to the number of target heating points corresponding to each heating level, the second adjusted heating duration corresponding to each heating is adjusted to obtain the target heating durations t1' to t6' corresponding to each heating.
[0090] It should be noted that this embodiment only describes a preferred embodiment of the present application. After printing the previous line of the current line and before starting to print the current line, the print device controller can also adjust the initial heating duration corresponding to each heating only according to the current temperature value of the print head. For example, the above t 11 ~t 61 is used as the target heating duration corresponding to each heating; it can also adjust the initial heating duration corresponding to each heating according to the current temperature value and the current driving voltage value of the print head. For example, the above t 12 ~t 62 is used as the target heating duration corresponding to each heating. The embodiments of the present application do not make any limitations in this regard.
[0091] In this embodiment, after obtaining the initial heating duration corresponding to each heating, the printing device controller adjusts the initial heating duration corresponding to each heating according to the current temperature condition of the print head, and / or the current voltage condition, and / or the current printing content condition, so that the finally obtained target heating duration can adapt to the current working state of the print head, thereby effectively ensuring the quality of thermal printing.
[0092] S304: Control the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
[0093] Specifically, S304 is the same as S204 and will not be elaborated here.
[0094] S305: Cool the print head and determine the heating parameters of the print head when printing the next line while cooling.
[0095] Optionally, after the printing device controller controls the print head to complete the thermal printing of the current line, it does not immediately perform the thermal printing of the next line of the current line, but cools the print head and determines the heating parameters of the print head when printing the next line of the current line during the cooling process of the print head, so that after the cooling stage ends, it can directly control the print head to complete the thermal printing of the next line according to the heating parameters. Specifically, the printing device controller can cool the print head by controlling the built-in cooling fan or other cooling devices of the printing device, or directly control the print head to stop heating for natural cooling. The embodiments of the present application do not make limitations on this.
[0096] It can be understood that if the current line is not the first line printed after the printing device starts the printing task, after the previous line of the current line is printed, the printing device controller controls the print head to cool. During the cooling stage of the print head, the printing device controller executes the steps in S301 - S303 of this embodiment to determine the heating parameters of the print head when printing the current line (i.e., the above-mentioned target heating duration). After the above cooling stage ends, the printing device controller executes the steps in S304 of this embodiment to complete the thermal printing of the current line. After the current line is printed, the printing device controller controls the print head to cool again and determines the heating parameters of the print head when printing the next line of the current line during the cooling process, so as to control the print head to complete the thermal printing of the next line after this cooling stage ends.
[0097] In this embodiment, the print device controller controls the print head to be cooled, and determines the heating parameters when printing the next line after the current line during the cooling process of the print head. On the one hand, it can effectively prevent the print head from damaging the thermal sensitive element due to overheating during continuous operation, and maintain a stable printing effect; on the other hand, it can reasonably utilize the cooling time to calculate the heating parameters when the print head prints the next line, improve the printing efficiency, and effectively ensure the quality of thermal printing through the above method.
[0098] In the above thermal printing method, the print device controller determines the heating levels corresponding to multiple target heating points respectively by according to the printing data of the current line and its adjacent lines, so as to reasonably control the energy input of each target heating point according to the preset number of heating times and heating duration during the process of printing the current line, so as to perform heating on demand for each target heating point; after obtaining the initial heating duration corresponding to each heating, by adjusting the initial heating duration corresponding to each heating according to the current temperature condition of the print head, and / or the current voltage condition, and / or the current printing content condition, the finally obtained target heating duration can effectively adapt to the current working state of the print head; by controlling the print head to be cooled, and determining the heating parameters when printing the next line after the current line during the cooling process of the print head, it can not only effectively prevent the print head from damaging the thermal sensitive element due to overheating during continuous operation, maintain a stable printing effect, but also reasonably utilize the cooling time to calculate the heating parameters when the print head prints the next line, improve the printing efficiency. Using the above method can effectively ensure the quality of thermal printing.
[0099] In one embodiment, as Figure 4 shown, another thermal printing method is provided, including the following steps:
[0100] S401: Obtain multiple target heating points that need to be enabled when the print head prints the current line.
[0101] Specifically, S401 is the same as S201, which will not be elaborated here.
[0102] S402: Divide the current line into at least one printing segment according to the number of target heating points.
[0103] It can be understood that the print head can be but is not limited to a dot matrix thermal print head, and the multiple heating points on the print head can be but are not limited to arranged in a row, and each heating point has a corresponding heating switch pin. During the printing process, the print device controller can control the pins of each target heating point to be energized to control each target heating point to heat. In order to control the total working current of the print head and extend the service life of the print head, the print device controller can divide the current line into at least one printing segment according to the number of target heating points corresponding to the current line, so as to print the current line in segments when the number of target heating points is large.
[0104] Optionally, the printing device controller adopts a three-segment segmentation algorithm. Combining the number of target heating points corresponding to the current line and the total number of heating points on the print head, the current line is divided into at least one printing segment. Specifically, if the number of target heating points is less than or equal to one-third of the total number of heating points, the printing device controller divides the current line into one printing segment, that is, there is no need to segment and print the current line subsequently; if the number of target heating points is greater than one-third of the total number of heating points on the print head and less than two-thirds of the total number of heating points, the printing device controller divides the current line into two non-overlapping printing segments with equal lengths to print the current line in two segments subsequently; if the number of target heating points is greater than or equal to two-thirds of the total number of heating points, the printing device controller divides the current line into three non-overlapping printing segments with equal lengths to print the current line in three segments subsequently.
[0105] Exemplarily, assume that the total number of heating points on the print head is 864. If the number of target heating points corresponding to the current line is less than or equal to 864 / 3, the printing device controller takes the current line as one whole printing segment; if the number of target heating points is greater than 864 / 3 and less than 864 / 2, the printing device controller divides the current line into two non-overlapping printing segments with equal lengths; if the number of target heating points is greater than or equal to 864 / 2, the printing device controller divides the current line into three non-overlapping printing segments with equal lengths.
[0106] In this embodiment, by dividing the current line into at least one printing segment according to the number of target heating points, the printing device controller can effectively avoid the total working current of the print head from being too large and affecting the service life of the print head, improving the safety and reliability of thermal printing.
[0107] S403: Determine the heating levels corresponding to each of the multiple target heating points; different heating levels correspond to different numbers of heating times, and each heating corresponds to a preset initial heating duration.
[0108] Optionally, the printing device controller divides the target heating points in each printing segment into Q different heating levels (Q is a positive integer) by using a thermal history algorithm according to the printing data of the current line and its adjacent lines. The target heating points under each heating level can be regarded as a group of target heating points. Subsequently, for each printing segment, Q times of heating can be enabled to gradually heat each group of target heating points.
[0109] The following takes the example that the printing device controller divides the current line into three printing segments and divides the target heating points in each printing segment into six different heating levels L1 to L6 for illustration. Each of the three printing segments has target heating points with heating levels L1 to L6. The heating times corresponding to the six heating levels L1 to L6 decrease in sequence, and each heating corresponds to a preset initial heating duration t1 to t6. For example, the initial heating duration t1 corresponding to the first heating can be set to 60 us to heat the target heating point with heating level L1 in a certain printing segment; the initial heating duration t2 corresponding to the second heating can be set to 60 us to heat the target heating points with heating levels L1 to L2 in the above-mentioned certain printing segment; the initial heating duration t3 corresponding to the third heating can be set to 30 us to heat the target heating points with heating levels L1 to L3 in the above-mentioned certain printing segment; the initial heating duration t4 corresponding to the fourth heating is 30 us to heat the target heating points with heating levels L1 to L4 in the above-mentioned certain printing segment; the initial heating duration t5 corresponding to the fifth heating is 30 us to heat the target heating points with heating levels L1 to L5 in the above-mentioned certain printing segment; the initial heating duration t6 corresponding to the sixth heating is 60 us to heat the target heating points with heating levels L1 to L6 in the above-mentioned printing segment.
[0110] In this embodiment, for at least one divided printing segment, the printing device controller divides the target heating points in each printing segment into multiple different heating levels respectively, and then determines the heating levels corresponding to multiple target heating points in the current line, which can reasonably control the energy input of each target heating point in combination with the actual printing content, ensure that the target heating points in each printing segment are heated as required, and help to improve the quality of thermal printing through the methods of segmented printing and hierarchical management.
[0111] S404: According to the current temperature value of the print head and the reference temperature value of the print head, adjust the initial heating duration corresponding to each heating to obtain the first adjusted heating duration corresponding to each heating.
[0112] It can be understood that after printing the previous line of the current line and before starting to print the current line, the target heating points on the print head may have residual temperature due to the previous heating operations. Therefore, the initial heating duration corresponding to each heating can be adjusted in combination with the current temperature value of the print head and the reference temperature value of the print head to obtain the first adjusted heating duration corresponding to each heating.
[0113] Optionally, the printing device controller determines the temperature compensation coefficient according to the current temperature value of the print head, and then adjusts the initial heating duration corresponding to each heating respectively according to the temperature compensation coefficient, the current temperature value and the reference temperature value to obtain the first adjusted heating duration corresponding to each heating. The specific calculation formula is as follows:
[0114] t q1 = t q -(T - T0)*B(1)
[0115] where t q is the initial heating duration corresponding to the q-th heating (q is a positive integer); t q1 is the first adjusted heating duration corresponding to the q-th heating; T is the current temperature value of the print head; T0 is the reference temperature value of the print head, which can be but is not limited to being set as the temperature value 25°C of the print head at room temperature; B is the temperature compensation coefficient corresponding to the current temperature value, which can be but is not limited to being set as 0.025.
[0116] S405: Adjust the first adjusted heating duration corresponding to each heating according to the current driving voltage value of the print head and the driving voltage threshold of the print head, to obtain the second adjusted heating duration corresponding to each heating.
[0117] It can be understood that before starting to print the current line after printing the previous line of the current line is completed, the driving voltage value of the print head may not be high enough. Therefore, the first adjusted heating duration corresponding to each heating can be further adjusted in combination with the current driving voltage value of the print head and the driving voltage threshold, to obtain the second adjusted heating duration corresponding to each heating, so as to ensure that under the current voltage conditions, the print head can complete the printing task of the current line with high quality.
[0118] Optionally, the print device controller determines the voltage compensation coefficient according to the current driving voltage value of the print head, and then adjusts the first adjusted heating duration corresponding to each heating respectively according to the voltage compensation coefficient, the current driving voltage value and the driving voltage threshold, to obtain the second adjusted heating duration corresponding to each heating. The specific calculation formula is as follows:
[0119]
[0120] where t q1 is the first adjusted heating duration corresponding to the q-th heating (q is a positive integer); t q2is the second adjusted heating duration corresponding to the q-th heating; V is the current driving voltage value of the print head; V0 is the driving voltage threshold of the print head, which can be set to 12.2v, but is not limited thereto; a is the voltage compensation coefficient when the current driving voltage value of the print head is less than 11.6v, which can be set to 0.09, but is not limited thereto; b is the voltage compensation coefficient when the current driving voltage value of the print head is not less than 11.6v and less than 12v, which can be set to 0.10, but is not limited thereto; c is the voltage compensation coefficient when the current driving voltage value of the print head is not less than 12v and less than 12.2v, which can be set to 0.11, but is not limited thereto; d is the voltage compensation coefficient when the current driving voltage value of the print head is not less than 12.2v, which can be set to 0, but is not limited thereto.
[0121] S406: Adjust the second adjusted heating duration corresponding to each heating according to the number of target heating points corresponding to each heating level, so as to obtain the target heating duration corresponding to each heating.
[0122] It can be understood that when the print head prints the current line, the number of target heating points corresponding to each heating level may affect the total energy requirement during each heating process. If the number of target heating points of a certain energy level is large, it means that more energy needs to be provided within the preset time period when heating the target heating points of this energy level. To ensure that the energy provided by the print head within the preset time period does not exceed the maximum energy limit that can be provided within this time period, the second adjusted heating duration corresponding to each heating can be further extended according to the number of target heating points corresponding to each heating level, so as to obtain the target heating duration corresponding to each heating, so as to ensure that the print head can complete the printing task of the current line with high quality under the current printing content conditions.
[0123] Optionally, the print device controller determines the heating point number compensation coefficient according to the number of target heating points corresponding to each heating level, and then adjusts the second adjusted heating duration corresponding to each heating according to the heating point number compensation coefficient and the number of target heating points corresponding to each heating level, so as to obtain the target heating duration corresponding to each heating. The specific calculation formula is as follows:
[0124]
[0125] where, t q2 is the second adjusted heating duration corresponding to the q-th heating (q is a positive integer); t qt′q is the target heating duration corresponding to the q-th heating; dot_Lq is the number of target heating points corresponding to the heating level Lq; e is the heating point number compensation coefficient when the number of target heating points corresponding to the heating level Lq is less than 72, and it can be but is not limited to being set to 0.01; f is the heating point number compensation coefficient when the number of target heating points corresponding to the heating level Lq is not less than 72 and less than 144, and it can be but is not limited to being set to 0.1; g is the heating point number compensation coefficient when the number of target heating points corresponding to the heating level Lq is not less than 144 and less than 216, and it can be but is not limited to being set to 0.15; f is the heating point number compensation coefficient when the number of target heating points corresponding to the heating level Lq is not less than 216, and it can be but is not limited to being set to 0.19.
[0126] In this embodiment, the printer controller adjusts the initial heating duration corresponding to each heating according to the current temperature value of the print head and the reference temperature value of the print head, and obtains the first adjusted heating duration corresponding to each heating, which can effectively adapt the heating parameters of the print head to the current temperature condition; by adjusting the first adjusted heating duration corresponding to each heating according to the current driving voltage value of the print head and the driving voltage threshold of the print head, the second adjusted heating duration corresponding to each heating is obtained, which can effectively adapt the heating parameters of the print head to the current voltage condition; by adjusting the second adjusted heating duration corresponding to each heating according to the number of target heating points corresponding to each heating level, the target heating duration corresponding to each heating is obtained, which can effectively adapt the heating parameters of the print head to the current print content condition, thus effectively ensuring the quality of thermal printing.
[0127] S407: Control the print head to sequentially complete the thermal printing of each print segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
[0128] Optionally, the printer controller controls the print head to sequentially complete the thermal printing of each print segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point in at least one divided print segment, so as to gradually complete the thermal printing of the current line.
[0129] Exemplarily, assume that the printer controller divides the current line into three print segments and divides the target heating points in each print segment into six different heating levels L1 to L6. Then, during the printing of the current line, the printer controller can sequentially print the three divided print segments according to the moving direction of the printing medium. It can be understood that the printer controller can control the timing cooperation of the motor and the print head of the printing device, and adopt the method of the motor taking one step and the print head enabling six times of heating to print each divided print segment.
[0130] For each of the three printing segments, the printing device controller may first set the corresponding energization duration t1' for all target heating points with a heating level of L1, and control all target heating points with a heating level of L1 to perform heating. Then, set the corresponding energization duration t2' for all target heating points with heating levels of L1 and L2, and control the target heating points with heating levels of L1 and L2 to perform heating. Next, set the corresponding energization duration t3' for all target heating points with heating levels from L1 to L3, and control the target heating points with heating levels from L1 to L3 to perform heating. Next, set the corresponding energization duration t4' for all target heating points with heating levels from L1 to L4, and control the target heating points with heating levels from L1 to L4 to perform heating. Next, set the corresponding energization duration t5' for all target heating points with heating levels from L1 to L5, and control the target heating points with heating levels from L1 to L5 to perform heating. Finally, set the corresponding energization duration t6' for all target heating points with heating levels from L1 to L6, and control the target heating points with heating levels from L1 to L6 to perform heating, so as to enable six times of heating to complete the thermal printing of each printing segment.
[0131] In this embodiment, the printing device controller controls the print head to gradually complete the thermal printing of the current line by according to the target heating duration corresponding to each heating and the heating levels corresponding to each target heating point. It can not only control the total working current of the print head and extend the service life of the print head, but also perform on-demand heating on the target heating points in each printing segment according to the heating level and the target heating duration, avoiding problems such as uneven printing density and carbon ribbon breakage, thus effectively ensuring the quality of thermal printing.
[0132] S408: Cool the print head, and determine the heating parameters of the print head when printing the next line during the cooling process.
[0133] Specifically, S408 is the same as S305, and will not be elaborated here.
[0134] In the above thermal printing method, the printing device controller divides the current line into at least one printing segment according to the number of target heating points, which can effectively avoid excessive total working current of the print head and affect the service life of the print head, and improve the safety and reliability of thermal printing; by determining the heating levels of the target heating points in each printing segment, it can reasonably control the energy input of each target heating point in combination with the actual printing content, avoid problems such as insufficient energy input or excessive energy input, and improve the quality of thermal printing; by combining the current temperature condition, the current voltage condition and the current printing content condition, adjusting the initial heating duration of each heating to the target heating duration, enabling the thermal print head to adapt to the current working conditions in a timely manner, and improving the adaptability of thermal printing; by heating the target heating points in each printing segment as needed according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, thereby controlling the print head to gradually complete the thermal printing of the current line, it can avoid problems such as uneven printing density and carbon ribbon breakage, and can effectively ensure the quality of thermal printing. Using the above method can effectively improve the safety, reliability and adaptability of thermal printing while ensuring the quality of thermal printing.
[0135] In one embodiment, as Figure 5 shown, a thermal printing method is provided, including the following steps:
[0136] S501: Obtain a plurality of target heating points that need to be enabled when the print head prints the current line.
[0137] Specifically, S501 is the same as S201, which will not be elaborated here.
[0138] S502: Divide the current line into at least one printing segment according to the number of target heating points.
[0139] Specifically, S502 is the same as S402, which will not be elaborated here.
[0140] S503: Determine the heating level corresponding to each of the plurality of target heating points; different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration.
[0141] Specifically, S503 is the same as S403, which will not be elaborated here.
[0142] S504: Adjust the initial heating duration corresponding to each heating according to the current temperature value of the print head and the reference temperature value of the print head to obtain the first adjusted heating duration corresponding to each heating.
[0143] Specifically, S504 is the same as S404, which will not be elaborated here.
[0144] S505: Determine the voltage compensation coefficient according to the current drive voltage value of the print head.
[0145] Understandably, when the current driving voltage value of the print head does not reach the driving voltage threshold (such as 12.2V), the print device controller needs to extend the heating duration of each target heating point to ensure that the print head can complete high-quality printing tasks even under low voltage conditions.
[0146] Optionally, the print device controller determines the corresponding voltage compensation coefficient according to the voltage range where the current driving voltage value is located. For example, when the current driving voltage value is less than 11.6V, the voltage compensation coefficient a can be set to 0.09; when the current driving voltage value is not less than 11.6V and less than 12V, the voltage compensation coefficient b can be set to 0.10; when the current driving voltage value is not less than 12V and less than 12.2V, the voltage compensation coefficient c can be set to 0.11; when the current driving voltage value is not less than 12.2V, the voltage compensation coefficient d can be set to 0.
[0147] S506: Adjust the first adjusted heating duration corresponding to each heating time according to the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold to obtain the second adjusted heating duration corresponding to each heating time.
[0148] Optionally, the print device controller extends the first adjusted heating duration corresponding to each heating time according to the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold to obtain the second adjusted heating duration corresponding to each heating time. Specifically, please refer to the above formula (2), which will not be elaborated here.
[0149] In this embodiment, the print device controller can effectively adapt to the current voltage conditions by adjusting the first adjusted heating duration corresponding to each heating time according to the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold, and can effectively ensure the quality of thermal printing even when the current driving voltage value is low.
[0150] S507: Determine the heating point number compensation coefficient according to the number of target heating points corresponding to each heating level.
[0151] Understandably, when the number of target heating points corresponding to a certain heating is large, the print head needs to provide more energy within the preset time period. To ensure that the energy provided by the print head within the preset time period does not exceed the maximum energy limit that the print head can provide within this time period, the print device controller can determine the heating point compensation coefficient according to the number of target heating points corresponding to each heating level to further extend the second adjusted heating duration corresponding to each heating time.
[0152] Optionally, the printing device controller determines the corresponding heating point number compensation coefficient according to the quantity interval where the target heating point number corresponding to each heating level is located. For example, when the target heating point number corresponding to a certain heating level is less than 72, the heating point number compensation coefficient e can be set to 0.01; when the target heating point number corresponding to a certain heating level is not less than 72 and less than 144, the heating point number compensation coefficient can be set to 0.1; when the target heating point number corresponding to a certain heating level is not less than 144 and less than 216, the heating point number compensation coefficient can be set to 0.15; when the target heating point number corresponding to a certain heating level is not less than 216, the heating point number compensation coefficient can be set to 0.19.
[0153] S508: Adjust the second adjusted heating duration corresponding to each heating according to the heating point number compensation coefficient and the target heating point number corresponding to each heating level, so as to obtain the target heating duration corresponding to each heating.
[0154] Optionally, the printing device controller extends the second adjusted heating duration corresponding to each heating according to the heating point number compensation coefficient and the target heating point number corresponding to each heating level, so as to obtain the target heating duration corresponding to each heating. Specifically, please refer to the above formula (3), which will not be elaborated here.
[0155] In this embodiment, the printing device controller adjusts the second adjusted heating duration corresponding to each heating according to the heating point number compensation coefficient and the target heating point number corresponding to each heating level, so as to obtain the target heating duration corresponding to each heating, which can make the heating parameters of the print head effectively adapt to the current printing content conditions. Even when the number of target heating points for a single heating is large, the quality of thermal printing can be effectively guaranteed.
[0156] S509: Control the print head to perform segmented heating on the target heating points corresponding to each print segment in sequence according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, so as to complete the thermal printing of each print segment.
[0157] Optionally, the printing device controller controls the print head to sequentially complete the thermal printing of each print segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point in at least one divided print segment, specifically by enabling multiple heating for each print segment in segments, so as to gradually complete the thermal printing of each print segment.
[0158] Exemplarily, it is assumed that the printing device controller divides the current line into three printing segments, and divides the target heating points in each printing segment into six different heating levels L1 to L6. During the process of printing the current line, the printing device controller can sequentially enable heating six times for the target heating points corresponding to the three divided printing segments at different time periods according to the moving direction of the printing medium, so as to complete the thermal printing of each printing segment.
[0159] Specifically, for each of the three printing segments, the printing device controller can first set the corresponding energization duration t1' for all target heating points with the heating level of L1, and control all target heating points with the heating level of L1 to perform heating. After the first heating ends, set the corresponding energization duration t2' for all target heating points with the heating levels of L1 and L2, and control the target heating points with the heating levels of L1 and L2 to perform heating. After the second heating ends, set the corresponding energization duration t3' for all target heating points with the heating levels of L1 to L3, and control the target heating points with the heating levels of L1 to L3 to perform heating. After the third heating ends, set the corresponding energization duration t4' for all target heating points with the heating levels of L1 to L4, and control the target heating points with the heating levels of L1 to L4 to perform heating. After the fourth heating ends, set the corresponding energization duration t5' for all target heating points with the heating levels of L1 to L5, and control the target heating points with the heating levels of L1 to L5 to perform heating. After the fifth heating ends, set the corresponding energization duration t6' for all target heating points with the heating levels of L1 to L6, and control the target heating points with the heating levels of L1 to L6 to perform heating, so as to complete six times of heating for each printing segment.
[0160] In this embodiment, the printing device controller controls the print head to sequentially perform time-division heating on the target heating points corresponding to each printing segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, so as to complete the thermal printing of each printing segment. This can not only control the total working current of the print head and extend the service life of the print head, but also perform on-demand heating on the target heating points in each printing segment according to the heating level and the target heating duration, avoiding problems such as uneven printing density and carbon ribbon breakage, thereby effectively ensuring the quality of thermal printing.
[0161] S510: Cool the print head, and determine the heating parameters of the print head when printing the next line during the cooling process.
[0162] Specifically, S510 is the same as S305, and will not be elaborated here.
[0163] In the above thermal printing method, the printing device controller adjusts the first adjusted heating duration corresponding to each heating according to the voltage compensation coefficient, the current driving voltage value, and the driving voltage threshold, and obtains the second adjusted heating duration corresponding to each heating, which can effectively adapt to the current voltage conditions. Even when the current driving voltage value is low, high-quality thermal printing can be completed. By adjusting the second adjusted heating duration corresponding to each heating according to the heating point number compensation coefficient and the target heating point number corresponding to each heating level, the target heating duration corresponding to each heating is obtained, which can effectively adapt to the current printing content conditions. Even when the number of target heating points for a single heating is large, safe and reliable thermal printing can be completed. By controlling the print head to perform segmented heating on the target heating points corresponding to each printing segment in sequence according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point to complete the thermal printing of each printing segment, the service life of the print head can be effectively extended while avoiding problems such as uneven printing density and carbon ribbon breakage. Using the above method can achieve safe, reliable, and high-quality thermal printing, thus effectively ensuring the quality of thermal printing.
[0164] It should be understood that although the steps in the flowcharts involved in the above embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0165] Based on the inventive concept of the above thermal printing method, as Figure 6 shown, an embodiment of the present application further provides a thermal printing device 600 for implementing the above-mentioned thermal printing method. The thermal printing device 600 includes:
[0166] An acquisition module 601, configured to acquire a plurality of target heating points that need to be enabled when the print head prints the current line;
[0167] A grading module 602, configured to determine the heating level corresponding to each of the plurality of target heating points; different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration;
[0168] An adjustment module 603, configured to adjust the initial heating duration corresponding to each heating based on the current working state parameters of the print head, so as to obtain the target heating duration corresponding to each heating;
[0169] A control module 604, configured to control the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
[0170] In one embodiment, the adjustment module 603 is specifically configured to adjust the initial heating duration corresponding to each heating based on the current temperature value of the print head, and / or the current driving voltage value of the print head, and / or the number of target heating points corresponding to each heating level, so as to obtain the target heating duration corresponding to each heating.
[0171] In one embodiment, the adjustment module 603 is specifically configured to adjust the initial heating duration corresponding to each heating according to the current temperature value of the print head and the reference temperature value of the print head, so as to obtain the first adjusted heating duration corresponding to each heating; adjust the first adjusted heating duration corresponding to each heating according to the current driving voltage value of the print head and the driving voltage threshold of the print head, so as to obtain the second adjusted heating duration corresponding to each heating; adjust the second adjusted heating duration corresponding to each heating according to the number of target heating points corresponding to each heating level, so as to obtain the target heating duration corresponding to each heating.
[0172] In one embodiment, the adjustment module 603 is specifically configured to determine a voltage compensation coefficient according to the current driving voltage value of the print head; adjust the first adjusted heating duration corresponding to each heating according to the voltage compensation coefficient, the current driving voltage value and the driving voltage threshold, so as to obtain the second adjusted heating duration corresponding to each heating.
[0173] In one embodiment, the adjustment module 603 is specifically configured to determine a heating point number compensation coefficient according to the number of target heating points corresponding to each heating level; adjust the second adjusted heating duration corresponding to each heating according to the heating point number compensation coefficient and the number of target heating points corresponding to each heating level, so as to obtain the target heating duration corresponding to each heating.
[0174] In one embodiment, the thermal printing device 600 further includes a segmentation module, configured to divide the current line into at least one printing segment according to the number of target heating points; the control module 604 is specifically configured to control the print head to sequentially complete the thermal printing of each printing segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
[0175] In one embodiment, the control module 604 is specifically configured to control the print head to sequentially perform time-division heating on the target heating points corresponding to each printing segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, so as to complete the thermal printing of each printing segment.
[0176] In one embodiment, the grading module 602 is specifically configured to determine the heating level corresponding to each of the multiple target heating points according to the printing data of the current line and its adjacent lines.
[0177] In one embodiment, the thermal printing device 600 further includes a cooling module, which is configured to cool the print head and determine the heating parameters of the print head when printing the next line after printing the current line during the cooling process.
[0178] The embodiment of the present application further provides a thermal printing device, and its internal structure diagram can be as Figure 7 shown. The printing device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface, the display unit, and the input device are connected to the system bus through the input / output interface. Among them, the processor of the printing device is used to provide computing and control capabilities. The memory of the printing device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the printing device is used to exchange information between the processor and external devices. The communication interface of the printing device is used to communicate with an external user terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (Near Field Communication), or other technologies. The computer program, when executed by the processor, implements a thermal printing method. The display unit of the printing device is used to form a visually visible picture, which can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen. The input device of the printing device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the outer shell of the printing device, or an external keyboard, a touchpad, or a mouse, etc.
[0179] Those skilled in the art can understand that Figure 7 the structure shown in
[0180] merely represents a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the printing device to which the solution of the present application is applied. The specific printing device may include more or fewer components than those shown in the figure, or combine certain components, or have a different component layout.
[0181] Obtain multiple target heating points that need to be enabled when the print head prints the current line;
[0182] Determine the heating levels corresponding to multiple target heating points; different heating levels correspond to different numbers of heating times, and each heating corresponds to a preset initial heating duration;
[0183] Based on the current working state parameters of the print head, adjust the initial heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating;
[0184] According to the target heating duration corresponding to each heating and the heating levels corresponding to each target heating point, control the print head to complete the thermal printing of the current line.
[0185] In a possible implementation, when the processor executes the computer program, the following steps are also implemented: Based on the current temperature value of the print head, and / or the current driving voltage value of the print head, and / or the number of target heating points corresponding to each heating level, adjust the initial heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating.
[0186] In a possible implementation, when the processor executes the computer program, the following steps are also implemented: According to the current temperature value of the print head and the reference temperature value of the print head, adjust the initial heating duration corresponding to each heating to obtain the first adjusted heating duration corresponding to each heating; According to the current driving voltage value of the print head and the driving voltage threshold of the print head, adjust the first adjusted heating duration corresponding to each heating to obtain the second adjusted heating duration corresponding to each heating; According to the number of target heating points corresponding to each heating level, adjust the second adjusted heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating.
[0187] In a possible implementation, when the processor executes the computer program, the following steps are also implemented: Determine the voltage compensation coefficient according to the current driving voltage value of the print head; According to the voltage compensation coefficient, the current driving voltage value and the driving voltage threshold, adjust the first adjusted heating duration corresponding to each heating to obtain the second adjusted heating duration corresponding to each heating.
[0188] In a possible implementation, when the processor executes the computer program, the following steps are also implemented: Determine the heating point number compensation coefficient according to the number of target heating points corresponding to each heating level; According to the heating point number compensation coefficient and the number of target heating points corresponding to each heating level, adjust the second adjusted heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating.
[0189] In a possible implementation, when the processor executes the computer program, the following steps are also implemented: Divide the current line into at least one printing segment according to the number of target heating points; According to the target heating duration corresponding to each heating and the heating levels corresponding to each target heating point, control the print head to sequentially complete the thermal printing of each printing segment.
[0190] In a possible implementation, when the processor executes the computer program, the following steps are further implemented: According to the target heating duration corresponding to each heating and the heating levels corresponding to each target heating point, control the print head to heat the target heating points corresponding to each printing segment in segments in sequence, so as to complete the thermal printing of each printing segment.
[0191] In a possible implementation, when the processor executes the computer program, the following steps are further implemented: Determine the heating levels corresponding to each of the multiple target heating points according to the printing data of the current line and its adjacent lines.
[0192] In a possible implementation, when the processor executes the computer program, the following steps are further implemented: Cool the print head, and determine the heating parameters of the print head when printing the next line during the cooling process.
[0193] The embodiments of the present application further provide a computer storage medium. Instructions are stored in the computer storage medium. When the instructions are run on a computer or a processor, the computer or the processor is caused to execute the steps in the above method embodiments. If each component module of the above thermal printing device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the above computer storage medium.
[0194] The embodiments of the present application further provide a computer program product, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0195] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a Digital Versatile Disc (DVD)), or a semiconductor medium (such as a Solid State Disk (SSD)), etc.
[0196] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. This program can be stored in a computer-readable storage medium. When this program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disks, or optical discs. Without conflict, the technical features in this embodiment and the implementation solutions can be combined arbitrarily.
[0197] The above-described embodiments are merely described in a preferred implementation manner of the present application, and do not limit the scope of the present application. Without departing from the design spirit of the present application, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present application should fall within the protection scope determined by the claims.
[0198] The above description has been made of specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A thermal printing method, characterized in that, The method includes: Obtaining a plurality of target heating points that need to be enabled when the print head prints the current line; Determining the heating level corresponding to each of the plurality of target heating points; different heating levels correspond to different numbers of heating times, and each heating corresponds to a preset initial heating duration; Based on the current working state parameters of the print head, adjusting the initial heating duration corresponding to each heating to obtain the target heating duration corresponding to each heating; Controlling the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
2. The method according to claim 1, characterized in that, The adjusting the initial heating duration corresponding to each heating based on the current working state parameters of the print head to obtain the target heating duration corresponding to each heating includes: Adjusting the initial heating duration corresponding to each heating based on the current temperature value of the print head, and / or the current driving voltage value of the print head, and / or the number of target heating points corresponding to each heating level to obtain the target heating duration corresponding to each heating.
3. The method according to claim 2, wherein The adjusting the initial heating duration corresponding to each heating based on the current temperature value of the print head, and / or the current driving voltage value of the print head, and / or the number of target heating points corresponding to each heating level to obtain the target heating duration corresponding to each heating includes: Adjusting the initial heating duration corresponding to each heating according to the current temperature value of the print head and the reference temperature value of the print head to obtain the first adjusted heating duration corresponding to each heating; Adjusting the first adjusted heating duration corresponding to each heating according to the current driving voltage value of the print head and the driving voltage threshold of the print head to obtain the second adjusted heating duration corresponding to each heating; Adjusting the second adjusted heating duration corresponding to each heating according to the number of target heating points corresponding to each heating level to obtain the target heating duration corresponding to each heating.
4. The method according to claim 3, characterized in that, The adjusting the first adjusted heating duration corresponding to each heating according to the current driving voltage value of the print head and the driving voltage threshold of the print head to obtain the second adjusted heating duration corresponding to each heating includes: Determining a voltage compensation coefficient according to the current driving voltage value of the print head; Adjusting the first adjusted heating duration corresponding to each heating according to the voltage compensation coefficient, the current driving voltage value and the driving voltage threshold to obtain the second adjusted heating duration corresponding to each heating.
5. The method according to claim 3, characterized in that, The adjusting the second adjusted heating duration corresponding to each heating according to the number of target heating points corresponding to each heating level to obtain the target heating duration corresponding to each heating includes: Determining a heating point number compensation coefficient according to the number of target heating points corresponding to each heating level; Adjusting the second adjusted heating duration corresponding to each heating according to the heating point number compensation coefficient and the number of target heating points corresponding to each heating level to obtain the target heating duration corresponding to each heating.
6. The method according to claim 1, characterized in that, The method further includes: Dividing the current line into at least one printing segment according to the number of target heating points; Controlling the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point includes: Controlling the print head to sequentially complete the thermal printing of each print segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
7. The method according to claim 6, wherein The controlling the print head to sequentially complete the thermal printing of each print segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point includes: Controlling the print head to perform time-division heating on the target heating points corresponding to each print segment according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, so as to complete the thermal printing of each print segment.
8. The method according to claim 1, wherein Determining the heating level corresponding to each of the multiple target heating points includes: Determining the heating level corresponding to each of the multiple target heating points according to the print data of the current line and its adjacent lines.
9. The method according to claim 1, characterized in that, After controlling the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point, the method further includes: Cooling the print head, and determining the heating parameters of the print head when printing the next line of the current line during the cooling process.
10. A thermal printing device, characterized in that, The device includes: An acquisition module, configured to acquire multiple target heating points that need to be enabled when the print head prints the current line; A grading module, configured to determine the heating level corresponding to each of the multiple target heating points; different heating levels correspond to different heating times, and each heating corresponds to a preset initial heating duration; An adjustment module, configured to adjust the initial heating duration corresponding to each heating based on the current working state parameters of the print head to obtain the target heating duration corresponding to each heating; A control module, configured to control the print head to complete the thermal printing of the current line according to the target heating duration corresponding to each heating and the heating level corresponding to each target heating point.
11. A thermal printing device, characterized in that, including: A processor and a memory; the memory stores a computer program, and when the processor executes the computer program, the method steps of any one of claims 1-9 are implemented.
12. A computer storage medium, characterized in that, The computer storage medium stores multiple instructions, and the instructions are suitable for being loaded and executed by the processor to perform the method steps of any one of claims 1-9.
13. A computer program product, characterized in that, including a computer program, and when the computer program is executed by the processor, the steps of the method described in any one of claims 1-9 are implemented.
Citation Information
Cited By
Printhead heating control method and related device
WO2026124233A1