Wire tube printing method and device, electronic equipment and computer storage medium

By controlling the stepper motor to gradually decelerate to a stop and then resume printing, the problem of printing pauses and misalignments caused by the difference in position between the cutter and the print head in the wire marking machine was solved, thus achieving accuracy and continuity in wire tube printing.

CN119872100BActive Publication Date: 2026-03-20WUHAN JINGCHEN INTELLIGENT IDENTIFICATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In online number printing scenarios, when the cutter and printhead are not in the same position, printing needs to be paused and resumed. The sudden stop of the stepper motor causes the line tube position to shift, affecting the accuracy and continuity of printing.

Method used

By controlling the stepper motor to gradually decelerate to a stop, the cutting action is performed after ensuring that the print head is aligned with the cutter, and printing resumes after the cutter is cut. This includes preheating the print head and adjusting the printing cycle to avoid misalignment caused by sudden stops.

Benefits of technology

This ensures the accuracy and aesthetics of the cutting action, while also guaranteeing the accuracy, continuity, and integrity of the printing process, avoiding issues such as misalignment and uneven density of the printed content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119872100B_ABST
    Figure CN119872100B_ABST
Patent Text Reader

Abstract

The application discloses a wire tube printing method and device, electronic equipment and computer storage medium. The method comprises the following steps: after a target length of a wire tube to be printed is printed, a stepping motor of a printing device is controlled to gradually slow down to stop rotating according to a preset deceleration mode; when the stepping motor stops rotating, a printing head of the printing device pauses printing; an end of the wire tube to be printed corresponding to the target length is aligned with a cutter position of the printing device; the cutter of the printing device is controlled to perform a cutter action on the end of the wire tube to be printed corresponding to the target length; after the cutter action is completed, the stepping motor is controlled to resume rotating, and the printing head is controlled to resume printing. When the cutter action is about to be performed, the stepping motor is gradually slowed down and stopped, so that the stepping motor stops more stably, and the problem of misalignment when printing is restarted after overshoot of the motor stops is prevented, thereby ensuring the accuracy, continuity and integrity of wire tube printing.
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 line pipe printing method and device, an electronic device, and a computer storage medium. BACKGROUND

[0002] In a line number machine printing scenario, a cutter action needs to be performed on the line pipe after each segment of the line pipe is printed. Since the cutter and the printing head are not at the same position, after each segment of the line pipe is printed, the line pipe needs to be printed forward by a distance (the distance is the distance from the printing head to the cutter) to the cutter position before the cutter action can be performed. At this time, the cutter is aligned with the tail of the printed line pipe to prepare for the cutter action, and the printing head is aligned with the current printing line pipe to perform the printing action. When the cutter action is performed, the printing needs to be stopped, and the cutter action needs to be performed before the printing can be continued, so that the line pipe that can be printed smoothly at one time needs to experience the actions of pausing the printing and resuming the printing. The stepping motor that controls the printing also needs to experience the actions of stopping and starting. SUMMARY

[0003] Embodiments of the present application provide a line pipe printing method, device, electronic device, and computer storage medium. When the printing is paused and the cutter action is prepared to be performed, the stepping motor is gradually slowed down and stopped by control, so that the stepping motor is stopped more smoothly, and the problem of misalignment when the printing is started again is avoided due to the overshoot caused by the sudden stop of the stepping motor. The accuracy, continuity, and integrity of the printed line pipe are ensured while the accuracy and aesthetics of the cutter action are ensured.

[0004] In a first aspect, embodiments of the present application provide a line pipe printing method, which includes:

[0005] After a target segment length of the line pipe to be printed is printed, a stepping motor of a printing device is gradually slowed down and stopped by control according to a preset deceleration mode; when the stepping motor is stopped, a printing head of the printing device pauses the printing, and an end of the line pipe to be printed corresponding to the target segment length is aligned with a cutter position of the printing device;

[0006] The cutter of the printing device is controlled to perform a cutter action on the end of the line pipe to be printed corresponding to the target segment length;

[0007] After the cutter action is performed, the stepping motor is controlled to resume rotation, and the printing head is controlled to resume the printing.

[0008] In a possible implementation, the control of the stepping motor of the printing device to gradually slow down and stop rotation according to the preset deceleration mode includes:

[0009] The frequency of the drive signal sent by the control printing device is gradually reduced to 0 according to a preset deceleration method, so as to control the stepper motor of the printing device to gradually decelerate until it stops rotating according to the preset deceleration method.

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

[0011] After the target length of the tube to be printed is completed, when the distance between the end of the target length of the 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 until it stops rotating according to a preset deceleration method based on the preset distance.

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

[0013] In one possible implementation, after the stepper motor of the aforementioned control printing device gradually decelerates to a stop according to a preset deceleration method, and before the aforementioned control of the aforementioned stepper motor to resume rotation, the method further includes:

[0014] A holding torque is applied to the aforementioned stepper motor to lock the position of the conduit.

[0015] In one possible implementation, the above method also includes:

[0016] During the deceleration of the stepper motor, the heating compensation duration of the print head is determined based on the target single-step cycle corresponding to the stepper motor; the target single-step cycle is used to characterize the time required for the stepper motor to rotate one step during the deceleration of the stepper motor.

[0017] The initial heating time in the initial printing cycle corresponding to the above-mentioned printhead is adjusted according to the above-mentioned heating compensation time to obtain the target printing cycle; the above-mentioned target printing cycle is equal to the above-mentioned target single-step cycle;

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

[0019] In one possible implementation, during the control of the stepper motor deceleration, the target single-step cycle increases as the stepper motor speed 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 control of the stepper motor deceleration, the difference between the first ratio between the target heating time and the target cooling time and the second ratio between the initial heating time and the initial cooling time is within a preset range.

[0020] In a possible implementation, the control of the step motor to resume rotation and the control of the print head to resume printing include:

[0021] controlling the step motor to resume rotation according to an initial step period, and controlling the print head to resume printing according to an initial printing period; the initial step period is used to represent a time length required for the step motor to rotate one step when printing a target segment length of the to-be-printed line tube; and the initial step period is equal to the initial printing period.

[0022] In a possible implementation, after the step motor of the printing device is gradually decelerated to stop rotation in a preset deceleration manner, before the step motor is controlled to resume rotation, the method further includes:

[0023] after the time length during which the print head suspends printing reaches a preset time length, controlling the print head to print at a deformed position of the to-be-printed line tube at a target printing period; the deformed position is a position adjacent to and located after a suspension printing position of the to-be-printed line tube corresponding to the time when the print head suspends printing.

[0024] In a possible implementation, the control of the step motor to resume rotation and the control of the print head to resume printing after the cutter action is completed include:

[0025] preheating the print head after the cutter action is completed;

[0026] controlling the step motor to resume rotation and controlling the print head to resume printing after the preheating of the print head is completed.

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

[0028] heating the print head for an initial heating time length within an initial printing period before the print head resumes printing; or

[0029] continuously heating the print head for a target preheating time length within each of N initial printing periods before the print head resumes printing; the target preheating time length is less than the initial heating time length; and N is a positive integer greater than 1.

[0030] In a possible implementation, the control of the step motor to resume rotation and the control of the print head to resume printing after the cutter action is completed include:

[0031] After the cutting action is executed, the step motor is controlled to rotate by a preset number of steps in advance, and then the print head is controlled to resume printing.

[0032] In a second aspect, the embodiments of the present application provide a cable printing device, which comprises:

[0033] The first control module is configured to control a step motor of the printing device to gradually decelerate to stop rotating according to a preset deceleration mode after a target length of the cable to be printed is printed; when the step motor stops rotating, a print head of the printing device pauses printing, and an end of the target length of the cable to be printed is aligned with a position of a cutter of the printing device;

[0034] The second control module is configured to control the cutter of the printing device to perform a cutting action on the end of the target length of the cable to be printed.

[0035] The third control module is configured to control the step motor to resume rotating and control the print head to resume printing after the cutting action is executed.

[0036] In a third aspect, the embodiments of the present application provide an electronic device, which comprises a processor and a memory.

[0037] The memory is configured to store a computer program, and the computer program is adapted to be loaded by the processor and execute the steps of the method provided in the first aspect or any possible implementation manner of the first aspect.

[0038] In a fourth aspect, the embodiments of the present application provide a computer storage medium, which stores a plurality of instructions, and the instructions are adapted to be loaded by a processor and execute the steps of the method provided in the first aspect or any possible implementation manner of the first aspect.

[0039] In the embodiment of the present application, after the target segment length of the to-be-printed wire tube is printed, the stepping motor of the printing device is controlled to gradually slow down to stop rotating according to a preset deceleration mode. When the stepping motor stops rotating, the printing head of the printing device pauses printing, and the end of the target segment length of the to-be-printed wire tube is aligned with the position of the cutting knife of the printing device. The cutting knife of the printing device is controlled to perform a cutting action on the end of the target segment length of the to-be-printed wire tube. After the cutting action is performed, the stepping motor is controlled to resume rotating, and the printing head is controlled to resume printing. That is, when the printing is paused to prepare for the cutting action, the stepping motor is gradually slowed down to stop, so that the stepping 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 stepping motor. The position of the wire tube after the cutting action is restored is consistent with the position before the cutting action is stopped, and the printing content will not be misaligned. That is, while ensuring the accuracy and aesthetics of the cutting action, the accuracy, continuity and integrity of the wire tube printing are also ensured. BRIEF DESCRIPTION OF DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0041] Figure 1 A structural schematic diagram of a printing device is provided for an exemplary embodiment of the present application.

[0042] Figure 2 A position relationship schematic diagram of a cutting knife and a printing head is provided for an exemplary embodiment of the present application.

[0043] Figure 3 A flowchart of a wire tube printing method is provided for an exemplary embodiment of the present application.

[0044] Figure 4 A flowchart of resuming printing after a cutting action is performed is provided for an exemplary embodiment of the present application.

[0045] Figure 5 A control flowchart of a printing head during deceleration of a stepping motor is provided for an exemplary embodiment of the present application.

[0046] Figure 6 A flowchart of another wire tube printing method is provided for an exemplary embodiment of the present application.

[0047] Figure 7 A structural schematic diagram of a wire tube printing device is provided for an exemplary embodiment of the present application.

[0048] Figure 8 A structural schematic diagram of an electronic device is provided for 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 in combination with the drawings in the embodiments of the present application.

[0050] The terms “first”, “second”, “third” and the like in the specification and claims of the present application and the above drawings are used to distinguish different objects, and are not used to describe a specific order. In addition, the terms “include” and “have” and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally further include steps or units not listed or can optionally further include other steps or units inherent to the process, method, product or device.

[0051] Next, please refer to Figure 1 which exemplarily shows a structural schematic diagram of a printing device provided by the embodiments of the present application. As Figure 1 shown, the printing device 100 can but is not limited to include a controller 110, a stepping motor 120, a print head 130, and a cutter 140. Among them:

[0052] The above printing device 100 can be a line numbering machine, which can but is not limited to be used for printing characters on materials such as PVC sleeve, heat shrink tube, and adhesive label, for example but not limited to including a single machine line numbering machine, an online line numbering machine, and a Bluetooth line numbering machine, etc. The working principle thereof 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 thereon is sensitive to heat and will change color after being subjected to heat. When the print head 130 of the line numbering machine is heated, the thermal paper changes color after being heated, thereby forming the required text or images.

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

