Label printer and label paper positioning method thereof

By using a photoelectric detection module in the label printer to identify the detection mark, combined with dynamic adjustment of the signal quality factor, the positioning accuracy and cost issues of the label printer are solved, achieving precise positioning and paperless detection.

CN121928876APending Publication Date: 2026-04-28ZHONGSHAN POLONO ELECTRONIC TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHONGSHAN POLONO ELECTRONIC TECHNOLOGY CO LTD
Filing Date
2026-02-03
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing label printers require two optocouplers for label position detection, which increases production costs and size. They also cannot adapt to different types and materials of label paper, leading to decreased detection accuracy and positioning errors.

Method used

A photoelectric detection module is used to identify the detection marks on the label paper by emitting and receiving light signals. The controller determines the position of the printed label based on the transition edge of the level signal and dynamically adjusts the judgment conditions through the signal quality factor to achieve precise positioning and paperless detection.

Benefits of technology

It achieves precise positioning under different label paper types and materials, reduces production costs, reduces the size of label printers, and improves detection accuracy and resistance to environmental interference.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121928876A_ABST
    Figure CN121928876A_ABST
Patent Text Reader

Abstract

The invention provides a label printer and a label paper positioning method thereof, and the method comprises the following steps: a photoelectric detection module of the label printer transmits and receives an optical signal, when a non-detection mark area including a printing label on label paper passes through the position of the photoelectric detection module, the photoelectric detection module outputs a first level signal, and the first level signal is transmitted to the photoelectric detection module; when the detection mark on the label paper passes through the position of the photoelectric detection module, the photoelectric detection module outputs a second level signal; the controller obtains level signals which are output by the photoelectric detection module and comprise the first level signal and the second level signal, records the forming time of the jump edge of the level signals, and controls the paper feeding motor to rotate based on the forming time so as to convey the next printing label to the target position. The accuracy of printed label positioning can be improved, and positioning and paperless detection can be achieved only through one photoelectric detection module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of printers, and more specifically, to a label printer and a label paper positioning method thereof. Background Technology

[0002] Label printers are widely used, and businesses in shopping malls, supermarkets, and other similar establishments frequently use them to print labels for various products. Label printers use label paper as a consumable. The label paper is installed inside the printer and contains multiple labels. A paper feed motor inside the printer moves the label paper, aligning the print head with the label. The print head then prints the desired text or images onto the label.

[0003] Because the printed labels on the label paper are not arranged continuously, there is usually a gap between two adjacent printed labels along the paper feed direction. To accurately position the printed labels and detect whether the label printer is empty, existing label printers typically have a detection device. A common detection method is to install two optocouplers inside the label printer: one optocoupler detects the gap between two adjacent printed labels to determine the starting position of the printed label; the other optocoupler detects whether the label printer is empty.

[0004] However, this method requires two optocouplers, which increases the production cost of the label printer. Furthermore, having two optocouplers inside the label printer increases its size and hinders its miniaturization.

[0005] In addition, due to the differences in the types and materials of label paper, and the fact that existing label printers often use the same detection algorithm to detect printed labels, the same detection algorithm often cannot meet the detection needs of various types and materials of label paper, resulting in a decrease in detection accuracy. In particular, the detection accuracy for the gap between two adjacent printed labels is insufficient, leading to incorrect positioning of the printed labels.

[0006] If the gap detection of the printed labels is incorrect, the label printer will misjudge the starting position of the printed labels, resulting in the printed content not being printed in the accurate position of the printed labels, or even being printed in the gap between two printed labels, or a printed label not being printed, resulting in blank paper. Summary of the Invention

[0007] The first objective of this invention is to provide a label paper positioning method that can accurately detect the position of printed labels.

[0008] A second objective of this invention is to provide a label printer that applies the above-described label paper positioning method.

[0009] To achieve the aforementioned first objective, the present invention provides a label paper positioning method for a label printer, comprising the following steps: The photoelectric detection module of the label printer emits and receives light signals. When a non-detection mark area, including the printed label on the label paper, passes through the location of the photoelectric detection module, the photoelectric detection module outputs a first-level signal. When a detection mark on the label paper passes through the location of the photoelectric detection module, the photoelectric detection module outputs a second-level signal. The controller acquires the level signal output by the photoelectric detection module, which includes the first level signal and the second level signal, and records the formation time of the transition edge of the level signal. Based on the formation time, it controls the paper feed motor to rotate so as to deliver the next printed label to the target position.

[0010] Preferably, recording the formation time of the transition edge of the level signal includes: taking the first level signal as the reference level signal, and determining whether the current level signal is lower or higher than the reference level by a preset ratio; if so, confirming that the current level signal is the second level signal, and confirming the formation of the transition edge.

[0011] Preferably, the preset ratio is an adjustable ratio.

[0012] Preferably, the rotational speed of the paper feed motor is obtained, and the target duration of the second level is calculated based on the preset detection mark size, and the duration range of the second level is determined based on the target duration; after obtaining the second level, it is determined whether the duration of the second level is within the duration range, and if not, the current second level is confirmed to be invalid.

