[go: up one dir, main page]

CN113580784B - Label printer and operation method thereof - Google Patents

Label printer and operation method thereof Download PDF

Info

Publication number
CN113580784B
CN113580784B CN202110956698.4A CN202110956698A CN113580784B CN 113580784 B CN113580784 B CN 113580784B CN 202110956698 A CN202110956698 A CN 202110956698A CN 113580784 B CN113580784 B CN 113580784B
Authority
CN
China
Prior art keywords
value
adc
point
printing
label
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110956698.4A
Other languages
Chinese (zh)
Other versions
CN113580784A (en
Inventor
余日新
林喆
方梦宇
周哲衡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo Technology Co Ltd
Original Assignee
Shanghai Sunmi Technology Group Co Ltd
Shenzhen Michelangelo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Sunmi Technology Group Co Ltd, Shenzhen Michelangelo Technology Co Ltd filed Critical Shanghai Sunmi Technology Group Co Ltd
Priority to CN202110956698.4A priority Critical patent/CN113580784B/en
Publication of CN113580784A publication Critical patent/CN113580784A/en
Application granted granted Critical
Publication of CN113580784B publication Critical patent/CN113580784B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J3/00Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed
    • B41J3/407Typewriters or selective printing or marking mechanisms characterised by the purpose for which they are constructed for marking on special material
    • B41J3/4075Tape printers; Label printers
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B41PRINTING; LINING MACHINES; TYPEWRITERS; STAMPS
    • B41JTYPEWRITERS; SELECTIVE PRINTING MECHANISMS, i.e. MECHANISMS PRINTING OTHERWISE THAN FROM A FORME; CORRECTION OF TYPOGRAPHICAL ERRORS
    • B41J29/00Details of, or accessories for, typewriters or selective printing mechanisms not otherwise provided for
    • B41J29/38Drives, motors, controls or automatic cut-off devices for the entire printing mechanism
    • B41J29/393Devices for controlling or analysing the entire machine ; Controlling or analysing mechanical parameters involving printing of test patterns
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/002Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accessory Devices And Overall Control Thereof (AREA)
  • Handling Of Sheets (AREA)

Abstract

The invention provides a label printer and an operation method thereof, wherein printing paper of the label printer comprises base paper and label paper, the label paper is adhered on the base paper at intervals, gaps are formed between the adjacent label paper, the label printer is provided with a printing head and a printing position sensor, the printing head and the printing position sensor are driven by a stepping motor, and the printing head prints on the label paper, and the method comprises the following steps: determining M stagnation points according to a stepping point ADC value output by the printing position sensor, wherein the stagnation points mark the junction position of the base paper and the label paper, and M is a positive integer greater than or equal to 3; determining an initial value of a boundary ADC value, the height of the label paper and the height of the gap according to the ADC values corresponding to the M stagnation points; the demarcation ADC value is updated as printing progresses. The invention can realize accurate and efficient operation of the label printer and is beneficial to realizing environmental protection.

Description

Label printer and operation method thereof
Technical Field
The invention mainly relates to the field of printers, in particular to a label printer and an operation method thereof.
Background
Existing label printers are generally desktop, bulky and inconvenient to carry, and therefore hand-held portable printers have been developed, but with new problems.
Before label printing, a label learning action is required to obtain relevant printing parameters so as to perform subsequent positioning and printing operations, so that a piece of paper is required to be taken to obtain the printing parameters. Because the handheld machine is small and exquisite, the paper bin cover cannot be made large, the printer cannot be retracted greatly, and label paper consumed during printing and learning cannot be retracted and reused to save paper. Under the condition that the paper can not be backed, the problem to be solved is how to realize accurate and efficient learning and printing processes and save paper so as to be beneficial to environmental protection.
Disclosure of Invention
The invention aims to provide a label printer and an operation method thereof, which can accurately and efficiently print labels and are beneficial to realizing the environmental protection effect.
In order to solve the technical problem, the invention provides an operation method of a label printer, wherein printing paper of the label printer comprises base paper and label paper, the label paper is adhered to the base paper at intervals, gaps are formed between the adjacent label paper, the label printer is provided with a printing head and a printing position sensor, the printing head and the printing position sensor are driven by a stepping motor, and the printing head prints on the label paper, the method comprises the following steps: determining M stagnation points according to a stepping point ADC value output by the printing position sensor, wherein the stagnation points mark the junction position of the base paper and the label paper, and M is a positive integer greater than or equal to 3; determining an initial value of a boundary ADC value, the height of the label paper and the height of the gap according to the ADC values corresponding to the M stagnation points; the demarcation ADC value is updated as printing progresses.
In an embodiment of the present invention, determining M stagnation points from the step point ADC values output by the print position sensor includes: for a stepping point n, calculating an ADC slope value from the nth point to the n-1 st point, an ADC slope value from the n-1 st point to the n-2 nd point, an ADC slope value from the n-2 nd point to the n-3 rd point, … and an ADC slope value from the n-t point to the n-t-1 st point, wherein n and t are positive integers, and n-t-1 is more than 0; calculating an average ADC slope value of the ADC slope values from the nth point to the (n-1) th point, the ADC slope values from the nth-1 point to the nth-2 point, the ADC slope values from the nth-2 point to the nth-3 point, … and the ADC slope values from the nth-t point to the nth-t-1 point as an ADC arithmetic slope value of a stepping point n, wherein the ADC slope value of the stepping point n comprises a positive value and a negative value; and when the arithmetic ADC slope value is a negative value, taking the stepping point corresponding to the maximum value of the arithmetic ADC slope value in the continuous positive values as the stagnation point.
In an embodiment of the present invention, determining the initial value of the boundary ADC value according to the ADC values corresponding to the M stagnation points includes: and averaging the ADC values of the stepping points corresponding to the M stagnation points to obtain the initial demarcation ADC value.
In an embodiment of the present invention, updating the demarcation ADC value as printing progresses includes: and updating the boundary ADC value as the average value of the ADCs of the plurality of stepping points corresponding to the gap area and the average value of the ADCs of the plurality of stepping points corresponding to the label paper area along with the printing.
In an embodiment of the present invention, if the ADC value of the current step point is greater than the boundary ADC value or the initial value of the boundary ADC value, it is determined that the print position sensor is located in the gap area, an average value of the ADCs of the plurality of step points corresponding to the current gap area is calculated, and when the print position sensor is switched from the current gap area to the adjacent label paper area, an average value of the ADCs of the plurality of step points corresponding to the current gap area and an average value of the ADCs of the plurality of step points corresponding to the previous label paper area are calculated and updated to the boundary ADC value.
In an embodiment of the present invention, if the ADC value of the current step point is less than or equal to the boundary ADC value or the initial value of the boundary ADC value, it is determined that the printing position sensor is located in the tab sheet area, an average value of the ADCs of the plurality of step points corresponding to the current tab sheet area is calculated, and when the printing position sensor is switched from the current tab sheet area to the adjacent gap area, an average value of the ADCs of the plurality of step points corresponding to the current tab sheet area and an average value of the ADCs of the plurality of step points corresponding to the previous gap area are calculated and updated to the boundary ADC value.
In an embodiment of the present invention, in the process of determining the M stagnation points, stagnation point verification is performed on the determination of each stagnation point; the stagnation point check comprises positive and negative check of the slope value of the step point ADC, height check of the label paper, height check of the gap, height difference check of the label paper, height difference check of the gap and/or stagnation point ADC value difference check.
In an embodiment of the present invention, in the process of updating the demarcation ADC value, an update check is performed on each update process; the update check includes a ratio check of a stepped distance to a height of the label paper, a comparison of the stepped distance to the height of the gap, and/or a difference check of a current value of the demarcation ADC value to an updated value.
In an embodiment of the present invention, the method further includes: and determining the positions of the printing head and the printing position sensor according to the boundary ADC value and the stepping point ADC value output by the printing position sensor.
In an embodiment of the present invention, the method further includes: and positioning the printing head and the printing position sensor according to the boundary ADC value or the initial value of the boundary ADC value, the stepping point ADC value output by the printing position sensor, the height of the label paper, the height of the gap and the stepping distance of the stepping motor to the initial printing position.
The invention also provides a label printer which is provided with a controller, a printing head and a printing position sensor, wherein the printing head and the printing position sensor are driven by a stepping motor; the printing paper of the label printer comprises base paper and label paper, wherein the label paper is adhered to the base paper at intervals, and gaps are formed between every two adjacent label paper; the printing head prints on the label paper;
the controller is configured to perform a label printer operation method as described in any preceding claim.
The present invention also provides a computer storage medium characterized by comprising computer instructions that, when run on an electronic device, cause the electronic device to perform the method of operating a label printer as described in any one of the preceding claims.
Compared with the prior art, the invention has the following advantages: the stagnation point is determined through the slope calculation of the ADC value of the stepping point, the related printing parameters are obtained, the boundary ADC value is updated, the efficient and accurate operation of the label printer is realized, and the environment-friendly effect is favorably realized.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principle of the invention. In the drawings:
fig. 1 is a flowchart of an operation method of a label printer according to an embodiment of the present application.
Fig. 2 is a schematic diagram of ADC data at a step point at a boundary between a gap of a label paper and the label paper according to an embodiment of the present application.
Fig. 3 is a schematic diagram of step point ADC data and stagnation point position at the intersection of the label paper gap and the label paper according to an embodiment of the present application.
Fig. 4 is a schematic view of a printing paper according to an embodiment of the present application.
Fig. 5 is a schematic diagram of the operation of the printer according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, but the present invention may be practiced in other ways than those specifically described herein, and thus the present invention is not limited to the specific embodiments disclosed below.
As used herein, the terms "a," "an," "the," and/or "the" are not intended to be inclusive and include the plural unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that steps and elements are included which are explicitly identified, that the steps and elements do not form an exclusive list, and that a method or apparatus may include other steps or elements.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise. Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description. Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate. In all examples shown and discussed herein, any particular value should be construed as exemplary only and not as limiting. Thus, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In the description of the present application, it is to be understood that the orientation or positional relationship indicated by the directional terms such as "front, rear, upper, lower, left, right", "lateral, vertical, horizontal" and "top, bottom", etc., are generally based on the orientation or positional relationship shown in the drawings, and are used for convenience of description and simplicity of description only, and in the case of not making a reverse description, these directional terms do not indicate and imply that the device or element being referred to must have a particular orientation or be constructed and operated in a particular orientation, and therefore, should not be considered as limiting the scope of the present application; the terms "inner and outer" refer to the inner and outer relative to the profile of the respective component itself.
Flow charts are used herein to illustrate operations performed by systems according to embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed in the exact order in which they are performed. Rather, various steps may be processed in reverse order or simultaneously. Meanwhile, other operations are added to or removed from these processes.
Embodiments of the present application describe a label printer and a method of operating the same.
In some embodiments, the printing paper of the label printer includes a base paper and a label paper, the label paper is adhered to the base paper at intervals, the interval between adjacent label paper forms a gap, the label printer has a printing head and a printing position sensor, the printing head and the printing position sensor are driven by a stepping motor, and the printing head prints on the label paper.
Fig. 4 is a schematic view of a printing paper according to an embodiment of the present application.
Referring to fig. 4, the printing paper 400 includes a base paper (or referred to as a label base paper) 401 and a label paper 402. The label paper 402 is adhered to the base paper 401 at intervals. The interval between adjacent label paper forms the gap. In practical applications, the printing paper may also be wound by a reel to form a paper roll, and during the printing process, the label paper in the shape of the paper roll is gradually unwound along with the rotation of the reel, and the printing head prints the content to be printed on the label paper.
Fig. 5 is a schematic diagram of the operation of the printer according to an embodiment of the present application.
Referring to fig. 5, the printer also has a print head 502 and a print position sensor 503. The print head 502 and the print position sensor 503 are combined to form a printing and positioning device 501.
In the example of fig. 4 and 5, the tab sheet 402 corresponds to the tab sheet area a 1. The gaps between the label paper 402 may form gap regions a 2. In each label sheet, for example, the marking line 506 corresponds to a print initial position.
In some embodiments, the distance between the marking line 506 of the initial printing position and the upper edge of the label paper is, for example, C1, and may be set to other values as needed.
The distance between the print head 502 and the print position sensor 503 is, for example, C1. In practical applications, due to limitations in manufacturing processes and operating conditions, the print head 501 and the print position sensor 503 in some label printers cannot be manufactured in the same line (with respect to the front view of fig. 5).
Therefore, the adjustment of the position of the print position sensor 503 and the position of the print head 502, particularly when printing is started (for example, when printing is started on a new roll of printing paper), correctly positions the print head 502 to smoothly start printing and save paper as much as possible, and it is an important issue that the printing and positioning apparatus 501 correctly acquires the relevant position parameters when printing is started. Moreover, how to correctly position the printing and positioning device 501 to the printing start position of the label paper to be printed when the next printing is started after the printing is finished for one time is also a problem to be solved, so as to realize correct printing, and avoid the problems of printing dislocation or printing out of bounds, etc.
The process of correctly acquiring the relevant position parameters (for example, including the boundary ADC value, the label paper height, the gap height, and the like) by the printing and positioning device 501 at the start of printing, and how to correctly position the printing and positioning device 501 to the printing start position of the label paper to be printed at the start of next printing after one printing is finished may also be referred to as a process of learning by the label printer, and the correct acquisition relevant position parameters may be acquired through learning.
In some embodiments, a piece of label paper has a height of, for example, D1 and a gap has a height of, for example, D2. There are many situations where the label paper height and gap height are practical.
Fig. 1 is a flowchart of an operation method of a label printer according to an embodiment of the present application.
As shown in fig. 1, the method for operating a label printer includes step 101, determining M stagnation points by using a step point ADC value output by the printing position sensor, where the stagnation points mark a boundary position between the base paper and the label paper, and M is a positive integer greater than or equal to 3; step 102, determining an initial value of a boundary ADC value, the height of the label paper and the height of the gap according to the ADC values corresponding to the M stagnation points; and step 103, updating the demarcation ADC value along with the printing.
In some embodiments, determining M stagnation points from the stepped point ADC values output by the print position sensor comprises:
for a stepping point n, calculating an ADC slope value from the nth point to the n-1 st point, an ADC slope value from the n-1 st point to the n-2 nd point, an ADC slope value from the n-2 nd point to the n-3 rd point, … and an ADC slope value from the n-t point to the n-t-1 st point, wherein n and t are positive integers, and n-t-1 is more than 0;
calculating an average ADC slope value of the ADC slope values from the nth point to the (n-1) th point, the ADC slope values from the nth point to the (n-2) th point, the ADC slope values from the (n-2) th point to the (n-3) th point, … and the ADC slope values from the (n-t) th point to the (n-t-1) th point as an arithmetic ADC slope value of a stepping point n, wherein the arithmetic ADC slope value of the stepping point n comprises a positive value and a negative value;
and when the arithmetic ADC slope value is a negative value, taking the stepping point corresponding to the maximum value of the arithmetic ADC slope value in the continuous positive values as the stagnation point.
Fig. 2 is a schematic diagram of ADC data at a step point at a boundary between a gap of a label paper and the label paper according to an embodiment of the present application.
The print position sensor 503 includes, for example, a photo sensor, which can emit light of a specific frequency (wavelength) to a specific barrier (in this application, the barrier may be a base paper of a label paper area and a base paper of a label paper or a slit area), measure the reflected and scattered light intensity, and obtain a corresponding ADC value by operating and controlling a circuit including a photo resistor and other components, where the ADC value can reflect the thickness and properties of the specific barrier.
In the technical scheme of this application, the ability that the label paper region blockked illumination is strong, and the gap region blocks that irradiant ability is weak, and correspondingly, the light intensity that the label paper region returned is great relatively, and the light intensity that the gap region returned is less relatively. And the corresponding ADC value can be obtained by the operation and control of a circuit comprising a photoresistor and other components. In some embodiments of the present application, for example, the ADC value for the label paper area is small and the ADC value for the slit area is large. In an actual control circuit, the opposite ADC value characteristics may also be set as necessary.
As mentioned above, the print head and the print position sensor are driven by the stepping motor, so in the technical solution of the present application, as to the ADC value corresponding to the label paper area or the ADC value corresponding to the slit area, since it corresponds to the stepping process of the stepping motor, for a certain stepping point, it can also be referred to as a stepping point ADC value. During the printing of one label sheet, or during the printing of two label sheets, the step number of the stepping motor can be obtained, and the step number can be used as the periodic step number of the stepping motor, such as 100 steps or other values. The step point n corresponds to, for example, the position of the nth step therein.
In fig. 2, the X-axis direction corresponds to, for example, the step direction of the stepping motor. In conjunction with a single step distance of the stepper motor, the distance or position may be indicated by the number of steps. The Y-axis direction corresponds to, for example, stepped ADC values. The values in the Y-axis direction in fig. 2 have been processed, and they are only indicated by relative values, and do not refer to actual values of the ADC. In some embodiments, for example, the data 2200 on the Y-axis may correspond to an actual ADC voltage of 1.5V or 2V, etc., and other data may be scaled accordingly. The correspondence of the larger ADC value with the slot area a2 in fig. 2 is merely illustrative to help understand the principles of the present application. At the beginning of the printing process, the position of the gap region cannot be directly accurately derived from the ADC value. The values of the step points are also merely illustrative to facilitate understanding of the implementation of the scheme.
As described above, in the process of determining one stagnation point, for the step point n, the ADC slope values from the nth point to the nth-1 point, the ADC slope values from the nth-1 point to the nth-2 point, the ADC slope values from the nth-2 point to the nth-3 point, …, the ADC slope values from the nth-t point to the nth-t-1 point are calculated, n and t are positive integers, and n-t-1 is greater than 0;
calculating an average ADC slope value of the ADC slope values from the nth point to the (n-1) th point, the ADC slope values from the nth point to the (n-2) th point, the ADC slope values from the (n-2) th point to the (n-3) th point, … and the ADC slope values from the (n-t) th point to the (n-t-1) th point as an arithmetic ADC slope value of a stepping point n, wherein the arithmetic ADC slope value of the stepping point n comprises a positive value and a negative value;
and when the arithmetic ADC slope value is a negative value, taking the stepping point corresponding to the maximum value of the arithmetic ADC slope value in the continuous positive values as the stagnation point.
In the illustration of fig. 2, for example, for step point 16, calculate ADC slope values from point 16 to point 15, calculate from point 15 to point 14, calculate from point 14 to point 13, calculate from point 13 to point 12, calculate from point 12 to point 11; the average of the aforementioned 5 ADC slope values is calculated as the arithmetic ADC slope value of the step point 16. In this case, t is 5.
For the step point 16, which is in the continuous rising region of the ADC value, the arithmetic ADC slope value for the step point 16 is positive. For the sake of clarity, in the illustration of fig. 2, the ADC slope values form a slope line KL1 within consecutive positive values (corresponding to consecutive rising regions of the ADC values). The ADC slope values form a slope line KL2 within consecutive negative values (corresponding to consecutive falling regions of the ADC values).
And calculating and judging the slope value of each stepping point of the continuous ascending area or the continuous descending area to finally obtain the stagnation point.
In some embodiments, M is, for example, 3, i.e., 3 consecutive stagnation points are obtained. For example, the value of M is 5, and then 5 continuous stagnation points are obtained.
Fig. 3 is a schematic diagram of step point ADC data and stagnation point position at the intersection of the label paper gap and the label paper according to an embodiment of the present application.
Referring to fig. 3, several stagnation points are obtained, for example, by the aforementioned stagnation point determination process, specifically, as indicated by circles at PA, PB, PC and PD in fig. 3, where the stagnation point is located on the histogram of the step point ADC, but is not the vertex of a square in the histogram, and is actually an extraction point corresponding to a specific physical meaning. The stagnation point also corresponds to a step point, and thus it also corresponds to the ADC value at that step point.
In step 102, determining an initial value of a boundary ADC value, a height of the label paper, and a height of the gap according to ADC values corresponding to the M stagnation points.
In some embodiments, determining the initial value of the demarcation ADC value from the ADC values corresponding to the M stagnation points comprises: and averaging the ADC values of the stepping points corresponding to the M stagnation points to obtain the initial demarcation ADC value.
For example, after 5 stagnation points are determined, the ADC values of the step points corresponding to the 5 stagnation points may be averaged to obtain the initial boundary ADC value.
The height of the label paper and the height of the gap can be obtained through the difference value of the corresponding stepping numbers of the adjacent stagnation points and the distance parameter of single stepping of the stepping motor. For example, the height of the gap can be obtained by multiplying the difference between the step numbers of the two step points, the step points corresponding to the stationary point PB and the stationary point PA, and the distance parameter of the single step of the stepping motor. Similarly, the height of the label paper can be obtained by multiplying the difference value of the stepping numbers of the stepping points corresponding to the stagnation point PC and the stagnation point PB by the distance parameter of single stepping of the stepping motor. As mentioned above, the values of the step points in fig. 2 or fig. 3 are only schematic to facilitate understanding of the implementation process of the scheme.
After the 5 stagnation points are determined, for example, the values of the heights of the two groups of label paper and the height of the gap can be obtained, and at this time, the average value of the two groups of values can also be taken as the height of the label paper and the height of the gap to smooth the data.
Next, in step 103, the demarcation ADC value is updated as printing progresses.
In some embodiments, during the learning and printing process of the label printer, for example, initially 3 stagnation points are determined, and then every 2 new stagnation points are determined, as a cycle has elapsed. The demarcation ADC values may be updated on a periodic basis.
In some embodiments, updating the demarcation ADC value as printing progresses comprises:
as the printing proceeds, the boundary ADC value is updated to the average value of the ADCs of the plurality of step points corresponding to the slit area and the average value of the ADCs of the plurality of step points corresponding to the label paper area, in other words, the average value of the ADCs of the plurality of step points corresponding to the slit area a2 and the average value of the ADCs of the plurality of step points corresponding to the label paper area a1, and the values obtained by averaging are used as the updated boundary ADC value.
In some embodiments, if the ADC value of the current step point is greater than the boundary ADC value or the initial value of the boundary ADC value, it is determined that the printing position sensor is located in the gap area, an average value of the ADCs of the plurality of step points corresponding to the current gap area is calculated, and when the printing position sensor is switched from the current gap area to the adjacent label paper area, an average value of the ADCs of the plurality of step points corresponding to the current gap area and an average value of the ADCs of the plurality of step points corresponding to the previous label paper area are calculated and updated to the boundary ADC value.
In other embodiments, if the ADC value of the current step point is less than or equal to the boundary ADC value or the initial value of the boundary ADC value, it is determined that the printing position sensor is located in the tab sheet area, an average value of the ADCs of the step points corresponding to the current tab sheet area is calculated, and when the printing position sensor is switched from the current tab sheet area to the adjacent gap area, an average value of the ADCs of the step points corresponding to the current tab sheet area and an average value of the ADCs of the step points corresponding to the previous gap area are calculated and updated to the boundary ADC value.
In some embodiments of the present application, in determining the M stagnation points, a stagnation point check is performed on the determination of each stagnation point,
the stagnation point check comprises positive and negative check of the slope value of the step point ADC, height check of the label paper, height check of the gap, height difference check of the label paper, height difference check of the gap and/or ADC value difference check of the step point.
The positive and negative check of the slope values of the step point ADC, for example, checks whether the trends of the t slope values are the same, and continues the subsequent determination process when the trends of the t slope values are the same, i.e., both positive and both negative. The height check of the label paper and the height check of the gap compare the values of the height of the label paper and the height of the gap calculated by the stagnation point with a set threshold value to see whether the values meet the check conditions. The height difference check of the tabbed paper compares the difference between the currently calculated tabbed paper height and the previously calculated tabbed paper height with a set threshold value to see whether the difference meets the check condition. The principle of gap height difference check and stagnation ADC value difference check is similar.
In some embodiments, if one quasi-stationing point is not determined as a stationing point through the verification, the stationing point searching process is performed again, that is, the stationing point confirmation process is performed again from the first stationing point. For example, two consecutive stagnation points have been determined, and if the quasi stagnation point does not pass the verification in the process of determining the third stagnation point, the quasi stagnation point is cleared, and the determined two stagnation points are cleared together, and the determination of the stagnation point is restarted.
In some embodiments, during the updating of the demarcation ADC value, update checking is performed for each updating process;
the update check includes a ratio check of a stepped distance to a height of the label paper, a difference check of the stepped distance to the height of the gap, and/or a current value of the demarcation ADC value and an updated value.
The ratio of the step distance to the height of the label paper is verified, for example, the step distance needs to exceed half of the previously calculated label paper height before the verification condition is satisfied.
The difference between the current value and the updated value of the demarcation ADC value is checked, for example, the difference between the current value (or referred to as the value before updating) and the updated value (or referred to as the value to be updated) of the demarcation ADC value is compared with a set threshold, and the demarcation ADC value can be updated only if the set threshold condition is met. In some embodiments, other verification conditions may be set as needed, for example, if the difference between the current value of the boundary ADC value (or referred to as the value before update) and the updated value of the boundary ADC value (or referred to as the value to be updated) exceeds the set threshold condition for ten or other times, it may be determined that the operating condition of the printer has changed, and the boundary ADC value is forcibly updated.
Through the verification process, the problems that printing paper wrinkles or sensor signals fluctuate and the like when the position of the printing and positioning device is determined when the printer starts to print in the operation process of the printer can be avoided.
In some embodiments, the method of operating a label printer further comprises determining the position of the print head and the print position sensor from the demarcation ADC value and the step dot ADC value output by the print position sensor.
More specifically, the operating method of the label printer further includes positioning the print head and the print position sensor to a print initial position according to the division ADC value or an initial value of the division ADC value, a step-point ADC value output by the print position sensor, the height of the label sheet, the height of the gap, and a step distance of the stepping motor.
In the technical scheme of this application, update demarcation ADC value, can make the printing and the positioner of label printer, beat printer head promptly and print position sensor according to demarcation ADC value with when its position was confirmed to the step point ADC value of printing position sensor output, avoid the influence of the radian change that the scroll took place along with going on of printing to avoid the inaccurate problem in location that from this brings, thereby make the printing process can accurately go on high-efficiently. Updating the demarcation ADC value is also a process of constantly learning the label printer.
In some embodiments, positioning the print head and the print position sensor to the print initial position according to the demarcation ADC value or the initial value of the demarcation ADC value, the step point ADC value output by the print position sensor, the height of the label sheet, the height of the slit, and the step distance of the stepping motor includes, for example: determining the positions of the printing head and the printing position sensor according to the demarcation ADC value or the stepping point ADC value output by the printing position sensor according to the initial value of the demarcation ADC value, and determining whether the printing position sensor is positioned in a label paper area or a gap area at the moment, wherein the number of steps stepped by a stepping motor in a period can be obtained at the moment, or the number of steps of a label paper corresponding to the stepped passing area or the number of steps corresponding to the stepped passing gap area through conversion calculation;
then, if the printing position sensor is located in the tab paper area (for example, after one-time printing is finished, the last tab paper of this time printing is partially used up, and the printing position sensor is located in the last tab paper area of this time printing and exceeds the printing initial position), the step number of the printing position sensor to the next tab paper area is determined according to the step number of the stepping motor at this time, the height of the gap, the distance between the printing initial position and the upper edge of the tab position, and the stepping distance of the stepping motor, and the step number of the printing head to the printing initial position is also stepped, so that the printing head is positioned to the printing initial position of the tab paper of the next chapter, and the next printing is started smoothly.
If the printing position sensor is positioned in the gap area or the area close to the upper edge of the label paper (for example, after one-time printing is finished, the printing position sensor is positioned in the gap or before the printing initial position of the next label paper), determining that the printing position sensor is stepped to the next label paper area according to the stepped number of the stepping motor (corresponding to a part of the gap or a part of the distance of the printing initial position), the height of the gap, the distance between the printing initial position and the upper edge of the label and the one-step stepping distance of the stepping motor, and enabling the printing head to step to the stepping number of the printing initial position, so that the printing head is positioned to the printing initial position of the next label paper to smoothly start the next printing; or the printing head is continuously stepped to the printing initial position from the printing initial position before one sheet, so as to smoothly start the next printing.
The technical scheme of this application can make the label printer learn the parameter that the label printed through 2 pieces of label paper at least, relevant position parameter promptly, for example including demarcation ADC value, label paper height and gap height to realize practicing thrift the paper, the effect of high-efficient environmental protection. In some technical schemes, the process of learning and acquiring the printing parameters by the label printer is complicated and needs to consume more paper, the scheme of the application avoids the defect, and the label printing is accurately and efficiently carried out at the beginning and in the printing process.
The application also provides a label printer which is provided with a controller, a printing head and a printing position sensor, wherein the printing head and the printing position sensor are driven by a stepping motor; the printing paper of the label printer comprises base paper and label paper, wherein the label paper is adhered to the base paper at intervals, and gaps are formed between the adjacent label paper at intervals; the printing head prints on the label paper;
the controller is configured to perform the method as recited above. In some embodiments, the controller is configured to perform the steps of: step 201, determining M stagnation points according to step point ADC values output by the printing position sensor, wherein the stagnation points mark the junction positions of the base paper and the label paper, and M is a positive integer greater than or equal to 3; step 202, determining an initial value of a boundary ADC value, the height of the label paper and the height of the gap according to the ADC values corresponding to the M stagnation points; step 203, updating the demarcation ADC value as printing progresses.
The process of determining M stagnation points by the step point ADC value output by the print position sensor, and the process of updating the boundary ADC value as printing progresses, can refer to the foregoing description.
The present application also provides a computer storage medium, characterized by comprising computer instructions, which, when run on an electronic device, cause the electronic device to perform the method of operating a label printer as previously described.
Aspects of the present application may be embodied entirely in hardware, entirely in software (including firmware, resident software, micro-code, etc.) or in a combination of hardware and software. The above hardware or software may be referred to as "data block," module, "" engine, "" unit, "" component, "or" system. The processor may be one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), digital signal processing devices (DAPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), processors, controllers, microcontrollers, microprocessors, or a combination thereof. Furthermore, aspects of the present application may be represented as a computer product, including computer readable program code, in one or more computer readable media. For example, computer-readable media can include but are not limited to magnetic storage devices (e.g., hard disk, floppy disk, magnetic strips … …), optical disks (e.g., Compact Disk (CD), Digital Versatile Disk (DVD) … …), smart cards, and flash memory devices (e.g., card, stick, key drive … …).
The computer readable medium may comprise a propagated data signal with the computer program code embodied therein, for example, on a baseband or as part of a carrier wave. The propagated signal may take any of a variety of forms, including electromagnetic, optical, and the like, or any suitable combination. The computer readable medium can be any computer readable medium that can communicate, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device. Program code on a computer readable medium may be propagated over any suitable medium, including radio, electrical cable, fiber optic cable, radio frequency signals, or the like, or any combination of the preceding.
Similarly, it should be noted that in the preceding description of embodiments of the application, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure aiding in the understanding of one or more of the embodiments. This method of disclosure, however, is not intended to require more features than are expressly recited in the claims. Indeed, the embodiments may be characterized as having less than all of the features of a single disclosed embodiment.
Where numerals describing the number of components, attributes or the like are used in some embodiments, it is to be understood that such numerals used in the description of the embodiments are modified in some instances by the modifier "about", "approximately" or "substantially". Unless otherwise indicated, "about", "approximately" or "substantially" indicates that the number allows a variation of ± 20%. Accordingly, in some embodiments, the numerical parameters set forth in the specification and claims are approximations that may vary depending upon the desired properties sought to be obtained by a particular embodiment. In some embodiments, the numerical parameter should take into account the specified significant digits and employ a general digit preserving approach. Notwithstanding that the numerical ranges and parameters setting forth the broad scope of the range are approximations, in the specific examples, such numerical values are set forth as precisely as possible within the scope of the application.
Although the present application has been described with reference to the present specific embodiments, it will be recognized by those skilled in the art that the foregoing embodiments are merely illustrative of the present application and that various changes and substitutions of equivalents may be made without departing from the spirit of the application, and therefore, it is intended that all changes and modifications to the above-described embodiments that come within the spirit of the application fall within the scope of the claims of the application.