[0054] Specifically, after the target length of the to-be-printed line tube is printed, the controller 110 can control the stepping motor 120 of the printing device 100 to gradually slow down to stop rotating according to a preset deceleration mode; when the stepping motor 120 stops rotating, the printing head 130 of the printing device 100 suspends printing, and the end of the to-be-printed line tube corresponding to the target length is aligned with the cutter position of the printing device 100; the cutter 140 of the printing device 100 is controlled to perform a cutter action on the end of the to-be-printed line tube corresponding to the target length; after the cutter action is completed, the stepping motor 120 is controlled to resume rotating, and the printing head 130 is controlled to resume printing.

[0055] The stepping motor 120 is mainly responsible for driving the precise movement of the printing head 130 and mechanical transmission mechanism and the like, which is usually composed of stator, rotor and driver and the like, and has a simple structure and is easy to maintain. In the embodiment of the application, the rotation of the stepping motor 120 can drive the rotation of the rubber roller, and then drive the movement of the line tube through the mechanical transmission mechanism.

[0056] The printing head 130 is one of the core components of the printing device 100, which is responsible for transferring printing materials such as ink or carbon powder to the line tube to form text, images or charts. According to different printing technologies, the structure and working principle of the printing head 130 are different, which is not limited in the embodiment of the application.

[0057] The cutter 140 is used to perform precise cutter action according to the instruction of the controller 110, for example, cutting the printing material (such as the to-be-printed line tube) into the required length after printing is completed.

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

[0059] It can be understood that the line tube printing method provided by the embodiment of the application can be executed by the controller 110 of the printing device 100, or can be executed by the controller 110 of the printing device 100 and a terminal in communication connection with the printing device 100, which is not limited in the embodiment of the application.

[0060] For example, in the line numbering machine printing scenario, cutter action needs to be performed on the line tube after each segment of the line tube is printed, but since the cutter and the printing head are not at the same position, for example Figure 2 As shown in the figure, after the printing of the current segment of the line tube is completed (i.e., the to-be-printed line tube is printed for the target length L1), the cutter action needs to be performed according to Figure 2The printing and tube moving direction shown continues to print and move the tube for a distance (the distance L2 between the printhead 130 and the cutter 140) to the cutter position before the cutter action is performed, at which time the cutter 140 is aligned with the tail (end) of the printed tube to perform the cutter action, and the printhead 130 is aligned with the current printing tube to perform the printing action; when the cutter action is performed, the printing and tube moving action must be stopped, and after the cutter action is performed, the printing is continued, so that the tube that can be printed smoothly at one time is subjected to the action of stopping printing and resuming printing, and the stepping motor controlling the printing and tube moving also undergoes the action of stopping and starting.

[0061] In the related art, when the cutter action is performed, the printing is first stopped, and the stepping motor controlling the printing and tube moving is directly stopped in the rotating process, which causes the stepping motor to be unable to stop rotating in time due to inertia and overshoot, the position of the tube changes relative to the position when the printing is stopped, and the printing content is misaligned.

[0062] Based on this, the embodiment of the present application provides a tube printing method, when the printing is stopped and the cutter action is prepared, the stepping motor is gradually slowed down and stopped by control, so that the stepping motor is stopped more smoothly, and the misalignment problem when the printing is started again due to the overshoot caused by the sudden stop of the stepping motor is avoided, the accuracy, continuity and integrity of the tube printing are ensured while the accuracy and aesthetics of the cutter action are ensured.

[0063] Next, an example of a tube printing method provided by an example embodiment of the present application is introduced. Figures 1-2 , please refer to Figure 3 , which exemplarily shows a flowchart of a tube printing method provided by an example embodiment of the present application. As Figure 3 shown, the tube printing method includes the following steps:

[0064] S301, after the target length of the tube to be printed is printed, the stepping motor of the printing device is gradually slowed down to stop rotating according to a preset deceleration mode, when the stepping motor stops rotating, the printhead of the printing device stops printing, and the end of the tube to be printed corresponding to the target length is aligned with the cutter position of the printing device.

[0065] Specifically, after the to-be-printed wire tube prints the target length (i.e., the preset length to be printed), the rotation speed of the stepper motor can be gradually reduced according to the preset deceleration mode until it completely stops. This process is smooth and controlled, ensuring that the end of the to-be-printed wire tube after printing the target length does not deviate in position or is damaged due to sudden stopping when approaching the cutter position. That is, as the stepper motor stops, the print head also synchronously pauses the printing action. At this time, the end of the to-be-printed wire tube corresponding to the printed target length is aligned with the cutter position of the printing device, preparing for the next cutter action.

[0066] Optionally, the implementation process of gradually reducing the rotation of the stepper motor of the printing device to a stop according to the preset deceleration mode in S301 can include but is not limited to gradually reducing the sending frequency of the corresponding driving signal of the printing device to 0 according to the preset deceleration mode to control the stepper motor of the printing device to gradually reduce the rotation to a stop according to the preset deceleration mode.

[0067] Optionally, the implementation process of gradually reducing the rotation of the stepper motor of the printing device to a stop according to the preset deceleration mode in S301 after the to-be-printed wire tube prints the target length can include but is not limited to the following: after the to-be-printed wire tube prints the target length, when the distance between the end of the to-be-printed wire tube corresponding to the target length and the cutter position of the printing device reaches a preset distance (for example, but not limited to, the end of the target length wire tube that has been printed is 5 mm away from the cutter position), the stepper motor of the printing device is controlled to gradually reduce the rotation to a stop according to the preset deceleration mode according to the preset distance, that is, the stepper motor needs to control the to-be-printed wire tube to move forward by the preset distance during the deceleration period when it starts to decelerate to a stop, to ensure that the end of the to-be-printed wire tube corresponding to the target length is aligned with the cutter position of the printing device when the stepper motor stops rotating, ensuring 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 to-be-printed wire tube prints the target length, avoiding the problem of affecting normal printing efficiency caused by the stepper motor being controlled to decelerate prematurely before the to-be-printed wire tube prints the target length.

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

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

[0070] Specifically, after the end of the to-be-printed line tube corresponding to the target printed length is aligned with the cutter position, the printing device can be controlled to activate the cutter, align the cutter with the end of the to-be-printed line tube corresponding to the target printed length, and perform a cutting action to complete the cutting of the to-be-printed line tube corresponding to the target printed length.