[0013] Preferably, after the controller acquires the level signal output by the photoelectric detection module, it calculates the waveform characteristics of the pulse signal used to identify the detection mark based on the level signal, calculates the signal quality factor based on the waveform characteristics, and dynamically adjusts the judgment conditions of the pulse signal based on the signal quality factor.

[0014] Preferably, dynamically adjusting the judgment conditions for pulse signals based on the signal quality factor includes: tightening the judgment conditions for pulse signals when the signal quality factor is greater than or equal to a first preset threshold; maintaining the current judgment conditions when the signal quality factor is less than the first preset threshold but greater than a second preset threshold; and relaxing the judgment conditions for pulse signals when the signal quality factor is less than or equal to the second preset threshold.

[0015] Preferably, the judgment condition for tightening the pulse signal includes at least one of the following: reducing the duration range of the second level; reducing the confirmation threshold range of the second level; and immediately confirming that the current pulse signal is a pulse signal formed by the detection mark.

[0016] Preferably, the criteria for judging the pulse signal include at least one of the following: increasing the duration range of the second level; increasing the confirmation threshold range of the second level; and marking the current pulse signal as a suspicious detection marker pulse signal.

[0017] Preferably, the waveform characteristics include at least one of the following: steepness of the transition edge, flatness of the second level, and symmetry of the pulse signal.

[0018] Preferably, the waveform features include at least two of the following: steepness of the transition edge, flatness of the first level and / or the second level, and symmetry of the pulse signal; calculating the signal quality factor based on the waveform features includes: using the quantized values ​​of at least two waveform features to perform weighted summation or multiplication to obtain the signal quality factor.

[0019] To achieve the second objective described above, the label printer provided by the present invention has a controller and a photoelectric detection module. The controller is capable of receiving the level signal output by the photoelectric detection module and is capable of executing any of the label paper positioning methods described above.

[0020] The technical solution of the present invention has the following beneficial effects: When the label paper has detection marks, especially through holes, between two adjacent printed labels, this invention uses a photoelectric detection module to emit and receive light signals. The position of the detection mark on the label paper can be identified based on the level signal output by the photoelectric detection module. Since the detection mark is located between two adjacent printed labels, once the position of the detection mark is identified, the starting position of the next printed label can be determined, thus enabling precise identification of the position of each printed label.

[0021] Even if the label paper is of different types and materials, as long as there is a detection mark between two adjacent printed labels, the detection mark can be accurately identified by the change in the level signal of the photoelectric detection module, and the position of each printed label can also be accurately identified.

[0022] Furthermore, this invention only requires a single photoelectric detection module to simultaneously achieve precise label paper positioning and paperless detection. For example, detecting a change in a first-level signal and a second-level signal within a certain period confirms that a detection mark has been detected; conversely, if no change in the first-level and second-level signals is detected after a preset time, it can be determined that the label printer is empty. Thus, using only a single photoelectric detection module can achieve both label printing gap and paperless detection, reducing the production cost of label printers.

[0023] Furthermore, the present invention can dynamically adjust the preset ratio used to determine the second level according to changes in actual usage, effectively avoiding reference drift caused by changes in the reflectivity of the label paper or contamination of the photoelectric detection module surface, thereby improving the accuracy of detection.

[0024] Furthermore, this invention calculates a signal quality factor based on the waveform characteristics of the pulse signal used to identify the detection mark. When the calculated value of the signal quality factor is high, it indicates that the current detection environment is good, and the judgment condition for identifying it as a detection mark is tightened. When the calculated value of the signal quality factor is low, it indicates that the current detection environment is poor, and the judgment condition for identifying it as a detection mark is relaxed. This allows for flexible and dynamic adjustment of the judgment condition for the detection mark according to the actual usage environment, thereby accurately detecting the position of the detection mark and eliminating the problem of inaccurate detection of the detection mark due to changes in environmental factors. Attached Figure Description

[0025] Figure 1a This is a schematic diagram of the first structure of the label paper in the first embodiment of the present invention.

[0026] Figure 1b This is a schematic diagram of the second structure of the label paper in the first embodiment of the present invention.

[0027] Figure 2 This is a system structure block diagram of the label printer in the first embodiment of the present invention.

[0028] Figure 3 This is a flowchart of the label paper positioning method in the first embodiment of the present invention.

[0029] Figure 4 This is a flowchart of the label paper positioning method of the label printer in the fourth embodiment of the present invention. Detailed Implementation