Claims (12)

1. A method of operating a label printer having a sheet of printing paper including a base sheet and a label sheet adhered to the base sheet at spaced intervals with gaps formed between adjacent label sheets, the label printer having a printhead and a print position sensor, the printhead and the print position sensor being driven by a stepper motor, the printhead printing on the label sheet, the method comprising the steps of:
determining M stagnation points according to a stepping point ADC value output by the printing position sensor, wherein the stagnation points mark the junction position of the base paper and the label paper, and M is a positive integer greater than or equal to 3;
determining an initial value of a boundary ADC value, the height of the label paper and the height of the gap according to the step point ADC values corresponding to the M stagnation points;
updating the demarcation ADC value as printing progresses;
the label paper corresponds to the label paper area, and gaps among the label paper correspond to the gap area.
2. The method of operating a label printer according to claim 1, wherein determining M stagnation points from the stepped point ADC values output by the print position sensor comprises:
for a stepping point n, calculating a stepping point ADC slope value from the nth point to the n-1 th point, a stepping point ADC slope value from the n-1 th point to the n-2 nd point, a stepping point ADC slope value from the n-2 nd point to the n-3 rd point, … and a stepping point ADC slope value from the n-t th point to the n-t-1 th point, wherein n and t are positive integers, and n-t-1 is more than 0;
calculating an average ADC slope value of the step point ADC slope values from the nth point to the n-1 st point, the step point ADC slope values from the n-1 st point to the n-2 nd point, the step point ADC slope values from the n-2 nd point to the n-3 rd point, … and the step point ADC slope values from the n-t th point to the n-t-1 st point as an arithmetic ADC slope value of the step point n, wherein the arithmetic ADC slope value of the step point n comprises a positive value and a negative value;
and when the arithmetic ADC slope value is a negative value, taking the stepping point corresponding to the maximum value of the arithmetic ADC slope value in the continuous positive values as the stagnation point.
3. The method of claim 1, wherein determining an initial value for a demarcation ADC value based on ADC values corresponding to the M stagnation points comprises:
and averaging the ADC values of the stepping points corresponding to the M stagnation points to obtain an initial value of the demarcation ADC value.
4. The method of operating a label printer according to claim 1, wherein updating the demarcation ADC value as printing progresses comprises:
as printing progresses, the boundary ADC value is updated to an average value of the average values of the ADCs of the plurality of step points corresponding to the slit area and the average value of the ADCs of the plurality of step points corresponding to the label paper area.
5. The method of operating a label printer according to claim 4, wherein if the ADC value of the current step point is larger than the boundary ADC value or the initial value of the boundary ADC value, it is determined that the printing position sensor is located in the slit area, the average value of the ADCs of the plurality of step points corresponding to the current slit area is calculated, and when the printing position sensor is switched from the current slit area to the adjacent label paper area, the average value of the ADCs of the plurality of step points corresponding to the current slit area and the average value of the ADCs of the plurality of step points corresponding to the previous label paper area are calculated and updated to the boundary ADC value.
6. The method of operating a label printer according to claim 4, wherein if the ADC value of the current step point is less than or equal to the boundary ADC value or the initial value of the boundary ADC value, it is determined that the printing position sensor is located in the label paper area, the average value of the ADCs of the plurality of step points corresponding to the current label paper area is calculated, and when the printing position sensor is switched from the current label paper area to the adjacent slot area, the average value of the ADCs of the plurality of step points corresponding to the current label paper area and the average value of the ADCs of the plurality of step points corresponding to the previous slot area are calculated and updated to the boundary ADC value.
7. The method of operating a label printer according to claim 2, wherein in determining the M stagnation points, the determination of each stagnation point is checked for stagnation;
the stagnation point check comprises positive and negative check of the slope value of the step point ADC, height check of the label paper, height check of the gap, height difference check of the label paper, height difference check of the gap and/or stagnation point ADC value difference check.
8. The method of operating a label printer according to claim 1, wherein, in updating the demarcation ADC value, the updating is checked for each updating;
the update check includes a ratio check of a stepped distance to a height of the label paper, a comparison of the stepped distance to the height of the gap, and/or a difference check of a current value of the demarcation ADC value to an updated value.
9. The method of operating a label printer according to claim 1, further comprising: and determining the positions of the printing head and the printing position sensor according to the boundary ADC value and the stepping point ADC value output by the printing position sensor.
10. The method of operating a label printer according to claim 9, further comprising:
and positioning the printing head and the printing position sensor according to the boundary ADC value or the initial value of the boundary ADC value, the stepping point ADC value output by the printing position sensor, the height of the label paper, the height of the gap and the stepping distance of the stepping motor to the initial printing position.
11. A label printer has a controller, a print head and a print position sensor, the print head and the print position sensor are driven by a stepper motor; the printing paper of the label printer comprises base paper and label paper, wherein the label paper is adhered to the base paper at intervals, and gaps are formed between every two adjacent label paper; the printing head prints on the label paper;
the controller is configured to perform a method of operating a label printer according to any one of claims 1 to 10.
12. A computer storage medium comprising computer instructions which, when run on an electronic device, cause the electronic device to perform a method of operating a label printer according to any one of claims 1 to 10.
CN202110956698.4A 2021-08-19 2021-08-19 Label printer and operation method thereof Active CN113580784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110956698.4A CN113580784B (en) 2021-08-19 2021-08-19 Label printer and operation method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110956698.4A CN113580784B (en) 2021-08-19 2021-08-19 Label printer and operation method thereof