[0071] S303, after the cutter action is completed, the step motor is controlled to resume rotation, and the print head is controlled to resume printing.

[0072] Specifically, after the cutter action is completed, the step motor can be controlled to start again and continue to rotate at an appropriate speed. At the same time, the print head resumes the printing action and continues to print the next target length of the to-be-printed line tube.

[0073] In the embodiment of the application, after the to-be-printed line tube is printed to the target length, the step motor of the printing device is controlled to gradually slow down to stop according to a preset deceleration mode. When the step motor stops, the print head of the printing device pauses printing, and the end of the to-be-printed line tube corresponding to the target length is aligned with the cutter position of the printing device. The cutter of the printing device is controlled to perform a cutter action on the end of the to-be-printed line tube corresponding to the target length. After the cutter action is completed, the step motor is controlled to resume rotation, and the print head is controlled to resume printing. That is, when the printing is paused to prepare for the cutter action, the step motor is controlled to slow down to stop slowly, so that the step motor stops more smoothly, avoiding the problem of misalignment when the printing is started again due to the overshoot caused by the sudden stop of the step motor. The position of the line tube after the printing is resumed is consistent with the position when the cutting is stopped, and the printing content will not be misaligned, that is, the accuracy, continuity and integrity of the line tube printing are ensured while the accuracy and aesthetics of the cutter action are ensured.

[0074] In related technologies, after the printing is paused, the basic temperature of the print head continues to decrease during the waiting period for the completion of the cutter action, and the printing density is lower when the printing is resumed due to the lower basic temperature of the print head, resulting in a less smooth connection of the printing content.

[0075] Therefore, the embodiment of the application provides a method for resuming printing after the completion of a cutter action, as shown in Figure 4 That is, the implementation process of S303, after the completion of the cutter action, the step motor is controlled to resume rotation, and the print head is controlled to resume printing, can but is not limited to include:

[0076] S401, after the cutter action is completed, the print head is preheated.

[0077] Specifically, when the cutter action is completed and the printing is ready to be resumed, the printhead is preheated in advance to raise the base temperature of the printhead to a temperature close to that before the pause, i.e., to shorten the temperature difference between the temperature of the printhead when the printing is resumed and the temperature before the printing is paused, and then the printing is resumed. At this time, the printing density is almost the same as that before the pause, and the printing content is smoothly connected.

[0078] Optionally, the implementation process of the preheating of the printhead in S401 can include but is not limited to the following: before the printhead resumes printing, the printhead is heated for an initial heating duration in an initial printing period, the initial printing period includes the initial heating duration and an initial cooling duration, after the cutter action is completed, the printing can be resumed in advance in a heating period (initial printing period), i.e., the heating is started in advance to raise the base temperature of the printhead and shorten the temperature difference between the temperature of the printhead when the printing is resumed and the temperature before the printing is paused; or before the printhead resumes printing, the printhead is continuously heated for a target preheating duration in N initial printing periods, the target preheating duration is less than the initial heating duration, N is a positive integer greater than 1, for example, but not limited to, 5 or 10, etc., i.e., after the cutter action is completed, the printing can be resumed in advance by continuously heating the printhead for a short time to slowly raise the temperature of the printhead, for example, during normal printing, the initial heating duration of a single initial printing period is 1000us, and in the N initial printing periods during the preheating, each initial printing period applies a heating of 100us (10% of the normal initial heating duration) to the printhead continuously, which slowly raises the base temperature of the printhead, achieves the preheating effect, and avoids the problem that the printhead is damaged by being heated at the initial heating duration in the normal initial printing period while the print line tube is not moving.

[0079] S402, after the preheating of the printhead is completed, the step motor is controlled to resume rotation, and the printhead is controlled to resume printing.

[0080] Specifically, after the preheating of the printhead is completed, the step motor can be controlled to continue rotating according to the normal initial step period before the cutter to drive the print line tube to continue moving forward, and the printhead can be controlled to continue printing according to the normal initial printing period before the cutter to ensure that the printing density of the printhead after the printing is resumed is consistent with the printing density before the cutter.

[0081] In the online number machine printing scenario, with each step of the stepping motor, the wire tube moves forward by the length of a pixel point, and then a row of pixel points is printed by starting the heating. When resuming printing, the stepping motor that controls the printing wire tube is switched from a stopped state to a rotating state. The rotation of the stepping motor drives the rubber roller to rotate through a mechanical transmission mechanism, and then drives the wire tube to move. Because of the lag of the mechanical transmission mechanism, the rubber roller cannot immediately rotate when the stepping motor rotates. At this time, if the printing heating is directly started, the wire tube cannot move forward by the length of a pixel point due to the lag of the rubber roller rotation, which will cause the printing content to be compressed.

[0082] Based on this, the embodiment of the present application can first control the stepping motor to rotate by a preset number of steps before the cutter action is completed, and then control the printhead to resume printing. That is, when resuming printing, the stepping motor is first controlled to rotate by a preset number of steps in advance to eliminate the lag time of the mechanical transmission mechanism, and the heating is started when the rubber roller starts to drive the wire tube to move, thereby eliminating the compression of the printing content when resuming printing after the cutter.

[0083] In some possible embodiments, after the stepping motor that controls the printing wire tube is stopped, the stepping motor cannot provide torque to lock the wire tube because the stepping motor is not powered, and the wire tube may be slightly displaced due to external forces during the cutter process, thereby causing the printing content to be misaligned. Based on this, the embodiment of the present application can apply a holding torque to the stepping motor to lock the position of the wire tube after the stepping motor of the printing device is gradually slowed down to a stopped state according to a preset deceleration mode and before the stepping motor resumes rotating, to prevent the printing wire tube from being displaced due to external forces during the cutter process, so that the printing content will not be misaligned. In this way, the accuracy and stability of the cutter are ensured, and the accuracy and printing effect of the printing after the cutter are also ensured.

