Printing control method and device based on segmented printing, printer and storage medium
By calculating the number of printing segments and the motor speed, and using a secondary accelerometer to adjust the motor speed, the problems of reduced printing speed and sticking caused by segmented printing were solved, resulting in higher printing quality and speed.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIAMEN HANIN CO LTD
- Filing Date
- 2024-01-10
- Publication Date
- 2026-05-08
AI Technical Summary
Segmented printing leads to reduced printing speed and problems with the print head sticking to the paper, especially on label paper where glue can be squeezed out and paper can stick.
By calculating the number of print segments and the motor speed, a secondary accelerometer is used to accelerate the motor with a small initial acceleration. The motor speed is adjusted to overcome adhesion forces, prevent the print head from sticking to the paper, and improve print quality.
It effectively overcomes the problem of printhead sticking to paper, ensuring normal paper feeding and improving print quality and speed.
Smart Images

Figure CN117901558B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of printer technology, and in particular to a printing control method, apparatus, printer, and storage medium based on segmented printing. Background Technology
[0002] Printers, as a common computer output device, are widely used in people's work, study, and daily life. Based on different printing principles, printers can be divided into laser printers, inkjet printers, thermal printers, etc. Among them, thermal printers are favored for their fast printing speed, convenient operation and maintenance, and affordable price.
[0003] Thermal printers use thermal printing technology, where the thermal printhead heats up and comes into direct contact with the thermal paper. A chemical reaction occurs at high temperatures, causing the paper to change color and thus achieving the printing effect. For some lower-cost thermal printers, because their adapters cannot provide high power, when the number of dots in a line exceeds a certain limit, it is necessary to print that line in segments. Segmented printing reduces printing speed and increases the time the printhead spends on each line. For example:
[0004] A 4-inch printer with 203 DPI has 864 dots. This means that printing a full line requires heating all 864 dots simultaneously, each requiring 40mA. This results in very high current consumption and costs, necessitating segmented printing to reduce current and lower costs. However, segmentation reduces printing speed and causes paper sticking. In other words, if printing one line without segmentation takes X seconds, segmenting it into 2X, 3X, 4X, and so on. Dividing the 864 dots into equal parts for heating causes the first segment to stick to the TPH (Print Head Holder) after heating, especially since the label paper, after making full contact with the TPH, squeezes out the adhesive from the label paper and smooths the TPH surface. When the first segment cools down, the paper sticks to the TPH. Obviously, the more segments there are, the stronger the adhesion. This can cause the print head to stick to the paper when printing the next line (when the next line needs to be printed), preventing paper feed and resulting in print compression. Summary of the Invention
[0005] In view of this, the object of the present invention is to provide a printing control method, apparatus, printer and storage medium based on segmented printing, so as to improve the above-mentioned problems.
[0006] This invention provides a printing control method based on segmented printing, comprising:
[0007] Receive the data to be printed, and calculate the number of the first print segments required for the current print line based on the data to be printed and the printer's print parameters;
[0008] The current print line is printed according to the first print segment number, and after printing is completed, the second print segment number required for the next print line and its corresponding second motor speed are calculated.
[0009] The motor speed is adjusted based on the first and second print segments. Specifically, when the first print segment number is greater than 1, if the second print segment number is greater than or equal to the first print segment number, the motor speed is controlled to approach the second motor speed. When the first print segment number is greater than 1, if the second print segment number is less than the first print segment number, a secondary acceleration table corresponding to the first print segment number is read to accelerate the motor. The initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table. The primary acceleration table is the acceleration table used for acceleration after the printer starts.
[0010] The next print line is printed based on the adjusted motor speed and the second print segment number.
[0011] Preferably, it further includes:
[0012] After the printer is started, an acceleration table is read and the motor is accelerated according to the acceleration table; the acceleration table includes at least the initial acceleration.
[0013] Preferably, it further includes:
[0014] When the first printed segment number is less than or equal to 1:
[0015] If the number of the second printing segments is greater than 1, then the speed of the motor is controlled to tend towards the speed of the second motor;
[0016] If the number of the second printed segments is not greater than 1, then determine whether the current speed of the first motor has reached the set target speed;
[0017] If the target is reached, the motor speed will remain constant.
[0018] If the target is not reached, the motor will be accelerated using the most recently read accelerometer reading.
[0019] Preferably, when the number of print segments required for the print dot row is greater than 1, different numbers of print segments have the same quadratic acceleration table.
[0020] Preferably, when the number of print segments required for the print dot row is greater than 1, different numbers of print segments have different secondary acceleration tables, and the more print segments there are, the smaller the initial acceleration of the corresponding secondary acceleration table.
[0021] Preferably, the secondary acceleration table includes an initial acceleration and a secondary acceleration, and the secondary acceleration is greater than the initial acceleration; then, the secondary acceleration table corresponding to the first printed segment number is read to accelerate the motor, specifically as follows:
[0022] The motor is accelerated according to the initial acceleration;
[0023] Once the acceleration exceeds the set number of steps or the set time, the motor is accelerated according to the secondary acceleration.
[0024] Preferably, the printing parameters of the printer include the printer's maximum output power and the heating power of each heating point.
[0025] This invention also provides a printing control device based on segmented printing, comprising:
[0026] The first print segment calculation unit is used to receive the data to be printed and calculate the number of first print segments required for the current print line based on the data to be printed and the printer's printing parameters.
[0027] The second print segment calculation unit is used to print the current print line according to the first print segment number, and after printing is completed, calculate the second print segment number required for the next print line and its corresponding second motor speed.
[0028] A speed adjustment unit is used to adjust the motor speed according to the first number of printing segments and the second number of printing segments; wherein, when the first number of printing segments is greater than 1, if the second number of printing segments is greater than or equal to the first number of printing segments, the motor speed is controlled to tend towards the second motor speed; when the first number of printing segments is greater than 1, if the second number of printing segments is less than the first number of printing segments, a secondary acceleration table corresponding to the first number of printing segments is read to accelerate the motor; the initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table; the primary acceleration table is the acceleration table used for acceleration after the printer starts.
[0029] The printing unit is used to print the next print line according to the adjusted motor speed and the second print segment number.
[0030] This invention also provides a printer, which includes a heating head and a controller. The controller is electrically connected to the heating head. The controller includes a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the printing control method described above.
[0031] This invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the printing control method described above.
[0032] In summary, in this embodiment, after printing the current print line, if the second print line number is less than the first print line number when the first print line number is greater than 1, the secondary acceleration table corresponding to the first print line number is read to accelerate the motor. The initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table used after the printer starts, thus accelerating the motor with a smaller initial acceleration. This allows the motor speed to increase slowly to provide greater output torque, thereby overcoming the adhesion resistance between the print head and the printing medium. This avoids problems such as paper feeding failure or print compression caused by the print head sticking to the printing medium after segmented printing, thus improving print quality. Attached Figure Description
[0033] To more clearly illustrate the technical solution of the present invention, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a flowchart illustrating the printing control method based on segmented printing provided in the first embodiment of the present invention.
[0035] Figure 2 This is a schematic diagram of the printer speed change during the printing process provided in an embodiment of the present invention.
[0036] Figure 3 This is a schematic diagram of the printing control device based on segmented printing provided in the second embodiment of the present invention. Detailed Implementation
[0037] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0038] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0039] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0040] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0041] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0042] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."
[0043] The terms "first" and "second" used in the embodiments are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" can be interchanged in a specific order or sequence where permissible. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein.
[0044] Please see Figure 1 The first embodiment of the present invention provides a printing control method based on segmented printing, which includes:
[0045] S101, Receive the data to be printed, and calculate the number of first print segments required for the current print line based on the data to be printed and the printer's print parameters.
[0046] In this embodiment, the printer is specifically a thermal printer, and the printer's printing parameters include the printer's maximum output power and the power required for each heating point. Thus, the maximum number of heating points N1 for each printing cycle can be determined based on the printing parameters.
[0047] In this embodiment, the data to be printed includes the number of dots N2 that need to be heated for each print row. Thus, based on the number of dots that need to be heated and the maximum number of heated dots N1, the number of first print segments M required for the current print row can be determined.
[0048] Specifically, the first number of printed segments M = Floor(N2 / N1), where Floor() represents the floor function.
[0049] In this embodiment, when the number of print segments is greater than 1, the printer has different paper feed speeds for different numbers of print segments, which correspond to different motor speeds. In other words, each print segment has a corresponding motor speed. Generally speaking, the larger the number of print segments, the slower the paper feed speed and the slower the corresponding motor speed. When the number of print segments is equal to 0 (corresponding to blank lines) or 1 (corresponding to printed content but not segmented), the corresponding printer paper feed speed is the highest speed, which means the corresponding motor speed is the highest speed.
[0050] S102, print the current print line according to the first print segment number, and after printing is completed, calculate the second print segment number required for the next print line and the corresponding second motor speed.
[0051] In this embodiment, the actual rotational speed during printing at the current print line is assumed to be the first motor speed. This first motor speed may correspond to the first print segment number or not, depending on the actual motor speed of the previous print line, the applied acceleration, and the acceleration distance. Generally, upon entering the current print line, the motor speed should be adjusted to match the first print segment number. However, in special cases, such as a short acceleration distance or the use of a smaller acceleration, the two speeds may differ. In this embodiment, the first motor speed can be obtained through a motor control timing diagram in the software or measured by a motor speed sensor.
[0052] In this embodiment, based on the same calculation method as the number of first print segments, the number of second print segments required for the next print line can be calculated, and the corresponding second motor speed can be matched according to the number of second print segments.
[0053] S103, the speed of the motor is adjusted according to the first number of printing segments and the second number of printing segments.
[0054] Specifically, when the first number of print segments is greater than 1, if the second number of print segments is greater than or equal to the first number of print segments, the speed of the motor is controlled to tend towards the speed of the second motor; when the first number of print segments is greater than 1, if the second number of print segments is less than the first number of print segments, the secondary acceleration table corresponding to the first number of print segments is read to accelerate the motor; the initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table; the primary acceleration table is the acceleration table used for acceleration after the printer starts.
[0055] In this embodiment, if the first number of printing segments is greater than 1, it means that the printing of the current printing point line is done in segments. If the second number of printing segments is greater than or equal to the first number of printing segments, it means that the next printing point line also needs to be printed in segments. At this time, it is necessary to control the speed of the motor to tend to the speed of the second motor.
[0056] In general, if the speed of the first motor is equal to the speed of the motor corresponding to the first number of printing segments, then when the number of the second number of printing segments is greater than the number of the first number of printing segments, the speed of the second motor is less than the speed of the first motor. In this case, it is necessary to reduce the speed of the motor to control the speed of the motor to tend towards the speed of the second motor. When the number of the second number of printing segments is equal to the number of the first number of printing segments, the speed of the second motor is equal to the speed of the first motor. In this case, it is necessary to control the speed of the motor to remain unchanged.
[0057] However, in some special cases, the speed of the first motor may not be equal to the speed of the motor corresponding to the first number of printing segments. In this case, when the number of printing segments is greater than the number of printing segments, it may be necessary to accelerate or maintain a constant speed to approach the speed of the second motor. When the number of printing segments is equal to the number of printing segments, it may also be necessary to accelerate to approach the speed of the second motor.
[0058] For example, such as Figure 2 As shown, the number of print segments in the current print line is 2 ( Figure 2 At point M=2, assuming the motor speed corresponding to 2 printed segments is V2, the previous printed segment number is 5. Figure 2 At point M=5, assuming the motor speed corresponding to 5 printed segments is V5, the number of printed segments for the next printed line is 3. Figure 2At point M=3, let the motor speed corresponding to 3 printing segments be V3 (i.e., the second motor speed is V3). Then, to reach the current printing segment from the previous line, it needs to accelerate from V5 to V2. However, since there's only one line of acceleration, using a smaller acceleration (such as the acceleration in the secondary acceleration table described later) might prevent acceleration from V5 to V2. For example, it might only accelerate to V3 or V4 (V4 being the motor speed corresponding to 4 printing segments). When accelerating to V3, the motor speed is exactly the second motor speed, so maintaining the speed is sufficient. When accelerating to V4, since V4 is less than V3, acceleration is needed to approach the second motor speed. Figure 2 (Acceleration is required to transition from M2 to M3).
[0059] For example, if the number of print segments in the current print line and the next print line are both 2 (assuming the motor speed corresponding to 2 print segments is V2, i.e., the second motor speed is V2), and the number of print segments in the previous print line is 4 (assuming the motor speed corresponding to 4 print segments is V4), then when moving from the previous print line to the current print line, it needs to accelerate from V4 to V2. However, since there is only one print line for acceleration, if a smaller acceleration is used, it may also be impossible to accelerate from V4 to V2. For example, it may only be able to accelerate to V3 (V3 is the motor speed corresponding to 3 print segments). Therefore, it is necessary to continue accelerating to reach the second motor speed when moving to the next print line.
[0060] In summary, in this embodiment, it is necessary to control the speed of the motor to approach the speed of the second motor.
[0061] If the number of the second print segments is less than the number of the first print segments, then the secondary acceleration table corresponding to the number of the first print segments is read to accelerate the motor; the initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table; the primary acceleration table is the acceleration table used for acceleration after the printer starts.
[0062] In this embodiment, the acceleration table is the acceleration table used to accelerate the printer after it starts up.
[0063] Generally, once the printer is started, it needs to be accelerated as quickly as possible to get into the printing area.
[0064] In this embodiment, if the number of the second printing segments is less than the number of the first printing segments, a secondary acceleration table corresponding to the number of the first printing segments needs to be read to accelerate the motor. The initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table.
[0065] In this embodiment, since the current print line is printed in segments, the print head may stick to the printing medium. Therefore, after printing the current print line, the motor needs to be accelerated with a small initial acceleration to slowly increase the motor speed. Because the motor speed is slow, its corresponding output torque is high, which can overcome the adhesion between the print head and the printing medium and ensure normal paper feeding. Figure 2 As shown, during segmented printing, the acceleration of the secondary accelerometer corresponding to M=2 is less than that of the primary accelerometer, thus providing greater torque to overcome adhesion. It should be noted that in this embodiment, when the number of printed segments is 1 (corresponding to printed content but not segmented), the motor speed is the same as when printing blank lines, both corresponding to the target speed (i.e., maximum speed), to improve the overall printing speed. Of course, in other embodiments, it can also be set such that the motor speed corresponding to printing blank lines is the target speed (i.e., maximum speed), while the motor speed corresponding to printing segment number 1 can be slightly lower than the target speed; both are within the scope of this invention.
[0066] Similarly, it should be noted that the secondary acceleration table here can have only one acceleration or multiple accelerations, but it must satisfy that its first acceleration (i.e., the initial acceleration) is greater than the initial acceleration of the primary acceleration table.
[0067] S104, print the next print line according to the adjusted motor speed and the second print segment number.
[0068] In this embodiment, the printing medium is driven according to the adjusted motor speed, and the next print line is heated according to the second print segment number to achieve the printing of the next print line. When it is necessary to heat the next print line, a voltage is applied to the corresponding heating point on the print head to make the heating point emit heat, thereby achieving the effect of displaying print dots on the printing medium.
[0069] In summary, in this embodiment, after printing the current print line, if the second print line number is less than the first print line number when the first print line number is greater than 1, the secondary acceleration table corresponding to the first print line number is read to accelerate the motor. The initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table used after the printer starts, thus accelerating the motor with a smaller initial acceleration. This allows the motor speed to increase slowly to provide greater output torque, thereby overcoming the adhesion resistance between the print head and the printing medium. This avoids problems such as paper feeding failure or print compression caused by the print head sticking to the printing medium after segmented printing, thus improving print quality.
[0070] To facilitate understanding of the present invention, some preferred embodiments of the present invention will be further described below.
[0071] Based on the above embodiments, in a preferred embodiment of the present invention:
[0072] When the first printed segment number is less than or equal to 1:
[0073] If the number of the second printing segments is greater than 1, then the speed of the motor is controlled to tend towards the speed of the second motor;
[0074] If the number of the second printed segments is not greater than 1, then determine whether the current speed of the first motor has reached the set target speed;
[0075] If the target is reached, the motor speed will remain constant.
[0076] If the target is not reached, the motor will be accelerated using the most recently read accelerometer reading.
[0077] In this embodiment, assuming the first number of printed segments is less than or equal to 1:
[0078] If the number of the second printing segments is not greater than 1 and the current speed of the first motor has not reached the set target speed, then the printer needs to be accelerated using the most recently read speed table, so that the paper feed speed of the printer can reach the target speed faster, thereby improving the overall printing speed.
[0079] If the second printing segment number is greater than 1, when the speed of the first motor is equal to the speed of the motor corresponding to the first printing segment number, it is necessary to control the motor to decelerate to approach the speed of the second motor; when the speed of the first motor is not equal to the speed of the motor corresponding to the first printing segment number, it is necessary to control the motor to accelerate, decelerate, or keep the speed constant according to the relationship between the speed of the first motor and the speed of the second motor to approach the speed of the second motor.
[0080] It should be noted that during the acceleration process, if there are rows that need to be printed in segments, the speed needs to be reduced again. For the specific speed reduction logic, please refer to the above embodiment.
[0081] Based on the above embodiments, in a preferred embodiment of the present invention:
[0082] When the number of printing segments required for the print dot row is greater than 1, different numbers of printing segments have different secondary acceleration tables. The more printing segments there are, the smaller the initial acceleration of the corresponding secondary acceleration table. This allows different secondary acceleration tables to be matched according to different numbers of printing segments to accelerate the motor after the current print dot row is printed, so as to provide more suitable torque and better avoid the print head sticking to the printing medium after segmented printing, while improving the overall printing speed.
[0083] In this embodiment, since a greater number of print segments results in a longer time required to print one dot line, the adhesion between the print head and the printing medium may also be greater. Therefore, a greater number of print segments results in a smaller initial acceleration of the secondary accelerometer, which can provide greater torque to overcome the adhesion while maximizing the overall printing speed. Figure 2 As shown, the initial acceleration when M=3 is less than the initial acceleration when M=2.
[0084] Of course, it should be noted that, for easier operation, in other embodiments, the same secondary acceleration table can be set for different numbers of printing segments, and this solution is also within the protection scope of this invention.
[0085] Based on the above embodiments, in a preferred embodiment of the present invention:
[0086] The secondary acceleration table includes an initial acceleration and a secondary acceleration, where the secondary acceleration is greater than the initial acceleration; therefore, the motor is accelerated by reading the secondary acceleration table corresponding to the first printed segment number, specifically as follows:
[0087] The motor is accelerated according to the initial acceleration;
[0088] Once the acceleration exceeds the set number of steps or the set time, the motor is accelerated according to the secondary acceleration.
[0089] In the above embodiment, during segmented printing, the initial acceleration of the secondary accelerometer decreases to provide a large torque, which also leads to a slowdown in the overall printing speed. Therefore, in this embodiment, two acceleration values are set, namely the initial acceleration and the secondary acceleration.
[0090] After printing the current print line, the printer first accelerates the motor according to the initial acceleration. When the acceleration exceeds the set number of steps or the set time, since the paper has been removed from the sticky area, the printer can then accelerate the motor according to the secondary acceleration, thereby increasing the overall printing speed. Figure 3 As shown, when M=3, the motor first accelerates with initial acceleration, and after a certain number of steps, it switches to secondary acceleration for further acceleration.
[0091] For example, it can be set as the initial acceleration of a single acceleration table.
[0092] Please see Figure 3 The second embodiment of the present invention also provides a printing control device based on segmented printing, which includes:
[0093] The first print segment calculation unit 210 is used to receive the data to be printed and calculate the number of first print segments required for the current print line based on the data to be printed and the printer's printing parameters.
[0094] The second print segment calculation unit 220 is used to print the current print line according to the first print segment number, and after printing is completed, calculate the second print segment number required for the next print line and its corresponding second motor speed.
[0095] The speed adjustment unit 230 is used to adjust the speed of the motor according to the first number of printing segments and the second number of printing segments; wherein, when the first number of printing segments is greater than 1, if the second number of printing segments is greater than or equal to the first number of printing segments, the speed of the motor is controlled to tend towards the speed of the second motor; when the first number of printing segments is greater than 1, if the second number of printing segments is less than the first number of printing segments, the secondary acceleration table corresponding to the first number of printing segments is read to accelerate the motor; the initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table; the primary acceleration table is the acceleration table used for acceleration after the printer starts;
[0096] The printing unit 240 is used to print the next print line according to the adjusted motor speed and the second print segment number.
[0097] A third embodiment of the present invention also provides a printer, which includes a heating head and a controller. The controller is electrically connected to the heating head. The controller includes a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement the printing control method described above.
[0098] The fourth embodiment of the present invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, so as to implement the printing control method described above.
[0099] For example, the various devices and process steps described above can be implemented by a computer program, which can be divided into one or more units, which are stored in the memory and executed by the processor to complete the present invention.
[0100] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0101] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the present invention by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0102] If the unit integrated into the electronic device or printer is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0103] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0104] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A printing control method based on segmented printing, characterized in that, include: Receive the data to be printed, and calculate the number of the first print segments required for the current print line based on the data to be printed and the printer's print parameters; The current print line is printed according to the first print segment number, and after printing is completed, the second print segment number required for the next print line and its corresponding second motor speed are calculated. The motor speed is adjusted based on the first and second print segments. Specifically, when the first print segment number is greater than 1, if the second print segment number is greater than or equal to the first print segment number, the motor speed is controlled to approach the second motor speed. When the first print segment number is greater than 1, if the second print segment number is less than the first print segment number, a secondary acceleration table corresponding to the first print segment number is read to accelerate the motor. The initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table. The primary acceleration table is the acceleration table used for acceleration after the printer starts. The next print line is printed based on the adjusted motor speed and the second print segment number.
2. The printing control method according to claim 1, characterized in that, Also includes: After the printer is started, the acceleration table is read once, and the motor is accelerated according to the acceleration table. The acceleration table includes at least the initial acceleration.
3. The printing control method according to claim 1, characterized in that, Also includes: When the first printed segment number is less than or equal to 1: If the number of the second printing segments is greater than 1, then the speed of the motor is controlled to tend towards the speed of the second motor; If the number of the second printed segments is not greater than 1, then determine whether the current speed of the first motor has reached the set target speed; If the target is reached, the motor speed will remain constant. If the target is not reached, the motor will be accelerated using the most recently read accelerometer reading.
4. The printing control method according to claim 1, characterized in that, When the number of print segments required for the print dot row is greater than 1, different numbers of print segments have the same quadratic acceleration table.
5. The printing control method according to claim 1, characterized in that, When the number of print segments required for the print dot row is greater than 1, different numbers of print segments have different secondary acceleration tables, and the more print segments there are, the smaller the initial acceleration of the corresponding secondary acceleration table.
6. The printing control method according to claim 1, characterized in that, The secondary acceleration table includes an initial acceleration and a secondary acceleration, where the secondary acceleration is greater than the initial acceleration; therefore, the motor is accelerated by reading the secondary acceleration table corresponding to the first printed segment number, specifically as follows: The motor is accelerated according to the initial acceleration; Once the acceleration exceeds the set number of steps or the set time, the motor is accelerated according to the secondary acceleration.
7. The printing control method according to claim 1, characterized in that, The printer's printing parameters include the printer's maximum output power and the heating power of each heating point.
8. A printing control device based on segmented printing, characterized in that, include: The first print segment calculation unit is used to receive the data to be printed and calculate the number of first print segments required for the current print line based on the data to be printed and the printer's printing parameters. The second print segment calculation unit is used to print the current print line according to the first print segment number, and after printing is completed, calculate the second print segment number required for the next print line and its corresponding second motor speed. A speed adjustment unit is used to adjust the motor speed according to the first number of printing segments and the second number of printing segments; wherein, when the first number of printing segments is greater than 1, if the second number of printing segments is greater than or equal to the first number of printing segments, the motor speed is controlled to tend towards the second motor speed; when the first number of printing segments is greater than 1, if the second number of printing segments is less than the first number of printing segments, a secondary acceleration table corresponding to the first number of printing segments is read to accelerate the motor; the initial acceleration of the secondary acceleration table is less than the initial acceleration of the primary acceleration table; the primary acceleration table is the acceleration table used for acceleration after the printer starts. The printing unit is used to print the next print line according to the adjusted motor speed and the second print segment number.
9. A printer, characterized in that, The device includes a heating head and a controller, the controller being electrically connected to the heating head. The controller includes a memory and a processor, the memory storing a computer program that can be executed by the processor to implement the printing control method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The device contains a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located to implement the printing control method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Thermal print head automatic current drive circuit
CN108569036A
Segmented printing method and device for printer and thermal printer
CN109532239A