WO2024078095A1 - 热敏打印机的打印方法、打印机、打印系统及存储介质 - Google Patents

热敏打印机的打印方法、打印机、打印系统及存储介质 Download PDF

Info

Publication number
WO2024078095A1
WO2024078095A1 PCT/CN2023/109662 CN2023109662W WO2024078095A1 WO 2024078095 A1 WO2024078095 A1 WO 2024078095A1 CN 2023109662 W CN2023109662 W CN 2023109662W WO 2024078095 A1 WO2024078095 A1 WO 2024078095A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
printed
current
dot row
step time
Prior art date
Application number
PCT/CN2023/109662
Other languages
English (en)
French (fr)
Inventor
刘传
涂盛祥
Original Assignee
百富计算机技术(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 百富计算机技术(深圳)有限公司 filed Critical 百富计算机技术(深圳)有限公司
Publication of WO2024078095A1 publication Critical patent/WO2024078095A1/zh

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • B41J29/393Devices for controlling or analysing the entire machine ; Controlling or analysing mechanical parameters involving printing of test patterns
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J2/00Typewriters or selective printing mechanisms characterised by the printing or marking process for which they are designed
    • B41J2/315Typewriters 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/32Typewriters 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
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41MPRINTING, DUPLICATING, MARKING, OR COPYING PROCESSES; COLOUR PRINTING
    • B41M5/00Duplicating or marking methods; Sheet materials for use therein
    • B41M5/26Thermography ; Marking by high energetic means, e.g. laser otherwise than by burning, and characterised by the material used

Definitions

  • the present application belongs to the technical field of thermal printers, and in particular, relates to a printing method, a printer, a printing system and a storage medium of a thermal printer.
  • Thermal printers are often used in various supermarkets, convenience stores, hospitals and other places, which have certain requirements for printing effect and printing speed.
  • the printing speed of thermal printers is currently adjusted to the expected theoretical value using printer drivers.
  • printer drivers it was found that when using the existing printer driver, paper jams will occur when printing. The root cause is that the printer speed changes too much, causing the printer to be unable to pull the paper.
  • printer manufacturers provide an accelerometer to ensure that the printing speed of the thermal printer does not change too much when changing from slow to fast. However, it still cannot solve the problem that the printing speed changes too much when changing from fast to slow.
  • embodiments of the present application provide a printing method, a printer, a printing system and a storage medium for a thermal printer to solve the problem in the prior art that the printing speed varies too much from fast to slow.
  • the calculation of the theoretical stepping time T m of the current row of dots to be printed m includes: obtaining the heating time Gh m of the current row of dots to be printed m; obtaining the acceleration stepping time T of the current row of dots to be printed m in the acceleration table; judging whether the acceleration stepping time T of the current row of dots to be printed m is greater than or equal to the heating time Gh m of the current row of dots to be printed m; if so, determining that the theoretical stepping time T m of the current row of dots to be printed m is the acceleration stepping time T; if not, determining that the theoretical stepping time T m of the current row of dots to be printed m is the heating time Gh m .
  • obtaining the acceleration step time T of the current row of dots to be printed m in the acceleration table includes: finding the position of the current row of dots to be printed m-1 in the acceleration table, and finding the position of the current row of dots to be printed m according to the position of the current row of dots to be printed m-1; and obtaining the acceleration step time T according to the position of the current row of dots to be printed m.
  • a third aspect of an embodiment of the present application provides a printing system, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any method described in the first aspect when executing the computer program.
  • a fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.
  • the embodiments of the present application have the following beneficial effects: the embodiments of the present application provide a printing method, a printer, a printing system and a storage medium for a thermal printer, and a corresponding deceleration table is designed for an existing acceleration table.
  • the deceleration table can be used to adjust the step time of the current row of dots to be printed calculated by the existing acceleration table to ensure that the step time of the current row of dots to be printed is greater than the step time in the deceleration table, thereby ensuring that it is possible to predict in advance whether to reduce the current speed and how much to reduce it, thereby avoiding the problem of a large change from fast to slow when the printing speed of the thermal printer is reduced, ensuring that the thermal printer always maintains a certain pulling force on the paper, and reducing the chance of paper jams in the thermal printer.
  • FIG1 is a schematic diagram of a semiconductor heating element in a thermal printer provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of a printing method for a thermal printer according to an embodiment of the present application.
  • FIG3 is a schematic diagram of a complete implementation flow of a printing method of a thermal printer provided in an embodiment of the present application
  • FIG4 is a schematic diagram of an accelerometer of a stepper motor provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a speed reduction table of a stepping motor provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of a heating schedule provided in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of the structure of a printer provided in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of the structure of a printing system provided in an embodiment of the present application.
  • the thermal printer is provided with a semiconductor heating element, as shown in FIG1 , specifically a row of several equally spaced heating metals.
  • each heating metal has a specification of 0.125 mm ⁇ 0.125 mm, and the spacing between the heating metals can be 0.125 mm.
  • the length of the semiconductor heating element formed by all the heating metals is 54 mm.
  • the thermal printer has a stepper motor, which works with the semiconductor heating element.
  • the stepper motor pulls the thermal printing paper forward to print out text and patterns. It is understandable that in order to ensure the smooth printing of each printing dot line, the stepping time of the stepper motor must be greater than or equal to the heating time of the heated metal.
  • the embodiments of the present application provide a printing method, a printer, a printing system and a storage medium for a thermal printer.
  • a deceleration table for a stepper motor is designed corresponding to the existing acceleration table.
  • the deceleration table is used to adjust the stepping time of the current row of dots to be printed calculated by the existing acceleration table to ensure that the stepping time of the current row of dots to be printed is greater than the stepping time in the deceleration table.
  • an embodiment of the present application provides a printing method of a thermal printer, comprising the following steps:
  • Step S21 obtaining N stepping times from the acceleration table of the stepping motor according to a preset step number interval, and arranging the N stepping times from small to large to form a deceleration table Gd of the stepping motor, wherein N is the number of printing dot rows;
  • the accelerometer of the stepper motor is provided by the printer manufacturer for the thermal printer.
  • the thermal printer will work according to the rules of the accelerometer.
  • the embodiment of the present application provides one of the accelerometers of the stepper motor.
  • the step time unit is microseconds. It can be seen from the accelerometer that when the printing speed of the stepper motor changes from slow to fast during the printing process, it will accelerate according to the acceleration curve of the accelerometer to achieve a slow increase in the printing speed, and the problem of excessive change in the printing speed will not occur.
  • the embodiment of the present application creatively proposes a deceleration table, which uses the deceleration table to determine the step time of the stepper motor to ensure that the printing speed changes from fast to slow, and the problem of excessive change in the printing speed will not occur.
  • the process of obtaining the deceleration table from the acceleration table is: obtain N step times in the acceleration table of the stepper motor according to the preset step interval, and arrange the N step times from small to large to form a deceleration table Gd.
  • N is the number of printed dot rows, that is, the total number of dot rows that need to be printed when completing a printing job, and each printed dot row corresponds to a step time. It takes N step times to complete a printing job.
  • the change order of the N step times in the acceleration table is from large to small, and the change order of the N step times in the deceleration table is from small to large.
  • the deceleration table designed in the embodiment of the present application can select different preset step intervals according to printers of different speeds and actual application needs, formulate different deceleration processes, and meet various deceleration requirements.
  • the embodiment of the present application is exemplified in conjunction with the acceleration table of Figure 4.
  • 7 step times can be obtained in the acceleration table at intervals of 5 steps, that is, 7 corresponding step times a1, a2, a3, a4, a5, a6, and a7 are obtained at positions with step numbers of 1, 5, 10, 15, 20, 25, and 30 in the acceleration table.
  • a1, a2, a3, a4, a5, a6, and a7 are arranged from small to large to form a deceleration table Gd.
  • the arrangement order of the 7 step times in the deceleration table Gd is a7, a6, a5, a4, a3, a2, and a1, as shown in Figure 5.
  • step S22 specifically includes: obtaining the heating time Gh m of the current to-be-printed dot row m;
  • the theoretical step time T m of the current to-be-printed dot row m is determined to be the acceleration step time T; if no, the theoretical step time T m of the current to-be-printed dot row m is determined to be the heating time Gh m .
  • the theoretical stepping time T m of the current to-be-printed dot row m refers to the stepping time when the stepping motor is about to enter the next printing dot row after the stepping time of the currently printed printing dot row.
  • the stepping time of the next printing dot row is referred to as the theoretical stepping time T m
  • one printing job includes N theoretical stepping times T m .
  • the stepping time of the stepper motor can be calculated based on the accelerometer.
  • the embodiment of the present application finds the position of the stepping time of the currently completed printing dot row in the accelerometer according to the stepping time of the currently completed printing dot row, and obtains the stepping time of the next printing dot row in the accelerometer. This stepping time is called the acceleration stepping time T of the current dot row m to be printed.
  • FIG6 shows a heating time table of a thermal printer.
  • the heating time Gh m is random.
  • the calculation of the heating time Gh m of the current dot row m to be printed adopts the heating algorithm of the existing printer, which is not limited in the embodiment of the present application.
  • the embodiment of the present application determines the theoretical stepping time T m of the current row of dots to be printed m by comparing the acceleration stepping time T and the heating time Gh m of the current row of dots to be printed. Specifically, in order to ensure that printing is completed smoothly, the stepping time must be greater than or equal to the heating time.
  • the theoretical stepping time T m of the current row of dots to be printed m is determined to be the acceleration stepping time T; when the comparison shows that the acceleration stepping time T is less than the heating time Gh m , the theoretical stepping time T m of the current row of dots to be printed m is determined to be the heating time Gh m .
  • Step S23 Determine the step time of the current to-be-printed dot row m according to whether there is one or more step times in the deceleration table Gd that are less than the theoretical step time T m .
  • step S23 includes the following steps:
  • the theoretical step time T m of the current row of dots to be printed is calculated according to the above step S22, by judging whether there are one or more step times less than the theoretical step time T m in the deceleration table Gd, it can be judged whether to adjust the theoretical step time T m and how much the theoretical step time T m is adjusted to.
  • the algorithm time complexity of this step is O (N). Among them, one or more means one or more step times. When there are one or more step times less than the theoretical step time T m in the deceleration table Gd, it means that the current speed is very slow and no deceleration is required.
  • the step time of the current row of dots to be printed is the theoretical step time T m ; when there are one or more step times less than the theoretical step time T m in the deceleration table Gd, it is necessary to continue to judge whether to adjust the theoretical step time T m according to whether Ni is greater than or equal to M.
  • An embodiment of the present application exemplarily provides a situation in which a step time less than a theoretical step time T m exists in a deceleration table Gd, as shown in FIG5 , the left side is the deceleration table Gd of the stepper motor, and the right side is the theoretical step time T m of the current row of dots to be printed.
  • step S233 includes the following steps:
  • each step time Gd n is greater than or equal to the heating time Gh m , then determining the step time of the current to-be-printed dot row m to be the theoretical step time T m ;
  • step S233 when the deceleration table Gd has a step time less than the theoretical step time T m , the step time of the current row of dots to be printed m is determined by judging whether Ni is greater than or equal to M.
  • the time complexity of the algorithm of this step is O(N).
  • Ni is greater than or equal to M, it means that printing is about to end, and the deceleration operation can be performed directly, and the step time of the current row of dots to be printed m is determined to be the maximum step time Gd i ;
  • the deceleration flag when it is determined that each stepping time Gd n is greater than or equal to the heating time Gh m , the deceleration flag can be set to 0, otherwise the deceleration flag is set to 1, and the printer driver can adjust the stepping time of the stepping motor by judging the deceleration flag.
  • the i-Nth step time in the deceleration table Gd is compared with the heating time Gh m of the current dot row m to be printed, that is, a4, a3, a2, a1 are compared with Gh m . If a4, a3, a2, a1 are all greater than Gh m , it means that deceleration is not required, and the step time is determined to be the theoretical step time T m ; otherwise, the step time of the current dot row m to be printed is determined to be Gd i+k .
  • the process loops into determining the step time of the next printing dot row, re-executes the printing algorithm of the embodiment of the present application, and recalculates and updates the theoretical step time T m and heating time Gh m .
  • time complexity of the algorithm of the embodiment of the present application is O(2N), which proves that the method of the embodiment of the present application can not only avoid the problem of printer paper jam, but also the method is simple to calculate and has a fast calculation speed.
  • a printer including:
  • a forming module 71 is used to obtain N step times in the acceleration table of the stepping motor according to a preset step number interval, and arrange the N step times from small to large to form a deceleration table Gd of the stepping motor, where N is the number of printing dot rows;
  • the determination module 73 is used to determine the step time of the current to-be-printed dot row m according to whether there is one or more step times in the deceleration table Gd that are less than the theoretical step time T m .
  • the calculation module 72 is specifically configured to:
  • the theoretical step time T m of the current to-be-printed dot row m is determined to be the heating time Gh m .
  • the determining module 73 is specifically configured to:
  • the step time of the current to-be-printed dot row m is determined to be the theoretical step time T m ;
  • determining the stepping time of the current row of dots to be printed according to whether N-i is greater than or equal to M includes:
  • the step time of the current to-be-printed dot row m is determined to be the maximum step time Gd i ;
  • the stepping time of the current to-be-printed dot row m is determined to be the theoretical stepping time T m ;
  • a thermal printer in an embodiment of the present application is a modular device corresponding to the printing method of a thermal printer in the above embodiment. Its principle and implementation process are the same as those in the above embodiment. For details, please refer to the description of the method, which will not be described in detail here.
  • a third aspect of the embodiment of the present application provides a printing system, including: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80.
  • the processor 80 executes the computer program 82, the steps of the printing method embodiment of the thermal printer are implemented.
  • the processor 80 executes the computer program 82, the functions of each module/unit in the thermal printer embodiment are implemented.
  • a fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the printing method of the thermal printer are implemented.
  • the computer program 82 may be divided into one or more modules/units, which are stored in the memory 81 and executed by the processor 80 to complete the present application.
  • the one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 82 in the thermal printer.
  • the processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor or any conventional processor, etc.
  • the technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration.
  • the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
  • the functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
  • the disclosed devices/terminal equipment and methods can be implemented in other ways.
  • the device/terminal equipment embodiments described above are only schematic.
  • the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
  • Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions.
  • the computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor.
  • the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electric carrier signal telecommunication signal and software distribution medium.
  • the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
  • computer-readable media do not include electric carrier signals and telecommunication signals.

Landscapes

  • Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Electronic Switches (AREA)
  • Handling Of Sheets (AREA)

Abstract

公开了一种热敏打印机的打印方法、打印机、打印系统及存储介质。其中打印方法包括:按照预设步数间隔在步进电机的加速表中获取N个步进时间,将N个步进时间从小到大排列形成步进电机的减速表Gd;计算当前待打印点行m的理论步进时间T m;根据减速表Gd中是否存在小于理论步进时间T m的一个或多个步进时间,确定当前待打印点行m的步进时间。该打印方法能够在热敏打印机的打印速度降低时,避免速度从快到慢变化幅度过大,保证热敏打印机对纸张始终保持一定的拉力,不会出现卡纸现象。

Description

热敏打印机的打印方法、打印机、打印系统及存储介质
本申请要求于2022年10月10日在中国专利局提交的、申请号为202211233834.8、发明名称为“热敏打印机的打印方法、打印机、打印系统及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于热敏打印机技术领域,尤其涉及热敏打印机的打印方法、打印机、打印系统及存储介质。
背景技术
热敏打印机常常用于各类商超、便利店、医院等场所,对打印效果和打印速度均有一定的要求,为了提供更好的使用体验,目前运用打印机驱动程序将热敏打印机的打印速度调整到预想的理论值。但在开发和实际应用过程中发现,使用现有的打印机驱动程序在打印时,会出现卡纸现象,其根本原因是打印机速度变化幅度过大,导致打印机无法拉动纸张。
为了解决打印速度变化幅度过大,热敏打印机对纸张无法保持一定的拉力的问题,现有技术中,打印机厂商提供了一种加速表可以保证热敏打印机的打印速度从慢到快时不会发生变化幅度过大的问题,但仍无法解决打印速度从快到慢时变化幅度过大的问题。
技术问题
有鉴于此,本申请实施例提供了一种热敏打印机的打印方法、打印机、打印系统及存储介质,以解决现有技术中打印速度从快到慢时变化幅度过大的问题。
技术解决方案
本申请实施例的第一方面提供了一种热敏打印机的打印方法,包括:按照预设步数间隔在步进电机的加速表中获取N个步进时间,将N个步进时间从小到大排列形成步进电机的减速表Gd,其中,N为打印点行的数量;计算当前待打印点行m的理论步进时间T m,其中,m=1,2,……,N;根据所述减速表Gd中是否存在小于所述理论步进时间T m的一个或多个所述步进时间,确定所述当前待打印点行m的步进时间。
在其中一种实施例中,所述根据所述减速表Gd中是否存在小于所述理论步进时间T m的一个或多个所述步进时间,确定所述当前待打印点行m的步进时间,包括:当所述减速表Gd中不存在小于所述理论步进时间T m的一个或多个所述步进时间时,确定所述当前待打印点行m的步进时间为所述理论步进时间T m;当所述减速表Gd中存在小于所述理论步进时间T m的一个或多个所述步进时间时,获取一个或多个所述步进时间中的最大步进时间Gd i,其中,i为所述减速表Gd中的第i个值,i=1,2,……,N;根据N-i是否大于或等于M,确定所述当前待打印点行m的步进时间,其中,M为待打印点行的数量,M=N,N-1,……,0。
在其中一种实施例中,所述根据N-i是否大于或等于M,确定所述当前待打印点行m的步进时间,包括:获取所述当前待打印点行m的加热时间Gh m;当N-i大于或等于M时,确定所述当前待打印点行m的步进时间为所述最大步进时间Gd i;当N-i小于M时,获取所述减速表Gd中大于等于所述最大步进时间Gd i的步进时间Gd n,判断每个所述步进时间Gd n是否大于或等于所述加热时间Gh m,其中,n=i,i+1,……,N;若每个所述步进时间Gd n大于或等于所述加热时间Gh m,则确定所述当前待打印点行m的步进时间为所述理论步进时间T m;否则,确定所述当前待打印点行m的步进时间为Gd i+k,其中,k=m-1。
在其中一种实施例中,所述计算当前待打印点行m的理论步进时间T m,包括:获取所述当前待打印点行m的加热时间Gh m;在所述加速表中获取所述当前待打印点行m的加速步进时间T;判断所述当前待打印点行m的加速步进时间T是否大于或等于所述当前待打印点行m的加热时间Gh m;若是,则确定当前待打印点行m的理论步进时间T m为所述加速步进时间T;若否,则确定当前待打印点行m的理论步进时间T m为所述加热时间Gh m
在其中一种实施例中,所述在所述加速表中获取所述当前待打印点行m的加速步进时间T,包括:在所述加速表中找到当前打印点行m-1的位置,根据所述当前打印点行m-1的位置找到所述当前待打印点行m的位置;根据所述当前待打印点行m的位置获取加速步进时间T。
本申请实施例的第二方面提供了一种打印机,包括:形成模块,用于按照预设步数间隔在步进电机的加速表中获取N个步进时间,将N个步进时间从小到大排列形成步进电机的减速表Gd,其中,N为打印点行的数量;计算模块,用于计算当前待打印点行m的理论步进时间T m,其中,m为当前待打印点行,m=1,2,……,N;确定模块,用于根据所述减速表Gd中是否存在小于所述理论步进时间T m的一个或多个所述步进时间,确定所述当前待打印点行m的步进时间。
在其中一种实施例中,所述确定模块具体用于当所述减速表Gd中不存在小于所述理论步进时间T m的一个或多个所述步进时间时,确定所述当前待打印点行m的步进时间为所述理论步进时间T m;当所述减速表Gd中存在小于所述理论步进时间T m的一个或多个所述步进时间时,获取一个或多个所述步进时间中的最大步进时间Gd i,其中,i为所述减速表Gd中的第i个值,i=1,2,……,N;根据N-i是否大于或等于M,确定所述当前待打印点行m的步进时间,其中,M为待打印点行的数量,M=N,N-1,……,0。
在其中一种实施例中,所述根据N-i是否大于或等于M,确定所述当前待打印点行的步进时间,包括:获取所述当前待打印点行m的加热时间Gh m;当N-i大于或等于M时,确定所述当前待打印点行m的步进时间为所述最大步进时间Gd i;当N-i小于M时,获取所述减速表中大于等于所述最大步进时间Gd i的步进时间Gd n,判断每个所述步进时间Gd n是否大于或等于所述加热时间Gh m,其中,n=i,i+1,……,N;若每个所述步进时间Gd n大于或等于所述加热时间Gh m,则确定所述当前待打印点行m的步进时间为所述理论步进时间T m;否则,确定所述当前待打印点行m的步进时间为Gd i+k,其中,k=m-1。
本申请实施例的第三方面提供了一种打印系统,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如第一方面任一项所述方法的步骤。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面任一项所述方法的步骤。
有益效果
本申请实施例与现有技术相比存在的有益效果是:本申请实施例提供一种热敏打印机的打印方法、打印机、打印系统及存储介质,针对已有的加速表设计对应的减速表,利用减速表可以调整由已有的加速表计算得到的当前待打印点行的步进时间,确保当前待打印点行的步进时间大于减速表中的步进时间,从而可以保证提前预知是否降低当前速度,降低多少,避免热敏打印机的打印速度降低时不会出现从快到慢变化幅度过大的问题,保证热敏打印机对纸张始终保持一定的拉力,降低热敏打印机出现卡纸的几率。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的热敏打印机中半导体加热元件的示意图;
图2是本申请实施例提供的一种热敏打印机的打印方法的实现流程示意图;
图3是本申请实施例提供的一种热敏打印机的打印方法完整的实现流程示意图;
图4是本申请实施例提供的步进电机的加速表的示意图;
图5是本申请实施例提供的步进电机的减速表的示意图;
图6是本申请实施例提供的加热时间表的示意图;
图7是本申请实施例提供的打印机的结构示意图。
图8是本申请实施例提供的打印系统的结构示意图。
本发明的实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
热敏打印机的相关技术术语说明:
1、打印点行:
热敏打印机内设有半导体加热元件,如图1所示,具体为一排若干个等距排列的加热金属,示例性地,每个加热金属规格为0.125mm×0.125mm,加热金属之间的间距可以为0.125mm,所有加热金属构成半导体加热元件的长度为54mm。在打印过程中,通过加热对应的加热金属后,加热金属接触热敏打印纸,在热敏打印纸上产生化学反应后变黑即可打印出文字和图案。其中,加热金属每次在热敏打印纸上接触形成的点行在本申请实施例中称为打印点行。
2、步进电机:
热敏打印机内设有一个步进电机,步进电机要配合半导体加热元件工作,当半导体加热元件在热敏打印纸上接触变黑后,步进电机要拉动热敏打印纸向前运动,进而打印出文字和图案。可以理解的是,为了保证每一打印点行的顺利打印,步进电机的步进时间必须大于等于加热金属的加热时间。
在现有技术中,为了提高热敏打印机的打印速度,人们设计了打印机驱动程序来调整加热金属的加热时间和步进电机的步进时间,从而将打印速度调整到预想值,但是使用打印机驱动程序控制热敏打印机打印时,常常会出现卡纸的问题,经研究发现,这是由于打印速度变化幅度过快,步进电机无法及时拉动纸张向前运动。因此,针对这个问题,很多打印机生产厂商为打印机产品提供了步进电机的加速表,步进电机在打印速度由低速变为高速时,会按照加速表上的加速曲线进行加速,从而避免速度变化幅度过大,但是加速表仍无法解决步进电机的打印速度由高速变为低速时速度变化幅度过大的问题,热敏打印机在打印过程中仍然会出现卡纸问题,影响日常使用。
基于现有技术存在的问题,本申请实施例提供了一种热敏打印机的打印方法、打印机、打印系统及存储介质,针对已有的加速表,对应设计了一种步进电机的减速表,当打印速度从快速到慢速时,利用减速表调整由已有加速表计算得到的当前待打印点行的步进时间,确保当前待打印点行的步进时间大于减速表中的步进时间,从而可以保证提前预知是否要降低当前速度,降低多少,可以避免步进电机的打印速度降低时不会出现从快到慢变化幅度过大的问题,保证步进电机对纸张始终保持一定的拉力,降低热敏打印机出现卡纸的几率。
请参阅图2和图3,本申请实施例提供一种热敏打印机的打印方法,包括以下步骤:
步骤S21、按照预设步数间隔在步进电机的加速表中获取N个步进时间,将N个步进时间从小到大排列形成步进电机的减速表Gd,其中,N为打印点行的数量;
步进电机的加速表是打印机厂商为热敏打印机提供的,热敏打印机会按照加速表的规律工作,示例性地,如图4所示,本申请实施例提供了其中一种步进电机的加速表,步进时间单位为微秒,从加速表可知,在打印过程中步进电机的打印速度由慢到快时,会按照加速表的加速曲线进行加速,实现打印速度慢慢的增加,打印速度变化幅度不会出现过大的问题。因此,本申请实施例在已有的加速表的基础上,创造性地提出了一种减速表,利用减速表确定步进电机的步进时间,确保打印速度由快到慢的过程中,打印速度变化幅度同样不会出现过大的问题。
具体地,从加速表得到减速表的过程为:按照预设步数间隔在步进电机的加速表中获取N个步进时间,将N个步进时间从小到大进行排列形成减速表Gd。其中,N为打印点行的数量,也即是完成一次打印工作时需要打印的点行的总数,而且每一打印点行对应一个步进时间,完成一次打印工作需要N个步进时间,加速表的N个步进时间的变化顺序是从大到小,减速表的N个步进时间的变化顺序是从小到大。值得说明的是,本申请实施例设计的减速表,可以根据不同速度的打印机和实际应用需要,选择不同的预设步数间隔,制定不同的减速过程,满足多种减速需求。
为了更加清楚地说明减速表的得到过程,本申请实施例结合图4的加速表作示例性说明,比如,一次打印工作中需要7个打印点行,那么在加速表中可以按照5个步数间隔获取7个步进时间,也即是在加速表中的步进步数为1,5,10,15,20,25,30的位置获取7个对应的步进时间a1、a2、a3、a4、a5、a6、a7,将a1、a2、a3、a4、a5、a6、a7进行从小到大排列形成减速表Gd,减速表Gd中7个步进时间的排列顺序为a7、a6、a5、a4、a3、a2、a1,如图5所示。
步骤S22、计算当前待打印点行m的理论步进时间T m,其中,m=1,2,……,N;
在一些实施方式中,步骤S22具体包括:获取所述当前待打印点行m的加热时间Gh m
在所述加速表中获取所述当前待打印点行m的加速步进时间T;
判断所述当前待打印点行m的加速步进时间T是否大于或等于所述当前待打印点行m的加热时间Gh m
若是,则确定当前待打印点行m的理论步进时间T m为所述加速步进时间T;若否,则确定当前待打印点行m的理论步进时间T m为所述加热时间Gh m
在步骤S22中,当前待打印点行m的理论步进时间T m是指步进电机在当前打印完成的打印点行的步进时间后即将进入下一打印点行的步进时间,本申请实施例将下一打印点行称为当前待打印点行m,m=1,2,……,N;下一打印点行的步进时间称为理论步进时间T m,一次打印工作中包括N个理论步进时间T m
由于步进电机是基于加速表进行打印的,所以无论步进电机是做加速运动还是减速运动,基于加速表可以计算得到步进电机的步进时间,本申请实施例根据当前打印完成的打印点行的步进时间,在加速表中找到当前打印完成的打印点行的步进时间的位置,并在加速表中获取到下一个打印点行的步进时间,这个步进时间称为当前待打印点行m的加速步进时间T。
一次打印工作中包括N个加热时间Gh m,如图6所示为热敏打印机的加热时间表,加热时间Gh m是随机的,其中,当前待打印点行m的加热时间Gh m的计算采用的是现有打印机的加热算法,本申请实施例对此不作限制。
本申请实施例通过对比当前待打印点行m的加速步进时间T与加热时间Gh m来确定当前待打印点行m的理论步进时间T m,具体地,为了保证打印顺利完成,步进时间必须大于等于加热时间,因此,当比较得到加速步进时间T大于等于加热时间Gh m时,确定当前待打印点行m的理论步进时间T m为加速步进时间T;当比较得到加速步进时间T小于加热时间Gh m时,确定当前待打印点行m的理论步进时间T m为加热时间Gh m
步骤S23、根据所述减速表Gd中是否存在小于所述理论步进时间T m的一个或多个所述步进时间,确定所述当前待打印点行m的步进时间。
在一些实施方式中,步骤S23,包括以下步骤:
S231、当所述减速表Gd中不存在小于所述理论步进时间T m的一个或多个所述步进时间时,确定所述当前待打印点行m的步进时间为所述理论步进时间T m
S232、当所述减速表Gd中存在小于所述理论步进时间T m的一个或多个所述步进时间时,获取一个或多个所述步进时间中的最大步进时间Gd i,其中,i为所述减速表Gd中的第i个值,i=1,2,……,N;
S233、根据N-i是否大于或等于M,确定所述当前待打印点行m的步进时间,其中,M为待打印点行的数量,M=N,N-1,……,0。
在本申请实施例中,根据上述步骤S22计算得到当前待打印点行m的理论步进时间T m后,通过判断减速表Gd中是否存在小于理论步进时间T m的一个或多个步进时间,可以实现判断是否调整理论步进时间T m,并将理论步进时间T m调整为多少,该步骤的算法时间复杂度为O(N)。其中,一个或多个是指有一个或一个以上的步进时间,当减速表Gd中不存在小于理论步进时间T m的一个或多个步进时间时,则说明当前速度很慢,不需要再减速了,可以确定当前待打印点行m的步进时间为所述理论步进时间T m;当减速表Gd中存在小于理论步进时间T m的一个或多个步进时间时,则需要根据N-i是否大于等于M,继续判断是否调整理论步进时间T m。可以理解的是,本申请实施例中的M为一次打印工作中待打印点行的数量,M=N,N-1,……0,M值会逐渐减少,直至打印结束时,没有新的待打印点行,M变为0。
本申请实施例示例性地提供了一种减速表Gd中存在小于理论步进时间T m的步进时间的情况,如图5所示,左侧为步进电机的减速表Gd,右侧为当前待打印点行m的理论步进时间T m,那么减速表Gd中存在四个小于理论步进时间T m的步进时间a7、a6、a5、a4,且四个步进时间中的最大值为a4,记为最大步进时间Gd i,a4在减速表中为第4个值,i=4;继续根据N-i是否大于等于M,来确定当前待打印点行m的步进时间。
在一些实施方式中,步骤S233,包括以下步骤:
S2331、获取所述当前待打印点行m的加热时间Gh m
S2332、当N-i大于或等于M时,确定所述当前待打印点行m的步进时间为所述最大步进时间Gd i
S2333、当N-i小于M时,获取所述减速表Gd中大于等于所述最大步进时间Gd i的步进时间Gd n,判断每个所述步进时间Gd n是否大于或等于所述加热时间Gh m,其中,n=i,i+1,……,N;
S2334、若每个所述步进时间Gd n大于或等于所述加热时间Gh m,则确定所述当前待打印点行m的步进时间为所述理论步进时间T m
S2335、否则,确定所述当前待打印点行m的步进时间为Gd i+k,其中,k=m-1。
在步骤S233中,当减速表Gd存在小于理论步进时间T m的步进时间时,根据判断N-i是否大于等于M确定当前待打印点行m的步进时间,该步骤算法的时间复杂度为O(N),其中,当N-i大于或等于M时,说明打印即将结束,可以直接减速操作,并且确定当前待打印点行m的步进时间为最大步进时间Gd i
当N-i小于M时,将减速表Gd中第i~N个步进时间与当前待打印点行m的加热时间Gh m进行比较,将第i~N个步进时间记为Gd n,n=i,i+1,……,N;如果每个步进时间Gd n大于等于加热时间Gh m,则说明当前的打印速度恰当,不需要减速,确定当前待打印点行m的步进时间为理论步进时间T m;否则,确定当前待打印点行m的步进时间为Gd i+k,这里的k=m-1,m=1~(N-i)。进一步地,在实际的打印机驱动程序中,当判断每个步进时间Gd n大于等于加热时间Gh m时,可以设置减速标志为0,否则设置减速标志为1,打印机驱动程序通过判断减速标志即可对步进电机的步进时间作出调整。
结合上述例子,当N=7、以及i=4时,若此时N-i小于M,则将减速表Gd中第i~N个步进时间与当前待打印点行m的加热时间Gh m进行比较,也即是将a4、a3、a2、a1与Gh m进行比较,若a4、a3、a2、a1均大于Gh m,则说明不需要减速,确定步进时间为理论步进时间T m;否则,确定当前待打印点行m的步进时间为Gd i+k
可以理解的是,在上述步骤S231、步骤S2332、步骤S2334、步骤S2335确定当前待打印点行m的步进时间后,无论结论为是否需要调整,都循环进入下一次打印点行的步进时间的确定,重新执行本申请实施例的打印算法,重新计算和更新理论步进时间T m和加热时间Gh m
值得一提的是,本申请实施例的算法时间复杂度为O(2N),证明采用本申请实施例方法不仅可以避免打印机卡纸问题,而且方法计算简单、计算速度快。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
请参阅图7,本申请实施例的第二方面还提供了一种打印机,包括:
形成模块71,用于按照预设步数间隔在步进电机的加速表中获取N个步进时间,将N个步进时间从小到大排列形成步进电机的减速表Gd,其中,N为打印点行的数量;
计算模块72,用于计算当前待打印点行m的理论步进时间T m,其中,m为当前待打印点行,m=1,2,……,N;
确定模块73,用于根据所述减速表Gd中是否存在小于所述理论步进时间T m的一个或多个所述步进时间,确定所述当前待打印点行m的步进时间。
在一些实施方式中,所述计算模块72具体用于:
获取所述当前待打印点行m的加热时间Gh m
在所述加速表中获取所述当前待打印点行m的加速步进时间T;
判断所述当前待打印点行m的加速步进时间T是否大于或等于所述当前待打印点行m的加热时间Gh m
若是,则确定当前待打印点行m的理论步进时间T m为所述加速步进时间T;
若否,则确定当前待打印点行m的理论步进时间T m为所述加热时间Gh m
在一些实施方式中,所述确定模块73具体用于:
当所述减速表Gd中不存在小于所述理论步进时间T m的一个或多个所述步进时间时,确定所述当前待打印点行m的步进时间为所述理论步进时间T m
当所述减速表Gd中存在小于所述理论步进时间T m的一个或多个所述步进时间时,获取一个或多个所述步进时间中的最大步进时间Gd i,其中,i为所述减速表Gd中的第i个值,i=1,2,……,N;
根据N-i是否大于或等于M,确定所述当前待打印点行m的步进时间,其中,M为待打印点行的数量,M=N,N-1,……,0。
在一些实施方式中,所述根据N-i是否大于或等于M,确定所述当前待打印点行的步进时间,包括:
获取所述当前待打印点行m的加热时间Gh m
当N-i大于或等于M时,确定所述当前待打印点行m的步进时间为所述最大步进时间Gd i
当N-i小于M时,获取所述减速表中大于等于所述最大步进时间Gd i的步进时间Gd n,判断每个所述步进时间Gd n是否大于或等于所述加热时间Gh m,其中,n=i,i+1,……,N;
若每个所述步进时间Gd n大于或等于所述加热时间Gh m,则确定所述当前待打印点行m的步进时间为所述理论步进时间T m
否则,确定所述当前待打印点行m的步进时间为Gd i+k,其中,k=m-1。
本申请实施例一种热敏打印机是上述实施例一种热敏打印机的打印方法对应模块化的装置,其原理与实施过程与上述实施例相同,具体可参见方法的说明,在此不再具体展开说明。
请参阅图8,本申请实施例的第三方面提供了一种打印系统,包括:处理器80、存储器81以及存储在所述存储器81中并可在所述处理器80上运行的计算机程序82。所述处理器80执行所述计算机程序82时实现上述热敏打印机的打印方法实施例中的步骤。或者,所述处理器80执行所述计算机程序82时实现上述热敏打印机实施例中各模块/单元的功能。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述热敏打印机的打印方法的步骤。
示例性的,所述计算机程序82可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器81中,并由所述处理器80执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序82在所述热敏打印机中的执行过程。
所称处理器80可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现场可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
在本申请所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (10)

  1.  一种热敏打印机的打印方法,其特征在于,包括:
    按照预设步数间隔在步进电机的加速表中获取N个步进时间,将N个步进时间从小到大排列形成步进电机的减速表Gd,其中,N为打印点行的数量;
    计算当前待打印点行m的理论步进时间T m,其中,m=1,2,……,N;
    根据所述减速表Gd中是否存在小于所述理论步进时间T m的一个或多个所述步进时间,确定所述当前待打印点行m的步进时间。
  2.  根据权利要求1所述的一种热敏打印机的打印方法,其特征在于,所述根据所述减速表Gd中是否存在小于所述理论步进时间T m的一个或多个所述步进时间,确定所述当前待打印点行m的步进时间,包括:
    当所述减速表Gd中不存在小于所述理论步进时间T m的一个或多个所述步进时间时,确定所述当前待打印点行m的步进时间为所述理论步进时间T m
    当所述减速表Gd中存在小于所述理论步进时间T m的一个或多个所述步进时间时,获取一个或多个所述步进时间中的最大步进时间Gd i,其中,i为所述减速表Gd中的第i个值,i=1,2,……,N;
    根据N-i是否大于或等于M,确定所述当前待打印点行m的步进时间,其中,M为待打印点行的数量,M=N,N-1,……,0。
  3.  根据权利要求2所述的一种热敏打印机的打印方法,其特征在于,所述根据N-i是否大于或等于M,确定所述当前待打印点行的步进时间,包括:
    获取所述当前待打印点行m的加热时间Gh m
    当N-i大于或等于M时,确定所述当前待打印点行m的步进时间为所述最大步进时间Gd i
    当N-i小于M时,获取所述减速表Gd中大于等于所述最大步进时间Gd i的步进时间Gd n,判断每个所述步进时间Gd n是否大于或等于所述加热时间Gh m,其中,n=i,i+1,……,N;
    若每个所述步进时间Gd n大于或等于所述加热时间Gh m,则确定所述当前待打印点行m的步进时间为所述理论步进时间T m
    否则,确定所述当前待打印点行m的步进时间为Gd i+k,其中,k=m-1。
  4.  根据权利要求1所述的一种热敏打印机的打印方法,其特征在于,所述计算当前待打印点行m的理论步进时间T m,包括:
    获取所述当前待打印点行m的加热时间Gh m
    在所述加速表中获取所述当前待打印点行m的加速步进时间T;
    判断所述当前待打印点行m的加速步进时间T是否大于或等于所述当前待打印点行m的加热时间Gh m
    若是,则确定当前待打印点行m的理论步进时间T m为所述加速步进时间T;
    若否,则确定当前待打印点行m的理论步进时间T m为所述加热时间Gh m
  5.  根据权利要求4所述的一种热敏打印机的打印方法,其特征在于,所述在所述加速表中获取所述当前待打印点行m的加速步进时间T,包括:
    在所述加速表中找到当前打印点行m-1的位置,根据所述当前打印点行m-1的位置找到所述当前待打印点行m的位置;
    根据所述当前待打印点行m的位置获取加速步进时间T。
  6.  一种打印机,其特征在于,包括:
    形成模块,用于按照预设步数间隔在步进电机的加速表中获取N个步进时间,将N个步进时间从小到大排列形成步进电机的减速表Gd,其中,N为打印点行的数量;
    计算模块,用于计算当前待打印点行m的理论步进时间T m,其中,m为当前待打印点行,m=1,2,……,N;
    确定模块,用于根据所述减速表Gd中是否存在小于所述理论步进时间T m的一个或多个所述步进时间,确定所述当前待打印点行m的步进时间。
  7.  根据权利要求6所述的一种打印机,其特征在于,所述确定模块具体用于:
    当所述减速表Gd中不存在小于所述理论步进时间T m的一个或多个所述步进时间时,确定所述当前待打印点行m的步进时间为所述理论步进时间T m
    当所述减速表Gd中存在小于所述理论步进时间T m的一个或多个所述步进时间时,获取一个或多个所述步进时间中的最大步进时间Gd i,其中,i为所述减速表Gd中的第i个值,i=1,2,……,N;
    根据N-i是否大于或等于M,确定所述当前待打印点行m的步进时间,其中,M为待打印点行的数量,M=N,N-1,……,0。
  8.  根据权利要求7所述的一种打印机,其特征在于,所述根据N-i是否大于或等于M,确定所述当前待打印点行的步进时间,包括:
    获取所述当前待打印点行m的加热时间Gh m
    当N-i大于或等于M时,确定所述当前待打印点行m的步进时间为所述最大步进时间Gd i
    当N-i小于M时,获取所述减速表中大于等于所述最大步进时间Gd i的步进时间Gd n,判断每个所述步进时间Gd n是否大于或等于所述加热时间Gh m,其中,n=i,i+1,……,N;
    若每个所述步进时间Gd n大于或等于所述加热时间Gh m,则确定所述当前待打印点行m的步进时间为所述理论步进时间T m
    否则,确定所述当前待打印点行m的步进时间为Gd i+k,其中,k=m-1。
  9.  一种打印系统,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至5任一项所述方法的步骤。
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至5任一项所述方法的步骤。
PCT/CN2023/109662 2022-10-10 2023-07-27 热敏打印机的打印方法、打印机、打印系统及存储介质 WO2024078095A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211233834.8 2022-10-10
CN202211233834.8A CN115534544A (zh) 2022-10-10 2022-10-10 热敏打印机的打印方法、打印机、打印系统及存储介质

Publications (1)

Publication Number Publication Date
WO2024078095A1 true WO2024078095A1 (zh) 2024-04-18

Family

ID=84733661

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/109662 WO2024078095A1 (zh) 2022-10-10 2023-07-27 热敏打印机的打印方法、打印机、打印系统及存储介质

Country Status (2)

Country Link
CN (1) CN115534544A (zh)
WO (1) WO2024078095A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115534544A (zh) * 2022-10-10 2022-12-30 百富计算机技术(深圳)有限公司 热敏打印机的打印方法、打印机、打印系统及存储介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004195870A (ja) * 2002-12-19 2004-07-15 Casio Comput Co Ltd 印刷制御装置
JP2015150775A (ja) * 2014-02-14 2015-08-24 セイコーエプソン株式会社 印刷装置、制御方法、及び制御プログラム
CN106585115A (zh) * 2016-12-27 2017-04-26 艾体威尔电子技术(北京)有限公司 一种只使用一个硬件定时器实现热敏打印机驱动的方法
CN108773194A (zh) * 2018-05-04 2018-11-09 飞天诚信科技股份有限公司 一种打印机及提高打印速度的方法
CN211031752U (zh) * 2019-09-02 2020-07-17 上海蓝伯科电子科技有限公司 热敏打印设备
CN112406333A (zh) * 2020-11-20 2021-02-26 厦门喵宝科技有限公司 一种微型热敏打印机控制方法
CN115534544A (zh) * 2022-10-10 2022-12-30 百富计算机技术(深圳)有限公司 热敏打印机的打印方法、打印机、打印系统及存储介质

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004195870A (ja) * 2002-12-19 2004-07-15 Casio Comput Co Ltd 印刷制御装置
JP2015150775A (ja) * 2014-02-14 2015-08-24 セイコーエプソン株式会社 印刷装置、制御方法、及び制御プログラム
CN106585115A (zh) * 2016-12-27 2017-04-26 艾体威尔电子技术(北京)有限公司 一种只使用一个硬件定时器实现热敏打印机驱动的方法
CN108773194A (zh) * 2018-05-04 2018-11-09 飞天诚信科技股份有限公司 一种打印机及提高打印速度的方法
CN211031752U (zh) * 2019-09-02 2020-07-17 上海蓝伯科电子科技有限公司 热敏打印设备
CN112406333A (zh) * 2020-11-20 2021-02-26 厦门喵宝科技有限公司 一种微型热敏打印机控制方法
CN115534544A (zh) * 2022-10-10 2022-12-30 百富计算机技术(深圳)有限公司 热敏打印机的打印方法、打印机、打印系统及存储介质

Also Published As

Publication number Publication date
CN115534544A (zh) 2022-12-30

Similar Documents

Publication Publication Date Title
WO2024078095A1 (zh) 热敏打印机的打印方法、打印机、打印系统及存储介质
JPH086891A (ja) 適応ポーリング・システム及び周辺装置を効率的にサポートする方法
CN110442311B (zh) 一种自适应打印方法、装置及打印机
US20210103416A1 (en) Managing apparatus, non-transitory computer readable medium storing program, and image forming unit
JP2011126140A (ja) サーマルプリンタ及びプログラム
US11173733B2 (en) Printing device repeatedly performing print cycle including a plurality of conveying periods and a plurality of printing periods
CN115610115A (zh) 打印方法、装置、设备及可读存储介质
JP2002316454A5 (zh)
JP5579806B2 (ja) 印字装置およびプログラム
CN113320302B (zh) 打印机及其电机自适应驱动方法、装置以及可读存储介质
CN114261213B (zh) 热转印打印机及其打印控制方法、装置及可读存储介质
JP2003080747A (ja) ラインサーマルプリンタの記録方法およびそれに用いるラインサーマルプリンタ
JPH02258357A (ja) サーマルプロッタにおける作図ヘッドの制御方法
US10493771B2 (en) Dot impact printing head and printing apparatus
JP3275955B2 (ja) プリンタ共有ネットワーク
JPS61112649A (ja) 印字装置
US20200039237A1 (en) Thermal printer and computer-readable storage medium
JPH0361048A (ja) ドツトインパクト式プリンタ
JPH0422649A (ja) 印字装置の印字制御方法
JP2014136373A (ja) 印刷搬送装置
JPH07271247A (ja) 画像形成装置
JP2686339B2 (ja) 印刷制御装置
CN117360098A (zh) 一种带电池的打印机及其打印控制方法、装置、存储介质
JP4116255B2 (ja) データ通信制御システムおよびデータ通信制御方法
JPH04168070A (ja) シリアルプリンタ

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23876301

Country of ref document: EP

Kind code of ref document: A1