A method, device and storage medium for automatically positioning the starting point of label printing consumables

By presetting standard specification parameters in the label printer motherboard and automatically identifying consumable specifications using photoelectric sensors, the problem of printing starting point offset after the consumable is replaced by label printer, automatic identification and precise positioning of consumables of different specifications is achieved, and printing efficiency and accuracy are improved.

CN119761394AInactive Publication Date: 2025-04-04GUANGZHOU SENYANG ELECTRONIC TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411813597.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing label printers are prone to offset printing starting point after replacement of consumables, and cannot adapt to label consumables of different specifications, which affects printing efficiency and accuracy.

Method used

Automatic detection and positioning is achieved by presetting standard specification label consumable parameters in the printer motherboard and automatically identifying consumable specifications using photoelectric sensors, including the length and width of the label, the number of columns, and the label gap distance in the X and Y directions.

Benefits of technology

It realizes the automatic identification of consumables of different specifications and precise positioning of printing starting points by label printers, improves printing efficiency and accuracy, and reduces manual intervention and operation complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761394A_ABST
    Figure CN119761394A_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device and storage medium for automatically locating the starting point of label printing consumables, and relates to the technical field of printers. By presetting the standard parameters of label consumables on the printer mainboard, driving the trolley to run at a low speed along the X-axis, using a photoelectric sensor to detect the edge of the label and record the grating value to form a set L1, the mainboard CPU calculates and matches according to the label parameters, determines the ink outlet line of the X-axis, performs Y-axis measurement through the stepping reverse distance method, records the stepping value when spitting out the label, and generates a metric distance set L2; the present invention greatly improves the working efficiency and printing accuracy of the label printer through automation technology, reduces manual intervention, automatically identifies the specifications of consumables and automatically locates the printing starting point, ensures the adaptability of consumables of different specifications and the rapid calibration after the consumables are offset, and can also realize unattended continuous printing and consumable replacement adaptation, reduce the complexity of operation, and improve production efficiency and the flexibility of printing operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of printers, and in particular to a method, a device and a storage medium for automatically positioning a starting point of a label printing consumable. Background Art

[0002] Market process label printers have limitations and can only adapt to labels of a single specification, which cannot meet the market demand for one machine with multiple uses. In the field of digital printing, compared with traditional photo printers, label printers are prone to offset after the replacement of consumables, and need to automatically adjust the X-axis printing starting point to adapt to the change of consumables. In addition, the specifications of different label consumables are diverse, resulting in the need to re-calibrate the printing starting point after replacing the consumables, affecting printing efficiency. In addition, in mass production, the Y-axis of the consumable will produce a millimeter-level offset of 1-5mm when feeding the paper, or the printing starting point will also change slightly after the same specification consumables are replaced, further increasing the complexity and necessity of adjusting the printing starting point. Summary of the invention

[0003] The purpose of the present invention is to provide a method, device and storage medium for automatically positioning the starting point of label printing consumables, which can automatically detect different printing starting points, and identify slight height differences or edge color differences between the label and the consumable substrate through photoelectric sensors, so that the printer mainboard can automatically identify the specifications of the currently assembled consumables.

[0004] The purpose of the present invention can be achieved by the following technical solutions:

[0005] The present application provides a method for automatically positioning the starting point of a label printing consumable, comprising the following steps:

[0006] S1. Preset standard label consumable parameters in the printer mainboard interactive interface, including the length and width of the label, the number of columns, and the label gap distance in the X and Y directions;

[0007] S2. During single printing, when the carriage receives the printing command, the X-axis runs from right to left at a low speed. When it reaches a fixed distance from the left edge of the consumable, the photoelectric sensor passes the edge of the label, and the main board immediately records the current grating value to form a grating value set L1.

[0008] S3, the mainboard CPU performs calculation matching based on the label length, label gap distance and label column number, and searches for a matching data set in set L1;

[0009] S4. Use the stepping reverse distance method. After the X-axis is measured, perform the Y-axis measurement. Use the current Y-axis position as the reference Y direction 0 starting point. After clearing the Y-axis motor step number, spit out 3 labels. When the photoelectric sensor passes the edge of the label, the mainboard immediately records the current step value, generates a step set, and converts it into a metric distance set L2. Find the matching data set in the set L2.

[0010] S5. After executing steps S2-S4, the actual XY starting point of label printing is obtained. In unattended continuous printing, when the carriage prints a specified number of times, it executes the measurement steps of steps S2-S4 and updates the XY starting point once;

[0011] S6. When a slight deviation occurs when replacing the same type of consumables, the starting point of the current new label consumables is updated through steps S1-S4.

