Printing calibration method and device, electronic equipment and computer storage medium
By adjusting the stepping cycle after obtaining the target printing calibration coefficient of the tube, the problem of length deviation during tube printing was solved, achieving higher printing accuracy and reliability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2026-03-24
AI Technical Summary
In the prior art, the length deviation of the tube due to elasticity during the printing process affects the accuracy and reliability of the printing.
By obtaining the target printing calibration coefficient of the tube to be printed, the stepping cycle of the stepper motor of the printing equipment is adjusted to ensure that the tube remains stable during the printing process, thus achieving segment length calibration.
This improves the accuracy and reliability of the printed section length, enabling the printing equipment to be suitable for a wider range of tube printing needs.
Smart Images

Figure CN119872090B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of printing technology, and in particular to a printing calibration method, apparatus, electronic device, and computer storage medium. Background Technology
[0002] In practical applications of printing equipment, especially in cable labeling in industries such as power, communications, and automation control, it is often necessary to print labels on conduits. Conduits, as a commonly used cable protection material, have characteristics such as elasticity and shrinkability. While these characteristics give conduits flexibility and adaptability in the installation and wiring process, they also bring challenges to the printing process of printing equipment.
[0003] Specifically, when a printer is printing, the tubing often needs to be stretched or bent according to the printer's guide path. Because the tubing itself has a certain degree of elasticity, if the tubing cannot maintain a stable state during the printing process, this stretching or bending may cause the actual length of the tubing during printing to deviate from the preset value. Summary of the Invention
[0004] This application provides a printing calibration method, apparatus, electronic device, and computer storage medium. By adjusting the stepping cycle of the stepper motor that drives the duct to be printed forward in the printing device through the target printing calibration coefficient corresponding to the duct to be printed, the problem of the actual printed duct length being too long or too short in the duct printing scenario is solved, the accuracy and reliability of the printed section length are improved, and the printing device can be applied to more types of duct printing needs.
[0005] In a first aspect, embodiments of this application provide a printing calibration method, the method comprising:
[0006] 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 to be printed after printing and the theoretical length before printing.
[0007] The target stepping cycle corresponding to the printing device is determined based on the above target printing calibration coefficients;
[0008] The printer head of the printing device is controlled to print according to the 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 target stepping cycle.
[0009] In one possible implementation, obtaining the target printing calibration coefficient corresponding to the duct to be printed includes:
[0010] The printing device is controlled to print a section of the above-mentioned tube of theoretical length according to the target printing cycle and the initial step cycle, so as to obtain a test tube; the initial step cycle is equal to the target printing cycle.
[0011] Obtain the actual length of the test conduit;
[0012] Calculate the target printing calibration coefficient corresponding to the above-mentioned actual length and theoretical length;
[0013] The above determination of the target stepping cycle corresponding to the printing device based on the target printing calibration coefficient includes:
[0014] The initial stepping cycle is adjusted based on the target printing calibration coefficient to obtain the target stepping cycle corresponding to the printing device.
[0015] In one possible implementation, adjusting the initial stepping cycle based on the target printing calibration coefficient to obtain the target stepping cycle corresponding to the printing device includes:
[0016] If the target printing calibration coefficient is less than 1, the initial stepping cycle is reduced to the target multiple to obtain the target stepping cycle corresponding to the printing device.
[0017] If the target printing calibration coefficient is greater than 1, the initial stepping period is increased to the target multiple to obtain the target stepping period corresponding to the printing device.
[0018] The aforementioned target multiple is the aforementioned target printing calibration coefficient.
[0019] In one possible implementation, the target printing cycle includes heating time and cooling time; before and after the initial stepping cycle adjustment, the ratio between the heating time and cooling time corresponding to the print head remains unchanged.
[0020] In one possible implementation, determining the target stepping cycle corresponding to the printing device based on the target printing calibration coefficient includes:
[0021] The target printing cycle is obtained by multiplying the target printing cycle and the target printing calibration coefficient.
[0022] In one possible implementation, obtaining the target printing calibration coefficient corresponding to the duct to be printed includes:
[0023] Obtain the target material type corresponding to the tube to be printed;
[0024] Based on the target material type mentioned above, a query is performed in the preset coefficient mapping relationship 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.
[0025] In one possible implementation, obtaining the target printing calibration coefficient corresponding to the duct to be printed includes:
[0026] 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.
[0027] 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.
[0028] Secondly, embodiments of this application provide a print calibration device, which includes:
[0029] 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.
[0030] The determination module is used to determine the target stepping cycle corresponding to the printing device based on the above-mentioned target printing calibration coefficient;
[0031] The control module is used to control the print head of the printing device to print according to the target printing cycle, and to control the stepper motor of the printing device to drive the line tube to be printed to move forward according to the target stepping cycle.
[0032] In one possible implementation, the above-mentioned acquisition module includes:
[0033] The control unit is used to control the printing device to print a section of the above-mentioned line tube of theoretical length according to the target printing cycle and the initial step cycle, so as to obtain a section of test line tube; the initial step cycle is equal to the target printing cycle.
[0034] The first acquisition unit is used to acquire the actual length of the aforementioned test conduit.
[0035] 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.
[0036] The aforementioned determining module is specifically used for:
[0037] The initial stepping cycle is adjusted based on the target printing calibration coefficient to obtain the target stepping cycle corresponding to the printing device.
[0038] In one possible implementation, the aforementioned determining module is specifically used for:
[0039] When the target printing calibration coefficient is less than 1, the initial stepping period is reduced to the target multiple to obtain the target stepping period corresponding to the printing device; when the target printing calibration coefficient is greater than 1, the initial stepping period is increased to the target multiple to obtain the target stepping period corresponding to the printing device; wherein, the target multiple is the target printing calibration coefficient.
[0040] In one possible implementation, the target printing cycle includes heating time and cooling time; before and after the initial stepping cycle adjustment, the ratio between the heating time and cooling time corresponding to the print head remains unchanged.
[0041] In one possible implementation, the aforementioned determining module is specifically used for:
[0042] The target printing cycle is obtained by multiplying the target printing cycle and the target printing calibration coefficient.
[0043] In one possible implementation, the above-mentioned acquisition module includes:
[0044] The second acquisition unit is used to acquire the target material type corresponding to the tube to be printed.
[0045] 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.
[0046] In one possible implementation, the above-mentioned acquisition module is specifically used for:
[0047] 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.
[0048] 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.
[0049] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory;
[0050] 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.
[0051] 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.
[0052] In this embodiment, a target printing calibration coefficient corresponding to the duct to be printed is obtained. The target printing calibration coefficient is the stretching and compression ratio between the actual length of the duct after printing and the theoretical length before printing. A target stepping cycle corresponding to the printing device is determined based on the target printing calibration coefficient. The print head of the printing device is controlled to print according to the target printing cycle, and the stepper motor of the printing device is controlled to drive the duct to be printed forward according to the target stepping cycle. Thus, the stepping cycle of the stepper motor that drives the duct to be printed forward in the printing device is adjusted by the target printing calibration coefficient corresponding to the duct, compensating for the compression or stretching of the duct during the printing process. This solves the problem of the duct length being too long or too short in the actual printing scenario, realizes segment length calibration, improves the accuracy and reliability of the printed segment length, and enables the printing device to be applicable to more types of duct printing needs. Attached Figure Description
[0053] 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.
[0054] Figure 1 A schematic diagram of the structure of a printing device provided for an exemplary embodiment of this application;
[0055] Figure 2 A schematic flowchart of a printing calibration method provided for an exemplary embodiment of this application;
[0056] Figure 3 A schematic diagram illustrating a process for obtaining target printing calibration coefficients, provided as an exemplary embodiment of this application;
[0057] Figure 4A A schematic diagram illustrating the printing effect when the target printing calibration coefficient is less than 1 before printing calibration, provided as an exemplary embodiment of this application;
[0058] Figure 4B A schematic diagram illustrating the printing effect when the target printing calibration coefficient is greater than 1 before printing calibration, provided as an exemplary embodiment of this application;
[0059] Figure 5AA schematic diagram of a target printing cycle and an initial stepping cycle provided for an exemplary embodiment of this application;
[0060] Figures 5B-5C A schematic diagram of the target printing cycle and target step cycle provided for an exemplary embodiment of this application;
[0061] Figure 6 A schematic diagram illustrating the overall implementation process of a printing calibration method provided for an exemplary embodiment of this application;
[0062] Figure 7 A schematic diagram of a printing calibration device provided for an exemplary embodiment of this application;
[0063] Figure 8 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation
[0064] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0065] 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.
[0066] Please refer to the following. Figure 1 The illustration shows a schematic diagram of the structure of a printing device provided in an embodiment of this application. Figure 1 As shown, the printing device 100 may include, but is not limited to, a controller 110, a stepper motor 120, and a printhead 130. Wherein:
[0067] The aforementioned printing equipment 100 can be a wire marking machine, which can be used, but is not limited to, for printing 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 of the wire marking machine is heated, the thermal paper changes color, thus forming the desired text or image.
[0068] 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 other components to work together to complete the printing task according to the control signals.
[0069] Specifically, when the controller 110 receives the print calibration command, it can first obtain the target print calibration coefficient corresponding to the tube to be printed. The target print calibration coefficient is the stretching and compression ratio between the actual length of the tube to be printed after printing and the theoretical length before printing. Then, it determines the target stepping cycle corresponding to the printing device 100 according to the target print calibration coefficient. Finally, it controls the print head 130 of the printing device 100 to print according to the target printping cycle, and controls the stepper motor 120 of the printing device 100 to drive the tube to be printed to move forward according to the target stepping cycle.
[0070] 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.
[0071] 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.
[0072] Understandably, the aforementioned printing device 110 may also include, but is not limited to, one or more buttons, a display screen, indicator lights, etc.
[0073] It is understood that the printing calibration 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.
[0074] Next, combine Figure 1 This application describes a printing calibration method provided by an exemplary embodiment. Please refer to [reference needed] for details. Figure 2 The example illustrates a flowchart of a printing calibration method provided in an embodiment of this application. Figure 2 As shown, this print calibration method includes the following steps:
[0075] S201, 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.
[0076] 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.
[0077] Optionally, such as Figure 3 As shown, the process of obtaining the target printing calibration coefficient corresponding to the tube to be printed in S201 above may include, but is not limited to, the following steps:
[0078] S301 controls the printing device to print a section of the theoretical length of the tube to be printed based on the target printing cycle and the initial stepping cycle, thus obtaining a section of the test tube.
[0079] 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 initial stepping cycle used to print a section of the theoretically required length of the tube to be printed is equal to the target printing cycle. The theoretical length refers to the length of the tube to be printed before printing during the testing phase; it can also be understood as the target length of the tube 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 target printing cycle, and the stepper motor of the printing device can be controlled to move the tube to be printed forward according to an initial stepping cycle equal to the target printing cycle, until a section of the theoretically required length of the tube is printed, resulting in a completed test tube.
[0080] S302, obtain the actual length of the test conduit.
[0081] 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.
[0082] 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.
[0083] 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.
[0084] S303 calculates the target printing calibration coefficient corresponding to the tube to be printed based on the actual length and theoretical length.
[0085] 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.
[0086] 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.
[0087] In some possible embodiments, the process of obtaining the target printing calibration coefficient corresponding to the duct to be printed in S201 may include, but is not limited to, obtaining the target material type corresponding to the duct to be printed. For example, but not limited to, obtaining the model, specifications, and other information of the duct 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 duct to be printed, and using image detection technology to detect the material type of the duct to be printed in the acquired image to obtain the target material type corresponding to the duct to be printed. The above target material type refers to the type of material used in the duct to be printed. Then, according to the above target material type, a query is performed in a preset coefficient mapping relationship to obtain the corresponding target printing calibration coefficient. The above preset coefficient mapping relationship is used to characterize the correspondence between the material type of the duct and the printing calibration coefficient. The above preset coefficient mapping relationship may be, but is not limited to, a database or table used to store and query the correspondence between the duct material type and the printing calibration coefficient. With the development of new materials and printing technology, the above 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.
[0088] 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.
[0089] 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.
[0090] In some possible embodiments, the process of obtaining the target printing calibration coefficient corresponding to the duct to be printed in S201 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.
[0091] Please continue to refer to the following. Figure 2 ,like Figure 2 As shown, after obtaining the target printing calibration coefficient corresponding to the tube to be printed in S201 above, the printing calibration method may also include, but is not limited to, the following:
[0092] S202, determine the target stepping cycle corresponding to the printing device based on the target printing calibration coefficient.
[0093] Specifically, after obtaining the target print calibration coefficient, the 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 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 initial stepping cycle used when testing the target print calibration coefficient.
[0094] In some possible embodiments, the target printing calibration coefficient can be, but is not limited to, the stretching-compression ratio between the actual length of the duct to be printed after printing under the target printing cycle and the initial stepping cycle and the theoretical length before printing. The process of determining the target stepping cycle corresponding to the printing device based on the target printing calibration coefficient in S202 can include, but is not limited to, adjusting the initial stepping cycle according to the target printing calibration coefficient to obtain the target stepping cycle corresponding to the printing device.
[0095] Optionally, the process of adjusting the initial stepping cycle according to the target printing calibration coefficient to obtain the target stepping cycle corresponding to the printing device may include, but is not limited to:
[0096] When the target printing calibration coefficient is less than 1, such as Figure 4AAs shown, the actual length of the printed tube is less than the theoretical length before printing, indicating compression. Therefore, the initial stepping cycle needs to be reduced to a target multiple (i.e., the target printing calibration coefficient) to obtain the target stepping cycle for the printing device. This allows a target printing cycle to contain more stepping cycles, thus lengthening the printed content to compensate for the compression. For example, ideally, printing a 100mm long tube requires a target printing cycle T1 = initial stepping cycle T2 = 1000 cycles, with one initial stepping 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 initial step cycle, the actual distance the stepper motor moves the tube is less than the distance of one line of pixels. That is, without calibration, after 1000 initial step cycles, the actual printed tube length is 95mm, meaning the tube only moves 0.095mm in one initial step cycle. If the target print cycle to step cycle ratio remains 1.0 (i.e., the target print cycle and target step cycle are equal), the actual printed length after one target print cycle is less than one... Based on the row pixel distance, the target print calibration coefficient P1 = 0.95 can be determined. After performing the above segment length calibration according to the target print calibration coefficient, a 100mm long tube is printed. The target print cycle is executed 1000 times. The target step cycle is executed 1000 / 0.95 times because it is reduced to 0.95 times of the initial print cycle. The length of the tube moved by each target step cycle is 0.095mm. Therefore, the actual total printed length of the tube in the 1000 / 0.95 target step cycle is L = (1000 / 0.95) × 0.095 = 100mm, thus achieving the print segment length calibration.
[0097] When the target printing calibration coefficient is greater than 1, such as Figure 4BAs shown, the actual length of the printed tube is greater than the theoretical length before printing, indicating a stretching phenomenon. Therefore, the initial step cycle needs to be increased to a target multiple (i.e., the target print calibration coefficient) to obtain the target step cycle corresponding to the printing device. This allows for fewer step cycles within a single target print cycle, compressing the printed content to compensate for the stretching. For example, if the theoretical length is 100mm and the actual length is 105mm, the stretching phenomenon occurs. In one initial step cycle, the stepper motor moves the tube a distance greater than one line of pixels. That is, without calibration, if the stepper motor steps for 1000 initial step cycles, the actual printed tube length is 105mm, but the tube only moves 0.105mm in one initial step cycle. If the target print cycle to step cycle ratio remains 1.0 (i.e., the target print cycle and target step cycle are equal), the actual printed length after one target print cycle is greater than one line of pixels. Therefore, the target printing calibration coefficient P1 = 105 / 100 = 1.05. After performing the above segment length calibration according to the target printing calibration coefficient, a 100mm long tube is printed. The target printing cycle is executed 1000 times. The target step cycle is increased to 1.05 times the initial printing cycle and is executed 1000 / 1.05 times. The length of the tube moved by each target step cycle is 0.105mm. Therefore, the actual total printed length of the tube in the 1000 / 1.05 target step cycle is L = (1000 / 1.05) × 0.105 = 100mm, thus achieving the printing segment length calibration.
[0098] Optionally, such as Figure 5A As shown, under ideal printing conditions, the ratio between the target printing cycle T1 and the initial stepping cycle T2 used by the printing device is 1. In this case, precise segment length printing can be achieved without calibration. However, when the actual printed length is compressed, printing calibration is performed, as shown... Figure 5B As shown, due to the reduced step cycle, the ratio between the target printing cycle T1 and the adjusted target step cycle T3 will be greater than 1. However, when stretching occurs in the actual printed length, after printing calibration, as... Figure 5C As shown, due to the increased step cycle, the ratio between the target printing cycle T1 and the adjusted target step cycle T3 will be less than 1. The target printing cycle includes heating time t1 and cooling time t2. Different ratios between heating time t1 and cooling time t2 result in different print densities. To maintain consistent print density on the tube before and after calibration, the ratio between the heating and cooling times of the print head will remain unchanged before and after the initial step cycle adjustment. This ensures both the actual printing length of the calibrated tube and the printing quality on the tube.
[0099] In some possible embodiments, the process of determining the target stepping cycle corresponding to the printing device based on the printing calibration coefficient in S202 above may include, but is not limited to, calculating the product between the target printing cycle and the target printing calibration coefficient to obtain the target stepping cycle corresponding to the printing device. For example, when the target printing calibration coefficient under the target printing cycle T1 is P1, the calibrated target stepping cycle T3 = T1 × P1 can be calculated.
[0100] S203 controls the print head of the printing equipment to print according to the target printing cycle, and controls the stepper motor of the printing equipment to drive the tube to be printed to move forward according to the target stepping cycle.
[0101] Specifically, after determining the target stepping cycle, the printer's controller will control the print head's printing operation according to the target printing cycle, and simultaneously control the stepper motor's rotation according to the target stepping 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.
[0102] 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.
[0103] Please refer to the following. Figure 6 The illustration shows a schematic diagram of the implementation process of a printing calibration method provided in an embodiment of this application. Figure 6 As shown, when the user manually triggers or the printing device automatically triggers segment length calibration (print calibration), after the printing device starts segment length calibration (print calibration), it can directly query the target printing calibration coefficient of the tube to be printed based on 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 tube to be printed, then measure the actual length of the tube after printing, and calculate the target printing calibration coefficient of the tube to be printed based on the actual length and the theoretical length. Then, a target stepping cycle can be determined based on the target printing calibration coefficient, but not limited to, following a process similar to S202. Finally, the print head of the printing device is controlled to print according to the target printing cycle. Simultaneously, the stepper motor of the printing device is controlled to move the tube to be printed forward according to the aforementioned target stepping cycle to complete the segment length calibration and achieve more accurate printing.
[0104] Please refer to the following. Figure 7 This is a schematic diagram of the structure of a printing calibration device provided in an embodiment of this application. Figure 7 As shown, the above-mentioned print calibration device 700 includes:
[0105] The acquisition module 710 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.
[0106] The determination module 720 is used to determine the target stepping cycle corresponding to the printing device based on the above-mentioned target printing calibration coefficient;
[0107] The control module 730 is used to control the print head of the printing device to print according to the target printing cycle, and to control the stepper motor of the printing device to drive the line tube to be printed to move forward according to the target stepping cycle.
[0108] In one possible implementation, the acquisition module 710 includes:
[0109] The control unit is used to control the printing device to print a section of the above-mentioned line tube of theoretical length according to the target printing cycle and the initial step cycle, so as to obtain a section of test line tube; the initial step cycle is equal to the target printing cycle.
[0110] The first acquisition unit is used to acquire the actual length of the aforementioned test conduit.
[0111] 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.
[0112] The aforementioned determining module 720 is specifically used for:
[0113] The initial stepping cycle is adjusted based on the target printing calibration coefficient to obtain the target stepping cycle corresponding to the printing device.
[0114] In one possible implementation, the determining module 720 is specifically used for:
[0115] When the target printing calibration coefficient is less than 1, the initial stepping period is reduced to the target multiple to obtain the target stepping period corresponding to the printing device; when the target printing calibration coefficient is greater than 1, the initial stepping period is increased to the target multiple to obtain the target stepping period corresponding to the printing device; wherein, the target multiple is the reciprocal of the target printing calibration coefficient.
[0116] In one possible implementation, the target printing cycle includes heating time and cooling time; before and after the initial stepping cycle adjustment, the ratio between the heating time and cooling time corresponding to the print head remains unchanged.
[0117] In one possible implementation, the determining module 720 is specifically used for:
[0118] The target printing cycle is obtained by multiplying the target printing cycle and the target printing calibration coefficient.
[0119] In one possible implementation, the acquisition module 710 includes:
[0120] The second acquisition unit is used to acquire the target material type corresponding to the tube to be printed.
[0121] 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.
[0122] In one possible implementation, the acquisition module 710 is specifically used for:
[0123] 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.
[0124] 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.
[0125] The division of modules in the above-described printing calibration device is for illustrative purposes only. In other embodiments, the printing calibration device can be divided into different modules as needed to complete all or part of the functions of the printing calibration device. The implementation of each module in the printing calibration device provided in the embodiments of this specification can be in the form of a computer program. This computer program can run on a printing device or a terminal connected to the printing device. The program modules constituted by this computer program can be stored in the memory of the printing device or the terminal connected to the printing device. When the computer program is executed by a processor, it implements all or part of the steps of the printing calibration method described in the embodiments of this specification.
[0126] Please refer to the following. Figure 8 , Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Figure 8As shown, the electronic device 800 may include: at least one processor 810, a network interface 820, a user interface 830, a memory 840, a printhead 850, a stepper motor 860, and at least one communication bus 870.
[0127] The communication bus 870 is used to enable communication between these components.
[0128] The network interface 820 may include a Bluetooth module, a near-field communication module, a Wi-Fi module, etc.
[0129] The user interface 830 may include a display screen and a camera; optionally, the user interface 830 may also include a standard wired interface and a wireless interface.
[0130] The processor 810 may include one or more processing cores. The processor 810 connects to various parts of the electronic device 800 using various interfaces and lines, and performs various functions and processes data of the electronic device 800 by running or executing instructions, programs, code sets or instruction sets stored in the memory 840, and by calling data stored in the memory 840.
[0131] The stepper motor 860 is primarily responsible for driving the precise movement of components such as the print head 850 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 860, after passing through the mechanical transmission mechanism, can drive the rubber roller to rotate, which in turn drives the tubing to move.
[0132] The printhead 850 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 850 vary depending on the printing technology, and this application embodiment does not limit this.
[0133] Optionally, the processor 810 can be implemented using at least one of the following hardware forms: digital signal processing, field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 810 can integrate one or more of the following: a central processing unit (CPU), a graphics processor (GPU), and a modem. It is understood that the aforementioned modem may also not be integrated into the processor 810 and can be implemented as a separate chip.
[0134] The memory 840 may include random access memory (RAM) or read-only memory (ROM). The memory 840 may include a program storage area and a data storage area. The program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a target printing calibration coefficient acquisition function, a printhead control function, 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. Figure 8 As shown, the memory 840, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and program instructions.
[0135] In some possible embodiments, the processor 810 described above can be used to call program instructions stored in the memory 840 and specifically perform the following operations:
[0136] 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 to be printed after printing and the theoretical length before printing; determine the target stepping cycle corresponding to the printing device according to the target printing calibration coefficient; control the print head of the printing device to print according to the target printing cycle, and control the stepper motor of the printing device to drive the tube to be printed to move forward according to the target stepping cycle.
[0137] In some possible embodiments, when the processor 810 performs the above-mentioned process of obtaining the target printing calibration coefficient corresponding to the liner to be printed, it is specifically used to perform the following:
[0138] The printing device is controlled to print a section of the above-mentioned line tube of theoretical length according to the target printing cycle and the initial stepping cycle to obtain a section of test line tube; the initial stepping cycle is equal to the target printing cycle; the actual length of the test line tube is obtained; the target printing calibration coefficient corresponding to the line tube to be printed is calculated according to the actual length and the theoretical length.
[0139] When the processor 810 executes the above-mentioned determination of the target stepping cycle corresponding to the printing device based on the above-mentioned printing calibration coefficient, it is specifically used to perform: adjusting the above-mentioned initial stepping cycle according to the above-mentioned target printing calibration coefficient to obtain the target stepping cycle corresponding to the above-mentioned printing device.
[0140] In some possible embodiments, when the processor 810 performs the above-mentioned adjustment of the initial step cycle according to the target printing calibration coefficient to obtain the target step cycle corresponding to the printing device, it is specifically used to perform:
[0141] When the target printing calibration coefficient is less than 1, the initial stepping period is reduced to the target multiple to obtain the target stepping period corresponding to the printing device; when the target printing calibration coefficient is greater than 1, the initial stepping period is increased to the target multiple to obtain the target stepping period corresponding to the printing device; wherein, the target multiple is the reciprocal of the target printing calibration coefficient.
[0142] In some possible embodiments, the target printing cycle includes heating time and cooling time; before and after the initial step cycle adjustment, the ratio between the heating time and cooling time corresponding to the print head remains unchanged.
[0143] In some possible embodiments, when the processor 810 executes the above-mentioned determination of the target step cycle corresponding to the printing device based on the target printing calibration coefficient, it is specifically used to perform:
[0144] The target printing cycle is obtained by multiplying the target printing cycle and the target printing calibration coefficient.
[0145] In some possible embodiments, when the processor 810 performs the above-mentioned process of obtaining the target printing calibration coefficient corresponding to the liner to be printed, it is specifically used to perform the following:
[0146] Obtain the target material type corresponding to the tube to be printed; 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 tube and the printing calibration coefficient.
[0147] In some possible embodiments, when the processor 810 performs the above-mentioned acquisition of the target printing calibration coefficient corresponding to the duct to be printed, it is specifically used to perform: when it detects that the material type corresponding to the duct to be printed by the printing device has changed, the processor acquires the target printing calibration coefficient corresponding to the duct to be printed.
[0148] In some possible embodiments, the target material types corresponding to the above-mentioned ducts to be printed are different, and the target printing calibration coefficients are different.
[0149] 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 printing calibration device are implemented as software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.
[0150] 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.
[0151] 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 printing calibration method, characterized in that, The method 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 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 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 target stepping cycle. 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 target printing cycle and the initial stepping cycle, so as to obtain a test tube; the initial stepping cycle is equal to the 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 target stepping cycle corresponding to the printing device based on the target printing calibration coefficient includes: The initial stepping cycle is adjusted according to the target printing calibration coefficient to obtain the target stepping cycle corresponding to the printing device.
2. The method as described in claim 1, characterized in that, The step of adjusting the initial step cycle according to the target printing calibration coefficient to obtain the target step cycle corresponding to the printing device includes: If the target printing calibration coefficient is less than 1, the initial stepping cycle is reduced to the target multiple to obtain the target stepping cycle corresponding to the printing device; If the target printing calibration coefficient is greater than 1, the initial stepping cycle is increased to the target multiple to obtain the target stepping cycle corresponding to the printing device; Wherein, the target multiple is the target printing calibration coefficient.
3. The method as described in claim 1, characterized in that, The target printing cycle includes heating time and cooling time; before and after the initial stepping cycle is adjusted, the ratio between the heating time and cooling time corresponding to the print head remains unchanged.
4. A printing calibration method, characterized in that, The method 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 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 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 target stepping cycle. 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; The step of determining the target stepping cycle corresponding to the printing device based on the target printing calibration coefficient includes: The target printing cycle is obtained by multiplying the target printing cycle and the target printing calibration coefficient.
5. The method as described in claim 1 or 4, characterized in that, The step of obtaining the target printing calibration coefficient corresponding to the duct to be printed includes: 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.
6. The method according to any one of claims 1-4, characterized in that, The target material types corresponding to the tubes to be printed are different, and the target printing calibration coefficients are different.
7. A printing calibration device, characterized in that, The printing calibration device is used to perform the steps of the method as described in any one of claims 1 to 6, including: 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. The determination module is used to determine the target stepping cycle corresponding to the printing device based on the target printing calibration coefficient; The control module is used to control the print head of the printing device to print according to the 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 target stepping cycle.
8. An electronic device, characterized in that, include: Processor and memory; The memory is used to store a computer program adapted to be loaded by the processor and to execute the steps of the method as described in any one of claims 1 to 6.
9. 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 6.
Citation Information
Patent Citations
Cutter printing method and device, electronic equipment and computer storage medium
CN119872100A