Publications (2)

Publication Number Publication Date
CN113580784A CN113580784A (en) 2021-11-02
CN113580784B true CN113580784B (en) 2022-06-24

Family

ID=78238604

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110956698.4A Active CN113580784B (en) 2021-08-19 2021-08-19 Label printer and operation method thereof

Country Status (1)

Country Link
CN (1) CN113580784B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024007708A1 (en) * 2022-07-06 2024-01-11 上海商米科技集团股份有限公司 Learning-based printer paper positioning method, printing method for printer paper, and printer
CN115157885B (en) * 2022-07-06 2023-12-29 上海商米科技集团股份有限公司 Printing paper positioning method and system based on learning
CN115157886B (en) * 2022-07-06 2023-12-29 上海商米科技集团股份有限公司 Label paper printing method and label printer using same
CN115107382A (en) * 2022-07-25 2022-09-27 上海商米科技集团股份有限公司 Photoelectric sensing device of printer
CN117953764B (en) * 2024-03-26 2024-06-25 武汉精臣智慧标识科技有限公司 Continuous paper label, label printer and allowance measuring and calculating method

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0418138D0 (en) * 2004-08-13 2004-09-15 Ingenia Technology Ltd Methods and apparatuses for creating authenticatable printed articles and subsequently verifying them
CN101678687A (en) * 2007-03-07 2010-03-24 赛福尔有限公司 Tape drive
CN103434277A (en) * 2013-08-22 2013-12-11 重庆品胜科技有限公司 Method for measuring label width of handheld label printer
CN104364084A (en) * 2012-05-30 2015-02-18 精工爱普生株式会社 Label printer and label printing system
CN106541714A (en) * 2015-09-16 2017-03-29 山东新北洋信息技术股份有限公司 A kind of control method and label machine of label machine
CN107757150A (en) * 2016-08-15 2018-03-06 山东新北洋信息技术股份有限公司 The label detection method and device of label machine
CN108688359A (en) * 2017-03-30 2018-10-23 大数据奥尼尔公司 Label is detected to stop
CN109562627A (en) * 2016-06-17 2019-04-02 录象射流技术公司 Printer
CN111516397A (en) * 2020-04-30 2020-08-11 厦门汉印电子技术有限公司 Label paper identification method, device, equipment and readable storage medium
CN111823736A (en) * 2020-07-02 2020-10-27 西安富立叶微电子有限责任公司 Label paper identification and positioning method
CN211918107U (en) * 2019-12-31 2020-11-13 武汉精臣智慧标识科技有限公司 Paper returning positioning assembly for printer
CN112373200A (en) * 2020-10-28 2021-02-19 珠海泽冠科技有限公司 Paper positioning and driving device of label printer and application method thereof
CN112906835A (en) * 2019-12-04 2021-06-04 大族激光科技产业集团股份有限公司 Label marking system and marking method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7770995B2 (en) * 2005-05-09 2010-08-10 Silverbrook Research Pty Ltd Mobile telecommunications device with media edge detection

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB0418138D0 (en) * 2004-08-13 2004-09-15 Ingenia Technology Ltd Methods and apparatuses for creating authenticatable printed articles and subsequently verifying them
CN101678687A (en) * 2007-03-07 2010-03-24 赛福尔有限公司 Tape drive
CN104364084A (en) * 2012-05-30 2015-02-18 精工爱普生株式会社 Label printer and label printing system
CN103434277A (en) * 2013-08-22 2013-12-11 重庆品胜科技有限公司 Method for measuring label width of handheld label printer
CN106541714A (en) * 2015-09-16 2017-03-29 山东新北洋信息技术股份有限公司 A kind of control method and label machine of label machine
CN109562627A (en) * 2016-06-17 2019-04-02 录象射流技术公司 Printer
CN107757150A (en) * 2016-08-15 2018-03-06 山东新北洋信息技术股份有限公司 The label detection method and device of label machine
CN108688359A (en) * 2017-03-30 2018-10-23 大数据奥尼尔公司 Label is detected to stop
CN112906835A (en) * 2019-12-04 2021-06-04 大族激光科技产业集团股份有限公司 Label marking system and marking method thereof
CN211918107U (en) * 2019-12-31 2020-11-13 武汉精臣智慧标识科技有限公司 Paper returning positioning assembly for printer
CN111516397A (en) * 2020-04-30 2020-08-11 厦门汉印电子技术有限公司 Label paper identification method, device, equipment and readable storage medium
CN111823736A (en) * 2020-07-02 2020-10-27 西安富立叶微电子有限责任公司 Label paper identification and positioning method
CN112373200A (en) * 2020-10-28 2021-02-19 珠海泽冠科技有限公司 Paper positioning and driving device of label printer and application method thereof