[0084] In some possible embodiments, during the printing of the wire tube, the printing wire tube will be elastically deformed under stress. After the printing is paused, the elastic deformation of the printing wire tube is released, and the position of the printing wire tube relative to the paused position will change due to the release of the elastic deformation when the printing is resumed, so that the printing content will be misaligned. Based on this, the embodiment of the present application can first control the printhead to print at a deformed position of the printing wire tube at a target printing period after the time length of the pause of the printhead reaches a preset time length after the stepping motor of the printing device is gradually slowed down to a stopped state according to a preset deceleration mode, and then control the stepping motor to resume rotating and control the printhead to resume normal printing after the cutter action is completed. The deformed position is a position adjacent to and after the paused printing position of the printing wire tube corresponding to the paused printing position of the printhead. The preset time length is the time length required for the release of the deformation of the printing wire tube. The preset time length can be different for different types of materials of the printing wire tube. The preset time length may, for example, but is not limited to, be 10 ms, 100 ms, 50 ms, etc.

[0085] In the embodiment of the application, after the stepper motor stops rotating and the printing is paused, a delay period (a preset time length) is set to ensure that the elastic deformation of the to-be-printed line tube is fully released, and then the heating is started again (the target printing period, i.e., the initial printing period before the printing is paused), so that the content is printed at the position of the elastic deformation released line tube, and the printing content after the printing is resumed is not misaligned, that is, after the elastic deformation of the to-be-printed line tube is fully released, the position (i.e., the line tube position when the printing is paused) that has been printed before is pushed forward by one step, and the printing is started again in the embodiment of the application to print the position (i.e., the deformation position) after the elastic deformation of the line tube position when the printing is paused, which is equivalent to that the original printed position (i.e., the line tube position when the printing is paused) has been moved forward, and the deformed position that has not been printed is printed with the content by the printhead currently aligned, so that the printhead can continue to print the position after the deformed position when the stepper motor is resumed to drive the to-be-printed line tube to move again, thereby avoiding the problem of missing printing of the deformed position.

[0086] In the printing scene of the line numbering machine, the single-step period (the time for one step of rotation, i.e., the stepping period) of the stepper motor that controls the printing line tube is equal to the single heating period (i.e., the printing period), and the rotation speed of the stepper motor during the deceleration of the stepper motor is slower and slower, the single-step period of the stepper motor is longer and longer, and the corresponding single heating period is also longer and longer. The single heating period is equal to the heating time length plus the cooling time length, and in the case that the heating time length is constant, the lengthening of the heating period is equivalent to the lengthening of the cooling time length, which will cause the printing density of the printhead during the deceleration of the stepper motor to be lighter and lighter, and the connection of the printing content to be not smooth enough.

[0087] Based on this, the embodiment of the application proposes a control method for a printhead during deceleration of a stepper motor, as shown in Figure 5 The control flow of the printhead during the deceleration of the stepper motor can include but is not limited to the following steps:

[0088] S501, during the control of the deceleration of the stepper motor, determining a heating compensation time length of the printhead according to a target single-step period of the stepper motor.

[0089] Specifically, the target single-step period is used to represent the time length required for one step of rotation during the deceleration of the stepper motor. During the deceleration of the stepper motor, the rotation speed of the stepper motor is different, and the corresponding target single-step period is different. During the control of the deceleration of the stepper motor, the target single-step period of the stepper motor during the deceleration process can be obtained by reading or calculation, and then the heating compensation time length of the printhead is determined based on the target single-step period. The heating compensation time length refers to the time length required for adjusting the heating time of the printhead during the deceleration of the stepper motor to maintain the printing quality.

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

[0091] Specifically, the target printing period is equal to the target single-step period. The initial printing period refers to the duration required for the print head to complete a line of printing actions in a normal working state, which includes a heating duration and a cooling duration. During the deceleration of the stepper motor, the target single-step period gradually increases with the gradual deceleration of the stepper motor. At this time, the initial heating duration in the initial printing period can be adjusted by increasing the heating compensation duration, so that the adjusted target printing period is equal to the target single-step period of the stepper motor, thereby ensuring that the actions of the print head can be synchronized with the stepping of the stepper motor during the deceleration of the stepper motor, and avoiding a decrease in printing quality.

[0092] Optionally, during the control of the deceleration of the stepper motor, the target single-step period increases with the decrease in the rotation speed of the stepper motor; the initial printing period includes an initial heating duration and an initial cooling duration, and the target printing period includes a target heating duration and a target cooling duration; during the control of the deceleration of the stepper motor, the difference between a first ratio between the target heating duration and the target cooling duration and a second ratio between the initial heating duration and the initial cooling duration is always kept within a preset range, thereby ensuring that the printing density of the print head does not change greatly before and after the deceleration of the stepper motor, and ensuring printing continuity while ensuring printing quality.

[0093] S503, control the print head to print according to the target printing period.

[0094] Specifically, during the deceleration of the stepper motor, after obtaining the adjusted target printing period corresponding to each target single-step period, the print head is controlled to print according to the corresponding adjusted target printing period during the control of the stepper motor to slowly move the to-be-printed wire tube according to the target single-step period. Since the target printing period has been matched with the target single-step period of the stepper motor, it can be ensured that the actions of the print head can be synchronized with the stepping of the motor during the deceleration of the stepper motor, which not only improves the printing quality, but also avoids the problem of lagging or leading of the actions of the print head due to the deceleration of the stepper motor.

[0095] In some possible embodiments, after the cutter action is completed, the control of the step motor to resume rotation and the control of the print head to resume printing in 303 can include but are not limited to the following: the step motor is controlled to resume rotation according to an initial step period, and the print head is controlled to resume printing according to an initial printing period, so as to ensure that the printing density and the printing quality of the print head remain unchanged before and after the cutter. The initial step period is used to represent the time length required for the step motor to normally rotate one step when printing the line tube of the target segment length, and the initial step period is equal to the initial printing period.