[0012] Furthermore, before the standard specification label consumable parameters are preset in the printer mainboard interactive interface, it also includes: obtaining the label consumable specification parameters input by the user, comparing the obtained label consumable specification parameters with the standard specification parameters preset in the printer mainboard, and judging whether the specification parameters input by the user are within the preset range. When the label consumable specification parameters input by the user are within the preset range, they are saved in the storage module of the printer mainboard as the label consumable specification parameters of the current printing task; when the label consumable specification parameters input by the user are not within the preset range, the user is prompted to re-enter through the interactive interface of the printer mainboard until the input specification parameters meet the preset range requirements; according to the saved label consumable specification parameters, the printing module of the printer is controlled through the printer mainboard to adjust the moving step distance of the print head and the feeding distance of the printing paper to adapt to label consumables of different specifications; during the printing process, the printer mainboard monitors the position coordinates of the print head and the feeding length of the printing paper in real time, and compares them with the specification parameters of the label consumables. After printing is completed, the printer mainboard automatically saves the relevant parameters of the printing task.

[0013] Furthermore, during a single print, when the carriage receives a print command, the X-axis runs from right to left at a low speed. When it reaches a fixed distance from the left edge of the consumable, the photoelectric sensor passes the edge of the label, and the main board immediately records the current grating value to form a grating value set L1, which specifically includes:

[0014] According to the printing instructions, the X-axis motor is controlled to move from right to left at a constant low speed, and the photoelectric sensor is started to detect the label edge;

[0015] The encoder obtains the current position of the X-axis in real time and compares it with the preset left edge distance threshold of the filament to determine whether it has reached the specified position;

[0016] When the current position of the X-axis reaches 5cm from the left edge of the filament, the photoelectric sensor is triggered to detect the label edge and wait for the detection result;

[0017] When the photoelectric sensor detects the edge of the label, it immediately records the count value of the current X-axis encoder as the grating position value corresponding to the current label edge;

[0018] The acquired grating position value is saved in the grating value set L1, and the value is compared with the preset standard grating value to calculate the deviation;

[0019] According to the calculated deviation, the PID control algorithm is used to adjust the running speed and position of the X-axis motor to compensate for the deviation of the label edge position;

[0020] After completing the detection of the label edge and the recording of the raster value, continue to control the X-axis to move at a constant low speed until the entire printing process is completed;

[0021] During the printing process, label edge detection and raster value recording are continuously performed, and X-axis movement is dynamically adjusted.

[0022] Furthermore, the mainboard CPU performs calculation matching based on the label length, label gap distance and label column number, and searches for a matching data set in the set L1; specifically, the steps include:

[0023] Obtain parameter information such as label length, label gap distance, and label column number, and use them as input data for the motherboard CPU; the motherboard CPU uses a specific algorithm to perform calculation processing based on the input parameter information to obtain a set of calculation result data; compare the calculation result data with the preset standard data set, and use the similarity matching algorithm to find the data subset closest to the calculation result; determine whether the matched data subset meets the preset matching threshold condition, and if so, determine the data subset as the target data set, otherwise recalculate and process, extract X1, X2, X3, and X4 specific coordinate data from the target data set, calculate the first ink outlet position of the label consumable in the X-axis direction based on the values ​​of X1 and X2, send the ink outlet position coordinates of the label consumable to the printing control module, and control the print head to discharge ink at the corresponding position; after printing is completed, obtain feedback information on the printing result, collect and analyze the printing deviation data, and dynamically adjust and optimize the ink outlet position through a machine learning algorithm.

[0024] Furthermore, using the stepping reverse distance method, after the X-axis is measured, the Y-axis is measured, and the current Y-axis position is used as the reference Y direction 0 starting point. After the Y-axis motor step number is cleared, 3 labels are spit out, including:

[0025] Get the current position of the Y-axis at the end of the X-axis measurement, set this position as the reference 0 point of the Y-axis, and record this position information; clear the current number of steps of the Y-axis motor so that a new step count can be started from the reference 0 point; start the label spitting mechanism, spit out 3 labels in sequence, and record the change in the number of steps of the Y-axis motor each time a label is spit out; calculate the Y-axis displacement distance corresponding to each label according to the number of steps recorded when each label is spit out through the step back calculation method; compare the displacement distance of each label with the reference 0 point to determine the relative Y-axis position of each label; when the number of steps is abnormal during the label spitting process, it is judged that the motor may have a fault, record the abnormal information and suspend the spitting process; then summarize the relative Y-axis position data of each label to generate a Y-axis measurement result report.

[0026] Furthermore, when the photoelectric sensor passes the edge of the tag, the mainboard immediately records the current step value, generates a step set and converts it into a metric distance set L2, and searches for a matching data set in the set L2, specifically including:

[0027] Acquire the photoelectric sensor signal, and when the label edge is detected, immediately record the current step value, and store the step value in the step set, convert each step value in the step set into the corresponding metric distance through a preset conversion formula, and generate a metric distance set L2; in the metric distance set L2, use a matching algorithm to find data points that match the preset data set; when a matching data point is found, determine the Y1 and Y2 values ​​in the matching data point, and calculate the difference between Y1 and Y2, which is the first ink outlet line position of the current label consumable on the Y axis; transmit the calculated Y-axis first ink outlet line position information to the printing control system for adjusting the precise position of the print head on the Y axis; when no matching data point is found in the metric distance set L2, return an error message, prompting to recalibrate the photoelectric sensor or check the position of the label consumable.

[0028] Furthermore, in unattended continuous printing, when the carriage prints a specified number of times, it performs the measurement steps of steps S2-S4 once and updates the XY starting point once, specifically including:

[0029] Get the preset print count threshold, record the current print count, if the current print count is equal to the preset threshold, trigger the measurement step, in the measurement step, use the sensor to obtain the X-axis and Y-axis coordinate data of the current position of the trolley, record as the initial measurement data, filter the initial measurement data through the data processing module, obtain smooth X-axis and Y-axis coordinate data, calculate the deviation value from the preset starting point according to the smoothed X-axis and Y-axis coordinate data, determine the X-axis starting point deviation and the Y-axis starting point deviation, when the X-axis starting point deviation or the Y-axis starting point deviation exceeds the preset allowable range, adjust the trolley position through the control system, recalibrate the X-axis and Y-axis starting points; update the calibrated X-axis and Y-axis starting point coordinates to the printing control system as the new printing starting point, and continue to execute the printing task; reset the current printing count counter, continue to record the new printing count, and wait for the next measurement step to be triggered.

[0030] Furthermore, the starting point of the current new label consumable is updated, specifically including:

[0031] Obtain the preset standard position information and size information of the new consumable as the target position and size; obtain the detection information of the actual position and size of the new consumable after replacement, compare the detection information with the target position and size, and when it is detected that the position of the new consumable is offset, determine the adjustment parameters of the position calibration according to the offset; when it is detected that the size of the new consumable does not match the target size, determine whether the consumable type is correct, and when the type does not match, prompt replacement, and when the type matches, determine the adjustment parameters of the size calibration; according to the determined position calibration adjustment parameters, use actuators such as a robotic arm or a servo motor to automatically adjust the actual position of the new consumable to align it with the target position; according to the determined size calibration adjustment parameters, use an image processing algorithm to calibrate the size of the new consumable, and scale the collected consumable image to match it with the target size; after completing the position calibration and size calibration of the new consumable, update the calibrated starting position of the new consumable to the device parameters as the starting point reference for using the new consumable, so as to realize automatic update of the starting point of the new consumable.

[0032] This embodiment also provides a printing device, including a processor, a memory, and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, any of the above-mentioned methods for automatically positioning the starting point of label printing consumables is implemented.

[0033] This embodiment further provides a storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, any of the above-mentioned methods for automatically locating the starting point of label printing consumables is implemented.

[0034] The beneficial effects of the present invention are:

[0035] The automated technical solution significantly improves the working efficiency and printing accuracy of the label printer. By presetting the consumable parameters and using the photoelectric sensor to automatically identify the consumable specifications, the printer can adapt to label consumables of different specifications, and can complete the identification of consumable specifications and the positioning of the printing starting point without manual intervention. This automated identification and positioning mechanism reduces manual adjustments caused by consumable replacement or specification differences, thereby saving time and improving the continuity of printing operations. In addition, through precise X-axis and Y-axis measurement steps, the system can automatically calibrate the printing starting point to ensure that each print is accurate and error-free, avoiding printing errors caused by consumable offset, and greatly improving print quality.

[0036] The present invention realizes the continuous printing capability under unattended conditions, and can timely update the printing starting point by automatically triggering the measurement steps of the X-axis and the Y-axis after a specified number of prints, ensuring that long-term printing jobs are not affected. This regular automatic calibration mechanism ensures the stability and reliability of the printer during long-term operation. At the same time, when replacing consumables of the same type, it can automatically detect slight offsets of the consumables and update the printing starting point, and can adapt to the replacement of consumables without manual operation, thus realizing the adaptive capability of consumable replacement, which not only reduces manual intervention and reduces operational complexity, but also improves the flexibility and practicality of the printer, enabling it to adapt to changing printing needs and environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] For better understanding and implementation, the technical solution of the present application is described in detail below with reference to the accompanying drawings.

[0038] Figure 1 A schematic diagram of a process for automatically positioning the starting point of a label printing consumable provided in this application;

[0039] Figure 2 A schematic diagram of a photoelectric sensor and a printing starting point for an automatic positioning method of a label printing consumable starting point provided in the present application. DETAILED DESCRIPTION

[0040] In order to further explain the technical means and effects taken by the present invention to achieve the predetermined invention purpose, exemplary embodiments will be described in detail here, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of methods and systems consistent with some aspects of the present application as detailed in the attached claims.

[0041] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0042] The specific implementation methods, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.

[0043] See also Figure 1-Figure 2 This embodiment provides a method for automatically positioning the starting point of a label printing consumable, comprising the following steps:

[0044] S1. Preset standard label consumable parameters in the printer mainboard interactive interface, including the length and width of the label, the number of columns, and the label gap distance in the X and Y directions;

[0045] Furthermore, before the standard specification label consumable parameters are preset in the printer mainboard interactive interface, it also includes: obtaining the label consumable specification parameters input by the user, comparing the obtained label consumable specification parameters with the standard specification parameters preset in the printer mainboard, and judging whether the specification parameters input by the user are within the preset range. When the label consumable specification parameters input by the user are within the preset range, they are saved in the storage module of the printer mainboard as the label consumable specification parameters of the current printing task; when the label consumable specification parameters input by the user are not within the preset range, the user is prompted to re-enter through the interactive interface of the printer mainboard until the label consumable specification parameters are within the preset range. The input specification parameters meet the preset range requirements; according to the saved label consumables specification parameters, the printer's printing module is controlled through the printer main board to adjust the print head's moving step distance and the printing paper feed distance to adapt to label consumables of different specifications; during the printing process, the printer main board monitors the position coordinates of the print head and the feeding length of the printing paper in real time, and compares them with the specification parameters of the label consumables to ensure that the printing position of each label is accurate. After printing is completed, the printer main board automatically saves the relevant parameters of the printing task, including label consumables specifications, print quantity, printing time, etc., for subsequent query and statistical analysis.

[0046] Specifically, by combining the preset of the printer mainboard interactive interface with user input, this method can ensure that the specification parameters of the label consumables are accurately input and saved, and then control the printer module to adapt to consumables of different specifications, monitor and adjust the print head position and paper feed in real time to ensure printing accuracy, and automatically save the task parameters after printing is completed, thereby improving printing efficiency and accuracy, and facilitating subsequent queries and statistical analysis.

[0047] S2. In a single print, when the carriage receives the print command, the X-axis runs from right to left at a low speed. When it reaches a fixed distance (5cm) from the left edge of the consumable, the photoelectric sensor passes the edge of the label, and the main board immediately records the current grating value to form a grating value set L1.

[0048] Furthermore, in a single print, when the carriage receives a print command, the X-axis runs from right to left at a low speed. When it reaches a fixed distance (5 cm) from the left edge of the consumable, the photoelectric sensor passes the edge of the label, and the main board immediately records the current grating value to form a grating value set L1, which specifically includes:

[0049] According to the printing instructions, the X-axis motor is controlled to move from right to left at a constant low speed, and the photoelectric sensor is started to detect the label edge;

[0050] The encoder obtains the current position of the X-axis in real time and compares it with the preset left edge distance threshold of the filament to determine whether it has reached the specified position;

[0051] When the current position of the X-axis reaches 5cm from the left edge of the filament, the photoelectric sensor is triggered to detect the label edge and wait for the detection result;

[0052] When the photoelectric sensor detects the edge of the label, it immediately records the count value of the current X-axis encoder as the grating position value corresponding to the current label edge;

[0053] The acquired grating position value is saved in the grating value set L1, and the value is compared with the preset standard grating value to calculate the deviation;

[0054] According to the calculated deviation, the PID control algorithm is used to adjust the running speed and position of the X-axis motor to compensate for the deviation of the label edge position;

[0055] After completing the detection of the label edge and the recording of the raster value, continue to control the X-axis to move at a constant low speed until the entire printing process is completed;

[0056] During the printing process, label edge detection and raster value recording are continuously performed, and the X-axis movement is dynamically adjusted to ensure the accuracy of the printing position.

[0057] Specifically, in a single printing process, by precisely controlling the low-speed operation of the X-axis motor and combining it with photoelectric sensor detection, this method can monitor and record the grating value corresponding to the label edge in real time to form a set L1. At the same time, the deviation is calculated by comparing it with the standard grating value, and the PID control algorithm is used to dynamically adjust the operation of the X-axis motor to compensate for the deviation of the label edge position and ensure the accuracy of the printing position, thereby achieving continuous optimization of printing accuracy throughout the printing process and improving printing quality and efficiency.

[0058] S3, the mainboard CPU performs calculation matching based on the label length, label gap distance (X direction) and label column number, and searches for the matching data set {X1, X2, X3, X4} in the set L1, and X1+Xz is the first ink outlet line of the current label consumable on the X axis;

[0059] Furthermore, the mainboard CPU performs calculation matching based on the label length, label gap distance (X direction) and label column number, and searches for the matching data set {X1, X2, X3, X4} in the set L1, and X1+Xz is the first ink outlet line of the current label consumable on the X axis; specifically, it includes:

[0060] Obtain parameter information such as label length, label gap distance, and label column number, and use them as input data for the motherboard CPU; the motherboard CPU uses a specific algorithm to perform calculation processing based on the input parameter information to obtain a set of calculation result data; compare the calculation result data with the preset standard data set, and use the similarity matching algorithm to find the data subset closest to the calculation result; determine whether the matched data subset meets the preset matching threshold condition, and if so, determine the data subset as the target data set, otherwise recalculate and process, extract X1, X2, X3, and X4 specific coordinate data from the target data set, calculate the first ink outlet position of the label consumable in the X-axis direction based on the values ​​of X1 and X2, send the ink outlet position coordinates of the label consumable to the printing control module, and control the print head to discharge ink at the corresponding position to achieve accurate printing of the label; after printing is completed, obtain feedback information on the printing result, collect and analyze the printing deviation data, and dynamically adjust and optimize the ink outlet position through a machine learning algorithm to improve the accuracy of subsequent printing.

