Cutter printing method and device, electronic equipment and computer storage medium

By controlling the stepper motor to gradually slow down and stop and preheat the print head, the printing inconsistency and misalignment problems caused by inconsistent positions of the cutter and print head in online machine printing scenarios are solved, and a more accurate and coherent cutter printing effect is achieved.

CN119872100AActive Publication Date: 2025-04-25WUHAN JINGCHEN INTELLIGENT IDENTIFICATION TECH CO LTD

Patent Information

Application Number
CN202411954326.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-25
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

In the online number machine printing scene, the cutting knife and the print head are not in the same position, which causes the printing and running tube to be paused after each segment of the line tube is printed, and wait for the cutting knife action to be executed before printing is resumed, resulting in inconsistency in printing, and the stepper motor emergency stop may lead to overshoot, affecting the accuracy of printing when printing is turned on again.

Method used

By controlling the stepper motor to gradually slow down and stop, the stepper motor stops more smoothly and avoid overshoot problems caused by emergency stop. After the cutting action is completed, the printhead is preheated to shorten the temperature difference when printing is restored, and delay for a period of time before printing is restored to ensure the elastic deformation of the wire tube to be printed.

Benefits of technology

It ensures the accuracy and aesthetics of the cutting tool movement, while avoiding misalignment of the printing content, ensuring the accuracy, consistency and completeness of the printing tube.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119872100A_ABST
    Figure CN119872100A_ABST
Patent Text Reader

Abstract

The invention discloses a cutter printing method and device, electronic equipment and a computer storage medium. The method comprises the steps that after a to-be-printed line pipe is printed by a target section length, a stepping motor of the printing equipment is controlled to gradually decelerate to stop rotating according to a preset deceleration mode, and when the stepping motor stops rotating, a printing head of the printing equipment stops printing; the tail end, corresponding to the target section length, of the to-be-printed line pipe is aligned with the position of a cutter of the printing equipment; a cutter of the printing equipment is controlled to execute a cutter action on the tail end, corresponding to the target section length, of the to-be-printed line pipe; after the action of the cutter is executed, the stepping motor is controlled to recover rotation, and the printing head is controlled to recover printing, that is, when the action of the cutter is prepared to be executed, the stepping motor is controlled to gradually decelerate and stop, so that the stepping motor is stopped more stably; and the problem that dislocation occurs when printing is started again due to overshoot after the motor is stopped is solved, and the accuracy, continuity and integrity of cutter printing are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of printing technology, and in particular to a cutter printing method, device, electronic equipment and computer storage medium. Background Art

[0002] In the online number machine printing scenario, the cutter action needs to be performed on each section of the wire tube after it is printed. Since the cutter and the print head are not in the same position, after the current section of the wire tube is printed, it is necessary to continue to print and move the tube forward for a distance (the distance is the distance from the print head to the cutter) to the cutter position before the cutter action can be performed. At this time, the cutter is aimed at the tail of the printed wire tube and is ready to perform the cutter action, while the print head is aimed at the currently printed wire tube and is performing the printing action; when the cutter action is performed, the printing and moving tube action must be stopped, and printing can only be continued after the cutter action is completed, so that the wire tube that could have been smoothly printed at one time must go through the action of pausing printing and then resuming printing, and the stepper motor that controls the printing and moving tube must also go through the action of stopping and then starting. Summary of the invention

[0003] The embodiments of the present application provide a cutter printing method, device, electronic device and computer storage medium. When printing is paused to prepare for the cutter action, the stepper motor is controlled to gradually slow down and stop, so that the stepper motor stops more smoothly and avoids the problem of misalignment when printing is started again due to overshoot caused by the emergency stop of the stepper motor. While ensuring the accuracy and aesthetics of the cutter action, the accuracy, continuity and integrity of the printing line tube are also ensured.

[0004] In a first aspect, an embodiment of the present application provides a cutter printing method, the method comprising:

[0005] After the target length of the wire tube to be printed is completed, the stepper motor of the printing device is controlled to gradually decelerate until it stops rotating according to a preset deceleration method; when the stepper motor stops rotating, the print head of the printing device suspends printing, and the end of the target length of the wire tube to be printed is aligned with the cutter position of the printing device;

[0006] Controlling the cutter of the printing device to perform a cutting action on the end of the target segment length of the wire tube to be printed;

[0007] After the above-mentioned cutting action is completed, the above-mentioned stepping motor is controlled to resume rotation, and the above-mentioned printing head is controlled to resume printing.

[0008] In a possible implementation, the stepping motor of the printing device is controlled to gradually decelerate until it stops rotating according to a preset deceleration method, including:

[0009] The sending frequency of the corresponding driving signal of the printing device is controlled to gradually decrease to 0 according to a preset deceleration method, so as to control the stepping motor of the printing device to gradually decelerate to stop rotating according to the preset deceleration method.

[0010] In a possible implementation, after the to-be-printed wire tube has printed the target length, controlling the stepper motor of the printing device to gradually decelerate according to a preset deceleration method until it stops rotating includes:

[0011] After the target length of the wire tube to be printed is printed, when the distance between the end of the target length of the wire tube to be printed and the cutter position of the printing device reaches a preset distance, the stepper motor of the printing device is controlled to gradually decelerate and stop rotating according to a preset deceleration method according to the preset distance.

[0012] In a possible implementation, the preset deceleration mode includes at least one of the following: uniform deceleration, exponential deceleration, sinusoidal deceleration, parabolic deceleration, logarithmic deceleration, and multi-stage deceleration.

[0013] In a possible implementation, after the stepper motor of the printing device is controlled to gradually decelerate in a preset deceleration mode until it stops rotating, and before the stepper motor is controlled to resume rotating, the method further includes:

[0014] A holding torque is applied to the stepper motor to lock the bobbin position.

[0015] In a possible implementation, the method further includes:

[0016] During the control of the deceleration of the stepper motor, the heating compensation time of the print head is determined according to the target single-step cycle corresponding to the stepper motor; the target single-step cycle is used to represent the time required for the stepper motor to rotate one step during the deceleration period;

[0017] The initial heating duration of the print head corresponding to the initial printing cycle is adjusted according to the heating compensation duration to obtain a target printing cycle; the target printing cycle is equal to the target single-step cycle;

[0018] The print head is controlled to print according to the target printing cycle.

[0019] In one possible implementation, during the period of controlling the deceleration of the above-mentioned stepper motor, the above-mentioned target stepping cycle increases as the speed of the above-mentioned stepper motor decreases; the above-mentioned initial printing cycle includes an initial heating time and an initial cooling time, and the above-mentioned target printing cycle includes a target heating time and a target cooling time; during the period of controlling the deceleration of the above-mentioned stepper motor, the difference between a first ratio between the above-mentioned target heating time and the above-mentioned target cooling time and a second ratio between the above-mentioned initial heating time and the above-mentioned initial cooling time is within a preset range.

[0020] In a possible implementation, controlling the stepping motor to resume rotation and controlling the print head to resume printing includes:

[0021] The stepper motor is controlled to resume rotation according to the initial stepping cycle, and the print head is controlled to resume printing according to the initial printing cycle; the initial stepping cycle is used to characterize the time required for the stepper motor to rotate one step when printing the target length of the wire tube to be printed; the initial stepping cycle is equal to the initial printing cycle.

[0022] In a possible implementation, after the stepper motor of the printing device is controlled to gradually decelerate in a preset deceleration mode until it stops rotating, and before the stepper motor is controlled to resume rotating, the method further includes:

[0023] After the print head pauses printing for a preset time, the print head is controlled to print at the deformed position of the wire tube to be printed with a target printing cycle; the deformed position is a position adjacent to the pause printing position of the wire tube to be printed when the print head pauses printing and located after the pause printing position.

[0024] In a possible implementation, after the cutting action is completed, controlling the stepping motor to resume rotation and controlling the print head to resume printing includes:

[0025] After the above-mentioned cutting action is completed, the above-mentioned printing head is preheated;

[0026] After the preheating of the print head is completed, the stepping motor is controlled to resume rotation, and the print head is controlled to resume printing.

[0027] In a possible implementation, preheating the print head includes:

[0028] In an initial printing cycle before the print head resumes printing, the print head is heated for an initial heating time; or,

[0029] Within N initial printing cycles before the print head resumes printing, the print head is continuously heated for a target preheating time in each of the initial printing cycles; the target preheating time is less than the initial heating time; and N is a positive integer greater than 1.

[0030] In a possible implementation, after the cutting action is completed, controlling the stepping motor to resume rotation and controlling the print head to resume printing includes:

[0031] After the above-mentioned cutting action is completed, the above-mentioned stepping motor is first controlled to rotate a preset number of steps in advance, and then the above-mentioned printing head is controlled to resume printing.

[0032] In a second aspect, an embodiment of the present application provides a cutter printing device, the cutter printing device comprising:

[0033] The first control module is used to control the stepper motor of the printing device to gradually decelerate and stop rotating according to a preset deceleration method after the target length of the wire tube to be printed is completed; when the stepper motor stops rotating, the print head of the printing device suspends printing, and the end of the wire tube to be printed corresponding to the target length is aligned with the cutter position of the printing device;

[0034] A second control module is used to control a cutter of the printing device to perform a cutting action on an end of the to-be-printed wire tube corresponding to a target segment length;

[0035] The third control module is used to control the stepping motor to resume rotation and the print head to resume printing after the cutting action is completed.

[0036] In a third aspect, an embodiment of the present application provides an electronic device, including: a processor and a memory;

[0037] The above-mentioned memory is used to store a computer program, and the above-mentioned computer program is suitable for being loaded by the above-mentioned processor and executing the steps of the method provided by the first aspect of the embodiment of the present application or any possible implementation method of the first aspect.

[0038] In a fourth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the steps of the method provided in the first aspect of the embodiment of the present application or any possible implementation method of the first aspect.

[0039] In an embodiment of the present application, after the target length of the wire tube to be printed is printed, the stepper motor of the printing device is controlled to gradually decelerate and stop according to a preset deceleration method. When the stepper motor stops rotating, the print head of the printing device suspends printing, and the end of the target length of the wire tube to be printed is aligned with the cutter position of the printing device; the cutter of the printing device is controlled to perform a cutting action on the end of the target length of the wire tube to be printed; after the cutting action is completed, the stepper motor is controlled to resume rotation, and the print head is controlled to resume printing. That is, when the printing is suspended and the cutting action is prepared, the stepper motor is controlled to gradually decelerate and stop, so that the stepper motor stops more smoothly, avoiding the problem of misalignment when the printing is started again due to overshoot caused by the sudden stop of the stepper motor, ensuring that the position of the wire tube when the printing is resumed after the cutter is consistent with the position when the cutter stopped before, and the printed content will not be misaligned, that is, while ensuring the accuracy and aesthetics of the cutter action, the accuracy, continuity and integrity of the cutter printing are also ensured. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0041] Figure 1 A schematic diagram of the structure of a printing device provided as an exemplary embodiment of the present application;

[0042] Figure 2 A schematic diagram of the positional relationship between a cutter and a print head provided for an exemplary embodiment of the present application;

[0043] Figure 3 A schematic flow chart of a cutter printing method provided for an exemplary embodiment of the present application;

[0044] Figure 4 A schematic diagram of a process for resuming printing after a cutter action is completed, provided as an exemplary embodiment of the present application;

[0045] Figure 5 A schematic diagram of a control flow of a print head during deceleration of a stepper motor provided by an exemplary embodiment of the present application;

[0046] Figure 6 A schematic flow chart of another cutter printing method provided as an exemplary embodiment of the present application;

[0047] Figure 7 A schematic structural diagram of a cutter printing device provided as an exemplary embodiment of the present application;

[0048] Figure 8 A schematic diagram of the structure of an electronic device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0049] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0050] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0051] Please refer to the following Figure 1 , which exemplarily shows a structural diagram of a printing device provided in an embodiment of the present application. Figure 1 As shown, the printing device 100 may include, but is not limited to: a controller 110, a stepper motor 120, a print head 130, and a cutter 140. Among them:

[0052] The above-mentioned printing device 100 can be a line numbering machine, which can be used for, but not limited to, printing characters on materials such as PVC sleeves, heat shrink tubes, and self-adhesive labels, such as, but not limited to, stand-alone line numbering machines, online line numbering machines, and Bluetooth line numbering machines. Its working principle is mainly to use thermal printing technology to heat the thermal paper to produce a chemical reaction, thereby displaying text or images. The line numbering machine uses thermal paper as the printing medium, and the thermal coating on it is sensitive to heat and will change color when subjected to heat. When the print head 130 of the line numbering machine is heated, the thermal paper changes color due to the heat, thereby forming the required text or image.

[0053] The controller 110 is the brain of the printing device 100 and is mainly responsible for receiving and processing printing instructions from a computer or other device (such as a terminal), converting them into control signals suitable for the printer, and controlling the print head 130, stepper motor 120, cutter 140 and other components to work together according to the control signals to complete the printing task.

[0054] Specifically, after the target length of the wire tube to be printed is printed, the controller 110 can control the stepper motor 120 of the printing device 100 to gradually decelerate until it stops rotating according to a preset deceleration method; when the stepper motor 120 stops rotating, the print head 130 of the printing device 100 suspends printing, and the end of the target length of the wire tube to be printed is aligned with the cutter position of the printing device 100; the cutter 140 of the printing device 100 is controlled to perform a cutting action on the end of the target length of the wire tube to be printed; after the cutting action is completed, the stepper motor 120 is controlled to resume rotation, and the print head 130 is controlled to resume printing.

[0055] The stepper motor 120 is mainly responsible for driving the precise movement of the print head 130 and the mechanical transmission mechanism. It is usually composed of a stator, a rotor, a driver and other components, and has a simple structure and is easy to maintain. In the embodiment of the present application, the rotation of the stepper motor 120 can drive the glue roller to rotate after passing through the mechanical transmission mechanism, and then drive the wire tube to move.