[0096] Next, refer to Figure 6 which exemplarily shows a flowchart of another line tube printing method provided by the embodiments of the present application. As shown in Figure 6 , the line tube printing method includes the following steps:

[0097] S601, after the target segment length of the line tube to be printed is printed, the step motor of the printing device is controlled to gradually decelerate according to a preset deceleration mode.

[0098] Specifically, after the target segment length (i.e., the preset length to be printed) of the line tube to be printed is printed, the speed of the step motor can be controlled to slowly decrease according to the preset deceleration mode, so as to avoid the problem of misplacement when printing is started again due to overshoot caused by the sudden stop of the step motor, and ensure that the position of the line tube when printing is resumed after the cutter is consistent with the position when the cutter is stopped, and the printing content will not be misaligned, that is, while ensuring the accuracy and aesthetics of the cutter action, the accuracy, continuity and integrity of the line tube printing are also ensured.

[0099] S602, during the control of the step motor to decelerate, the initial heating time length in the initial printing period of the print head is dynamically adjusted according to the target single-step period corresponding to the step motor.

[0100] Specifically, the implementation process of S602 can refer to S501-S503, which will not be described here. By dynamically adjusting the initial heating time length in the initial printing period according to the target single-step period corresponding to the step motor during the deceleration of the step motor, it can be ensured that the action of the print head can be synchronized with the stepping of the step motor while the printing density does not change during the deceleration of the step motor, and the printing quality is prevented from being reduced.

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

[0102] Specifically, the embodiment of the present application can lock the position of the line pipe to be printed, prevent the line pipe to be printed from being displaced due to external force in the cutting process, and ensure that the printed content will not be misaligned. In this way, the accuracy and stability of the cutting are ensured, and the accuracy and printing effect of the printing after the cutting are ensured.

[0103] S604, after the duration of the pause of the print head reaches the preset duration, the print head is controlled to print at the deformed position of the line pipe to be printed at a target printing period.

[0104] Specifically, in the embodiment of the present application, after the stepping motor stops rotating and the printing is paused, a delay time (preset duration) is set to ensure that the elastic deformation of the line pipe to be printed is completely released, and then the heating is started again (target printing period, i.e., the initial printing period before the pause of the printing), so that the content is printed at the position of the line pipe to be printed after the elastic deformation is released, and the printed content after the printing is resumed will not be misaligned.

[0105] S605, the cutting device is controlled to perform a cutting action on the end of the line pipe to be printed corresponding to the target length.

[0106] Specifically, the implementation process of S605 can refer to S302, which will not be described here.

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

[0108] Specifically, S606 is consistent with S401, which will not be described here.

[0109] S607, after the preheating of the print head is completed, the stepping motor is controlled to resume rotating, and the print head is controlled to resume printing.

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

[0111] Next, please refer to Figure 7 , which is a structural schematic diagram of a line pipe printing device provided by the embodiment of the present application. As shown in Figure 7 , the line pipe printing device 700 includes:

[0112] The first control module 710 is configured to control the stepper motor of the printing device to gradually decelerate to stop rotating according to a preset deceleration mode after the target length of the to-be-printed wire tube is printed.

[0113] The second control module 720 is configured to control the cutter of the printing device to perform a cutter action on the end of the target length of the to-be-printed wire tube.

[0114] The third control module 730 is configured to control the stepper motor to resume rotating and control the printing head to resume printing after the cutter action is completed.

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

[0116] control the sending frequency of the driving signal corresponding to the printing device to gradually decrease to 0 according to the preset deceleration mode, so as to control the stepper motor of the printing device to gradually decelerate to stop rotating according to the preset deceleration mode.

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

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

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

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

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

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

[0123] The first determination module is configured to determine a heating compensation duration of the printing head according to a target single-step period corresponding to the stepper motor during control of the deceleration of the stepper motor. The target single-step period is used to represent a duration required for one step of rotation of the stepper motor during deceleration.

[0124] The adjusting module is configured to adjust an initial heating duration in the initial printing period corresponding to the print head according to the heating compensation duration, to obtain a target printing period; and the target printing period is equal to the target single-step period.

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

[0126] In a possible implementation, during the control of the deceleration of the stepper motor, the target single-step period increases with the decrease of the rotation speed of the stepper motor; the initial printing period includes an initial heating duration and an initial cooling duration, and the target printing period includes a target heating duration and a target cooling duration; during the control of the deceleration of the stepper motor, a difference between a first ratio between the target heating duration and the target cooling duration and a second ratio between the initial heating duration and the initial cooling duration is within a preset range.

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

[0128] control the stepper motor to rotate again according to an initial stepping period, and control the print head to print again according to the initial printing period; the initial stepping period is used to represent a duration required for the stepper motor to rotate one step when printing the target segment length of the to-be-printed wire tube; and the initial stepping period is equal to the initial printing period.

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

[0130] The sixth control module is configured to, after a duration during which the print head is paused for printing reaches a preset duration, control the print head to print at a deformed position of the to-be-printed wire tube with a target printing period; the deformed position is a position adjacent to and located after a paused printing position of the to-be-printed wire tube corresponding to a time when the print head is paused for printing.

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

[0132] The preheating unit is configured to, after the cutter action is completed, preheat the print head;

[0133] The control unit is configured to, after the preheating of the print head is completed, control the stepper motor to rotate again, and control the print head to print again.

[0134] In a possible implementation, the preheating unit is specifically configured to:

[0135] The print head is heated for an initial heating duration before the print head resumes printing; or the print head is continuously heated for a target preheating duration in each of N initial printing periods before the print head resumes printing; the target preheating duration is less than the initial heating duration; and the 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 cutter action is performed, the stepper motor is controlled to rotate by a preset number of steps in advance, and then the print head is controlled to resume printing.