[0030] First Embodiment The label paper positioning method of this invention is applied to a label printer that uses label paper as the printing medium. See also... Figure 1a and 1b In this embodiment, the label paper 10 has multiple printed labels 11, and at least one through hole 12, serving as an example of a detection mark, is formed between two adjacent printed labels 11. The through holes 12 are spaced apart from the printed labels 11. Figure 1a ) or interconnected ( Figure 1b Alternatively, the through-hole 12 may be recessed into the printed label 11, or at least partially disposed on the printed label 11 (also connected to the printed label). In other embodiments, the detection mark may be another mark with a reflectivity or transmittance of light signals different from that of the printed label 11, such as a black mark.

[0031] See Figure 2The label printer is equipped with a controller 21, a photoelectric detection module 22 (e.g., an optocoupler or photoelectric sensor), and a paper feed motor 23. When the photoelectric detection module 22 is a reflective photoelectric sensor, since the non-detection mark area, including the printed label 11, can reflect the light signal emitted by the photoelectric detection module 22, the photoelectric detection module 22 outputs a first-level signal, which is a low-level signal. When a detection mark, such as through-hole 12, passes through the photoelectric detection module 22, the photoelectric detection module 22 outputs a second-level signal, which is a high-level signal. In other embodiments, the photoelectric detection module can be a through-beam sensor. In this case, when the printed label 11 passes through, the photoelectric detection module outputs a high-level signal, i.e., the first-level signal is a high-level signal. When a detection mark, such as through-hole 12, passes through, the photoelectric detection module outputs a low-level signal, i.e., the second-level signal is a low-level signal.

[0032] The photoelectric detection module 22 outputs a level signal to the controller 21, and the controller 21 determines the position of the detection mark based on the level signal output by the photoelectric detection module 22. For example, when the through hole 12 passes the position of the photoelectric detection module 22, the controller 21 will receive a high-level or low-level pulse signal, that is, the level signal jumps from low level to high level or from high level to low level, and after a very short time (the time it takes for the through hole 12 to pass), it jumps from high level to low level or from low level to high level. In this way, the controller can determine whether the through hole 12 has been detected based on the change of the level signal. Since the position of the through hole 12 / detection mark is often the starting position of the next printed label 12, this embodiment can realize the positioning of the printed label 12 based on the jump of the level signal. Further, after the controller 22 realizes the positioning of the printed label 12 based on the received level signal, it also needs to send a control signal to the paper feed motor 23 to control the operation of the paper feed motor 23, so that the paper feed motor 23 drives the label paper 10 to deliver the printed label 11 to the target position, such as directly below the print head.

[0033] For details, see Figure 3 In this embodiment, step S11 is executed first. After the label printer starts, the photoelectric sensor is activated, emitting and receiving light signals. Then, step S12 is executed to output a level signal to the controller. Since the level signals generated by the photoelectric detection module are different when the printed label 11 and the through hole 12 pass through the location of the photoelectric detection module, for example, a high-level pulse will be generated when the through hole 12 passes through, the level signal will form a transition edge.

[0034] Therefore, step S13 is executed next. The controller determines whether a transition edge is formed based on the level signal output by the photoelectric detection module. If so, it means that the through hole 12 passes through the position of the photoelectric detection module. Then step S14 is executed, and the time of the transition edge is used as the positioning time of the next printed label 11, that is, as the printing end mark of the current printed label 11 and the starting mark of the next printed label.

[0035] Finally, step S15 is executed, which controls the paper feeding distance of the paper feed motor based on the length of the printed label, so that the next printed label 11 is delivered to the target position, such as below the print head, and then the printing operation begins.

[0036] Especially when through-holes 12 are provided on the label paper 10, even if different types and materials of label paper differ, a high-level pulse, i.e., a transition edge, can be formed when the through-hole 12 passes through. Therefore, this embodiment can accurately position the printed label. Furthermore, if there is no paper in the label printer, the photoelectric detection module will not generate high-level and low-level changes for a long time. Therefore, the controller will not receive a transition edge for a long time, and the controller can determine that there is no paper. It can be seen that this embodiment only requires one photoelectric detection module to achieve label positioning and paperless detection, which can reduce the production cost of the label printer and facilitate the miniaturization of the label printer.

[0037] It should be noted that the value of the first level can be within a predetermined range. The label paper has... Figure 1b In the example structure, since the through-hole 12 is adjacent to / connected to the printed label 11, the non-detection marking area is the area where the printed label 11 is located. The value of the first voltage level will not change significantly. If a change in the voltage level is detected, it can be considered that the through-hole 12 has been detected. However, in the case of label paper with… Figure 1a In the example structure, since there is still a certain gap between the printed label 11 and the through-hole 12, the non-detection marking area includes the printed label 11 and the gap. The first level actually contains two different voltages, but both voltages are within a predetermined range of the first level. For example, when the printed label 11 passes the location of the photoelectric detection module, a higher voltage will be detected, while when the gap between the printed label 11 and the through-hole 12 passes the location of the photoelectric detection module, a slightly lower voltage will be detected. At this time, as long as the voltage is still within the predetermined range of the first level, even if the formed level signal changes, it will not be considered that a through-hole has been detected. Instead, a larger jump in the level signal is detected within a certain period of time, that is, a jump from the first level to the second level, before a through-hole is considered to have been detected.

[0038] Second Embodiment

[0039] Because the reflectivity of paper to light signals can vary depending on the material, or because the surface of the light signal receiver of the photoelectric detection module is contaminated, the intensity of the light signal received by the photoelectric detection module may be affected, causing fluctuations in the voltage of the output signal. These voltage fluctuations will affect the accuracy of the detection.

[0040] Therefore, this embodiment improves upon the first embodiment. Specifically, when determining whether a level signal forms a transition edge, the first level signal is used as the reference level signal, and it is determined whether the current level signal is lower or higher than the reference level by a preset ratio. If it is lower or higher than the reference level by a preset ratio, the current level signal is confirmed to be a second level signal, thereby confirming that the level signal changes from the first level to the second level, which is to say, confirming the formation of a transition edge.

[0041] For example, if the first level signal output when the printed label passes the location of the photoelectric detection module is a low-level signal, this first level signal can be set as the reference level signal. When the through-hole passes the location of the photoelectric detection module, a high-level signal is output. Therefore, if the level signal output by the photoelectric detection module is higher than a preset ratio of the reference level signal, such as a preset ratio of K, and K>1, preferably K is 1.4 or higher, then the current level signal is confirmed as a high-level signal. This ensures that the trigger level has a sufficient signal-to-noise ratio, reliably distinguishing between a real through-hole and minor interference or noise.

[0042] In other embodiments, if the first level signal output when the printed label passes the location of the photoelectric detection module is a high level signal, and the second level signal output when the through hole passes the location of the photoelectric detection module is a low level signal, then the first level signal can be set as a reference level signal. If the level signal output by the photoelectric detection module is lower than a preset ratio of the reference level signal, such as the preset ratio being K, and K < 1, preferably K is below 0.6, then the current level signal is confirmed to be a low level signal.

[0043] It should be noted that the preset ratio is not a fixed value, but an adjustable ratio. For example, the default ratio is 1.4 or 0.6, but when the reflectivity of the paper changes, the ratio can be adjusted, for example to 1.3, 1.2, or 0.7, 0.8, etc.

[0044] Third Embodiment

[0045] Because the paper feed motor has inherent operating errors, the paper feed speed of the label will also fluctuate. Consequently, the duration of the pulse signal generated when the through-hole / detection mark passes the location of the photoelectric detection module will also fluctuate. This embodiment needs to determine whether the through-hole / detection mark has passed the location of the photoelectric detection module based on the duration of the detected pulse signal. If the pulse signal duration is too short, it is considered an interference signal; if the pulse signal duration is too long, it is considered that there is no paper.

[0046] Therefore, this embodiment needs to obtain the instantaneous speed Vcurrent of the paper feed motor, and calculate the target duration T of the second level based on the instantaneous speed Vcurrent and the preset through-hole / detection mark size (e.g., the diameter D of the through-hole), that is, calculate the target duration T of the pulse signal corresponding to the through-hole. The specific calculation formula is T=D / Vcurrent.

[0047] To avoid inaccurate detection due to fluctuations in the target duration of the pulse signal caused by paper feed motor rotation, this embodiment sets an allowable time error Δt. The duration range of the second level is determined based on the target duration and the allowable time error Δt; that is, the allowable duration range of the pulse signal is D / Vcurrent ± Δt. After acquiring the pulse signal, it is necessary to determine whether the pulse signal duration is within the allowable duration range. If it is, the second level signal is confirmed to be valid; otherwise, the second level signal is confirmed to be invalid, meaning it will not be identified as a through-hole.

[0048] Furthermore, the allowable time error Δt can be dynamically adjusted according to the actual situation to meet the needs of different usage scenarios.

[0049] Fourth embodiment

[0050] Since the level signal output by the photoelectric detection module can form a pulse signal corresponding to the through hole / detection mark, this embodiment analyzes the waveform characteristics of the pulse signal to determine the signal quality, and dynamically adjusts the judgment conditions of the pulse signal based on the signal quality, that is, adjusts the conditions for determining it as a through hole / detection mark.

[0051] See Figure 4 In this embodiment, step S21 is executed first. After the label printer starts, the photoelectric detection module starts, emits and receives light signals, and then executes step S22 to output a level signal to the controller. After receiving the level signal, the controller executes step S23 to analyze the pulse signal of the level signal based on the received level signal and calculate the waveform characteristics of the pulse signal. For example, when the through-hole passes through the location of the photoelectric detection module, a pulse signal will be formed.

[0052] Theoretically, the transition edge of a pulse signal is steep, and the voltage fluctuation is small during the pulse signal duration, with the waveform symmetrical along its central axis. However, due to environmental interference, paper reflectivity, and other factors, the actual pulse signal waveform is not perfect. For example, the transition edge may become gentle, large level fluctuations may occur during the trough of the pulse signal, and even pulse signal asymmetry may occur. Therefore, this embodiment analyzes the waveform characteristics of the pulse signal to calculate the signal quality factor Q. The signal quality factor Q is used to judge the quality of the level signal, and the judgment conditions of the pulse signal are dynamically adjusted accordingly, that is, the judgment criteria of the via / detection mark are dynamically adjusted.

[0053] In this embodiment, the signal quality factor Q is related to multiple factors, such as the steepness of the transition edge, the flatness of the pulse signal trough, and the symmetry of the pulse signal. Therefore, it is necessary to calculate and quantize the above factors, and then calculate the signal quality factor Q based on the quantization result, i.e., execute step S24.

[0054] Specifically, the waveform characteristics of an ideal pulse signal (clean and interference-free) are first defined as the basis for comparison. The actual detected pulse signal is compared with the ideal pulse signal to obtain the comparison results of factors such as the steepness of the transition edge, the flatness of the pulse signal trough, and the symmetry of the pulse signal. These results are then quantified, and the signal quality factor Q is calculated. The level of the signal quality factor Q directly reflects the reliability of the current level signal.

[0055] Ideally, the transition from the printed label to the through-hole / detection mark is instantaneous. Therefore, the level signal detected by the photoelectric detection module should jump instantaneously from the first level to the second level, and the transition edge of the pulse signal should be a nearly vertical falling and rising edge. However, due to environmental factors such as stains and uneven paper, the actual transition edge of the pulse signal is often flatter. In this embodiment, when quantifying the steepness of the transition edge, it is first necessary to perform high-speed sampling of the level signal and calculate the actual time t1 for the level to drop from the first level to the second level, or to represent it using the slope of this interval. The smaller the actual time t1, or the larger the slope of the interval, the clearer the transition edge, and the higher the score of the steepness of the transition edge.

[0056] Specifically, the kurtosis score of the transition edge is denoted as S_edge. This score is closely related to the measurement parameters (actual time t1 or slope k), and the kurtosis score S_edge of the transition edge can be calculated using the following method: The first method is to score based on the actual time t1 of the transition edge's descent or ascent, obtaining a steepness score S_edge between 0 and 1. Specifically, a theoretically optimal (or minimum) reference value for the descent or ascent time T_min (e.g., corresponding to the maximum printing speed) and a maximum allowable descent or ascent time threshold T_max are set. If the actual time t1 ≤ T_min, then the score S_edge = 1.0 (ideal case); if T_min < actual time t1 ≤ T_max, then the score S_edge = 1 - (t1 - T_min) / (T_max - T_min) (linear decay); if the actual time t1 > T_max, then the score S_edge = 0 (determined as an invalid signal).

[0057] The second method is to obtain a steepness score S_edge between 0 and 1 based on the average slope k of the falling or rising edge. Specifically, the average slope k = |Δvoltage / t1| is calculated. A theoretically optimal (or expected) slope reference value K_ref is set, and the score S_edge is calculated using the formula S_edge = min(k / K_ref, 1.0). Therefore, a full score of 1 is obtained when the actual slope k reaches or exceeds the ideal reference value K_ref; when it does not reach it, a proportional score is given, with a higher actual slope k resulting in a higher score S_edge.

[0058] When a via / detection mark passes the location of the photoelectric detection module, theoretically, the photoelectric detection module should output a stable high-level signal. If the signal level fluctuates significantly during the trough period, such as exhibiting jitter, it may indicate problems such as irregular shape of the via / detection mark, partial obstruction, or high noise in the photoelectric detection module. During quantization, a series of sampling points are collected within the duration determined to be a via / detection mark, and their variance or range (maximum value - minimum value) is calculated. The smaller the variance or range, the flatter the trough and the more stable the signal; a higher score indicates a smoother trough for the pulse signal.

[0059] Specifically, the flatness score of the trough is denoted as S_flat, and an acceptable maximum variance threshold, Var_max, is set to reflect the maximum allowable fluctuation. The flatness score is calculated using the formula S_flat=max(0,1-Var / Var_max). When the actual variance Var=0 (completely flat), the score S_flat=1.0; if the actual variance Var≥Var_max (excessive fluctuation), the score S_flat=0.

[0060] If the score S_flat is calculated based on the range R, then an acceptable maximum range threshold R_max is set, and the score of valley flatness is calculated using the formula S_flat=max(0,1-R / R_max). If the actual range R=0, then the score S_flat=1.0; when R≥R_max, the score S_flat=0.

[0061] In this embodiment, it is first necessary to determine that the pulse signal corresponds to a through hole / detection mark based on the pulse signal, that is, it has been determined that a through hole / detection mark has been detected based on the pulse signal. Then, the valley flatness of the pulse signal determined to be a through hole / detection mark is detected. The purpose is to separate the "preliminary detection" from the "quality verification", thereby realizing dynamic reliability and fault early warning.

[0062] Determining whether a signal is a via / detection marker based on a pulse signal is an initial triggering based on lenient conditions. That is, the controller first uses a lenient threshold and time window to ensure a high detection rate for preliminary judgment to avoid missed detections; at this point, it merely marks a "suspected via / detection marker event." Subsequent quantitative scoring using waveform flatness is mainly used for "quality verification" and "reliability grading." This means the controller needs to further calculate the signal quality factor Q based on the pulse signal identified as a via / detection marker, and comprehensively consider waveform flatness, steepness, and other factors to perform a "quality check" on the signal. This method dynamically confirms the final state: if the calculated value of the signal quality factor Q is high, the event can be confirmed as a high-quality, reliable via, and precise positioning can be performed according to the normal process; if the calculated value of the signal quality factor Q is low, the event is judged as poor quality and unreliable. In this case, the controller can activate defensive strategies, such as relaxing the conditions for secondary verification, marking it as "suspicious" and comparing encoder data, or triggering a cleaning check of the photoelectric detection module, thus avoiding mispositioning caused by a single low-quality signal. On the other hand, this method can provide system health trend data. By continuously recording and observing the long-term trend of components such as the valley flatness score S_flat, if the valley flatness score S_flat shows a downward trend, even if it can be judged as a through hole / detection mark every time, it indicates that the photoelectric sensor is contaminated and aging, or the mechanical transmission is becoming unstable. This method can provide a basis for predictive maintenance.

[0063] Ideally, the waveform of the pulse signal used to identify a through-hole / detection mark is symmetrical, meaning its rising and falling edges are symmetrical about the center line of the verification pulse signal. Severe asymmetry in the pulse signal may indicate that the photoelectric detection module is installed at an angle or that the paper is deflected during passage. Therefore, this embodiment requires quantifying the waveform symmetry of the pulse signal by comparing the absolute values ​​of the slopes or transition times of the falling and rising edges; the closer these values ​​are, the higher the symmetry score. Specifically, the waveform symmetry score is denoted as S_sym and can be calculated in the following two ways: The first method is based on the quantization of the average slope of the falling and rising edges, calculating the waveform symmetry score S_sym between 0 and 1. First, the absolute value of the average slope of the falling edge is set to k_down, and the absolute value of the average slope of the rising edge is set to k_up. The waveform symmetry score S_sym is calculated using the formula S_sym = min(k_down, k_up) / max(k_down, k_up). If the absolute values ​​of the average slope of the falling and rising edges k_down and k_up are exactly equal, then the score S_sym = 1 (ideal symmetry). The greater the difference between the absolute values ​​of the average slope of the falling and rising edges k_down and k_up, the closer the score S_sym is to 0.

[0064] The second method is based on the quantization of the fall transition time and the rise transition time, and the symmetry score S_sym of the obtained waveform is calculated to be between 0 and 1. First, the fall transition time is set to t_down and the rise transition time is set to t_up. The larger of the two is taken as t_max, and the formula S_sym=1-|t_down-t_up| / (t_down+t_up) is used for calculation. If t_down=t_up, then the score S_sym=1. The greater the difference between the fall transition time t_down and the rise transition time t_up, the lower the value of the score S_sym.

[0065] After calculating the steepness score S_edge of the transition edge, the flatness score S_flat of the trough, and the symmetry score S_sym of the waveform using the above method, the signal quality factor Q is calculated based on the weighted average or multiplication of these three scores. Preferably, the calculated signal quality factor Q is between 0 and 1. For example, it can be calculated using the following formula: Q = α1 * S_edge + α2 * S_flat + α3 * S_sym, where α1 + α2 + α3 = 1, and α1 ≥ α2 ≥ α3 > 0.

[0066] As can be seen from the above formula, the weight α1 of the steepness score S_edge of the transition edge is the largest, for example, 0.5. This is because the steepness directly determines the time resolution of the positioning moment. The steeper the falling / rising edge, the more accurately the controller can determine the physical position of the via edge. Therefore, this embodiment assigns it the highest weight to ensure that positioning accuracy is important in the overall evaluation.

[0067] The weight α2 of the valley flatness score S_flat is secondary, for example, 0.3, because flatness reflects the stability of the signal within the detection window. A flat signal means that the through-hole / detection mark area is clean, unobstructed, or jittery, ensuring the reliability of the through-hole status judgment and resisting transient interference. Therefore, the higher weight of the valley flatness score S_flat ensures sensitivity to continuous interference (such as stains or uneven paper), avoiding misjudging contaminated sections as qualified signals.

[0068] The weight α3 of the waveform symmetry score S_sym is relatively small, for example, 0.2. This is because symmetry reflects more systematic or mechanical problems, such as photoelectric detection module misalignment or paper path deviation. Although these factors have a less direct impact on single positioning than steepness, their trend is a valuable diagnostic indicator. Incorporating waveform symmetry into the calculation of the signal quality factor Q can reflect the impact of installation or mechanical faults, but its low weight avoids over-penalizing a otherwise good signal due to slight asymmetry.

[0069] After calculating the signal quality factor Q, the conditions for judging vias / detection marks need to be dynamically adjusted based on the signal quality factor Q. Specifically, step S25 is executed to determine whether the signal quality factor is greater than or equal to a first threshold, for example, the first threshold is 0.8. If so, it indicates that the level signal is clear and ideal, and the controller will execute step S26 to tighten the judgment conditions of the pulse signal. For example, the duration range of the second level is reduced, that is, the allowable error time ±Δt is reduced; the confirmation threshold range of the second level is reduced, that is, the second level must cross a threshold closer to the ideal value; the via event is immediately confirmed without additional verification.

[0070] If the signal quality factor is not greater than the first threshold, then proceed to step S27 to determine whether it is less than or equal to the second threshold. For example, if the second threshold is 0.5, then if it is, it indicates that the level signal quality is poor and may be subject to interference. Then proceed to step S28 to relax the judgment conditions of the pulse signal and activate the defense strategy. For example, increase the duration range of the second level, that is, increase the allowable error time ±Δt; increase the confirmation threshold range of the second level, that is, accept a wider level threshold; do not immediately confirm that the pulse signal corresponds to a via / detection mark, but mark it as "suspicious" and require subsequent verification through repeated detection and other methods.

[0071] The controller employs a micro-amplitude reciprocating verification method for repeated detection. For example, the controller controls the paper feed motor to execute a short-distance "forward-backward-forward" sequence. Specifically, the label paper is fed forward an additional 0.5mm to 1mm to ensure the through-hole / detection mark completely passes the position of the photoelectric detection module. Then, the paper is fed in the reverse direction for 2mm to 3mm, allowing the through-hole / detection mark area to pass through the photoelectric detection module again. Finally, the paper is fed forward back to near the original trigger position. During this process, the photoelectric sensor samples the area two or even three times, comparing the waveform characteristics of the signals multiple times with the signal quality factor Q. This method is direct, reliable, and applicable to most situations.

[0072] If the verification results remain questionable or uncertain after the above verification, for example, if the signal is still judged as low quality after a set verification cycle (e.g., up to 3 times), such as the signal quality factor Q value consistently falling below the threshold or inconsistent characteristics, then an escalation process is executed. Specifically, a status escalation and safety operation are performed, transitioning from a "suspected state" to a "recovery / calibration state," and the current printing task is immediately paused, or a low-speed, high-security operating mode is entered. Additionally, the controller can initiate a targeted photoelectric detection module reference value relearning, recalibrating the signal reference of the label area and the through-hole / detection mark area under static or low-speed conditions. Furthermore, encoder data analysis can be combined to determine if persistent slippage or mechanical positioning abnormalities have occurred. If stable detection can be restored at low speed after self-test, the system will automatically complete the positioning and prompt "Interference detected, restored" and continue printing; if self-test fails, it will enter "fault alarm state", stop running, and report a clear diagnostic error code to the user. For example, error code E01 indicates "the positioning signal is continuously abnormal, and the sensor needs to be checked for cleanliness", and error code E02 indicates "the tag spacing is incorrect, and the consumables installation needs to be checked".

[0073] If the judgment result of step S27 is negative, indicating that the signal quality factor Q is in the intermediate range between 0.5 and 0.8, then step S28 is executed to maintain the current judgment condition. Alternatively, the controller can enter a balanced mode or a standard monitoring mode, for example, where the system uses a preset, untightened or unlost default threshold and time window for via / detection mark determination.

[0074] Furthermore, when the signal quality factor Q is between 0.5 and 0.8, the controller will still perform normal verification but increase the monitoring level. Specifically, it needs to perform normal verification of through-hole events and complete positioning to avoid frequent verification processes affecting printing continuity. However, at the same time, the controller will temporarily increase the monitoring frequency or attention of subsequent detections to closely observe the signal quality trend. If the calculated value of the signal quality factor Q falls within this range consecutively within a short period of time and shows a downward trend, it may trigger an early warning or prepare to switch to a "defense strategy".

[0075] Finally, the controller needs to record data and perform performance analysis and self-learning. Since the signal quality factor Q is consistently between 0.5 and 0.8, which is the most typical operating condition of the system, it is necessary to record the relevant parameters of these events (such as actual threshold, speed, and scores of each dimension) to update and optimize the statistical benchmark of the "ideal signal model". For example, dynamically adjust the reference value K_ref or Var_max in the calculation formula of the signal quality factor Q so that the system can adaptively fine-tune its "excellent" standard and achieve long-term performance optimization.

[0076] Through the above method, this embodiment can dynamically and finely control the judgment strategy of vias / detection markers. When the signal quality factor Q is high, the system trusts the detection and enters "precision mode". In this case, not only is it immediately confirmed that it is a via / detection marker, but the judgment conditions are also tightened. For example, the allowable time error ±Δt is reduced from ±10% to ±3%, and sub-pixel level interpolation is performed using steep edges, thereby obtaining positioning accuracy far exceeding that of traditional solutions.

[0077] Furthermore, this embodiment constructs a two-tiered judgment barrier, from "pass" to "trustworthy." Compared to traditional solutions that determine a via / detection mark based on the signal level exceeding a threshold, this embodiment, after the signal level exceeds a pre-set threshold (first-tier judgment barrier), also calculates the signal quality factor Q and performs a quality assessment (second-tier judgment barrier). Finally, it determines whether to "confirm," "verify with doubt," or "mark as abnormal" based on the signal quality factor Q. This effectively isolates low-quality signals from contaminating the positioning process, fundamentally preventing misalignment caused by a single interference event.

[0078] Finally, this embodiment provides a quantitative basis for system maintenance. By recording the value of the signal quality factor Q and its components (the steepness score of the transition edge S_edge, the flatness score of the trough S_flat, and the symmetry score of the waveform S_sym) over a long period, a health record of the system can be constructed. For example, if the historical average value of the waveform symmetry score S_sym shows a downward trend, even if the signal quality factor Q is still qualified, it can provide an early warning that "the photoelectric detection module may be loose" or "the paper guide path is worn," thus enabling predictive maintenance.

[0079] Since different types of label paper have different reflectivities for light signals, the traditional method is to use analog voltage and determine whether there is blank paper based on the voltage value. This method often produces large errors due to the different types of label paper. This invention can effectively solve this problem by detecting through holes / detection marks, and can accurately realize the positioning of printed labels and paperless detection using only one photoelectric detection module.

[0080] Furthermore, this invention introduces a signal quality factor Q to dynamically adjust the judgment conditions of the pulse signal, achieving an intelligent balance that prioritizes accuracy when the signal is good and prioritizes error prevention when the signal is poor, thereby significantly improving the ability to resist transient interference.

[0081] Although the present invention has been described above through embodiments, it should be understood that the above embodiments are only used to exemplarily describe possible implementations of the present invention and should not be construed as limiting the scope of protection of the present invention. That is, any substitutions or changes made by those skilled in the art in accordance with the present invention should also be covered by the scope of protection of the claims of the present invention.

Claims

1. A label paper positioning method for a label printer, characterized in that... Includes the following steps: The photoelectric detection module of the label printer emits and receives light signals. When a non-detection mark area, including the printed label on the label paper, passes through the location of the photoelectric detection module, the photoelectric detection module outputs a first level signal. When a detection mark on the label paper passes through the location of the photoelectric detection module, the photoelectric detection module outputs a second level signal. The controller acquires the level signal output by the photoelectric detection module, which includes the first level signal and the second level signal, and records the formation time of the transition edge of the level signal. Based on the formation time, it controls the paper feed motor to rotate so as to deliver the next printed label to the target position.

2. The label paper positioning method for a label printer according to claim 1, characterized in that... The timing of the transition edges of the recorded level signal includes: Using the first level signal as the reference level signal, determine whether the current level signal is lower or higher than the reference level by a preset ratio. If so, confirm that the current level signal is the second level signal and confirm the formation of the transition edge.

3. The label paper positioning method for a label printer according to claim 2, characterized in that: The preset ratio is an adjustable ratio.

4. The label paper positioning method for a label printer according to claim 1, characterized in that... Also includes: The rotational speed of the paper feed motor is obtained, the target duration of the second level is calculated based on the preset detection mark size, and the duration range of the second level is determined based on the target duration. After obtaining the second level, determine whether the duration of the second level is within the specified duration range. If not, confirm that the current second level is invalid.

5. The label paper positioning method for a label printer according to any one of claims 1 to 4, characterized in that: After acquiring the level signal output by the photoelectric detection module, the controller calculates the waveform characteristics of the pulse signal used to identify the detection mark based on the level signal, calculates the signal quality factor based on the waveform characteristics, and dynamically adjusts the judgment conditions of the pulse signal based on the signal quality factor.

6. The label paper positioning method for a label printer according to claim 5, characterized in that... Dynamically adjusting the judgment conditions for the pulse signal based on the signal quality factor includes: If the signal quality factor is greater than or equal to the first preset threshold, tighten the judgment conditions for the pulse signal; if the signal quality factor is less than the first preset threshold but greater than the second preset threshold, maintain the current judgment conditions; if the signal quality factor is less than or equal to the second preset threshold, relax the judgment conditions for the pulse signal.

7. The label paper positioning method for a label printer according to claim 6, characterized in that... The criteria for tightening the pulse signal include at least one of the following: Narrow the duration range of the second level; Narrow the confirmation threshold range for the second level; Immediately confirm that the current pulse signal is the pulse signal generated by the detection mark.

8. The label paper positioning method for a label printer according to claim 6, characterized in that... Relaxing the criteria for determining the pulse signal includes at least one of the following: Increase the duration range of the second level; Increase the confirmation threshold range for the second level; The current pulse signal is marked as a suspicious detection pulse signal.

9. The label paper positioning method for a label printer according to claim 5, characterized in that... The waveform characteristics include at least one of the following: the steepness of the transition edge, the flatness of the first level and / or the second level, and the symmetry of the pulse signal; If the waveform features include at least two of the following: the steepness of the transition edge, the flatness of the first level and / or the second level, and the symmetry of the pulse signal, then calculating the signal quality factor based on the waveform features includes: using the quantized values ​​of the at least two waveform features to perform weighted summation or multiplication to obtain the signal quality factor.

10. A label printer, comprising a controller and a photoelectric detection module, characterized in that: The controller receives the level signal output by the photoelectric detection module and is capable of executing the label paper positioning method as described in any one of claims 1 to 9.