[0056] The print head 130 is one of the core components of the printing device 100, and is responsible for transferring printing materials such as ink or toner to the wire tube to form text, images or charts. The structure and working principle of the print head 130 are different according to different printing technologies, and the embodiments of the present application do not limit this.

[0057] The cutter 140 is used to perform precise cutting actions according to the instructions of the controller 110, for example, after printing is completed, the printed material (such as a test tube to be printed) is cut into a required length.

[0058] It can be understood that the printing device 110 may also include, but is not limited to, one or more buttons, display screens, indicator lights, and the like.

[0059] It can be understood that the cutter printing method provided in the embodiment of the present application can be executed by the controller 110 of the above-mentioned printing device 100, or by the controller 110 of the above-mentioned printing device 100 and a terminal connected to the above-mentioned printing device 100 for communication, and the embodiment of the present application is not limited to this.

[0060] For example, in the line number machine printing scenario, after each section of the line tube is printed, a cutting action needs to be performed on the line tube. However, since the cutter and the print head are not in the same position, for example Figure 2 As shown in the figure, after the current section of the wire tube is printed (that is, the target section length L1 is printed for the wire tube to be printed), you need to follow Figure 2The print tube feeding direction shown continues to print and feed forward for a distance (the distance is the distance L2 between the print head 130 and the cutter 140) to the cutter position before the cutter action can be performed. At this time, the cutter 140 is aimed at the tail (end) of the printed wire tube and is ready to perform the cutter action, while the print head 130 is aimed at the currently printing wire tube to perform the printing action; when the cutter action is performed, the print tube feeding action must be stopped, and printing can only be continued after the cutter action is completed, so that the wire tube that could have been smoothly printed at one time must go through the action of pausing printing and then resuming printing, and the stepper motor that controls the print tube feeding must also go through the action of stopping and then starting.

[0061] In the related art, printing needs to be paused before executing the cutting action. Often, the stepper motor that controls the printing tube stops rotating directly during the rotation process. This will cause the stepper motor to be unable to stop rotating in time due to inertia and overshoot. When printing is resumed, the position of the wire tube has changed relative to the position when it stopped, causing the printed content to be misplaced.

[0062] Based on this, an embodiment of the present application provides a cutter printing method. When printing is paused and preparing to enter the cutter action, the stepper motor is controlled to gradually slow down and stop, so that the stepper motor stops more smoothly and avoids the problem of misalignment when printing is started again due to overshoot caused by the emergency stop of the stepper motor. While ensuring the accuracy and aesthetics of the cutter action, the accuracy, continuity and integrity of the cutter printing are also ensured.

[0063] Next, combine Figure 1-Figure 2 , introduces a cutter printing method provided by an exemplary embodiment of the present application. For details, please refer to Figure 3 , which exemplarily shows a flow chart of a cutter printing method provided in an embodiment of the present application. Figure 3 As shown, the cutter printing method includes the following steps:

[0064] S301, after the target length of the wire tube to be printed is printed, the stepper motor of the printing device is controlled to gradually decelerate until it stops rotating according to a preset deceleration method. When the stepper motor stops rotating, the print head of the printing device suspends printing, and the end of the target length of the wire tube to be printed is aligned with the cutter position of the printing device.

[0065] Specifically, after the target length of the wire tube to be printed is printed (i.e., the preset length to be printed), the speed of the stepper motor can be gradually reduced according to the preset deceleration method until it stops completely. This process is smooth and controlled, ensuring that the end of the wire tube to be printed after printing the target length will not be positionally deviated or damaged due to an emergency stop when approaching the cutter position. That is, as the stepper motor stops, the print head also synchronously suspends the printing action. At this time, the end of the wire tube to be printed corresponding to the printed target length is aligned with the cutter position of the printing device, ready for the next cutter action.

[0066] Optionally, the implementation process of controlling the stepper motor of the printing device to gradually decelerate and stop rotating according to a preset deceleration method in the above S301 may but is not limited to include: controlling the sending frequency of the corresponding drive signal of the printing device to gradually decrease to 0 according to a preset deceleration method, so as to control the stepper motor of the printing device to gradually decelerate and stop rotating according to a preset deceleration method.

[0067] Optionally, in the above S301, after the target length of the wire tube to be printed is printed, the implementation process of controlling the stepper motor of the printing device to gradually decelerate and stop rotating according to a preset deceleration method may include but is not limited to: after the target length of the wire tube to be printed is printed, when the distance between the end of the target length of the wire tube to be printed and the cutter position of the printing device reaches a preset distance (for example, but not limited to, the end of the wire tube with the printed target length is 5 mm away from the cutter position), the stepper motor of the printing device is controlled to gradually decelerate and stop rotating according to a preset deceleration method according to the preset distance, that is, the stepper motor needs to be controlled to drive the wire tube to be printed to move forward the preset distance from the beginning of deceleration to the stop moment, that is, during the deceleration period, to ensure that the end of the target length of the wire tube to be printed and the cutter position of the printing device are exactly aligned when the stepper motor stops rotating, so as to ensure the accuracy and effectiveness of the cutter. The above-mentioned preset distance is less than or equal to the distance between the cutter position and the corresponding printing position of the print head, thereby ensuring that the stepper motor is controlled to decelerate only after the target segment length of the wire tube to be printed is printed, avoiding the problem of controlling the stepper motor to decelerate in advance before the target segment length of the wire tube to be printed is printed, affecting normal printing efficiency.

[0068] Optionally, the preset deceleration mode may include but is not limited to at least one of the following: uniform deceleration, exponential deceleration, sinusoidal deceleration, parabolic deceleration, logarithmic deceleration, and multi-stage deceleration.

[0069] S302, controlling a cutter of the printing device to perform a cutting action on an end of the tube to be printed corresponding to a target segment length.

[0070] Specifically, after the end of the target segment length that has been printed corresponding to the wire tube to be printed is aligned with the cutter position, the printing device can be controlled to activate the cutter so that it is aligned with the end of the target segment length that has been printed corresponding to the wire tube to be printed and performs the cutting action to complete the wire tube cutting corresponding to the target segment length that has been printed.

[0071] S303, after the cutting action is completed, controlling the stepper motor to resume rotation, and controlling the print head to resume printing.

[0072] Specifically, after the cutting action is completed, the stepper motor can be controlled to start again to continue rotating at an appropriate speed. At the same time, the print head also resumes the printing action to continue printing the next target length of the wire tube to be printed.