[0138] The division of the modules in the wire tube printing device is only used for illustration, and in other embodiments, the wire tube printing device can be divided into different modules as needed to complete all or part of the functions of the wire tube printing device. The implementation of each module in the wire tube printing device provided in the embodiments of the present specification can be in the form of a computer program. The computer program can run on a printing device. The program modules formed by the computer program can be stored on the memory of the printing device. When the computer program is executed by the processor, all or part of the steps of the wire tube printing method described in the embodiments of the present specification are implemented.

[0139] Next, please refer to Figure 8 , Figure 8 A structure schematic diagram of an electronic device provided by an embodiment of the present application is shown. As Figure 8 shown, the electronic device 800 can 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 the components.

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

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

[0143] The processor 810 can include one or more processing cores. The processor 810 connects various parts in the entire electronic device 800 through various interfaces and lines, 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 printhead 850 and mechanical transmission mechanism and the like. The stepper motor 860 is usually composed of a stator, a rotor, a driver and the like, 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 rotation of the rubber roller, and then drive the movement of the tube.

[0145] The printhead 850 is one of the core components of the printing device, which is responsible for transferring printing materials such as ink or carbon powder to the tube to form text, images or charts. The structure and working principle of the printhead 850 are different according to different printing technologies, which are not limited in the embodiment of the present application.

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

[0147] Optionally, the processor 810 can be implemented in at least one of the hardware forms of digital signal processing, field programmable gate array, programmable logic array. The processor 810 can integrate one or a combination of central processing unit, image processor and modem. It can be understood that the above-mentioned modem can also not be integrated into the processor 810, but realized by a single chip.

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

[0149] In some possible embodiments, the processor 810 can be used to call the program instructions stored in the memory 840, and specifically perform the following operations: after the target length of the tube to be printed is printed, the stepper motor of the printing device is controlled to gradually slow down to stop rotating according to a preset deceleration mode; when the stepper motor stops rotating, the printhead of the printing device pauses printing, and the end of the target length of the tube to be printed is aligned with the position of the cutter 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 tube to be printed; after the cutting action is completed, the stepper motor is controlled to resume rotating, and the printhead is controlled to resume printing.

[0150] In some possible embodiments, the processor 810 performs the above-mentioned step of controlling the stepper motor of the printing device to gradually decelerate to stop rotation in a preset deceleration mode, specifically for performing:

[0151] controlling the printing device to gradually decrease the sending frequency of the corresponding driving signal to 0 in a preset deceleration mode, so as to control the stepper motor of the printing device to gradually decelerate to stop rotation in the preset deceleration mode.

[0152] In some possible embodiments, the processor 810 performs the above-mentioned step of controlling the stepper motor of the printing device to gradually decelerate to stop rotation in a preset deceleration mode after the target length of the line tube to be printed is printed, specifically for performing:

[0153] after the target length of the line tube to be printed is printed, when the distance between the end of the target length of the line tube to be printed and the position of the cutter of the printing device reaches a preset distance, controlling the stepper motor of the printing device to gradually decelerate to stop rotation in a preset deceleration mode according to the preset distance.

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

[0155] In some possible embodiments, after the processor 810 performs the above-mentioned step of controlling the stepper motor of the printing device to gradually decelerate to stop rotation in a preset deceleration mode, before the step of controlling the stepper motor to resume rotation, the processor 810 is further configured to perform the step of applying a holding torque to the stepper motor to lock the position of the line tube.

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

[0157] during the step of controlling the stepper motor to decelerate, determining a heating compensation duration of the print head according to a target single-step period corresponding to the stepper motor, the target single-step period being used to represent a duration required for the stepper motor to rotate one step during deceleration, adjusting an initial heating duration in an initial printing period of the print head according to the heating compensation duration to obtain a target printing period, the target printing period being equal to the target single-step period, and controlling the print head to print according to the target printing period.

[0158] In some possible embodiments, during the control of the above-mentioned stepper motor to decelerate, the above-mentioned target single-step period increases with the decrease of the rotation speed of the above-mentioned stepper motor; the above-mentioned initial printing period comprises an initial heating time length and an initial cooling time length, and the above-mentioned target printing period comprises a target heating time length and a target cooling time length; during the control of the above-mentioned stepper motor to decelerate, the difference between a first ratio between the above-mentioned target heating time length and the above-mentioned target cooling time length and a second ratio between the above-mentioned initial heating time length and the above-mentioned initial cooling time length is within a preset range.

[0159] In some possible embodiments, when the above-mentioned processor 810 controls the above-mentioned stepper motor to resume rotation and controls the above-mentioned print head to resume printing, the above-mentioned processor 810 is specifically configured to perform the following operations:

[0160] controlling the above-mentioned stepper motor to resume rotation according to an initial stepping period, and controlling the above-mentioned print head to resume printing according to the above-mentioned initial printing period; the above-mentioned initial stepping period is used to represent a time length required for the above-mentioned stepper motor to rotate one step when printing the above-mentioned target length of the to-be-printed wire tube; and the above-mentioned initial stepping period is equal to the above-mentioned initial printing period.

[0161] In some possible embodiments, after the above-mentioned processor 810 controls the stepper motor of the printing device to gradually decelerate to stop rotation according to the preset deceleration mode, before the above-mentioned processor 810 controls the above-mentioned stepper motor to resume rotation, the above-mentioned processor 810 is further configured to perform the following operation:

[0162] after the time length during which the above-mentioned print head suspends printing reaches a preset time length, controlling the above-mentioned print head to print at a deformed position of the above-mentioned to-be-printed wire tube with a target printing period; the above-mentioned deformed position is a position adjacent to and located after a suspension printing position of the above-mentioned to-be-printed wire tube corresponding to the time when the above-mentioned print head suspends printing.

[0163] In some possible embodiments, when the above-mentioned processor 810 controls the above-mentioned stepper motor to resume rotation and controls the above-mentioned print head to resume printing after the execution of the above-mentioned cutter action, the above-mentioned processor 810 is specifically configured to perform the following operations:

[0164] after the execution of the above-mentioned cutter action, preheating the above-mentioned print head; and after the preheating of the above-mentioned print head ends, controlling the above-mentioned stepper motor to resume rotation and controlling the above-mentioned print head to resume printing.

[0165] In some possible embodiments, when the above-mentioned processor 810 preheats the above-mentioned print head, the above-mentioned processor 810 is specifically configured to perform the following operation:

[0166] The initial heating duration of the print head during the first initial printing cycle before the print head resumes printing; or, the target preheating duration of the print head during each of the N initial printing cycles before the print head resumes printing; the target preheating duration is less than the initial heating duration; and N is a positive integer greater than 1.

[0167] In some possible embodiments, when the processor 810 executes the above-mentioned actions of controlling the stepper motor to resume rotation and controlling the print head to resume printing after the cutting action is completed, it is specifically used to perform the following:

[0168] After the cutting action is completed, the stepper motor is controlled to rotate a preset number of steps in advance, and then the print head is controlled to resume printing.

[0169] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer or processor, cause the computer or processor to perform one or more steps in the above embodiments. If the constituent modules of the above-described tube printing device are implemented as 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 implementation can be achieved through software, hardware, firmware, or any combination thereof. Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks. Unless otherwise specified, the technical features of this embodiment and the implementation scheme can be combined arbitrarily.

[0171] The embodiments described above are merely preferred embodiments of this application and are not intended to limit the scope of this application. Any modifications and improvements made by those skilled in the art to the technical solutions of this application without departing from the spirit of this application should fall within the protection scope defined by the claims of this application.

Claims

1. A method for printing conduit, characterized in that, The method includes: After the target length of the 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 tube to be printed corresponding to the target length is aligned with the cutter position of the printing device. The printer controls the cutter to perform a cutting action on the end of the tube to be printed, corresponding to the target segment length. After the cutting action is completed, the stepper motor is controlled to resume rotation, and the print head is controlled to resume printing. The method further includes: During the deceleration of the stepper motor, the heating compensation duration 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 characterize the time required for the stepper motor to rotate one step during deceleration. The initial heating duration in the initial printing cycle corresponding to the print head is adjusted according to the heating compensation duration to obtain the 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.

2. The method as described in claim 1, characterized in that, The stepper motor of the control printing device gradually decelerates until it stops rotating according to a preset deceleration method, including: The frequency of the drive signal sent by the control printing device is gradually reduced to 0 according to a preset deceleration method, so as to control the stepper motor of the printing device to gradually decelerate until it stops rotating according to the preset deceleration method.

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

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

5. The method as described in claim 1, characterized in that, After the stepper motor of the printing device gradually decelerates to a stop according to a preset deceleration method, and before the stepper motor resumes rotation, the method further includes: A holding torque is applied to the stepper motor to lock the conduit position.

6. The method as described in claim 1, characterized in that, During the deceleration of the stepper motor, the target single-step cycle increases as the stepper motor speed 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 deceleration of the stepper motor, the difference between the first ratio between the target heating time and the target cooling time and the second ratio between the initial heating time and the initial cooling time is within a preset range.

7. The method as described in claim 1, characterized in that, The control of the stepper motor to resume rotation and the control of the print head to resume printing include: 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 tube to be printed; the initial stepping cycle is equal to the initial printing cycle.

8. The method as described in claim 1, characterized in that, After the stepper motor of the printing device gradually decelerates to a stop according to a preset deceleration method, and before the stepper motor resumes rotation, the method further includes: After the printhead pauses printing for a preset duration, the printhead is controlled to print at the deformation position of the tube to be printed in a target printing cycle; the deformation position is the position adjacent to and after the pause printing position of the tube to be printed when the printhead pauses printing.

9. The method as described in claim 1, characterized in that, The step of controlling the stepper motor to resume rotation and controlling the print head to resume printing after the cutting action is completed includes: After the cutting action is completed, the print head is preheated; After the printhead has finished preheating, the stepper motor is controlled to resume rotation, and the printhead is controlled to resume printing.

10. The method as described in claim 9, characterized in that, The preheating of the print head includes: The initial heating duration of the print head during the initial printing cycle before the print head resumes printing; or... During the N initial printing cycles before the printhead resumes printing, the printhead is continuously heated for a target preheating time during each initial printing cycle; the target preheating time is less than the initial heating time; and N is a positive integer greater than 1.

11. The method as described in claim 1, characterized in that, The step of controlling the stepper motor to resume rotation and controlling the print head to resume printing after the cutting action is completed includes: After the cutting action is completed, the stepper motor is controlled to rotate a preset number of steps in advance, and then the print head is controlled to resume printing.

12. A tube printing device, characterized in that, The tube printing device includes: 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 tube to be printed is printed; when the stepper motor stops rotating, the print head of the printing device pauses printing, and the end of the tube to be printed corresponding to the target length is aligned with the cutter position of the printing device. The second control module is used to control the cutter of the printing device to perform a cutting action on the end of the target segment length of the tube to be printed; The third control module is used to control the stepper motor to resume rotation and the print head to resume printing after the cutter action is completed. The tube printing device also includes: The first determining module is used to determine the heating compensation duration of the print head based on the 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 characterize the time required for the stepper motor to rotate one step during the deceleration period. An adjustment module is used to adjust the initial heating time in the initial printing cycle corresponding to the print head according to the heating compensation time to obtain a target printing cycle; the target printing cycle is equal to the target single-step cycle; The fifth control module is used to control the print head to print according to the target printing cycle.

13. An electronic device, characterized in that, include: Processor and memory; The memory is used to store a computer program adapted to be loaded by the processor and to execute the steps of the method as described in any one of claims 1 to 11.

14. A computer storage medium storing a plurality of instructions adapted for loading by a processor and performing the steps of the method as claimed in any one of claims 1 to 11.

Citation Information

Patent Citations

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

    CN119872090A