A printhead temperature compensation method, device, printer and storage medium
By configuring print heating compensation curves and ambient temperature compensation curves in thermal printers, and calculating the target heating time based on printhead and ambient temperature, the problem of inconsistent printing results is solved, achieving accurate temperature compensation in different environments, thus improving print quality and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAMEN HANIN CO LTD
- Filing Date
- 2023-07-26
- Publication Date
- 2026-07-24
AI Technical Summary
Existing thermal printer temperature compensation methods are affected by the printing environment temperature, resulting in inconsistent printing results, poor user experience, and even potential damage to the print head.
By configuring print heating compensation curves and ambient temperature compensation curves in the printer, and combining printhead temperature and ambient temperature, the target heating time can be calculated to achieve precise temperature compensation.
Achieve more accurate temperature compensation under different temperature environments, improve printing quality, avoid printhead damage, and enhance user experience.
Smart Images

Figure CN116691175B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of thermal printing technology, and in particular to a printhead temperature compensation method, device, printer and storage medium. Background Technology
[0002] As thermal printing image processing technology gradually moves from commercial to civilian use, more and more people are coming into contact with thermal printing technology. People's various printing needs (express waybills, price tags, and students' wrong answers, etc.) have also spurred the vigorous development of portable thermal printers.
[0003] The thermal printhead is the core component of a printer, and its temperature compensation directly impacts print quality and user experience. Currently, thermal printers typically use a single thermistor to monitor the printhead temperature in real time and set different heating times for different temperatures to compensate for the printhead's temperature. However, this single temperature compensation method is affected by the ambient temperature; different ambient temperatures result in varying print density, leading to inconsistent print quality, a poor user experience, and potentially even printhead damage. Therefore, designing a more accurate and efficient temperature compensation method has become a pressing issue. Summary of the Invention
[0004] This application provides a printhead temperature compensation method, device, printer, and storage medium, which enables the printer to perform temperature-compensated printing more accurately and effectively under different temperature environments, thereby achieving better printing results.
[0005] Firstly, this application provides a printhead temperature compensation method, the method comprising:
[0006] Obtain the printhead temperature of the thermal printhead of the printer and determine the ambient temperature of the thermal printhead.
[0007] The initial heating time corresponding to heating the thermal printhead to the target temperature is determined based on the printhead temperature.
[0008] The total compensation time for temperature compensation of the thermal printhead is determined based on the printhead temperature and the ambient temperature.
[0009] The target heating time is obtained by numerically calculating the initial heating time and the total compensation time, and the thermal printhead is heated based on the target heating time so that the thermal printhead reaches the target temperature.
[0010] Furthermore, determining the total compensation time for temperature compensation of the thermal printhead based on the printhead temperature and the ambient temperature includes: determining a first compensation time corresponding to the ambient temperature based on a pre-configured ambient temperature compensation curve; determining a second compensation time corresponding to the printhead temperature based on a pre-configured print heating compensation curve; and performing numerical calculations on the first compensation time and the second compensation time to obtain the total compensation time.
[0011] Furthermore, the ambient temperature compensation curve is used to represent the compensation time required to heat the thermal printhead to the expected printing temperature under different ambient temperatures; the printing heating compensation curve is used to represent the compensation time required to heat the thermal printhead to the expected printing temperature under different printhead temperatures.
[0012] Furthermore, before obtaining the printhead temperature of the printer's thermal printhead, the method further includes receiving a print command.
[0013] Furthermore, determining the ambient temperature of the thermal printhead includes: determining whether the printing command is the first printing command received after the printer is powered on; if the printing command is the first, then the value of the printhead temperature is used as the ambient temperature; if the printing command is not the first, then determining whether a printing operation has been performed within a preset time period before the current time; if a printing operation has been performed, then obtaining the first ambient temperature of the thermal printhead at the time of the last printing operation, and using the value of the first ambient temperature as the ambient temperature of the thermal printhead at the current time; if no printing operation has been performed, then using the value of the printhead temperature as the ambient temperature.
[0014] Furthermore, the method also includes: parsing a print task from the print instruction; and controlling the printer to print based on the print task when the thermal print head is detected to have reached the target temperature.
[0015] Furthermore, the printer is equipped with a first thermistor and a second thermistor. The first thermistor is used to detect the printhead temperature of the thermal printhead, and the second thermistor is used to detect the ambient temperature of the thermal printhead.
[0016] Secondly, this application provides a printhead temperature compensation device, which includes:
[0017] The temperature acquisition module is used to acquire the printhead temperature of the thermal printhead of the printer and determine the ambient temperature of the thermal printhead.
[0018] The first-time determination module is used to determine the initial heating time corresponding to heating the thermal printhead to the target temperature based on the printhead temperature.
[0019] The second time determination module is used to determine the total compensation time for temperature compensation of the thermal printhead based on the printhead temperature and the ambient temperature.
[0020] The temperature compensation module is used to numerically calculate the target heating time from the initial heating time and the total compensation time, and to heat the thermal printhead based on the target heating time so that the thermal printhead reaches the target temperature.
[0021] Thirdly, this application provides a printer comprising:
[0022] At least one processor; and
[0023] A memory communicatively connected to the at least one processor; wherein,
[0024] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the printhead temperature compensation method described in any embodiment of this application.
[0025] Fourthly, this application provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the printhead temperature compensation method described in any embodiment of this application.
[0026] To address the shortcomings of existing technologies, this application provides a printhead temperature compensation method. This method offers the following advantages: The printer is equipped with a print heating compensation curve and an ambient temperature compensation curve. By acquiring the printhead temperature and the ambient temperature, a first compensation time corresponding to the ambient temperature and a second compensation time corresponding to the printhead temperature are determined. This solves the problems of inconsistent print density and print quality caused by varying ambient temperatures. Without adding electronic components, this application enables the printer to perform temperature-compensated printing more accurately and effectively in different temperature environments, achieving better print quality.
[0027] It should be noted that the aforementioned computer instructions may be stored, in whole or in part, on a computer-readable storage medium. This computer-readable storage medium may be packaged together with the processor of the printhead temperature compensation device, or it may be packaged separately from the processor of the printhead temperature compensation device; this application does not impose any limitations on this.
[0028] The descriptions of the second, third, and fourth aspects in this application can be referenced to the detailed description of the first aspect; and the beneficial effects described in the second, third, and fourth aspects can be referenced to the analysis of the beneficial effects of the first aspect, which will not be repeated here.
[0029] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this application, nor is it intended to limit the scope of this application. Other features of this application will become readily apparent from the following description.
[0030] It is understood that before using the technical solutions disclosed in the various embodiments of this application, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this application in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained. Attached Figure Description
[0031] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0032] Figure 1 This is a schematic diagram of the first process of a printhead temperature compensation method provided in an embodiment of this application;
[0033] Figure 2 This is a schematic diagram of the second process of a printhead temperature compensation method provided in an embodiment of this application;
[0034] Figure 3 This is a schematic diagram of the structure of a printhead temperature compensation device provided in an embodiment of this application;
[0035] Figure 4 This is a block diagram of a printer used to implement a printhead temperature compensation method according to an embodiment of this application. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0037] It should be noted that the terms "first," "second," "target," and "original," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein. Furthermore, the terms "comprising," "having," and any variations thereof are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0038] Figure 1 This is a schematic diagram of the first process of a printhead temperature compensation method provided in this application embodiment. This embodiment is applicable to temperature compensation of the printhead of a thermal printer, accurately controlling the printhead temperature to reach the target temperature. The printhead temperature compensation method provided in this embodiment can be executed by the printhead temperature compensation device provided in this application embodiment. This device can be implemented by software and / or hardware and integrated into the electronic device executing the method. Preferably, the electronic device in this application embodiment can be a printer, and the executing entity for the printhead temperature compensation method can be the printer's main control system.
[0039] See Figure 1 The method in this embodiment includes, but is not limited to, the following steps:
[0040] S110. Obtain the printhead temperature of the thermal printhead of the printer and determine the ambient temperature of the thermal printhead.
[0041] Furthermore, before obtaining the printhead temperature of the printer's thermal printhead, the process also includes receiving a print command. Specifically, the printer and the user terminal communicate via existing communication methods (such as LAN, Bluetooth, etc.). The user terminal is equipped with physical or virtual buttons for printing. The user triggers the printing function on the user terminal using these physical or virtual buttons, generates a print command, and sends it to the printer's main control system. Upon receiving the print command, the main control system responds accordingly.
[0042] In one optional embodiment, the printer is equipped with a negative temperature coefficient (NTC) thermistor, which is used to obtain the printhead temperature of the thermal printhead. The printer may be configured with one NTC thermistor connected to the main control system for real-time detection of the printhead temperature. After obtaining the printhead temperature, the main control system determines the ambient temperature of the thermal printhead based on the printhead temperature through a preset logic flow. Optionally, the preset logic flow may be a logical relationship between the printhead temperature and the ambient temperature, which will be... Figure 2 The corresponding embodiments explain the logic flow in detail.
[0043] In another alternative embodiment, the printer may be configured with two NTC thermistors, such as a first thermistor and a second thermistor, which are connected to the main control system to monitor the printhead temperature and ambient temperature in real time. The first thermistor is used to detect the printhead temperature of the thermal printhead, and the second thermistor is used to detect the ambient temperature of the thermal printhead.
[0044] S120. Determine the initial heating time corresponding to heating the thermal printhead to the target temperature based on the printhead temperature.
[0045] In this embodiment, the target temperature can be a fixed value, referring to the temperature required by the print head during normal printing. A relationship table between temperature difference and heating time can be pre-configured and stored in the printer's storage unit. When the print head temperature is obtained, the relationship table is retrieved from the storage unit to calculate the temperature difference between the print head temperature and the target temperature. The heating time corresponding to this temperature difference is then found in the relationship table and recorded as the initial heating time. However, the initial heating time can become inaccurate due to the influence of the print head temperature and ambient temperature. That is, after heating the thermal print head using the initial heating temperature and the printer's preset fixed temperature rise rate, the temperature of the thermal print head may not be the target temperature.
[0046] S130. Determine the total compensation time for temperature compensation of the thermal printhead based on the printhead temperature and ambient temperature.
[0047] Furthermore, the total compensation time for temperature compensation of the thermal printhead is determined based on the printhead temperature and the ambient temperature, including: determining the first compensation time corresponding to the ambient temperature according to the pre-configured ambient temperature compensation curve; determining the second compensation time corresponding to the printhead temperature according to the pre-configured print heating compensation curve; and calculating the total compensation time by numerically calculating the first compensation time and the second compensation time.
[0048] The ambient temperature compensation curve represents the compensation time required to heat the thermal printhead to the expected printing temperature under different ambient temperatures. Specifically, it involves: keeping the printhead temperature constant; selecting a reference ambient temperature from multiple ambient temperatures; heating the printhead to the expected printing temperature under each of these ambient temperatures, obtaining the heating time corresponding to each temperature; subtracting this heating time from the heating time at the reference ambient temperature to obtain the compensation time required to heat the thermal printhead to the expected printing temperature under these temperatures, thus obtaining the ambient temperature compensation curve for different ambient temperatures. The print heating compensation curve represents the compensation time required to heat the thermal printhead to the expected printing temperature under different printhead temperatures. Specifically, it involves: keeping the ambient temperature constant; selecting a reference printhead temperature from multiple printhead temperatures; heating the printhead to the expected printing temperature under these temperatures, obtaining the heating time corresponding to each temperature; subtracting this heating time from the heating time at the reference ambient temperature to obtain the compensation time required to heat the thermal printhead to the expected printing temperature under these temperatures, thus obtaining the print heating compensation curve for different printhead temperatures.
[0049] Existing temperature compensation methods typically determine the compensation time based solely on the printhead temperature. This single method is susceptible to the influence of the ambient temperature. Inconsistent temperature differences between the printhead and the environment lead to varying print density for the same heating time, resulting in inconsistent print quality, poor user experience, and potentially even printhead damage. For example, if the heating compensation time is fixed when the detected printhead temperature is 50°C, but the print quality differs depending on whether the ambient temperature is 0°C or 35°C. To address these shortcomings, this application, without adding electronic components, incorporates software logic—specifically, configuring print heating compensation curves and ambient temperature compensation curves on the printer—to enable the printer to perform temperature-compensated printing more accurately and effectively under different temperature conditions, achieving better print quality.
[0050] S140. The target heating time is obtained by numerically calculating the initial heating time and the total compensation time, and the thermal printhead is heated based on the target heating time so that the thermal printhead reaches the target temperature.
[0051] In this embodiment of the application, after determining the initial heating time and the total compensation time, the main control system subtracts the total compensation time from the initial heating time to obtain the target heating time, and heats the thermal printhead based on the target heating time so that the thermal printhead reaches the target temperature.
[0052] Furthermore, the printhead temperature compensation method also includes: the main control system parses the print task from the print command; one end of the main control system is connected to the NTC thermistor, and the other end is connected to the thermal printhead; the main control system detects the temperature of the thermal printhead in real time, and when the target temperature is reached, controls the printer to print based on the print task.
[0053] The technical solution provided in this embodiment obtains the printhead temperature of the thermal printhead of the printer and determines the ambient temperature where the thermal printhead is located; determines the initial heating time corresponding to heating the thermal printhead to the target temperature based on the printhead temperature; determines the total compensation time for temperature compensation of the thermal printhead based on the printhead temperature and the ambient temperature; calculates the target heating time by numerically calculating the initial heating time and the total compensation time, and heats the thermal printhead based on the target heating time to make the thermal printhead reach the target temperature. This application configures a print heating compensation curve and an ambient temperature compensation curve in the printer. By obtaining the printhead temperature and the ambient temperature where the printhead is located, it determines the first compensation time corresponding to the ambient temperature and the second compensation time corresponding to the printhead temperature, thus solving the problem of different print density and inconsistent print quality caused by different printing ambient temperatures. This application can enable the printer to perform temperature compensation printing better and more accurately in different temperature environments without adding electronic components, by adding software logic processes, to obtain better print quality.
[0054] The printhead temperature compensation method provided in the embodiments of this application is further described below. Figure 2 This is a second flowchart illustrating a printhead temperature compensation method provided in an embodiment of this application. This embodiment is an optimization based on the above embodiments, specifically an optimization that provides a detailed explanation of the process for determining the ambient temperature.
[0055] See Figure 2 The method in this embodiment includes, but is not limited to, the following steps:
[0056] S210. Determine whether the print command is the first print command received after the printer is powered on.
[0057] In this embodiment, the user triggers the printing function on the user terminal using the physical or virtual button of the printing function. The user terminal generates a printing command and sends the printing command to the printer's main control system. After receiving the printing command, the main control system determines whether the printing command is the first printing command received after the printer is turned on, thereby determining whether the print head temperature is consistent with the ambient temperature.
[0058] If this is the first print command, it indicates that the print head temperature is consistent with the ambient temperature, so proceed to step S220; if this is not the first print command, then proceed to step S230.
[0059] S220. If this is the first print command, the printhead temperature value will be used as the ambient temperature.
[0060] In this embodiment of the application, when the printing command is the first time, it indicates that the printhead temperature and the ambient temperature are the same, so the value of the printhead temperature is taken as the ambient temperature.
[0061] S230. If this print command is not the first one, determine whether a print job has been performed within a preset time period before the current time.
[0062] In this embodiment, when the current print command is not the first one, the moment the current print command is received is taken as the current moment. It is also necessary to determine the interval between the previous print command and the current print command, that is, to determine whether a print job has been performed within a preset time period prior to the current time. The preset time can be 10 minutes.
[0063] S240. If a printing job has been performed, obtain the first ambient temperature at which the thermal printhead was located when the printing job was last performed, and use the value of the first ambient temperature as the ambient temperature at which the thermal printhead is located this time.
[0064] In this embodiment, if the interval is short (i.e., a printing operation was performed within a preset time before the current time), it can be assumed that the printhead has not cooled to the value corresponding to the ambient temperature; that is, the printhead temperature and the ambient temperature are inconsistent. Since the interval between the last printing command and the current printing command is short, it can be assumed that the ambient temperature (first ambient temperature) corresponding to the last printing operation and the ambient temperature corresponding to the current printing operation have not changed. Therefore, the first ambient temperature at which the thermal printhead was located during the last printing operation can be obtained, and the value of the first ambient temperature can be used as the ambient temperature at which the thermal printhead is located this time.
[0065] S250. If no printing work has been performed, the printhead temperature value is taken as the ambient temperature. In this embodiment, if the interval is long (i.e., no printing work has been performed within a preset time before the current time), it can be assumed that the printhead has cooled to the value corresponding to the ambient temperature, that is, the printhead temperature and the ambient temperature are the same. Then, the printhead temperature value obtained by the NTC thermistor can be taken as the ambient temperature.
[0066] The technical solution provided in this embodiment determines whether the print command is the first print command received after the printer is powered on. If this print command is the first, the printhead temperature value is used as the ambient temperature. If this print command is not the first, it determines whether a print job has been performed within a preset time before the current time. If a print job has been performed, the first ambient temperature of the thermal printhead at the time of the last print job is obtained, and the value of the first ambient temperature is used as the ambient temperature of the thermal printhead at this time. If no print job has been performed, the printhead temperature value is used as the ambient temperature. In this embodiment, the printer is equipped with an NTC thermistor. The printhead temperature of the thermal printhead is obtained through the NTC thermistor, and the ambient temperature is determined by logic processes such as whether the print command is the first print command received and the interval between the last print command and the current print command. This application can determine the printhead temperature of the thermal printhead and the ambient temperature of the thermal printhead by adding software logic processes without adding electronic components, using only an NTC thermistor in the printer. The printer implementing this solution can perform temperature-compensated printing more accurately and effectively under different temperature conditions, resulting in better printing quality.
[0067] In one specific application embodiment, the user triggers the printing function on the user terminal using a physical or virtual button. The user terminal generates a print command and sends it to the printer's main control system. After receiving the print command, the main control system determines whether it is the first print command received since the printer was powered on. The total compensation time is determined in three scenarios.
[0068] Scenario 1: Assume this is the first print command. The printhead temperature obtained through the NTC thermistor is T0, and the ambient temperature of the printhead is T1, where T0 = T1 = 18℃. Based on the print heating compensation curve, the second compensation time corresponding to the printhead temperature is determined and denoted as t0, where t0 = 0.112ms. Based on the ambient temperature compensation curve, the first compensation time corresponding to the ambient temperature is determined and denoted as t1, where t1 = 0.056ms. The total compensation time is: t0 + t1 = 0.168ms.
[0069] Scenario 2: Assuming this print command is not the first, the main control system further determines whether a print job has been performed before the preset time (which could be 10 minutes). If a print job has been performed, then T1 is used as the current ambient temperature, and the first compensation time corresponding to the ambient temperature is t1 = 0.056ms. The printhead temperature obtained through the NTC thermistor is recorded as T2, where T2 = 46℃. Based on the print heating compensation curve, the second compensation time corresponding to the printhead temperature is determined and recorded as t2, where t2 = -0.234ms. The total compensation time is: t1 + t2 = -0.178ms.
[0070] Scenario 3: If the main control system determines that no printing has been performed before the preset time, and the printhead temperature obtained by the NTC thermistor is T4 (T4 = 12℃), this printhead temperature is taken as the ambient temperature, denoted as T3 (T3 = 12℃). Based on the ambient temperature compensation curve, the first compensation time corresponding to the ambient temperature is determined, denoted as t3 (t3 = 0.208ms). Then, based on the printing heating compensation curve, the second compensation time corresponding to the printhead temperature is determined, denoted as t4 (t4 = 0.208ms). The total compensation time is t3 + t4 = 0.416ms. Finally, compensation printing is performed using the total compensation time.
[0071] Figure 3 This is a schematic diagram of the structure of a printhead temperature compensation device provided in an embodiment of this application, as shown below. Figure 3 As shown, the device 300 may include:
[0072] Temperature acquisition module 310 is used to acquire the printhead temperature of the thermal printhead of the printer and determine the ambient temperature of the thermal printhead.
[0073] The first-time determination module 320 is used to determine the initial heating time corresponding to heating the thermal printhead to the target temperature based on the printhead temperature.
[0074] The second time determination module 330 is used to determine the total compensation time for temperature compensation of the thermal printhead based on the printhead temperature and the ambient temperature.
[0075] The temperature compensation module 340 is used to numerically calculate the target heating time from the initial heating time and the total compensation time, and to heat the thermal printhead based on the target heating time so that the thermal printhead reaches the target temperature.
[0076] Furthermore, the aforementioned second time determination module 330 can be specifically used to: determine the first compensation time corresponding to the ambient temperature according to a pre-configured ambient temperature compensation curve; determine the second compensation time corresponding to the print head temperature according to a pre-configured print heating compensation curve; and perform numerical calculations on the first compensation time and the second compensation time to obtain the total compensation time.
[0077] Optionally, the ambient temperature compensation curve is used to represent the compensation time required to heat the thermal printhead to the expected printing temperature under different ambient temperatures; the printing heating compensation curve is used to represent the compensation time required to heat the thermal printhead to the expected printing temperature under different printhead temperatures.
[0078] Furthermore, the aforementioned printhead temperature compensation device may also include: a command receiving module;
[0079] The instruction receiving module is used to receive a printing instruction before obtaining the printhead temperature of the thermal printhead of the printer.
[0080] Furthermore, the temperature acquisition module 310 described above can be specifically used to: determine whether the printing command is the first printing command received after the printer is powered on; if the printing command is the first one, then the value of the printhead temperature is used as the ambient temperature; if the printing command is not the first one, then determine whether a printing operation has been performed within a preset time before the current time; if a printing operation has been performed, then obtain the first ambient temperature where the thermal printhead was located when the printing operation was performed last time, and use the value of the first ambient temperature as the ambient temperature where the thermal printhead is located this time; if no printing operation has been performed, then use the value of the printhead temperature as the ambient temperature.
[0081] Furthermore, the aforementioned printhead temperature compensation device may also include: a print control module;
[0082] The printing control module is used to parse the printing task from the printing instruction; when the thermal printhead is detected to have reached the target temperature, it controls the printer to print based on the printing task.
[0083] Optionally, the printer is equipped with a first thermistor and a second thermistor, the first thermistor being used to detect the printhead temperature of the thermal printhead, and the second thermistor being used to detect the ambient temperature of the thermal printhead.
[0084] The printhead temperature compensation device provided in this embodiment can be applied to the printhead temperature compensation method provided in any of the above embodiments, and has the corresponding functions and beneficial effects.
[0085] Figure 4 This is a block diagram of a printer used to implement a printhead temperature compensation method according to embodiments of this application. Printer 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The printer can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the application described and / or claimed herein.
[0086] like Figure 4 As shown, printer 10 includes at least one processor 11 and a memory, such as read-only memory (ROM) 12, random access memory (RAM) 13, etc., communicatively connected to at least one processor 11. The memory stores computer programs executable by at least one processor. Processor 11 can perform various appropriate actions and processes based on the computer program stored in ROM 12 or loaded into RAM 13 from storage unit 18. RAM 13 may also store various programs and data required for printer 10 operation. Processor 11, ROM 12, and RAM 13 are interconnected via bus 14. Input / output (I / O) interface 15 is also connected to bus 14.
[0087] Multiple components in printer 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of monitors, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows printer 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0088] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with 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 special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as printhead temperature compensation methods.
[0089] In some embodiments, the printhead temperature compensation method may be implemented as a computer program tangibly contained in 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 on printer 10 via ROM 12 and / or 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, processor 11 may be configured to perform the printhead temperature compensation method by any other suitable means (e.g., by means of firmware).
[0090] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0091] Computer programs used to implement the methods of this 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, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0092] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0093] To provide interaction with the user, the systems and techniques described herein can be implemented on a printer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the printer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0094] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0095] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0096] Note that the above are merely preferred embodiments and technical principles applied in this application. Those skilled in the art will understand that this application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of this application. For example, those skilled in the art can use the various forms of processes shown above to reorder, add, or delete steps; the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solution of this application can be achieved, and no limitations are imposed herein.
[0097] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A printhead temperature compensation method, characterized in that, The method includes: Obtain the printhead temperature of the thermal printhead of the printer and determine the ambient temperature of the thermal printhead. The initial heating time corresponding to heating the thermal printhead to the target temperature is determined based on the printhead temperature. The total compensation time for temperature compensation of the thermal printhead is determined based on the printhead temperature and the ambient temperature. The target heating time is obtained by numerically calculating the initial heating time and the total compensation time, and the thermal printhead is heated based on the target heating time so that the thermal printhead reaches the target temperature; Prior to obtaining the printhead temperature of the thermal printhead of the printer, the method further includes: receiving a print command; Determining the ambient temperature of the thermal printhead includes: determining whether the printing command is the first printing command received after the printer is powered on; if the printing command is the first, then the value of the printhead temperature is taken as the ambient temperature; if the printing command is not the first, then determining whether a printing operation has been performed within a preset time period before the current time; if a printing operation has been performed, then obtaining the first ambient temperature of the thermal printhead at the time of the last printing operation, and taking the value of the first ambient temperature as the ambient temperature of the thermal printhead at the current time; if no printing operation has been performed, then taking the value of the printhead temperature as the ambient temperature.
2. The printhead temperature compensation method according to claim 1, characterized in that, The determination of the total compensation time for temperature compensation of the thermal printhead based on the printhead temperature and the ambient temperature includes: The first compensation time corresponding to the ambient temperature is determined according to the pre-configured ambient temperature compensation curve. The second compensation time corresponding to the printhead temperature is determined according to the pre-configured print heating compensation curve; The total compensation time is obtained by numerically calculating the first compensation time and the second compensation time.
3. The printhead temperature compensation method according to claim 2, characterized in that, The ambient temperature compensation curve is used to represent the compensation time required to heat the thermal printhead to the expected printing temperature under different ambient temperatures; the printing heating compensation curve is used to represent the compensation time required to heat the thermal printhead to the expected printing temperature under different printhead temperatures.
4. The printhead temperature compensation method according to claim 1, characterized in that, The method further includes: The print task is parsed from the print instruction; When the thermal printhead is detected to have reached the target temperature, the printer is controlled to print based on the print job.
5. The printhead temperature compensation method according to claim 1, characterized in that, The printer is equipped with a first thermistor and a second thermistor. The first thermistor is used to detect the printhead temperature of the thermal printhead, and the second thermistor is used to detect the ambient temperature of the thermal printhead.
6. A printhead temperature compensation device, characterized in that, The apparatus for implementing the printhead temperature compensation method of claim 1 includes: The temperature acquisition module is used to acquire the printhead temperature of the thermal printhead of the printer and determine the ambient temperature of the thermal printhead. The first-time determination module is used to determine the initial heating time corresponding to heating the thermal printhead to the target temperature based on the printhead temperature. The second time determination module is used to determine the total compensation time for temperature compensation of the thermal printhead based on the printhead temperature and the ambient temperature. The temperature compensation module is used to numerically calculate the target heating time from the initial heating time and the total compensation time, and to heat the thermal printhead based on the target heating time so that the thermal printhead reaches the target temperature.
7. A printer, characterized in that, The printer includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the printhead temperature compensation method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the printhead temperature compensation method according to any one of claims 1 to 5.