[0073] In an embodiment of the present application, after the target length of the wire tube to be printed is printed, the stepper motor of the printing device is controlled to gradually decelerate and stop according to a preset deceleration method. When the stepper motor stops rotating, the print head of the printing device suspends printing, and the end of the target length of the wire tube to be printed is aligned with the cutter position of the printing device; the cutter of the printing device is controlled to perform a cutting action on the end of the target length of the wire tube to be printed; after the cutting action is completed, the stepper motor is controlled to resume rotation, and the print head is controlled to resume printing, that is, when the printing is suspended and the cutting action is prepared, the stepper motor is controlled to slowly decelerate and stop, so that the stepper motor stops more smoothly, avoiding the problem of misalignment when the printing is started again due to overshoot caused by the sudden stop of the stepper motor, ensuring that the position of the wire tube when the printing is resumed after the cutting is consistent with the position when the cutting stopped before, and the printed content will not be misaligned, that is, while ensuring the accuracy and aesthetics of the cutting action, the accuracy, continuity and integrity of the cutting printing are also ensured.

[0074] In the related art, after printing is paused, while waiting for the cutter action to be completed, the basic temperature of the print head will continue to drop because the print head is no longer heated. When printing is resumed, the print density is lighter due to the lower basic temperature of the print head, making the printed content not smoothly connected.

[0075] Based on this, the embodiment of the present application proposes a method for resuming printing after the cutting action is completed, specifically as follows: Figure 4 As shown, that is, the above S303, after the cutting action is completed, the implementation process of controlling the stepper motor to resume rotation and controlling the print head to resume printing may include but is not limited to:

[0076] S401, after the cutting action is completed, preheating the print head.

[0077] Specifically, when the cutting action is completed and the printing is ready to be resumed, the print head is preheated in advance to raise the base temperature of the print head to a temperature close to the temperature before the pause, that is, the temperature difference between the print head when resuming printing and before the pause is shortened, and then the printing is resumed. At this time, the printing density is almost the same as the printing density before the pause, so that the printed content is smoothly connected.

[0078] Optionally, the implementation process of preheating the print head in the above S401 may include but is not limited to: heating the print head for an initial heating time within an initial printing cycle before the print head resumes printing, the above initial printing cycle includes an initial heating time and an initial cooling time, and before printing is resumed after the cutter action is completed, a heating cycle (initial printing cycle) may be entered in advance, that is, heating is started once in advance to increase the basic temperature of the print head, thereby shortening the temperature difference between the print head when resuming printing and the temperature before pausing printing; or, within N initial printing cycles before the print head resumes printing, continuously heating the print head for a target preheating time in each initial printing cycle, the above target preheating time being less than the initial heating time, and the above target preheating time being less than the initial heating time. The N is a positive integer greater than 1, such as but not limited to 5 or 10, that is, after the cutter action is completed and before printing is resumed, the print head is continuously heated for a short period of time to slowly increase the temperature of the print head. For example, during normal printing, the initial heating time of a single initial printing cycle is 1000us. During preheating, each of the N initial printing cycles corresponds to a continuous heating time of 100us (10% of the normal initial heating time) to the print head, so that the basic temperature of the print head slowly increases, achieving the preheating effect while avoiding the problem that the print head is damaged due to the initial heating time in the normal initial printing cycle while the printed wire tube does not move.

[0079] S402, after the print head is preheated, control the stepper motor to resume rotation, and control the print head to resume printing.

[0080] Specifically, after the print head preheating is completed, the stepper motor can be controlled to continue rotating according to the normal initial stepping cycle before the cutter to drive the wire tube to be printed to continue moving forward, and the print head can be controlled to continue printing according to the normal initial printing cycle before the cutter to ensure that the print density of the print head after resuming printing is consistent with the print density before the cutter.

[0081] In the online numbering machine printing scenario, every time the stepper motor rotates one step, the wire tube moves forward by the length of one pixel, and then the heating is turned on to print a line of pixels; when resuming printing, the stepper motor that controls the print tube changes from a stopped state to a rotating state. The rotation of the stepper motor drives the glue stick to rotate after passing through the mechanical transmission mechanism, and then drives the wire tube to move. Due to a certain lag in the mechanical transmission mechanism, the glue stick cannot immediately follow the rotation when the stepper motor rotates. At this time, if the printing heating is turned on directly, the wire tube cannot move forward by the length of one pixel due to the lag in the rotation of the glue stick, which will cause compression of the printed content.

[0082] Based on this, after the cutting action is completed, the embodiment of the present application can first control the stepper motor to rotate a preset number of steps in advance, and then control the print head to resume printing. That is, when resuming printing, first control the stepper motor to rotate a preset number of steps in advance to eliminate the lag time of the mechanical transmission mechanism, and wait until the glue stick starts to drive the wire tube to move before turning on the heating, thereby eliminating the compression of the printed content when resuming printing after cutting.

[0083] In some possible embodiments, after the stepper motor controlling the printing tube stops, the stepper motor is not powered and cannot provide torque to lock the wire tube. During the cutting process, the wire tube may be slightly displaced due to external force, which may cause misalignment of the printed content. Based on this, the embodiment of the present application can apply a holding torque to the stepper motor after the stepper motor of the printing device is gradually decelerated to stop rotating according to a preset deceleration method, and before the stepper motor is controlled to resume rotation, so as to lock the position of the wire tube and prevent the wire tube to be printed from shifting due to external force during the cutting process, so that the printed content will not be misaligned, while ensuring the accuracy and stability of the cutter, and ensuring the accuracy and printing effect of resuming printing after cutting.

[0084] In some possible embodiments, during the printing and pipe feeding period, the wire tube to be printed will be subjected to force and will produce elastic deformation. After the printing is paused, the elastic deformation of the wire tube to be printed is released. When the printing is resumed, the position of the wire tube to be printed relative to the paused position will change due to the release of the elastic deformation, causing the printed content to be misplaced. Based on this, the embodiment of the present application can control the stepper motor of the printing device to gradually decelerate to stop rotating according to the preset deceleration method, first after the length of time the print head pauses printing reaches the preset length, control the print head to print at the deformation position of the wire tube to be printed with a target printing cycle, and then, after the cutter action is completed, control the stepper motor to resume rotation and control the print head to resume normal printing. The above-mentioned deformation position is a position adjacent to the pause printing position of the corresponding wire tube to be printed when the print head pauses printing and is located after the pause printing position. The above-mentioned preset time length is the time length required for the wire tube to be printed to release the deformation. The preset time length may be different for different material types of the wire tube to be printed. The above-mentioned preset time length may be, for example but not limited to, 10ms, 100ms, 50ms, etc.

[0085] In the embodiment of the present application, by delaying for a period of time (preset duration) after the stepper motor stops rotating and suspending printing, it is ensured that after the elastic deformation of the wire tube to be printed is completely released, heating is started again (target printing cycle, that is, the normal initial printing cycle before suspending printing), so that the content is printed at the position of the wire tube to be printed where the elastic deformation is released, so that the printed content is no longer misplaced when printing is resumed after suspension, that is, after the elastic deformation of the wire tube to be printed is completely released, the previously printed position (that is, the wire tube position when printing is suspended) will be pushed forward one step, and the embodiment of the present application will start printing again to print the position (that is, the deformation position) after the elastic deformation of the wire tube position when printing is suspended, which is equivalent to the original printing position (the wire tube position at that time) has moved forward, and after the elastic deformation of the wire tube when printing is suspended is released, the content is printed at the unprinted deformation position currently aligned with the print head, ensuring that when the subsequent stepper motor resumes rotation to drive the wire tube to be printed to move again, the print head can directly continue to print at the position after printing the deformation position, thereby avoiding the problem of missing printing of the deformation position.

