CN116691175A - Printing head temperature compensation method, device, printer and storage medium - Google Patents
Printing head temperature compensation method, device, printer and storage medium Download PDFInfo
- Publication number
- CN116691175A CN116691175A CN202310928723.7A CN202310928723A CN116691175A CN 116691175 A CN116691175 A CN 116691175A CN 202310928723 A CN202310928723 A CN 202310928723A CN 116691175 A CN116691175 A CN 116691175A
- Authority
- CN
- China
- Prior art keywords
- temperature
- printing
- compensation
- time
- thermal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B41—PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
- B41J—TYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
- B41J2/00—Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed
- B41J2/315—Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by selective application of heat to a heat sensitive printing or impression-transfer material
- B41J2/32—Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed characterised by selective application of heat to a heat sensitive printing or impression-transfer material using thermal heads
-
- B—PERFORMING OPERATIONS; TRANSPORTING
- B41—PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
- B41J—TYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
- B41J29/00—Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
- B41J29/38—Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Electronic Switches (AREA)
Abstract
The application discloses a printing head temperature compensation method, a printing head temperature compensation device, a printer and a storage medium, and relates to the technical field of thermal printing. Wherein the method comprises the following steps: acquiring the temperature of a printing head of a thermal printing head of a printer, and determining the environment temperature of the thermal printing head; determining initial heating time corresponding to the temperature of the thermal print head to the target temperature according to the temperature of the print head; determining the total compensation time for performing temperature compensation on the thermal printing head according to the temperature of the printing head and the ambient temperature; and carrying out numerical calculation on the initial heating time and the total compensation time to obtain target heating time, and heating the thermal printing head based on the target heating time so as to enable the thermal printing head to reach the target temperature. The technical scheme provided by the application can realize that the printer can better and more accurately perform temperature compensation printing under different temperature environments, and better printing effect is obtained.
Description
Technical Field
The present application relates to the field of thermal printing technologies, and in particular, to a method and apparatus for compensating temperature of a printhead, a printer, and a storage medium.
Background
With the gradual trend from commercial use to civil use of thermal printing image processing technologies, more and more people come into contact with the thermal printing technologies, and various printing demands (express bill, price label, student wrong questions and the like) of people also promote the vigorous development of portable thermal printers.
The thermal print head is a core device of the printer, and influences the printing effect and the user experience on the temperature compensation condition of the thermal print head. At present, a thermal printer generally uses a single thermistor to detect the temperature of a printing head in real time, and sets different heating time at corresponding temperature to realize temperature compensation of the thermal printing head. However, this single temperature compensation method may be affected by the printing environment temperature, and the print density generated by different environment temperatures may be different, so that the printing effect of the printer is different, the user experience is poor, and even the print head may be damaged. Therefore, designing a temperature compensation method with good printing effect becomes a problem to be solved.
Disclosure of Invention
The application provides a printing head temperature compensation method, a printing head temperature compensation device, a printing machine and a storage medium, which can realize that the printing machine can perform temperature compensation printing better and more accurately under different temperature environments, and obtain better printing effect.
In a first aspect, the present application provides a method of printhead temperature compensation, the method comprising:
acquiring the temperature of a printing head of a thermal printing head of a printer, and determining the environment temperature of the thermal printing head;
determining initial heating time corresponding to the temperature of the thermal print head to be heated to a target temperature according to the temperature of the print head;
determining a total compensation time for temperature compensation of the thermal print head according to the print head temperature and the ambient temperature;
and carrying out numerical calculation on the initial heating time and the total compensation time to obtain target heating time, and heating the thermal printing head based on the target heating time so as to enable the thermal printing head to reach the target temperature.
Further, the determining the total compensation time for temperature compensation of the thermal print head according to the print head temperature and the ambient temperature includes: determining a first compensation time corresponding to the ambient temperature according to a preconfigured ambient temperature compensation curve; determining a second compensation time corresponding to the temperature of the printing head according to a pre-configured printing heating compensation curve; and carrying out numerical calculation on the first compensation time and the second compensation time to obtain the total compensation time.
Further, the ambient temperature compensation profile is used to represent the compensation time required to heat the thermal print head to a desired printing temperature at different ambient temperatures; the print heating compensation profile is used to represent the compensation time required to heat the thermal print head to the desired print temperature at different print head temperatures.
Further, before the obtaining the print head temperature of the thermal print head of the printer, the method further comprises: and receiving a printing instruction.
Further, the determining the environmental temperature of the thermal print head includes: determining whether the printing instruction is a printing instruction received for the first time after the printer is started; if the printing instruction is the first time, taking the numerical value of the temperature of the printing head as the environment temperature; if the printing instruction is not the first time, determining whether the printing work is executed in a preset time before the current time; if the printing work is executed, acquiring a first environment temperature of the thermal print head when the printing work is executed last time, and taking the value of the first environment temperature as the environment temperature of the thermal print head at this time; and if the printing work is not executed, taking the numerical value of the temperature of the printing head as the environment temperature.
Further, the method further comprises: analyzing a print task from the print instruction; and when the thermal print head is detected to reach the target temperature, controlling the printer to print based on the print task.
Further, the printer is provided with a first thermistor and a second thermistor, the first thermistor is used for detecting the temperature of the printing head of the thermal printing head, and the second thermistor is used for detecting the temperature of the environment where the thermal printing head is located.
In a second aspect, the present application provides a printhead temperature compensation apparatus, the apparatus comprising:
the temperature acquisition module is used for acquiring the temperature of a printing head of a thermal printing head of the printer and determining the environment temperature of the thermal printing head;
the first time determining module is used for determining initial heating time corresponding to the temperature of the thermal print head to the target temperature according to the temperature of the print head;
a second time determining module for determining a total compensation time for temperature compensation of the thermal printhead according to the printhead temperature and the ambient temperature;
and the temperature compensation module is used for carrying out numerical calculation on the initial heating time and the total compensation time to obtain target heating time, and heating the thermal printing head based on the target heating time so as to enable the thermal printing head to reach the target temperature.
In a third aspect, the present application provides a printer comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the printhead temperature compensation method according to any embodiment of the present application.
In a fourth aspect, the present application provides a computer readable storage medium storing computer instructions for causing a processor to perform the method of compensating for printhead temperature according to any embodiment of the present application.
In order to solve the defects of the prior art in the background technology, the embodiment of the application provides a printing head temperature compensation method, and the execution of the method can bring the following beneficial effects: according to the application, the printing heating compensation curve and the environment temperature compensation curve are configured in the printer, and the first compensation time corresponding to the environment temperature and the second compensation time corresponding to the printing head temperature are determined by acquiring the printing head temperature and the environment temperature where the printing head is located, so that the problems of different printing concentrations and different printing effects of the printer caused by different printing environment temperatures are solved. According to the application, under the condition of not adding electronic devices, the printer can better and more accurately perform temperature compensation printing under different temperature environments by adding the software logic flow, so that a better printing effect is obtained.
It should be noted that the above-mentioned computer instructions may be stored in whole or in part on a computer-readable storage medium. The computer readable storage medium may be packaged with the processor of the printhead temperature compensation device or may be packaged separately from the processor of the printhead temperature compensation device, which is not limited in this application.
The description of the second, third and fourth aspects of the present application may refer to the detailed description of the first aspect; moreover, the advantages described in the second aspect, the third aspect and the fourth aspect may refer to the analysis of the advantages of the first aspect, and are not described herein.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
It can be understood that before using the technical solutions disclosed in the embodiments of the present application, the user should be informed and authorized by appropriate ways according to relevant laws and regulations for the type, usage range, usage scenario, etc. of the personal information related to the present application.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a first process of a method for compensating a temperature of a printhead according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a second flow chart of a method for compensating a temperature of a printhead according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a temperature compensation device for a printhead according to an embodiment of the present application;
fig. 4 is a block diagram of a printer for implementing a printhead temperature compensation method according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," "target," and "original," etc. in the description and claims of the present application and the above-described drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be capable of executing sequences other than those illustrated or otherwise described. Furthermore, the terms "comprises," "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a schematic flow chart of a method for compensating a temperature of a printhead according to an embodiment of the present application, where the embodiment is applicable to temperature compensation of a printhead of a thermal printer, and precisely controls the temperature of the printhead to reach a target temperature. The method for compensating the temperature of the printing head provided by the embodiment of the application can be implemented by the device for compensating the temperature of the printing head provided by the embodiment of the application, and the device can be realized by software and/or hardware and is integrated in electronic equipment for executing the method. Preferably, the electronic device in the embodiment of the present application may be a printer, and the execution body for executing the method for compensating the temperature of the print head of the present application may be a main control system of the printer.
Referring to fig. 1, the method of the present embodiment includes, but is not limited to, the following steps:
s110, acquiring the temperature of a printing head of a thermal printing head of the printer, and determining the environment temperature of the thermal printing head.
Further, before acquiring the print head temperature of the thermal print head of the printer, the method further comprises: and receiving a printing instruction. Specifically, the printer and the user terminal are in communication connection in the existing communication connection mode (such as a local area network mode, a Bluetooth mode and the like), a physical key or a virtual key with a printing function is configured on the user terminal, the user triggers the printing function on the user terminal through the physical key or the virtual key with the printing function, the user terminal generates a printing instruction and sends the printing instruction to a main control system of the printer, and the main control system responds to the printing instruction after receiving the printing instruction.
In an alternative embodiment, a negative temperature coefficient (Negative Temperature Coefficient, NTC) thermistor is provided on the printer, the NTC thermistor being used to obtain the printhead temperature of the thermal printhead. The printer may be configured with an NTC thermistor coupled to the host system for real-time detection of printhead temperature. After the main control system obtains the temperature of the printing head, the environmental temperature of the thermal printing head is determined based on the temperature of the printing head through a preset logic flow. Alternatively, the preset logic flow may be a logic relationship between the printhead temperature and the ambient temperature, which logic flow will be explained in detail in the corresponding embodiment of fig. 2.
In an alternative embodiment, the printer may be configured with two NTC thermistors, such as a first thermistor and a second thermistor, connected to the host system for real-time detection of the printhead temperature and the ambient temperature, respectively. The first thermistor is used for detecting the temperature of the printing head of the thermal printing head, and the second thermistor is used for detecting the ambient temperature of the thermal printing head.
S120, determining initial heating time corresponding to the temperature of the thermal print head to the target temperature according to the temperature of the print head.
In the embodiment of the application, the target temperature may be a fixed value, which refers to the temperature required by the printing head when the printer is printing normally. A relation table of the temperature difference and the heating time can be pre-configured, the relation table is pre-stored in a storage unit of the printer, after the temperature of the printing head is obtained, the relation table is called from the storage unit, the temperature difference between the temperature of the printing head and the target temperature is calculated, the heating time corresponding to the temperature difference is searched from the relation table, and the heating time is recorded as initial heating time. However, the initial heating time may become inaccurate due to the influence of the printhead temperature and the ambient temperature, that is, the temperature of the thermal printhead may not be the target temperature after the thermal printhead is heated using the initial heating temperature and the fixed temperature rise rate preset by the printer.
S130, determining the total compensation time for temperature compensation of the thermal print head according to the print head temperature and the ambient temperature.
Further, determining a total compensation time for temperature compensation of the thermal print head based on the print head temperature and the ambient temperature, comprising: determining a first compensation time corresponding to the ambient temperature according to a preconfigured ambient temperature compensation curve; determining a second compensation time corresponding to the temperature of the printing head according to a pre-configured printing heating compensation curve; and carrying out numerical calculation on the first compensation time and the second compensation time to obtain total compensation time.
The ambient temperature compensation curve is used for representing compensation time required when the thermal print head is heated to an expected printing temperature under different ambient temperatures, and specifically comprises the following steps: controlling the temperature of the printing head to be unchanged, selecting one environmental temperature from a plurality of environmental temperatures as an environmental reference temperature, and heating the printing head to an expected printing temperature under the plurality of environmental temperatures to obtain heating time corresponding to the plurality of environmental temperatures; and subtracting the heating time from the corresponding heating time under the environment reference temperature to obtain the compensation time required when the thermal printing head is heated to the expected printing temperature under a plurality of environment temperatures, thereby obtaining the environment temperature compensation curves under different environment temperatures. The print heating compensation curve is used to represent the compensation time required to heat the thermal print head to the desired print temperature at different print head temperatures, specifically: the environmental temperature is controlled unchanged, a certain printing head temperature is selected from a plurality of printing head temperatures to be the printing head reference temperature, and the printing head is heated to the expected printing temperature under the plurality of printing head temperatures, so that heating time corresponding to the plurality of printing head temperatures is obtained; and subtracting the heating time from the corresponding heating time at the reference temperature of the printing head to obtain the compensation time required when the thermal printing head is heated to the expected printing temperature at a plurality of printing head temperatures, thereby obtaining the printing heating compensation curves at different printing head temperatures.
The existing temperature compensation method generally determines the compensation time corresponding to the heating time only according to the temperature of the printing head, and the single temperature compensation method can be influenced by the printing environment temperature, and the printing concentration generated by the same heating time is different due to the fact that the temperature difference between the printing head and the environment is inconsistent, so that the printing effect of the printer is different, the user experience is poor, and even the printing head can be damaged. For example: if the heating compensation time is detected to be constant when the temperature of the printing head is 50 ℃, but the printing effect generated by the ambient temperature is not consistent when the ambient temperature is 0 ℃ and 35 ℃ respectively. In order to solve the defects, the application can better and more accurately perform temperature compensation printing under different temperature environments by adding software logic, namely configuring a printing heating compensation curve and an environment temperature compensation curve on the printer under the condition of not adding electronic devices, so as to obtain better printing effect.
And S140, carrying out numerical calculation on the initial heating time and the total compensation time to obtain target heating time, and heating the thermal printing head based on the target heating time so as to enable the thermal printing head to reach the target temperature.
In the embodiment of the application, after the initial heating time and the total compensation time are determined, the main control system subtracts the total compensation time from the initial heating time to obtain the target heating time, and heats the thermal printing head based on the target heating time so as to enable the thermal printing head to reach the target temperature.
Further, the method for compensating the temperature of the printing head further comprises the following steps: the master control system analyzes the print task from the print instruction; one end of the main control system is connected with the NTC thermistor, and the other end of the main control system is connected with the thermal printing head; the main control system detects the temperature of the thermal printing head in real time, and when the target temperature is reached, the printer is controlled to print based on the print task.
According to the technical scheme provided by the embodiment, the temperature of the printing head of the thermal printing head of the printer is obtained, and the environmental temperature of the thermal printing head is determined; determining initial heating time corresponding to the temperature of the thermal print head to the target temperature according to the temperature of the print head; determining the total compensation time for performing temperature compensation on the thermal printing head according to the temperature of the printing head and the ambient temperature; and carrying out numerical calculation on the initial heating time and the total compensation time to obtain target heating time, and heating the thermal printing head based on the target heating time so as to enable the thermal printing head to reach the target temperature. According to the application, the printing heating compensation curve and the environment temperature compensation curve are configured in the printer, and the first compensation time corresponding to the environment temperature and the second compensation time corresponding to the printing head temperature are determined by acquiring the printing head temperature and the environment temperature where the printing head is located, so that the problems of different printing concentrations and different printing effects of the printer caused by different printing environment temperatures are solved. According to the application, under the condition of not adding electronic devices, the printer can better and more accurately perform temperature compensation printing under different temperature environments by adding the software logic flow, so that a better printing effect is obtained.
The method for compensating the temperature of the print head according to the embodiment of the present application is further described below, and fig. 2 is a schematic diagram of a second flow of the method for compensating the temperature of the print head according to the embodiment of the present application. The embodiment of the application is optimized based on the embodiments, and is specifically optimized as follows: the present embodiment explains the determination process of the ambient temperature in detail.
Referring to fig. 2, the method of the present embodiment includes, but is not limited to, the following steps:
s210, determining whether the printing instruction is the printing instruction received for the first time after the printer is started.
In the embodiment of the application, a user triggers a printing function through a physical key or a virtual key of the printing function on a user terminal, the user terminal generates a printing instruction and sends the printing instruction to a main control system of a printer, and after the main control system receives the printing instruction, the main control system judges whether the printing instruction is the first received printing instruction after the printer is started, so that whether the temperature of a printing head is consistent with the temperature of the environment is judged.
When the print instruction is the first time, indicating that the temperature of the print head is consistent with the ambient temperature, executing step S220; when the print instruction is not the first time, then step S230 is executed.
S220, if the printing instruction is the first time, taking the numerical value of the temperature of the printing head as the environment temperature.
In the embodiment of the application, when the current printing instruction is the first time, the printing head temperature is consistent with the ambient temperature, and then the numerical value of the printing head temperature is taken as the ambient temperature.
S230, if the printing instruction is not the first time, determining whether the printing work is executed in a preset time before the current time.
In the embodiment of the present application, when the current print instruction is not the first time, the time when the current print instruction is received is taken as the current time, and the interval time between the last print instruction and the current print instruction needs to be determined, that is, whether the print job is executed in the preset time before the current time is determined. Wherein the preset time may be 10 minutes.
S240, if the printing work is executed, acquiring a first environment temperature of the thermal print head when the printing work is executed last time, and taking the value of the first environment temperature as the environment temperature of the thermal print head.
In the embodiment of the present application, if the interval time is not long (i.e., the print job is executed within the preset time before the current time), the print head is not cooled to the value corresponding to the ambient temperature, i.e., the print head temperature and the ambient temperature are not consistent. Since the interval time between the last printing instruction and the current printing instruction is not long, it can be considered that the environmental temperature (first environmental temperature) corresponding to the last execution of the printing job and the environmental temperature corresponding to the current execution of the printing job are not changed, then the first environmental temperature where the thermal print head is located when the printing job is executed last time can be obtained, and the value of the first environmental temperature is used as the environmental temperature where the thermal print head is located.
S250, if the printing work is not executed, taking the numerical value of the temperature of the printing head as the environment temperature. In the embodiment of the present application, if the interval time is long (i.e., the printing operation is not performed within the preset time before the current time), the print head is considered to be cooled to a value corresponding to the ambient temperature, i.e., the print head temperature and the ambient temperature are consistent, and then the value of the print head temperature obtained by the NTC thermistor may be taken as the ambient temperature.
According to the technical scheme provided by the embodiment, whether the printing instruction is the first received printing instruction after the printer is started or not is determined; if the printing instruction is the first time, taking the numerical value of the temperature of the printing head as the ambient temperature; if the printing instruction is not the first time, determining whether the printing work is executed in a preset time before the current time; if the printing work is executed, acquiring a first environment temperature of the thermal print head when the printing work is executed last time, and taking the value of the first environment temperature as the environment temperature of the thermal print head; if the print job has not been executed, the value of the print head temperature is taken as the ambient temperature. In the embodiment of the application, the printer is provided with an NTC thermistor, the temperature of the printing head of the thermal printing head is obtained through the NTC thermistor, and then the ambient temperature is determined through logic flows such as whether the printing instruction is the first received printing instruction, the interval time between the last printing instruction and the current printing instruction and the like. The application can determine the temperature of the printing head of the thermal printing head of the printer and the environmental temperature of the thermal printing head by adding the software logic flow under the condition that the printer is only provided with one NTC thermistor and no electronic device is added. The printer can better and more accurately perform temperature compensation printing under different temperature environments, and better printing effect is obtained.
In an embodiment of a specific application, a user triggers a printing function on a user terminal through a physical key or a virtual key of the printing function, the user terminal generates a printing instruction and sends the printing instruction to a main control system of a printer, and after the main control system receives the printing instruction, the main control system judges whether the printing instruction is the first received printing instruction after the printer is started. The total compensation time is determined in three cases as follows.
Case one: assuming that the printing instruction is first, the temperature of the thermal print head acquired through the NTC thermistor is T0, and the ambient temperature of the thermal print head is T1, t0=t1=18 ℃. Determining a second compensation time corresponding to the temperature of the printing head according to the printing heating compensation curve, wherein the second compensation time is denoted as t0, t0=0.112 ms, determining a first compensation time corresponding to the ambient temperature according to the ambient temperature compensation curve, and the first compensation time is denoted as t1, t1=0.056 ms, wherein the total compensation time is as follows: t0+t1=0.168 ms.
And a second case: assuming that the printing instruction is not the first time, then the main control system further judges whether the printing work is performed before the preset time (10 minutes) of the printer, if the printing work is performed, then the printing work is continued to take T1 as the current environment temperature, and then the first compensation time T1 = 0.056ms corresponding to the environment temperature; the head temperature of the thermal head obtained by the NTC thermistor is recorded as T2, t2=46 ℃. Determining a second compensation time corresponding to the temperature of the printing head according to the printing heating compensation curve, wherein the second compensation time is recorded as t2, t2= -0.234ms, and the total compensation time is as follows: t1+t2= -0.178ms.
And a third case: if the main control system judges that the printing work is not performed before the preset time of the printer, the temperature of the printing head of the thermal printing head obtained by the NTC thermistor is T4, T4=12 ℃, the numerical value of the temperature of the printing head is taken as the ambient temperature, the ambient temperature is recorded as T3, T3=12 ℃, the first compensation time corresponding to the ambient temperature is determined according to the ambient temperature compensation curve and recorded as T3, t3=0.208 ms, the second compensation time corresponding to the temperature of the printing head is determined according to the printing heating compensation curve and recorded as T4, t4=0.208 ms, and the total compensation time is as follows: t3+t4=0.416 ms. Finally, compensating printing with total compensation time
Fig. 3 is a schematic structural diagram of a printhead temperature compensation device according to an embodiment of the present application, and as shown in fig. 3, the device 300 may include:
a temperature acquisition module 310, configured to acquire a print head temperature of a thermal print head of a printer, and determine an ambient temperature at which the thermal print head is located;
a first time determining module 320, configured to determine an initial heating time corresponding to heating the thermal print head to a target temperature according to the print head temperature;
a second time determination module 330 for determining a total compensation time for temperature compensation of the thermal printhead based on the printhead temperature and the ambient temperature;
the temperature compensation module 340 is configured to perform numerical calculation on the initial heating time and the total compensation time to obtain a target heating time, and heat the thermal print head based on the target heating time, so that the thermal print head reaches the target temperature.
Further, the second time determining module 330 may be specifically configured to: determining a first compensation time corresponding to the ambient temperature according to a preconfigured ambient temperature compensation curve; determining a second compensation time corresponding to the temperature of the printing head according to a pre-configured printing heating compensation curve; and carrying out numerical calculation on the first compensation time and the second compensation time to obtain the total compensation time.
Optionally, the ambient temperature compensation profile is used to represent the compensation time required to heat the thermal print head to a desired printing temperature at different ambient temperatures; the print heating compensation profile is used to represent the compensation time required to heat the thermal print head to the desired print temperature at different print head temperatures.
Further, the above-mentioned print head temperature compensation device may further include: an instruction receiving module;
the instruction receiving module is used for receiving a printing instruction before the temperature of the printing head of the thermal printing head of the printer is obtained.
Further, the temperature obtaining module 310 may be specifically configured to: determining whether the printing instruction is a printing instruction received for the first time after the printer is started; if the printing instruction is the first time, taking the numerical value of the temperature of the printing head as the environment temperature; if the printing instruction is not the first time, determining whether the printing work is executed in a preset time before the current time; if the printing work is executed, acquiring a first environment temperature of the thermal print head when the printing work is executed last time, and taking the value of the first environment temperature as the environment temperature of the thermal print head at this time; and if the printing work is not executed, taking the numerical value of the temperature of the printing head as the environment temperature.
Further, the above-mentioned print head temperature compensation device may further include: a print control module;
the printing control module is used for analyzing the printing task from the printing instruction; and when the thermal print head is detected to reach the target temperature, controlling the printer to print based on the print task.
Optionally, the printer is configured with a first thermistor and a second thermistor, the first thermistor is used for detecting the temperature of the print head of the thermal print head, and the second thermistor is used for detecting the temperature of the environment where the thermal print head is located.
The device for compensating the temperature of the printing head provided by the embodiment can be applied to the method for compensating the temperature of the printing head provided by any embodiment, and has corresponding functions and beneficial effects.
Fig. 4 is a block diagram of a printer for implementing a printhead temperature compensation method according to an embodiment of the present application. The printer 10 is intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Printers may also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the applications described and/or claimed herein.
As shown in fig. 4, the printer 10 includes at least one processor 11, and a memory such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the printer 10 can also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the printer 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the printer 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the printhead temperature compensation method.
In some embodiments, the printhead temperature compensation method may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the printer 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the printhead temperature compensation method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the printhead temperature compensation method in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present application, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a printer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the printer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server) or that includes a middleware component (e.g., an application server) or that includes a front-end component through which a user can interact with an implementation of the systems and techniques described here, or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
Note that the above is only a preferred embodiment of the present application and the technical principle applied. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. For example, one skilled in the art may use the various forms of flow shown above to reorder, add, or delete steps; the steps recited in the present application may be performed in parallel, sequentially or in a different order, and are not limited herein as long as the desired results of the technical solution of the present application can be achieved.
The above embodiments do not limit the scope of the present application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the scope of the present application.
Claims (10)
1. A method of printhead temperature compensation, the method comprising:
acquiring the temperature of a printing head of a thermal printing head of a printer, and determining the environment temperature of the thermal printing head;
determining initial heating time corresponding to the temperature of the thermal print head to be heated to a target temperature according to the temperature of the print head;
determining a total compensation time for temperature compensation of the thermal print head according to the print head temperature and the ambient temperature;
and carrying out numerical calculation on the initial heating time and the total compensation time to obtain target heating time, and heating the thermal printing head based on the target heating time so as to enable the thermal printing head to reach the target temperature.
2. The method of claim 1, wherein determining a total compensation time for temperature compensation of the thermal printhead based on the printhead temperature and the ambient temperature comprises:
determining a first compensation time corresponding to the ambient temperature according to a preconfigured ambient temperature compensation curve;
determining a second compensation time corresponding to the temperature of the printing head according to a pre-configured printing heating compensation curve;
and carrying out numerical calculation on the first compensation time and the second compensation time to obtain the total compensation time.
3. The method of claim 2, wherein the ambient temperature compensation profile is used to represent the compensation time required to heat the thermal print head to a desired printing temperature at different ambient temperatures; the print heating compensation profile is used to represent the compensation time required to heat the thermal print head to the desired print temperature at different print head temperatures.
4. The method of claim 1, further comprising, prior to said obtaining the printhead temperature of the thermal printhead of the printer:
and receiving a printing instruction.
5. The method of claim 4, wherein said determining an ambient temperature at which said thermal printhead is located comprises:
determining whether the printing instruction is a printing instruction received for the first time after the printer is started;
if the printing instruction is the first time, taking the numerical value of the temperature of the printing head as the environment temperature;
if the printing instruction is not the first time, determining whether the printing work is executed in a preset time before the current time;
if the printing work is executed, acquiring a first environment temperature of the thermal print head when the printing work is executed last time, and taking the value of the first environment temperature as the environment temperature of the thermal print head at this time;
and if the printing work is not executed, taking the numerical value of the temperature of the printing head as the environment temperature.
6. The method of claim 4, further comprising:
analyzing a print task from the print instruction;
and when the thermal print head is detected to reach the target temperature, controlling the printer to print based on the print task.
7. The method of claim 1, wherein the printer is configured with a first thermistor for detecting a temperature of the printhead and a second thermistor for detecting an ambient temperature of the printhead.
8. A printhead temperature compensation device, the device comprising:
the temperature acquisition module is used for acquiring the temperature of a printing head of a thermal printing head of the printer and determining the environment temperature of the thermal printing head;
the first time determining module is used for determining initial heating time corresponding to the temperature of the thermal print head to the target temperature according to the temperature of the print head;
a second time determining module for determining a total compensation time for temperature compensation of the thermal printhead according to the printhead temperature and the ambient temperature;
and the temperature compensation module is used for carrying out numerical calculation on the initial heating time and the total compensation time to obtain target heating time, and heating the thermal printing head based on the target heating time so as to enable the thermal printing head to reach the target temperature.
9. A printer, the printer comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the printhead temperature compensation method of any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the method of printhead temperature compensation of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310928723.7A CN116691175A (en) | 2023-07-26 | 2023-07-26 | Printing head temperature compensation method, device, printer and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310928723.7A CN116691175A (en) | 2023-07-26 | 2023-07-26 | Printing head temperature compensation method, device, printer and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116691175A true CN116691175A (en) | 2023-09-05 |
Family
ID=87834265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310928723.7A Pending CN116691175A (en) | 2023-07-26 | 2023-07-26 | Printing head temperature compensation method, device, printer and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116691175A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118560172A (en) * | 2024-08-01 | 2024-08-30 | 珠海恒茂电子科技有限公司 | Control method and system of thermal printer |
-
2023
- 2023-07-26 CN CN202310928723.7A patent/CN116691175A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118560172A (en) * | 2024-08-01 | 2024-08-30 | 珠海恒茂电子科技有限公司 | Control method and system of thermal printer |
CN118560172B (en) * | 2024-08-01 | 2024-10-22 | 珠海恒茂电子科技有限公司 | Control method and system of thermal printer |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113205189B (en) | Method for training prediction model, prediction method and device | |
CN116691175A (en) | Printing head temperature compensation method, device, printer and storage medium | |
CN116798062A (en) | A drawing difference identification method, device, system and storage medium | |
CN116993416A (en) | Merchant recommendation method, device, equipment and medium | |
CN115576902B (en) | Method, device, equipment and medium for processing calibration description file | |
CN116524959A (en) | Voice emotion determining method, device, equipment and medium | |
CN114564149B (en) | Data storage method, device, equipment and storage medium | |
CN116932304A (en) | Register test method and device, electronic equipment and storage medium | |
CN116011677A (en) | Time sequence data prediction method and device, electronic equipment and storage medium | |
CN116545905A (en) | Service health detection method and device, electronic equipment and storage medium | |
CN115048352A (en) | Log field extraction method, device, equipment and storage medium | |
CN113448828A (en) | Object data detection method and device, electronic equipment and computer storage medium | |
CN116303071B (en) | Interface testing method, device, electronic equipment and storage medium | |
CN115373418B (en) | Motion control method, device, equipment and medium for mobile terminal | |
CN119399781A (en) | Text recognition method, device, equipment, medium and product | |
CN116822972A (en) | Process parameter storage method and device, electronic equipment and storage medium | |
CN119356783A (en) | A method, device, equipment and storage medium for generating an operation interface | |
CN118313102A (en) | Method, device, equipment and medium for predicting ultimate recoverable reserves of shale gas reservoirs | |
CN116775065A (en) | Application upgrading method and device of slave controller, electronic equipment and storage medium | |
CN115983222A (en) | EasyExcel-based file data reading method, device, equipment and medium | |
CN116991737A (en) | Software testing method, system, electronic equipment and storage medium | |
CN116627853A (en) | Storage space recovery method, training device, training equipment and training medium for model | |
CN119520274A (en) | A script upgrade method, device, equipment, medium and product for terminal equipment | |
CN118427053A (en) | Load factor determining method, device, equipment and storage medium | |
CN118152678A (en) | Article display method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Country or region after: China Address after: Room 305a, angye building, Pioneer Park, torch hi tech Zone, Xiamen, Fujian, 361000 Applicant after: Xiamen Hanyin Co.,Ltd. Address before: Room 305a, angye building, Pioneer Park, torch hi tech Zone, Xiamen, Fujian, 361000 Applicant before: XIAMEN HANIN ELECTRONIC TECHNOLOGY Co.,Ltd. Country or region before: China |