CN-117901558-B - Printing control method and device based on segmented printing, printer and storage medium
Abstract
The invention provides a printing control method, a device, a printer and a storage medium based on segmented printing, wherein the method comprises the steps of receiving data to be printed, and calculating the number of first printing segments required by the current printing point line according to the data to be printed and the printing parameters of the printer; the method comprises the steps of printing a current printing point row according to a first printing section number, calculating a second printing section number and a second motor rotating speed required by a next printing point row after printing is completed, adjusting the rotating speed of the motor according to the first printing section number and the second printing section number, and driving a printing medium according to the adjusted motor rotating speed to realize printing of the next printing point row. When the number of the first printing segments is larger than 1, if the number of the second printing segments is smaller than the number of the first printing segments, the motor is accelerated by smaller initial acceleration, so that the rotating speed of the motor is slowly increased to provide larger torque so as to overcome the adhesion resistance between the printing head and the printing medium, and the printing quality is improved.
Inventors
- Request for anonymity
Assignees
- 厦门汉印股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20240110
Claims (10)
- 1. A print control method based on segment printing, comprising: Receiving data to be printed, and calculating the first printing segment number required by the current printing point line according to the data to be printed and the printing parameters of a printer; Printing the current printing point row according to the first printing section number, and after printing is completed, calculating a second printing section number required by the next printing point row and a second motor rotating speed corresponding to the second printing section number; The method comprises the steps of adjusting the rotating speed of a motor according to the first printing segment number and the second printing segment number, wherein when the first printing segment number is larger than 1, if the second printing segment number is larger than or equal to the first printing segment number, the rotating speed of the motor is controlled to trend to the rotating speed of the second motor, when the first printing segment number is larger than 1, if the second printing segment number is smaller than the first printing segment number, a secondary accelerometer corresponding to the first printing segment number is read to accelerate the motor, and the initial acceleration of the secondary accelerometer is smaller than the initial acceleration of a primary accelerometer; and printing the next printing point row according to the adjusted motor rotating speed and the second printing segment number.
- 2. The print control method according to claim 1, characterized by further comprising: After the printer is started, a primary accelerometer is read, and the motor is accelerated according to the primary accelerometer, wherein the primary accelerometer at least comprises initial acceleration.
- 3. The print control method according to claim 1, characterized by further comprising: when the first printing segment number is less than or equal to 1: If the number of the second printing segments is larger than 1, controlling the rotating speed of the motor to trend to the rotating speed of the second motor; if the number of the second printing segments is not more than 1, judging whether the current first motor rotation speed reaches the set target rotation speed or not; if the motor speed reaches the preset value, maintaining the motor speed unchanged; If not, the motor is accelerated by adopting the last read accelerometer.
- 4. The print control method according to claim 1, wherein when the number of print segments required for the print dot line is greater than 1, different print segments have the same secondary accelerometer.
- 5. The print control method according to claim 1, wherein when the number of print segments required for the print dot line is greater than 1, different print segments have different secondary accelerometers, and the greater the number of print segments, the smaller the initial acceleration of its corresponding secondary accelerometer.
- 6. The print control method according to claim 1, wherein the secondary acceleration table includes an initial acceleration and a secondary acceleration, and the secondary acceleration is greater than the initial acceleration, and wherein the step of reading the secondary acceleration table corresponding to the first number of print segments to accelerate the motor comprises the steps of: accelerating the motor according to the initial acceleration; And accelerating the motor according to the secondary acceleration after the acceleration exceeds a set step number or a set time.
- 7. The print control method according to claim 1, wherein the print parameters of the printer include a maximum output power of the printer and a heating power of each heating point.
- 8. A print control apparatus based on segment printing, comprising: The first printing segment number calculation unit is used for receiving data to be printed and calculating the first printing segment number required by the current printing point line according to the data to be printed and the printing parameters of the printer; A second printing segment number calculating unit, configured to print the current printing point row according to the first printing segment number, and calculate a second printing segment number required by a next printing point row and a second motor rotation speed corresponding to the second printing segment number after printing is completed; The system comprises a motor, a rotating speed adjusting unit, a secondary accelerometer, a primary accelerometer and a secondary accelerometer, wherein the rotating speed adjusting unit is used for adjusting the rotating speed of the motor according to the first printing segment number and the second printing segment number, when the first printing segment number is larger than 1, if the second printing segment number is larger than or equal to the first printing segment number, the rotating speed of the motor is controlled to trend to the rotating speed of the second motor, when the first printing segment number is larger than 1, if the second printing segment number is smaller than the first printing segment number, the secondary accelerometer corresponding to the first printing segment number is read to accelerate the motor, and the initial acceleration of the secondary accelerometer is smaller than the initial acceleration of the primary accelerometer; And the printing unit is used for printing the next printing point row according to the adjusted motor rotating speed and the second printing segment number.
- 9. A printer comprising a heating head and a controller electrically connected to the heating head, the controller comprising a memory and a processor, the memory having stored therein a computer program executable by the processor to implement the print control method of any one of claims 1 to 7.
- 10. A computer-readable storage medium storing a computer program executable by a processor of a device in which the computer-readable storage medium is located to implement the print control method according to any one of claims 1 to 7.
Description
Printing control method and device based on segmented printing, printer and storage medium Technical Field The present invention relates to the field of printers, and in particular, to a print control method and apparatus based on segment printing, a printer, and a storage medium. Background Printers are widely used as a general computer output device in work, study, and life of people. Printers can be classified into laser printers, inkjet printers, thermal printers, etc. according to the principle of printing, among them, thermal printers are favored in terms of their high printing speed, convenient operation and maintenance, and affordable price. The thermal printer uses a thermal printing technology, and is characterized in that after the thermal printing head is heated, the thermal printing head is directly contacted with thermal printing paper, and chemical reaction is carried out at high temperature to change color so as to achieve the printing effect. For some thermal printers with low cost, because the adapter cannot provide high power, when the printing content of a line exceeds a certain point, the line of the point needs to be printed in a sectional printing mode, and the printing speed is reduced due to the sectional printing, so that the stay time of the line of the point is prolonged. Such as: The 4 inch printer 203 has 864 dots in total, that is, 864 dots are heated simultaneously when printing is performed in full line, 40mA is required for each dot heating, and thus the current is very high, and the cost is very high, so that the sectional printing is required to reduce the current implementation cost. The segmentation results in a reduced printing speed and a sticky paper. That is, if the time taken to print the line is X, if the line is not segmented, the line is changed to 2X by 2 segments, 3X by 3 segments, and 4X by 4 segments, 864 dots are divided into equal parts and heated, so that when the second segment is heated, the first segment is heated to cause adhesion of the paper to the TPH, especially when the label paper is sufficiently contacted with the TPH, the adhesive in the label paper is extruded and the TPH is smooth, so that when the current segment is heated, the cooling causes adhesion of the paper to the TPH. It is obvious that the more the number of the segments is, the larger the adhesive force is, so that when the next dot line is printed (the next dot line needs to be printed), the printing head and the paper are adhered and cannot be fed, and the phenomenon of printing compression is generated. Disclosure of Invention In view of the above, it is an object of the present invention to provide a print control method, apparatus, printer and storage medium based on segment printing, which can improve the above-mentioned problems. The embodiment of the invention provides a printing control method based on segmented printing, which comprises the following steps: Receiving data to be printed, and calculating the first printing segment number required by the current printing point line according to the data to be printed and the printing parameters of a printer; Printing the current printing point row according to the first printing section number, and after printing is completed, calculating a second printing section number required by the next printing point row and a second motor rotating speed corresponding to the second printing section number; The method comprises the steps of adjusting the rotating speed of a motor according to the first printing segment number and the second printing segment number, wherein when the first printing segment number is larger than 1, if the second printing segment number is larger than or equal to the first printing segment number, the rotating speed of the motor is controlled to trend to the rotating speed of the second motor, when the first printing segment number is larger than 1, if the second printing segment number is smaller than the first printing segment number, a secondary accelerometer corresponding to the first printing segment number is read to accelerate the motor, and the initial acceleration of the secondary accelerometer is smaller than the initial acceleration of a primary accelerometer; and printing the next printing point row according to the adjusted motor rotating speed and the second printing segment number. Preferably, the method further comprises: After the printer is started, a primary accelerometer is read, and the motor is accelerated according to the primary accelerometer, wherein the primary accelerometer at least comprises initial acceleration. Preferably, the method further comprises: when the first printing segment number is less than or equal to 1: If the number of the second printing segments is larger than 1, controlling the rotating speed of the motor to trend to the rotating speed of the second motor; if the number of the second printing segments is not more than 1, judging whether the current first mot