[0086] In the online number machine printing scenario, the single-step cycle (the time for one step of rotation, i.e., the stepping cycle) of the stepper motor that controls the printing tube is equal to a single heating cycle (i.e., the printing cycle). When the printing is paused, the speed of the stepper motor becomes slower and slower during the deceleration period, and the single-step cycle of the stepper motor becomes longer and longer, and the corresponding single heating cycle also becomes longer and longer. A single heating cycle is equal to the heating time plus the cooling time. When the heating time remains unchanged, the longer heating cycle is equivalent to the longer cooling time. This will cause the print density of the print head to become lighter and lighter during the deceleration period of the stepper motor, making the printed content not smoothly connected.

[0087] Based on this, the embodiment of the present application proposes a method for controlling a print head during deceleration of a stepper motor, specifically as follows: Figure 5 As shown, the control process of the print head during the deceleration of the stepper motor may include but is not limited to:

[0088] S501, during the period of controlling the deceleration of the stepper motor, determining the heating compensation time length of the print head according to the target single-step cycle corresponding to the stepper motor.

[0089] Specifically, the above-mentioned target single-step cycle is used to characterize the time required for the stepper motor to rotate one step during deceleration. During the deceleration of the stepper motor, the speed of the stepper motor is different, and the corresponding target single-step cycle is different. During the control of the stepper motor deceleration, the target single-step cycle of the stepper motor during the deceleration process can be read or calculated, and then the heating compensation time of the print head can be determined based on this target single-step cycle. The heating compensation time refers to the time required to adjust the heating time of the print head when the stepper motor decelerates in order to maintain the printing quality.

[0090] S502, adjusting the initial heating duration in the initial printing cycle corresponding to the print head according to the heating compensation duration to obtain a target printing cycle.

[0091] Specifically, the above-mentioned target printing cycle is equal to the target single-step cycle. The above-mentioned initial printing cycle refers to the time required for the print head to complete a line of printing action under normal working conditions, and this time includes the heating time and the cooling time. During the deceleration of the stepper motor, its target single-step cycle gradually increases as the stepper motor gradually decelerates. At this time, the initial heating time in the initial printing cycle can be adjusted by increasing the heating compensation time, so that the adjusted target printing cycle is equal to the target single-step cycle of the stepper motor, thereby ensuring that during the deceleration of the stepper motor, the movement of the print head can be synchronized with the stepping of the stepper motor to avoid a decrease in printing quality.

[0092] Optionally, during the period of controlling the stepper motor to decelerate, the target stepping cycle increases as the speed of the stepper motor decreases; the above-mentioned initial printing cycle includes an initial heating time and an initial cooling time, and the above-mentioned target printing cycle includes a target heating time and a target cooling time; during the period of controlling the stepper motor to decelerate, the difference between a first ratio between the above-mentioned target heating time and the above-mentioned target cooling time and a second ratio between the above-mentioned initial heating time and the above-mentioned initial cooling time is always maintained within a preset range, thereby ensuring that the printing density of the print head will not change significantly before and after the stepper motor decelerates, thereby ensuring printing continuity and printing quality.

[0093] S503, controlling the print head to print according to the target printing cycle.

[0094] Specifically, during the deceleration of the stepper motor, after obtaining the adjusted target printing cycle corresponding to each target single-step cycle, in the process of controlling the stepper motor to drive the to-be-printed wire tube to move slowly according to the target single-step cycle, the print head will also be controlled to print according to the corresponding adjusted target printing cycle. Since the target printing cycle has been matched with the target single-step cycle of the stepper motor, it can be ensured that during the deceleration of the stepper motor, the movement of the print head can be synchronized with the stepping of the motor, which can not only improve the printing quality, but also avoid the problem of lagging or advancing the movement of the print head due to the deceleration of the stepper motor.

[0095] In some possible embodiments, the above 303, after the cutting action is completed, the implementation process of controlling the stepper motor to resume rotation and controlling the print head to resume printing may include but is not limited to: controlling the stepper motor to resume rotation according to the initial stepping cycle, and controlling the print head to resume printing according to the initial printing cycle, so as to ensure that the print density and print quality of the print head before and after the cutting remain unchanged. The above initial stepping cycle is used to represent the time required for the stepper motor to normally rotate one step when printing the target segment length of the to-be-printed wire tube, and the above initial stepping cycle is equal to the above initial printing cycle.

[0096] Please refer to the following Figure 6 , which exemplarily shows a flow chart of another cutter printing method provided in an embodiment of the present application. Figure 6 As shown, the cutter printing method includes the following steps:

[0097] S601, after the to-be-printed wire tube has finished printing the target length, the stepper motor of the printing device is controlled to gradually decelerate according to a preset deceleration method.

[0098] Specifically, after the wire tube to be printed has printed the target length (i.e. the preset length to be printed), the speed of the stepper motor can be controlled to slowly decrease according to the preset deceleration method to avoid the problem of misalignment when printing is started again due to overshoot caused by the emergency stop of the stepper motor. Ensure that the position of the wire tube when printing is resumed after the cutter is consistent with the position when the cutter stopped, and the printed content will not be misplaced. That is, while ensuring the accuracy and aesthetics of the cutter action, the accuracy, continuity and integrity of the cutter printing are also ensured.

[0099] S602: During the period of controlling the deceleration of the stepper motor, dynamically adjusting the initial heating time duration in the initial printing cycle corresponding to the print head according to the target single-step cycle corresponding to the stepper motor.

[0100] Specifically, the implementation process of the above S602 can refer to S501-S503, which will not be repeated here. By dynamically adjusting the initial heating time in the initial printing cycle according to the target single-step cycle corresponding to the deceleration period of the stepper motor, it is possible to ensure that during the deceleration of the stepper motor, the movement of the print head can be synchronized with the stepping of the stepper motor, and the printing density will not change, thereby avoiding a decrease in printing quality.

[0101] S603, the stepper motor stops rotating, the print head of the printing device suspends printing, and when the end of the target segment length of the to-be-printed wire tube is aligned with the cutter position of the printing device, a holding torque is applied to the stepper motor.

[0102] Specifically, the embodiment of the present application can lock the position of the wire tube to prevent the wire tube to be printed from shifting due to external force during the cutting process, so that the printed content will not be misplaced. While ensuring the accuracy and stability of the cutter, the accuracy and printing effect of resuming printing after cutting are guaranteed.

[0103] S604, after the printing pause time of the print head reaches a preset time, the print head is controlled to print at the deformation position of the wire tube to be printed in a target printing cycle.

[0104] Specifically, in an embodiment of the present application, by delaying for a period of time (preset duration) after the stepper motor stops rotating and printing is paused, it is ensured that the elastic deformation of the wire tube to be printed is completely released, and then heating is turned on again (target printing cycle, that is, the normal initial printing cycle before pausing printing), so that the content is printed at the position of the wire tube to be printed where the elastic deformation is released, so that the printed content will no longer be misplaced when printing is resumed after pause.

[0105] S605, controlling a cutter of the printing device to perform a cutting action on the end of the tube to be printed corresponding to the target segment length.

[0106] Specifically, the implementation process of the above S605 may refer to S302, which will not be repeated here.

[0107] S606, after the cutting action is completed, preheating the print head.

[0108] Specifically, the above S606 is consistent with the above S401 and will not be repeated here.

[0109] S607, after the print head is preheated, control the stepper motor to resume rotation, and control the print head to resume printing.

[0110] Specifically, the above S607 is consistent with the above S402 and will not be described in detail here. In the embodiment of the present application, when the printing is to be resumed after the cutting action is completed, the print head can be preheated in advance to raise the base temperature of the print head to a temperature close to the temperature before the pause, that is, the temperature difference between the print head when resuming printing and the temperature before pausing printing is shortened, and then the printing is resumed to achieve a printing density that is almost the same as the printing density before the pause, so that the printed content is smoothly connected.

[0111] Please refer to the following Figure 7 , which is a schematic diagram of the structure of a cutter printing device provided in an embodiment of the present application. Figure 7 As shown, the above-mentioned cutter printing device 700 includes:

[0112] The first control module 710 is used to control the stepper motor of the printing device to gradually decelerate and stop rotating according to a preset deceleration method after the target length of the wire tube to be printed is completed; when the stepper motor stops rotating, the print head of the printing device suspends printing, and the end of the wire tube to be printed corresponding to the target length is aligned with the cutter position of the printing device;

[0113] The second control module 720 is used to control the cutter of the printing device to perform a cutting action on the end of the to-be-printed wire tube corresponding to the target segment length;

[0114] The third control module 730 is used to control the stepping motor to resume rotation and the print head to resume printing after the cutting action is completed.

[0115] In a possible implementation, the first control module 710 is specifically configured to:

[0116] The sending frequency of the corresponding driving signal of the printing device is controlled to gradually decrease to 0 according to a preset deceleration method, so as to control the stepping motor of the printing device to gradually decelerate to stop rotating according to the preset deceleration method.

[0117] In a possible implementation, the first control module 710 is specifically configured to:

[0118] After the target length of the wire tube to be printed is printed, when the distance between the end of the target length of the wire tube to be printed and the cutter position of the printing device reaches a preset distance, the stepper motor of the printing device is controlled to gradually decelerate and stop rotating according to a preset deceleration method according to the preset distance.

[0119] In a possible implementation, the preset deceleration mode includes at least one of the following: uniform deceleration, exponential deceleration, sinusoidal deceleration, parabolic deceleration, logarithmic deceleration, and multi-stage deceleration.

[0120] In a possible implementation, the cutter printing device 700 further includes:

[0121] The fourth control module is used to apply a holding torque to the stepper motor to lock the position of the wire tube.

[0122] In a possible implementation, the cutter printing device 700 further includes:

[0123] A first determination module is used to determine the heating compensation time of the print head according to a target single-step cycle corresponding to the stepper motor during the control of the stepper motor deceleration; the target single-step cycle is used to represent the time required for the stepper motor to rotate one step during the deceleration period;

[0124] An adjustment module, used for adjusting the initial heating duration in the initial printing cycle of the print head according to the heating compensation duration to obtain a target printing cycle; the target printing cycle is equal to the target single-step cycle;

[0125] The fifth control module is used to control the print head to print according to the target printing cycle.

[0126] In one possible implementation, during the period of controlling the deceleration of the above-mentioned stepper motor, the above-mentioned target stepping cycle increases as the speed of the above-mentioned stepper motor decreases; the above-mentioned initial printing cycle includes an initial heating time and an initial cooling time, and the above-mentioned target printing cycle includes a target heating time and a target cooling time; during the period of controlling the deceleration of the above-mentioned stepper motor, the difference between a first ratio between the above-mentioned target heating time and the above-mentioned target cooling time and a second ratio between the above-mentioned initial heating time and the above-mentioned initial cooling time is within a preset range.

[0127] In a possible implementation, the third control module 730 is specifically configured to:

[0128] The stepper motor is controlled to resume rotation according to the initial stepping cycle, and the print head is controlled to resume printing according to the initial printing cycle; the initial stepping cycle is used to characterize the time required for the stepper motor to rotate one step when printing the target length of the wire tube to be printed; the initial stepping cycle is equal to the initial printing cycle.

[0129] In a possible implementation, the cutter printing device 700 further includes:

[0130] The sixth control module is used to control the print head to print at the deformation position of the wire tube to be printed in a target printing cycle after the length of time the print head pauses printing reaches a preset length of time; the deformation position is a position adjacent to the pause printing position of the wire tube to be printed when the print head pauses printing and located after the pause printing position.

[0131] In a possible implementation, the third control module 730 includes:

[0132] A preheating unit, used for preheating the print head after the cutting action is completed;

[0133] The control unit is used to control the stepping motor to resume rotation and the print head to resume printing after the preheating of the print head is completed.

[0134] In a possible implementation, the preheating unit is specifically used for:

[0135] During an initial printing cycle before the print head resumes printing, the print head is heated for an initial heating time; or, during N initial printing cycles before the print head resumes printing, the print head is continuously heated for a target preheating time in each of the initial printing cycles; the target preheating time is less than the initial heating time; and N is a positive integer greater than 1.

[0136] In a possible implementation, the third control module 730 is specifically configured to:

[0137] After the above-mentioned cutting action is completed, the above-mentioned stepping motor is first controlled to rotate a preset number of steps in advance, and then the above-mentioned printing head is controlled to resume printing.

[0138] The division of the modules in the above-mentioned cutter printing device is only for illustration. In other embodiments, the cutter printing device can be divided into different modules as needed to complete all or part of the functions of the above-mentioned cutter printing device. The implementation of each module in the cutter printing device provided in the embodiment of this specification can be in the form of a computer program. The computer program can be run on the printing device. The program module composed of the computer program can be stored in the memory of the printing device. When the computer program is executed by the processor, all or part of the steps of the cutter printing method described in the embodiment of this specification are implemented.

[0139] See next Figure 8 , Figure 8 FIG. 1 is a schematic diagram showing the structure of an electronic device provided by an embodiment of the present application. Figure 8 As shown, the electronic device 800 may include: at least one processor 810 , a network interface 820 , a user interface 830 , a memory 840 , a print head 850 , a stepper motor 860 , a cutter 870 , and at least one communication bus 880 .

[0140] The communication bus 880 is used to realize the connection and communication between these components.

[0141] The network interface 820 may include a Bluetooth module, a near field communication module, a Wi-Fi module, etc.

[0142] The user interface 830 may include a display screen and a camera; optionally, the user interface 830 may also include a standard wired interface and a wireless interface.

[0143] The processor 810 may include one or more processing cores. The processor 810 uses various interfaces and lines to connect various parts of the entire electronic device 800, and executes various functions of the electronic device 800 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 840, and calling data stored in the memory 840.

[0144] The stepper motor 860 is mainly responsible for driving the precise movement of the print head 850 and the mechanical transmission mechanism. It is usually composed of a stator, a rotor, a driver and other components, and has a simple structure and is easy to maintain. In the embodiment of the present application, the rotation of the stepper motor 860 can drive the glue roller to rotate after passing through the mechanical transmission mechanism, and then drive the wire tube to move.

[0145] The print head 850 is one of the core components of the printing device, which is responsible for transferring printing materials such as ink or toner to the wire tube to form text, images or charts. The structure and working principle of the print head 850 are different according to different printing technologies, and the embodiments of the present application do not limit this.

[0146] The cutter 870 is used to perform precise cutting actions, for example, after printing is completed, the printed material (such as a test tube to be printed) is cut into a desired length.

[0147] Optionally, the processor 810 may be implemented in at least one hardware form of digital signal processing, field programmable gate array, and programmable logic array. The processor 810 may integrate one or a combination of a central processing unit, an image processor, and a modem. It is understandable that the above-mentioned modem may not be integrated into the processor 810, but may be implemented separately through a chip.

[0148] The memory 840 may include a random access memory or a read-only memory. The memory 840 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as stepper motor control, print head control function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. Figure 8 As shown, the memory 840 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.

[0149] In some possible embodiments, the processor 810 may be used to call program instructions stored in the memory 840 and specifically perform the following operations: after the target length of the wire tube to be printed is printed, the stepper motor of the printing device is controlled to gradually decelerate until it stops rotating according to a preset deceleration method; when the stepper motor stops rotating, the print head of the printing device pauses printing, and the end of the target length of the wire tube to be printed is aligned with the cutter position of the printing device; the cutter of the printing device is controlled to perform a cutting action on the end of the target length of the wire tube to be printed; after the cutting action is completed, the stepper motor is controlled to resume rotation, and the print head is controlled to resume printing.

[0150] In some possible embodiments, when the processor 810 executes the above-mentioned control of the stepping motor of the printing device to gradually decelerate until it stops rotating according to a preset deceleration method, it is specifically used to execute:

[0151] The sending frequency of the corresponding driving signal of the printing device is controlled to gradually decrease to 0 according to a preset deceleration method, so as to control the stepping motor of the printing device to gradually decelerate to stop rotating according to the preset deceleration method.

[0152] In some possible embodiments, the processor 810 controls the stepper motor of the printing device to gradually decelerate to stop rotating according to a preset deceleration method after the to-be-printed wire tube has printed the target length, and is specifically used to execute:

[0153] After the target length of the wire tube to be printed is printed, when the distance between the end of the target length of the wire tube to be printed and the cutter position of the printing device reaches a preset distance, the stepper motor of the printing device is controlled to gradually decelerate and stop rotating according to a preset deceleration method according to the preset distance.

[0154] In some possible embodiments, the preset deceleration mode includes at least one of the following: uniform deceleration, exponential deceleration, sinusoidal deceleration, parabolic deceleration, logarithmic deceleration, and multi-stage deceleration.

[0155] In some possible embodiments, after the processor 810 executes the control of the stepper motor of the printing device to gradually decelerate until it stops rotating according to a preset deceleration method, and before the control of the stepper motor resumes rotation, it is also used to execute: applying a holding torque to the stepper motor to lock the position of the wire tube.

[0156] In some possible embodiments, the processor 810 is further configured to execute:

[0157] During the control of the above-mentioned stepper motor to decelerate, the heating compensation duration of the above-mentioned print head is determined according to the target single-step cycle corresponding to the above-mentioned stepper motor; the above-mentioned target single-step cycle is used to characterize the duration required for the above-mentioned stepper motor to rotate one step during the deceleration period; according to the above-mentioned heating compensation duration, the initial heating duration in the initial printing cycle corresponding to the above-mentioned print head is adjusted to obtain the target printing cycle; the above-mentioned target printing cycle is equal to the above-mentioned target single-step cycle; and the above-mentioned print head is controlled to print according to the above-mentioned target printing cycle.

[0158] In some possible embodiments, during the period of controlling the deceleration of the above-mentioned stepper motor, the above-mentioned target stepping cycle increases as the speed of the above-mentioned stepper motor decreases; the above-mentioned initial printing cycle includes an initial heating time and an initial cooling time, and the above-mentioned target printing cycle includes a target heating time and a target cooling time; during the period of controlling the deceleration of the above-mentioned stepper motor, the difference between the first ratio between the above-mentioned target heating time and the above-mentioned target cooling time and the second ratio between the above-mentioned initial heating time and the above-mentioned initial cooling time is within a preset range.

[0159] In some possible embodiments, when the processor 810 executes the above-mentioned control of the stepping motor to resume rotation and the control of the print head to resume printing, it is specifically used to execute:

[0160] The stepper motor is controlled to resume rotation according to the initial stepping cycle, and the print head is controlled to resume printing according to the initial printing cycle; the initial stepping cycle is used to characterize the time required for the stepper motor to rotate one step when printing the target length of the wire tube to be printed; the initial stepping cycle is equal to the initial printing cycle.

[0161] In some possible embodiments, after the processor 810 executes the control of the stepper motor of the printing device to gradually decelerate to stop rotating according to a preset deceleration method, and before the control of the stepper motor to resume rotating is further configured to execute:

[0162] After the print head pauses printing for a preset time, the print head is controlled to print at the deformed position of the wire tube to be printed with a target printing cycle; the deformed position is a position adjacent to the pause printing position of the wire tube to be printed when the print head pauses printing and located after the pause printing position.

[0163] In some possible embodiments, when the processor 810 controls the stepping motor to resume rotation and controls the print head to resume printing after the cutter action is completed, the processor 810 is specifically configured to execute:

[0164] After the above-mentioned cutting action is performed, the above-mentioned printing head is preheated; after the above-mentioned printing head preheating is completed, the above-mentioned stepping motor is controlled to resume rotation, and the above-mentioned printing head is controlled to resume printing.

[0165] In some possible embodiments, when the processor 810 performs the preheating of the print head, it is specifically configured to perform:

[0166] During an initial printing cycle before the print head resumes printing, the print head is heated for an initial heating time; or, during N initial printing cycles before the print head resumes printing, the print head is continuously heated for a target preheating time in each of the initial printing cycles; the target preheating time is less than the initial heating time; and N is a positive integer greater than 1.

[0167] In some possible embodiments, when the processor 810 controls the stepping motor to resume rotation and controls the print head to resume printing after the cutter action is completed, the processor 810 is specifically configured to execute:

[0168] After the above-mentioned cutting action is completed, the above-mentioned stepping motor is first controlled to rotate a preset number of steps in advance, and then the above-mentioned printing head is controlled to resume printing.

[0169] The embodiment of the present application also provides a computer-readable storage medium, which stores instructions, and when the instructions are executed on a computer or a processor, the computer or the processor executes one or more steps in the above embodiment. If the components of the above cutter printing device are implemented in the form of software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

[0170] In the above embodiments, all or part of the processes in the above embodiments can be implemented by software, hardware, firmware or any combination thereof. A person of ordinary skill in the art can understand that all or part of the processes in the above embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disk or optical disk. In the absence of conflict, the technical features in this embodiment and the implementation scheme can be combined arbitrarily.

[0171] The embodiments described above are merely preferred embodiments of the present application and are not intended to limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements made to the technical solutions of the present application by ordinary technicians in this field should fall within the protection scope determined by the claims of the present application.

Claims

1. A cutter printing method, characterized in that: The method comprises: After the target length of the wire tube to be printed is completed, the stepper motor of the printing device is controlled to gradually decelerate until it stops rotating according to a preset deceleration method; when the stepper motor stops rotating, the print head of the printing device suspends printing, and the end of the wire tube to be printed corresponding to the target length is aligned with the cutter position of the printing device; Controlling a cutter of the printing device to perform a cutting action on an end of the to-be-printed wire tube corresponding to a target segment length; After the cutting action is completed, the stepping motor is controlled to resume rotation, and the print head is controlled to resume printing.

2. The method according to claim 1, characterized in that The stepping motor of the printing device is controlled to gradually decelerate until it stops rotating according to a preset deceleration method, including: The sending frequency of the corresponding driving signal of the printing device is controlled to gradually decrease to 0 according to a preset deceleration method, so as to control the stepping motor of the printing device to gradually decelerate to stop rotating according to the preset deceleration method.

3. The method according to claim 1, characterized in that After the target length of the wire tube to be printed is completed, the stepper motor of the printing device is controlled to gradually decelerate according to a preset deceleration method until it stops rotating, including: After the target length of the wire tube to be printed is printed, when the distance between the end of the target length of the wire tube to be printed and the cutter position of the printing device reaches a preset distance, the stepper motor of the printing device is controlled to gradually decelerate and stop rotating according to a preset deceleration method according to the preset distance.

4. The method according to any one of claims 1 to 3, characterized in that: The preset deceleration mode includes at least one of the following: uniform deceleration, exponential deceleration, sinusoidal deceleration, parabolic deceleration, logarithmic deceleration, and multi-stage deceleration.

5. The method according to claim 1, characterized in that After controlling the stepper motor of the printing device to gradually decelerate and stop rotating according to a preset deceleration method, and before controlling the stepper motor to resume rotating, the method further includes: A holding torque is applied to the stepper motor to lock the bobbin position.

6. The method according to claim 1, characterized in that The method further comprises: During the control of the stepper motor deceleration, the heating compensation time of the print head is determined according to the target single-step cycle corresponding to the stepper motor; the target single-step cycle is used to represent the time required for the stepper motor to rotate one step during the deceleration period; The initial heating duration in the initial printing cycle of the print head is adjusted according to the heating compensation duration to obtain a target printing cycle; the target printing cycle is equal to the target single-step cycle; The print head is controlled to print according to the target printing cycle.

7. The method according to claim 6, characterized in that During the period of controlling the deceleration of the stepper motor, the target stepping cycle increases as the speed of the stepper motor decreases; the initial printing cycle includes an initial heating time and an initial cooling time, and the target printing cycle includes a target heating time and a target cooling time; during the period of controlling the deceleration of the stepper motor, the difference between a first ratio between the target heating time and the target cooling time and a second ratio between the initial heating time and the initial cooling time is within a preset range.

8. The method according to claim 6, characterized in that The stepping motor is controlled to resume rotation, and the print head is controlled to resume printing, including: The stepper motor is controlled to resume rotation according to the initial stepping cycle, and the print head is controlled to resume printing according to the initial printing cycle; the initial stepping cycle is used to characterize the time required for the stepper motor to rotate one step when printing the target length of the wire tube to be printed; the initial stepping cycle is equal to the initial printing cycle.

9. The method according to claim 1, characterized in that After controlling the stepper motor of the printing device to gradually decelerate and stop rotating according to a preset deceleration method, and before controlling the stepper motor to resume rotating, the method further includes: After the print head pauses printing for a preset time, the print head is controlled to print at the deformed position of the wire tube to be printed with a target printing cycle; the deformed position is a position adjacent to the paused printing position corresponding to the wire tube to be printed when the print head pauses printing and located after the paused printing position.

10. The method according to claim 1, characterized in that After the cutting action is completed, controlling the stepping motor to resume rotation and controlling the print head to resume printing comprises: After the cutting action is completed, preheating the print head; After the preheating of the print head is completed, the stepper motor is controlled to resume rotation, and the print head is controlled to resume printing.

11. The method according to claim 10, characterized in that The preheating of the print head comprises: The print head is heated for an initial heating time in an initial printing cycle before the print head resumes printing; or, In N initial printing cycles before the print head resumes printing, the print head is continuously heated for a target preheating time in each of the initial printing cycles; the target preheating time is less than the initial heating time; and N is a positive integer greater than 1.

12. The method according to claim 1, characterized in that After the cutting action is completed, controlling the stepping motor to resume rotation and controlling the print head to resume printing comprises: After the cutting action is completed, the stepping motor is first controlled to rotate a preset number of steps in advance, and then the print head is controlled to resume printing.

13. A cutter printing device, characterized in that: The cutter printing device comprises: The first control module is used to control the stepper motor of the printing device to gradually decelerate until it stops rotating according to a preset deceleration method after the target length of the wire tube to be printed is printed; when the stepper motor stops rotating, the print head of the printing device suspends printing, and the end of the wire tube to be printed corresponding to the target length is aligned with the cutter position of the printing device; A second control module is used to control a cutter of the printing device to perform a cutting action on an end of the to-be-printed wire tube corresponding to a target segment length; The third control module is used to control the stepping motor to resume rotation and the print head to resume printing after the cutting action is completed.

14. An electronic device, characterized in that: include: Processor and memory; The memory is used to store a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method according to any one of claims 1 to 12.

15. A computer storage medium storing a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the steps of the method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Printer, control method and terminal device

    CN109278419A

  • Method and device for reducing speed of cutter

    CN111037636A

  • Cutter control method and printing equipment

    CN114654900A

  • Printing method of thermal printer, printer, printing system and storage medium

    CN115534544A

  • Multi-specification cable marker leveling and cutting device

    CN116766284A

Cited By

  • Printing calibration method and device, electronic equipment and computer storage medium

    CN119872090A

  • Printing calibration method and device, electronic equipment and computer storage medium

    CN119872090B

  • Wire marking machine control method and device, wire marking machine and computer storage medium

    CN119872103A

  • Control method and device of thread numbering machine, thread numbering machine and computer storage medium

    CN119872103B

  • Tubing printing method and apparatus, electronic device, and computer storage medium

    WO2026138417A1