Also Published As

Publication number Publication date
CN113580784A (en) 2021-11-02

Similar Documents

Publication Publication Date Title
CN113580784B (en) Label printer and operation method thereof
CN106626847B (en) Printing method and printer
KR0165852B1 (en) printer
CN114043809B (en) Printer device and method for operating a printer device comprising a print head
EP2105884B1 (en) Printer device and method for controlling cutting position of boarding pass
CN103213410B (en) Check paper cutting control device and drawing machine
US9147137B2 (en) Label printer, and method of searching optimal communication position
JPS63112185A (en) Printer
JP2011033822A (en) Label with release paper, label printer, and printing method of label
CN103874335A (en) Circuit board etching line width control method
JP2007297176A (en) Page-pitch detecting method, page-pitch detecting device and printer
CN110978803B (en) Thermal transfer printer, motor driving method and device thereof, and storage medium
CN110321975B (en) Label printer, label positioning method and device thereof, and storage medium
JPH07246738A (en) Printer
CN115157886B (en) Label paper printing method and label printer using same
JPH044164A (en) Document processing device
CN204856544U (en) RFID electronic tags writes sign indicating number, detects integrated device
US10828919B2 (en) Printer and method for accurately recognizing positions of labels
JPH07252021A (en) Sheet transport device
CN111070922B (en) Thermal transfer printer, thermal transfer printer
CN205768048U (en) Pattern location print system on a kind of thin film
JP2899456B2 (en) Label printer
JPH021736B2 (en)
JP2018075656A (en) Punching device and image forming apparatus
EP3477464B1 (en) Controller for a printer, printing system and method for controlling a printer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant