Label printer control method and device, label printer and storage medium
By using the first sensor and the second sensor in the label printer to accurately control the paper-moving and printing operations of the label paper, the problem of inaccurate printing of the label printer is solved, and efficient and low-cost label printing is achieved.
Patent Information
- Application Number
- CN202510569228.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-07-25
AI Technical Summary
When printing label paper, existing label printers cannot accurately print the printing information on the label paper, which can easily lead to printing offset or missing surface paper, resulting in low printing efficiency and waste of paper.
By setting the first sensor and the second sensor in the label printer, the paper removal and printing operations of the label paper are accurately controlled, ensuring that the gaps of the paper to be printed are aligned with the tearing knife position, and printing begins after the preset printing position is aligned.
Improves printing accuracy and efficiency, reduces paper waste and printing costs, and provides a convenient and efficient printing experience.
Smart Images

Figure CN120363611A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of label printers. Specifically, this application relates to a control method, device, label printer, and storage medium for a label printer. Background Art
[0002] A label refers to the text, graphic symbols, and all explanatory materials on a product. Labels are widely used in scenarios such as supermarket retail, industrial production, express delivery, clothing, office management, etc., such as price labels, product description labels, shelf labels, barcode labels, clothing labels, document official document labels, file storage labels, labels for various items and stationery, express waybills, etc.
[0003] In the prior art, after putting the label paper into the printer cover, the first label paper needs to be pulled out of the printer for a certain distance. If printed directly, the information to be printed cannot be accurately printed on the label paper surface, and the surface paper may be offset or missed, requiring repeated reprinting, resulting in low printing work efficiency. Summary of the Invention
[0004] Embodiments of this application provide a control method, device, label printer, and storage medium for a label printer. By precisely controlling the label printer to perform operations such as paper feeding alignment and printing through two sensors, the overall optimization of the label paper printing process is realized. It not only improves the printing efficiency and accuracy but also reduces paper waste and printing costs, enhances the printing flexibility, and provides users with a more convenient, efficient, and accurate printing experience. The above technical solutions are as follows:
[0005] In a first aspect, embodiments of this application provide a control method for a label printer. The label printer includes a first sensor, a printing line, a second sensor, and a paper cutter; in the paper feeding direction, the first sensor is located between the printing line and the paper cutter, the second sensor is located upstream of the printing line, and the paper cutter is located downstream of the printing line; the method includes: when the first sensor detects the paper head of the label paper, determining whether the printing surface paper on the label paper is peeled off from the base paper of the label paper based on the second sensor; the label paper includes a base paper and multiple surface papers attached to the base paper, and there is a gap between every two adjacent surface papers; controlling the paper feeding of the label paper based on the peeling determination result corresponding to the printing surface paper, so that the upper gap of the printing surface paper on the label paper aligns with the first position where the paper cutter is located; controlling the label paper to feed back until the preset printing position of the printing surface paper aligns with the printing line, and then starting to print the printing surface paper.
[0006] In a possible implementation, before, based on the second sensor, determining whether the paper surface to be printed on the label paper is peeled off from the base paper of the label paper when the first sensor detects the leading edge of the label paper, the method further includes: when the first sensor detects the label paper, controlling the label paper to feed backward; when the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper, controlling the label paper to stop feeding backward so that the leading edge of the label paper is aligned with the second position where the first sensor is located.
[0007] In a possible implementation, the label printer further includes a motor for driving the label paper to feed; after controlling the label paper to feed backward when the first sensor detects the label paper, the method further includes: during the process that the first detection result of the first sensor is detecting the label paper and has not changed to not detecting the label paper, determining whether the current backward feed step number corresponding to the motor exceeds a first preset step number; if so, controlling the label paper to perform paper feed positioning so that the upper gap of the paper surface to be printed on the label paper is aligned with the first position where the paper tearing knife is located; if not, controlling the label paper to continue feeding backward and performing the step of controlling the label paper to stop feeding backward when the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper.
[0008] In a possible implementation, before, based on the second sensor, determining whether the paper surface to be printed on the label paper is peeled off from the base paper of the label paper when the first sensor detects the leading edge of the label paper, the method further includes: when the first sensor does not detect the label paper, controlling the label paper to feed forward; when the first detection result of the first sensor changes from not detecting the label paper to detecting the label paper, controlling the label paper to stop feeding forward so that the leading edge of the label paper is aligned with the second position where the first sensor is located.
[0009] In a possible implementation, the label printer further includes a motor for driving the label paper to feed; after controlling the label paper to feed forward when the first sensor does not detect the label paper, the method further includes: when the first detection result of the first sensor is not detecting the label paper and has not changed to detecting the label paper, determining whether the current forward feed step number corresponding to the motor exceeds a second preset step number; if so, sending a target prompt message; if not, controlling the label paper to continue feeding forward and performing the step of controlling the label paper to stop feeding forward when the first detection result of the first sensor changes from not detecting the label paper to detecting the label paper.
[0010] In a possible implementation, the first distance between the second sensor and the first sensor is greater than the length of the to-be-printed face paper and less than the sum of the length of the to-be-printed face paper and the second distance; the second distance is the distance between the first sensor and the printing line; when the first sensor detects the paper head of the label paper, determining whether the to-be-printed face paper on the label paper is peeled off from the base paper of the label paper based on the second sensor includes: when the first sensor detects the paper head of the label paper, if the second sensor detects the base paper where the gap is located, controlling the label paper to rewind; before the paper head rewinds to the third position where the printing line is located, if the second sensor detects the to-be-printed face paper on the label paper, determining that the to-be-printed face paper on the label paper is not peeled off from the base paper of the label paper; before the paper head rewinds to the third position where the printing line is located, if the second sensor does not detect the to-be-printed face paper on the label paper, determining that the to-be-printed face paper on the label paper is peeled off from the base paper of the label paper.
[0011] In a possible implementation, controlling the label paper to feed paper based on the peeling judgment result corresponding to the to-be-printed face paper so that the upper gap of the to-be-printed face paper on the label paper aligns with the first position where the paper cutter is located includes: if the to-be-printed face paper is not peeled off from the base paper, controlling the label paper to feed paper so that the upper gap of the to-be-printed face paper on the label paper aligns with the first position where the paper cutter is located; if the to-be-printed face paper is peeled off from the base paper, controlling the label paper to perform paper feeding and positioning so that the upper gap of the next face paper on the label paper aligns with the first position where the paper cutter is located.
[0012] In a possible implementation, the first distance between the second sensor and the first sensor is less than the length of the to-be-printed face paper; when the first sensor detects the paper head of the label paper, determining whether the to-be-printed face paper on the label paper is peeled off from the base paper of the label paper based on the second sensor includes: when the first sensor detects the paper head of the label paper, if the second sensor detects the to-be-printed face paper on the label paper, determining that the to-be-printed face paper on the label paper is not peeled off from the base paper of the label paper.
[0013] In a possible implementation, the to-be-printed face paper is the first face paper on the label paper; controlling the paper feeding of the label paper based on the peeling judgment result corresponding to the to-be-printed face paper to align the upper gap of the to-be-printed face paper on the label paper with the first position where the paper tearing knife is located includes: when the paper head is aligned with the second position where the first sensor is located and the to-be-printed face paper is not peeled off from the base paper, controlling the label paper to feed out a first distance so that the upper gap of the to-be-printed face paper on the label paper is aligned with the first position where the paper tearing knife is located; the first distance is the distance between the first position where the paper tearing knife is located and the second position where the first sensor is located.
[0014] In a possible implementation, controlling the label paper to perform paper feeding and positioning so that the upper gap of the to-be-printed face paper on the label paper is aligned with the first position where the paper tearing knife is located includes:
[0015] If the second sensor detects the base paper corresponding to the gap, controlling the label paper to feed out, and after the second sensor detects the upper edge of the to-be-printed face paper, controlling the label paper to continue feeding out a second distance; if the second sensor detects the to-be-printed face paper on the label paper, controlling the label paper to feed back and after the second sensor detects the upper edge of the to-be-printed face paper, controlling the label paper to feed out a second distance; where the second distance is the distance between the first position where the paper tearing knife is located and the fourth position where the second sensor is located.
[0016] In a possible implementation, controlling the label paper to perform paper feeding and positioning so that the upper gap of the to-be-printed face paper on the label paper is aligned with the first position where the paper tearing knife is located includes: if the second sensor detects the base paper corresponding to the gap, controlling the label paper to feed out, and after the second sensor detects the upper edge of the to-be-printed face paper, controlling the label paper to continue feeding out a second distance; if the second sensor detects the to-be-printed face paper on the label paper, controlling the label paper to feed out and after the second sensor detects the base paper corresponding to the gap, controlling the label paper to continue feeding out until after the second sensor detects the upper edge of the to-be-printed face paper, controlling the label paper to feed out a second distance; where the second distance is the distance between the first position where the paper tearing knife is located and the fourth position where the second sensor is located.
[0017] In a possible implementation, the above label printer further includes a motor, and the motor is used to drive the label paper to feed; if the second sensor detects the backing paper corresponding to the gap, after controlling the label paper to feed outwards, the method further includes: before the second sensor detects the upper edge of the to-be-printed face paper, determining whether the current paper-feeding steps corresponding to the motor exceed a third preset number of steps; if so, sending a first positioning abnormality prompt message.
[0018] In a possible implementation, the above label printer further includes a motor, and the motor is used to drive the label paper to feed; if the second sensor detects the to-be-printed face paper on the label paper, after controlling the label paper to rewind, the method further includes: before the second sensor detects the upper edge of the to-be-printed face paper, determining whether the current paper-feeding steps corresponding to the motor exceed a fourth preset number of steps; if so, sending a second positioning abnormality prompt message.
[0019] In a possible implementation, the method further includes: after receiving a printing instruction, in response to the printing instruction, performing the step of controlling the label paper to rewind until the preset printing position of the to-be-printed face paper is aligned with the printing line, and then starting to print the to-be-printed face paper.
[0020] In a second aspect, an embodiment of the present application provides a control device for a label printer. The label printer includes a first sensor, a printing line, a second sensor, and a paper cutter; in the paper-feeding direction, the first sensor is located between the printing line and the paper cutter, the second sensor is located upstream of the printing line, and the paper cutter is located downstream of the printing line; the device includes:
[0021] A first judgment module, configured to, when the first sensor detects the paper head of the label paper, judge whether the to-be-printed face paper on the label paper is peeled off from the backing paper of the label paper based on the second sensor; the label paper includes a backing paper and multiple face papers attached to the backing paper, and there is a gap between every two adjacent face papers;
[0022] A first control module, configured to control the label paper to feed based on the peeling judgment result corresponding to the to-be-printed face paper, so that the upper gap of the to-be-printed face paper on the label paper is aligned with the first position where the paper cutter is located;
[0023] A second control module, configured to control the label paper to rewind until the preset printing position of the to-be-printed face paper is aligned with the printing line, and then start to print the to-be-printed face paper.
[0024] In a third aspect, an embodiment of the present application provides a control device for a label printer, including: a processor and a memory; wherein, the memory stores a computer program, and when the processor executes the computer program, the method steps provided in the first aspect or any possible implementation manner of the first aspect of the embodiment of the present application are implemented.
[0025] In a fourth aspect, an embodiment of the present application provides a computer storage medium, which stores multiple instructions, and the above instructions are suitable for being loaded and executed by a processor to implement the method steps provided in the first aspect or any possible implementation manner of the first aspect of the embodiment of the present application.
[0026] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program; when the above computer program is executed by a processor, the method steps provided in the first aspect or any possible implementation manner of the first aspect of the embodiment of the present application are implemented.
[0027] For the above control method, device, equipment, label printer and storage medium of the label printer, by setting a second sensor upstream of the printing line in the paper feeding direction of the label paper, setting a first sensor between the printing line and the paper cutter, and in the case where the first sensor detects the paper head of the label paper, first using the second sensor located upstream of the printing line for precise detection to determine whether the paper surface to be printed on the label paper has been peeled off from the bottom paper of the label paper. Thus, by detecting the peeling state of the paper surface to be printed in advance, the accuracy and stability of subsequent printing operations can be ensured, and problems such as inaccurate printing positioning or paper jams caused by the peeled paper surface can be avoided; then, based on the peeling judgment result corresponding to the paper surface to be printed, the paper feeding of the label paper is controlled to align the upper gap of the paper surface to be printed on the label paper with the first position where the paper cutter is located, so as to prepare for starting printing, ensure that the printing information can be completely displayed on the paper surface to be printed subsequently, further improve printing accuracy, and at the same time reduce paper waste and printing costs; finally, the label paper is controlled to feed back until the preset printing position of the paper surface to be printed is aligned with the printing line, and then the paper surface to be printed is started to be printed. Thus, through the paper feeding back operation, it is ensured that the printed content can accurately fall on the preset printing position, meet the high requirements of users for printing effects, improve the flexibility of printing, and after the preset printing position is aligned, the printing operation is started, thereby ensuring that the complete printing information is accurately printed on the paper surface to be printed.
[0028] In summary, the embodiments of the present application precisely control the label printer to perform operations such as paper feeding alignment and printing through two sensors, realizing a comprehensive optimization of the label paper printing process, not only improving printing efficiency and accuracy, but also reducing paper waste and printing costs, improving the flexibility of printing, and providing users with a more convenient, efficient and accurate printing experience. Description of the Drawings
[0029] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0030] Figure 1 Schematic diagram of the structural relationship of a label printer provided by an exemplary embodiment of the present application;
[0031] Figure 2 Schematic flowchart of a control method for a label printer provided by an exemplary embodiment of the present application;
[0032] Figure 3 Schematic flowchart for judging whether the printing surface paper on a label paper is peeled off from the label paper base provided by an exemplary embodiment of the present application;
[0033] Figure 4 Schematic flowchart of another control method for a label printer provided by an exemplary embodiment of the present application;
[0034] Figure 5 Schematic diagram of the structure of a control device for a label printer provided by an exemplary embodiment of the present application;
[0035] Figure 6 Schematic diagram of the structure of a label printer provided by an exemplary embodiment of the present application. Detailed implementation manners
[0036] In order to make the purpose, technical solutions and advantages of the present application more clear and understandable, the following further details the present application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0037] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be construed as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to specific situations. In addition, in the description of the present application, unless otherwise specified, "a plurality of" means two or more. "And" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.
[0038] Next, please refer to Figure 1, which exemplarily shows a schematic structural relationship diagram of a label printer provided by an embodiment of the present application. As Figure 1 shown, the label printer may but is not limited to include: a paper cutter 110, a first sensor 120, a printing line 130, a rubber roller 140, and a second sensor 150. Among them,
[0039] In the paper output direction of the label paper 160, the first sensor 120 is located between the printing line 130 and the paper cutter 110, the second sensor 150 is located upstream of the printing line 130, and the paper cutter 110 is located downstream of the printing line 130.
[0040] The above-mentioned paper cutter 110 is used to perform a cutting action on the label paper 160 to cut off the printed face paper from the label paper. The above-mentioned label paper 160 includes a base paper 161 and multiple face papers 162 attached to the base paper, and there is a gap 163 between every two adjacent face papers 162.
[0041] The first sensor 120 and the second sensor 150 may but are not limited to be photoelectric sensors, and may but are not limited to determine the situation of the label paper 160 corresponding to its current position by emitting a light signal in the direction of the label paper 160 and receiving the corresponding light response value. The above-mentioned light response value may but is not limited to include a reflection value and / or a projection value.
[0042] The above-mentioned printing line 130 is arranged on the print head of the label printer, and it is responsible for transferring printing materials such as ink or toner to the face paper 162 of the label paper 160 to form characters, images or charts. According to different printing technologies, the structure and working principle of the print head are also different, and the embodiments of the present application do not limit this.
[0043] The above-mentioned print head is mainly driven by the motor of the label printer. In the embodiment of the present application, after the rotation of the motor passes through the mechanical transmission mechanism, it can drive the rubber roller 140 to rotate, and then drive the label paper 160 to move.
[0044] Specifically, when the label printer detects the paper head 164 of the label paper 160 by the first sensor 120, it can first judge whether the face paper 162a to be printed on the label paper 160 is peeled off from the base paper 161 of the label paper 160 based on the second sensor 150; then, control the paper feeding of the label paper 160 based on the peeling judgment result corresponding to the face paper 162a to be printed, so that the upper gap 170 of the face paper 162a to be printed on the label paper 160 is aligned with the first position 111 where the paper cutter 110 is located; finally, control the label paper 160 to feed back until the preset printing position of the face paper 162a to be printed is aligned with the printing line 130, and then start printing the face paper 162a to be printed.
[0045] Understandably, the above label printer may also include, but is not limited to, one or more buttons, a display screen, an indicator light, etc.
[0046] Understandably, the control method of the label printer provided by the embodiments of the present application may be executed by the controller of the above label printer, or may be executed by the controller of the above label printer and a terminal communicatively connected to the above label printer. The embodiments of the present application do not make any limitations in this regard.
[0047] Next, in combination with Figure 1 , an introduction will be made to a control method of a label printer provided by an exemplary embodiment of the present application. Specifically, please refer to Figure 2 , which exemplarily shows a schematic flowchart of a control method of a label printer provided by the embodiments of the present application. As Figure 2 shown, the control method of the label printer includes the following steps:
[0048] S201, when the first sensor detects the paper head of the label paper, based on the second sensor, determine whether the paper surface to be printed on the label paper is peeled off from the base paper of the label paper.
[0049] Specifically, the above label paper includes a base paper and multiple sheets of paper surface attached to the base paper. There is a gap between every two adjacent sheets of paper surface, which is convenient for the paper cutter to accurately cut the paper surface after printing. The lengths of the above multiple sheets of paper surface are the same, and the lengths of the gaps between every two adjacent sheets of paper surface are the same. Before the label printer starts printing, the first sensor located between the printing line and the paper cutter will be used for detection first. If the first sensor detects the paper head of the label paper, it means that the paper head of the label paper is currently exactly aligned with the second position where the first step sensor is located. Then, the second sensor located upstream of the printing line can be further used for detection, and based on the detection result of the second sensor, determine whether the paper surface to be printed on the label paper is peeled off from the base paper of the label paper. The above paper surface to be printed may include, but is not limited to, the first sheet of paper surface on the label paper, or, a sheet of paper to be printed specified by the user, or, when the first sensor detects the paper head of the label paper, the paper surface on the label paper upstream of the fourth position where the second sensor is located or covering the above fourth position, etc.
[0050] In some possible embodiments, the first distance between the above second sensor and the first sensor is greater than the length of the paper surface to be printed and less than the sum of the length of the paper surface to be printed and the second distance, and the second distance is the distance between the first sensor and the printing line. As Figure 3 shown, the implementation process of the above S201, when the first sensor detects the paper head of the label paper, based on the second sensor to determine whether the paper surface to be printed on the label paper is peeled off from the base paper of the label paper may include, but is not limited to:
[0051] S301. When the first sensor detects the leading edge of the label paper, if the second sensor detects the backing paper where the slit is located, control the label paper to rewind.
[0052] Specifically, when the first sensor detects the leading edge of the label paper, if the second sensor detects the backing paper where the slit is located but does not detect the face paper, it may be due to the short length of the face paper, that is, the face paper is completely downstream of the second sensor. To accurately determine whether the face paper to be printed on the label paper (i.e., the first face paper on the label paper) is peeled off from the backing paper of the label paper, the label paper can be controlled to rewind first, and the second sensor can be used for continuous detection.
[0053] S302. Before the leading edge rewinds to the third position where the printing line is located, if the second sensor detects the face paper to be printed on the label paper, it is determined that the face paper to be printed on the label paper has not been peeled off from the backing paper of the label paper.
[0054] Specifically, before the leading edge rewinds to the third position where the printing line is located, that is, during the process of controlling the label paper to rewind until the distance reaches the second distance (i.e., the distance between the first sensor and the printing line), if the second sensor detects the face paper to be printed on the label paper, it can be determined that the face paper to be printed on the label paper has not been peeled off from the backing paper of the label paper.
[0055] S303. Before the leading edge rewinds to the third position where the printing line is located, if the second sensor does not detect the face paper to be printed on the label paper, it is determined that the face paper to be printed on the label paper has been peeled off from the backing paper of the label paper.
[0056] Specifically, before the leading edge rewinds to the third position where the printing line is located, that is, during the process of controlling the label paper to rewind until the distance reaches the second distance (i.e., the distance between the first sensor and the printing line), if the second sensor does not detect the face paper to be printed on the label paper and still only detects the backing paper of the label paper, it can be determined that the face paper to be printed on the label paper has been peeled off from the backing paper of the label paper.
[0057] Optionally, when the leading edge rewinds to the third position where the printing line is located, that is, when the distance of controlling the label paper to rewind reaches the second distance, the label paper will be controlled to stop rewinding to avoid the problem that over-rewinding causes the leading edge to rewind to the upstream position of the printing line, resulting in unsmooth paper feeding when the subsequent label paper is fed out.
[0058] Optionally, before the paper head of the label paper returns to the third position where the printing line is located, that is, before the distance for controlling the label paper to return reaches the second distance, when the detection result of the second sensor has switched from only detecting the base paper to detecting the printable face paper on the label paper, since it can be determined that the printable face paper has not been peeled off from the base paper of the label paper, the label paper can be directly controlled to stop returning, avoiding the problem of subsequent ineffective return of the label paper and improving the positioning efficiency of label printing.
[0059] In some possible embodiments, in an application scenario where the length of the printable face paper is greater than or equal to the first distance between the second sensor and the first sensor, the implementation process of the above S201 for determining whether the printable face paper on the label paper is peeled off from the base paper of the label paper based on the second sensor when the first sensor detects the paper head of the label paper may but is not limited to include: when the first sensor detects the paper head of the label paper, if the second sensor detects the printable face paper on the label paper, it is determined that the printable face paper on the label paper has not been peeled off from the base paper of the label paper. If the second sensor detects the base paper on the label paper and does not detect the printable face paper, it can be determined that the printable face paper on the label paper has been peeled off from the base paper of the label paper.
[0060] The above first sensor and second sensor may but are not limited to be photoelectric sensors. The light response values generated by the base paper and the face paper respectively for the light signal emitted by the photoelectric sensor are different. The light response values may but are not limited to include reflection values and / or transmission values. The second sensor can detect by emitting a light signal to the label paper. When the corresponding light response value it receives is the first value, it can be determined that what it detects is the face paper of the label paper. When the corresponding light response value it receives is the second value, it can be determined that what it detects is the base paper corresponding to the gap on the label paper. Thus, by judging the detection of the base paper and the face paper through the light response value, real-time detection can be carried out, accelerating the positioning process of the face paper of the label paper. The above first value can be any value within the first interval, the second value can be any value within the second interval, and the first interval and the second interval do not overlap.
[0061] Next, please continue to refer to Figure 2 , as Figure 2 shown, after the above S201 determines whether the printable face paper on the label paper is peeled off from the base paper of the label paper based on the second sensor when the first sensor detects the paper head of the label paper, the control method of the label printer may but is not limited to include:
[0062] S202, controlling the label paper to feed based on the peeling judgment result corresponding to the printable face paper, so that the upper gap of the printable face paper on the label paper is aligned with the first position where the paper cutter is located.
[0063] Specifically, the upper gap of the paper to be printed is the gap adjacent to the paper to be printed and far from the paper outlet of the label printer. After obtaining the peeling judgment result corresponding to the paper to be printed by using the second sensor, the label paper feeding can be controlled based on this peeling judgment result until the upper gap of the paper to be printed on the label paper aligns with the first position where the paper cutter is located, then the feeding positioning of the paper to be printed on the label paper is completed. After that, aligning the preset printing position of the paper to be printed with the printing line enables printing, thus ensuring that the complete information to be printed can be printed on the paper to be printed on the label paper.
[0064] Optionally, if the paper to be printed is not peeled off from the backing paper, the label paper feeding can be directly controlled to align the upper gap of the paper to be printed on the label paper with the first position where the paper cutter is located. If the paper to be printed is peeled off from the backing paper, it indicates that there is no paper to be printed on the label paper downstream of the second sensor, then the label paper can be controlled for paper outlet positioning to align the upper gap of the next paper on the label paper with the first position where the paper cutter is located.
[0065] Optionally, the above paper to be printed can be the first paper on the label paper. When the paper head aligns with the second position where the first sensor is located and the paper to be printed is not peeled off from the backing paper, the label paper can be directly controlled to feed outwards by a first distance, so that the upper gap of the paper to be printed on the label paper aligns with the first position where the paper cutter is located, thereby realizing efficient and accurate paper outlet positioning control of the label paper. The above first distance is the distance between the first position where the paper cutter is located and the second position where the first sensor is located.
[0066] S203, Control the label paper to feed back until the preset printing position of the paper to be printed aligns with the printing line, and then start printing the paper to be printed.
[0067] Specifically, after the upper gap of the paper to be printed on the label paper aligns with the first position where the paper cutter is located, that is, after the paper feeding back positioning process is completed, the label paper can be controlled to feed back until the preset printing position of the paper to be printed aligns with the printing line before starting printing. Positioning the paper to be printed first and then moving to the printing position can speed up the printing process and improve printing efficiency and quality. The above preset printing position can be the edge position on the paper to be printed close to the paper outlet of the label printer, or any position preset and specified by the user. The embodiments of the present application do not limit this.
[0068] Optionally, after the upper gap of the paper to be printed on the label paper aligns with the first position where the paper cutter is located, after receiving a printing instruction, in response to this printing instruction, perform the above S203 to control the label paper to feed back until the preset printing position of the paper to be printed aligns with the printing line, and then start printing the paper to be printed.
[0069] In the embodiment of the present application, a second sensor is provided upstream of the printing line in the paper feeding direction of the label paper, and a first sensor is provided between the printing line and the paper cutter. When the first sensor detects the paper head of the label paper, the second sensor located upstream of the printing line is first used for precise detection to determine whether the paper surface to be printed on the label paper has been peeled off from the bottom paper of the label paper. By detecting the peeling state of the paper surface to be printed in advance, the accuracy and stability of subsequent printing operations can be ensured, and problems such as inaccurate printing positioning or paper jams caused by the peeled paper surface can be avoided. Then, based on the peeling judgment result corresponding to the paper surface to be printed, the paper feeding of the label paper is controlled so that the upper gap of the paper surface to be printed on the label paper is aligned with the first position where the paper cutter is located, preparing for starting printing, ensuring that the printing information can be completely displayed on the paper surface to be printed subsequently, further improving printing accuracy, while reducing paper waste and printing costs. Finally, the label paper is controlled to feed back until the preset printing position of the paper surface to be printed is aligned with the printing line, and then the paper surface to be printed is started to be printed. By the paper feeding back operation, it is ensured that the printed content can accurately fall on the preset printing position, meeting the high requirements of users for the printing effect, improving the flexibility of printing, and starting the printing operation after the preset printing position is aligned, thereby ensuring that the complete printing information is accurately printed on the paper surface to be printed.
[0070] In summary, the embodiment of the present application precisely controls operations such as paper feeding alignment and printing of the label printer through two sensors, realizing a comprehensive optimization of the label paper printing process. It not only improves printing efficiency and accuracy, but also reduces paper waste and printing costs, improves the flexibility of printing, and provides users with a more convenient, efficient and accurate printing experience.
[0071] Next, please refer to Figure 4 , which exemplarily shows a schematic flowchart of another control method for a label printer provided by the embodiment of the present application. As Figure 4 shown, the control method of the label printer includes the following steps:
[0072] S401, when the first sensor detects the label paper, control the label paper to feed back.
[0073] Specifically, when the user wants to print a label paper, the user can place the label paper at a preset position of the label printer, so that the rubber roller can drive the label paper to perform paper feeding or paper returning actions such as paper feeding through rotation or the like. After the label printer detects that the label paper is placed, or after receiving the user's printing instruction, it can first start the first sensor for detection. When the first sensor detects the label paper (the backing paper and the face paper of the label paper), it indicates that there may be a problem of excessive paper feeding of the label paper at present. Then, it is necessary to control the label paper to return paper to position the paper head of the label paper, so as to avoid the problem that the face paper on the already fed label paper cannot be printed due to excessive paper feeding of the label paper, resulting in waste of the face paper.
[0074] S402, when the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper, control the label paper to stop returning paper, so that the paper head of the label paper aligns with the second position where the first sensor is located.
[0075] Specifically, during the process of controlling the label paper to return paper, when the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper (i.e., detecting air), it indicates that the paper head of the label paper just returns to the second position where the first sensor is located. Then, the label paper can be controlled to stop returning paper, so that the paper head of the label paper aligns with the second position where the first sensor is located to position the paper head of the label paper.
[0076] In some possible embodiments, the label printer further includes a motor, and the motor is used to drive the rubber roller to drive the label paper to feed paper. During the process of controlling the label paper to return paper, and when the first detection result of the first sensor is detecting the label paper and has not changed to not detecting the label paper, it can be continuously determined whether the current paper returning step number corresponding to the motor exceeds the first preset step number; if so, control the label paper to perform paper feeding positioning, so that the upper slit of the face paper to be printed on the label paper (i.e., the face paper corresponding to the upper slit located upstream of the paper tearing knife when the paper returning step number exceeds the first preset step number) aligns with the first position where the paper tearing knife is located, to avoid the problem that the subsequent label paper will have unsmooth paper feeding when feeding paper or the label paper itself has excessive paper feeding and keeps returning paper, which affects the printing efficiency. If not, control the label paper to continue returning paper, and execute the step of controlling the label paper to stop returning paper when the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper as described above.
[0077] Optionally, the implementation process of controlling the above-mentioned label paper for paper feeding and positioning so that the upper gap of the paper surface to be printed on the label paper aligns with the first position where the paper tearing knife is located may include, but is not limited to: if the second sensor detects the base paper corresponding to the gap, control the label paper to feed outwards, and after the second sensor detects the upper edge of the paper surface to be printed, control the label paper to continue feeding outwards for a second distance; if the second sensor detects the paper surface to be printed on the label paper, control the label paper to feed back and after the second sensor detects the upper edge of the paper surface to be printed, control the label paper to feed outwards for a second distance; wherein, the above-mentioned second distance is the distance between the first position where the paper tearing knife is located and the fourth position where the second sensor is located.
[0078] Optionally, the implementation process of controlling the above-mentioned label paper for paper feeding and positioning so that the upper gap of the paper surface to be printed on the label paper aligns with the first position where the paper tearing knife is located may also include, but is not limited to: if the second sensor detects the base paper corresponding to the gap, control the label paper to feed outwards, and after the second sensor detects the upper edge of the paper surface to be printed, control the label paper to continue feeding outwards for a second distance; if the second sensor detects the paper surface to be printed on the label paper, control the label paper to feed outwards and after the second sensor detects the base paper corresponding to the gap, control the label paper to continue feeding outwards until after the second sensor detects the upper edge of the paper surface to be printed, control the label paper to feed outwards for a second distance; wherein, the second distance is the distance between the first position where the paper tearing knife is located and the fourth position where the second sensor is located.
[0079] The upper edge of the above-mentioned paper surface to be printed is the edge where the paper surface to be printed is correspondingly far from the next sheet of paper.
[0080] Further, after the above-mentioned control that if the second sensor detects the base paper corresponding to the gap, the label paper feeds outwards, before the second sensor detects the upper edge of the paper surface to be printed, it is also possible to first determine whether the current paper feeding steps corresponding to the motor exceed a third preset number of steps; if so, send a first positioning exception prompt message. Remind the user that there is a positioning exception, and this exception may be caused by the fact that the paper surface on the base paper of the label paper is largely peeled off, resulting in the second sensor always detecting the base paper corresponding to the gap and not detecting the upper edge of the paper surface for a long time. At this time, the user needs to check in time and re-place the label paper.
[0081] Further, after the above-mentioned control that if the second sensor detects the paper surface to be printed on the label paper, the label paper feeds back, before the second sensor detects the upper edge of the paper surface to be printed, it is also possible to determine whether the current paper feeding steps corresponding to the motor exceed a fourth preset number of steps; if so, send a second positioning exception prompt message. Remind the user that there is a positioning exception, and there may be a paper jamming phenomenon. Although the motor rotates to drive the label paper to feed back, in fact, the label paper does not move, and the second sensor will always detect the paper surface and will not detect the base paper corresponding to the gap.
[0082] Next, please continue to refer to Figure 4 , as shown in Figure 4 , the control method of the label printer may also but is not limited to include the following steps:
[0083] S403, when the first sensor does not detect the label paper, control the label paper to feed outwards.
[0084] Specifically, when the user wants to print label paper, the user can place the label paper at a preset position of the label printer, so that the rubber roller can drive the label paper to perform paper feeding or paper returning and other paper feeding actions by rotating or the like. After the label printer detects that the label paper is placed, or after receiving the user's printing instruction, it can first start the first sensor for detection, and when the first sensor does not detect the label paper (the base paper and the face paper of the label paper), it means that the paper head of the label paper has not reached the position where the first sensor is located yet, then it is necessary to control the label paper to feed outwards to locate the paper head of the label paper.
[0085] S404, when the first detection result of the first sensor changes from not detecting the label paper to detecting the label paper, control the label paper to stop feeding, so that the paper head of the label paper aligns with the second position where the first sensor is located.
[0086] Specifically, during the process of controlling the label paper to feed outwards, when the first detection result of the first sensor changes from not detecting the label paper (i.e., detecting air) to detecting the label paper (the base paper or the face paper), it means that the paper head of the label paper just returns to the second position where the first sensor is located, then the label paper can be controlled to stop feeding, so that the paper head of the label paper aligns with the second position where the first sensor is located to locate the paper head of the label paper.
[0087] Optionally, after controlling the label paper to feed outwards when the first sensor does not detect the label paper, it may also but is not limited to include: when the first detection result of the first sensor is not detecting the label paper and has not changed to detecting the label paper, judge whether the current paper feeding steps corresponding to the motor exceed the second preset steps; if so, send a target prompt message to prompt the user that the paper head may not be placed downstream of the printing line when placing the label paper, resulting in a problem of unsmooth paper feeding. At this time, even if the motor keeps rotating, the label paper will not move to the position of the first sensor. If not, control the label paper to continue feeding outwards, and execute the step of controlling the label paper to stop feeding when the first detection result of the first sensor changes from not detecting the label paper to detecting the label paper.
[0088] S405, when the first sensor detects the paper head of the label paper, judge whether the face paper to be printed on the label paper is peeled off from the base paper of the label paper based on the second sensor.
[0089] Specifically, the above S405 is the same as the above S201, which will not be elaborated here.
[0090] S406. Control the paper feeding of the label paper based on the peeling judgment result corresponding to the paper surface to be printed, so that the upper gap of the paper surface to be printed on the label paper aligns with the first position where the paper tearing knife is located.
[0091] Specifically, the above S406 is the same as the above S202, which will not be elaborated here.
[0092] S407. Control the label paper to return paper until the preset printing position of the paper surface to be printed aligns with the printing line, and then start printing the paper surface to be printed.
[0093] Specifically, the above S407 is the same as the above S203, which will not be elaborated here.
[0094] Next, please refer to Figure 5 , which is a schematic structural diagram of a control device of a label printer provided by an embodiment of the present application. The above label printer includes a first sensor, a printing line, a second sensor, and a paper tearing knife; in the paper output direction, the above first sensor is located between the above printing line and the above paper tearing knife, the above second sensor is located upstream of the above printing line, and the above paper tearing knife is located downstream of the above printing line; as Figure 5 shown, the control device 500 of the above label printer includes:
[0095] A first judgment module 510, configured to, when the above first sensor detects the paper head of the label paper, judge whether the paper surface to be printed on the above label paper is peeled off from the base paper of the above label paper based on the above second sensor; the above label paper includes a base paper and multiple paper surfaces attached to the above base paper, and there is a gap between every two adjacent paper surfaces;
[0096] A first control module 520, configured to control the paper feeding of the above label paper based on the peeling judgment result corresponding to the above paper surface to be printed, so that the upper gap of the paper surface to be printed on the above label paper aligns with the first position where the above paper tearing knife is located;
[0097] A second control module 530, configured to control the above label paper to return paper until the preset printing position of the above paper surface to be printed aligns with the above printing line, and then start printing the above paper surface to be printed.
[0098] In a possible implementation manner, the control device 500 of the above label printer further includes:
[0099] A third control module, configured to control the above label paper to return paper when the above first sensor detects the label paper;
[0100] The fourth control module is configured to control the label paper to stop rewinding when the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper, so that the paper head of the label paper aligns with the second position where the first sensor is located.
[0101] In a possible implementation, the label printer further includes a motor, and the motor is configured to drive the label paper to feed; the control device 500 of the label printer further includes:
[0102] The second judgment module is configured to judge whether the current rewinding step number corresponding to the motor exceeds a first preset step number during the process that the first detection result of the first sensor is detecting the label paper and has not changed to not detecting the label paper;
[0103] The fourth control module is configured to, if so, control the label paper to perform paper feeding and positioning, so that the upper gap of the paper surface to be printed on the label paper aligns with the first position where the paper tearing knife is located;
[0104] The fifth control module is configured to, if not, control the label paper to continue rewinding, and execute the step of controlling the label paper to stop rewinding when the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper.
[0105] In a possible implementation, the control device 500 of the label printer further includes:
[0106] The sixth control module is configured to control the label paper to feed outwards when the first sensor does not detect the label paper;
[0107] The seventh control module is configured to control the label paper to stop feeding out when the first detection result of the first sensor changes from not detecting the label paper to detecting the label paper, so that the paper head of the label paper aligns with the second position where the first sensor is located.
[0108] In a possible implementation, the label printer further includes a motor, and the motor is configured to drive the label paper to feed;
[0109] The control device 500 of the label printer further includes:
[0110] The third judgment module is configured to judge whether the current paper feeding step number corresponding to the motor exceeds a second preset step number during the process that the first detection result of the first sensor is not detecting the label paper and has not changed to detecting the label paper;
[0111] The first prompt module is configured to, if so, issue a target prompt message;
[0112] The eighth control module is configured to, if the answer is no, control the above-mentioned label paper to continue to feed out paper, and execute the step of controlling the above-mentioned label paper to stop feeding out paper when the first detection result of the above-mentioned first sensor changes from never detecting the above-mentioned label paper to detecting the above-mentioned label paper.
[0113] In a possible implementation, the first distance between the second sensor and the first sensor is greater than the length of the to-be-printed face paper and less than the sum of the length of the to-be-printed face paper and the second distance; the second distance is the distance between the first sensor and the printing line.
[0114] The first determination module 510 includes:
[0115] The first control unit is configured to, when the first sensor detects the paper head of the label paper, if the second sensor detects the base paper where the gap is located, control the label paper to feed back.
[0116] Before the paper head feeds back to the third position where the printing line is located, if the second sensor detects the to-be-printed face paper on the label paper, the first determination unit determines that the to-be-printed face paper on the label paper has not peeled off from the base paper of the label paper.
[0117] The second determination unit is configured to, before the paper head feeds back to the third position where the printing line is located, if the second sensor does not detect the to-be-printed face paper on the label paper, determine that the to-be-printed face paper on the label paper has peeled off from the base paper of the label paper.
[0118] In a possible implementation, the first control module 520 is specifically configured to:
[0119] If the to-be-printed face paper has not peeled off from the base paper, control the label paper to feed forward so that the upper gap of the to-be-printed face paper on the label paper aligns with the first position where the paper tearing knife is located; if the to-be-printed face paper has peeled off from the base paper, control the label paper to perform paper feeding positioning so that the upper gap of the next face paper on the label paper aligns with the first position where the paper tearing knife is located.
[0120] In a possible implementation, the first distance between the second sensor and the first sensor is less than the length of the to-be-printed face paper.
[0121] The first determination module 510 is specifically configured to:
[0122] When the first sensor detects the paper head of the label paper, if the second sensor detects the to-be-printed face paper on the label paper, determine that the to-be-printed face paper on the label paper has not peeled off from the base paper of the label paper.
[0123] In a possible implementation, the to-be-printed face paper is the first face paper on the label paper; specifically, the first control module 520 is configured to: when the paper head aligns with the second position where the first sensor is located and the to-be-printed face paper has not been peeled off from the base paper, control the label paper to feed out a first distance, so that the upper slit of the to-be-printed face paper on the label paper aligns with the first position where the paper cutter is located; the first distance is the distance between the first position where the paper cutter is located and the second position where the first sensor is located.
[0124] In a possible implementation, the fourth control module includes:
[0125] A second control unit, configured to control the label paper to feed out when the second sensor detects the base paper corresponding to the slit, and control the label paper to continue to feed out a second distance after the second sensor detects the upper edge of the to-be-printed face paper;
[0126] A third control unit, configured to control the label paper to feed back when the second sensor detects the to-be-printed face paper on the label paper, and control the label paper to feed out a second distance after the second sensor detects the upper edge of the to-be-printed face paper;
[0127] Wherein, the second distance is the distance between the first position where the paper cutter is located and the fourth position where the second sensor is located.
[0128] In a possible implementation, the fourth control module includes:
[0129] A second control unit, configured to control the label paper to feed out when the second sensor detects the base paper corresponding to the slit, and control the label paper to continue to feed out a second distance after the second sensor detects the upper edge of the to-be-printed face paper;
[0130] A fourth control unit, configured to control the label paper to feed out when the second sensor detects the to-be-printed face paper on the label paper, and control the label paper to continue to feed out until the second sensor detects the upper edge of the to-be-printed face paper, and then control the label paper to feed out a second distance;
[0131] Wherein, the second distance is the distance between the first position where the paper cutter is located and the fourth position where the second sensor is located.
[0132] In a possible implementation, the label printer further includes a motor, and the motor is used to drive the label paper to feed; the control device 500 of the label printer further includes:
[0133] A fourth judgment module, configured to judge whether a current paper feeding step number corresponding to the motor exceeds a third preset step number before the second sensor detects the upper edge of the to-be-printed face paper;
[0134] A second prompting module, configured to, if so, send out a first positioning abnormality prompt message.
[0135] In a possible implementation manner, the label printer further includes a motor, and the motor is configured to drive the label paper to feed;
[0136] The control device 500 of the label printer further includes:
[0137] A fifth judgment module, configured to judge whether a current paper feeding step number corresponding to the motor exceeds a fourth preset step number before the second sensor detects the upper edge of the to-be-printed face paper;
[0138] A third prompting module, configured to, if so, send out a second positioning abnormality prompt message.
[0139] In a possible implementation manner, the control device 500 of the label printer further includes:
[0140] An execution module, configured to, after receiving a print instruction, in response to the print instruction, execute the step of controlling the label paper to feed back until a preset print position of the to-be-printed face paper is aligned with the print line, and then start printing the to-be-printed face paper.
[0141] The division of each module in the control device of the label printer is only for illustrative purposes. In other embodiments, the control device of the label printer can be divided into different modules as needed to complete all or part of the functions of the control device of the label printer. In the embodiments of this specification, the implementation of each module in the control device of the label printer can be in the form of a computer program. This computer program can run on the label printer. The program module constituted by this computer program can be stored in the memory of the label printer. When this computer program is executed by a processor, all or part of the steps of the control method of the label printer described in the embodiments of this specification are implemented.
[0142] Next, please refer to Figure 6 , Figure 6 which shows a schematic structural diagram of a label printer provided by an embodiment of the present application. As Figure 6 shown, the label printer 600 may include: at least one processor 610, a network interface 620, a user interface 630, a memory 640, a print head 650, a motor 660, a first sensor 670, a second sensor 680, a paper cutter 690, and at least one communication bus 611.
[0143] Among them, the communication bus 611 is used to realize the connection and communication between these components.
[0144] Among them, the network interface 620 may include a Bluetooth module, a near-field communication module, a Wi-Fi module, etc.
[0145] Among them, the user interface 630 may include a display screen and a camera; optionally, the user interface 630 may further include a standard wired interface and a wireless interface.
[0146] Among them, the processor 610 may include one or more processing cores. The processor 610 uses various interfaces and lines to connect various parts within the entire label printer 600, and by running or executing instructions, programs, code sets or instruction sets stored in the memory 640, as well as calling data stored in the memory 640, it executes various functions of the label printer 600 and processes data.
[0147] Among them, the above-mentioned motor 660 is mainly responsible for driving the precise movement of components such as the print head 650 and the mechanical transmission mechanism. It is usually composed of components such as a stator, a rotor, and a driver, and has a simple structure and is easy to maintain. In the embodiment of the present application, after the rotation of the motor 660 passes through the mechanical transmission mechanism, it can drive the rubber roller to rotate, and then drive the label paper to move.
[0148] Among them, the print head 650 is one of the core components of the label printer 600. Printing lines are provided on the print head 650, which is responsible for transferring printing materials such as ink or toner to the face paper of the label paper to form text, images or charts. According to different printing technologies, the structure and working principle of the print head 650 are also different, and the embodiment of the present application does not limit this.
[0149] Among them, the first sensor 670 and the second sensor 680 can be but are not limited to photoelectric sensors. They can be but are not limited to determining the situation of the label paper corresponding to its current position by emitting light signals in the direction of the label paper and receiving the corresponding light response values. The above light response values can be but are not limited to include reflection values and / or projection values. In the paper output direction, the above-mentioned first sensor 670 is located between the printing line and the paper cutter 690, and the above-mentioned second sensor 680 is located upstream of the printing line, and the paper cutter 690 is located downstream of the printing line.
[0150] Among them, the above-mentioned paper cutter 690 is used to perform a cutting action on the label paper to cut off the printed face paper from the label paper.
[0151] Optionally, the processor 610 may be implemented in at least one hardware form of digital signal processing, field programmable gate array, or programmable logic array. The processor 610 may integrate one or a combination of several of a central processing unit, an image processor, a modem, etc. It can be understood that the above-mentioned modem may not be integrated into the processor 610 and may be implemented separately by a single chip.
[0152] Among them, the memory 640 may include a random access memory and may also include a read-only memory. The memory 640 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as the control function of a label printer, the paper feeding and positioning function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store the data involved in the above-mentioned various method embodiments. As Figure 6 shown, the memory 640 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.
[0153] In some possible embodiments, the above-mentioned processor 610 may be used to call the program instructions stored in the memory 640 and specifically perform the following operations: when the above-mentioned first sensor detects the paper head of the label paper, based on the above-mentioned second sensor, determine whether the paper surface to be printed on the above-mentioned label paper is peeled off from the base paper of the above-mentioned label paper; the above-mentioned label paper includes a base paper and multiple paper surfaces attached to the above-mentioned base paper, and there are gaps between every two adjacent paper surfaces; based on the peeling determination result corresponding to the paper surface to be printed, control the paper feeding of the above-mentioned label paper so that the upper gap of the paper surface to be printed on the above-mentioned label paper is aligned with the first position where the paper cutter is located; control the above-mentioned label paper to feed back until the preset printing position of the paper surface to be printed is aligned with the above-mentioned printing line, and then start printing the paper surface to be printed.
[0154] In some possible embodiments, before the above-mentioned processor 610 executes the operation of determining whether the paper surface to be printed on the above-mentioned label paper is peeled off from the base paper of the above-mentioned label paper based on the above-mentioned second sensor when the above-mentioned first sensor detects the paper head of the label paper, it is further used to execute: when the above-mentioned first sensor detects the label paper, control the above-mentioned label paper to feed back; when the first detection result of the above-mentioned first sensor changes from detecting the above-mentioned label paper to not detecting the above-mentioned label paper, control the above-mentioned label paper to stop feeding back so that the paper head of the above-mentioned label paper is aligned with the second position where the above-mentioned first sensor is located.
[0155] In some possible embodiments, the above-mentioned label printer further includes a motor, and the motor is used to drive the label paper to feed; after the processor 610 executes the step of controlling the label paper to rewind after the first sensor detects the label paper, it is further used to execute: during the process that the first detection result of the first sensor is detecting the label paper and has not become not detecting the label paper, determine whether the current rewind steps corresponding to the motor exceed a first preset number of steps; if so, control the label paper to perform paper feeding and positioning so that the upper slit of the face paper to be printed on the label paper aligns with the first position where the paper tearing knife is located; if not, control the label paper to continue rewinding, and execute the step of controlling the label paper to stop rewinding when the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper.
[0156] In some possible embodiments, before the processor 610 executes the step of determining whether the face paper to be printed on the label paper is peeled off from the base paper of the label paper based on the second sensor when the first sensor detects the paper head of the label paper, it is further used to execute: when the first sensor does not detect the label paper, control the label paper to feed outwards; when the first detection result of the first sensor changes from not detecting the label paper to detecting the label paper, control the label paper to stop feeding out so that the paper head of the label paper aligns with the second position where the first sensor is located.
[0157] In some possible embodiments, the above-mentioned label printer further includes a motor, and the motor is used to drive the label paper to feed; after the processor 610 executes the step of controlling the label paper to feed outwards when the first sensor does not detect the label paper, it is further used to execute: during the process that the first detection result of the first sensor is not detecting the label paper and has not become detecting the label paper, determine whether the current feeding steps corresponding to the motor exceed a second preset number of steps; if so, send a target prompt message; if not, control the label paper to continue feeding outwards, and execute the step of controlling the label paper to stop feeding out when the first detection result of the first sensor changes from not detecting the label paper to detecting the label paper.
[0158] In some possible embodiments, the first distance between the second sensor and the first sensor is greater than the length of the face paper to be printed and less than the sum of the length of the face paper to be printed and the second distance; the second distance is the distance between the first sensor and the printing line;
[0159] When the above-mentioned processor 610 executes the above-mentioned operation of determining whether the paper surface to be printed on the above-mentioned label paper is peeled off from the base paper of the above-mentioned label paper based on the above-mentioned second sensor when the above-mentioned first sensor detects the leading edge of the label paper, it is specifically used to execute: when the above-mentioned first sensor detects the leading edge of the label paper, if the above-mentioned second sensor detects the base paper where the above-mentioned gap is located, control the above-mentioned label paper to feed backward; before the above-mentioned leading edge feeds backward to the third position where the above-mentioned printing line is located, if the above-mentioned second sensor detects the paper surface to be printed on the above-mentioned label paper, determine that the paper surface to be printed on the above-mentioned label paper has not been peeled off from the base paper of the above-mentioned label paper; before the above-mentioned leading edge feeds backward to the third position where the above-mentioned printing line is located, if the above-mentioned second sensor does not detect the paper surface to be printed on the above-mentioned label paper, determine that the paper surface to be printed on the above-mentioned label paper has been peeled off from the base paper of the above-mentioned label paper.
[0160] In some possible embodiments, when the above-mentioned processor 610 executes the above-mentioned operation of controlling the feeding of the above-mentioned label paper based on the peeling judgment result corresponding to the above-mentioned paper surface to be printed, so that the upper gap of the paper surface to be printed on the above-mentioned label paper aligns with the first position where the above-mentioned paper tearing knife is located, it is specifically used to execute: if the above-mentioned paper surface to be printed has not been peeled off from the above-mentioned base paper, control the above-mentioned label paper to feed, so that the upper gap of the paper surface to be printed on the above-mentioned label paper aligns with the first position where the above-mentioned paper tearing knife is located; if the above-mentioned paper surface to be printed has been peeled off from the above-mentioned base paper, control the above-mentioned label paper to perform paper feeding and positioning, so that the upper gap of the next paper surface on the above-mentioned label paper aligns with the first position where the above-mentioned paper tearing knife is located.
[0161] In some possible embodiments, the first distance between the above-mentioned second sensor and the above-mentioned first sensor is less than the length of the above-mentioned paper surface to be printed; when the above-mentioned processor 610 executes the above-mentioned operation of determining whether the paper surface to be printed on the above-mentioned label paper is peeled off from the base paper of the above-mentioned label paper based on the above-mentioned second sensor when the above-mentioned first sensor detects the leading edge of the label paper, it is specifically used to execute: when the above-mentioned first sensor detects the leading edge of the label paper, if the above-mentioned second sensor detects the paper surface to be printed on the above-mentioned label paper, determine that the paper surface to be printed on the above-mentioned label paper has not been peeled off from the base paper of the above-mentioned label paper.
[0162] In some possible embodiments, the above-mentioned paper surface to be printed is the first paper surface on the above-mentioned label paper;
[0163] When the above-mentioned processor 610 executes the above-mentioned operation of controlling the feeding of the above-mentioned label paper based on the peeling judgment result corresponding to the above-mentioned paper surface to be printed, so that the upper gap of the paper surface to be printed on the above-mentioned label paper aligns with the first position where the above-mentioned paper tearing knife is located, it is specifically used to execute:
[0164] When the above-mentioned paper aligns with the second position where the first sensor is located and the paper to be printed has not been peeled off from the bottom paper, control the label paper to feed out a first distance, so that the upper gap of the paper to be printed on the label paper aligns with the first position where the paper cutter is located; the first distance is the distance between the first position where the paper cutter is located and the second position where the first sensor is located.
[0165] In some possible embodiments, when the processor 610 executes the control to position the label paper for paper feeding so that the upper gap of the paper to be printed on the label paper aligns with the first position where the paper cutter is located, it is specifically used to execute:
[0166] If the second sensor detects the bottom paper corresponding to the gap, control the label paper to feed out, and after the second sensor detects the upper edge of the paper to be printed, control the label paper to continue to feed out a second distance; if the second sensor detects the paper to be printed on the label paper, control the label paper to feed back and after the second sensor detects the upper edge of the paper to be printed, control the label paper to feed out a second distance; wherein, the second distance is the distance between the first position where the paper cutter is located and the fourth position where the second sensor is located.
[0167] In some possible embodiments, when the processor 610 executes the control to position the label paper for paper feeding so that the upper gap of the paper to be printed on the label paper aligns with the first position where the paper cutter is located, it is specifically used to execute:
[0168] If the second sensor detects the bottom paper corresponding to the gap, control the label paper to feed out, and after the second sensor detects the upper edge of the paper to be printed, control the label paper to continue to feed out a second distance; if the second sensor detects the paper to be printed on the label paper, control the label paper to feed out and after the second sensor detects the bottom paper corresponding to the gap, control the label paper to continue to feed out until after the second sensor detects the upper edge of the paper to be printed, control the label paper to feed out a second distance; wherein, the second distance is the distance between the first position where the paper cutter is located and the fourth position where the second sensor is located.
[0169] In some possible embodiments, the above label printer further includes a motor for driving the label paper to feed; after the processor 610 executes the step of controlling the label paper to feed out if the second sensor detects the base paper corresponding to the slit, it is further configured to execute: before the second sensor detects the upper edge of the to-be-printed face paper, determine whether the current paper feeding steps corresponding to the motor exceed a third preset number of steps; if so, send a first positioning anomaly prompt message.
[0170] In some possible embodiments, the above label printer further includes a motor for driving the label paper to feed; after the processor 610 executes the step of controlling the label paper to rewind if the second sensor detects the to-be-printed face paper on the label paper, it is further configured to execute:
[0171] Before the second sensor detects the upper edge of the to-be-printed face paper, determine whether the current paper feeding steps corresponding to the motor exceed a fourth preset number of steps; if so, send a second positioning anomaly prompt message.
[0172] In some possible embodiments, the processor 610 is further configured to execute: after receiving a printing instruction, in response to the printing instruction, execute the step of controlling the label paper to rewind until the preset printing position of the to-be-printed face paper is aligned with the printing line, and then start printing the to-be-printed face paper.
[0173] The embodiment of the present application further provides a computer-readable storage medium, in which instructions are stored. When the instructions run on a computer or a processor, the computer or the processor is made to execute one or more steps in the above embodiments. If each component module of the control device of the above label printer is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in the computer-readable storage medium.
[0174] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. Those of ordinary skill in the art can understand that all or part of the processes of implementing the methods in the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. The foregoing storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disks, or optical disks. Without conflict, the technical features in this embodiment and the implementation solutions can be combined arbitrarily.
[0175] The embodiments described above are only described as preferred embodiments of the present application, and do not limit the scope of the present application. Without departing from the design spirit of the present application, various deformations and improvements made by those of ordinary skill in the art to the technical solutions of the present application shall fall within the protection scope determined by the claims of the present application.
Claims
1. A control method for a label printer, characterized in that, The label printer includes a first sensor, a printing line, a second sensor, and a paper cutter; in the paper output direction, the first sensor is located between the printing line and the paper cutter, the second sensor is located upstream of the printing line, and the paper cutter is located downstream of the printing line; the method includes: When the first sensor detects the paper head of the label paper, based on the second sensor, determine whether the printable face paper on the label paper is peeled off from the base paper of the label paper; the label paper includes a base paper and multiple face papers attached to the base paper, and there is a gap between every two adjacent face papers; Control the paper feeding of the label paper based on the peeling judgment result corresponding to the printable face paper, so that the upper gap of the printable face paper on the label paper aligns with the first position where the paper cutter is located; Control the label paper to feed back until the preset printing position of the printable face paper aligns with the printing line, and then start printing the printable face paper.
2. The method according to claim 1, characterized in that, Before the step of when the first sensor detects the paper head of the label paper, based on the second sensor, determine whether the printable face paper on the label paper is peeled off from the base paper of the label paper, the method further includes: When the first sensor detects the label paper, control the label paper to feed back; When the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper, control the label paper to stop feeding back, so that the paper head of the label paper aligns with the second position where the first sensor is located.
3. The method according to claim 2, wherein The label printer further includes a motor, and the motor is used to drive the paper feeding of the label paper; After the step of when the first sensor detects the label paper, control the label paper to feed back, the method further includes: During the process that the first detection result of the first sensor is detecting the label paper and has not changed to not detecting the label paper, determine whether the current number of steps of feeding back corresponding to the motor exceeds a first preset number of steps; If so, control the label paper to perform paper output positioning, so that the upper gap of the printable face paper on the label paper aligns with the first position where the paper cutter is located; If not, control the label paper to continue feeding back, and execute the step of when the first detection result of the first sensor changes from detecting the label paper to not detecting the label paper, control the label paper to stop feeding back.
4. The method according to claim 1, wherein Before the step of when the first sensor detects the paper head of the label paper, based on the second sensor, determine whether the printable face paper on the label paper is peeled off from the base paper of the label paper, the method further includes: When the first sensor does not detect the label paper, control the label paper to feed outwards; When the first detection result of the first sensor changes from not detecting the label paper to detecting the label paper, control the label paper to stop feeding out, so that the paper head of the label paper aligns with the second position where the first sensor is located.
5. The method according to claim 4, characterized in that, The label printer further includes a motor, and the motor is used to drive the paper feeding of the label paper; After the step of when the first sensor does not detect the label paper, control the label paper to feed outwards, the method further includes: When the first detection result of the first sensor is that the label paper is not detected and has not changed to detecting the label paper, determine whether the current paper output step number corresponding to the motor exceeds a second preset step number; If so, issue a target prompt message; If not, control the label paper to continue to output paper outward, and execute the step of controlling the label paper to stop paper output when the first detection result of the first sensor changes from not detecting the label paper to detecting the label paper.
6. The method according to claim 1, wherein The first distance between the second sensor and the first sensor is greater than the length of the paper to be printed and less than the sum of the length of the paper to be printed and the second distance; the second distance is the distance between the first sensor and the printing line; When the first sensor detects the paper head of the label paper, determining whether the paper to be printed on the label paper is peeled off from the base paper of the label paper based on the second sensor includes: When the first sensor detects the paper head of the label paper, if the second sensor detects the base paper where the gap is located, control the label paper to feed back; Before the paper head feeds back to the third position where the printing line is located, if the second sensor detects the paper to be printed on the label paper, determine that the paper to be printed on the label paper has not been peeled off from the base paper of the label paper; Before the paper head feeds back to the third position where the printing line is located, if the second sensor does not detect the paper to be printed on the label paper, determine that the paper to be printed on the label paper has been peeled off from the base paper of the label paper.
7. The method according to claim 1, wherein Controlling the paper feeding of the label paper based on the peeling judgment result corresponding to the paper to be printed, so that the upper gap of the paper to be printed on the label paper aligns with the first position where the paper tearing knife is located, includes: If the paper to be printed has not been peeled off from the base paper, control the label paper to feed, so that the upper gap of the paper to be printed on the label paper aligns with the first position where the paper tearing knife is located; If the paper to be printed has been peeled off from the base paper, control the label paper to perform paper output positioning, so that the upper gap of the next piece of paper on the label paper aligns with the first position where the paper tearing knife is located.
8. The method according to claim 1, characterized in that, The first distance between the second sensor and the first sensor is less than the length of the paper to be printed; When the first sensor detects the paper head of the label paper, determining whether the paper to be printed on the label paper is peeled off from the base paper of the label paper based on the second sensor includes: When the first sensor detects the paper head of the label paper, if the second sensor detects the paper to be printed on the label paper, determine that the paper to be printed on the label paper has not been peeled off from the base paper of the label paper.
9. The method according to claim 1, wherein The paper to be printed is the first piece of paper on the label paper; Controlling the paper feeding of the label paper based on the peeling judgment result corresponding to the paper to be printed, so that the upper gap of the paper to be printed on the label paper aligns with the first position where the paper tearing knife is located, includes: When the paper head is aligned with the second position where the first sensor is located and the paper to be printed has not been peeled off from the backing paper, control the label paper to feed out a first distance, so that the upper gap of the paper to be printed on the label paper is aligned with the first position where the paper tearing knife is located; the first distance is the distance between the first position where the paper tearing knife is located and the second position where the first sensor is located.
10. The method according to claim 3, characterized in that, The controlling the label paper to perform paper feeding and positioning so that the upper gap of the paper to be printed on the label paper is aligned with the first position where the paper tearing knife is located includes: If the second sensor detects the backing paper corresponding to the gap, control the label paper to feed out, and after the second sensor detects the upper edge of the paper to be printed, control the label paper to continue to feed out a second distance; If the second sensor detects the paper to be printed on the label paper, control the label paper to feed back, and after the second sensor detects the upper edge of the paper to be printed, control the label paper to feed out a second distance; Wherein, the second distance is the distance between the first position where the paper tearing knife is located and the fourth position where the second sensor is located.
11. The method according to claim 3, wherein The controlling the label paper to perform paper feeding and positioning so that the upper gap of the paper to be printed on the label paper is aligned with the first position where the paper tearing knife is located includes: If the second sensor detects the backing paper corresponding to the gap, control the label paper to feed out, and after the second sensor detects the upper edge of the paper to be printed, control the label paper to continue to feed out a second distance; If the second sensor detects the paper to be printed on the label paper, control the label paper to feed out, and after the second sensor detects the backing paper corresponding to the gap, control the label paper to continue to feed out until after the second sensor detects the upper edge of the paper to be printed, control the label paper to feed out a second distance; Wherein, the second distance is the distance between the first position where the paper tearing knife is located and the fourth position where the second sensor is located.
12. The method according to claim 10 or 11, wherein The label printer further includes a motor, and the motor is used to drive the label paper to feed; After the step of if the second sensor detects the backing paper corresponding to the gap, then control the label paper to feed out, the method further includes: Before the second sensor detects the upper edge of the paper to be printed, determine whether the current paper feeding steps corresponding to the motor exceed a third preset number of steps; If so, send out a first positioning abnormal prompt message.
13. The method according to claim 10 or 11, characterized in that, The label printer further includes a motor, and the motor is used to drive the label paper to feed; After the step of if the second sensor detects the paper to be printed on the label paper, then control the label paper to feed back, the method further includes: Before the second sensor detects the upper edge of the paper to be printed, determine whether the current paper feeding steps corresponding to the motor exceed a fourth preset number of steps; If so, send out a second positioning abnormal prompt message.
14. The method according to claim 1, characterized in that, The method further includes: After receiving a printing instruction, in response to the printing instruction, perform the step of controlling the label paper to feed back until a preset printing position of the to-be-printed face paper is aligned with the printing line, and then start printing the to-be-printed face paper.
15. A control device for a label printer, characterized in that, The label printer includes a first sensor, a printing line, a second sensor, and a paper cutter; in the paper output direction, the first sensor is located between the printing line and the paper cutter, the second sensor is located upstream of the printing line, and the paper cutter is located downstream of the printing line; the device includes: A first judgment module, configured to, when the first sensor detects the paper head of the label paper, judge whether the to-be-printed face paper on the label paper is peeled off from the base paper of the label paper based on the second sensor; the label paper includes a base paper and multiple face papers attached to the base paper, and there is a gap between every two adjacent face papers; A first control module, configured to control the label paper to feed based on the peeling judgment result corresponding to the to-be-printed face paper, so that the upper gap of the to-be-printed face paper on the label paper is aligned with a first position where the paper cutter is located; A second control module, configured to control the label paper to feed back until a preset printing position of the to-be-printed face paper is aligned with the printing line, and then start printing the to-be-printed face paper.
16. A label printer, comprising a main body, on which a print head, a first sensor, a second sensor, a paper cutter and a control module are provided, characterized in that, The print head includes a printing line. In the paper output direction, the first sensor is located between the printing line and the paper cutter, the second sensor is located upstream of the printing line, and the paper cutter is located downstream of the printing line; the control module can execute the control method of the label printer according to any one of claims 1 to 14.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the control method of the label printer according to any one of claims 1-14 are implemented.
Citation Information
Cited By
Label paper gap positioning method and apparatus, storage medium, and electronic device
WO2026153514A1
