Tubing printing method and apparatus, electronic device, and computer storage medium
By controlling the stepper motor to gradually decelerate and preheat the print head, the misalignment problem caused by the difference in position between the cutter and the print head in online numbering machines was solved, thus achieving printing accuracy and consistency.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- WUHAN JINGCHEN INTELLIGENT IDENTIFICATION TECH CO LTD
- Filing Date
- 2025-12-03
- Publication Date
- 2026-07-02
AI Technical Summary
In online number printing scenarios, the cutter and print head are not in the same position, which requires printing to be paused and resumed. This causes the stepper motor to overshoot due to sudden stop, resulting in misalignment of the printed content.
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 cutting is completed. Combined with preheating the print head and adjusting the stepper cycle, the continuity and accuracy of printing are ensured.
This avoids printing misalignment caused by sudden stops of the stepper motor, ensuring the accuracy and aesthetics of the cutter's action, while also guaranteeing the accuracy, consistency, and integrity of the printing process.
Smart Images

Figure CN2025139831_02072026_PF_FP_ABST
Abstract
Description
Methods, apparatus, electronic devices and computer storage media for printing conduits
[0001] Related applications
[0002] This application claims priority to Chinese Patent Application No. 202411954326.8, filed on December 27, 2024, entitled "Cutter Printing Method, Apparatus, Electronic Device and Computer Storage Medium", and Chinese Patent Application No. 202411954327.2, filed on December 27, 2024, entitled "Printing Calibration Method, Apparatus, Electronic Device and Computer Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of printing technology, and in particular to a cutting blade printing method, apparatus, electronic device, and computer storage medium. Background Technology
[0004] In the scenario of online numbering, after each segment of tubing is printed, a cutting action needs to be performed on the tubing. Since the cutter and the print head are not in the same position, after the current segment of tubing is printed, it needs to continue printing forward a certain distance (the distance from the print head to the cutter) to the cutter position before the cutting action can be performed. At this time, the cutter is aligned with the tail of the printed tubing and ready to perform the cutting action, while the print head is aligned with the current tubing and performing the printing action. When performing the cutting action, the printing action must be stopped and the cutting action must be completed before printing can continue. This means that the tubing that could be printed smoothly in one go has to go through the action of pausing and then resuming printing. The stepper motor controlling the printing tubing also has to go through the action of stopping and then starting. Summary of the Invention
[0005] This application provides a cutting blade printing method, apparatus, electronic device, and computer storage medium. When printing is paused and the cutting blade action is to be initiated, the stepper motor is controlled to gradually decelerate and stop, making the stepper motor stop more smoothly and avoiding misalignment when printing is restarted due to overshoot caused by sudden stopping of the stepper motor. While ensuring the accuracy and aesthetics of the cutting blade action, it also ensures the accuracy, continuity, and integrity of the printed lines.
[0006] In a first aspect, embodiments of this application provide a cutting tool printing method, the method comprising:
[0007] After the target length of the 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 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 cutter of the printing device is controlled to perform a cutting action on the end of the tube to be printed corresponding to the target length. After the cutting action is completed, the stepper motor is controlled to resume rotation, and the print head is controlled to resume printing.
[0008] In one possible implementation, the stepper motor of the printing device is gradually decelerated to stop rotating according to a preset deceleration method, including: controlling the transmission frequency of the corresponding drive signal of the printing device to gradually decrease to 0 according to the preset deceleration method, so as to control the stepper motor of the printing device to gradually decelerate to stop rotating according to the preset deceleration method.
[0009] In one possible implementation, the stepper motor of the printing device is controlled to gradually decelerate until it stops rotating according to a preset deceleration method after the target length of the tube to be printed is completed. This includes: after the target length of the tube to be printed is completed, when the distance between the end of the tube to be printed 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 the preset deceleration method based on the preset distance.
[0010] 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.
[0011] 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 stepper motor resumes rotation, the method further includes: applying a holding torque to the stepper motor to lock the position of the conduit.
[0012] In one possible implementation, the above method also includes:
[0013] During the deceleration of the stepper motor, the heating compensation duration of the print head is determined according to the first target stepping cycle corresponding to the stepper motor. The first target stepping 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 first target printing cycle. The first target printing cycle is equal to the first target stepping cycle. The print head is controlled to print according to the first target printing cycle.
[0014] In one possible implementation, during the control of the stepper motor deceleration, the first target stepping cycle increases as the stepper motor speed decreases; the initial printing cycle includes an initial heating time and an initial cooling time, and the first 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.
[0015] In one possible implementation, controlling the stepper motor to resume rotation and controlling the print head to resume printing includes:
[0016] The stepper motor is controlled to resume rotation according to the first initial stepping cycle, and the print head is controlled to resume printing according to the first initial printing cycle; the first 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 first initial stepping cycle is equal to the first initial printing cycle.
[0017] 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 stepper motor to resume rotation, the method further includes: after the duration of the print head pausing printing reaches a preset duration, controlling the print head to print at the deformation position of the tube to be printed in a first target printing cycle; the deformation position is a position adjacent to and after the pause printing position of the tube to be printed when the print head pauses printing.
[0018] In one possible implementation, controlling the stepper motor to resume rotation and controlling the print head to resume printing after the cutting action is completed includes: preheating the print head after the cutting action is completed; controlling the stepper motor to resume rotation and controlling the print head to resume printing after the print head is preheated.
[0019] In one possible implementation, the preheating of the printhead includes:
[0020] The initial heating duration of the print head during the initial printing cycle before the print head resumes printing; or...
[0021] Within the N initial printing cycles before the printhead resumes printing, the printhead is continuously heated for a target preheating time within 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.
[0022] In one possible implementation, after the cutting action is completed, controlling the stepper motor to resume rotation and controlling the print head to resume printing includes:
[0023] 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.
[0024] In one possible implementation, a target printing calibration coefficient corresponding to the tube to be printed is obtained; the target printing calibration coefficient is the stretching and compression ratio between the actual length of the tube after printing and the theoretical length before printing; a second target stepping cycle corresponding to the printing device is determined according to the target printing calibration coefficient; the print head of the printing device is controlled to print according to the second target printing cycle, and the stepper motor of the printing device is controlled to drive the tube to be printed to move forward according to the second target stepping cycle.
[0025] In one possible implementation, obtaining the target printing calibration coefficient corresponding to the duct to be printed includes:
[0026] The printing device is controlled to print a section of the above-mentioned line tube of theoretical length according to the second target printing cycle and the second initial stepping cycle to obtain a section of test line tube; the second initial stepping cycle is equal to the second target printing cycle; the actual length of the test line tube is obtained; the target printing calibration coefficient corresponding to the above-mentioned line tube is calculated according to the actual length and the theoretical length;
[0027] The above-mentioned determination of the second target stepping cycle corresponding to the printing device based on the target printing calibration coefficient includes: adjusting the second initial stepping cycle based on the target printing calibration coefficient to obtain the second target stepping cycle corresponding to the printing device.
[0028] In one possible implementation, adjusting the second initial stepping period according to the target printing calibration coefficient to obtain the second target stepping period corresponding to the printing device includes: reducing the second initial stepping period to a target multiple when the target printing calibration coefficient is less than 1 to obtain the second target stepping period corresponding to the printing device; increasing the second initial stepping period to the target multiple when the target printing calibration coefficient is greater than 1 to obtain the second target stepping period corresponding to the printing device; wherein the target multiple is the target printing calibration coefficient.
[0029] In one possible implementation, the second target printing cycle includes heating time and cooling time; before and after the adjustment of the second initial stepping cycle, the ratio between the heating time and cooling time corresponding to the print head remains unchanged.
[0030] In one possible implementation, determining the second target stepping cycle corresponding to the printing device based on the target printing calibration coefficient includes: calculating the product between the second target printing cycle and the target printing calibration coefficient to obtain the second target stepping cycle corresponding to the printing device.
[0031] In one possible implementation, obtaining the target printing calibration coefficient corresponding to the duct to be printed includes: obtaining the target material type corresponding to the duct to be printed; querying the preset coefficient mapping relationship according to the target material type to obtain the corresponding target printing calibration coefficient; the preset coefficient mapping relationship is used to characterize the correspondence between the material type of the duct and the printing calibration coefficient.
[0032] In one possible implementation, obtaining the target printing calibration coefficient corresponding to the duct to be printed includes:
[0033] When a change in the material type of the tube to be printed is detected, the target printing calibration coefficient corresponding to the tube to be printed is obtained.
[0034] In one possible implementation, the target material types corresponding to the above-mentioned ducts to be printed are different, and the target printing calibration coefficients are different.
[0035] Secondly, embodiments of this application provide a cutting blade printing device, the cutting blade printing device comprising:
[0036] 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.
[0037] 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 of the tube to be printed;
[0038] The third control module is used to control the stepper motor to resume rotation and the print head to resume printing after the cutting action is completed.
[0039] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory;
[0040] The aforementioned memory is used to store a computer program adapted to be loaded by the aforementioned processor and to execute the steps of the method provided by the first aspect of the embodiments of this application or any possible implementation thereof.
[0041] Fourthly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps of the method provided by the first aspect of the embodiments of this application or any possible implementation thereof.
[0042] In this embodiment, after the target length of the filament 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 pauses printing, and the end of the filament to be printed 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 cutting action on the end of the filament to be printed corresponding to the target length. 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 paused and the cutting action is to be initiated, the stepper motor is controlled to gradually decelerate and stop, so that the stepper motor stops more smoothly. This avoids the problem of misalignment when printing is restarted due to overshoot caused by the sudden stop of the stepper motor. It ensures that the position of the filament when printing is resumed after cutting is consistent with the position when it stopped before cutting, and the printed content will not be misaligned. In other words, while ensuring the accuracy and aesthetics of the cutting action, the accuracy, continuity and integrity of the cutting printing are also ensured. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 is a schematic diagram of the structure of a printing device provided in an exemplary embodiment of this application;
[0045] Figure 2 is a schematic diagram showing the positional relationship between a cutter and a print head according to an exemplary embodiment of this application;
[0046] Figure 3 is a flowchart illustrating a cutting blade printing method provided in an exemplary embodiment of this application;
[0047] Figure 4 is a schematic diagram of a process for resuming printing after the cutting action is completed, according to an exemplary embodiment of this application;
[0048] Figure 5 is a schematic diagram of the control flow of the print head during stepper motor deceleration provided in an exemplary embodiment of this application;
[0049] Figure 6 is a flowchart illustrating another cutting blade printing method provided in an exemplary embodiment of this application;
[0050] Figure 7 is a schematic flowchart of a printing calibration method provided in an exemplary embodiment of this application;
[0051] Figure 8 is a schematic diagram of a process for obtaining a target printing calibration coefficient provided in an exemplary embodiment of this application;
[0052] Figure 9A is a schematic diagram of the printing effect when the target printing calibration coefficient is less than 1 before printing calibration, provided by an exemplary embodiment of this application;
[0053] Figure 9B is a schematic diagram of the printing effect when the target printing calibration coefficient is greater than 1 before printing calibration, provided by an exemplary embodiment of this application;
[0054] Figure 10A is a schematic diagram of a second target printing cycle and a second initial stepping cycle provided by an exemplary embodiment of this application;
[0055] Figures 10B-10C are schematic diagrams of a second target printing cycle and a second target stepping cycle provided in an exemplary embodiment of this application;
[0056] Figure 11 is a schematic diagram of the overall implementation process of a printing calibration method provided in an exemplary embodiment of this application;
[0057] Figure 12 is a schematic diagram of a cutting and printing device provided in an exemplary embodiment of this application;
[0058] Figure 13 is a schematic diagram of the structure of an electronic device provided in an exemplary embodiment of this application. Detailed Implementation
[0059] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0060] The terms "first," "second," "third," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.
[0061] Please refer to Figure 1 below, which exemplarily illustrates a structural schematic diagram of a printing device provided in an embodiment of this application. As shown in Figure 1, 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. Wherein:
[0062] The aforementioned printing device 100 can be a wire marking machine, which can be used, but is not limited to, to print characters on materials such as PVC tubing, heat shrink tubing, and self-adhesive labels. Examples include, but are not limited to, stand-alone wire marking machines, online wire marking machines, and Bluetooth wire marking machines. Its working principle is mainly based on thermal printing technology, where heating the thermal paper produces a chemical reaction, thereby displaying text or images. The wire marking machine uses thermal paper as the printing medium; its thermal coating is heat-sensitive and changes color when exposed to heat. When the print head 130 of the wire marking machine is heated, the thermal paper changes color, thus forming the desired text or image.
[0063] The controller 110 is the brain of the printing device 100. It 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 and cutter 140 to work together to complete the printing task according to the control signals.
[0064] Specifically, after the target length of the filament to be printed is completed, 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 pauses printing, and the end of the filament to be printed 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 cutting action on the end of the filament to be printed corresponding to the target length; 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.
[0065] The stepper motor 120 is mainly responsible for driving the precise movement of components such as the print head 130 and the mechanical transmission mechanism. It is typically composed of components such as a stator, rotor, and driver, and has a simple structure that is easy to maintain. In this embodiment, the rotation of the stepper motor 120, after passing through the mechanical transmission mechanism, can drive the rubber roller to rotate, which in turn drives the tubing to move.
[0066] The printhead 130 is one of the core components of the printing device 100. It is responsible for transferring printing materials such as ink or toner onto the printing tube to form text, images, or charts. Depending on the printing technology, the structure and working principle of the printhead 130 may vary, and this embodiment does not limit this.
[0067] The cutter 140 is used to perform precise cutting actions according to the instructions of the controller 110, such as cutting the printing material (e.g., the test tube to be printed) to the required length after printing is completed.
[0068] Understandably, the aforementioned printing device 110 may also include, but is not limited to, one or more buttons, displays, indicator lights, etc.
[0069] It is understood that the cutting blade printing method provided in this application embodiment can be executed by the controller 110 of the printing device 100, or by the controller 110 of the printing device 100 and a terminal that is communicatively connected to the printing device 100. This application embodiment does not limit this.
[0070] For example, in the online numbering machine printing scenario, after each section of tubing is printed, a cutting action needs to be performed on the tubing. However, since the cutter and the print head are not in the same position, as shown in Figure 2, after the current section of tubing is printed (i.e., the target length L1 of the tubing to be printed is completed), it needs to continue printing a distance forward according to the printing direction shown in Figure 2 (this distance is the distance L2 between the print head 130 and the cutter 140) to the cutter position before the cutting action can be performed. At this time, the cutter 140 is aligned with the tail (end) of the printed tubing and is ready to perform the cutting action, while the print head 130 is aligned with the tubing currently being printed and performs the printing action. When performing the cutting action, the printing action must be stopped and the cutting action must be completed before printing can continue. This causes the tubing that could have been printed smoothly in one go to go through the action of pausing printing and then resuming printing. The stepper motor controlling the printing action also has to go through the action of stopping and then starting.
[0071] In related technologies, printing needs to be paused before the cutting action is performed. Often, the stepper motor controlling the printhead stops rotating directly during the process. This can cause the stepper motor to fail to stop rotating in time due to inertia, resulting in overshoot. When printing resumes, the position of the printhead has changed relative to its position when it stopped, causing misalignment of the printed content.
[0072] Based on this, this application provides a cutting tool printing method. When printing is paused and the cutting action is to be initiated, the stepper motor is gradually decelerated and stopped by controlling it. This makes the stepper motor stop more smoothly and avoids the problem of misalignment when printing is restarted due to overshoot caused by the sudden stop of the stepper motor. While ensuring the accuracy and aesthetics of the cutting action, it also ensures the accuracy, continuity and integrity of the cutting tool printing.
[0073] Next, referring to Figures 1 and 2, an exemplary embodiment of the present application provides a cutting tool printing method. Specifically, please refer to Figure 3, which exemplarily illustrates a flowchart of a cutting tool printing method provided in an embodiment of the present application. As shown in Figure 3, the cutting tool printing method includes the following steps:
[0074] S301: After the target length of the tube to be printed is completed, the stepper motor of the printing device is controlled to gradually decelerate until it stops rotating according to the 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.
[0075] Specifically, after the target length (i.e., the preset length to be printed) of the tube to be printed is completed, the stepper motor speed can be gradually reduced according to the preset deceleration method until it comes to a complete stop. This process is smooth and controlled, ensuring that the end of the tube to be printed, after the target length has been printed, will not experience positional deviation or damage due to a sudden stop when approaching the cutter position. That is, as the stepper motor stops, the print head also pauses the printing action simultaneously. At this time, the end of the tube to be printed corresponding to the target length is exactly aligned with the cutter position of the printing device, ready for the subsequent cutter action.
[0076] Optionally, the process of controlling the stepper motor of the printing device to gradually decelerate to stop rotating according to the preset deceleration method in S301 may include, but is not limited to, controlling the transmission frequency of the corresponding drive signal of the printing device to gradually decrease to 0 according to the preset deceleration method, so as to control the stepper motor of the printing device to gradually decelerate to stop rotating according to the preset deceleration method.
[0077] Optionally, in the above-mentioned S301, after the target length of the tube to be printed is completed, the process of controlling the stepper motor of the printing device to gradually decelerate until it stops rotating according to a preset deceleration method may include, but is not limited to, the following: after the target length of the tube to be printed is completed, when the distance between the end of the tube to be printed corresponding to the target length and the cutting position of the printing device reaches a preset distance (for example, but not limited to, the end of the printed target length tube is still 5mm away from the cutting position), 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. That is, during the deceleration period from the start of deceleration to the stop, the stepper motor needs to be controlled to drive the tube to be printed to move forward exactly a preset distance to ensure that when the stepper motor stops rotating, the end of the tube to be printed corresponding to the target length is exactly aligned with the cutting position of the printing device, thus ensuring the accuracy and effectiveness of the cutting. The aforementioned 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 length of the tube to be printed has been printed, avoiding the problem of the stepper motor being controlled to decelerate prematurely before the target length of the tube to be printed has been printed, which would affect the normal printing efficiency.
[0078] Optionally, the aforementioned preset deceleration methods may include, but are not limited to, at least one of the following: uniform deceleration, exponential deceleration, sinusoidal deceleration, parabolic deceleration, logarithmic deceleration, and multi-stage deceleration.
[0079] S302, control the cutter of the printing device to perform a cutting action at the end of the target segment length of the tube to be printed.
[0080] Specifically, after the end of the tube to be printed, corresponding to the target length of the printed segment, is aligned with the cutter position, the printing device can be controlled to activate the cutter, align it with the end of the tube to be printed, corresponding to the target length of the printed segment, and perform a cutting action to complete the cutting of the tube to be printed, corresponding to the target length of the printed segment.
[0081] S303 controls the stepper motor to resume rotation and the print head to resume printing after the cutting action is completed.
[0082] Specifically, after the cutting action is completed, the stepper motor can be restarted to continue rotating at an appropriate speed. At the same time, the print head resumes printing and continues printing on the next target length of the tubing.
[0083] In this embodiment, after the target length of the filament 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 pauses printing, and the end of the filament to be printed 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 cutting action on the end of the filament to be printed corresponding to the target length. 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 paused and the cutting action is to be initiated, this application controls the stepper motor to decelerate slowly to a stop, so that the stepper motor stops more smoothly. This avoids the problem of misalignment when printing is restarted due to overshoot caused by the sudden stop of the stepper motor. It ensures that the position of the filament when printing is resumed after cutting is consistent with the position when it stopped before cutting, and the printed content will not be misaligned. In other words, while ensuring the accuracy and aesthetics of the cutting action, it also ensures the accuracy, continuity and integrity of the cutting printing.
[0084] In related technologies, after printing is paused, while waiting for the cutter action to complete, the base temperature of the print head will continue to drop because the print head is no longer heated. When printing resumes, the low base temperature of the print head results in a lighter print density, making the print content less smooth.
[0085] Based on this, this application proposes a method for resuming printing after the cutting action is completed, as shown in Figure 4, specifically S303 above. The implementation process of controlling the stepper motor to resume rotation and controlling the print head to resume printing after the cutting action is completed may include, but is not limited to:
[0086] S401 preheats the print head after the cutting action is completed.
[0087] Specifically, when resuming printing after the cutting action is completed, the print head is preheated to a temperature close to that before the pause, thus shortening the temperature difference between the print head at the time of resumption and before the pause. At this point, the print density is almost identical to that before the pause, resulting in smooth print transitions.
[0088] Optionally, the process of preheating the printhead in S401 above may include, but is not limited to, the following: heating the printhead for an initial heating time within one initial printing cycle before printing resumes, wherein the initial printing cycle includes an initial heating time and an initial cooling time; and entering a heating cycle (initial printing cycle) in advance after the cutter action is completed and before printing resumes, i.e., starting heating in advance to raise the base temperature of the printhead and shorten the temperature difference between the printhead at the time of resumption of printing and before printing was paused; or, continuously heating the printhead for a target preheating time within N initial printing cycles before printing resumes, wherein the target preheating time is less than the initial heating time. N is a positive integer greater than 1, such as, but not limited to, 5 or 10. That is, after the cutting action is completed and before printing resumes, the print head is continuously heated for a short period of time to make the print head temperature rise slowly. 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 heating time of 100us (10% of the normal initial heating time) continuously applied to the print head, so that the base temperature of the print head rises slowly. This achieves the preheating effect while avoiding the problem of the print head being burned due to the print head being heated for the initial heating time of the normal initial printing cycle even though the print line tube has not moved.
[0089] S402 controls the stepper motor to resume rotation and the print head to resume printing after the print head has finished preheating.
[0090] Specifically, after the printhead preheats, the stepper motor can be controlled to continue rotating according to the normal first initial stepping cycle before the cutter, so as to drive the line tube to be printed to continue moving forward, and the printhead can be controlled to continue printing according to the normal initial printing cycle before the cutter, so as to ensure that the print density of the printhead after printing resumes is consistent with the print density before the cutter.
[0091] In an online numbering machine printing scenario, each rotation of the stepper motor moves the printing tube forward by one pixel, and then heating is activated to print one row of pixels. When printing resumes, the stepper motor controlling the printing tube moves from a stopped state to a rotating state. The rotation of the stepper motor drives the printing roller to rotate through the mechanical transmission mechanism, which in turn drives the printing tube to move. Due to a certain lag in the mechanical transmission mechanism, the printing roller cannot immediately follow the rotation of the stepper motor. If printing heating is activated directly at this time, the printing tube cannot move forward by one pixel due to the lag in the rotation of the printing roller, which will cause the printed content to be compressed.
[0092] Based on this, in this embodiment, after the cutting action is completed, the stepper motor can be controlled to rotate a preset number of steps in advance before the print head resumes printing. That is, when resuming printing, the stepper motor is controlled to rotate a preset number of steps in advance to eliminate the lag time of the mechanical transmission mechanism. Heating is then turned on only after the glue roller starts to move the tubing, thereby eliminating the compression of the printed content when printing resumes after the cutting action.
[0093] In some possible embodiments, after the stepper motor controlling the printing tube stops, it is not energized and cannot provide torque to lock the tube. During the cutting process, the tube may slightly shift due to external forces, leading to misalignment of the printed content. Therefore, this embodiment applies a holding torque to the stepper motor after it gradually decelerates to a stop according to a preset deceleration method, and before it resumes rotation, to lock the tube position and prevent displacement of the tube due to external forces during the cutting process. This ensures that the printed content is not misaligned, guaranteeing both cutting accuracy and stability, as well as the accuracy and printing quality after printing resumes.
[0094] In some possible embodiments, during the printing process, the tube to be printed undergoes elastic deformation under stress. After printing is paused, this elastic deformation is released. When printing resumes, the position of the tube relative to the paused position changes due to the release of elastic deformation, causing misalignment of the printed content. Based on this, in this embodiment, after controlling the stepper motor of the printing device to gradually decelerate to a stop according to a preset deceleration method, the print head is controlled to print at the deformed position of the tube in one first target printing cycle after the print head has paused printing for a preset duration. Then, after the cutter action is completed, the stepper motor is controlled to resume rotation and the print head is controlled to resume normal printing. The aforementioned deformed position is the position adjacent to and following the paused printing position of the corresponding tube when the print head paused printing. The preset duration is the time required for the tube to release its deformation. The preset duration can vary depending on the material type of the tube; for example, but not limited to, 10ms, 100ms, 50ms, etc.
[0095] In this embodiment, after the stepper motor stops rotating and printing is paused, a delay of a certain period of time (preset duration) is made to ensure that the elastic deformation of the tube to be printed is fully released before heating is restarted (the first target printing cycle, i.e., the normal initial printing cycle before printing is paused). This allows the content to be printed at the position of the tube where the elastic deformation has been released, ensuring that the printed content is not misaligned when printing resumes after the pause. In other words, after the elastic deformation of the tube to be printed is fully released, the previously printed position (i.e., the tube position when printing is paused) will be pushed forward one step. In this embodiment, printing will be restarted to print the position after the elastic deformation of the tube has been released (i.e., the deformed position). This is equivalent to the original printed position (the tube position at the time of the pause) having been moved forward. After the elastic deformation of the tube is released after the pause, the content is printed at the unprinted deformed position that the print head is currently aligned with. This ensures that when the stepper motor resumes rotation and drives the tube to be printed to move again, the print head can directly continue printing from the position after the deformed position, avoiding the problem of missing the deformed position from printing.
[0096] In online number printing scenarios, the single-step cycle (the time it takes to rotate one step, i.e., the stepping cycle) of the stepper motor controlling the print head is equal to a single heating cycle (i.e., the printing cycle). When printing is paused, the stepper motor decelerates, and its speed decreases, resulting in a longer single-step cycle and a correspondingly longer single heating cycle. A single heating cycle equals the heating time plus the cooling time. With the heating time remaining constant, a longer heating cycle is equivalent to a longer cooling time. This will cause the print density of the print head to become increasingly faint during the stepper motor deceleration, resulting in less smooth printing.
[0097] Based on this, this application proposes a method for controlling the print head during stepper motor deceleration, as shown in Figure 5. The control flow of the print head during stepper motor deceleration may include, but is not limited to, the following:
[0098] S501 determines the heating compensation duration of the printhead based on the first target stepping cycle corresponding to the stepper motor during the control of stepper motor deceleration.
[0099] Specifically, the aforementioned first target step cycle characterizes the time required for the stepper motor to rotate one step during deceleration. During stepper motor deceleration, the stepper motor's rotational speed varies, resulting in different corresponding first target step cycles. During stepper motor deceleration, the first target step cycle can be obtained by reading or calculating the stepper motor's deceleration process, and then the printhead heating compensation time can be determined based on this first target step cycle. The heating compensation time refers to the duration during which the printhead heating time needs to be adjusted to maintain print quality during stepper motor deceleration.
[0100] S502, adjust the initial heating time of the print head in the initial printing cycle according to the heating compensation time to obtain the first target printing cycle.
[0101] Specifically, the aforementioned first target printing cycle is equal to the first target stepping cycle. The initial printing cycle refers to the time required for the print head to complete one line of printing under normal operating conditions; this time includes heating and cooling time. During stepper motor deceleration, the first target stepping 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 first target printing cycle is equal to the first target stepping cycle of the stepper motor. This ensures that the print head's movement remains synchronized with the stepper motor's stepping during deceleration, preventing a decrease in print quality.
[0102] Optionally, during the stepper motor deceleration, the first target stepping cycle increases as the stepper motor speed decreases; the initial printing cycle includes the initial heating time and the initial cooling time, and the first target printing cycle includes the target heating time and the target cooling time; during 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 always kept within a preset range, thereby ensuring that the print density of the print head does not change significantly before and after the stepper motor deceleration, ensuring both printing continuity and print quality.
[0103] S503 controls the print head to print according to the first target printing cycle.
[0104] Specifically, during the stepper motor deceleration, after obtaining the adjusted first target printing cycle corresponding to each first target step cycle, while controlling the stepper motor to slowly move the printable tube according to the first target step cycle, the print head is also controlled to print according to the corresponding adjusted first target printing cycle. Since the first target printing cycle is already matched with the first target step cycle of the stepper motor, it can be ensured that the print head movement is synchronized with the motor's stepping during the stepper motor deceleration. This not only improves print quality but also avoids the problem of print head movement lagging or leading due to stepper motor deceleration.
[0105] In some possible embodiments, the process of controlling the stepper motor to resume rotation and the print head to resume printing after the cutting action is completed in step 303 may include, but is not limited to, controlling the stepper motor to resume rotation according to a first initial step cycle and controlling the print head to resume printing according to an initial printing cycle, thereby ensuring that the print density and print quality of the print head remain unchanged before and after the cutting action. The first initial step cycle is used to characterize the time required for the stepper motor to rotate normally one step when printing the target length of the tube to be printed, and the first initial step cycle is equal to the initial printing cycle.
[0106] Next, please refer to Figure 6, which exemplarily illustrates a flowchart of another blade printing method provided in an embodiment of this application. As shown in Figure 6, the blade printing method includes the following steps:
[0107] S601, after the target length of the printed tube has been printed, controls the stepper motor of the printing equipment to gradually decelerate according to the preset deceleration method.
[0108] Specifically, after the target length of the tube to be printed (i.e., the preset length to be printed) has been printed, the speed of the stepper motor can be slowly reduced according to the preset deceleration method. This avoids overshoot caused by the stepper motor stopping suddenly, which could lead to misalignment when printing is restarted. This ensures that the position of the tube when printing resumes after the cutter is in the same position as when the cutter stopped, and that the printed content will not be misaligned. In other words, while ensuring the accuracy and aesthetics of the cutter's action, it also ensures the accuracy, continuity, and integrity of the cutter printing.
[0109] S602, during the control of stepper motor deceleration, dynamically adjusts the initial heating duration in the initial printing cycle corresponding to the print head according to the first target stepping cycle corresponding to the stepper motor.
[0110] Specifically, the implementation process of S602 above can be referred to S501-S503, and will not be repeated here. By dynamically adjusting the initial heating duration in the initial printing cycle according to the first target stepping cycle corresponding to the stepper motor deceleration period, it can be ensured that the print head movement can remain synchronized with the stepper motor's stepping during the stepper motor deceleration process, while the print density will not change, thus avoiding a decrease in print quality.
[0111] S603, the stepper motor stops rotating, the print head of the printing device pauses printing, and when the end of the print line corresponding to the target length is aligned with the cutter position of the printing device, a holding torque is applied to the stepper motor.
[0112] Specifically, the embodiments of this application can lock the position of the tube to prevent the tube to be printed from shifting due to external forces during the cutting process, so that the printed content will not be misaligned. While ensuring the accuracy and stability of the cutting blade, it also ensures the accuracy and printing effect of resuming printing after cutting.
[0113] S604: After the printhead pauses printing for a preset duration, the printhead is controlled to print at the deformed position of the tube to be printed in a first target printing cycle.
[0114] Specifically, in this embodiment, after the stepper motor stops rotating and printing is paused, a delay of a certain period of time (preset duration) is made to ensure that the elastic deformation of the tube to be printed is fully released before heating is started again (the first target printing cycle, i.e. the normal initial printing cycle before printing is paused). This allows the content to be printed at the position of the tube to be printed where the elastic deformation has been released, so that the printed content is no longer misaligned when printing is resumed after the pause.
[0115] S605 controls the cutter of the printing device to perform a cutting action at the end of the target segment length of the tube to be printed.
[0116] Specifically, the implementation process of S605 above can be referred to S302, and will not be repeated here.
[0117] S606 preheats the print head after the cutting action is completed.
[0118] Specifically, S606 is the same as S401, and will not be repeated here.
[0119] S607 controls the stepper motor to resume rotation and the printhead to resume printing after the printhead has finished preheating.
[0120] Specifically, S607 is the same as S402, and will not be repeated here. In this embodiment, when preparing to resume printing after the cutting action is completed, the print head can be preheated to raise its base temperature to near the temperature before the pause, thus shortening the temperature difference between the print head at the time of resumption and before the pause. This ensures that the print density is almost identical to the print density before the pause, resulting in smooth printing content transitions.
[0121] Next, referring to Figure 1, we will introduce a pre-printing calibration method included in the cutter printing method provided in an exemplary embodiment of this application. Specifically, please refer to Figure 7, which exemplarily illustrates a flowchart of a printing calibration method provided in an embodiment of this application. As shown in Figure 7, the printing calibration method includes the following steps:
[0122] S701, obtain the target printing calibration coefficient corresponding to the tube to be printed. The target printing calibration coefficient is the stretching and compression ratio between the actual length of the tube after printing and the theoretical length before printing.
[0123] Optionally, when a user finds that the actual printed length of the tube to be printed deviates, such as the printed tube being compressed or stretched compared to before printing, the user can, based on experience, input the target printing calibration coefficient corresponding to the tube to be printed into the printing device through the display screen or buttons of the printing device.
[0124] Optionally, as shown in Figure 8, the process of obtaining the target printing calibration coefficient corresponding to the duct to be printed in step S701 above may include, but is not limited to, the following steps:
[0125] S801, according to the second target printing cycle and the second initial stepping cycle, controls the printing device to print a section of the theoretical length of the tube to be printed, and obtains a section of the test tube.
[0126] Specifically, in line-number printing scenarios, the printed image content is printed pixel by pixel. After printing one line of image content, a stepper motor rotates, moving the tube forward one pixel's distance, and then the next line of image content is printed. All lines of image content are printed to form a complete image. The time required to print one line of image content is the printing cycle, and the time required for the stepper motor to move the tube forward one pixel's distance is the stepping cycle. Normally, the printing cycle and the stepping cycle are equal. That is, printing is initiated once per printing cycle, and the stepper motor moves the tube one pixel's distance per stepping cycle. The printing cycle and the stepping cycle are synchronized (starting and ending simultaneously) to complete the printing of one pixel. In this case, the ratio of the printing cycle to the stepping cycle is 1.0. For example, if printing a 10mm long tube takes 1 second, and the printing cycle is executed 100 times, the printing cycle = 1 / 100 = 0.01s. Similarly, the corresponding stepping cycle also needs to be executed 100 times, with a stepping cycle = 1 / 100 = 0.01s. In other words, during the testing phase, the second initial stepping cycle used to print a section of the theoretically long tubing to be printed is equal to the second target printing cycle. The theoretical length refers to the length of the tubing to be printed before printing during the testing phase; it can also be understood as the target length of the tubing to be printed during the testing phase. During the testing phase, the print head of the printing device can be controlled to print according to the second target printing cycle, and the stepper motor of the printing device can be controlled to move the tubing to be printed forward according to the second initial stepping cycle, which is equal to the second target printing cycle, until a section of the theoretically long tubing to be printed is completed, resulting in a printed test tubing.
[0127] S802, obtain the actual length of the test conduit.
[0128] Optionally, the printing equipment may be equipped with a ranging component (e.g., but not limited to, a laser rangefinder). After printing a section of the theoretical length of the tube to be printed to obtain a section of the test tube, the printing equipment may, but is not limited to, use its ranging component to scan the section of the test tube to obtain the actual length of the test tube after printing.
[0129] Optionally, the printing device may also be equipped with an image acquisition component (e.g., but not limited to, a camera). After printing a section of the theoretical length of the test tube to be printed, the printing device may, but is not limited to, use its image acquisition component to acquire an image of the test tube and use image detection technology to detect the length of the test tube in the acquired image to obtain the actual length of the test tube after printing.
[0130] Optionally, after the printing device prints a section of test tubing of theoretical length, the user can use, but is not limited to, measuring tools (such as rulers, vernier calipers, etc.) to physically measure the printed test tubing to obtain its actual length, and input the actual length into the printing device through the display screen or buttons of the printing device or a terminal connected to the printing device.
[0131] S803 calculates the target printing calibration coefficient corresponding to the tube to be printed based on the actual length and theoretical length.
[0132] Specifically, after obtaining the actual length of the tube to be printed after printing and its theoretical length before printing, the stretching-compression ratio between the actual and theoretical lengths can be directly calculated to obtain the target printing calibration coefficient. This target printing calibration coefficient can be used to adjust the stepping cycle of the printing equipment to more accurately print the tube of the target length.
[0133] Understandably, the aforementioned target printing calibration coefficient can be the ratio between the actual length and the theoretical length, or it can be an adjustment factor calculated based on the difference between the actual length and the theoretical length. This application does not limit this.
[0134] In some possible embodiments, the process of obtaining the target printing calibration coefficient corresponding to the filament to be printed in S701 may include, but is not limited to, obtaining the target material type corresponding to the filament to be printed. For example, but not limited to, obtaining the model, specifications, and other information of the filament to be printed, and then querying the corresponding target material type through the above information; or directly receiving the target material type input by the user through the display screen or buttons of the printing device or a terminal connected to the printing device; or, but not limited to, using an image acquisition component to acquire an image of the filament to be printed, and using image detection technology to detect the material type of the filament to be printed in the acquired image to obtain the target material type corresponding to the filament to be printed. The above-mentioned target material type refers to the type of material used in the filament to be printed. Then, according to the above-mentioned target material type, a query is performed in a preset coefficient mapping relationship to obtain the corresponding target printing calibration coefficient. The above-mentioned preset coefficient mapping relationship is used to characterize the correspondence between the material type of the filament and the printing calibration coefficient. The above-mentioned preset coefficient mapping relationship may be, but is not limited to, a database or table used to store and query the correspondence between the filament material type and the printing calibration coefficient. With the development of new materials and printing technology, the above-mentioned preset coefficient mapping relationship can be updated regularly to ensure its accuracy and applicability. The aforementioned printing calibration coefficients are predetermined coefficients used to correct errors caused by differences in material type and liner movement during the printing process.
[0135] In this embodiment, the target printing calibration coefficient of the duct to be printed can be obtained quickly and accurately by querying the target material type of the duct through a preset coefficient mapping relationship, thereby improving printing efficiency and accuracy.
[0136] Understandably, the target material types corresponding to the above-mentioned ducts to be printed are different, and their corresponding target printing calibration coefficients are different. This allows for differentiated printing calibration based on the target material type of the duct to be printed, improving the targeting and accuracy of printing calibration, and thus further enhancing the printing effect.
[0137] In some possible embodiments, the process of obtaining the target printing calibration coefficient corresponding to the duct to be printed in S701 may include, but is not limited to, obtaining the target printing calibration coefficient corresponding to the duct when a change in the material type of the duct to be printed is detected. That is, the printing device may be equipped with a sensor to detect the material type of the duct to be printed. When a change in the material type of the duct to be printed is detected, i.e., when a new material type of duct needs to be printed, the acquisition of the target printing calibration coefficient corresponding to the duct can be automatically triggered. This allows the printing device to automatically adapt to the printing requirements of different material types without manual parameter adjustment, reducing printing errors caused by material differences and improving the flexibility, ease of use, and printing accuracy of the printing device.
[0138] Next, please refer to Figure 7. As shown in Figure 7, after obtaining the target printing calibration coefficient corresponding to the duct to be printed in step S701, the printing calibration method can also include, but is not limited to, the following:
[0139] S702, determine the second target step cycle corresponding to the printing device based on the target printing calibration coefficient.
[0140] Specifically, after obtaining the target print calibration coefficient, a second target stepping cycle can be calculated based on the obtained target print calibration coefficient. For example, but not limited to, adjusting the reference stepping cycle of the printing device based on the target print calibration coefficient to obtain the second target stepping cycle. The aforementioned reference stepping cycle is the rotation cycle of the stepper motor of the printing device under default settings, for example, but not limited to, the second initial stepping cycle used when testing the target print calibration coefficient.
[0141] In some possible embodiments, the aforementioned target printing calibration coefficient may be, but is not limited to, the stretching-compression ratio between the actual length of the duct to be printed after printing in the second target printing cycle and the theoretical length before printing in the second initial stepping cycle. The process of determining the second target stepping cycle corresponding to the printing device based on the target printing calibration coefficient in S702 may include, but is not limited to, adjusting the second initial stepping cycle according to the target printing calibration coefficient to obtain the second target stepping cycle corresponding to the printing device.
[0142] Optionally, the process of adjusting the second initial step cycle according to the target printing calibration coefficient to obtain the second target step cycle corresponding to the printing device may include, but is not limited to, the following:
[0143] When the target print calibration coefficient is less than 1, as shown in Figure 9A, it indicates that the actual length of the printed tube is less than the theoretical length before printing, resulting in compression. Therefore, the second initial step cycle needs to be reduced to a multiple of the target (i.e., the target print calibration coefficient) to obtain the second target step cycle corresponding to the printing device. This allows one second target print cycle to contain more step cycles, thus lengthening the printed content to compensate for the compression. For example, ideally, printing a 100mm long tube requires 1000 second target print cycles T1 = second initial step cycles T2, with one second initial step cycle corresponding to a tube movement of 0.1mm. During the testing phase, if the theoretical length is 100mm and the actual length is 95mm, a compression phenomenon occurs in the printed length. In one second initial step cycle, the actual distance the stepper motor moves the tube is less than the distance of one row of pixels. That is, without calibration, after 1000 second initial step cycles, the actual printed tube length is 95mm, meaning the tube only moves 0.095mm in one second initial step cycle. If the ratio of the second target printing cycle to the step cycle remains 1.0 (i.e., the second target printing cycle and the second target step cycle are equal), the actual printed length after one second target printing cycle is... If the distance is less than one row of pixels, the target printing calibration coefficient P1 = 0.95 can be determined. After performing the above segment length calibration according to the target printing calibration coefficient, a 100mm long tube is printed. The second target printing cycle is executed 1000 times. The second target step cycle is executed 1000 / 0.95 times because it is reduced to 0.95 times of the initial printing cycle. The length of the tube moved by each second target step cycle is 0.095mm. Therefore, the actual total printed length of the tube in the 1000 / 0.95 second target step cycles is L = (1000 / 0.95) × 0.095 = 100mm, thus achieving the printing segment length calibration.
[0144] When the target print calibration factor is greater than 1, as shown in Figure 9B, the actual length of the printed tube is greater than the theoretical length before printing, indicating a stretching phenomenon in the actual printed length. Therefore, the second initial step cycle needs to be increased to the target multiple (i.e., the target print calibration factor) to obtain the second target step cycle corresponding to the printing device. This allows for fewer step cycles within one second target print cycle during printing, compressing the printed content to compensate for the stretching. For example, if the theoretical length is 100mm and the actual length is 105mm, the printed length will stretch. In one second initial step cycle, the stepper motor will move the tube a distance greater than the distance of one row of pixels. That is, without calibration, if the stepper motor steps for 1000 second initial step cycles, the actual printed tube length is 105mm, but in one second initial step cycle, the tube only moves 0.105mm. If the ratio of the second target print cycle to the step cycle remains 1.0 (i.e., the second target print cycle and the second target step cycle are equal), then after one second target print cycle, the actual printed length will be greater than the distance of one row of pixels. Based on the distance, the target printing calibration coefficient P1 = 105 / 100 = 1.05 can be determined. After performing the above segment length calibration according to the target printing calibration coefficient, a 100mm long tube is printed. The second target printing cycle is executed 1000 times. The second target step cycle is executed 1000 / 1.05 times because it is increased to 1.05 times the initial printing cycle. The length of the tube moved by each second target step cycle is 0.105mm. Therefore, the actual total printed length of the tube in the second target step cycle of 1000 / 1.05 times is L = (1000 / 1.05) × 0.105 = 100mm, thus achieving the printing segment length calibration.
[0145] Optionally, as shown in Figure 10A, under ideal printing conditions, the ratio between the second target printing cycle T1 and the second initial stepping cycle T2 used by the printing device is 1. In this case, accurate segment length printing can be achieved without calibration. However, when the actual printed length exhibits compression, after printing calibration, as shown in Figure 10B, due to the reduced stepping cycle, the ratio between the second target printing cycle T1 and the adjusted second target stepping cycle T3 will be greater than 1. Conversely, when the actual printed length exhibits stretching, after printing calibration, as shown in Figure 10C, due to the increased stepping cycle, the ratio between the second target printing cycle T1 and the adjusted second target stepping cycle T3 will be less than 1. The aforementioned second target printing cycle includes heating time t1 and cooling time t2. Different ratios between heating time t1 and cooling time t2 result in different printing densities corresponding to the print head. To maintain a constant printing density on the tube before and after calibration, the ratio between the heating time and cooling time corresponding to the print head will remain unchanged before and after adjusting the second initial stepping cycle, thereby ensuring the printing effect on the tube while calibrating the actual printing length.
[0146] In some possible embodiments, the process of determining the second target stepping cycle corresponding to the printing device based on the printing calibration coefficient in S702 above may include, but is not limited to, calculating the product between the second target printing cycle and the target printing calibration coefficient to obtain the second target stepping cycle corresponding to the printing device. For example, when the target printing calibration coefficient under the second target printing cycle T1 is P1, the calibrated second target stepping cycle T3 = T1 × P1 can be calculated.
[0147] S703 controls the print head of the printing device to print according to the second target printing cycle, and controls the stepper motor of the printing device to drive the line tube to be printed to move forward according to the second target stepping cycle.
[0148] Specifically, after determining the second target step cycle, the printer's controller will control the print head's printing operation according to the second target print cycle, and simultaneously control the stepper motor's rotation according to the second target step cycle, thereby driving the printable line tube forward at an appropriate speed and step size. The control of the print head and stepper motor is performed synchronously to ensure printing accuracy and continuity.
[0149] In this embodiment, the stepping cycle of the stepper motor that drives the tube to be printed forward is adjusted by using the stretching and compression ratio between the actual length of the tube after printing and the theoretical length before printing, i.e., the target printing calibration coefficient corresponding to the tube. This adjusts the compression or stretching amount of the tube during printing, compensating for the compression or stretching during the printing process. This solves the problem of the actual printed tube length being too long or too short in tube printing scenarios, achieving segment length calibration, improving the accuracy and reliability of the printed segment length, and enabling the printing equipment to be applicable to more types of tube printing needs.
[0150] Next, please refer to Figure 11, which exemplarily illustrates the implementation process of a printing calibration method provided in this application embodiment. As shown in Figure 11, when the user manually triggers or the printing device automatically triggers segment length calibration (printing calibration), after the printing device starts segment length calibration (printing calibration), it can directly query the target printing calibration coefficient of the to-be-printed tube according to the target material type corresponding to the obtained tube through a preset coefficient mapping relationship. Alternatively, the printing device can first print a theoretical length of the to-be-printed tube, then measure the actual length of the tube after printing, and calculate the target printing calibration coefficient of the to-be-printed tube based on the actual length and the theoretical length. Then, a second target stepping cycle can be determined based on the target printing calibration coefficient, but not limited to, referring to a process similar to S702. Finally, the print head of the printing device is controlled to print according to the second target printing cycle. At the same time, the stepper motor of the printing device is controlled to move the to-be-printed tube forward according to the second target stepping cycle to complete the segment length calibration and achieve more accurate printing.
[0151] Next, please refer to Figure 12, which is a structural schematic diagram of a cutting blade printing device provided in an embodiment of this application. As shown in Figure 12, the cutting blade printing device 1200 includes:
[0152] The first control module 1210 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.
[0153] The second control module 1220 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.
[0154] The third control module 1230 is used to control the stepper motor to resume rotation and the print head to resume printing after the cutter action is completed.
[0155] In one possible implementation, the first control module 1210 is specifically used to: control the transmission 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 to stop rotating according to the preset deceleration method.
[0156] In one possible implementation, the first control module 1210 is specifically used to: after the target length of the tube to be printed is printed, 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, control the stepper motor of the printing device to gradually decelerate until it stops rotating according to a preset deceleration method.
[0157] 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.
[0158] In one possible implementation, the above-mentioned cutter printing device 1200 further includes:
[0159] The fourth control module is used to apply a holding torque to the stepper motor to lock the position of the conduit.
[0160] In one possible implementation, the above-mentioned cutter printing device 1200 further includes:
[0161] The first determining module is used to determine the heating compensation duration of the print head based on the first target stepping cycle corresponding to the stepper motor during the deceleration control of the stepper motor; the first target stepping cycle is used to characterize the time required for the stepper motor to rotate one step during the deceleration.
[0162] The 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 mentioned above, so as to obtain a first target printing cycle; the first target printing cycle is equal to the first target stepping cycle.
[0163] The fifth control module is used to control the print head to print according to the first target printing cycle.
[0164] In one possible implementation, during the control of the stepper motor deceleration, the first target stepping cycle increases as the stepper motor speed decreases; the initial printing cycle includes an initial heating time and an initial cooling time, and the first 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.
[0165] In one possible implementation, the third control module 1230 is specifically used for:
[0166] The stepper motor is controlled to resume rotation according to the first initial stepping cycle, and the print head is controlled to resume printing according to the first initial printing cycle; the first 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 first initial stepping cycle is equal to the first initial printing cycle.
[0167] In one possible implementation, the above-mentioned cutter printing device 1200 further includes:
[0168] The sixth control module is used to control the print head to print at the deformation position of the tube to be printed in a first target printing cycle after the print head has paused printing for a preset duration. The deformation position is a position adjacent to and after the pause printing position of the tube to be printed when the print head pauses printing.
[0169] In one possible implementation, the third control module 1230 includes:
[0170] The preheating unit is used to preheat the print head after the cutting action is completed.
[0171] The control unit is used to control the stepper motor to resume rotation and the print head to resume printing after the print head has finished preheating.
[0172] In one possible implementation, the preheating unit is specifically used for:
[0173] 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.
[0174] In one possible implementation, the third control module 1230 is specifically used for:
[0175] 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.
[0176] In one possible implementation, the above-mentioned cutter printing device 1200 further includes:
[0177] The acquisition module is used to acquire the target printing calibration coefficient corresponding to the tube to be printed; the target printing calibration coefficient is the stretching and compression ratio between the actual length of a section of the tube to be printed after printing and the theoretical length before printing.
[0178] The determination module is used to determine the second target stepping cycle corresponding to the printing device based on the aforementioned target printing calibration coefficient;
[0179] The seventh control module is used to control the print head of the printing device to print according to the second target printing cycle, and to control the stepper motor of the printing device to drive the tube to be printed to move forward according to the second target stepping cycle.
[0180] In one possible implementation, the above-mentioned acquisition module includes:
[0181] The control unit is used to control the printing device to print a section of the above-mentioned wire tube of theoretical length according to the second target printing cycle and the second initial step cycle, so as to obtain a section of test wire tube; the second initial step cycle is equal to the second target printing cycle.
[0182] The first acquisition unit is used to acquire the actual length of the aforementioned test conduit.
[0183] The calculation unit is used to calculate the target printing calibration coefficient corresponding to the above-mentioned printing tube based on the above-mentioned actual length and the above-mentioned theoretical length.
[0184] The aforementioned determining module is specifically used to: adjust the aforementioned second initial stepping cycle according to the aforementioned target printing calibration coefficient, so as to obtain the aforementioned second target stepping cycle corresponding to the printing device.
[0185] In one possible implementation, the determining module is specifically used to: reduce the second initial stepping period to a target multiple when the target printing calibration coefficient is less than 1, to obtain a second target stepping period corresponding to the printing device; and increase the second initial stepping period to the target multiple when the target printing calibration coefficient is greater than 1, to obtain a second target stepping period corresponding to the printing device; wherein the target multiple is the reciprocal of the target printing calibration coefficient.
[0186] In one possible implementation, the second target printing cycle includes heating time and cooling time; before and after the adjustment of the second initial stepping cycle, the ratio between the heating time and cooling time corresponding to the print head remains unchanged.
[0187] In one possible implementation, the determining module is specifically used to: calculate the product between the second target printing cycle and the target printing calibration coefficient to obtain the second target stepping cycle corresponding to the printing device.
[0188] In one possible implementation, the above-mentioned acquisition module includes:
[0189] The second acquisition unit is used to acquire the target material type corresponding to the tube to be printed.
[0190] The query unit is used to query the preset coefficient mapping relationship based on the target material type to obtain the corresponding target printing calibration coefficient; the preset coefficient mapping relationship is used to characterize the correspondence between the material type of the conduit and the printing calibration coefficient.
[0191] In one possible implementation, the acquisition module is specifically used to: when a change in the material type corresponding to the tube to be printed is detected, acquire the target printing calibration coefficient corresponding to the tube to be printed.
[0192] In one possible implementation, the target material types corresponding to the above-mentioned ducts to be printed are different, and the target printing calibration coefficients are different.
[0193] The division of modules in the above-described cutter printing device is for illustrative purposes only. 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 cutter printing device. The implementation of each module in the cutter printing device provided in the embodiments of this specification can be in the form of a computer program. This computer program can run on the printing device. The program modules constituted by this computer program can be stored in the memory of the printing device. When the computer program is executed by a processor, it implements all or part of the steps of the cutter printing method described in the embodiments of this specification.
[0194] Please refer to Figure 13 next, which shows a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in Figure 13, the electronic device 1300 may include: at least one processor 1310, a network interface 1320, a user interface 1330, a memory 1340, a printhead 1350, a stepper motor 1360, a cutter 1370, and at least one communication bus 13130.
[0195] The communication bus 13130 is used to realize the connection and communication between these components.
[0196] The network interface 1320 may include a Bluetooth module, a near-field communication module, a Wi-Fi module, etc.
[0197] The user interface 1330 may include a display screen and a camera; optionally, the user interface 1330 may also include a standard wired interface and a wireless interface.
[0198] The processor 1310 may include one or more processing cores. The processor 1310 connects to various parts of the electronic device 1300 through various interfaces and lines, and performs various functions of the electronic device 1300 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 1340, and calling data stored in the memory 1340.
[0199] The stepper motor 1360 is primarily responsible for driving the precise movement of components such as the print head 1350 and the mechanical transmission mechanism. It typically consists of a stator, rotor, and driver, and has a simple structure that is easy to maintain. In this embodiment, the rotation of the stepper motor 1360, after passing through the mechanical transmission mechanism, can drive the rubber roller to rotate, which in turn drives the tubing to move.
[0200] The printhead 1350 is one of the core components of the printing equipment. It is responsible for transferring printing materials such as ink or toner onto the printing tube to form text, images, or charts. The structure and working principle of the printhead 1350 vary depending on the printing technology, and this application embodiment does not limit this.
[0201] The cutter 1370 is used to perform precise cutting actions, such as cutting the printing material (e.g., the test tube to be printed) to the required length after printing is completed.
[0202] Optionally, the processor 1310 can be implemented using at least one hardware form selected from digital signal processing, field-programmable gate arrays, and programmable logic arrays. The processor 1310 can integrate one or more of a central processing unit, a graphics processor, and a modem. It is understood that the aforementioned modem may also not be integrated into the processor 1310 and can be implemented as a separate chip.
[0203] The memory 1340 may include random access memory (RAM) or read-only memory (ROM). The memory 1340 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, printhead control, etc.), and instructions for implementing the various method embodiments described above. The data storage area may store data involved in the various method embodiments described above. As shown in Figure 13, the memory 1340, as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
[0204] In some possible embodiments, the processor 1310 described above can be used to call program instructions stored in the memory 1340 and specifically execute the method steps provided in the above embodiments of this application.
[0205] 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 cutter 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.
[0206] 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.
[0207] 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 with a cutting tool, wherein, 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.
2. The method as described in claim 1, wherein, 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 of claim 1, wherein, 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, wherein, 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 of claim 1, wherein, 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 of claim 1, wherein, The method further includes: During the deceleration of the stepper motor, the heating compensation duration of the print head is determined according to the first target stepping cycle corresponding to the stepper motor; the first target stepping 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 a first target printing cycle; the first target printing cycle is equal to the first target step cycle; The print head is controlled to print according to the first target printing cycle.
7. The method of claim 6, wherein, During the deceleration of the stepper motor, the first target stepping cycle increases as the stepper motor speed decreases; the initial printing cycle includes an initial heating time and an initial cooling time, and the first 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.
8. The method of claim 6, wherein, 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 first initial stepping cycle, and the print head is controlled to resume printing according to the initial printing cycle; the first 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 first initial stepping cycle is equal to the initial printing cycle.
9. The method of claim 1, wherein, 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 first 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.
10. The method of claim 1, wherein, 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 print head preheating is completed, the stepper motor is controlled to resume rotation, and the print head is controlled to resume printing; or, 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.
11. The method of claim 10, wherein, 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.
12. The method of claim 1, wherein, The method further includes: Obtain the target printing calibration coefficient corresponding to the tube to be printed; the target printing calibration coefficient is the stretching and compression ratio between the actual length of a section of the tube to be printed after printing and the theoretical length before printing. The second target stepping cycle corresponding to the printing device is determined based on the target printing calibration coefficient; The printer head of the printing device is controlled to print according to the second target printing cycle, and the stepper motor of the printing device is controlled to drive the tube to be printed to move forward according to the second target stepping cycle.
13. The method of claim 12, wherein, The step of obtaining the target printing calibration coefficient corresponding to the duct to be printed includes: The printing device is controlled to print a section of the theoretical length of the tube to be printed according to the second target printing cycle and the second initial stepping cycle to obtain a test tube; the second initial stepping cycle is equal to the second target printing cycle; Obtain the actual length of the test conduit; Calculate the target printing calibration coefficient corresponding to the tube to be printed based on the actual length and the theoretical length; The step of determining the second target step cycle corresponding to the printing device based on the target printing calibration coefficient includes: The second initial stepping cycle is adjusted according to the target printing calibration coefficient to obtain the second target stepping cycle corresponding to the printing device.
14. The method of claim 13, wherein, The step of adjusting the second initial step cycle according to the target printing calibration coefficient to obtain the second target step cycle corresponding to the printing device includes: If the target printing calibration coefficient is less than 1, the second initial stepping cycle is reduced to the target multiple to obtain the second target stepping cycle corresponding to the printing device; If the target printing calibration coefficient is greater than 1, the second initial stepping cycle is increased to the target multiple to obtain the second target stepping cycle corresponding to the printing device; Wherein, the target multiple is the target printing calibration coefficient.
15. The method of claim 13, wherein, The second target printing cycle includes heating time and cooling time; before and after the second initial step cycle adjustment, the ratio between the heating time and cooling time corresponding to the print head remains unchanged.
16. The method of claim 12, wherein, The step of determining the second target step cycle corresponding to the printing device based on the target printing calibration coefficient includes: The second target printing cycle is calculated by multiplying the second target printing cycle with the target printing calibration coefficient to obtain the second target stepping cycle corresponding to the printing device.
17. The method of claim 12, wherein, The step of obtaining the target printing calibration coefficient corresponding to the duct to be printed includes: Obtain the target material type corresponding to the tube to be printed; The target printing calibration coefficient is obtained by querying the preset coefficient mapping relationship according to the target material type; the preset coefficient mapping relationship is used to characterize the correspondence between the material type of the conduit and the printing calibration coefficient.
18. The method of claim 12, wherein, The step of obtaining the target printing calibration coefficient corresponding to the duct to be printed includes: when it is detected that the material type corresponding to the duct to be printed by the printing device has changed, obtaining the target printing calibration coefficient corresponding to the duct to be printed.
19. The method according to any one of claims 12-18, wherein, The target material types corresponding to the tubes to be printed are different, and the target printing calibration coefficients are different.
20. A cutting blade printing device, wherein, The cutting and 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.
21. An electronic device, wherein, 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 19.
22. 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 19.