[0061] Specifically, in step S3, the mainboard CPU effectively identifies the data set that matches these parameters in set L1 by accurately calculating and matching parameters such as the length, gap distance, and number of columns of the label, thereby determining the first ink outlet line position on the X-axis. This not only improves the accuracy of label printing, but also performs feedback analysis and dynamic optimization of the printing results through machine learning algorithms, further improving the printing quality and the accuracy of subsequent printing tasks, and ensuring the high efficiency and consistency of printing jobs.

[0062] S4. Since the Y-axis direction is generally not equipped with a grating, the stepping reverse distance method is used. After the X-axis is measured, the Y-axis measurement is performed, and the current Y-axis position is used as the reference Y direction 0 starting point. After the Y-axis motor step number is cleared, 3 labels are spit out. When the photoelectric sensor passes the edge of the label, the mainboard immediately records the current step value, generates a step set, and converts it into a metric distance set L2. Find the matching data set {Y1, Y2, Y3, Y4} in the set L2, and Y1-Yz is the first ink outlet line of the Y-axis of the current label consumables.

[0063] Furthermore, since the Y-axis direction is generally not equipped with a grating, the stepping inverse distance method is used. After the X-axis is measured, the Y-axis measurement is performed. The current Y-axis position is used as the reference Y direction 0 starting point. After the Y-axis motor step number is cleared, 3 labels are spit out, including:

[0064] Get the current position of the Y-axis at the end of the X-axis measurement, set this position as the reference 0 point of the Y-axis, and record this position information; clear the current number of steps of the Y-axis motor and ensure that the step counter is reset to zero so that a new step count can be started from the reference 0 point; start the label dispensing mechanism and spit out 3 labels in sequence. Each time a label is spit out, record the change in the number of steps of the Y-axis motor; calculate the Y-axis displacement distance corresponding to each label according to the number of steps recorded when each label is spit out through the step back calculation method; compare the displacement distance of each label with the reference 0 point to determine the relative Y-axis position of each label; when the number of steps is abnormal during the label spitting process, it is judged that the motor may have a fault, record the abnormal information and suspend the spitting process; then summarize the relative Y-axis position data of each label and generate a Y-axis measurement result report for subsequent data processing and analysis.

[0065] Furthermore, when the photoelectric sensor passes the edge of the label, the mainboard immediately records the current step value, generates a step set and converts it into a metric distance set L2, searches for a matching data set {Y1, Y2, Y3, Y4} in the set L2, and Y1-Yz is the first ink outlet line of the Y axis of the current label consumable, specifically including:

[0066] The photoelectric sensor signal is obtained. When the edge of the label is detected, the current step value is immediately recorded and stored in the step set. Each step value in the step set is converted into the corresponding metric distance through a preset conversion formula to generate a metric distance set L2. In the metric distance set L2, a matching algorithm is used to find data points that match the preset data set {Y1, Y2, Y3, Y4}. When a matching data point is found, the Y1 and Y2 values ​​in the matching data point are determined, and the difference between Y1 and Y2 is calculated, which is the first ink outlet line position of the current label consumable on the Y axis. The calculated Y-axis first ink outlet line position information is transmitted to the printing control system for adjusting the precise position of the print head on the Y axis. When no matching data point is found in the metric distance set L2, an error message is returned, prompting to recalibrate the photoelectric sensor or check the position of the label consumable.

[0067] Specifically, the step-by-step inverse distance technology is used to accurately measure the label position on the Y-axis. After the X-axis measurement is completed, the system uses the current Y-axis position as the reference 0 point, clears the step number and spits out 3 labels, while recording the step value when each label is spit out and converting it into the metric distance set L2. By matching the preset data set in the set L2, the system can determine the first ink outlet line position on the Y-axis. This process not only improves the accuracy of print positioning in the Y-axis direction, but also determines the possible failure of the motor and suspends the spitting process when an abnormal number of steps is detected, ensuring the print quality while also enhancing the system's fault detection and processing capabilities.

[0068] S5. After executing steps S2-S4 of the X-axis and Y-axis, the actual XY starting point of the label printing is obtained. In unattended continuous printing, the carriage performs the measurement steps of the X-axis and Y-axis once when printing a specified number of times, and updates the XY starting point once to ensure the accuracy of the printing starting point;

[0069] Furthermore, in unattended continuous printing, the car performs an X-axis and Y-axis measurement step and updates the XY starting point once when the car prints a specified number of times, including:

[0070] Get the preset print count threshold, record the current print count, if the current print count is equal to the preset threshold, trigger the measurement step, in the measurement step, use the sensor to obtain the X-axis and Y-axis coordinate data of the current position of the trolley, record as the initial measurement data, filter the initial measurement data through the data processing module, remove noise interference, and obtain smooth X-axis and Y-axis coordinate data, calculate the deviation value from the preset starting point according to the smoothed X-axis and Y-axis coordinate data, determine the X-axis starting point deviation and the Y-axis starting point deviation, when the X-axis starting point deviation or the Y-axis starting point deviation exceeds the preset allowable range, adjust the trolley position through the control system, recalibrate the X-axis and Y-axis starting points; update the calibrated X-axis and Y-axis starting point coordinates to the printing control system as the new printing starting point, and continue to execute the printing task; reset the current printing count counter, continue to record the new printing count, and wait for the next measurement step to be triggered.

[0071] Specifically, after completing the measurement of the X-axis and Y-axis, the system can determine the actual printing starting point of the label. In the unattended continuous printing mode, the trolley will automatically trigger the re-measurement of the X-axis and Y-axis when the preset printing threshold is reached to update the printing starting point. During this process, the sensor will acquire and record the coordinate data of the trolley, calculate the deviation from the preset starting point after filtering, and automatically calibrate the position of the trolley when the deviation exceeds the allowable range to ensure the accuracy of printing. After the calibration is completed, the updated starting point coordinates will be sent to the printing control system to continue the subsequent printing tasks, and the printing counter will be reset to prepare for the next automatic calibration, thereby achieving high efficiency and high precision in the continuous printing process.

[0072] Among them, Figure 2 As shown in the figure, the schematic diagram of the light sensor and the printing starting point is that a photoelectric sensor is installed at a fixed position of the carriage nozzle (which can identify the slight height difference of the label edge, or identify the edge color difference). The upper right corner of the P1 nozzle is the coordinate of the printer ink outlet point P (X0, Y0), that is, the printer printing starting point, and the coordinate difference with the label edge recognition photoelectric sensor is (Xz, Yz).

[0073] S6. When a slight deviation occurs when replacing the same type of consumables, the starting point of the current new label consumables is updated through steps S1-S4.

[0074] Furthermore, the starting point of the current new label consumable is updated, specifically including:

[0075] Obtain the preset standard position information and size information of the new consumable as the target position and size; obtain the detection information of the actual position and size of the new consumable after replacement, compare the detection information with the target position and size, and when it is detected that the position of the new consumable is offset, determine the adjustment parameters of the position calibration according to the offset; when it is detected that the size of the new consumable does not match the target size, determine whether the consumable type is correct, and when the type does not match, prompt replacement, and if the type matches, determine the adjustment parameters of the size calibration; according to the determined position calibration adjustment parameters, use actuators such as a robotic arm or a servo motor to automatically adjust the actual position of the new consumable to align it with the target position; according to the determined size calibration adjustment parameters, use an image processing algorithm to calibrate the size of the new consumable, and scale the collected consumable image to match it with the target size; after completing the position calibration and size calibration of the new consumable, update the calibrated starting position of the new consumable to the device parameters as the starting point reference for subsequent use of the new consumable, thereby realizing automatic update of the starting point of the new consumable.

[0076] This method of automatically positioning the starting point of label printing consumables realizes precise control and management of label consumables. First, the parameters of standard specification label consumables are preset through the interactive interface of the printer mainboard, and compared with the parameters entered by the user to ensure that the input specification parameters are within the preset range, and saved to the storage module for use in printing tasks. During the printing process, the printer mainboard monitors the position coordinates of the print head and the feed length of the printing paper in real time, and compares them with the specification parameters of the label consumables to ensure that the printing position of each label is accurate. In a single print, when the carriage issues a print instruction, the X-axis runs from right to left at a low speed, the photoelectric sensor detects the edge of the label, the mainboard records the grating value to form a set L1, and uses the PID control algorithm to adjust the X-axis motor to compensate for the deviation of the label edge position. The mainboard CPU calculates and matches according to the label length, gap distance and number of columns, searches for the matching data set in the set L1, and determines the first ink outlet line of the X-axis. For the Y-axis direction, since gratings are generally not installed, the stepping inverse distance method is used to perform Y-axis measurement, record the step value to generate the step set L2, and find the matching data set to determine the first ink outlet line of the Y-axis; in unattended continuous printing, the carriage performs the measurement steps of the X-axis and Y-axis at the specified number of prints, updates the XY starting point, and ensures the accuracy of the printing starting point. When replacing the same type of consumables, by comparing the standard position information and size information of the new consumables with the actual detection information, the adjustment parameters of the position and size calibration are determined, the actual position and size of the new consumables are automatically adjusted, and the calibrated starting position of the new consumables is updated to the device parameters to achieve automatic update of the starting point of the new consumables. The entire process improves printing quality and efficiency through precise automated control, reduces manual intervention, and ensures the consistency and reliability of label printing.

[0077] This embodiment also provides a printing device, including a processor, a memory, and computer program instructions stored in the memory. When the computer program instructions are executed by the processor, the above-mentioned method for automatically positioning the starting point of label printing consumables is implemented.

[0078] This embodiment further provides a storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the above-mentioned method for automatically locating the starting point of a label printing consumable is implemented.

[0079] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technical personnel in this field can make some changes or modify the technical contents disclosed above into equivalent embodiments without departing from the scope of the technical solution of the present invention. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. A method for automatically positioning the starting point of label printing consumables, characterized in that: The steps include: S1. Preset standard label consumable parameters in the printer mainboard interactive interface, including the length and width of the label, the number of columns, and the label gap distance in the X and Y directions; S2. During single printing, when the carriage receives the printing command, the X-axis runs from right to left at a low speed. When it reaches a fixed distance from the left edge of the consumable, the photoelectric sensor passes the edge of the label, and the main board immediately records the current grating value to form a grating value set L1. S3, the mainboard CPU performs calculation matching based on the label length, label gap distance and label column number, and searches for a matching data set in set L1; S4. Use the stepping reverse distance method. After the X-axis is measured, perform the Y-axis measurement. Use the current Y-axis position as the reference Y direction 0 starting point. After clearing the Y-axis motor step number, spit out 3 labels. When the photoelectric sensor passes the edge of the label, the mainboard immediately records the current step value, generates a step set, and converts it into a metric distance set L2. Find the matching data set in the set L2. S5. After executing steps S2-S4, the actual XY starting point of label printing is obtained. In unattended continuous printing, when the carriage prints a specified number of times, it executes the measurement steps of steps S2-S4 and updates the XY starting point once; S6. When a slight deviation occurs when replacing the same type of consumables, the starting point of the current new label consumables is updated through steps S1-S4.

2. The method for automatically positioning the starting point of label printing consumables according to claim 1, characterized in that: Before the standard specification label consumable parameters are preset in the printer mainboard interactive interface, it also includes: obtaining the label consumable specification parameters input by the user, comparing the obtained label consumable specification parameters with the standard specification parameters preset in the printer mainboard, and judging whether the specification parameters input by the user are within the preset range. When the label consumable specification parameters input by the user are within the preset range, they are saved in the storage module of the printer mainboard as the label consumable specification parameters of the current printing task; when the label consumable specification parameters input by the user are not within the preset range, the user is prompted to re-enter through the interactive interface of the printer mainboard until the input specification parameters meet the preset range requirements; according to the saved label consumable specification parameters, the printing module of the printer is controlled through the printer mainboard to adjust the moving step distance of the print head and the feeding distance of the printing paper to adapt to label consumables of different specifications; during the printing process, the printer mainboard monitors the position coordinates of the print head and the feeding length of the printing paper in real time, and compares them with the specification parameters of the label consumables. After printing is completed, the printer mainboard automatically saves the relevant parameters of the printing task.

3. The method for automatically positioning the starting point of label printing consumables according to claim 1, characterized in that: During a single print, when the carriage receives the print command, the X-axis runs from right to left at a low speed. When it reaches a fixed distance from the left edge of the filament, the photoelectric sensor passes the edge of the label, and the main board immediately records the current grating value to form a grating value set L1, which includes: According to the printing instructions, the X-axis motor is controlled to move from right to left at a constant low speed, and the photoelectric sensor is started to detect the label edge; The encoder obtains the current position of the X-axis in real time and compares it with the preset left edge distance threshold of the filament to determine whether it has reached the specified position; When the current position of the X-axis reaches 5cm from the left edge of the filament, the photoelectric sensor is triggered to detect the label edge and wait for the detection result; When the photoelectric sensor detects the edge of the label, it immediately records the count value of the current X-axis encoder as the grating position value corresponding to the current label edge; The acquired grating position value is saved in the grating value set L1, and the value is compared with the preset standard grating value to calculate the deviation; According to the calculated deviation, the PID control algorithm is used to adjust the running speed and position of the X-axis motor to compensate for the deviation of the label edge position; After completing the detection of the label edge and the recording of the raster value, continue to control the X-axis to move at a constant low speed until the entire printing process is completed; During the printing process, label edge detection and raster value recording are continuously performed, and X-axis movement is dynamically adjusted.

4. The method for automatically positioning the starting point of label printing consumables according to claim 1, characterized in that: The mainboard CPU performs calculation matching based on the label length, label gap distance, and label column number, and searches for a matching data set in set L1; Specifically include: Obtain parameter information such as label length, label gap distance, and label column number, and use them as input data for the motherboard CPU; the motherboard CPU uses a specific algorithm to perform calculation processing based on the input parameter information to obtain a set of calculation result data; compare the calculation result data with the preset standard data set, and use the similarity matching algorithm to find and calculate the data subset; determine whether the matched data subset meets the preset matching threshold condition, and if so, determine the data subset as the target data set, otherwise recalculate and process, extract X1, X2, X3, X4 specific coordinate data from the target data set, calculate the first ink outlet position of the label consumable in the X-axis direction based on the values ​​of X1 and X2, send the ink outlet position coordinates of the label consumable to the printing control module, and control the print head to discharge ink at the corresponding position; after printing is completed, obtain feedback information on the printing result, collect and analyze the printing deviation data, and dynamically adjust and optimize the ink outlet position through a machine learning algorithm.

5. The method for automatically positioning the starting point of label printing consumables according to claim 1, characterized in that: Use the stepping reverse distance method. After the X-axis is measured, perform the Y-axis measurement. Use the current Y-axis position as the reference Y direction 0 starting point. After clearing the Y-axis motor step number, spit out 3 labels, including: Get the current position of the Y-axis at the end of the X-axis measurement, set this position as the reference 0 point of the Y-axis, and record this position information; clear the current number of steps of the Y-axis motor so that a new step count can be started from the reference 0 point; start the label spitting mechanism, spit out 3 labels in sequence, and record the change in the number of steps of the Y-axis motor each time a label is spit out; calculate the Y-axis displacement distance corresponding to each label according to the number of steps recorded when spitting out each label through the step back calculation method; compare the displacement distance of each label with the reference 0 point to determine the relative Y-axis position of each label; when the number of steps is abnormal during the label spitting process, it is judged that the motor is faulty, record the abnormal information and suspend the spitting process; then summarize the relative Y-axis position data of each label to generate a Y-axis measurement result report.

6. The method for automatically positioning the starting point of label printing consumables according to claim 1, characterized in that: When the photoelectric sensor passes the edge of the tag, the mainboard immediately records the current step value, generates a step set, and then converts it into a metric distance set L2. The matching data set is searched in the set L2, including: Acquire the photoelectric sensor signal, and when the label edge is detected, immediately record the current step value, and store the step value in the step set, convert each step value in the step set into the corresponding metric distance through a preset conversion formula, and generate a metric distance set L2; in the metric distance set L2, use a matching algorithm to find data points that match the preset data set; when a matching data point is found, determine the Y1 and Y2 values ​​in the matching data point, and calculate the difference between Y1 and Y2, which is the first ink outlet line position of the current label consumable on the Y axis; transmit the calculated Y-axis first ink outlet line position information to the printing control system for adjusting the precise position of the print head on the Y axis; when no matching data point is found in the metric distance set L2, return an error message, prompting to recalibrate the photoelectric sensor or check the position of the label consumable.

7. The method for automatically positioning the starting point of label printing consumables according to claim 1, characterized in that: In unattended continuous printing, when the car prints a specified number of times, it will perform the measurement steps of S2-S4 and update the XY starting point, including: Get the preset print count threshold, record the current print count, if the current print count is equal to the preset threshold, trigger the measurement step, in the measurement step, use the sensor to obtain the X-axis and Y-axis coordinate data of the current position of the trolley, record as the initial measurement data, filter the initial measurement data through the data processing module, obtain smooth X-axis and Y-axis coordinate data, calculate the deviation value from the preset starting point according to the smoothed X-axis and Y-axis coordinate data, determine the X-axis starting point deviation and the Y-axis starting point deviation, when the X-axis starting point deviation or the Y-axis starting point deviation exceeds the preset allowable range, adjust the trolley position through the control system, recalibrate the X-axis and Y-axis starting points; update the calibrated X-axis and Y-axis starting point coordinates to the printing control system as the new printing starting point, and continue to execute the printing task; reset the current printing count counter, continue to record the new printing count, and wait for the next measurement step to be triggered.

8. The method for automatically positioning the starting point of label printing consumables according to claim 1, characterized in that: Realize the update of the starting point of the current new label consumables, including: Obtain the preset standard position information and size information of the new consumable as the target position and size; obtain the detection information of the actual position and size of the new consumable after replacement, compare the detection information with the target position and size, and when it is detected that the position of the new consumable is offset, determine the adjustment parameters of the position calibration according to the offset; when it is detected that the size of the new consumable does not match the target size, determine whether the consumable type is correct, and when the type does not match, prompt replacement, and when the type matches, determine the adjustment parameters of the size calibration; according to the determined position calibration adjustment parameters, use actuators such as a robotic arm or a servo motor to automatically adjust the actual position of the new consumable to align it with the target position; according to the determined size calibration adjustment parameters, use an image processing algorithm to calibrate the size of the new consumable, and scale the collected consumable image to match it with the target size; after completing the position calibration and size calibration of the new consumable, update the calibrated starting position of the new consumable to the device parameters as the starting point reference for using the new consumable, so as to realize automatic update of the starting point of the new consumable.

9. A printing device, characterized in that: The method comprises a processor, a memory and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method according to any one of claims 1 to 8 is implemented.

10. A storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method described in any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Automatic alignment method and device for mobile phone shell printer consumables and storage medium

    CN120382738A